@ibiz-template/runtime 0.7.41-alpha.111 → 0.7.41-alpha.113
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 +386 -267
- package/dist/index.system.min.js +1 -1
- package/out/config/global-config.d.ts.map +1 -1
- package/out/config/global-config.js +1 -0
- package/out/constant/predefined-attributes.d.ts +5 -1
- package/out/constant/predefined-attributes.d.ts.map +1 -1
- package/out/constant/predefined-attributes.js +4 -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 +4 -0
- package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
- package/out/controller/control/grid/grid/grid.controller.js +46 -7
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts +2 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
- package/out/controller/control/md-ctrl/md-ctrl.controller.js +27 -4
- 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/controller/utils/data-file-util/data-file-util.d.ts +2 -1
- package/out/controller/utils/data-file-util/data-file-util.d.ts.map +1 -1
- package/out/controller/utils/data-file-util/data-file-util.js +11 -6
- 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/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/interface/api/util/i-api-excel-util.d.ts +53 -1
- package/out/interface/api/util/i-api-excel-util.d.ts.map +1 -1
- package/out/interface/provider/i-platform-provider.d.ts +54 -2
- package/out/interface/provider/i-platform-provider.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/platform/provider/platform-provider-base.d.ts.map +1 -1
- package/out/platform/provider/platform-provider-base.js +1 -2
- 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/package.json +5 -5
- package/src/config/global-config.ts +1 -0
- package/src/constant/predefined-attributes.ts +5 -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 +62 -8
- package/src/controller/control/md-ctrl/md-ctrl.controller.ts +40 -5
- 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/controller/utils/data-file-util/data-file-util.ts +21 -9
- 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/state/control/form-detail/i-api-form-item.state.ts +7 -0
- package/src/interface/api/util/i-api-excel-util.ts +38 -1
- package/src/interface/provider/i-platform-provider.ts +43 -2
- 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/platform/provider/platform-provider-base.ts +1 -2
- package/src/utils/handlebars/helpers/date-format/date-format.ts +20 -0
- package/src/utils/handlebars/helpers/index.ts +2 -0
package/dist/index.esm.js
CHANGED
|
@@ -20003,7 +20003,8 @@ var GlobalConfig = class {
|
|
|
20003
20003
|
enableAsyncActionNotice: false,
|
|
20004
20004
|
aiChunkView: "",
|
|
20005
20005
|
aiChunkEntity: "",
|
|
20006
|
-
counterMaxValue: 99
|
|
20006
|
+
counterMaxValue: 99,
|
|
20007
|
+
enhancedUI: false
|
|
20007
20008
|
};
|
|
20008
20009
|
// 全局分页流布局配置
|
|
20009
20010
|
this.drtab = {
|
|
@@ -20597,6 +20598,17 @@ var HelperAbs = class extends HelperBase {
|
|
|
20597
20598
|
}
|
|
20598
20599
|
};
|
|
20599
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
|
+
|
|
20600
20612
|
// src/utils/handlebars/helpers/index.ts
|
|
20601
20613
|
function installHelpers(hsb) {
|
|
20602
20614
|
new HelperAbs(hsb);
|
|
@@ -20619,6 +20631,7 @@ function installHelpers(hsb) {
|
|
|
20619
20631
|
new HelperSpinalCase(hsb);
|
|
20620
20632
|
new HelperUpperCase(hsb);
|
|
20621
20633
|
new HelperEqPropertyValue(hsb);
|
|
20634
|
+
new HelperDateFormat(hsb);
|
|
20622
20635
|
}
|
|
20623
20636
|
|
|
20624
20637
|
// src/utils/handlebars/handlebars.ts
|
|
@@ -21310,6 +21323,7 @@ var PredefinedControlRender = /* @__PURE__ */ ((PredefinedControlRender2) => {
|
|
|
21310
21323
|
var PredefinedAttributes = /* @__PURE__ */ ((PredefinedAttributes2) => {
|
|
21311
21324
|
PredefinedAttributes2["CLASSNAMES"] = "classNames";
|
|
21312
21325
|
PredefinedAttributes2["STYLES"] = "styles";
|
|
21326
|
+
PredefinedAttributes2["BEFORE_FRONT_EXPORT"] = "before-front-export";
|
|
21313
21327
|
return PredefinedAttributes2;
|
|
21314
21328
|
})(PredefinedAttributes || {});
|
|
21315
21329
|
|
|
@@ -25958,7 +25972,7 @@ var ValueExUtil = class {
|
|
|
25958
25972
|
|
|
25959
25973
|
// src/controller/utils/value-default/value-default.ts
|
|
25960
25974
|
import { RuntimeError as RuntimeError12, ModelError as ModelError4 } from "@ibiz-template/core";
|
|
25961
|
-
import
|
|
25975
|
+
import dayjs2 from "dayjs";
|
|
25962
25976
|
import { createUUID as createUUID3 } from "qx-util";
|
|
25963
25977
|
import { isNil as isNil9, isNotNil } from "ramda";
|
|
25964
25978
|
function getDefaultValue(opts, origins) {
|
|
@@ -25992,7 +26006,7 @@ function getDefaultValue(opts, origins) {
|
|
|
25992
26006
|
case "OPERATOR":
|
|
25993
26007
|
return context.srfuserid;
|
|
25994
26008
|
case "CURTIME":
|
|
25995
|
-
return
|
|
26009
|
+
return dayjs2().format(valueFormat);
|
|
25996
26010
|
case "PARAM":
|
|
25997
26011
|
return data[defaultValue];
|
|
25998
26012
|
case "SESSION":
|
|
@@ -26140,7 +26154,7 @@ async function importData2(opts) {
|
|
|
26140
26154
|
}
|
|
26141
26155
|
return result;
|
|
26142
26156
|
}
|
|
26143
|
-
async function exportData(
|
|
26157
|
+
async function exportData(args) {
|
|
26144
26158
|
if (!ibiz.util.getExcelUtil) {
|
|
26145
26159
|
throw new RuntimeError13(
|
|
26146
26160
|
ibiz.i18n.t("runtime.controller.utils.dataFileUtil.noExist")
|
|
@@ -26153,15 +26167,25 @@ async function exportData(header, data, fileName) {
|
|
|
26153
26167
|
);
|
|
26154
26168
|
}
|
|
26155
26169
|
try {
|
|
26156
|
-
|
|
26170
|
+
const {
|
|
26171
|
+
fileName,
|
|
26172
|
+
header,
|
|
26173
|
+
data,
|
|
26174
|
+
rowHeights,
|
|
26175
|
+
colWidths,
|
|
26176
|
+
multiHeader,
|
|
26177
|
+
merges,
|
|
26178
|
+
cellStyle
|
|
26179
|
+
} = args;
|
|
26180
|
+
exportExcel.exportJsonToExcelWithStyle({
|
|
26181
|
+
fileName,
|
|
26157
26182
|
header,
|
|
26158
|
-
// 表头内容 数组格式
|
|
26159
26183
|
data,
|
|
26160
|
-
|
|
26161
|
-
|
|
26162
|
-
|
|
26163
|
-
|
|
26164
|
-
|
|
26184
|
+
rowHeights,
|
|
26185
|
+
colWidths,
|
|
26186
|
+
multiHeader,
|
|
26187
|
+
merges,
|
|
26188
|
+
cellStyle
|
|
26165
26189
|
});
|
|
26166
26190
|
return { ok: true };
|
|
26167
26191
|
} catch (error) {
|
|
@@ -28417,12 +28441,12 @@ var BaseController = class {
|
|
|
28417
28441
|
async created() {
|
|
28418
28442
|
this.mountCounter.enroll(SELF_KEY);
|
|
28419
28443
|
await this.onCreated();
|
|
28444
|
+
ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onCreated"));
|
|
28445
|
+
await this._evt.emit("onCreated", void 0);
|
|
28420
28446
|
this.state.isCreated = true;
|
|
28421
28447
|
this.force(() => {
|
|
28422
28448
|
this.mountSelf();
|
|
28423
28449
|
});
|
|
28424
|
-
ibiz.log.debug("".concat(this.constructor.name, ":").concat(this.name, " onCreated"));
|
|
28425
|
-
this._evt.emit("onCreated", void 0);
|
|
28426
28450
|
}
|
|
28427
28451
|
/**
|
|
28428
28452
|
* 生命周期-创建完成,实际执行逻辑,子类重写用这个
|
|
@@ -28872,8 +28896,8 @@ var ViewController = class extends BaseController {
|
|
|
28872
28896
|
return this.getEventArgs();
|
|
28873
28897
|
};
|
|
28874
28898
|
if (this.scheduler.hasViewEventTrigger) {
|
|
28875
|
-
this.evt.onAll((_eventName, event) => {
|
|
28876
|
-
this.scheduler.triggerViewEvent(event);
|
|
28899
|
+
this.evt.onAll(async (_eventName, event) => {
|
|
28900
|
+
await this.scheduler.triggerViewEvent(event);
|
|
28877
28901
|
});
|
|
28878
28902
|
}
|
|
28879
28903
|
}
|
|
@@ -29340,7 +29364,7 @@ var HtmlViewController = class extends ViewController {
|
|
|
29340
29364
|
|
|
29341
29365
|
// src/controller/common/editor/editor.controller.ts
|
|
29342
29366
|
import { DataTypes } from "@ibiz-template/core";
|
|
29343
|
-
import
|
|
29367
|
+
import dayjs3 from "dayjs";
|
|
29344
29368
|
var EditorController = class {
|
|
29345
29369
|
/**
|
|
29346
29370
|
* Creates an instance of EditorController.
|
|
@@ -29513,7 +29537,7 @@ var EditorController = class {
|
|
|
29513
29537
|
await this.onInit();
|
|
29514
29538
|
}
|
|
29515
29539
|
async onInit() {
|
|
29516
|
-
var _a3, _b2;
|
|
29540
|
+
var _a3, _b2, _c, _d;
|
|
29517
29541
|
if (this.model.placeHolder) {
|
|
29518
29542
|
this.placeHolder = this.model.placeHolder;
|
|
29519
29543
|
}
|
|
@@ -29560,6 +29584,14 @@ var EditorController = class {
|
|
|
29560
29584
|
(item) => item.id !== this.model.id
|
|
29561
29585
|
);
|
|
29562
29586
|
}
|
|
29587
|
+
const controlAttributes = ((_d = (_c = this.parent.model) == null ? void 0 : _c.controlAttributes) == null ? void 0 : _d.filter(
|
|
29588
|
+
(item) => "classNames" /* CLASSNAMES */ === item.attrName || "styles" /* STYLES */ === item.attrName
|
|
29589
|
+
)) || [];
|
|
29590
|
+
if (controlAttributes.length) {
|
|
29591
|
+
if (!this.model.controlAttributes)
|
|
29592
|
+
this.model.controlAttributes = [];
|
|
29593
|
+
this.model.controlAttributes.push(...controlAttributes);
|
|
29594
|
+
}
|
|
29563
29595
|
this.initExtraParams();
|
|
29564
29596
|
}
|
|
29565
29597
|
/**
|
|
@@ -29649,7 +29681,7 @@ var EditorController = class {
|
|
|
29649
29681
|
}
|
|
29650
29682
|
const isDate = DataTypes.isDate(this.dataType);
|
|
29651
29683
|
if (isDate) {
|
|
29652
|
-
const formatVal =
|
|
29684
|
+
const formatVal = dayjs3(strVal).format(this.valueFormat);
|
|
29653
29685
|
if (formatVal !== "Invalid Date") {
|
|
29654
29686
|
return formatVal;
|
|
29655
29687
|
}
|
|
@@ -31943,8 +31975,8 @@ var AppMenuIconViewController = class extends AppMenuController {
|
|
|
31943
31975
|
};
|
|
31944
31976
|
|
|
31945
31977
|
// src/controller/control/calendar/calendar.controller.ts
|
|
31946
|
-
import
|
|
31947
|
-
import { RuntimeError as RuntimeError30
|
|
31978
|
+
import dayjs4 from "dayjs";
|
|
31979
|
+
import { RuntimeError as RuntimeError30 } from "@ibiz-template/core";
|
|
31948
31980
|
|
|
31949
31981
|
// src/controller/control/calendar/calendar.service.ts
|
|
31950
31982
|
import { RuntimeError as RuntimeError20 } from "@ibiz-template/core";
|
|
@@ -36295,41 +36327,41 @@ var CalendarController = class extends MDControlController {
|
|
|
36295
36327
|
switch (this.timeRangeMode) {
|
|
36296
36328
|
case "year":
|
|
36297
36329
|
this.state.timeRange = [
|
|
36298
|
-
|
|
36299
|
-
|
|
36330
|
+
dayjs4().startOf("year").toDate(),
|
|
36331
|
+
dayjs4().endOf("year").toDate()
|
|
36300
36332
|
];
|
|
36301
36333
|
break;
|
|
36302
36334
|
case "halfYear":
|
|
36303
|
-
const year =
|
|
36304
|
-
const isFirstHalf =
|
|
36335
|
+
const year = dayjs4().year();
|
|
36336
|
+
const isFirstHalf = dayjs4().month() < 6;
|
|
36305
36337
|
if (isFirstHalf) {
|
|
36306
36338
|
this.state.timeRange = [
|
|
36307
|
-
|
|
36308
|
-
|
|
36339
|
+
dayjs4("".concat(year, "-01-01")).toDate(),
|
|
36340
|
+
dayjs4("".concat(year, "-06-30")).toDate()
|
|
36309
36341
|
];
|
|
36310
36342
|
} else {
|
|
36311
36343
|
this.state.timeRange = [
|
|
36312
|
-
|
|
36313
|
-
|
|
36344
|
+
dayjs4("".concat(year, "-07-01")).toDate(),
|
|
36345
|
+
dayjs4("".concat(year, "-12-31")).toDate()
|
|
36314
36346
|
];
|
|
36315
36347
|
}
|
|
36316
36348
|
break;
|
|
36317
36349
|
case "quarter":
|
|
36318
36350
|
this.state.timeRange = [
|
|
36319
|
-
|
|
36320
|
-
|
|
36351
|
+
dayjs4().startOf("quarter").toDate(),
|
|
36352
|
+
dayjs4().endOf("quarter").toDate()
|
|
36321
36353
|
];
|
|
36322
36354
|
break;
|
|
36323
36355
|
case "custom":
|
|
36324
36356
|
const { begintime } = this.controlParams;
|
|
36325
36357
|
const { endtime } = this.controlParams;
|
|
36326
|
-
if (!begintime || !
|
|
36358
|
+
if (!begintime || !dayjs4(begintime).isValid() || !endtime || !dayjs4(endtime).isValid())
|
|
36327
36359
|
throw new RuntimeError30(
|
|
36328
36360
|
ibiz.i18n.t("runtime.controller.control.calendar.illegalTime")
|
|
36329
36361
|
);
|
|
36330
36362
|
this.state.timeRange = [
|
|
36331
|
-
|
|
36332
|
-
|
|
36363
|
+
dayjs4(begintime).toDate(),
|
|
36364
|
+
dayjs4(endtime).toDate()
|
|
36333
36365
|
];
|
|
36334
36366
|
break;
|
|
36335
36367
|
default:
|
|
@@ -36400,8 +36432,8 @@ var CalendarController = class extends MDControlController {
|
|
|
36400
36432
|
return this.getEventArgs();
|
|
36401
36433
|
};
|
|
36402
36434
|
if (this.viewScheduler.hasViewEventTrigger) {
|
|
36403
|
-
this.evt.onAll((_eventName, event) => {
|
|
36404
|
-
this.viewScheduler.triggerViewEvent(event);
|
|
36435
|
+
this.evt.onAll(async (_eventName, event) => {
|
|
36436
|
+
await this.viewScheduler.triggerViewEvent(event);
|
|
36405
36437
|
});
|
|
36406
36438
|
}
|
|
36407
36439
|
}
|
|
@@ -36463,13 +36495,12 @@ var CalendarController = class extends MDControlController {
|
|
|
36463
36495
|
ctrl: this
|
|
36464
36496
|
}
|
|
36465
36497
|
));
|
|
36466
|
-
if (result === -1)
|
|
36467
|
-
|
|
36468
|
-
|
|
36469
|
-
|
|
36470
|
-
|
|
36471
|
-
|
|
36472
|
-
);
|
|
36498
|
+
if (result === -1) {
|
|
36499
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicOpendata"));
|
|
36500
|
+
return {
|
|
36501
|
+
cancel: true
|
|
36502
|
+
};
|
|
36503
|
+
}
|
|
36473
36504
|
return {
|
|
36474
36505
|
cancel: result ? result.ok : true
|
|
36475
36506
|
};
|
|
@@ -36499,13 +36530,12 @@ var CalendarController = class extends MDControlController {
|
|
|
36499
36530
|
ctrl: this
|
|
36500
36531
|
}
|
|
36501
36532
|
));
|
|
36502
|
-
if (result === -1)
|
|
36503
|
-
|
|
36504
|
-
|
|
36505
|
-
|
|
36506
|
-
|
|
36507
|
-
|
|
36508
|
-
);
|
|
36533
|
+
if (result === -1) {
|
|
36534
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicNewdata"));
|
|
36535
|
+
return {
|
|
36536
|
+
cancel: true
|
|
36537
|
+
};
|
|
36538
|
+
}
|
|
36509
36539
|
return {
|
|
36510
36540
|
cancel: result ? result.ok : true
|
|
36511
36541
|
};
|
|
@@ -36645,9 +36675,9 @@ var CalendarController = class extends MDControlController {
|
|
|
36645
36675
|
let result = 0;
|
|
36646
36676
|
const x = a[sortField];
|
|
36647
36677
|
const y = b[sortField];
|
|
36648
|
-
if (
|
|
36678
|
+
if (dayjs4(x).isAfter(y)) {
|
|
36649
36679
|
result = -1;
|
|
36650
|
-
} else if (
|
|
36680
|
+
} else if (dayjs4(x).isBefore(y)) {
|
|
36651
36681
|
result = 1;
|
|
36652
36682
|
}
|
|
36653
36683
|
return result;
|
|
@@ -36715,15 +36745,15 @@ var CalendarController = class extends MDControlController {
|
|
|
36715
36745
|
);
|
|
36716
36746
|
break;
|
|
36717
36747
|
case "USER2":
|
|
36718
|
-
srfstartdate =
|
|
36719
|
-
srfenddate =
|
|
36748
|
+
srfstartdate = dayjs4(timeRange[0]).format("YYYY-MM-DD");
|
|
36749
|
+
srfenddate = dayjs4(timeRange[1]).format("YYYY-MM-DD");
|
|
36720
36750
|
break;
|
|
36721
36751
|
default:
|
|
36722
36752
|
break;
|
|
36723
36753
|
}
|
|
36724
36754
|
return {
|
|
36725
|
-
srfstartdate:
|
|
36726
|
-
srfenddate:
|
|
36755
|
+
srfstartdate: dayjs4(srfstartdate).format("YYYY-MM-DD HH:mm:ss"),
|
|
36756
|
+
srfenddate: dayjs4(srfenddate).format("YYYY-MM-DD HH:mm:ss")
|
|
36727
36757
|
};
|
|
36728
36758
|
}
|
|
36729
36759
|
return { srfstartdate, srfenddate };
|
|
@@ -36913,22 +36943,22 @@ import { isObject as isObject2, isString as isString2 } from "qx-util";
|
|
|
36913
36943
|
import { RuntimeError as RuntimeError31 } from "@ibiz-template/core";
|
|
36914
36944
|
|
|
36915
36945
|
// src/controller/control/chart/generator/line-series-generator.ts
|
|
36916
|
-
import { RuntimeModelError as
|
|
36946
|
+
import { RuntimeModelError as RuntimeModelError41 } from "@ibiz-template/core";
|
|
36917
36947
|
|
|
36918
36948
|
// src/controller/control/chart/generator/base-series-generator.ts
|
|
36919
|
-
import { plus, RuntimeModelError as
|
|
36920
|
-
import
|
|
36949
|
+
import { plus, RuntimeModelError as RuntimeModelError40, toNumberOrNil } from "@ibiz-template/core";
|
|
36950
|
+
import dayjs5 from "dayjs";
|
|
36921
36951
|
import minMax from "dayjs/plugin/minMax";
|
|
36922
36952
|
import isSameOrBefore from "dayjs/plugin/isSameOrBefore";
|
|
36923
36953
|
import quarterOfYear from "dayjs/plugin/quarterOfYear";
|
|
36924
36954
|
import weekOfYear from "dayjs/plugin/weekOfYear";
|
|
36925
36955
|
import isoWeek from "dayjs/plugin/isoWeek";
|
|
36926
36956
|
import { clone as clone16, isNil as isNil15, mergeDeepRight } from "ramda";
|
|
36927
|
-
|
|
36928
|
-
|
|
36929
|
-
|
|
36930
|
-
|
|
36931
|
-
|
|
36957
|
+
dayjs5.extend(minMax);
|
|
36958
|
+
dayjs5.extend(isSameOrBefore);
|
|
36959
|
+
dayjs5.extend(quarterOfYear);
|
|
36960
|
+
dayjs5.extend(weekOfYear);
|
|
36961
|
+
dayjs5.extend(isoWeek);
|
|
36932
36962
|
var DEFAULT_GROUP = "$default_group";
|
|
36933
36963
|
var BaseSeriesGenerator = class {
|
|
36934
36964
|
/**
|
|
@@ -36998,13 +37028,13 @@ var BaseSeriesGenerator = class {
|
|
|
36998
37028
|
var _a3;
|
|
36999
37029
|
const { chartSeriesEncode, caption, id, userParam } = model;
|
|
37000
37030
|
if (!model.catalogField) {
|
|
37001
|
-
throw new
|
|
37031
|
+
throw new RuntimeModelError40(
|
|
37002
37032
|
model,
|
|
37003
37033
|
ibiz.i18n.t("runtime.controller.control.chart.missingClassification")
|
|
37004
37034
|
);
|
|
37005
37035
|
}
|
|
37006
37036
|
if (!model.valueField) {
|
|
37007
|
-
throw new
|
|
37037
|
+
throw new RuntimeModelError40(
|
|
37008
37038
|
model,
|
|
37009
37039
|
ibiz.i18n.t("runtime.controller.control.chart.missingValue")
|
|
37010
37040
|
);
|
|
@@ -37550,25 +37580,25 @@ var BaseSeriesGenerator = class {
|
|
|
37550
37580
|
format = "YYYY-MM";
|
|
37551
37581
|
}
|
|
37552
37582
|
if (singleData[this.catalogField]) {
|
|
37553
|
-
const formattedDate =
|
|
37583
|
+
const formattedDate = dayjs5(singleData[this.catalogField]).format(
|
|
37554
37584
|
format
|
|
37555
37585
|
);
|
|
37556
37586
|
singleData[this.catalogField] = formattedDate;
|
|
37557
37587
|
}
|
|
37558
37588
|
} else if (groupMode === "QUARTER") {
|
|
37559
37589
|
if (singleData[this.catalogField]) {
|
|
37560
|
-
const formattedDate = "".concat(
|
|
37590
|
+
const formattedDate = "".concat(dayjs5(
|
|
37561
37591
|
singleData[this.catalogField]
|
|
37562
|
-
).format("YYYY"), "-").concat(
|
|
37592
|
+
).format("YYYY"), "-").concat(dayjs5(
|
|
37563
37593
|
singleData[this.catalogField]
|
|
37564
37594
|
).quarter());
|
|
37565
37595
|
singleData[this.catalogField] = formattedDate;
|
|
37566
37596
|
}
|
|
37567
37597
|
} else if (groupMode === "YEARWEEK") {
|
|
37568
37598
|
if (singleData[this.catalogField]) {
|
|
37569
|
-
const formattedDate = "".concat(
|
|
37599
|
+
const formattedDate = "".concat(dayjs5(
|
|
37570
37600
|
singleData[this.catalogField]
|
|
37571
|
-
).format("YYYY"), "-").concat(
|
|
37601
|
+
).format("YYYY"), "-").concat(dayjs5(singleData[this.catalogField]).week());
|
|
37572
37602
|
singleData[this.catalogField] = formattedDate;
|
|
37573
37603
|
}
|
|
37574
37604
|
}
|
|
@@ -37590,7 +37620,7 @@ var BaseSeriesGenerator = class {
|
|
|
37590
37620
|
let sortedKeys = [];
|
|
37591
37621
|
if (groupMode === "DAY" || groupMode === "YEAR" || groupMode === "MONTH") {
|
|
37592
37622
|
sortedKeys = Array.from(dateMap.keys()).sort(
|
|
37593
|
-
(a, b) =>
|
|
37623
|
+
(a, b) => dayjs5(a).diff(dayjs5(b))
|
|
37594
37624
|
);
|
|
37595
37625
|
} else if (groupMode === "QUARTER" || groupMode === "YEARWEEK") {
|
|
37596
37626
|
sortedKeys = Array.from(dateMap.keys()).sort((a, b) => {
|
|
@@ -37623,13 +37653,13 @@ var BaseSeriesGenerator = class {
|
|
|
37623
37653
|
const dates = [];
|
|
37624
37654
|
Object.keys(data).forEach((key) => {
|
|
37625
37655
|
data[key].forEach((_val, date) => {
|
|
37626
|
-
dates.push(
|
|
37656
|
+
dates.push(dayjs5(date));
|
|
37627
37657
|
});
|
|
37628
37658
|
});
|
|
37629
37659
|
if (!dates.length)
|
|
37630
37660
|
return;
|
|
37631
|
-
const maxDate =
|
|
37632
|
-
const minDate =
|
|
37661
|
+
const maxDate = dayjs5.max(dates);
|
|
37662
|
+
const minDate = dayjs5.min(dates);
|
|
37633
37663
|
if (groupMode === "DAY") {
|
|
37634
37664
|
let currentDate = minDate;
|
|
37635
37665
|
const endDate = maxDate;
|
|
@@ -37751,13 +37781,13 @@ var BaseSeriesGenerator = class {
|
|
|
37751
37781
|
var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
37752
37782
|
calcStaticOptions() {
|
|
37753
37783
|
if (this.xAxisIndex === void 0) {
|
|
37754
|
-
throw new
|
|
37784
|
+
throw new RuntimeModelError41(
|
|
37755
37785
|
this.model,
|
|
37756
37786
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredX")
|
|
37757
37787
|
);
|
|
37758
37788
|
}
|
|
37759
37789
|
if (this.yAxisIndex === void 0) {
|
|
37760
|
-
throw new
|
|
37790
|
+
throw new RuntimeModelError41(
|
|
37761
37791
|
this.model,
|
|
37762
37792
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredY")
|
|
37763
37793
|
);
|
|
@@ -37776,17 +37806,17 @@ var LineSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
37776
37806
|
};
|
|
37777
37807
|
|
|
37778
37808
|
// src/controller/control/chart/generator/bar-series-generator.ts
|
|
37779
|
-
import { RuntimeModelError as
|
|
37809
|
+
import { RuntimeModelError as RuntimeModelError42 } from "@ibiz-template/core";
|
|
37780
37810
|
var BarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
37781
37811
|
calcStaticOptions() {
|
|
37782
37812
|
if (this.xAxisIndex === void 0) {
|
|
37783
|
-
throw new
|
|
37813
|
+
throw new RuntimeModelError42(
|
|
37784
37814
|
this.model,
|
|
37785
37815
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredX")
|
|
37786
37816
|
);
|
|
37787
37817
|
}
|
|
37788
37818
|
if (this.yAxisIndex === void 0) {
|
|
37789
|
-
throw new
|
|
37819
|
+
throw new RuntimeModelError42(
|
|
37790
37820
|
this.model,
|
|
37791
37821
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredY")
|
|
37792
37822
|
);
|
|
@@ -37842,17 +37872,17 @@ var PieSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
37842
37872
|
};
|
|
37843
37873
|
|
|
37844
37874
|
// src/controller/control/chart/generator/scatter-series-generator.ts
|
|
37845
|
-
import { RuntimeModelError as
|
|
37875
|
+
import { RuntimeModelError as RuntimeModelError43 } from "@ibiz-template/core";
|
|
37846
37876
|
var ScatterSeriesGenerator = class extends BaseSeriesGenerator {
|
|
37847
37877
|
calcStaticOptions() {
|
|
37848
37878
|
if (this.xAxisIndex === void 0) {
|
|
37849
|
-
throw new
|
|
37879
|
+
throw new RuntimeModelError43(
|
|
37850
37880
|
this.model,
|
|
37851
37881
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredX")
|
|
37852
37882
|
);
|
|
37853
37883
|
}
|
|
37854
37884
|
if (this.yAxisIndex === void 0) {
|
|
37855
|
-
throw new
|
|
37885
|
+
throw new RuntimeModelError43(
|
|
37856
37886
|
this.model,
|
|
37857
37887
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredY")
|
|
37858
37888
|
);
|
|
@@ -37982,7 +38012,7 @@ var RadarSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
37982
38012
|
};
|
|
37983
38013
|
|
|
37984
38014
|
// src/controller/control/chart/generator/area-series-generator.ts
|
|
37985
|
-
import { RuntimeModelError as
|
|
38015
|
+
import { RuntimeModelError as RuntimeModelError44 } from "@ibiz-template/core";
|
|
37986
38016
|
var AreaSeriesGenerator = class extends BaseSeriesGenerator {
|
|
37987
38017
|
/**
|
|
37988
38018
|
* 计算静态序列的options
|
|
@@ -37991,13 +38021,13 @@ var AreaSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
37991
38021
|
*/
|
|
37992
38022
|
calcStaticOptions() {
|
|
37993
38023
|
if (this.xAxisIndex === void 0) {
|
|
37994
|
-
throw new
|
|
38024
|
+
throw new RuntimeModelError44(
|
|
37995
38025
|
this.model,
|
|
37996
38026
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredX")
|
|
37997
38027
|
);
|
|
37998
38028
|
}
|
|
37999
38029
|
if (this.yAxisIndex === void 0) {
|
|
38000
|
-
throw new
|
|
38030
|
+
throw new RuntimeModelError44(
|
|
38001
38031
|
this.model,
|
|
38002
38032
|
ibiz.i18n.t("runtime.controller.control.chart.noConfiguredY")
|
|
38003
38033
|
);
|
|
@@ -38047,7 +38077,7 @@ var GaugeSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
38047
38077
|
// src/controller/control/chart/generator/candlestick-series-generator.ts
|
|
38048
38078
|
import { isNil as isNil16 } from "ramda";
|
|
38049
38079
|
import { isArray as isArray9, isNumber as isNumber3 } from "qx-util";
|
|
38050
|
-
import { plus as plus2, RuntimeModelError as
|
|
38080
|
+
import { plus as plus2, RuntimeModelError as RuntimeModelError45, toNumberOrNil as toNumberOrNil2 } from "@ibiz-template/core";
|
|
38051
38081
|
var CandlestickSeriesGenerator = class extends BaseSeriesGenerator {
|
|
38052
38082
|
/**
|
|
38053
38083
|
* 初始化参数
|
|
@@ -38060,7 +38090,7 @@ var CandlestickSeriesGenerator = class extends BaseSeriesGenerator {
|
|
|
38060
38090
|
var _a3;
|
|
38061
38091
|
const { chartSeriesEncode, caption, id, userParam, navViewParamJO } = model;
|
|
38062
38092
|
if (!model.catalogField) {
|
|
38063
|
-
throw new
|
|
38093
|
+
throw new RuntimeModelError45(
|
|
38064
38094
|
model,
|
|
38065
38095
|
ibiz.i18n.t("runtime.controller.control.chart.missingClassification")
|
|
38066
38096
|
);
|
|
@@ -41392,7 +41422,7 @@ import { clone as clone23 } from "ramda";
|
|
|
41392
41422
|
import { isString as isString3 } from "lodash-es";
|
|
41393
41423
|
|
|
41394
41424
|
// src/controller/control/search-bar/search-bar-filter.controller.ts
|
|
41395
|
-
import { RuntimeModelError as
|
|
41425
|
+
import { RuntimeModelError as RuntimeModelError46 } from "@ibiz-template/core";
|
|
41396
41426
|
|
|
41397
41427
|
// src/controller/control/search-bar/util.ts
|
|
41398
41428
|
var ItemsValueOPs = [
|
|
@@ -41473,7 +41503,7 @@ var SearchBarFilterController = class {
|
|
|
41473
41503
|
async init() {
|
|
41474
41504
|
if (!this.noEditor) {
|
|
41475
41505
|
if (!this.model.editor) {
|
|
41476
|
-
throw new
|
|
41506
|
+
throw new RuntimeModelError46(
|
|
41477
41507
|
this.model,
|
|
41478
41508
|
ibiz.i18n.t("runtime.controller.control.searchBar.missingModel")
|
|
41479
41509
|
);
|
|
@@ -43581,7 +43611,7 @@ import {
|
|
|
43581
43611
|
clone as clone25,
|
|
43582
43612
|
DataTypes as DataTypes2,
|
|
43583
43613
|
isElementSame as isElementSame2,
|
|
43584
|
-
RuntimeModelError as
|
|
43614
|
+
RuntimeModelError as RuntimeModelError47
|
|
43585
43615
|
} from "@ibiz-template/core";
|
|
43586
43616
|
import { isNil as isNil18, isNotNil as isNotNil4 } from "ramda";
|
|
43587
43617
|
import { createUUID as createUUID6, isBoolean } from "qx-util";
|
|
@@ -44044,7 +44074,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
44044
44074
|
const { enableGroup } = this.state;
|
|
44045
44075
|
if (enableGroup && groupMode) {
|
|
44046
44076
|
if (!groupAppDEFieldId) {
|
|
44047
|
-
throw new
|
|
44077
|
+
throw new RuntimeModelError47(
|
|
44048
44078
|
this.model,
|
|
44049
44079
|
ibiz.i18n.t(
|
|
44050
44080
|
"runtime.controller.control.dataView.propertiesNoConfigured"
|
|
@@ -44137,7 +44167,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
44137
44167
|
async handleCodeListGroup() {
|
|
44138
44168
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
44139
44169
|
if (!groupCodeListId) {
|
|
44140
|
-
throw new
|
|
44170
|
+
throw new RuntimeModelError47(
|
|
44141
44171
|
this.model,
|
|
44142
44172
|
ibiz.i18n.t("runtime.controller.control.dataView.tableNoConfigured")
|
|
44143
44173
|
);
|
|
@@ -44251,7 +44281,7 @@ var DataViewControlController = class extends MDControlController {
|
|
|
44251
44281
|
caption = ibiz.i18n.t(item.capLanguageRes.lanResTag, item.caption);
|
|
44252
44282
|
}
|
|
44253
44283
|
if (!item.appDEFieldId) {
|
|
44254
|
-
throw new
|
|
44284
|
+
throw new RuntimeModelError47(
|
|
44255
44285
|
item,
|
|
44256
44286
|
ibiz.i18n.t("runtime.controller.control.dataView.sortingItems")
|
|
44257
44287
|
);
|
|
@@ -44472,13 +44502,13 @@ var DataViewControlController = class extends MDControlController {
|
|
|
44472
44502
|
await this.updateChangedItems([draggedItem]);
|
|
44473
44503
|
} else {
|
|
44474
44504
|
if (!minorSortAppDEFieldId)
|
|
44475
|
-
throw new
|
|
44505
|
+
throw new RuntimeModelError47(
|
|
44476
44506
|
this.model,
|
|
44477
44507
|
ibiz.i18n.t("runtime.controller.common.md.sortingProperties")
|
|
44478
44508
|
);
|
|
44479
44509
|
const moveAction = moveControlAction == null ? void 0 : moveControlAction.appDEMethodId;
|
|
44480
44510
|
if (!moveAction)
|
|
44481
|
-
throw new
|
|
44511
|
+
throw new RuntimeModelError47(
|
|
44482
44512
|
this.model,
|
|
44483
44513
|
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
44484
44514
|
);
|
|
@@ -45474,7 +45504,7 @@ import { RuntimeError as RuntimeError37 } from "@ibiz-template/core";
|
|
|
45474
45504
|
|
|
45475
45505
|
// src/controller/control/form/form/form.controller.ts
|
|
45476
45506
|
import {
|
|
45477
|
-
RuntimeModelError as
|
|
45507
|
+
RuntimeModelError as RuntimeModelError48,
|
|
45478
45508
|
debounceAndAsyncMerge,
|
|
45479
45509
|
recursiveIterate as recursiveIterate8,
|
|
45480
45510
|
EntityError,
|
|
@@ -45744,7 +45774,7 @@ var FormController = class extends ControlController {
|
|
|
45744
45774
|
return;
|
|
45745
45775
|
}
|
|
45746
45776
|
if (form.details[detail.id]) {
|
|
45747
|
-
throw new
|
|
45777
|
+
throw new RuntimeModelError48(
|
|
45748
45778
|
detail,
|
|
45749
45779
|
ibiz.i18n.t(
|
|
45750
45780
|
"runtime.controller.control.form.initializationException",
|
|
@@ -47959,6 +47989,13 @@ var FormItemState = class extends FormDetailState {
|
|
|
47959
47989
|
* @memberof FormItemState
|
|
47960
47990
|
*/
|
|
47961
47991
|
this.inputTipUrl = void 0;
|
|
47992
|
+
/**
|
|
47993
|
+
* 编辑器类名集合
|
|
47994
|
+
*
|
|
47995
|
+
* @type {string[]}
|
|
47996
|
+
* @memberof FormItemState
|
|
47997
|
+
*/
|
|
47998
|
+
this.editorClass = [];
|
|
47962
47999
|
let $disabled = false;
|
|
47963
48000
|
Object.defineProperty(this, "disabled", {
|
|
47964
48001
|
enumerable: true,
|
|
@@ -48462,6 +48499,19 @@ var FormItemController = class extends FormDetailController {
|
|
|
48462
48499
|
clearTipsCache() {
|
|
48463
48500
|
localStorage.removeItem(this.TIPS_CACHE);
|
|
48464
48501
|
}
|
|
48502
|
+
/**
|
|
48503
|
+
* @description 计算动态样式表
|
|
48504
|
+
* @param {IData} data
|
|
48505
|
+
* @memberof FormItemController
|
|
48506
|
+
*/
|
|
48507
|
+
calcDynaClass(data) {
|
|
48508
|
+
var _a3;
|
|
48509
|
+
super.calcDynaClass(data);
|
|
48510
|
+
if ((_a3 = this.model.editor) == null ? void 0 : _a3.dynaClass) {
|
|
48511
|
+
const dynaClass = calcDynaClass(this.model.editor.dynaClass, data);
|
|
48512
|
+
this.state.editorClass = dynaClass;
|
|
48513
|
+
}
|
|
48514
|
+
}
|
|
48465
48515
|
};
|
|
48466
48516
|
|
|
48467
48517
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl.controller.ts
|
|
@@ -48670,7 +48720,7 @@ var FormMDCtrlController = class extends FormDetailController {
|
|
|
48670
48720
|
import {
|
|
48671
48721
|
ModelError as ModelError20,
|
|
48672
48722
|
mergeInLeft as mergeInLeft2,
|
|
48673
|
-
RuntimeModelError as
|
|
48723
|
+
RuntimeModelError as RuntimeModelError49
|
|
48674
48724
|
} from "@ibiz-template/core";
|
|
48675
48725
|
var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
48676
48726
|
constructor() {
|
|
@@ -48709,7 +48759,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
48709
48759
|
if (((_a3 = this.context) == null ? void 0 : _a3.srfrunmode) === "DESIGN") {
|
|
48710
48760
|
return;
|
|
48711
48761
|
}
|
|
48712
|
-
throw new
|
|
48762
|
+
throw new RuntimeModelError49(
|
|
48713
48763
|
this.model,
|
|
48714
48764
|
ibiz.i18n.t("runtime.controller.control.form.unconfiguredWidgets")
|
|
48715
48765
|
);
|
|
@@ -48848,7 +48898,7 @@ var FormMDCtrlMDController = class extends FormMDCtrlController {
|
|
|
48848
48898
|
};
|
|
48849
48899
|
|
|
48850
48900
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.controller.ts
|
|
48851
|
-
import { RuntimeError as RuntimeError38, RuntimeModelError as
|
|
48901
|
+
import { RuntimeError as RuntimeError38, RuntimeModelError as RuntimeModelError50 } from "@ibiz-template/core";
|
|
48852
48902
|
import { createUUID as createUUID8 } from "qx-util";
|
|
48853
48903
|
|
|
48854
48904
|
// src/controller/control/form/form-detail/form-mdctrl/form-mdctrl-form.state.ts
|
|
@@ -48893,7 +48943,7 @@ var FormMDCtrlFormController = class extends FormMDCtrlController {
|
|
|
48893
48943
|
if (((_a3 = this.context) == null ? void 0 : _a3.srfrunmode) === "DESIGN") {
|
|
48894
48944
|
return;
|
|
48895
48945
|
}
|
|
48896
|
-
throw new
|
|
48946
|
+
throw new RuntimeModelError50(
|
|
48897
48947
|
this.model,
|
|
48898
48948
|
ibiz.i18n.t("runtime.controller.control.form.unconfiguredWidgets")
|
|
48899
48949
|
);
|
|
@@ -49458,6 +49508,20 @@ var FormRawItemController = class extends FormDetailController {
|
|
|
49458
49508
|
var _a3;
|
|
49459
49509
|
return new FormRawItemState((_a3 = this.parent) == null ? void 0 : _a3.state);
|
|
49460
49510
|
}
|
|
49511
|
+
/**
|
|
49512
|
+
* @description 计算动态样式表
|
|
49513
|
+
* @protected
|
|
49514
|
+
* @param {IData} data
|
|
49515
|
+
* @memberof FormRawItemController
|
|
49516
|
+
*/
|
|
49517
|
+
calcDynaClass(data) {
|
|
49518
|
+
var _a3;
|
|
49519
|
+
super.calcDynaClass(data);
|
|
49520
|
+
if ((_a3 = this.model.rawItem) == null ? void 0 : _a3.dynaClass) {
|
|
49521
|
+
const dynaClass = calcDynaClass(this.model.rawItem.dynaClass, data);
|
|
49522
|
+
this.state.class.containerDyna = dynaClass;
|
|
49523
|
+
}
|
|
49524
|
+
}
|
|
49461
49525
|
};
|
|
49462
49526
|
|
|
49463
49527
|
// src/controller/control/form/form-detail/form-tab-page/form-tab-page.state.ts
|
|
@@ -49897,7 +49961,7 @@ import { clone as clone30, isNil as isNil21 } from "ramda";
|
|
|
49897
49961
|
// src/controller/control/form/edit-form/edit-form.service.ts
|
|
49898
49962
|
import {
|
|
49899
49963
|
recursiveIterate as recursiveIterate12,
|
|
49900
|
-
RuntimeModelError as
|
|
49964
|
+
RuntimeModelError as RuntimeModelError51
|
|
49901
49965
|
} from "@ibiz-template/core";
|
|
49902
49966
|
var EditFormService = class extends FormService {
|
|
49903
49967
|
/**
|
|
@@ -50024,7 +50088,7 @@ var EditFormService = class extends FormService {
|
|
|
50024
50088
|
const wizardForm = this.model;
|
|
50025
50089
|
const methodName = (_a3 = wizardForm.goBackControlAction) == null ? void 0 : _a3.appDEMethodId;
|
|
50026
50090
|
if (!methodName) {
|
|
50027
|
-
throw new
|
|
50091
|
+
throw new RuntimeModelError51(
|
|
50028
50092
|
this.model,
|
|
50029
50093
|
ibiz.i18n.t("runtime.controller.control.form.lackBehavior")
|
|
50030
50094
|
);
|
|
@@ -51277,15 +51341,15 @@ import {
|
|
|
51277
51341
|
awaitTimeout as awaitTimeout2,
|
|
51278
51342
|
RuntimeError as RuntimeError40,
|
|
51279
51343
|
recursiveIterate as recursiveIterate13,
|
|
51280
|
-
RuntimeModelError as
|
|
51344
|
+
RuntimeModelError as RuntimeModelError53,
|
|
51281
51345
|
mergeDefaultInLeft as mergeDefaultInLeft2,
|
|
51282
51346
|
debounceAndAsyncMerge as debounceAndAsyncMerge2
|
|
51283
51347
|
} from "@ibiz-template/core";
|
|
51284
51348
|
import { clone as clone32 } from "ramda";
|
|
51285
|
-
import
|
|
51349
|
+
import dayjs6 from "dayjs";
|
|
51286
51350
|
|
|
51287
51351
|
// src/controller/control/grid/grid/grid.service.ts
|
|
51288
|
-
import { RuntimeModelError as
|
|
51352
|
+
import { RuntimeModelError as RuntimeModelError52 } from "@ibiz-template/core";
|
|
51289
51353
|
var GridService = class extends MDControlService2 {
|
|
51290
51354
|
/**
|
|
51291
51355
|
* 初始化属性映射
|
|
@@ -51313,7 +51377,7 @@ var GridService = class extends MDControlService2 {
|
|
|
51313
51377
|
dataType: dataItem.dataType
|
|
51314
51378
|
});
|
|
51315
51379
|
} else {
|
|
51316
|
-
throw new
|
|
51380
|
+
throw new RuntimeModelError52(
|
|
51317
51381
|
column,
|
|
51318
51382
|
ibiz.i18n.t("runtime.controller.control.grid.corresponding", {
|
|
51319
51383
|
deField
|
|
@@ -51864,8 +51928,8 @@ var GridController = class extends MDControlController {
|
|
|
51864
51928
|
if (!valueFormat) {
|
|
51865
51929
|
return strVal;
|
|
51866
51930
|
}
|
|
51867
|
-
if (isDate &&
|
|
51868
|
-
const formatVal =
|
|
51931
|
+
if (isDate && dayjs6(strVal, valueFormat, true).isValid()) {
|
|
51932
|
+
const formatVal = dayjs6(strVal).format(valueFormat);
|
|
51869
51933
|
return formatVal;
|
|
51870
51934
|
}
|
|
51871
51935
|
return ibiz.util.text.format(strVal, valueFormat);
|
|
@@ -52243,7 +52307,7 @@ var GridController = class extends MDControlController {
|
|
|
52243
52307
|
(item) => item.model.appDEFieldId === groupAppDEFieldId
|
|
52244
52308
|
);
|
|
52245
52309
|
if (!this.groupFieldColumn) {
|
|
52246
|
-
throw new
|
|
52310
|
+
throw new RuntimeModelError53(
|
|
52247
52311
|
this.model,
|
|
52248
52312
|
ibiz.i18n.t("runtime.controller.control.grid.attributeColumns")
|
|
52249
52313
|
);
|
|
@@ -52254,7 +52318,7 @@ var GridController = class extends MDControlController {
|
|
|
52254
52318
|
);
|
|
52255
52319
|
if (index !== -1 && index !== 0) {
|
|
52256
52320
|
if (this.isMultistageHeader) {
|
|
52257
|
-
throw new
|
|
52321
|
+
throw new RuntimeModelError53(
|
|
52258
52322
|
this.model,
|
|
52259
52323
|
ibiz.i18n.t("runtime.controller.control.grid.configureFirstColumn", {
|
|
52260
52324
|
groupFieldName
|
|
@@ -52266,13 +52330,13 @@ var GridController = class extends MDControlController {
|
|
|
52266
52330
|
}
|
|
52267
52331
|
if (groupMode === "CODELIST") {
|
|
52268
52332
|
if (!groupCodeListId) {
|
|
52269
|
-
throw new
|
|
52333
|
+
throw new RuntimeModelError53(
|
|
52270
52334
|
this.model,
|
|
52271
52335
|
ibiz.i18n.t("runtime.controller.control.grid.requiresCodeTable")
|
|
52272
52336
|
);
|
|
52273
52337
|
}
|
|
52274
52338
|
if (this.groupFieldColumn.model.appCodeListId !== groupCodeListId) {
|
|
52275
|
-
throw new
|
|
52339
|
+
throw new RuntimeModelError53(
|
|
52276
52340
|
this.model,
|
|
52277
52341
|
ibiz.i18n.t("runtime.controller.control.grid.noMatchCodeTable", {
|
|
52278
52342
|
groupFieldName
|
|
@@ -52431,7 +52495,7 @@ var GridController = class extends MDControlController {
|
|
|
52431
52495
|
return;
|
|
52432
52496
|
}
|
|
52433
52497
|
if (!aggAppDEDataSetId || !aggAppDataEntityId) {
|
|
52434
|
-
throw new
|
|
52498
|
+
throw new RuntimeModelError53(
|
|
52435
52499
|
this.model,
|
|
52436
52500
|
ibiz.i18n.t("runtime.controller.control.grid.missingConfiguration")
|
|
52437
52501
|
);
|
|
@@ -53051,12 +53115,15 @@ var GridController = class extends MDControlController {
|
|
|
53051
53115
|
const { dedataExportId, degridColumns = [] } = this.model;
|
|
53052
53116
|
const excelModel = {
|
|
53053
53117
|
header: [],
|
|
53054
|
-
fields: []
|
|
53118
|
+
fields: [],
|
|
53119
|
+
exportColumns: [],
|
|
53120
|
+
colWidths: []
|
|
53055
53121
|
};
|
|
53056
53122
|
if (dedataExportId) {
|
|
53057
53123
|
if (this.allExportColumns.length) {
|
|
53058
53124
|
excelModel.fields = this.allExportColumns.map((x) => x.appDEFieldId);
|
|
53059
53125
|
excelModel.header = this.allExportColumns.map((x) => x.caption);
|
|
53126
|
+
excelModel.exportColumns = this.allExportColumns;
|
|
53060
53127
|
}
|
|
53061
53128
|
} else {
|
|
53062
53129
|
const exportColumns = this.state.columnStates.filter((column) => {
|
|
@@ -53072,6 +53139,12 @@ var GridController = class extends MDControlController {
|
|
|
53072
53139
|
});
|
|
53073
53140
|
excelModel.fields = exportColumns.map((item) => item.id);
|
|
53074
53141
|
excelModel.header = exportColumns.map((item) => item.caption);
|
|
53142
|
+
excelModel.colWidths = exportColumns.map((item) => {
|
|
53143
|
+
return {
|
|
53144
|
+
wpx: item.width || 150
|
|
53145
|
+
};
|
|
53146
|
+
});
|
|
53147
|
+
excelModel.exportColumns = exportColumns;
|
|
53075
53148
|
}
|
|
53076
53149
|
return excelModel;
|
|
53077
53150
|
}
|
|
@@ -53203,26 +53276,54 @@ var GridController = class extends MDControlController {
|
|
|
53203
53276
|
* @memberof GridController
|
|
53204
53277
|
*/
|
|
53205
53278
|
async exportData(args) {
|
|
53206
|
-
var _a3;
|
|
53279
|
+
var _a3, _b2, _c;
|
|
53207
53280
|
if ((_a3 = this.dataExport) == null ? void 0 : _a3.enableBackend) {
|
|
53208
53281
|
await this.excuteBackendExport(args.params);
|
|
53209
53282
|
return;
|
|
53210
53283
|
}
|
|
53211
|
-
|
|
53284
|
+
await this.fillExportCodelistMap();
|
|
53285
|
+
const data = await this.getExportData(args.params);
|
|
53286
|
+
const { header, fields, exportColumns, colWidths } = this.getDataExcelModel();
|
|
53212
53287
|
if (!header) {
|
|
53213
53288
|
throw new RuntimeError40(
|
|
53214
53289
|
ibiz.i18n.t("runtime.controller.control.grid.tabularColumns")
|
|
53215
53290
|
);
|
|
53216
53291
|
}
|
|
53217
|
-
await this.fillExportCodelistMap();
|
|
53218
|
-
const data = await this.getExportData(args.params);
|
|
53219
53292
|
const formatData = this.formatExcelData(data, fields);
|
|
53220
53293
|
const table = formatData.map((v) => Object.values(v));
|
|
53221
|
-
|
|
53294
|
+
let fileName = this.model.logicName;
|
|
53295
|
+
if ((_b2 = this.dataExport) == null ? void 0 : _b2.fileNameFormat) {
|
|
53296
|
+
fileName = await ibiz.util.hbs.render(this.dataExport.fileNameFormat, {
|
|
53297
|
+
context: this.context,
|
|
53298
|
+
params: this.params,
|
|
53299
|
+
data: this.view.state.srfactiveviewdata,
|
|
53300
|
+
now: /* @__PURE__ */ new Date()
|
|
53301
|
+
});
|
|
53302
|
+
}
|
|
53303
|
+
const frontExportParams = {
|
|
53222
53304
|
header,
|
|
53223
53305
|
data: table,
|
|
53224
|
-
fileName
|
|
53225
|
-
|
|
53306
|
+
fileName,
|
|
53307
|
+
colWidths: () => {
|
|
53308
|
+
return colWidths;
|
|
53309
|
+
}
|
|
53310
|
+
};
|
|
53311
|
+
const frontExportAttri = (_c = this.model.controlAttributes) == null ? void 0 : _c.find((item) => {
|
|
53312
|
+
return item.attrName === "before-front-export" /* BEFORE_FRONT_EXPORT */;
|
|
53313
|
+
});
|
|
53314
|
+
if (frontExportAttri) {
|
|
53315
|
+
const { attrValue } = frontExportAttri;
|
|
53316
|
+
if (attrValue) {
|
|
53317
|
+
const frontExportResult = await ScriptFactory.asyncExecScriptFn(
|
|
53318
|
+
{ exportColumns, data },
|
|
53319
|
+
attrValue
|
|
53320
|
+
);
|
|
53321
|
+
if (frontExportResult) {
|
|
53322
|
+
Object.assign(frontExportParams, frontExportResult);
|
|
53323
|
+
}
|
|
53324
|
+
}
|
|
53325
|
+
}
|
|
53326
|
+
await ibiz.platform.frontExport(frontExportParams);
|
|
53226
53327
|
}
|
|
53227
53328
|
/**
|
|
53228
53329
|
* 计算默认值并返回一个对象,对象里的属性就是要填充的默认值
|
|
@@ -53476,7 +53577,7 @@ var GridController = class extends MDControlController {
|
|
|
53476
53577
|
var _a3;
|
|
53477
53578
|
const moveAction = (_a3 = this.model.moveControlAction) == null ? void 0 : _a3.appDEMethodId;
|
|
53478
53579
|
if (!moveAction) {
|
|
53479
|
-
throw new
|
|
53580
|
+
throw new RuntimeModelError53(
|
|
53480
53581
|
this.model,
|
|
53481
53582
|
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
53482
53583
|
);
|
|
@@ -53588,7 +53689,7 @@ import {
|
|
|
53588
53689
|
ModelError as ModelError22,
|
|
53589
53690
|
base64ToStr
|
|
53590
53691
|
} from "@ibiz-template/core";
|
|
53591
|
-
import
|
|
53692
|
+
import dayjs7 from "dayjs";
|
|
53592
53693
|
import { debounce as debounce2 } from "lodash-es";
|
|
53593
53694
|
import { clone as clone33, isNil as isNil22 } from "ramda";
|
|
53594
53695
|
import { isNilOrEmpty as isNilOrEmpty7 } from "qx-util";
|
|
@@ -53996,7 +54097,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
53996
54097
|
}
|
|
53997
54098
|
const isDate = DataTypes4.isDate(this.dataType);
|
|
53998
54099
|
if (isDate) {
|
|
53999
|
-
const formatVal =
|
|
54100
|
+
const formatVal = dayjs7(strVal).format(this.valueFormat);
|
|
54000
54101
|
if (formatVal !== "Invalid Date") {
|
|
54001
54102
|
return formatVal;
|
|
54002
54103
|
}
|
|
@@ -54033,7 +54134,7 @@ var GridFieldColumnController = class extends GridColumnController {
|
|
|
54033
54134
|
};
|
|
54034
54135
|
|
|
54035
54136
|
// src/controller/control/grid/grid-column/grid-ua-column/grid-ua-column.controller.ts
|
|
54036
|
-
import { RuntimeModelError as
|
|
54137
|
+
import { RuntimeModelError as RuntimeModelError54 } from "@ibiz-template/core";
|
|
54037
54138
|
var GridUAColumnController = class extends GridColumnController {
|
|
54038
54139
|
/**
|
|
54039
54140
|
* 给rowController初始化操作列的状态
|
|
@@ -54046,7 +54147,7 @@ var GridUAColumnController = class extends GridColumnController {
|
|
|
54046
54147
|
var _a3;
|
|
54047
54148
|
const { deuiactionGroup } = this.model;
|
|
54048
54149
|
if (!deuiactionGroup) {
|
|
54049
|
-
throw new
|
|
54150
|
+
throw new RuntimeModelError54(
|
|
54050
54151
|
this.model,
|
|
54051
54152
|
ibiz.i18n.t("runtime.controller.control.grid.behaviorGroup")
|
|
54052
54153
|
);
|
|
@@ -54384,9 +54485,9 @@ import {
|
|
|
54384
54485
|
clone as clone35,
|
|
54385
54486
|
DataTypes as DataTypes5,
|
|
54386
54487
|
isElementSame as isElementSame4,
|
|
54387
|
-
RuntimeModelError as
|
|
54488
|
+
RuntimeModelError as RuntimeModelError55
|
|
54388
54489
|
} from "@ibiz-template/core";
|
|
54389
|
-
import
|
|
54490
|
+
import dayjs8 from "dayjs";
|
|
54390
54491
|
|
|
54391
54492
|
// src/controller/control/list/list.service.ts
|
|
54392
54493
|
import { clone as clone34 } from "@ibiz-template/core";
|
|
@@ -54811,9 +54912,9 @@ var ListController = class extends MDControlController {
|
|
|
54811
54912
|
let groupVal = item[textDEFieldId];
|
|
54812
54913
|
if (dateFormat)
|
|
54813
54914
|
groupVal = formatDateByScale(groupVal, dateFormat);
|
|
54814
|
-
if (this.model.groupStyle === "STYLE2" &&
|
|
54915
|
+
if (this.model.groupStyle === "STYLE2" && dayjs8(groupVal).isValid()) {
|
|
54815
54916
|
groupVal = formatDateByScale(groupVal, "day");
|
|
54816
|
-
if (
|
|
54917
|
+
if (dayjs8(groupVal).isSame(dayjs8(), "day"))
|
|
54817
54918
|
groupVal = ibiz.i18n.t("runtime.controller.common.md.today");
|
|
54818
54919
|
}
|
|
54819
54920
|
if (isNil23(groupVal)) {
|
|
@@ -55099,13 +55200,13 @@ var ListController = class extends MDControlController {
|
|
|
55099
55200
|
await this.updateChangedItems([draggedItem]);
|
|
55100
55201
|
} else {
|
|
55101
55202
|
if (!minorSortAppDEFieldId)
|
|
55102
|
-
throw new
|
|
55203
|
+
throw new RuntimeModelError55(
|
|
55103
55204
|
this.model,
|
|
55104
55205
|
ibiz.i18n.t("runtime.controller.common.md.sortingProperties")
|
|
55105
55206
|
);
|
|
55106
55207
|
const moveAction = moveControlAction == null ? void 0 : moveControlAction.appDEMethodId;
|
|
55107
55208
|
if (!moveAction)
|
|
55108
|
-
throw new
|
|
55209
|
+
throw new RuntimeModelError55(
|
|
55109
55210
|
this.model,
|
|
55110
55211
|
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
55111
55212
|
);
|
|
@@ -57826,7 +57927,7 @@ var TabExpPanelController = class extends ControlController {
|
|
|
57826
57927
|
import {
|
|
57827
57928
|
RuntimeError as RuntimeError43,
|
|
57828
57929
|
recursiveIterate as recursiveIterate15,
|
|
57829
|
-
RuntimeModelError as
|
|
57930
|
+
RuntimeModelError as RuntimeModelError56
|
|
57830
57931
|
} from "@ibiz-template/core";
|
|
57831
57932
|
import { isNil as isNil27 } from "ramda";
|
|
57832
57933
|
import { isBoolean as isBoolean4 } from "qx-util";
|
|
@@ -58715,8 +58816,8 @@ var TreeController = class extends MDControlController {
|
|
|
58715
58816
|
return this.getEventArgs();
|
|
58716
58817
|
};
|
|
58717
58818
|
if (this.viewScheduler.hasViewEventTrigger) {
|
|
58718
|
-
this.evt.onAll((_eventName, event) => {
|
|
58719
|
-
this.viewScheduler.triggerViewEvent(event);
|
|
58819
|
+
this.evt.onAll(async (_eventName, event) => {
|
|
58820
|
+
await this.viewScheduler.triggerViewEvent(event);
|
|
58720
58821
|
});
|
|
58721
58822
|
}
|
|
58722
58823
|
}
|
|
@@ -59425,7 +59526,7 @@ var TreeController = class extends MDControlController {
|
|
|
59425
59526
|
const { moveAppDEActionId, appDataEntityId, allowOrder } = orderNodeModel;
|
|
59426
59527
|
if (allowOrder) {
|
|
59427
59528
|
if (!moveAppDEActionId) {
|
|
59428
|
-
throw new
|
|
59529
|
+
throw new RuntimeModelError56(
|
|
59429
59530
|
this.model,
|
|
59430
59531
|
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
59431
59532
|
);
|
|
@@ -59507,7 +59608,7 @@ var TreeController = class extends MDControlController {
|
|
|
59507
59608
|
async modifyNodeText(nodeData, text) {
|
|
59508
59609
|
const model = this.getNodeModel(nodeData._nodeId);
|
|
59509
59610
|
if (!model.allowEditText) {
|
|
59510
|
-
throw new
|
|
59611
|
+
throw new RuntimeModelError56(
|
|
59511
59612
|
model,
|
|
59512
59613
|
ibiz.i18n.t("runtime.controller.control.tree.editMode")
|
|
59513
59614
|
);
|
|
@@ -59620,7 +59721,7 @@ var TreeController = class extends MDControlController {
|
|
|
59620
59721
|
const nodeModel = this.getNodeModel(nodeType);
|
|
59621
59722
|
const parentNodeData = this.getNodeData(parentKey);
|
|
59622
59723
|
if (!nodeModel) {
|
|
59623
|
-
throw new
|
|
59724
|
+
throw new RuntimeModelError56(
|
|
59624
59725
|
this.model,
|
|
59625
59726
|
ibiz.i18n.t("runtime.controller.control.tree.noFoundTreeNode")
|
|
59626
59727
|
);
|
|
@@ -59753,13 +59854,12 @@ var TreeController = class extends MDControlController {
|
|
|
59753
59854
|
ctrl: this
|
|
59754
59855
|
}
|
|
59755
59856
|
));
|
|
59756
|
-
if (result === -1)
|
|
59757
|
-
|
|
59758
|
-
|
|
59759
|
-
|
|
59760
|
-
|
|
59761
|
-
|
|
59762
|
-
);
|
|
59857
|
+
if (result === -1) {
|
|
59858
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicOpendata"));
|
|
59859
|
+
return {
|
|
59860
|
+
cancel: true
|
|
59861
|
+
};
|
|
59862
|
+
}
|
|
59763
59863
|
return {
|
|
59764
59864
|
cancel: result ? !result.ok : true
|
|
59765
59865
|
};
|
|
@@ -59792,13 +59892,12 @@ var TreeController = class extends MDControlController {
|
|
|
59792
59892
|
ctrl: this
|
|
59793
59893
|
}
|
|
59794
59894
|
));
|
|
59795
|
-
if (result === -1)
|
|
59796
|
-
|
|
59797
|
-
|
|
59798
|
-
|
|
59799
|
-
|
|
59800
|
-
|
|
59801
|
-
);
|
|
59895
|
+
if (result === -1) {
|
|
59896
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicNewdata"));
|
|
59897
|
+
return {
|
|
59898
|
+
cancel: true
|
|
59899
|
+
};
|
|
59900
|
+
}
|
|
59802
59901
|
return {
|
|
59803
59902
|
cancel: result ? !result.ok : true
|
|
59804
59903
|
};
|
|
@@ -60389,7 +60488,7 @@ var WizardPanelController = class extends ControlController {
|
|
|
60389
60488
|
};
|
|
60390
60489
|
|
|
60391
60490
|
// src/controller/control/md-ctrl/md-ctrl.controller.ts
|
|
60392
|
-
import { RuntimeError as RuntimeError45, RuntimeModelError as
|
|
60491
|
+
import { RuntimeError as RuntimeError45, RuntimeModelError as RuntimeModelError57 } from "@ibiz-template/core";
|
|
60393
60492
|
import { clone as clone38, isNil as isNil28, isNotNil as isNotNil8 } from "ramda";
|
|
60394
60493
|
import { createUUID as createUUID15 } from "qx-util";
|
|
60395
60494
|
|
|
@@ -60708,7 +60807,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
60708
60807
|
const { enableGroup, groupMode, groupAppDEFieldId } = this.model;
|
|
60709
60808
|
if (enableGroup && groupMode) {
|
|
60710
60809
|
if (!groupAppDEFieldId) {
|
|
60711
|
-
throw new
|
|
60810
|
+
throw new RuntimeModelError57(
|
|
60712
60811
|
this.model,
|
|
60713
60812
|
ibiz.i18n.t(
|
|
60714
60813
|
"runtime.controller.control.dataView.propertiesNoConfigured"
|
|
@@ -60800,7 +60899,7 @@ var MDCtrlController = class extends MDControlController {
|
|
|
60800
60899
|
async handleCodeListGroup() {
|
|
60801
60900
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
60802
60901
|
if (!groupCodeListId) {
|
|
60803
|
-
throw new
|
|
60902
|
+
throw new RuntimeModelError57(
|
|
60804
60903
|
this.model,
|
|
60805
60904
|
ibiz.i18n.t("runtime.controller.control.dataView.tableNoConfigured")
|
|
60806
60905
|
);
|
|
@@ -60949,19 +61048,21 @@ var MDCtrlController = class extends MDControlController {
|
|
|
60949
61048
|
}
|
|
60950
61049
|
/**
|
|
60951
61050
|
* @description 获取数据导出模型
|
|
60952
|
-
* @returns {*} {{ header: string[]
|
|
61051
|
+
* @returns {*} {{ header: string[], fields: string[], exportColumns: IData[] }}
|
|
60953
61052
|
* @memberof MDCtrlController
|
|
60954
61053
|
*/
|
|
60955
61054
|
getDataExcelModel() {
|
|
60956
61055
|
const { dedataExportId } = this.model;
|
|
60957
61056
|
const excelModel = {
|
|
60958
61057
|
header: [],
|
|
60959
|
-
fields: []
|
|
61058
|
+
fields: [],
|
|
61059
|
+
exportColumns: []
|
|
60960
61060
|
};
|
|
60961
61061
|
if (dedataExportId) {
|
|
60962
61062
|
if (this.allExportColumns.length) {
|
|
60963
61063
|
excelModel.fields = this.allExportColumns.map((x) => x.appDEFieldId);
|
|
60964
61064
|
excelModel.header = this.allExportColumns.map((x) => x.caption);
|
|
61065
|
+
excelModel.exportColumns = this.allExportColumns;
|
|
60965
61066
|
}
|
|
60966
61067
|
}
|
|
60967
61068
|
return excelModel;
|
|
@@ -61111,12 +61212,12 @@ var MDCtrlController = class extends MDControlController {
|
|
|
61111
61212
|
* @memberof MDCtrlController
|
|
61112
61213
|
*/
|
|
61113
61214
|
async exportData(args = {}) {
|
|
61114
|
-
var _a3;
|
|
61215
|
+
var _a3, _b2;
|
|
61115
61216
|
if ((_a3 = this.dataExport) == null ? void 0 : _a3.enableBackend) {
|
|
61116
61217
|
await this.excuteBackendExport(args.params || {});
|
|
61117
61218
|
return;
|
|
61118
61219
|
}
|
|
61119
|
-
const { header, fields } = this.getDataExcelModel();
|
|
61220
|
+
const { header, fields, exportColumns } = this.getDataExcelModel();
|
|
61120
61221
|
if (!header) {
|
|
61121
61222
|
throw new RuntimeError45(
|
|
61122
61223
|
ibiz.i18n.t("runtime.controller.common.md.tabularColumns")
|
|
@@ -61125,11 +61226,30 @@ var MDCtrlController = class extends MDControlController {
|
|
|
61125
61226
|
const data = await this.getExportData(args.params || {});
|
|
61126
61227
|
const formatData = this.formatExcelData(data, fields);
|
|
61127
61228
|
const table = formatData.map((v) => Object.values(v));
|
|
61128
|
-
|
|
61229
|
+
const frontExportParams = {
|
|
61129
61230
|
header,
|
|
61130
61231
|
data: table,
|
|
61131
|
-
fileName: this.model.logicName
|
|
61132
|
-
|
|
61232
|
+
fileName: this.model.logicName,
|
|
61233
|
+
colWidths: () => {
|
|
61234
|
+
return [];
|
|
61235
|
+
}
|
|
61236
|
+
};
|
|
61237
|
+
const frontExportAttri = (_b2 = this.model.controlAttributes) == null ? void 0 : _b2.find((item) => {
|
|
61238
|
+
return item.attrName === "before-front-export" /* BEFORE_FRONT_EXPORT */;
|
|
61239
|
+
});
|
|
61240
|
+
if (frontExportAttri) {
|
|
61241
|
+
const { attrValue } = frontExportAttri;
|
|
61242
|
+
if (attrValue) {
|
|
61243
|
+
const frontExportResult = await ScriptFactory.asyncExecScriptFn(
|
|
61244
|
+
{ exportColumns, data },
|
|
61245
|
+
attrValue
|
|
61246
|
+
);
|
|
61247
|
+
if (frontExportResult) {
|
|
61248
|
+
Object.assign(frontExportParams, frontExportResult);
|
|
61249
|
+
}
|
|
61250
|
+
}
|
|
61251
|
+
}
|
|
61252
|
+
await ibiz.platform.frontExport(frontExportParams);
|
|
61133
61253
|
}
|
|
61134
61254
|
};
|
|
61135
61255
|
|
|
@@ -61138,7 +61258,7 @@ import {
|
|
|
61138
61258
|
clone as clone39,
|
|
61139
61259
|
RuntimeError as RuntimeError46,
|
|
61140
61260
|
isElementSame as isElementSame5,
|
|
61141
|
-
RuntimeModelError as
|
|
61261
|
+
RuntimeModelError as RuntimeModelError58
|
|
61142
61262
|
} from "@ibiz-template/core";
|
|
61143
61263
|
|
|
61144
61264
|
// src/controller/control/kanban/kanban.service.ts
|
|
@@ -61428,7 +61548,7 @@ var KanbanController = class extends DataViewControlController {
|
|
|
61428
61548
|
async handleCodeListGroup() {
|
|
61429
61549
|
const { groupAppDEFieldId, groupCodeListId } = this.model;
|
|
61430
61550
|
if (!groupCodeListId) {
|
|
61431
|
-
throw new
|
|
61551
|
+
throw new RuntimeModelError58(
|
|
61432
61552
|
this.model,
|
|
61433
61553
|
ibiz.i18n.t("runtime.controller.control.dataView.tableNoConfigured")
|
|
61434
61554
|
);
|
|
@@ -61492,13 +61612,13 @@ var KanbanController = class extends DataViewControlController {
|
|
|
61492
61612
|
await this.updateChangedItems([draggedItem]);
|
|
61493
61613
|
} else {
|
|
61494
61614
|
if (!minorSortAppDEFieldId)
|
|
61495
|
-
throw new
|
|
61615
|
+
throw new RuntimeModelError58(
|
|
61496
61616
|
this.model,
|
|
61497
61617
|
ibiz.i18n.t("runtime.controller.common.md.sortingProperties")
|
|
61498
61618
|
);
|
|
61499
61619
|
const moveAction = moveControlAction == null ? void 0 : moveControlAction.appDEMethodId;
|
|
61500
61620
|
if (!moveAction)
|
|
61501
|
-
throw new
|
|
61621
|
+
throw new RuntimeModelError58(
|
|
61502
61622
|
this.model,
|
|
61503
61623
|
ibiz.i18n.t("runtime.controller.common.md.noMoveDataCconfig")
|
|
61504
61624
|
);
|
|
@@ -61699,7 +61819,7 @@ import {
|
|
|
61699
61819
|
RuntimeError as RuntimeError47,
|
|
61700
61820
|
awaitTimeout as awaitTimeout3,
|
|
61701
61821
|
recursiveIterate as recursiveIterate16,
|
|
61702
|
-
RuntimeModelError as
|
|
61822
|
+
RuntimeModelError as RuntimeModelError59
|
|
61703
61823
|
} from "@ibiz-template/core";
|
|
61704
61824
|
import { clone as clone40 } from "ramda";
|
|
61705
61825
|
|
|
@@ -62128,7 +62248,7 @@ var TreeGridExController = class extends TreeController {
|
|
|
62128
62248
|
);
|
|
62129
62249
|
}
|
|
62130
62250
|
if (!updateAppDEActionId) {
|
|
62131
|
-
throw new
|
|
62251
|
+
throw new RuntimeModelError59(
|
|
62132
62252
|
nodeModel,
|
|
62133
62253
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.updateBehavior")
|
|
62134
62254
|
);
|
|
@@ -62456,10 +62576,10 @@ var TreeGridExColumnController = class {
|
|
|
62456
62576
|
import {
|
|
62457
62577
|
DataTypes as DataTypes7,
|
|
62458
62578
|
RuntimeError as RuntimeError48,
|
|
62459
|
-
RuntimeModelError as
|
|
62579
|
+
RuntimeModelError as RuntimeModelError60
|
|
62460
62580
|
} from "@ibiz-template/core";
|
|
62461
62581
|
import { clone as clone41 } from "ramda";
|
|
62462
|
-
import
|
|
62582
|
+
import dayjs9 from "dayjs";
|
|
62463
62583
|
var TreeGridExNodeColumnController = class {
|
|
62464
62584
|
/**
|
|
62465
62585
|
* @author lxm
|
|
@@ -62487,7 +62607,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
62487
62607
|
}
|
|
62488
62608
|
);
|
|
62489
62609
|
if (!nodeColumn || !nodeDataItem) {
|
|
62490
|
-
throw new
|
|
62610
|
+
throw new RuntimeModelError60(
|
|
62491
62611
|
nodeModel,
|
|
62492
62612
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.noConfigured", {
|
|
62493
62613
|
name: this.fieldColumn.name
|
|
@@ -62503,7 +62623,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
62503
62623
|
}
|
|
62504
62624
|
);
|
|
62505
62625
|
if (!nodeEditItem) {
|
|
62506
|
-
throw new
|
|
62626
|
+
throw new RuntimeModelError60(
|
|
62507
62627
|
nodeModel,
|
|
62508
62628
|
ibiz.i18n.t("runtime.controller.control.treeGridEx.editItem", {
|
|
62509
62629
|
name: this.fieldColumn.name
|
|
@@ -62759,7 +62879,7 @@ var TreeGridExNodeColumnController = class {
|
|
|
62759
62879
|
}
|
|
62760
62880
|
const isDate = DataTypes7.isDate(this.dataType);
|
|
62761
62881
|
if (isDate || this.fieldColumn.name === "createdate") {
|
|
62762
|
-
const formatVal =
|
|
62882
|
+
const formatVal = dayjs9(strVal).format(this.valueFormat);
|
|
62763
62883
|
if (formatVal !== "Invalid Date") {
|
|
62764
62884
|
return formatVal;
|
|
62765
62885
|
}
|
|
@@ -63012,7 +63132,7 @@ var TreeGridExUAColumnController = class extends TreeGridExColumnController {
|
|
|
63012
63132
|
};
|
|
63013
63133
|
|
|
63014
63134
|
// src/controller/control/tree-grid/tree-grid.controller.ts
|
|
63015
|
-
import { RuntimeModelError as
|
|
63135
|
+
import { RuntimeModelError as RuntimeModelError61 } from "@ibiz-template/core";
|
|
63016
63136
|
import { createUUID as createUUID16 } from "qx-util";
|
|
63017
63137
|
var TreeGridController = class extends GridController {
|
|
63018
63138
|
constructor() {
|
|
@@ -63057,7 +63177,7 @@ var TreeGridController = class extends GridController {
|
|
|
63057
63177
|
return item.treeColumnMode === 4 || item.treeColumnMode === 12;
|
|
63058
63178
|
});
|
|
63059
63179
|
if (!treeGridParent)
|
|
63060
|
-
throw new
|
|
63180
|
+
throw new RuntimeModelError61(
|
|
63061
63181
|
this.model,
|
|
63062
63182
|
ibiz.i18n.t("runtime.controller.control.treeGrid.columnMode")
|
|
63063
63183
|
);
|
|
@@ -63065,7 +63185,7 @@ var TreeGridController = class extends GridController {
|
|
|
63065
63185
|
return item.treeColumnMode === 2 || item.treeColumnMode === 3;
|
|
63066
63186
|
});
|
|
63067
63187
|
if (!treeGridValue)
|
|
63068
|
-
throw new
|
|
63188
|
+
throw new RuntimeModelError61(
|
|
63069
63189
|
this.model,
|
|
63070
63190
|
ibiz.i18n.t("runtime.controller.control.treeGrid.columnsSchema")
|
|
63071
63191
|
);
|
|
@@ -64635,18 +64755,18 @@ var GridConverterBase = class extends ConverterBase {
|
|
|
64635
64755
|
grid_function_setting
|
|
64636
64756
|
} = this.reportUIModel;
|
|
64637
64757
|
result.vars = {
|
|
64638
|
-
"--ibiz-control-grid-header-align": grid_header_position,
|
|
64639
|
-
"--ibiz-control-grid-header-font-size": "".concat(grid_header_fontsize, "px"),
|
|
64640
|
-
"--ibiz-control-grid-header-text-color": grid_header_fontcolor,
|
|
64641
|
-
"--ibiz-control-grid-
|
|
64642
|
-
"--ibiz-control-grid-
|
|
64758
|
+
"--ibiz-control-grid-header-cell-align": grid_header_position,
|
|
64759
|
+
"--ibiz-control-grid-header-cell-font-size": "".concat(grid_header_fontsize, "px"),
|
|
64760
|
+
"--ibiz-control-grid-header-cell-text-color": grid_header_fontcolor,
|
|
64761
|
+
"--ibiz-control-grid-body-cell-font-size": "".concat(grid_body_fontsize, "px"),
|
|
64762
|
+
"--ibiz-control-grid-body-cell-text-color": grid_body_fontcolor
|
|
64643
64763
|
};
|
|
64644
64764
|
if (grid_header_fontstyle) {
|
|
64645
|
-
const key = grid_header_fontstyle === "bold" ? "--ibiz-control-grid-header-font-weight" : "--ibiz-control-grid-header-font-style";
|
|
64765
|
+
const key = grid_header_fontstyle === "bold" ? "--ibiz-control-grid-header-cell-font-weight" : "--ibiz-control-grid-header-cell-font-style";
|
|
64646
64766
|
result.vars[key] = grid_header_fontstyle;
|
|
64647
64767
|
}
|
|
64648
64768
|
if (grid_body_fontstyle) {
|
|
64649
|
-
const key = grid_body_fontstyle === "bold" ? "--ibiz-control-grid-
|
|
64769
|
+
const key = grid_body_fontstyle === "bold" ? "--ibiz-control-grid-body-cell-font-weight" : "--ibiz-control-grid-body-cell-font-style";
|
|
64650
64770
|
result.vars[key] = grid_body_fontstyle;
|
|
64651
64771
|
}
|
|
64652
64772
|
if (grid_show_agg == "1") {
|
|
@@ -68124,8 +68244,7 @@ var PlatformProviderBase = class {
|
|
|
68124
68244
|
* @memberof PlatformProviderBase
|
|
68125
68245
|
*/
|
|
68126
68246
|
async frontExport(args) {
|
|
68127
|
-
|
|
68128
|
-
await exportData(header, data, fileName);
|
|
68247
|
+
await exportData(args);
|
|
68129
68248
|
return true;
|
|
68130
68249
|
}
|
|
68131
68250
|
/**
|
|
@@ -68673,7 +68792,7 @@ var AppCounter8 = class {
|
|
|
68673
68792
|
};
|
|
68674
68793
|
|
|
68675
68794
|
// src/service/utils/app-counter/app-de-counter.ts
|
|
68676
|
-
import { RuntimeModelError as
|
|
68795
|
+
import { RuntimeModelError as RuntimeModelError62 } from "@ibiz-template/core";
|
|
68677
68796
|
var AppDECounter = class extends AppCounter8 {
|
|
68678
68797
|
/**
|
|
68679
68798
|
* 计数器初始化
|
|
@@ -68687,7 +68806,7 @@ var AppDECounter = class extends AppCounter8 {
|
|
|
68687
68806
|
this.appDataEntityId = this.model.appDataEntityId;
|
|
68688
68807
|
const action = this.model.getAppDEActionId;
|
|
68689
68808
|
if (!action) {
|
|
68690
|
-
throw new
|
|
68809
|
+
throw new RuntimeModelError62(
|
|
68691
68810
|
this.model,
|
|
68692
68811
|
ibiz.i18n.t("runtime.service.noFoundCounterBehavior")
|
|
68693
68812
|
);
|
|
@@ -68834,7 +68953,7 @@ DEDQCondUtil.map = /* @__PURE__ */ new WeakMap();
|
|
|
68834
68953
|
import {
|
|
68835
68954
|
IBizContext as IBizContext8,
|
|
68836
68955
|
ModelError as ModelError26,
|
|
68837
|
-
RuntimeModelError as
|
|
68956
|
+
RuntimeModelError as RuntimeModelError63,
|
|
68838
68957
|
StringUtil as StringUtil5
|
|
68839
68958
|
} from "@ibiz-template/core";
|
|
68840
68959
|
import { clone as clone48, isNil as isNil29 } from "ramda";
|
|
@@ -69235,13 +69354,13 @@ var DynamicCodeListCache = class {
|
|
|
69235
69354
|
return Object.freeze(presetresultItems);
|
|
69236
69355
|
}
|
|
69237
69356
|
if (!appDataEntityId) {
|
|
69238
|
-
throw new
|
|
69357
|
+
throw new RuntimeModelError63(
|
|
69239
69358
|
this.codeList,
|
|
69240
69359
|
ibiz.i18n.t("runtime.controller.utils.viewMsg.unconfiguredEntities")
|
|
69241
69360
|
);
|
|
69242
69361
|
}
|
|
69243
69362
|
if (!appDEDataSetId) {
|
|
69244
|
-
throw new
|
|
69363
|
+
throw new RuntimeModelError63(
|
|
69245
69364
|
this.codeList,
|
|
69246
69365
|
ibiz.i18n.t("runtime.service.unconfiguredDataset")
|
|
69247
69366
|
);
|
|
@@ -70563,7 +70682,7 @@ var ConfigService = class {
|
|
|
70563
70682
|
};
|
|
70564
70683
|
|
|
70565
70684
|
// src/service/service/counter/counter.service.ts
|
|
70566
|
-
import { RuntimeModelError as
|
|
70685
|
+
import { RuntimeModelError as RuntimeModelError64 } from "@ibiz-template/core";
|
|
70567
70686
|
var CounterService = class {
|
|
70568
70687
|
/**
|
|
70569
70688
|
* 获取计数器
|
|
@@ -70608,7 +70727,7 @@ var CounterService = class {
|
|
|
70608
70727
|
static async getCounterByRef(model, context, params) {
|
|
70609
70728
|
const { appCounter } = model;
|
|
70610
70729
|
if (!appCounter) {
|
|
70611
|
-
throw new
|
|
70730
|
+
throw new RuntimeModelError64(
|
|
70612
70731
|
model,
|
|
70613
70732
|
ibiz.i18n.t("runtime.service.noConfiguredCounters")
|
|
70614
70733
|
);
|
|
@@ -70633,7 +70752,7 @@ import {
|
|
|
70633
70752
|
IBizContext as IBizContext9,
|
|
70634
70753
|
ModelError as ModelError28,
|
|
70635
70754
|
RuntimeError as RuntimeError60,
|
|
70636
|
-
RuntimeModelError as
|
|
70755
|
+
RuntimeModelError as RuntimeModelError66
|
|
70637
70756
|
} from "@ibiz-template/core";
|
|
70638
70757
|
import { createUUID as createUUID20 } from "qx-util";
|
|
70639
70758
|
import { isNil as isNil34, isUndefined } from "lodash-es";
|
|
@@ -71255,7 +71374,7 @@ var AppDataEntity = class _AppDataEntity {
|
|
|
71255
71374
|
};
|
|
71256
71375
|
|
|
71257
71376
|
// src/service/dto/method.dto.ts
|
|
71258
|
-
import { ModelError as ModelError27, RuntimeModelError as
|
|
71377
|
+
import { ModelError as ModelError27, RuntimeModelError as RuntimeModelError65 } from "@ibiz-template/core";
|
|
71259
71378
|
import { clone as clone51 } from "ramda";
|
|
71260
71379
|
var MethodDto = class {
|
|
71261
71380
|
/**
|
|
@@ -71361,7 +71480,7 @@ var MethodDto = class {
|
|
|
71361
71480
|
context
|
|
71362
71481
|
);
|
|
71363
71482
|
} else {
|
|
71364
|
-
throw new
|
|
71483
|
+
throw new RuntimeModelError65(
|
|
71365
71484
|
field,
|
|
71366
71485
|
ibiz.i18n.t("runtime.service.subRelationships")
|
|
71367
71486
|
);
|
|
@@ -71626,7 +71745,7 @@ var DEService = class {
|
|
|
71626
71745
|
}
|
|
71627
71746
|
const model = findAppDEMethod(this.model, id);
|
|
71628
71747
|
if (!model) {
|
|
71629
|
-
throw new
|
|
71748
|
+
throw new RuntimeModelError66(
|
|
71630
71749
|
this.model,
|
|
71631
71750
|
ibiz.i18n.t("runtime.service.noFoundServiceMethod", { id })
|
|
71632
71751
|
);
|
|
@@ -72625,14 +72744,14 @@ import {
|
|
|
72625
72744
|
HttpError as HttpError8,
|
|
72626
72745
|
HttpResponse as HttpResponse5,
|
|
72627
72746
|
RuntimeError as RuntimeError62,
|
|
72628
|
-
RuntimeModelError as
|
|
72747
|
+
RuntimeModelError as RuntimeModelError68
|
|
72629
72748
|
} from "@ibiz-template/core";
|
|
72630
72749
|
import { isArray as isArray10, isNil as isNil36, isUndefined as isUndefined2 } from "lodash-es";
|
|
72631
72750
|
import { ascSort } from "qx-util";
|
|
72632
72751
|
import { clone as clone52 } from "ramda";
|
|
72633
72752
|
|
|
72634
72753
|
// src/service/service/entity/method/method.ts
|
|
72635
|
-
import { HttpResponse as HttpResponse4, RuntimeModelError as
|
|
72754
|
+
import { HttpResponse as HttpResponse4, RuntimeModelError as RuntimeModelError67 } from "@ibiz-template/core";
|
|
72636
72755
|
|
|
72637
72756
|
// src/service/service/entity/method/method-input.ts
|
|
72638
72757
|
var MethodInput = class {
|
|
@@ -72851,12 +72970,12 @@ var Method = class {
|
|
|
72851
72970
|
break;
|
|
72852
72971
|
default:
|
|
72853
72972
|
if (requestMethod) {
|
|
72854
|
-
throw new
|
|
72973
|
+
throw new RuntimeModelError67(
|
|
72855
72974
|
this.method,
|
|
72856
72975
|
ibiz.i18n.t("runtime.service.requestMethods", { requestMethod })
|
|
72857
72976
|
);
|
|
72858
72977
|
} else {
|
|
72859
|
-
throw new
|
|
72978
|
+
throw new RuntimeModelError67(
|
|
72860
72979
|
this.method,
|
|
72861
72980
|
ibiz.i18n.t("runtime.service.noConfiguredRequestMethod")
|
|
72862
72981
|
);
|
|
@@ -72867,7 +72986,7 @@ var Method = class {
|
|
|
72867
72986
|
if (actionType === "SCRIPT") {
|
|
72868
72987
|
return new HttpResponse4(data);
|
|
72869
72988
|
}
|
|
72870
|
-
throw new
|
|
72989
|
+
throw new RuntimeModelError67(
|
|
72871
72990
|
this.method,
|
|
72872
72991
|
ibiz.i18n.t("runtime.service.unsupportedBehaviorTypes", { actionType })
|
|
72873
72992
|
);
|
|
@@ -72983,7 +73102,7 @@ var DEActionMethod = class extends Method {
|
|
|
72983
73102
|
if (this.method.actionType === "DELOGIC") {
|
|
72984
73103
|
const deLogic = findDELogic(this.method.appDELogicId, this.entity);
|
|
72985
73104
|
if (!deLogic) {
|
|
72986
|
-
throw new
|
|
73105
|
+
throw new RuntimeModelError68(
|
|
72987
73106
|
this.method,
|
|
72988
73107
|
ibiz.i18n.t("runtime.service.lackEntityLogic")
|
|
72989
73108
|
);
|
|
@@ -73373,7 +73492,7 @@ var DEActionMethod = class extends Method {
|
|
|
73373
73492
|
configs = ascSort(configs, "removeOrder");
|
|
73374
73493
|
for (const config of configs) {
|
|
73375
73494
|
if (config.rstype !== "DER1N") {
|
|
73376
|
-
throw new
|
|
73495
|
+
throw new RuntimeModelError68(
|
|
73377
73496
|
config,
|
|
73378
73497
|
ibiz.i18n.t("runtime.service.deletionDeletion")
|
|
73379
73498
|
);
|
|
@@ -73652,7 +73771,7 @@ import {
|
|
|
73652
73771
|
HttpResponse as HttpResponse6,
|
|
73653
73772
|
ModelError as ModelError29,
|
|
73654
73773
|
RuntimeError as RuntimeError63,
|
|
73655
|
-
RuntimeModelError as
|
|
73774
|
+
RuntimeModelError as RuntimeModelError69
|
|
73656
73775
|
} from "@ibiz-template/core";
|
|
73657
73776
|
import { isArray as isArray11 } from "lodash-es";
|
|
73658
73777
|
import { clone as clone53, isEmpty as isEmpty9, isNil as isNil37 } from "ramda";
|
|
@@ -73696,7 +73815,7 @@ var FetchMethod = class extends Method {
|
|
|
73696
73815
|
break;
|
|
73697
73816
|
case "SCRIPT":
|
|
73698
73817
|
if (!this.method.scriptCode) {
|
|
73699
|
-
throw new
|
|
73818
|
+
throw new RuntimeModelError69(
|
|
73700
73819
|
this.method,
|
|
73701
73820
|
ibiz.i18n.t("runtime.service.scriptCodeNotConfig")
|
|
73702
73821
|
);
|
|
@@ -73881,7 +74000,7 @@ var FetchMethod = class extends Method {
|
|
|
73881
74000
|
async fetchCodeListSet(context, params) {
|
|
73882
74001
|
const { appCodeListId } = this.method;
|
|
73883
74002
|
if (!appCodeListId) {
|
|
73884
|
-
throw new
|
|
74003
|
+
throw new RuntimeModelError69(
|
|
73885
74004
|
this.method,
|
|
73886
74005
|
ibiz.i18n.t("runtime.service.sourceCodeTable")
|
|
73887
74006
|
);
|
|
@@ -73908,7 +74027,7 @@ var FetchMethod = class extends Method {
|
|
|
73908
74027
|
async fetchCodeListSetWithMeta(context, params) {
|
|
73909
74028
|
const { appCodeListId } = this.method;
|
|
73910
74029
|
if (!appCodeListId) {
|
|
73911
|
-
throw new
|
|
74030
|
+
throw new RuntimeModelError69(
|
|
73912
74031
|
this.method,
|
|
73913
74032
|
ibiz.i18n.t("runtime.service.sourceCodeTable")
|
|
73914
74033
|
);
|
|
@@ -84485,29 +84604,29 @@ function paramsToSearchconds(_params) {
|
|
|
84485
84604
|
}
|
|
84486
84605
|
|
|
84487
84606
|
// src/utils/date-util/index.ts
|
|
84488
|
-
import
|
|
84607
|
+
import dayjs10 from "dayjs";
|
|
84489
84608
|
function formatDateByScale(val, timeScale) {
|
|
84490
84609
|
let value = val;
|
|
84491
84610
|
const date = new Date(val);
|
|
84492
84611
|
if (!val || isNaN(date.getTime()))
|
|
84493
84612
|
return value;
|
|
84494
|
-
const year =
|
|
84613
|
+
const year = dayjs10(date).year();
|
|
84495
84614
|
const type = timeScale === "yearweek" ? "week" : timeScale;
|
|
84496
84615
|
switch (type) {
|
|
84497
84616
|
case "year":
|
|
84498
84617
|
value = "".concat(year);
|
|
84499
84618
|
break;
|
|
84500
84619
|
case "quarter":
|
|
84501
|
-
value = "".concat(year, " ").concat(
|
|
84620
|
+
value = "".concat(year, " ").concat(dayjs10(date).quarter()).concat(ibiz.i18n.t("runtime.controller.utils.util.quarter"));
|
|
84502
84621
|
break;
|
|
84503
84622
|
case "month":
|
|
84504
|
-
value = "".concat(year, " ").concat(
|
|
84623
|
+
value = "".concat(year, " ").concat(dayjs10(date).month() + 1).concat(ibiz.i18n.t("runtime.controller.utils.util.month"));
|
|
84505
84624
|
break;
|
|
84506
84625
|
case "week":
|
|
84507
|
-
value = "".concat(year, " ").concat(
|
|
84626
|
+
value = "".concat(year, " ").concat(dayjs10(date).week()).concat(ibiz.i18n.t("runtime.controller.utils.util.week"));
|
|
84508
84627
|
break;
|
|
84509
84628
|
case "day":
|
|
84510
|
-
value =
|
|
84629
|
+
value = dayjs10(date).format("YYYY-MM-DD");
|
|
84511
84630
|
break;
|
|
84512
84631
|
default:
|
|
84513
84632
|
break;
|
|
@@ -84515,7 +84634,7 @@ function formatDateByScale(val, timeScale) {
|
|
|
84515
84634
|
return value;
|
|
84516
84635
|
}
|
|
84517
84636
|
function getWeeksInYear(year) {
|
|
84518
|
-
const lastDayOfYear =
|
|
84637
|
+
const lastDayOfYear = dayjs10("".concat(year, "-12-31"));
|
|
84519
84638
|
const week = lastDayOfYear.isoWeek();
|
|
84520
84639
|
return week === 1 ? 52 : week;
|
|
84521
84640
|
}
|
|
@@ -84552,7 +84671,7 @@ function generateYearWeekRange(minYearWeek, maxYearWeek, paddingWeeks = 0) {
|
|
|
84552
84671
|
function calcDateRangeByScale(val, timeScale) {
|
|
84553
84672
|
if (!val || isNaN(new Date(val).getTime()))
|
|
84554
84673
|
return;
|
|
84555
|
-
let date =
|
|
84674
|
+
let date = dayjs10(val);
|
|
84556
84675
|
const type = timeScale === "yearweek" ? "week" : timeScale;
|
|
84557
84676
|
switch (type) {
|
|
84558
84677
|
case "year":
|
|
@@ -84580,8 +84699,8 @@ function calcDateRangeByScale(val, timeScale) {
|
|
|
84580
84699
|
}
|
|
84581
84700
|
function compareDateEqualByScale(dateStr1, dateStr2, timeScale) {
|
|
84582
84701
|
let result = false;
|
|
84583
|
-
const date1 =
|
|
84584
|
-
const date2 =
|
|
84702
|
+
const date1 = dayjs10(dateStr1);
|
|
84703
|
+
const date2 = dayjs10(dateStr2);
|
|
84585
84704
|
if (!dateStr1 || !dateStr2 || !date1.isValid() || !date2.isValid())
|
|
84586
84705
|
return result;
|
|
84587
84706
|
switch (timeScale) {
|
|
@@ -86547,7 +86666,7 @@ import { QXEvent as QXEvent14 } from "qx-util";
|
|
|
86547
86666
|
import { QXEvent as QXEvent12 } from "qx-util";
|
|
86548
86667
|
import { clone as clone60 } from "ramda";
|
|
86549
86668
|
import { isNil as isNil40, isNumber as isNumber5 } from "lodash-es";
|
|
86550
|
-
import
|
|
86669
|
+
import dayjs11 from "dayjs";
|
|
86551
86670
|
var AsyncActionController = class {
|
|
86552
86671
|
constructor() {
|
|
86553
86672
|
this.evt = new QXEvent12();
|
|
@@ -86621,7 +86740,7 @@ var AsyncActionController = class {
|
|
|
86621
86740
|
];
|
|
86622
86741
|
dateFields.forEach((key) => {
|
|
86623
86742
|
if (isNumber5(data[key])) {
|
|
86624
|
-
data[key] =
|
|
86743
|
+
data[key] = dayjs11(data[key]).format("YYYY-MM-DD HH:mm:ss");
|
|
86625
86744
|
}
|
|
86626
86745
|
});
|
|
86627
86746
|
if (!isNil40(data.actionresult)) {
|
|
@@ -88515,7 +88634,7 @@ var ViewEngineBase = class {
|
|
|
88515
88634
|
};
|
|
88516
88635
|
|
|
88517
88636
|
// src/engine/md-view.engine.ts
|
|
88518
|
-
import { RuntimeModelError as
|
|
88637
|
+
import { RuntimeModelError as RuntimeModelError70 } from "@ibiz-template/core";
|
|
88519
88638
|
import { clone as clone61 } from "ramda";
|
|
88520
88639
|
var MDViewEngine = class extends ViewEngineBase {
|
|
88521
88640
|
/**
|
|
@@ -88767,21 +88886,20 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
88767
88886
|
view: this.view
|
|
88768
88887
|
}));
|
|
88769
88888
|
if (result === -1) {
|
|
88770
|
-
|
|
88771
|
-
this.view.model,
|
|
88772
|
-
ibiz.i18n.t("runtime.engine.logicOpendata")
|
|
88773
|
-
);
|
|
88774
|
-
} else {
|
|
88775
|
-
if (result && result.ok && result.data && result.data.length > 0) {
|
|
88776
|
-
this.view.evt.emit("onDataChange", {
|
|
88777
|
-
data: result.data,
|
|
88778
|
-
actionType: "EDIT"
|
|
88779
|
-
});
|
|
88780
|
-
}
|
|
88889
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicOpendata"));
|
|
88781
88890
|
return {
|
|
88782
|
-
cancel:
|
|
88891
|
+
cancel: true
|
|
88783
88892
|
};
|
|
88784
88893
|
}
|
|
88894
|
+
if (result && result.ok && result.data && result.data.length > 0) {
|
|
88895
|
+
this.view.evt.emit("onDataChange", {
|
|
88896
|
+
data: result.data,
|
|
88897
|
+
actionType: "EDIT"
|
|
88898
|
+
});
|
|
88899
|
+
}
|
|
88900
|
+
return {
|
|
88901
|
+
cancel: result ? !result.ok : true
|
|
88902
|
+
};
|
|
88785
88903
|
}
|
|
88786
88904
|
/**
|
|
88787
88905
|
* 打开新建数据视图
|
|
@@ -88799,7 +88917,7 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
88799
88917
|
(item) => item.id === "newdata"
|
|
88800
88918
|
);
|
|
88801
88919
|
if (!openAppViewLogic) {
|
|
88802
|
-
throw new
|
|
88920
|
+
throw new RuntimeModelError70(
|
|
88803
88921
|
this.view.model,
|
|
88804
88922
|
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
88805
88923
|
);
|
|
@@ -88819,21 +88937,20 @@ var MDViewEngine = class extends ViewEngineBase {
|
|
|
88819
88937
|
view: this.view
|
|
88820
88938
|
}));
|
|
88821
88939
|
if (result === -1) {
|
|
88822
|
-
|
|
88823
|
-
this.view.model,
|
|
88824
|
-
ibiz.i18n.t("runtime.engine.logicNewdata")
|
|
88825
|
-
);
|
|
88826
|
-
} else {
|
|
88827
|
-
if (result.ok && result.data && result.data.length > 0) {
|
|
88828
|
-
this.view.evt.emit("onDataChange", {
|
|
88829
|
-
data: result.data,
|
|
88830
|
-
actionType: "NEW"
|
|
88831
|
-
});
|
|
88832
|
-
}
|
|
88940
|
+
ibiz.log.error(ibiz.i18n.t("runtime.engine.logicNewdata"));
|
|
88833
88941
|
return {
|
|
88834
|
-
cancel:
|
|
88942
|
+
cancel: true
|
|
88835
88943
|
};
|
|
88836
88944
|
}
|
|
88945
|
+
if (result.ok && result.data && result.data.length > 0) {
|
|
88946
|
+
this.view.evt.emit("onDataChange", {
|
|
88947
|
+
data: result.data,
|
|
88948
|
+
actionType: "NEW"
|
|
88949
|
+
});
|
|
88950
|
+
}
|
|
88951
|
+
return {
|
|
88952
|
+
cancel: result ? !result.ok : true
|
|
88953
|
+
};
|
|
88837
88954
|
}
|
|
88838
88955
|
/**
|
|
88839
88956
|
* 视图删除
|
|
@@ -89856,13 +89973,13 @@ var ScriptExecutor = class extends LogicExecutor {
|
|
|
89856
89973
|
};
|
|
89857
89974
|
|
|
89858
89975
|
// src/logic-scheduler/executor/app-de-ui-logic-executor.ts
|
|
89859
|
-
import { RuntimeModelError as
|
|
89976
|
+
import { RuntimeModelError as RuntimeModelError71 } from "@ibiz-template/core";
|
|
89860
89977
|
var AppDEUILogicExecutor = class extends LogicExecutor {
|
|
89861
89978
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
89862
89979
|
execute(executeParams) {
|
|
89863
89980
|
const { appDEUILogicId, appDataEntityId } = this.logic;
|
|
89864
89981
|
if (!appDEUILogicId) {
|
|
89865
|
-
throw new
|
|
89982
|
+
throw new RuntimeModelError71(
|
|
89866
89983
|
this.logic,
|
|
89867
89984
|
ibiz.i18n.t("runtime.logicScheduler.executor.noConfiguredLogic")
|
|
89868
89985
|
);
|
|
@@ -90132,16 +90249,18 @@ var ViewLogicScheduler = class extends LogicScheduler {
|
|
|
90132
90249
|
* 触发视图事件
|
|
90133
90250
|
* @author lxm
|
|
90134
90251
|
* @date 2023-06-26 02:26:33
|
|
90135
|
-
* @param {
|
|
90136
|
-
* @
|
|
90137
|
-
* @return {*} {(boolean | undefined)}
|
|
90252
|
+
* @param {EventBase} event 事件对象
|
|
90253
|
+
* @return {*} {Promise<void>}
|
|
90138
90254
|
*/
|
|
90139
|
-
triggerViewEvent(event) {
|
|
90255
|
+
async triggerViewEvent(event) {
|
|
90140
90256
|
const matchParams = {
|
|
90141
90257
|
eventName: event.eventName,
|
|
90142
90258
|
triggerType: "VIEWEVENT"
|
|
90143
90259
|
};
|
|
90144
|
-
this.triggerAndExecute(matchParams, event);
|
|
90260
|
+
const result = this.triggerAndExecute(matchParams, event);
|
|
90261
|
+
if (result == null ? void 0 : result.length) {
|
|
90262
|
+
await Promise.all(result);
|
|
90263
|
+
}
|
|
90145
90264
|
}
|
|
90146
90265
|
};
|
|
90147
90266
|
|
|
@@ -90353,7 +90472,7 @@ var ItemDynaLogicTrigger = class extends LogicTrigger {
|
|
|
90353
90472
|
};
|
|
90354
90473
|
|
|
90355
90474
|
// src/logic-scheduler/trigger/timer-trigger.ts
|
|
90356
|
-
import { RuntimeError as RuntimeError81, RuntimeModelError as
|
|
90475
|
+
import { RuntimeError as RuntimeError81, RuntimeModelError as RuntimeModelError72 } from "@ibiz-template/core";
|
|
90357
90476
|
var TimerTrigger = class extends LogicTrigger {
|
|
90358
90477
|
constructor() {
|
|
90359
90478
|
super(...arguments);
|
|
@@ -90361,7 +90480,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
90361
90480
|
}
|
|
90362
90481
|
start() {
|
|
90363
90482
|
if (!this.logic.timer) {
|
|
90364
|
-
throw new
|
|
90483
|
+
throw new RuntimeModelError72(
|
|
90365
90484
|
this.logic,
|
|
90366
90485
|
ibiz.i18n.t("runtime.logicScheduler.trigger.timerLacks")
|
|
90367
90486
|
);
|
|
@@ -90401,7 +90520,7 @@ var TimerTrigger = class extends LogicTrigger {
|
|
|
90401
90520
|
import {
|
|
90402
90521
|
ModelError as ModelError34,
|
|
90403
90522
|
RuntimeError as RuntimeError82,
|
|
90404
|
-
RuntimeModelError as
|
|
90523
|
+
RuntimeModelError as RuntimeModelError73
|
|
90405
90524
|
} from "@ibiz-template/core";
|
|
90406
90525
|
import { notNilEmpty as notNilEmpty11 } from "qx-util";
|
|
90407
90526
|
var AppUILogicExecutor = class extends LogicExecutor {
|
|
@@ -90449,7 +90568,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90449
90568
|
} else {
|
|
90450
90569
|
openViewRef = appUILogic.openDataAppView;
|
|
90451
90570
|
if (!openViewRef) {
|
|
90452
|
-
throw new
|
|
90571
|
+
throw new RuntimeModelError73(
|
|
90453
90572
|
appUILogic,
|
|
90454
90573
|
ibiz.i18n.t(
|
|
90455
90574
|
"runtime.logicScheduler.executor.defaultOpendataViewLogic"
|
|
@@ -90459,7 +90578,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90459
90578
|
}
|
|
90460
90579
|
const openView = openViewRef.refAppViewId;
|
|
90461
90580
|
if (!openView) {
|
|
90462
|
-
throw new
|
|
90581
|
+
throw new RuntimeModelError73(
|
|
90463
90582
|
appUILogic,
|
|
90464
90583
|
ibiz.i18n.t("runtime.logicScheduler.executor.noActuallyReference")
|
|
90465
90584
|
);
|
|
@@ -90497,7 +90616,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90497
90616
|
);
|
|
90498
90617
|
const typeFileName = appDataEntity.formTypeAppDEFieldId || appDataEntity.dataTypeAppDEFieldId;
|
|
90499
90618
|
if (!typeFileName) {
|
|
90500
|
-
throw new
|
|
90619
|
+
throw new RuntimeModelError73(
|
|
90501
90620
|
appUILogic,
|
|
90502
90621
|
ibiz.i18n.t("runtime.logicScheduler.executor.attributeConfiguration", {
|
|
90503
90622
|
codeName: appDataEntity.codeName
|
|
@@ -90507,7 +90626,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90507
90626
|
const { data } = parameters;
|
|
90508
90627
|
const formTypeValue = data[0][typeFileName];
|
|
90509
90628
|
if (!formTypeValue) {
|
|
90510
|
-
throw new
|
|
90629
|
+
throw new RuntimeModelError73(
|
|
90511
90630
|
appUILogic,
|
|
90512
90631
|
ibiz.i18n.t("runtime.logicScheduler.executor.entityAttributeValues")
|
|
90513
90632
|
);
|
|
@@ -90554,7 +90673,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90554
90673
|
return viewRef.refMode.toLowerCase() !== parentDeName;
|
|
90555
90674
|
});
|
|
90556
90675
|
if (!newViewRef) {
|
|
90557
|
-
throw new
|
|
90676
|
+
throw new RuntimeModelError73(
|
|
90558
90677
|
appUILogic,
|
|
90559
90678
|
ibiz.i18n.t("runtime.logicScheduler.executor.selectionView")
|
|
90560
90679
|
);
|
|
@@ -90567,7 +90686,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90567
90686
|
} else {
|
|
90568
90687
|
newViewRef = newDataAppView;
|
|
90569
90688
|
if (!newViewRef || !newViewRef.refAppViewId) {
|
|
90570
|
-
throw new
|
|
90689
|
+
throw new RuntimeModelError73(
|
|
90571
90690
|
appUILogic,
|
|
90572
90691
|
ibiz.i18n.t("runtime.logicScheduler.executor.newdataViewLogic")
|
|
90573
90692
|
);
|
|
@@ -90640,7 +90759,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90640
90759
|
const { context, params, ...rest } = parameters;
|
|
90641
90760
|
const { view } = parameters;
|
|
90642
90761
|
if (!wizardAppView || !wizardAppView.refAppViewId) {
|
|
90643
|
-
throw new
|
|
90762
|
+
throw new RuntimeModelError73(
|
|
90644
90763
|
appUILogic,
|
|
90645
90764
|
ibiz.i18n.t("runtime.logicScheduler.executor.indexEntity")
|
|
90646
90765
|
);
|
|
@@ -90698,7 +90817,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
|
|
|
90698
90817
|
const minorDERs = selfDe.minorAppDERSs;
|
|
90699
90818
|
const pickParentDeName = newViewRef.refMode.toLowerCase();
|
|
90700
90819
|
if (!minorDERs) {
|
|
90701
|
-
throw new
|
|
90820
|
+
throw new RuntimeModelError73(
|
|
90702
90821
|
selfDe,
|
|
90703
90822
|
ibiz.i18n.t("runtime.logicScheduler.executor.relationships")
|
|
90704
90823
|
);
|
|
@@ -90809,17 +90928,17 @@ var ControlEventTrigger = class extends LogicTrigger {
|
|
|
90809
90928
|
};
|
|
90810
90929
|
|
|
90811
90930
|
// src/logic-scheduler/executor/app-ui-action-executor.ts
|
|
90812
|
-
import { RuntimeModelError as
|
|
90931
|
+
import { RuntimeModelError as RuntimeModelError74 } from "@ibiz-template/core";
|
|
90813
90932
|
var AppDEUIActionExecutor = class extends LogicExecutor {
|
|
90814
90933
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
90815
90934
|
execute(executeParams) {
|
|
90816
90935
|
if (!this.logic.appDEUIActionId) {
|
|
90817
|
-
throw new
|
|
90936
|
+
throw new RuntimeModelError74(
|
|
90818
90937
|
this.logic,
|
|
90819
90938
|
ibiz.i18n.t("runtime.logicScheduler.executor.missingTrigger")
|
|
90820
90939
|
);
|
|
90821
90940
|
}
|
|
90822
|
-
UIActionUtil.execAndResolved(
|
|
90941
|
+
return UIActionUtil.execAndResolved(
|
|
90823
90942
|
this.logic.appDEUIActionId,
|
|
90824
90943
|
executeParams,
|
|
90825
90944
|
this.logic.appId
|