@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
package/dist/index.esm.js
CHANGED
|
@@ -19930,6 +19930,7 @@ var GlobalConfig = class {
|
|
|
19930
19930
|
editSaveMode: "cell-blur",
|
|
19931
19931
|
saveErrorHandleMode: "default",
|
|
19932
19932
|
overflowMode: "wrap",
|
|
19933
|
+
columnAlign: "center",
|
|
19933
19934
|
emptyHiddenUnit: true
|
|
19934
19935
|
};
|
|
19935
19936
|
// 全局菜单配置
|
|
@@ -20002,7 +20003,8 @@ var GlobalConfig = class {
|
|
|
20002
20003
|
enableAsyncActionNotice: false,
|
|
20003
20004
|
aiChunkView: "",
|
|
20004
20005
|
aiChunkEntity: "",
|
|
20005
|
-
counterMaxValue: 99
|
|
20006
|
+
counterMaxValue: 99,
|
|
20007
|
+
enhancedUI: false
|
|
20006
20008
|
};
|
|
20007
20009
|
// 全局分页流布局配置
|
|
20008
20010
|
this.drtab = {
|
|
@@ -20596,6 +20598,17 @@ var HelperAbs = class extends HelperBase {
|
|
|
20596
20598
|
}
|
|
20597
20599
|
};
|
|
20598
20600
|
|
|
20601
|
+
// src/utils/handlebars/helpers/date-format/date-format.ts
|
|
20602
|
+
import dayjs from "dayjs";
|
|
20603
|
+
var HelperDateFormat = class extends HelperBase {
|
|
20604
|
+
constructor(hbs) {
|
|
20605
|
+
super(hbs, "dateFormat");
|
|
20606
|
+
}
|
|
20607
|
+
onExecute(date, format) {
|
|
20608
|
+
return dayjs(date).format(format);
|
|
20609
|
+
}
|
|
20610
|
+
};
|
|
20611
|
+
|
|
20599
20612
|
// src/utils/handlebars/helpers/index.ts
|
|
20600
20613
|
function installHelpers(hsb) {
|
|
20601
20614
|
new HelperAbs(hsb);
|
|
@@ -20618,6 +20631,7 @@ function installHelpers(hsb) {
|
|
|
20618
20631
|
new HelperSpinalCase(hsb);
|
|
20619
20632
|
new HelperUpperCase(hsb);
|
|
20620
20633
|
new HelperEqPropertyValue(hsb);
|
|
20634
|
+
new HelperDateFormat(hsb);
|
|
20621
20635
|
}
|
|
20622
20636
|
|
|
20623
20637
|
// src/utils/handlebars/handlebars.ts
|
|
@@ -23464,7 +23478,7 @@ function filterValueRules(vrs, name2) {
|
|
|
23464
23478
|
return vrs.filter((vr) => {
|
|
23465
23479
|
const { checkMode } = vr;
|
|
23466
23480
|
const belongName = vr.deformItemName || vr.degridEditItemName;
|
|
23467
|
-
return checkMode !== 2 && belongName === name2;
|
|
23481
|
+
return checkMode !== 2 && (belongName == null ? void 0 : belongName.toLowerCase()) === name2.toLowerCase();
|
|
23468
23482
|
});
|
|
23469
23483
|
}
|
|
23470
23484
|
|
|
@@ -25957,7 +25971,7 @@ var ValueExUtil = class {
|
|
|
25957
25971
|
|
|
25958
25972
|
// src/controller/utils/value-default/value-default.ts
|
|
25959
25973
|
import { RuntimeError as RuntimeError12, ModelError as ModelError4 } from "@ibiz-template/core";
|
|
25960
|
-
import
|
|
25974
|
+
import dayjs2 from "dayjs";
|
|
25961
25975
|
import { createUUID as createUUID3 } from "qx-util";
|
|
25962
25976
|
import { isNil as isNil9, isNotNil } from "ramda";
|
|
25963
25977
|
function getDefaultValue(opts, origins) {
|
|
@@ -25991,7 +26005,7 @@ function getDefaultValue(opts, origins) {
|
|
|
25991
26005
|
case "OPERATOR":
|
|
25992
26006
|
return context.srfuserid;
|
|
25993
26007
|
case "CURTIME":
|
|
25994
|
-
return
|
|
26008
|
+
return dayjs2().format(valueFormat);
|
|
25995
26009
|
case "PARAM":
|
|
25996
26010
|
return data[defaultValue];
|
|
25997
26011
|
case "SESSION":
|
|
@@ -28416,12 +28430,12 @@ var BaseController = class {
|
|
|
28416
28430
|
async created() {
|
|
28417
28431
|
this.mountCounter.enroll(SELF_KEY);
|
|
28418
28432
|
await this.onCreated();
|
|
28433
|
+
ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onCreated"));
|
|
28434
|
+
await this._evt.emit("onCreated", void 0);
|
|
28419
28435
|
this.state.isCreated = true;
|
|
28420
28436
|
this.force(() => {
|
|
28421
28437
|
this.mountSelf();
|
|
28422
28438
|
});
|
|
28423
|
-
ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onCreated"));
|
|
28424
|
-
this._evt.emit("onCreated", void 0);
|
|
28425
28439
|
}
|
|
28426
28440
|
/**
|
|
28427
28441
|
* 生命周期-创建完成,实际执行逻辑,子类重写用这个
|
|
@@ -28871,8 +28885,8 @@ var ViewController = class extends BaseController {
|
|
|
28871
28885
|
return this.getEventArgs();
|
|
28872
28886
|
};
|
|
28873
28887
|
if (this.scheduler.hasViewEventTrigger) {
|
|
28874
|
-
this.evt.onAll((_eventName, event) => {
|
|
28875
|
-
this.scheduler.triggerViewEvent(event);
|
|
28888
|
+
this.evt.onAll(async (_eventName, event) => {
|
|
28889
|
+
await this.scheduler.triggerViewEvent(event);
|
|
28876
28890
|
});
|
|
28877
28891
|
}
|
|
28878
28892
|
}
|
|
@@ -29339,7 +29353,7 @@ var HtmlViewController = class extends ViewController {
|
|
|
29339
29353
|
|
|
29340
29354
|
// src/controller/common/editor/editor.controller.ts
|
|
29341
29355
|
import { DataTypes } from "@ibiz-template/core";
|
|
29342
|
-
import
|
|
29356
|
+
import dayjs3 from "dayjs";
|
|
29343
29357
|
var EditorController = class {
|
|
29344
29358
|
/**
|
|
29345
29359
|
* Creates an instance of EditorController.
|
|
@@ -29512,7 +29526,7 @@ var EditorController = class {
|
|
|
29512
29526
|
await this.onInit();
|
|
29513
29527
|
}
|
|
29514
29528
|
async onInit() {
|
|
29515
|
-
var _a3, _b2;
|
|
29529
|
+
var _a3, _b2, _c, _d;
|
|
29516
29530
|
if (this.model.placeHolder) {
|
|
29517
29531
|
this.placeHolder = this.model.placeHolder;
|
|
29518
29532
|
}
|
|
@@ -29559,6 +29573,14 @@ var EditorController = class {
|
|
|
29559
29573
|
(item) => item.id !== this.model.id
|
|
29560
29574
|
);
|
|
29561
29575
|
}
|
|
29576
|
+
const controlAttributes = ((_d = (_c = this.parent.model) == null ? void 0 : _c.controlAttributes) == null ? void 0 : _d.filter(
|
|
29577
|
+
(item) => "classNames" /* CLASSNAMES */ === item.attrName || "styles" /* STYLES */ === item.attrName
|
|
29578
|
+
)) || [];
|
|
29579
|
+
if (controlAttributes.length) {
|
|
29580
|
+
if (!this.model.controlAttributes)
|
|
29581
|
+
this.model.controlAttributes = [];
|
|
29582
|
+
this.model.controlAttributes.push(...controlAttributes);
|
|
29583
|
+
}
|
|
29562
29584
|
this.initExtraParams();
|
|
29563
29585
|
}
|
|
29564
29586
|
/**
|
|
@@ -29648,7 +29670,7 @@ var EditorController = class {
|
|
|
29648
29670
|
}
|
|
29649
29671
|
const isDate = DataTypes.isDate(this.dataType);
|
|
29650
29672
|
if (isDate) {
|
|
29651
|
-
const formatVal =
|
|
29673
|
+
const formatVal = dayjs3(strVal).format(this.valueFormat);
|
|
29652
29674
|
if (formatVal !== "Invalid Date") {
|
|
29653
29675
|
return formatVal;
|
|
29654
29676
|
}
|
|
@@ -31942,8 +31964,8 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
31942
31964
|
};
|
|
31943
31965
|
|
|
31944
31966
|
// src/controller/control/calendar/calendar.controller.ts
|
|
31945
|
-
import
|
|
31946
|
-
import { RuntimeError as RuntimeError30
|
|
31967
|
+
import dayjs4 from "dayjs";
|
|
31968
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
31947
31969
|
|
|
31948
31970
|
// src/controller/control/calendar/calendar.service.ts
|
|
31949
31971
|
import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
|
|
@@ -36294,41 +36316,41 @@ var CalendarController = class extends MDControlController {
|
|
|
36294
36316
|
switch (this.timeRangeMode) {
|
|
36295
36317
|
case "year":
|
|
36296
36318
|
this.state.timeRange = [
|
|
36297
|
-
|
|
36298
|
-
|
|
36319
|
+
dayjs4().startOf("year").toDate(),
|
|
36320
|
+
dayjs4().endOf("year").toDate()
|
|
36299
36321
|
];
|
|
36300
36322
|
break;
|
|
36301
36323
|
case "halfYear":
|
|
36302
|
-
const year =
|
|
36303
|
-
const isFirstHalf =
|
|
36324
|
+
const year = dayjs4().year();
|
|
36325
|
+
const isFirstHalf = dayjs4().month() < 6;
|
|
36304
36326
|
if (isFirstHalf) {
|
|
36305
36327
|
this.state.timeRange = [
|
|
36306
|
-
|
|
36307
|
-
|
|
36328
|
+
dayjs4("".concat(year, "-01-01")).toDate(),
|
|
36329
|
+
dayjs4("".concat(year, "-06-30")).toDate()
|
|
36308
36330
|
];
|
|
36309
36331
|
} else {
|
|
36310
36332
|
this.state.timeRange = [
|
|
36311
|
-
|
|
36312
|
-
|
|
36333
|
+
dayjs4("".concat(year, "-07-01")).toDate(),
|
|
36334
|
+
dayjs4("".concat(year, "-12-31")).toDate()
|
|
36313
36335
|
];
|
|
36314
36336
|
}
|
|
36315
36337
|
break;
|
|
36316
36338
|
case "quarter":
|
|
36317
36339
|
this.state.timeRange = [
|
|
36318
|
-
|
|
36319
|
-
|
|
36340
|
+
dayjs4().startOf("quarter").toDate(),
|
|
36341
|
+
dayjs4().endOf("quarter").toDate()
|
|
36320
36342
|
];
|
|
36321
36343
|
break;
|
|
36322
36344
|
case "custom":
|
|
36323
36345
|
const { begintime } = this.controlParams;
|
|
36324
36346
|
const { endtime } = this.controlParams;
|
|
36325
|
-
if (!begintime || !
|
|
36347
|
+
if (!begintime || !dayjs4(begintime).isValid() || !endtime || !dayjs4(endtime).isValid())
|
|
36326
36348
|
throw new RuntimeError30(
|
|
36327
36349
|
ibiz.i18n.t("runtime.controller.control.calendar.illegalTime")
|
|
36328
36350
|
);
|
|
36329
36351
|
this.state.timeRange = [
|
|
36330
|
-
|
|
36331
|
-
|
|
36352
|
+
dayjs4(begintime).toDate(),
|
|
36353
|
+
dayjs4(endtime).toDate()
|
|
36332
36354
|
];
|
|
36333
36355
|
break;
|
|
36334
36356
|
default:
|
|
@@ -36399,8 +36421,8 @@ var CalendarController = class extends MDControlController {
|
|
|
36399
36421
|
return this.getEventArgs();
|
|
36400
36422
|
};
|
|
36401
36423
|
if (this.viewScheduler.hasViewEventTrigger) {
|
|
36402
|
-
this.evt.onAll((_eventName, event) => {
|
|
36403
|
-
this.viewScheduler.triggerViewEvent(event);
|
|
36424
|
+
this.evt.onAll(async (_eventName, event) => {
|
|
36425
|
+
await this.viewScheduler.triggerViewEvent(event);
|
|
36404
36426
|
});
|
|
36405
36427
|
}
|
|
36406
36428
|
}
|
|
@@ -36462,13 +36484,12 @@ var CalendarController = class extends MDControlController {
|
|
|
36462
36484
|
ctrl: this
|
|
36463
36485
|
}
|
|
36464
36486
|
));
|
|
36465
|
-
if (result === -1)
|
|
36466
|
-
|
|
36467
|
-
|
|
36468
|
-
|
|
36469
|
-
|
|
36470
|
-
|
|
36471
|
-
);
|
|
36487
|
+
if (result === -1) {
|
|
36488
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicOpendata"));
|
|
36489
|
+
return {
|
|
36490
|
+
cancel: true
|
|
36491
|
+
};
|
|
36492
|
+
}
|
|
36472
36493
|
return {
|
|
36473
36494
|
cancel: result ? result.ok : true
|
|
36474
36495
|
};
|
|
@@ -36498,13 +36519,12 @@ var CalendarController = class extends MDControlController {
|
|
|
36498
36519
|
ctrl: this
|
|
36499
36520
|
}
|
|
36500
36521
|
));
|
|
36501
|
-
if (result === -1)
|
|
36502
|
-
|
|
36503
|
-
|
|
36504
|
-
|
|
36505
|
-
|
|
36506
|
-
|
|
36507
|
-
);
|
|
36522
|
+
if (result === -1) {
|
|
36523
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicNewdata"));
|
|
36524
|
+
return {
|
|
36525
|
+
cancel: true
|
|
36526
|
+
};
|
|
36527
|
+
}
|
|
36508
36528
|
return {
|
|
36509
36529
|
cancel: result ? result.ok : true
|
|
36510
36530
|
};
|
|
@@ -36644,9 +36664,9 @@ var CalendarController = class extends MDControlController {
|
|
|
36644
36664
|
let result = 0;
|
|
36645
36665
|
const x = a[sortField];
|
|
36646
36666
|
const y = b[sortField];
|
|
36647
|
-
if (
|
|
36667
|
+
if (dayjs4(x).isAfter(y)) {
|
|
36648
36668
|
result = -1;
|
|
36649
|
-
} else if (
|
|
36669
|
+
} else if (dayjs4(x).isBefore(y)) {
|
|
36650
36670
|
result = 1;
|
|
36651
36671
|
}
|
|
36652
36672
|
return result;
|
|
@@ -36714,15 +36734,15 @@ var CalendarController = class extends MDControlController {
|
|
|
36714
36734
|
);
|
|
36715
36735
|
break;
|
|
36716
36736
|
case "USER2":
|
|
36717
|
-
srfstartdate =
|
|
36718
|
-
srfenddate =
|
|
36737
|
+
srfstartdate = dayjs4(timeRange[0]).format("YYYY-MM-DD");
|
|
36738
|
+
srfenddate = dayjs4(timeRange[1]).format("YYYY-MM-DD");
|
|
36719
36739
|
break;
|
|
36720
36740
|
default:
|
|
36721
36741
|
break;
|
|
36722
36742
|
}
|
|
36723
36743
|
return {
|
|
36724
|
-
srfstartdate:
|
|
36725
|
-
srfenddate:
|
|
36744
|
+
srfstartdate: dayjs4(srfstartdate).format("YYYY-MM-DD HH:mm:ss"),
|
|
36745
|
+
srfenddate: dayjs4(srfenddate).format("YYYY-MM-DD HH:mm:ss")
|
|
36726
36746
|
};
|
|
36727
36747
|
}
|
|
36728
36748
|
return { srfstartdate, srfenddate };
|
|
@@ -36912,22 +36932,22 @@ import { isObject as isObject2, isString as isString2 } from "qx-util";
|
|
|
36912
36932
|
import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
36913
36933
|
|
|
36914
36934
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
36915
|
-
import { RuntimeModelError as
|
|
36935
|
+
import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
36916
36936
|
|
|
36917
36937
|
// src/controller/control/chart/generator/base-series-generator.ts
|
|
36918
|
-
import { plus, RuntimeModelError as
|
|
36919
|
-
import
|
|
36938
|
+
import { plus, RuntimeModelError as RuntimeModelError40, toNumberOrNil } from "@ibiz-template/core";
|
|
36939
|
+
import dayjs5 from "dayjs";
|
|
36920
36940
|
import minMax from "dayjs/plugin/minMax";
|
|
36921
36941
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
36922
36942
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
36923
36943
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
36924
36944
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
36925
36945
|
import { clone as clone16, isNil as isNil15, mergeDeepRight } from "ramda";
|
|
36926
|
-
|
|
36927
|
-
|
|
36928
|
-
|
|
36929
|
-
|
|
36930
|
-
|
|
36946
|
+
dayjs5.extend(minMax);
|
|
36947
|
+
dayjs5.extend(isSameOrBefore);
|
|
36948
|
+
dayjs5.extend(quarterOfYear);
|
|
36949
|
+
dayjs5.extend(weekOfYear);
|
|
36950
|
+
dayjs5.extend(isoWeek);
|
|
36931
36951
|
var DEFAULT_GROUP = "$default_group";
|
|
36932
36952
|
var BaseSeriesGenerator = class {
|
|
36933
36953
|
/**
|
|
@@ -36997,13 +37017,13 @@ var BaseSeriesGenerator = class {
|
|
|
36997
37017
|
var _a3;
|
|
36998
37018
|
const { chartSeriesEncode, caption, id, userParam } = model;
|
|
36999
37019
|
if (!model.catalogField) {
|
|
37000
|
-
throw new
|
|
37020
|
+
throw new RuntimeModelError40(
|
|
37001
37021
|
model,
|
|
37002
37022
|
ibiz.i18n.t("runtime.controller.control.chart.missingClassification")
|
|
37003
37023
|
);
|
|
37004
37024
|
}
|
|
37005
37025
|
if (!model.valueField) {
|
|
37006
|
-
throw new
|
|
37026
|
+
throw new RuntimeModelError40(
|
|
37007
37027
|
model,
|
|
37008
37028
|
ibiz.i18n.t("runtime.controller.control.chart.missingValue")
|
|
37009
37029
|
);
|
|
@@ -37549,25 +37569,25 @@ var BaseSeriesGenerator = class {
|
|
|
37549
37569
|
format = "YYYY-MM";
|
|
37550
37570
|
}
|
|
37551
37571
|
if (singleData[this.catalogField]) {
|
|
37552
|
-
const formattedDate =
|
|
37572
|
+
const formattedDate = dayjs5(singleData[this.catalogField]).format(
|
|
37553
37573
|
format
|
|
37554
37574
|
);
|
|
37555
37575
|
singleData[this.catalogField] = formattedDate;
|
|
37556
37576
|
}
|
|
37557
37577
|
} else if (groupMode === "QUARTER") {
|
|
37558
37578
|
if (singleData[this.catalogField]) {
|
|
37559
|
-
const formattedDate = "".concat(
|
|
37579
|
+
const formattedDate = "".concat(dayjs5(
|
|
37560
37580
|
singleData[this.catalogField]
|
|
37561
|
-
).format("YYYY"), "-").concat(
|
|
37581
|
+
).format("YYYY"), "-").concat(dayjs5(
|
|
37562
37582
|
singleData[this.catalogField]
|
|
37563
37583
|
).quarter());
|
|
37564
37584
|
singleData[this.catalogField] = formattedDate;
|
|
37565
37585
|
}
|
|
37566
37586
|
} else if (groupMode === "YEARWEEK") {
|
|
37567
37587
|
if (singleData[this.catalogField]) {
|
|
37568
|
-
const formattedDate = "".concat(
|
|
37588
|
+
const formattedDate = "".concat(dayjs5(
|
|
37569
37589
|
singleData[this.catalogField]
|
|
37570
|
-
).format("YYYY"), "-").concat(
|
|
37590
|
+
).format("YYYY"), "-").concat(dayjs5(singleData[this.catalogField]).week());
|
|
37571
37591
|
singleData[this.catalogField] = formattedDate;
|
|
37572
37592
|
}
|
|
37573
37593
|
}
|
|
@@ -37589,7 +37609,7 @@ var BaseSeriesGenerator = class {
|
|
|
37589
37609
|
let sortedKeys = [];
|
|
37590
37610
|
if (groupMode === "DAY" || groupMode === "YEAR" || groupMode === "MONTH") {
|
|
37591
37611
|
sortedKeys = Array.from(dateMap.keys()).sort(
|
|
37592
|
-
(a, b) =>
|
|
37612
|
+
(a, b) => dayjs5(a).diff(dayjs5(b))
|
|
37593
37613
|
);
|
|
37594
37614
|
} else if (groupMode === "QUARTER" || groupMode === "YEARWEEK") {
|
|
37595
37615
|
sortedKeys = Array.from(dateMap.keys()).sort((a, b) => {
|
|
@@ -37622,13 +37642,13 @@ var BaseSeriesGenerator = class {
|
|
|
37622
37642
|
const dates = [];
|
|
37623
37643
|
Object.keys(data).forEach((key) => {
|
|
37624
37644
|
data[key].forEach((_val, date) => {
|
|
37625
|
-
dates.push(
|
|
37645
|
+
dates.push(dayjs5(date));
|
|
37626
37646
|
});
|
|
37627
37647
|
});
|
|
37628
37648
|
if (!dates.length)
|
|
37629
37649
|
return;
|
|
37630
|
-
const maxDate =
|
|
37631
|
-
const minDate =
|
|
37650
|
+
const maxDate = dayjs5.max(dates);
|
|
37651
|
+
const minDate = dayjs5.min(dates);
|
|
37632
37652
|
if (groupMode === "DAY") {
|
|
37633
37653
|
let currentDate = minDate;
|
|
37634
37654
|
const endDate = maxDate;
|
|
@@ -37750,13 +37770,13 @@ var BaseSeriesGenerator = class {
|
|
|
37750
37770
|
var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
37751
37771
|
calcStaticOptions() {
|
|
37752
37772
|
if (this.xAxisIndex === void 0) {
|
|
37753
|
-
throw new
|
|
37773
|
+
throw new RuntimeModelError41(
|
|
37754
37774
|
this.model,
|
|
37755
37775
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredX")
|
|
37756
37776
|
);
|
|
37757
37777
|
}
|
|
37758
37778
|
if (this.yAxisIndex === void 0) {
|
|
37759
|
-
throw new
|
|
37779
|
+
throw new RuntimeModelError41(
|
|
37760
37780
|
this.model,
|
|
37761
37781
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredY")
|
|
37762
37782
|
);
|
|
@@ -37775,17 +37795,17 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
37775
37795
|
};
|
|
37776
37796
|
|
|
37777
37797
|
// src/controller/control/chart/generator/bar-series-generator.ts
|
|
37778
|
-
import { RuntimeModelError as
|
|
37798
|
+
import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
37779
37799
|
var BarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
37780
37800
|
calcStaticOptions() {
|
|
37781
37801
|
if (this.xAxisIndex === void 0) {
|
|
37782
|
-
throw new
|
|
37802
|
+
throw new RuntimeModelError42(
|
|
37783
37803
|
this.model,
|
|
37784
37804
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredX")
|
|
37785
37805
|
);
|
|
37786
37806
|
}
|
|
37787
37807
|
if (this.yAxisIndex === void 0) {
|
|
37788
|
-
throw new
|
|
37808
|
+
throw new RuntimeModelError42(
|
|
37789
37809
|
this.model,
|
|
37790
37810
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredY")
|
|
37791
37811
|
);
|
|
@@ -37841,17 +37861,17 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
37841
37861
|
};
|
|
37842
37862
|
|
|
37843
37863
|
// src/controller/control/chart/generator/scatter-series-generator.ts
|
|
37844
|
-
import { RuntimeModelError as
|
|
37864
|
+
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
37845
37865
|
var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
|
|
37846
37866
|
calcStaticOptions() {
|
|
37847
37867
|
if (this.xAxisIndex === void 0) {
|
|
37848
|
-
throw new
|
|
37868
|
+
throw new RuntimeModelError43(
|
|
37849
37869
|
this.model,
|
|
37850
37870
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredX")
|
|
37851
37871
|
);
|
|
37852
37872
|
}
|
|
37853
37873
|
if (this.yAxisIndex === void 0) {
|
|
37854
|
-
throw new
|
|
37874
|
+
throw new RuntimeModelError43(
|
|
37855
37875
|
this.model,
|
|
37856
37876
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredY")
|
|
37857
37877
|
);
|
|
@@ -37981,7 +38001,7 @@ var RadarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
37981
38001
|
};
|
|
37982
38002
|
|
|
37983
38003
|
// src/controller/control/chart/generator/area-series-generator.ts
|
|
37984
|
-
import { RuntimeModelError as
|
|
38004
|
+
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
37985
38005
|
var AreaSeriesGenerator = class extends BaseSeriesGenerator {
|
|
37986
38006
|
/**
|
|
37987
38007
|
* 计算静态序列的options
|
|
@@ -37990,13 +38010,13 @@ var AreaSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
37990
38010
|
*/
|
|
37991
38011
|
calcStaticOptions() {
|
|
37992
38012
|
if (this.xAxisIndex === void 0) {
|
|
37993
|
-
throw new
|
|
38013
|
+
throw new RuntimeModelError44(
|
|
37994
38014
|
this.model,
|
|
37995
38015
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredX")
|
|
37996
38016
|
);
|
|
37997
38017
|
}
|
|
37998
38018
|
if (this.yAxisIndex === void 0) {
|
|
37999
|
-
throw new
|
|
38019
|
+
throw new RuntimeModelError44(
|
|
38000
38020
|
this.model,
|
|
38001
38021
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredY")
|
|
38002
38022
|
);
|
|
@@ -38046,7 +38066,7 @@ var GaugeSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
38046
38066
|
// src/controller/control/chart/generator/candlestick-series-generator.ts
|
|
38047
38067
|
import { isNil as isNil16 } from "ramda";
|
|
38048
38068
|
import { isArray as isArray9, isNumber as isNumber3 } from "qx-util";
|
|
38049
|
-
import { plus as plus2, RuntimeModelError as
|
|
38069
|
+
import { plus as plus2, RuntimeModelError as RuntimeModelError45, toNumberOrNil as toNumberOrNil2 } from "@ibiz-template/core";
|
|
38050
38070
|
var CandlestickSeriesGenerator = class extends BaseSeriesGenerator {
|
|
38051
38071
|
/**
|
|
38052
38072
|
* 初始化参数
|
|
@@ -38059,7 +38079,7 @@ var CandlestickSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
38059
38079
|
var _a3;
|
|
38060
38080
|
const { chartSeriesEncode, caption, id, userParam, navViewParamJO } = model;
|
|
38061
38081
|
if (!model.catalogField) {
|
|
38062
|
-
throw new
|
|
38082
|
+
throw new RuntimeModelError45(
|
|
38063
38083
|
model,
|
|
38064
38084
|
ibiz.i18n.t("runtime.controller.control.chart.missingClassification")
|
|
38065
38085
|
);
|
|
@@ -41391,7 +41411,7 @@ import { clone as clone23 } from "ramda";
|
|
|
41391
41411
|
import { isString as isString3 } from "lodash-es";
|
|
41392
41412
|
|
|
41393
41413
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
41394
|
-
import { RuntimeModelError as
|
|
41414
|
+
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
41395
41415
|
|
|
41396
41416
|
// src/controller/control/search-bar/util.ts
|
|
41397
41417
|
var ItemsValueOPs = [
|
|
@@ -41472,7 +41492,7 @@ var SearchBarFilterController = class {
|
|
|
41472
41492
|
async init() {
|
|
41473
41493
|
if (!this.noEditor) {
|
|
41474
41494
|
if (!this.model.editor) {
|
|
41475
|
-
throw new
|
|
41495
|
+
throw new RuntimeModelError46(
|
|
41476
41496
|
this.model,
|
|
41477
41497
|
ibiz.i18n.t("runtime.controller.control.searchBar.missingModel")
|
|
41478
41498
|
);
|
|
@@ -43580,7 +43600,7 @@ import {
|
|
|
43580
43600
|
clone as clone25,
|
|
43581
43601
|
DataTypes as DataTypes2,
|
|
43582
43602
|
isElementSame as isElementSame2,
|
|
43583
|
-
RuntimeModelError as
|
|
43603
|
+
RuntimeModelError as RuntimeModelError47
|
|
43584
43604
|
} from "@ibiz-template/core";
|
|
43585
43605
|
import { isNil as isNil18, isNotNil as isNotNil4 } from "ramda";
|
|
43586
43606
|
import { createUUID as createUUID6, isBoolean } from "qx-util";
|
|
@@ -44043,7 +44063,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
44043
44063
|
const { enableGroup } = this.state;
|
|
44044
44064
|
if (enableGroup && groupMode) {
|
|
44045
44065
|
if (!groupAppDEFieldId) {
|
|
44046
|
-
throw new
|
|
44066
|
+
throw new RuntimeModelError47(
|
|
44047
44067
|
this.model,
|
|
44048
44068
|
ibiz.i18n.t(
|
|
44049
44069
|
"runtime.controller.control.dataView.propertiesNoConfigured"
|
|
@@ -44136,7 +44156,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
44136
44156
|
async handleCodeListGroup() {
|
|
44137
44157
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
44138
44158
|
if (!groupCodeListId) {
|
|
44139
|
-
throw new
|
|
44159
|
+
throw new RuntimeModelError47(
|
|
44140
44160
|
this.model,
|
|
44141
44161
|
ibiz.i18n.t("runtime.controller.control.dataView.tableNoConfigured")
|
|
44142
44162
|
);
|
|
@@ -44250,7 +44270,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
44250
44270
|
caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
44251
44271
|
}
|
|
44252
44272
|
if (!item.appDEFieldId) {
|
|
44253
|
-
throw new
|
|
44273
|
+
throw new RuntimeModelError47(
|
|
44254
44274
|
item,
|
|
44255
44275
|
ibiz.i18n.t("runtime.controller.control.dataView.sortingItems")
|
|
44256
44276
|
);
|
|
@@ -44471,13 +44491,13 @@ var DataViewControlController = class extends MDControlController {
|
|
|
44471
44491
|
await this.updateChangedItems([draggedItem]);
|
|
44472
44492
|
} else {
|
|
44473
44493
|
if (!minorSortAppDEFieldId)
|
|
44474
|
-
throw new
|
|
44494
|
+
throw new RuntimeModelError47(
|
|
44475
44495
|
this.model,
|
|
44476
44496
|
ibiz.i18n.t("runtime.controller.common.md.sortingProperties")
|
|
44477
44497
|
);
|
|
44478
44498
|
const moveAction = moveControlAction == null ? void 0 : moveControlAction.appDEMethodId;
|
|
44479
44499
|
if (!moveAction)
|
|
44480
|
-
throw new
|
|
44500
|
+
throw new RuntimeModelError47(
|
|
44481
44501
|
this.model,
|
|
44482
44502
|
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
44483
44503
|
);
|
|
@@ -45473,7 +45493,7 @@ import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
|
45473
45493
|
|
|
45474
45494
|
// src/controller/control/form/form/form.controller.ts
|
|
45475
45495
|
import {
|
|
45476
|
-
RuntimeModelError as
|
|
45496
|
+
RuntimeModelError as RuntimeModelError48,
|
|
45477
45497
|
debounceAndAsyncMerge,
|
|
45478
45498
|
recursiveIterate as recursiveIterate8,
|
|
45479
45499
|
EntityError,
|
|
@@ -45743,7 +45763,7 @@ var FormController = class extends ControlController {
|
|
|
45743
45763
|
return;
|
|
45744
45764
|
}
|
|
45745
45765
|
if (form.details[detail.id]) {
|
|
45746
|
-
throw new
|
|
45766
|
+
throw new RuntimeModelError48(
|
|
45747
45767
|
detail,
|
|
45748
45768
|
ibiz.i18n.t(
|
|
45749
45769
|
"runtime.controller.control.form.initializationException",
|
|
@@ -47958,6 +47978,13 @@ var FormItemState = class extends FormDetailState {
|
|
|
47958
47978
|
* @memberof FormItemState
|
|
47959
47979
|
*/
|
|
47960
47980
|
this.inputTipUrl = void 0;
|
|
47981
|
+
/**
|
|
47982
|
+
* 编辑器类名集合
|
|
47983
|
+
*
|
|
47984
|
+
* @type {string[]}
|
|
47985
|
+
* @memberof FormItemState
|
|
47986
|
+
*/
|
|
47987
|
+
this.editorClass = [];
|
|
47961
47988
|
let $disabled = false;
|
|
47962
47989
|
Object.defineProperty(this, "disabled", {
|
|
47963
47990
|
enumerable: true,
|
|
@@ -48461,6 +48488,19 @@ var FormItemController = class extends FormDetailController {
|
|
|
48461
48488
|
clearTipsCache() {
|
|
48462
48489
|
localStorage.removeItem(this.TIPS_CACHE);
|
|
48463
48490
|
}
|
|
48491
|
+
/**
|
|
48492
|
+
* @description 计算动态样式表
|
|
48493
|
+
* @param {IData} data
|
|
48494
|
+
* @memberof FormItemController
|
|
48495
|
+
*/
|
|
48496
|
+
calcDynaClass(data) {
|
|
48497
|
+
var _a3;
|
|
48498
|
+
super.calcDynaClass(data);
|
|
48499
|
+
if ((_a3 = this.model.editor) == null ? void 0 : _a3.dynaClass) {
|
|
48500
|
+
const dynaClass = calcDynaClass(this.model.editor.dynaClass, data);
|
|
48501
|
+
this.state.editorClass = dynaClass;
|
|
48502
|
+
}
|
|
48503
|
+
}
|
|
48464
48504
|
};
|
|
48465
48505
|
|
|
48466
48506
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts
|
|
@@ -48669,7 +48709,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
48669
48709
|
import {
|
|
48670
48710
|
ModelError as ModelError20,
|
|
48671
48711
|
mergeInLeft as mergeInLeft2,
|
|
48672
|
-
RuntimeModelError as
|
|
48712
|
+
RuntimeModelError as RuntimeModelError49
|
|
48673
48713
|
} from "@ibiz-template/core";
|
|
48674
48714
|
var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
48675
48715
|
constructor() {
|
|
@@ -48708,7 +48748,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
48708
48748
|
if (((_a3 = this.context) == null ? void 0 : _a3.srfrunmode) === "DESIGN") {
|
|
48709
48749
|
return;
|
|
48710
48750
|
}
|
|
48711
|
-
throw new
|
|
48751
|
+
throw new RuntimeModelError49(
|
|
48712
48752
|
this.model,
|
|
48713
48753
|
ibiz.i18n.t("runtime.controller.control.form.unconfiguredWidgets")
|
|
48714
48754
|
);
|
|
@@ -48847,7 +48887,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
48847
48887
|
};
|
|
48848
48888
|
|
|
48849
48889
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
48850
|
-
import { RuntimeError as RuntimeError38, RuntimeModelError as
|
|
48890
|
+
import { RuntimeError as RuntimeError38, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
48851
48891
|
import { createUUID as createUUID8 } from "qx-util";
|
|
48852
48892
|
|
|
48853
48893
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -48892,7 +48932,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
48892
48932
|
if (((_a3 = this.context) == null ? void 0 : _a3.srfrunmode) === "DESIGN") {
|
|
48893
48933
|
return;
|
|
48894
48934
|
}
|
|
48895
|
-
throw new
|
|
48935
|
+
throw new RuntimeModelError50(
|
|
48896
48936
|
this.model,
|
|
48897
48937
|
ibiz.i18n.t("runtime.controller.control.form.unconfiguredWidgets")
|
|
48898
48938
|
);
|
|
@@ -49457,6 +49497,20 @@ var FormRawItemController = class extends FormDetailController {
|
|
|
49457
49497
|
var _a3;
|
|
49458
49498
|
return new FormRawItemState((_a3 = this.parent) == null ? void 0 : _a3.state);
|
|
49459
49499
|
}
|
|
49500
|
+
/**
|
|
49501
|
+
* @description 计算动态样式表
|
|
49502
|
+
* @protected
|
|
49503
|
+
* @param {IData} data
|
|
49504
|
+
* @memberof FormRawItemController
|
|
49505
|
+
*/
|
|
49506
|
+
calcDynaClass(data) {
|
|
49507
|
+
var _a3;
|
|
49508
|
+
super.calcDynaClass(data);
|
|
49509
|
+
if ((_a3 = this.model.rawItem) == null ? void 0 : _a3.dynaClass) {
|
|
49510
|
+
const dynaClass = calcDynaClass(this.model.rawItem.dynaClass, data);
|
|
49511
|
+
this.state.class.containerDyna = dynaClass;
|
|
49512
|
+
}
|
|
49513
|
+
}
|
|
49460
49514
|
};
|
|
49461
49515
|
|
|
49462
49516
|
// src/controller/control/form/form-detail/form-tab-page/form-tab-page.state.ts
|
|
@@ -49896,7 +49950,7 @@ import { clone as clone30, isNil as isNil21 } from "ramda";
|
|
|
49896
49950
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
49897
49951
|
import {
|
|
49898
49952
|
recursiveIterate as recursiveIterate12,
|
|
49899
|
-
RuntimeModelError as
|
|
49953
|
+
RuntimeModelError as RuntimeModelError51
|
|
49900
49954
|
} from "@ibiz-template/core";
|
|
49901
49955
|
var EditFormService = class extends FormService {
|
|
49902
49956
|
/**
|
|
@@ -50023,7 +50077,7 @@ var EditFormService = class extends FormService {
|
|
|
50023
50077
|
const wizardForm = this.model;
|
|
50024
50078
|
const methodName = (_a3 = wizardForm.goBackControlAction) == null ? void 0 : _a3.appDEMethodId;
|
|
50025
50079
|
if (!methodName) {
|
|
50026
|
-
throw new
|
|
50080
|
+
throw new RuntimeModelError51(
|
|
50027
50081
|
this.model,
|
|
50028
50082
|
ibiz.i18n.t("runtime.controller.control.form.lackBehavior")
|
|
50029
50083
|
);
|
|
@@ -51276,15 +51330,15 @@ import {
|
|
|
51276
51330
|
awaitTimeout as awaitTimeout2,
|
|
51277
51331
|
RuntimeError as RuntimeError40,
|
|
51278
51332
|
recursiveIterate as recursiveIterate13,
|
|
51279
|
-
RuntimeModelError as
|
|
51333
|
+
RuntimeModelError as RuntimeModelError53,
|
|
51280
51334
|
mergeDefaultInLeft as mergeDefaultInLeft2,
|
|
51281
51335
|
debounceAndAsyncMerge as debounceAndAsyncMerge2
|
|
51282
51336
|
} from "@ibiz-template/core";
|
|
51283
51337
|
import { clone as clone32 } from "ramda";
|
|
51284
|
-
import
|
|
51338
|
+
import dayjs6 from "dayjs";
|
|
51285
51339
|
|
|
51286
51340
|
// src/controller/control/grid/grid/grid.service.ts
|
|
51287
|
-
import { RuntimeModelError as
|
|
51341
|
+
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
51288
51342
|
var GridService = class extends MDControlService2 {
|
|
51289
51343
|
/**
|
|
51290
51344
|
* 初始化属性映射
|
|
@@ -51312,7 +51366,7 @@ var GridService = class extends MDControlService2 {
|
|
|
51312
51366
|
dataType: dataItem.dataType
|
|
51313
51367
|
});
|
|
51314
51368
|
} else {
|
|
51315
|
-
throw new
|
|
51369
|
+
throw new RuntimeModelError52(
|
|
51316
51370
|
column,
|
|
51317
51371
|
ibiz.i18n.t("runtime.controller.control.grid.corresponding", {
|
|
51318
51372
|
deField
|
|
@@ -51863,8 +51917,8 @@ var GridController = class extends MDControlController {
|
|
|
51863
51917
|
if (!valueFormat) {
|
|
51864
51918
|
return strVal;
|
|
51865
51919
|
}
|
|
51866
|
-
if (isDate &&
|
|
51867
|
-
const formatVal =
|
|
51920
|
+
if (isDate && dayjs6(strVal, valueFormat, true).isValid()) {
|
|
51921
|
+
const formatVal = dayjs6(strVal).format(valueFormat);
|
|
51868
51922
|
return formatVal;
|
|
51869
51923
|
}
|
|
51870
51924
|
return ibiz.util.text.format(strVal, valueFormat);
|
|
@@ -51942,6 +51996,17 @@ var GridController = class extends MDControlController {
|
|
|
51942
51996
|
}
|
|
51943
51997
|
return ibiz.config.grid.saveErrorHandleMode;
|
|
51944
51998
|
}
|
|
51999
|
+
/**
|
|
52000
|
+
* @description 列对齐方式
|
|
52001
|
+
* @readonly
|
|
52002
|
+
* @type {("left" | "right" | "center")}
|
|
52003
|
+
* @memberof GridController
|
|
52004
|
+
*/
|
|
52005
|
+
get columnAlign() {
|
|
52006
|
+
if (this.controlParams.columnalign)
|
|
52007
|
+
return this.controlParams.columnalign;
|
|
52008
|
+
return ibiz.config.grid.columnAlign;
|
|
52009
|
+
}
|
|
51945
52010
|
/**
|
|
51946
52011
|
* 分组代码表项集合
|
|
51947
52012
|
* @author lxm
|
|
@@ -52231,7 +52296,7 @@ var GridController = class extends MDControlController {
|
|
|
52231
52296
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
52232
52297
|
);
|
|
52233
52298
|
if (!this.groupFieldColumn) {
|
|
52234
|
-
throw new
|
|
52299
|
+
throw new RuntimeModelError53(
|
|
52235
52300
|
this.model,
|
|
52236
52301
|
ibiz.i18n.t("runtime.controller.control.grid.attributeColumns")
|
|
52237
52302
|
);
|
|
@@ -52242,7 +52307,7 @@ var GridController = class extends MDControlController {
|
|
|
52242
52307
|
);
|
|
52243
52308
|
if (index !== -1 && index !== 0) {
|
|
52244
52309
|
if (this.isMultistageHeader) {
|
|
52245
|
-
throw new
|
|
52310
|
+
throw new RuntimeModelError53(
|
|
52246
52311
|
this.model,
|
|
52247
52312
|
ibiz.i18n.t("runtime.controller.control.grid.configureFirstColumn", {
|
|
52248
52313
|
groupFieldName
|
|
@@ -52254,13 +52319,13 @@ var GridController = class extends MDControlController {
|
|
|
52254
52319
|
}
|
|
52255
52320
|
if (groupMode === "CODELIST") {
|
|
52256
52321
|
if (!groupCodeListId) {
|
|
52257
|
-
throw new
|
|
52322
|
+
throw new RuntimeModelError53(
|
|
52258
52323
|
this.model,
|
|
52259
52324
|
ibiz.i18n.t("runtime.controller.control.grid.requiresCodeTable")
|
|
52260
52325
|
);
|
|
52261
52326
|
}
|
|
52262
52327
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
52263
|
-
throw new
|
|
52328
|
+
throw new RuntimeModelError53(
|
|
52264
52329
|
this.model,
|
|
52265
52330
|
ibiz.i18n.t("runtime.controller.control.grid.noMatchCodeTable", {
|
|
52266
52331
|
groupFieldName
|
|
@@ -52419,7 +52484,7 @@ var GridController = class extends MDControlController {
|
|
|
52419
52484
|
return;
|
|
52420
52485
|
}
|
|
52421
52486
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
52422
|
-
throw new
|
|
52487
|
+
throw new RuntimeModelError53(
|
|
52423
52488
|
this.model,
|
|
52424
52489
|
ibiz.i18n.t("runtime.controller.control.grid.missingConfiguration")
|
|
52425
52490
|
);
|
|
@@ -53191,7 +53256,7 @@ var GridController = class extends MDControlController {
|
|
|
53191
53256
|
* @memberof GridController
|
|
53192
53257
|
*/
|
|
53193
53258
|
async exportData(args) {
|
|
53194
|
-
var _a3;
|
|
53259
|
+
var _a3, _b2;
|
|
53195
53260
|
if ((_a3 = this.dataExport) == null ? void 0 : _a3.enableBackend) {
|
|
53196
53261
|
await this.excuteBackendExport(args.params);
|
|
53197
53262
|
return;
|
|
@@ -53206,10 +53271,19 @@ var GridController = class extends MDControlController {
|
|
|
53206
53271
|
const data = await this.getExportData(args.params);
|
|
53207
53272
|
const formatData = this.formatExcelData(data, fields);
|
|
53208
53273
|
const table = formatData.map((v) => Object.values(v));
|
|
53274
|
+
let fileName = this.model.logicName;
|
|
53275
|
+
if ((_b2 = this.dataExport) == null ? void 0 : _b2.fileNameFormat) {
|
|
53276
|
+
fileName = await ibiz.util.hbs.render(this.dataExport.fileNameFormat, {
|
|
53277
|
+
context: this.context,
|
|
53278
|
+
params: this.params,
|
|
53279
|
+
data: this.view.state.srfactiveviewdata,
|
|
53280
|
+
now: /* @__PURE__ */ new Date()
|
|
53281
|
+
});
|
|
53282
|
+
}
|
|
53209
53283
|
await ibiz.platform.frontExport({
|
|
53210
53284
|
header,
|
|
53211
53285
|
data: table,
|
|
53212
|
-
fileName
|
|
53286
|
+
fileName
|
|
53213
53287
|
});
|
|
53214
53288
|
}
|
|
53215
53289
|
/**
|
|
@@ -53464,7 +53538,7 @@ var GridController = class extends MDControlController {
|
|
|
53464
53538
|
var _a3;
|
|
53465
53539
|
const moveAction = (_a3 = this.model.moveControlAction) == null ? void 0 : _a3.appDEMethodId;
|
|
53466
53540
|
if (!moveAction) {
|
|
53467
|
-
throw new
|
|
53541
|
+
throw new RuntimeModelError53(
|
|
53468
53542
|
this.model,
|
|
53469
53543
|
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
53470
53544
|
);
|
|
@@ -53576,7 +53650,7 @@ import {
|
|
|
53576
53650
|
ModelError as ModelError22,
|
|
53577
53651
|
base64ToStr
|
|
53578
53652
|
} from "@ibiz-template/core";
|
|
53579
|
-
import
|
|
53653
|
+
import dayjs7 from "dayjs";
|
|
53580
53654
|
import { debounce as debounce2 } from "lodash-es";
|
|
53581
53655
|
import { clone as clone33, isNil as isNil22 } from "ramda";
|
|
53582
53656
|
import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
|
|
@@ -53984,7 +54058,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
53984
54058
|
}
|
|
53985
54059
|
const isDate = DataTypes4.isDate(this.dataType);
|
|
53986
54060
|
if (isDate) {
|
|
53987
|
-
const formatVal =
|
|
54061
|
+
const formatVal = dayjs7(strVal).format(this.valueFormat);
|
|
53988
54062
|
if (formatVal !== "Invalid Date") {
|
|
53989
54063
|
return formatVal;
|
|
53990
54064
|
}
|
|
@@ -54021,7 +54095,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
54021
54095
|
};
|
|
54022
54096
|
|
|
54023
54097
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
54024
|
-
import { RuntimeModelError as
|
|
54098
|
+
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
54025
54099
|
var GridUAColumnController = class extends GridColumnController {
|
|
54026
54100
|
/**
|
|
54027
54101
|
* 给rowController初始化操作列的状态
|
|
@@ -54034,7 +54108,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
54034
54108
|
var _a3;
|
|
54035
54109
|
const { deuiactionGroup } = this.model;
|
|
54036
54110
|
if (!deuiactionGroup) {
|
|
54037
|
-
throw new
|
|
54111
|
+
throw new RuntimeModelError54(
|
|
54038
54112
|
this.model,
|
|
54039
54113
|
ibiz.i18n.t("runtime.controller.control.grid.behaviorGroup")
|
|
54040
54114
|
);
|
|
@@ -54372,9 +54446,9 @@ import {
|
|
|
54372
54446
|
clone as clone35,
|
|
54373
54447
|
DataTypes as DataTypes5,
|
|
54374
54448
|
isElementSame as isElementSame4,
|
|
54375
|
-
RuntimeModelError as
|
|
54449
|
+
RuntimeModelError as RuntimeModelError55
|
|
54376
54450
|
} from "@ibiz-template/core";
|
|
54377
|
-
import
|
|
54451
|
+
import dayjs8 from "dayjs";
|
|
54378
54452
|
|
|
54379
54453
|
// src/controller/control/list/list.service.ts
|
|
54380
54454
|
import { clone as clone34 } from "@ibiz-template/core";
|
|
@@ -54799,9 +54873,9 @@ var ListController = class extends MDControlController {
|
|
|
54799
54873
|
let groupVal = item[textDEFieldId];
|
|
54800
54874
|
if (dateFormat)
|
|
54801
54875
|
groupVal = formatDateByScale(groupVal, dateFormat);
|
|
54802
|
-
if (this.model.groupStyle === "STYLE2" &&
|
|
54876
|
+
if (this.model.groupStyle === "STYLE2" && dayjs8(groupVal).isValid()) {
|
|
54803
54877
|
groupVal = formatDateByScale(groupVal, "day");
|
|
54804
|
-
if (
|
|
54878
|
+
if (dayjs8(groupVal).isSame(dayjs8(), "day"))
|
|
54805
54879
|
groupVal = ibiz.i18n.t("runtime.controller.common.md.today");
|
|
54806
54880
|
}
|
|
54807
54881
|
if (isNil23(groupVal)) {
|
|
@@ -55087,13 +55161,13 @@ var ListController = class extends MDControlController {
|
|
|
55087
55161
|
await this.updateChangedItems([draggedItem]);
|
|
55088
55162
|
} else {
|
|
55089
55163
|
if (!minorSortAppDEFieldId)
|
|
55090
|
-
throw new
|
|
55164
|
+
throw new RuntimeModelError55(
|
|
55091
55165
|
this.model,
|
|
55092
55166
|
ibiz.i18n.t("runtime.controller.common.md.sortingProperties")
|
|
55093
55167
|
);
|
|
55094
55168
|
const moveAction = moveControlAction == null ? void 0 : moveControlAction.appDEMethodId;
|
|
55095
55169
|
if (!moveAction)
|
|
55096
|
-
throw new
|
|
55170
|
+
throw new RuntimeModelError55(
|
|
55097
55171
|
this.model,
|
|
55098
55172
|
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
55099
55173
|
);
|
|
@@ -57814,7 +57888,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
57814
57888
|
import {
|
|
57815
57889
|
RuntimeError as RuntimeError43,
|
|
57816
57890
|
recursiveIterate as recursiveIterate15,
|
|
57817
|
-
RuntimeModelError as
|
|
57891
|
+
RuntimeModelError as RuntimeModelError56
|
|
57818
57892
|
} from "@ibiz-template/core";
|
|
57819
57893
|
import { isNil as isNil27 } from "ramda";
|
|
57820
57894
|
import { isBoolean as isBoolean4 } from "qx-util";
|
|
@@ -58703,8 +58777,8 @@ var TreeController = class extends MDControlController {
|
|
|
58703
58777
|
return this.getEventArgs();
|
|
58704
58778
|
};
|
|
58705
58779
|
if (this.viewScheduler.hasViewEventTrigger) {
|
|
58706
|
-
this.evt.onAll((_eventName, event) => {
|
|
58707
|
-
this.viewScheduler.triggerViewEvent(event);
|
|
58780
|
+
this.evt.onAll(async (_eventName, event) => {
|
|
58781
|
+
await this.viewScheduler.triggerViewEvent(event);
|
|
58708
58782
|
});
|
|
58709
58783
|
}
|
|
58710
58784
|
}
|
|
@@ -59413,7 +59487,7 @@ var TreeController = class extends MDControlController {
|
|
|
59413
59487
|
const { moveAppDEActionId, appDataEntityId, allowOrder } = orderNodeModel;
|
|
59414
59488
|
if (allowOrder) {
|
|
59415
59489
|
if (!moveAppDEActionId) {
|
|
59416
|
-
throw new
|
|
59490
|
+
throw new RuntimeModelError56(
|
|
59417
59491
|
this.model,
|
|
59418
59492
|
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
59419
59493
|
);
|
|
@@ -59495,7 +59569,7 @@ var TreeController = class extends MDControlController {
|
|
|
59495
59569
|
async modifyNodeText(nodeData, text) {
|
|
59496
59570
|
const model = this.getNodeModel(nodeData._nodeId);
|
|
59497
59571
|
if (!model.allowEditText) {
|
|
59498
|
-
throw new
|
|
59572
|
+
throw new RuntimeModelError56(
|
|
59499
59573
|
model,
|
|
59500
59574
|
ibiz.i18n.t("runtime.controller.control.tree.editMode")
|
|
59501
59575
|
);
|
|
@@ -59608,7 +59682,7 @@ var TreeController = class extends MDControlController {
|
|
|
59608
59682
|
const nodeModel = this.getNodeModel(nodeType);
|
|
59609
59683
|
const parentNodeData = this.getNodeData(parentKey);
|
|
59610
59684
|
if (!nodeModel) {
|
|
59611
|
-
throw new
|
|
59685
|
+
throw new RuntimeModelError56(
|
|
59612
59686
|
this.model,
|
|
59613
59687
|
ibiz.i18n.t("runtime.controller.control.tree.noFoundTreeNode")
|
|
59614
59688
|
);
|
|
@@ -59741,13 +59815,12 @@ var TreeController = class extends MDControlController {
|
|
|
59741
59815
|
ctrl: this
|
|
59742
59816
|
}
|
|
59743
59817
|
));
|
|
59744
|
-
if (result === -1)
|
|
59745
|
-
|
|
59746
|
-
|
|
59747
|
-
|
|
59748
|
-
|
|
59749
|
-
|
|
59750
|
-
);
|
|
59818
|
+
if (result === -1) {
|
|
59819
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicOpendata"));
|
|
59820
|
+
return {
|
|
59821
|
+
cancel: true
|
|
59822
|
+
};
|
|
59823
|
+
}
|
|
59751
59824
|
return {
|
|
59752
59825
|
cancel: result ? !result.ok : true
|
|
59753
59826
|
};
|
|
@@ -59780,13 +59853,12 @@ var TreeController = class extends MDControlController {
|
|
|
59780
59853
|
ctrl: this
|
|
59781
59854
|
}
|
|
59782
59855
|
));
|
|
59783
|
-
if (result === -1)
|
|
59784
|
-
|
|
59785
|
-
|
|
59786
|
-
|
|
59787
|
-
|
|
59788
|
-
|
|
59789
|
-
);
|
|
59856
|
+
if (result === -1) {
|
|
59857
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicNewdata"));
|
|
59858
|
+
return {
|
|
59859
|
+
cancel: true
|
|
59860
|
+
};
|
|
59861
|
+
}
|
|
59790
59862
|
return {
|
|
59791
59863
|
cancel: result ? !result.ok : true
|
|
59792
59864
|
};
|
|
@@ -60377,7 +60449,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
60377
60449
|
};
|
|
60378
60450
|
|
|
60379
60451
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
60380
|
-
import { RuntimeError as RuntimeError45, RuntimeModelError as
|
|
60452
|
+
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
|
|
60381
60453
|
import { clone as clone38, isNil as isNil28, isNotNil as isNotNil8 } from "ramda";
|
|
60382
60454
|
import { createUUID as createUUID15 } from "qx-util";
|
|
60383
60455
|
|
|
@@ -60696,7 +60768,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
60696
60768
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
60697
60769
|
if (enableGroup && groupMode) {
|
|
60698
60770
|
if (!groupAppDEFieldId) {
|
|
60699
|
-
throw new
|
|
60771
|
+
throw new RuntimeModelError57(
|
|
60700
60772
|
this.model,
|
|
60701
60773
|
ibiz.i18n.t(
|
|
60702
60774
|
"runtime.controller.control.dataView.propertiesNoConfigured"
|
|
@@ -60788,7 +60860,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
60788
60860
|
async handleCodeListGroup() {
|
|
60789
60861
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
60790
60862
|
if (!groupCodeListId) {
|
|
60791
|
-
throw new
|
|
60863
|
+
throw new RuntimeModelError57(
|
|
60792
60864
|
this.model,
|
|
60793
60865
|
ibiz.i18n.t("runtime.controller.control.dataView.tableNoConfigured")
|
|
60794
60866
|
);
|
|
@@ -61126,7 +61198,7 @@ import {
|
|
|
61126
61198
|
clone as clone39,
|
|
61127
61199
|
RuntimeError as RuntimeError46,
|
|
61128
61200
|
isElementSame as isElementSame5,
|
|
61129
|
-
RuntimeModelError as
|
|
61201
|
+
RuntimeModelError as RuntimeModelError58
|
|
61130
61202
|
} from "@ibiz-template/core";
|
|
61131
61203
|
|
|
61132
61204
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -61416,7 +61488,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
61416
61488
|
async handleCodeListGroup() {
|
|
61417
61489
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
61418
61490
|
if (!groupCodeListId) {
|
|
61419
|
-
throw new
|
|
61491
|
+
throw new RuntimeModelError58(
|
|
61420
61492
|
this.model,
|
|
61421
61493
|
ibiz.i18n.t("runtime.controller.control.dataView.tableNoConfigured")
|
|
61422
61494
|
);
|
|
@@ -61480,13 +61552,13 @@ var KanbanController = class extends DataViewControlController {
|
|
|
61480
61552
|
await this.updateChangedItems([draggedItem]);
|
|
61481
61553
|
} else {
|
|
61482
61554
|
if (!minorSortAppDEFieldId)
|
|
61483
|
-
throw new
|
|
61555
|
+
throw new RuntimeModelError58(
|
|
61484
61556
|
this.model,
|
|
61485
61557
|
ibiz.i18n.t("runtime.controller.common.md.sortingProperties")
|
|
61486
61558
|
);
|
|
61487
61559
|
const moveAction = moveControlAction == null ? void 0 : moveControlAction.appDEMethodId;
|
|
61488
61560
|
if (!moveAction)
|
|
61489
|
-
throw new
|
|
61561
|
+
throw new RuntimeModelError58(
|
|
61490
61562
|
this.model,
|
|
61491
61563
|
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
61492
61564
|
);
|
|
@@ -61687,7 +61759,7 @@ import {
|
|
|
61687
61759
|
RuntimeError as RuntimeError47,
|
|
61688
61760
|
awaitTimeout as awaitTimeout3,
|
|
61689
61761
|
recursiveIterate as recursiveIterate16,
|
|
61690
|
-
RuntimeModelError as
|
|
61762
|
+
RuntimeModelError as RuntimeModelError59
|
|
61691
61763
|
} from "@ibiz-template/core";
|
|
61692
61764
|
import { clone as clone40 } from "ramda";
|
|
61693
61765
|
|
|
@@ -62116,7 +62188,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
62116
62188
|
);
|
|
62117
62189
|
}
|
|
62118
62190
|
if (!updateAppDEActionId) {
|
|
62119
|
-
throw new
|
|
62191
|
+
throw new RuntimeModelError59(
|
|
62120
62192
|
nodeModel,
|
|
62121
62193
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.updateBehavior")
|
|
62122
62194
|
);
|
|
@@ -62444,10 +62516,10 @@ var TreeGridExColumnController = class {
|
|
|
62444
62516
|
import {
|
|
62445
62517
|
DataTypes as DataTypes7,
|
|
62446
62518
|
RuntimeError as RuntimeError48,
|
|
62447
|
-
RuntimeModelError as
|
|
62519
|
+
RuntimeModelError as RuntimeModelError60
|
|
62448
62520
|
} from "@ibiz-template/core";
|
|
62449
62521
|
import { clone as clone41 } from "ramda";
|
|
62450
|
-
import
|
|
62522
|
+
import dayjs9 from "dayjs";
|
|
62451
62523
|
var TreeGridExNodeColumnController = class {
|
|
62452
62524
|
/**
|
|
62453
62525
|
* @author lxm
|
|
@@ -62475,7 +62547,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
62475
62547
|
}
|
|
62476
62548
|
);
|
|
62477
62549
|
if (!nodeColumn || !nodeDataItem) {
|
|
62478
|
-
throw new
|
|
62550
|
+
throw new RuntimeModelError60(
|
|
62479
62551
|
nodeModel,
|
|
62480
62552
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.noConfigured", {
|
|
62481
62553
|
name: this.fieldColumn.name
|
|
@@ -62491,7 +62563,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
62491
62563
|
}
|
|
62492
62564
|
);
|
|
62493
62565
|
if (!nodeEditItem) {
|
|
62494
|
-
throw new
|
|
62566
|
+
throw new RuntimeModelError60(
|
|
62495
62567
|
nodeModel,
|
|
62496
62568
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.editItem", {
|
|
62497
62569
|
name: this.fieldColumn.name
|
|
@@ -62747,7 +62819,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
62747
62819
|
}
|
|
62748
62820
|
const isDate = DataTypes7.isDate(this.dataType);
|
|
62749
62821
|
if (isDate || this.fieldColumn.name === "createdate") {
|
|
62750
|
-
const formatVal =
|
|
62822
|
+
const formatVal = dayjs9(strVal).format(this.valueFormat);
|
|
62751
62823
|
if (formatVal !== "Invalid Date") {
|
|
62752
62824
|
return formatVal;
|
|
62753
62825
|
}
|
|
@@ -63000,7 +63072,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
63000
63072
|
};
|
|
63001
63073
|
|
|
63002
63074
|
// src/controller/control/tree-grid/tree-grid.controller.ts
|
|
63003
|
-
import { RuntimeModelError as
|
|
63075
|
+
import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
|
|
63004
63076
|
import { createUUID as createUUID16 } from "qx-util";
|
|
63005
63077
|
var TreeGridController = class extends GridController {
|
|
63006
63078
|
constructor() {
|
|
@@ -63045,7 +63117,7 @@ var TreeGridController = class extends GridController {
|
|
|
63045
63117
|
return item.treeColumnMode === 4 || item.treeColumnMode === 12;
|
|
63046
63118
|
});
|
|
63047
63119
|
if (!treeGridParent)
|
|
63048
|
-
throw new
|
|
63120
|
+
throw new RuntimeModelError61(
|
|
63049
63121
|
this.model,
|
|
63050
63122
|
ibiz.i18n.t("runtime.controller.control.treeGrid.columnMode")
|
|
63051
63123
|
);
|
|
@@ -63053,7 +63125,7 @@ var TreeGridController = class extends GridController {
|
|
|
63053
63125
|
return item.treeColumnMode === 2 || item.treeColumnMode === 3;
|
|
63054
63126
|
});
|
|
63055
63127
|
if (!treeGridValue)
|
|
63056
|
-
throw new
|
|
63128
|
+
throw new RuntimeModelError61(
|
|
63057
63129
|
this.model,
|
|
63058
63130
|
ibiz.i18n.t("runtime.controller.control.treeGrid.columnsSchema")
|
|
63059
63131
|
);
|
|
@@ -64623,18 +64695,18 @@ var GridConverterBase = class extends ConverterBase {
|
|
|
64623
64695
|
grid_function_setting
|
|
64624
64696
|
} = this.reportUIModel;
|
|
64625
64697
|
result.vars = {
|
|
64626
|
-
"--ibiz-control-grid-header-align": grid_header_position,
|
|
64627
|
-
"--ibiz-control-grid-header-font-size": "".concat(grid_header_fontsize, "px"),
|
|
64628
|
-
"--ibiz-control-grid-header-text-color": grid_header_fontcolor,
|
|
64629
|
-
"--ibiz-control-grid-
|
|
64630
|
-
"--ibiz-control-grid-
|
|
64698
|
+
"--ibiz-control-grid-header-cell-align": grid_header_position,
|
|
64699
|
+
"--ibiz-control-grid-header-cell-font-size": "".concat(grid_header_fontsize, "px"),
|
|
64700
|
+
"--ibiz-control-grid-header-cell-text-color": grid_header_fontcolor,
|
|
64701
|
+
"--ibiz-control-grid-body-cell-font-size": "".concat(grid_body_fontsize, "px"),
|
|
64702
|
+
"--ibiz-control-grid-body-cell-text-color": grid_body_fontcolor
|
|
64631
64703
|
};
|
|
64632
64704
|
if (grid_header_fontstyle) {
|
|
64633
|
-
const key = grid_header_fontstyle === "bold" ? "--ibiz-control-grid-header-font-weight" : "--ibiz-control-grid-header-font-style";
|
|
64705
|
+
const key = grid_header_fontstyle === "bold" ? "--ibiz-control-grid-header-cell-font-weight" : "--ibiz-control-grid-header-cell-font-style";
|
|
64634
64706
|
result.vars[key] = grid_header_fontstyle;
|
|
64635
64707
|
}
|
|
64636
64708
|
if (grid_body_fontstyle) {
|
|
64637
|
-
const key = grid_body_fontstyle === "bold" ? "--ibiz-control-grid-
|
|
64709
|
+
const key = grid_body_fontstyle === "bold" ? "--ibiz-control-grid-body-cell-font-weight" : "--ibiz-control-grid-body-cell-font-style";
|
|
64638
64710
|
result.vars[key] = grid_body_fontstyle;
|
|
64639
64711
|
}
|
|
64640
64712
|
if (grid_show_agg == "1") {
|
|
@@ -68661,7 +68733,7 @@ var AppCounter8 = class {
|
|
|
68661
68733
|
};
|
|
68662
68734
|
|
|
68663
68735
|
// src/service/utils/app-counter/app-de-counter.ts
|
|
68664
|
-
import { RuntimeModelError as
|
|
68736
|
+
import { RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
|
|
68665
68737
|
var AppDECounter = class extends AppCounter8 {
|
|
68666
68738
|
/**
|
|
68667
68739
|
* 计数器初始化
|
|
@@ -68675,7 +68747,7 @@ var AppDECounter = class extends AppCounter8 {
|
|
|
68675
68747
|
this.appDataEntityId = this.model.appDataEntityId;
|
|
68676
68748
|
const action = this.model.getAppDEActionId;
|
|
68677
68749
|
if (!action) {
|
|
68678
|
-
throw new
|
|
68750
|
+
throw new RuntimeModelError62(
|
|
68679
68751
|
this.model,
|
|
68680
68752
|
ibiz.i18n.t("runtime.service.noFoundCounterBehavior")
|
|
68681
68753
|
);
|
|
@@ -68822,7 +68894,7 @@ DEDQCondUtil.map = /* @__PURE__ */ new WeakMap();
|
|
|
68822
68894
|
import {
|
|
68823
68895
|
IBizContext as IBizContext8,
|
|
68824
68896
|
ModelError as ModelError26,
|
|
68825
|
-
RuntimeModelError as
|
|
68897
|
+
RuntimeModelError as RuntimeModelError63,
|
|
68826
68898
|
StringUtil as StringUtil5
|
|
68827
68899
|
} from "@ibiz-template/core";
|
|
68828
68900
|
import { clone as clone48, isNil as isNil29 } from "ramda";
|
|
@@ -69223,13 +69295,13 @@ var DynamicCodeListCache = class {
|
|
|
69223
69295
|
return Object.freeze(presetresultItems);
|
|
69224
69296
|
}
|
|
69225
69297
|
if (!appDataEntityId) {
|
|
69226
|
-
throw new
|
|
69298
|
+
throw new RuntimeModelError63(
|
|
69227
69299
|
this.codeList,
|
|
69228
69300
|
ibiz.i18n.t("runtime.controller.utils.viewMsg.unconfiguredEntities")
|
|
69229
69301
|
);
|
|
69230
69302
|
}
|
|
69231
69303
|
if (!appDEDataSetId) {
|
|
69232
|
-
throw new
|
|
69304
|
+
throw new RuntimeModelError63(
|
|
69233
69305
|
this.codeList,
|
|
69234
69306
|
ibiz.i18n.t("runtime.service.unconfiguredDataset")
|
|
69235
69307
|
);
|
|
@@ -70551,7 +70623,7 @@ var ConfigService = class {
|
|
|
70551
70623
|
};
|
|
70552
70624
|
|
|
70553
70625
|
// src/service/service/counter/counter.service.ts
|
|
70554
|
-
import { RuntimeModelError as
|
|
70626
|
+
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
70555
70627
|
var CounterService = class {
|
|
70556
70628
|
/**
|
|
70557
70629
|
* 获取计数器
|
|
@@ -70596,7 +70668,7 @@ var CounterService = class {
|
|
|
70596
70668
|
static async getCounterByRef(model, context, params) {
|
|
70597
70669
|
const { appCounter } = model;
|
|
70598
70670
|
if (!appCounter) {
|
|
70599
|
-
throw new
|
|
70671
|
+
throw new RuntimeModelError64(
|
|
70600
70672
|
model,
|
|
70601
70673
|
ibiz.i18n.t("runtime.service.noConfiguredCounters")
|
|
70602
70674
|
);
|
|
@@ -70621,7 +70693,7 @@ import {
|
|
|
70621
70693
|
IBizContext as IBizContext9,
|
|
70622
70694
|
ModelError as ModelError28,
|
|
70623
70695
|
RuntimeError as RuntimeError60,
|
|
70624
|
-
RuntimeModelError as
|
|
70696
|
+
RuntimeModelError as RuntimeModelError66
|
|
70625
70697
|
} from "@ibiz-template/core";
|
|
70626
70698
|
import { createUUID as createUUID20 } from "qx-util";
|
|
70627
70699
|
import { isNil as isNil34, isUndefined } from "lodash-es";
|
|
@@ -71243,7 +71315,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
71243
71315
|
};
|
|
71244
71316
|
|
|
71245
71317
|
// src/service/dto/method.dto.ts
|
|
71246
|
-
import { ModelError as ModelError27, RuntimeModelError as
|
|
71318
|
+
import { ModelError as ModelError27, RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
|
|
71247
71319
|
import { clone as clone51 } from "ramda";
|
|
71248
71320
|
var MethodDto = class {
|
|
71249
71321
|
/**
|
|
@@ -71349,7 +71421,7 @@ var MethodDto = class {
|
|
|
71349
71421
|
context
|
|
71350
71422
|
);
|
|
71351
71423
|
} else {
|
|
71352
|
-
throw new
|
|
71424
|
+
throw new RuntimeModelError65(
|
|
71353
71425
|
field,
|
|
71354
71426
|
ibiz.i18n.t("runtime.service.subRelationships")
|
|
71355
71427
|
);
|
|
@@ -71614,7 +71686,7 @@ var DEService = class {
|
|
|
71614
71686
|
}
|
|
71615
71687
|
const model = findAppDEMethod(this.model, id);
|
|
71616
71688
|
if (!model) {
|
|
71617
|
-
throw new
|
|
71689
|
+
throw new RuntimeModelError66(
|
|
71618
71690
|
this.model,
|
|
71619
71691
|
ibiz.i18n.t("runtime.service.noFoundServiceMethod", { id })
|
|
71620
71692
|
);
|
|
@@ -72613,14 +72685,14 @@ import {
|
|
|
72613
72685
|
HttpError as HttpError8,
|
|
72614
72686
|
HttpResponse as HttpResponse5,
|
|
72615
72687
|
RuntimeError as RuntimeError62,
|
|
72616
|
-
RuntimeModelError as
|
|
72688
|
+
RuntimeModelError as RuntimeModelError68
|
|
72617
72689
|
} from "@ibiz-template/core";
|
|
72618
72690
|
import { isArray as isArray10, isNil as isNil36, isUndefined as isUndefined2 } from "lodash-es";
|
|
72619
72691
|
import { ascSort } from "qx-util";
|
|
72620
72692
|
import { clone as clone52 } from "ramda";
|
|
72621
72693
|
|
|
72622
72694
|
// src/service/service/entity/method/method.ts
|
|
72623
|
-
import { HttpResponse as HttpResponse4, RuntimeModelError as
|
|
72695
|
+
import { HttpResponse as HttpResponse4, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
|
|
72624
72696
|
|
|
72625
72697
|
// src/service/service/entity/method/method-input.ts
|
|
72626
72698
|
var MethodInput = class {
|
|
@@ -72839,12 +72911,12 @@ var Method = class {
|
|
|
72839
72911
|
break;
|
|
72840
72912
|
default:
|
|
72841
72913
|
if (requestMethod) {
|
|
72842
|
-
throw new
|
|
72914
|
+
throw new RuntimeModelError67(
|
|
72843
72915
|
this.method,
|
|
72844
72916
|
ibiz.i18n.t("runtime.service.requestMethods", { requestMethod })
|
|
72845
72917
|
);
|
|
72846
72918
|
} else {
|
|
72847
|
-
throw new
|
|
72919
|
+
throw new RuntimeModelError67(
|
|
72848
72920
|
this.method,
|
|
72849
72921
|
ibiz.i18n.t("runtime.service.noConfiguredRequestMethod")
|
|
72850
72922
|
);
|
|
@@ -72855,7 +72927,7 @@ var Method = class {
|
|
|
72855
72927
|
if (actionType === "SCRIPT") {
|
|
72856
72928
|
return new HttpResponse4(data);
|
|
72857
72929
|
}
|
|
72858
|
-
throw new
|
|
72930
|
+
throw new RuntimeModelError67(
|
|
72859
72931
|
this.method,
|
|
72860
72932
|
ibiz.i18n.t("runtime.service.unsupportedBehaviorTypes", { actionType })
|
|
72861
72933
|
);
|
|
@@ -72971,7 +73043,7 @@ var DEActionMethod = class extends Method {
|
|
|
72971
73043
|
if (this.method.actionType === "DELOGIC") {
|
|
72972
73044
|
const deLogic = findDELogic(this.method.appDELogicId, this.entity);
|
|
72973
73045
|
if (!deLogic) {
|
|
72974
|
-
throw new
|
|
73046
|
+
throw new RuntimeModelError68(
|
|
72975
73047
|
this.method,
|
|
72976
73048
|
ibiz.i18n.t("runtime.service.lackEntityLogic")
|
|
72977
73049
|
);
|
|
@@ -73361,7 +73433,7 @@ var DEActionMethod = class extends Method {
|
|
|
73361
73433
|
configs = ascSort(configs, "removeOrder");
|
|
73362
73434
|
for (const config of configs) {
|
|
73363
73435
|
if (config.rstype !== "DER1N") {
|
|
73364
|
-
throw new
|
|
73436
|
+
throw new RuntimeModelError68(
|
|
73365
73437
|
config,
|
|
73366
73438
|
ibiz.i18n.t("runtime.service.deletionDeletion")
|
|
73367
73439
|
);
|
|
@@ -73640,7 +73712,7 @@ import {
|
|
|
73640
73712
|
HttpResponse as HttpResponse6,
|
|
73641
73713
|
ModelError as ModelError29,
|
|
73642
73714
|
RuntimeError as RuntimeError63,
|
|
73643
|
-
RuntimeModelError as
|
|
73715
|
+
RuntimeModelError as RuntimeModelError69
|
|
73644
73716
|
} from "@ibiz-template/core";
|
|
73645
73717
|
import { isArray as isArray11 } from "lodash-es";
|
|
73646
73718
|
import { clone as clone53, isEmpty as isEmpty9, isNil as isNil37 } from "ramda";
|
|
@@ -73684,7 +73756,7 @@ var FetchMethod = class extends Method {
|
|
|
73684
73756
|
break;
|
|
73685
73757
|
case "SCRIPT":
|
|
73686
73758
|
if (!this.method.scriptCode) {
|
|
73687
|
-
throw new
|
|
73759
|
+
throw new RuntimeModelError69(
|
|
73688
73760
|
this.method,
|
|
73689
73761
|
ibiz.i18n.t("runtime.service.scriptCodeNotConfig")
|
|
73690
73762
|
);
|
|
@@ -73869,7 +73941,7 @@ var FetchMethod = class extends Method {
|
|
|
73869
73941
|
async fetchCodeListSet(context, params) {
|
|
73870
73942
|
const { appCodeListId } = this.method;
|
|
73871
73943
|
if (!appCodeListId) {
|
|
73872
|
-
throw new
|
|
73944
|
+
throw new RuntimeModelError69(
|
|
73873
73945
|
this.method,
|
|
73874
73946
|
ibiz.i18n.t("runtime.service.sourceCodeTable")
|
|
73875
73947
|
);
|
|
@@ -73896,7 +73968,7 @@ var FetchMethod = class extends Method {
|
|
|
73896
73968
|
async fetchCodeListSetWithMeta(context, params) {
|
|
73897
73969
|
const { appCodeListId } = this.method;
|
|
73898
73970
|
if (!appCodeListId) {
|
|
73899
|
-
throw new
|
|
73971
|
+
throw new RuntimeModelError69(
|
|
73900
73972
|
this.method,
|
|
73901
73973
|
ibiz.i18n.t("runtime.service.sourceCodeTable")
|
|
73902
73974
|
);
|
|
@@ -84473,29 +84545,29 @@ function paramsToSearchconds(_params) {
|
|
|
84473
84545
|
}
|
|
84474
84546
|
|
|
84475
84547
|
// src/utils/date-util/index.ts
|
|
84476
|
-
import
|
|
84548
|
+
import dayjs10 from "dayjs";
|
|
84477
84549
|
function formatDateByScale(val, timeScale) {
|
|
84478
84550
|
let value = val;
|
|
84479
84551
|
const date = new Date(val);
|
|
84480
84552
|
if (!val || isNaN(date.getTime()))
|
|
84481
84553
|
return value;
|
|
84482
|
-
const year =
|
|
84554
|
+
const year = dayjs10(date).year();
|
|
84483
84555
|
const type = timeScale === "yearweek" ? "week" : timeScale;
|
|
84484
84556
|
switch (type) {
|
|
84485
84557
|
case "year":
|
|
84486
84558
|
value = "".concat(year);
|
|
84487
84559
|
break;
|
|
84488
84560
|
case "quarter":
|
|
84489
|
-
value = "".concat(year, " ").concat(
|
|
84561
|
+
value = "".concat(year, " ").concat(dayjs10(date).quarter()).concat(ibiz.i18n.t("runtime.controller.utils.util.quarter"));
|
|
84490
84562
|
break;
|
|
84491
84563
|
case "month":
|
|
84492
|
-
value = "".concat(year, " ").concat(
|
|
84564
|
+
value = "".concat(year, " ").concat(dayjs10(date).month() + 1).concat(ibiz.i18n.t("runtime.controller.utils.util.month"));
|
|
84493
84565
|
break;
|
|
84494
84566
|
case "week":
|
|
84495
|
-
value = "".concat(year, " ").concat(
|
|
84567
|
+
value = "".concat(year, " ").concat(dayjs10(date).week()).concat(ibiz.i18n.t("runtime.controller.utils.util.week"));
|
|
84496
84568
|
break;
|
|
84497
84569
|
case "day":
|
|
84498
|
-
value =
|
|
84570
|
+
value = dayjs10(date).format("YYYY-MM-DD");
|
|
84499
84571
|
break;
|
|
84500
84572
|
default:
|
|
84501
84573
|
break;
|
|
@@ -84503,7 +84575,7 @@ function formatDateByScale(val, timeScale) {
|
|
|
84503
84575
|
return value;
|
|
84504
84576
|
}
|
|
84505
84577
|
function getWeeksInYear(year) {
|
|
84506
|
-
const lastDayOfYear =
|
|
84578
|
+
const lastDayOfYear = dayjs10("".concat(year, "-12-31"));
|
|
84507
84579
|
const week = lastDayOfYear.isoWeek();
|
|
84508
84580
|
return week === 1 ? 52 : week;
|
|
84509
84581
|
}
|
|
@@ -84540,7 +84612,7 @@ function generateYearWeekRange(minYearWeek, maxYearWeek, paddingWeeks = 0) {
|
|
|
84540
84612
|
function calcDateRangeByScale(val, timeScale) {
|
|
84541
84613
|
if (!val || isNaN(new Date(val).getTime()))
|
|
84542
84614
|
return;
|
|
84543
|
-
let date =
|
|
84615
|
+
let date = dayjs10(val);
|
|
84544
84616
|
const type = timeScale === "yearweek" ? "week" : timeScale;
|
|
84545
84617
|
switch (type) {
|
|
84546
84618
|
case "year":
|
|
@@ -84568,8 +84640,8 @@ function calcDateRangeByScale(val, timeScale) {
|
|
|
84568
84640
|
}
|
|
84569
84641
|
function compareDateEqualByScale(dateStr1, dateStr2, timeScale) {
|
|
84570
84642
|
let result = false;
|
|
84571
|
-
const date1 =
|
|
84572
|
-
const date2 =
|
|
84643
|
+
const date1 = dayjs10(dateStr1);
|
|
84644
|
+
const date2 = dayjs10(dateStr2);
|
|
84573
84645
|
if (!dateStr1 || !dateStr2 || !date1.isValid() || !date2.isValid())
|
|
84574
84646
|
return result;
|
|
84575
84647
|
switch (timeScale) {
|
|
@@ -86535,7 +86607,7 @@ import { QXEvent as QXEvent14 } from "qx-util";
|
|
|
86535
86607
|
import { QXEvent as QXEvent12 } from "qx-util";
|
|
86536
86608
|
import { clone as clone60 } from "ramda";
|
|
86537
86609
|
import { isNil as isNil40, isNumber as isNumber5 } from "lodash-es";
|
|
86538
|
-
import
|
|
86610
|
+
import dayjs11 from "dayjs";
|
|
86539
86611
|
var AsyncActionController = class {
|
|
86540
86612
|
constructor() {
|
|
86541
86613
|
this.evt = new QXEvent12();
|
|
@@ -86609,7 +86681,7 @@ var AsyncActionController = class {
|
|
|
86609
86681
|
];
|
|
86610
86682
|
dateFields.forEach((key) => {
|
|
86611
86683
|
if (isNumber5(data[key])) {
|
|
86612
|
-
data[key] =
|
|
86684
|
+
data[key] = dayjs11(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
86613
86685
|
}
|
|
86614
86686
|
});
|
|
86615
86687
|
if (!isNil40(data.actionresult)) {
|
|
@@ -88503,7 +88575,7 @@ var ViewEngineBase = class {
|
|
|
88503
88575
|
};
|
|
88504
88576
|
|
|
88505
88577
|
// src/engine/md-view.engine.ts
|
|
88506
|
-
import { RuntimeModelError as
|
|
88578
|
+
import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
|
|
88507
88579
|
import { clone as clone61 } from "ramda";
|
|
88508
88580
|
var MDViewEngine = class extends ViewEngineBase {
|
|
88509
88581
|
/**
|
|
@@ -88755,21 +88827,20 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
88755
88827
|
view: this.view
|
|
88756
88828
|
}));
|
|
88757
88829
|
if (result === -1) {
|
|
88758
|
-
|
|
88759
|
-
this.view.model,
|
|
88760
|
-
ibiz.i18n.t("runtime.engine.logicOpendata")
|
|
88761
|
-
);
|
|
88762
|
-
} else {
|
|
88763
|
-
if (result && result.ok && result.data && result.data.length > 0) {
|
|
88764
|
-
this.view.evt.emit("onDataChange", {
|
|
88765
|
-
data: result.data,
|
|
88766
|
-
actionType: "EDIT"
|
|
88767
|
-
});
|
|
88768
|
-
}
|
|
88830
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicOpendata"));
|
|
88769
88831
|
return {
|
|
88770
|
-
cancel:
|
|
88832
|
+
cancel: true
|
|
88771
88833
|
};
|
|
88772
88834
|
}
|
|
88835
|
+
if (result && result.ok && result.data && result.data.length > 0) {
|
|
88836
|
+
this.view.evt.emit("onDataChange", {
|
|
88837
|
+
data: result.data,
|
|
88838
|
+
actionType: "EDIT"
|
|
88839
|
+
});
|
|
88840
|
+
}
|
|
88841
|
+
return {
|
|
88842
|
+
cancel: result ? !result.ok : true
|
|
88843
|
+
};
|
|
88773
88844
|
}
|
|
88774
88845
|
/**
|
|
88775
88846
|
* 打开新建数据视图
|
|
@@ -88787,7 +88858,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
88787
88858
|
(item) => item.id === "newdata"
|
|
88788
88859
|
);
|
|
88789
88860
|
if (!openAppViewLogic) {
|
|
88790
|
-
throw new
|
|
88861
|
+
throw new RuntimeModelError70(
|
|
88791
88862
|
this.view.model,
|
|
88792
88863
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
88793
88864
|
);
|
|
@@ -88807,21 +88878,20 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
88807
88878
|
view: this.view
|
|
88808
88879
|
}));
|
|
88809
88880
|
if (result === -1) {
|
|
88810
|
-
|
|
88811
|
-
this.view.model,
|
|
88812
|
-
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
88813
|
-
);
|
|
88814
|
-
} else {
|
|
88815
|
-
if (result.ok && result.data && result.data.length > 0) {
|
|
88816
|
-
this.view.evt.emit("onDataChange", {
|
|
88817
|
-
data: result.data,
|
|
88818
|
-
actionType: "NEW"
|
|
88819
|
-
});
|
|
88820
|
-
}
|
|
88881
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicNewdata"));
|
|
88821
88882
|
return {
|
|
88822
|
-
cancel:
|
|
88883
|
+
cancel: true
|
|
88823
88884
|
};
|
|
88824
88885
|
}
|
|
88886
|
+
if (result.ok && result.data && result.data.length > 0) {
|
|
88887
|
+
this.view.evt.emit("onDataChange", {
|
|
88888
|
+
data: result.data,
|
|
88889
|
+
actionType: "NEW"
|
|
88890
|
+
});
|
|
88891
|
+
}
|
|
88892
|
+
return {
|
|
88893
|
+
cancel: result ? !result.ok : true
|
|
88894
|
+
};
|
|
88825
88895
|
}
|
|
88826
88896
|
/**
|
|
88827
88897
|
* 视图删除
|
|
@@ -89844,13 +89914,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
89844
89914
|
};
|
|
89845
89915
|
|
|
89846
89916
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
89847
|
-
import { RuntimeModelError as
|
|
89917
|
+
import { RuntimeModelError as RuntimeModelError71 } from "@ibiz-template/core";
|
|
89848
89918
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
89849
89919
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
89850
89920
|
execute(executeParams) {
|
|
89851
89921
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
89852
89922
|
if (!appDEUILogicId) {
|
|
89853
|
-
throw new
|
|
89923
|
+
throw new RuntimeModelError71(
|
|
89854
89924
|
this.logic,
|
|
89855
89925
|
ibiz.i18n.t("runtime.logicScheduler.executor.noConfiguredLogic")
|
|
89856
89926
|
);
|
|
@@ -90120,16 +90190,18 @@ var ViewLogicScheduler = class extends LogicScheduler {
|
|
|
90120
90190
|
* 触发视图事件
|
|
90121
90191
|
* @author lxm
|
|
90122
90192
|
* @date 2023-06-26 02:26:33
|
|
90123
|
-
* @param {
|
|
90124
|
-
* @
|
|
90125
|
-
* @return {*} {(boolean | undefined)}
|
|
90193
|
+
* @param {EventBase} event 事件对象
|
|
90194
|
+
* @return {*} {Promise<void>}
|
|
90126
90195
|
*/
|
|
90127
|
-
triggerViewEvent(event) {
|
|
90196
|
+
async triggerViewEvent(event) {
|
|
90128
90197
|
const matchParams = {
|
|
90129
90198
|
eventName: event.eventName,
|
|
90130
90199
|
triggerType: "VIEWEVENT"
|
|
90131
90200
|
};
|
|
90132
|
-
this.triggerAndExecute(matchParams, event);
|
|
90201
|
+
const result = this.triggerAndExecute(matchParams, event);
|
|
90202
|
+
if (result == null ? void 0 : result.length) {
|
|
90203
|
+
await Promise.all(result);
|
|
90204
|
+
}
|
|
90133
90205
|
}
|
|
90134
90206
|
};
|
|
90135
90207
|
|
|
@@ -90341,7 +90413,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
90341
90413
|
};
|
|
90342
90414
|
|
|
90343
90415
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
90344
|
-
import { RuntimeError as RuntimeError81, RuntimeModelError as
|
|
90416
|
+
import { RuntimeError as RuntimeError81, RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
90345
90417
|
var TimerTrigger = class extends LogicTrigger {
|
|
90346
90418
|
constructor() {
|
|
90347
90419
|
super(...arguments);
|
|
@@ -90349,7 +90421,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
90349
90421
|
}
|
|
90350
90422
|
start() {
|
|
90351
90423
|
if (!this.logic.timer) {
|
|
90352
|
-
throw new
|
|
90424
|
+
throw new RuntimeModelError72(
|
|
90353
90425
|
this.logic,
|
|
90354
90426
|
ibiz.i18n.t("runtime.logicScheduler.trigger.timerLacks")
|
|
90355
90427
|
);
|
|
@@ -90389,7 +90461,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
90389
90461
|
import {
|
|
90390
90462
|
ModelError as ModelError34,
|
|
90391
90463
|
RuntimeError as RuntimeError82,
|
|
90392
|
-
RuntimeModelError as
|
|
90464
|
+
RuntimeModelError as RuntimeModelError73
|
|
90393
90465
|
} from "@ibiz-template/core";
|
|
90394
90466
|
import { notNilEmpty as notNilEmpty11 } from "qx-util";
|
|
90395
90467
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -90437,7 +90509,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90437
90509
|
} else {
|
|
90438
90510
|
openViewRef = appUILogic.openDataAppView;
|
|
90439
90511
|
if (!openViewRef) {
|
|
90440
|
-
throw new
|
|
90512
|
+
throw new RuntimeModelError73(
|
|
90441
90513
|
appUILogic,
|
|
90442
90514
|
ibiz.i18n.t(
|
|
90443
90515
|
"runtime.logicScheduler.executor.defaultOpendataViewLogic"
|
|
@@ -90447,7 +90519,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90447
90519
|
}
|
|
90448
90520
|
const openView = openViewRef.refAppViewId;
|
|
90449
90521
|
if (!openView) {
|
|
90450
|
-
throw new
|
|
90522
|
+
throw new RuntimeModelError73(
|
|
90451
90523
|
appUILogic,
|
|
90452
90524
|
ibiz.i18n.t("runtime.logicScheduler.executor.noActuallyReference")
|
|
90453
90525
|
);
|
|
@@ -90485,7 +90557,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90485
90557
|
);
|
|
90486
90558
|
const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
|
|
90487
90559
|
if (!typeFileName) {
|
|
90488
|
-
throw new
|
|
90560
|
+
throw new RuntimeModelError73(
|
|
90489
90561
|
appUILogic,
|
|
90490
90562
|
ibiz.i18n.t("runtime.logicScheduler.executor.attributeConfiguration", {
|
|
90491
90563
|
codeName: appDataEntity.codeName
|
|
@@ -90495,7 +90567,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90495
90567
|
const { data } = parameters;
|
|
90496
90568
|
const formTypeValue = data[0][typeFileName];
|
|
90497
90569
|
if (!formTypeValue) {
|
|
90498
|
-
throw new
|
|
90570
|
+
throw new RuntimeModelError73(
|
|
90499
90571
|
appUILogic,
|
|
90500
90572
|
ibiz.i18n.t("runtime.logicScheduler.executor.entityAttributeValues")
|
|
90501
90573
|
);
|
|
@@ -90542,7 +90614,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90542
90614
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
90543
90615
|
});
|
|
90544
90616
|
if (!newViewRef) {
|
|
90545
|
-
throw new
|
|
90617
|
+
throw new RuntimeModelError73(
|
|
90546
90618
|
appUILogic,
|
|
90547
90619
|
ibiz.i18n.t("runtime.logicScheduler.executor.selectionView")
|
|
90548
90620
|
);
|
|
@@ -90555,7 +90627,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90555
90627
|
} else {
|
|
90556
90628
|
newViewRef = newDataAppView;
|
|
90557
90629
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
90558
|
-
throw new
|
|
90630
|
+
throw new RuntimeModelError73(
|
|
90559
90631
|
appUILogic,
|
|
90560
90632
|
ibiz.i18n.t("runtime.logicScheduler.executor.newdataViewLogic")
|
|
90561
90633
|
);
|
|
@@ -90628,7 +90700,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90628
90700
|
const { context, params, ...rest } = parameters;
|
|
90629
90701
|
const { view } = parameters;
|
|
90630
90702
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
90631
|
-
throw new
|
|
90703
|
+
throw new RuntimeModelError73(
|
|
90632
90704
|
appUILogic,
|
|
90633
90705
|
ibiz.i18n.t("runtime.logicScheduler.executor.indexEntity")
|
|
90634
90706
|
);
|
|
@@ -90686,7 +90758,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90686
90758
|
const minorDERs = selfDe.minorAppDERSs;
|
|
90687
90759
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
90688
90760
|
if (!minorDERs) {
|
|
90689
|
-
throw new
|
|
90761
|
+
throw new RuntimeModelError73(
|
|
90690
90762
|
selfDe,
|
|
90691
90763
|
ibiz.i18n.t("runtime.logicScheduler.executor.relationships")
|
|
90692
90764
|
);
|
|
@@ -90797,17 +90869,17 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
90797
90869
|
};
|
|
90798
90870
|
|
|
90799
90871
|
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
90800
|
-
import { RuntimeModelError as
|
|
90872
|
+
import { RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
|
|
90801
90873
|
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
90802
90874
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
90803
90875
|
execute(executeParams) {
|
|
90804
90876
|
if (!this.logic.appDEUIActionId) {
|
|
90805
|
-
throw new
|
|
90877
|
+
throw new RuntimeModelError74(
|
|
90806
90878
|
this.logic,
|
|
90807
90879
|
ibiz.i18n.t("runtime.logicScheduler.executor.missingTrigger")
|
|
90808
90880
|
);
|
|
90809
90881
|
}
|
|
90810
|
-
UIActionUtil.execAndResolved(
|
|
90882
|
+
return UIActionUtil.execAndResolved(
|
|
90811
90883
|
this.logic.appDEUIActionId,
|
|
90812
90884
|
executeParams,
|
|
90813
90885
|
this.logic.appId
|