@ibiz-template/runtime 0.7.41-alpha.78 → 0.7.41-alpha.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/index.esm.js +101 -17
  2. package/dist/index.system.min.js +1 -1
  3. package/out/config/global-config.d.ts.map +1 -1
  4. package/out/config/global-config.js +1 -0
  5. package/out/controller/common/control/control.controller.d.ts +1 -1
  6. package/out/controller/common/control/control.controller.d.ts.map +1 -1
  7. package/out/controller/common/control/control.controller.js +17 -3
  8. package/out/controller/common/view/view.controller.d.ts +1 -1
  9. package/out/controller/common/view/view.controller.d.ts.map +1 -1
  10. package/out/controller/common/view/view.controller.js +17 -1
  11. package/out/controller/control/form/form-detail/form-container/form-container.controller.d.ts +2 -1
  12. package/out/controller/control/form/form-detail/form-container/form-container.controller.d.ts.map +1 -1
  13. package/out/controller/control/form/form-detail/form-container/form-container.controller.js +9 -1
  14. package/out/controller/control/form/form-detail/form-container/form-container.state.d.ts +1 -0
  15. package/out/controller/control/form/form-detail/form-container/form-container.state.d.ts.map +1 -1
  16. package/out/controller/control/form/form-detail/form-container/form-container.state.js +1 -0
  17. package/out/controller/control/grid/grid/grid.controller.d.ts.map +1 -1
  18. package/out/controller/control/grid/grid/grid.controller.js +15 -2
  19. package/out/controller/control/md-ctrl/md-ctrl.controller.d.ts.map +1 -1
  20. package/out/controller/control/md-ctrl/md-ctrl.controller.js +17 -2
  21. package/out/controller/control/panel/panel-container/panel-container.controller.d.ts +2 -1
  22. package/out/controller/control/panel/panel-container/panel-container.controller.d.ts.map +1 -1
  23. package/out/controller/control/panel/panel-container/panel-container.controller.js +9 -1
  24. package/out/controller/control/panel/panel-container/panel-container.state.d.ts +7 -0
  25. package/out/controller/control/panel/panel-container/panel-container.state.d.ts.map +1 -1
  26. package/out/controller/control/panel/panel-container/panel-container.state.js +7 -0
  27. package/out/controller/ctx/ctx.d.ts +1 -1
  28. package/out/controller/ctx/ctx.d.ts.map +1 -1
  29. package/out/controller/ctx/ctx.js +2 -2
  30. package/out/interface/api/common/global-config/i-api-global-view-config.d.ts +8 -0
  31. package/out/interface/api/common/global-config/i-api-global-view-config.d.ts.map +1 -1
  32. package/out/interface/api/controller/control/form-detail/i-api-form-container.controller.d.ts +2 -1
  33. package/out/interface/api/controller/control/form-detail/i-api-form-container.controller.d.ts.map +1 -1
  34. package/out/interface/api/controller/control/i-api-control.controller.d.ts +2 -1
  35. package/out/interface/api/controller/control/i-api-control.controller.d.ts.map +1 -1
  36. package/out/interface/api/controller/control/panel-item/i-api-panel-container.controller.d.ts +2 -1
  37. package/out/interface/api/controller/control/panel-item/i-api-panel-container.controller.d.ts.map +1 -1
  38. package/out/interface/api/controller/view/i-api-view.controller.d.ts +3 -1
  39. package/out/interface/api/controller/view/i-api-view.controller.d.ts.map +1 -1
  40. package/out/interface/api/state/control/form-detail/i-api-form-container.state.d.ts +6 -0
  41. package/out/interface/api/state/control/form-detail/i-api-form-container.state.d.ts.map +1 -1
  42. package/out/interface/api/state/control/i-api-control.state.d.ts +6 -0
  43. package/out/interface/api/state/control/i-api-control.state.d.ts.map +1 -1
  44. package/out/interface/api/state/control/panel-item/i-api-panel-container.state.d.ts +7 -0
  45. package/out/interface/api/state/control/panel-item/i-api-panel-container.state.d.ts.map +1 -1
  46. package/out/interface/api/state/view/i-api-view.state.d.ts +6 -0
  47. package/out/interface/api/state/view/i-api-view.state.d.ts.map +1 -1
  48. package/out/interface/api/util/i-api-html2canvas-util.d.ts +1 -1
  49. package/out/interface/api/util/i-api-html2canvas-util.d.ts.map +1 -1
  50. package/out/interface/api/util/i-api-print-preview-util.d.ts +89 -0
  51. package/out/interface/api/util/i-api-print-preview-util.d.ts.map +1 -1
  52. package/out/interface/api/util/index.d.ts +1 -1
  53. package/out/interface/api/util/index.d.ts.map +1 -1
  54. package/out/interface/util/i-print-preview-util/i-print-preview-util.d.ts +3 -1
  55. package/out/interface/util/i-print-preview-util/i-print-preview-util.d.ts.map +1 -1
  56. package/out/interface/util/index.d.ts +1 -1
  57. package/out/interface/util/index.d.ts.map +1 -1
  58. package/package.json +2 -2
package/dist/index.esm.js CHANGED
@@ -19367,7 +19367,8 @@ var GlobalConfig = class {
19367
19367
  mobShowViewHeader: true,
19368
19368
  timeoutDuration: 5 * 60 * 1e3,
19369
19369
  onlyShowDataInfo: false,
19370
- viewAccUserMode: 3
19370
+ viewAccUserMode: 3,
19371
+ loadingText: ""
19371
19372
  };
19372
19373
  // 全局表格配置
19373
19374
  this.grid = {
@@ -35609,11 +35610,11 @@ var CTX = class {
35609
35610
  * @author lxm
35610
35611
  * @date 2023-03-27 01:59:22
35611
35612
  */
35612
- startLoading() {
35613
+ startLoading(loadingText) {
35613
35614
  if (this.isDestroyed) {
35614
35615
  return;
35615
35616
  }
35616
- this.view.startLoading();
35617
+ this.view.startLoading(loadingText);
35617
35618
  }
35618
35619
  /**
35619
35620
  * 关闭视图加载
@@ -37747,6 +37748,7 @@ var ViewController = class extends BaseController {
37747
37748
  super.initState();
37748
37749
  this.state.activated = true;
37749
37750
  this.state.isLoading = false;
37751
+ this.state.loadingText = "";
37750
37752
  this.state.caption = this.model.caption;
37751
37753
  this.state.srfactiveviewdata = null;
37752
37754
  this.state.viewMessages = {};
@@ -37756,6 +37758,12 @@ var ViewController = class extends BaseController {
37756
37758
  this.state.presetClassList = [];
37757
37759
  }
37758
37760
  async onCreated() {
37761
+ var _a3;
37762
+ const { appViewParams } = this.model;
37763
+ const LoaddingTextValue = (_a3 = appViewParams == null ? void 0 : appViewParams.find(
37764
+ (item) => item.id.toLowerCase() === "srfloadingtext"
37765
+ )) == null ? void 0 : _a3.value;
37766
+ this.state.loadingText = LoaddingTextValue || ibiz.config.view.loadingText;
37759
37767
  this.state.isLoading = true;
37760
37768
  await super.onCreated();
37761
37769
  this.modal.hooks.beforeDismiss.tapPromise(async (modalData) => {
@@ -37941,9 +37949,19 @@ var ViewController = class extends BaseController {
37941
37949
  redrawView(redrawData) {
37942
37950
  this._evt.emit("onRedrawView", { redrawData });
37943
37951
  }
37944
- startLoading() {
37952
+ startLoading(loadingText) {
37953
+ var _a3;
37945
37954
  this.viewLoading.begin();
37946
37955
  this.state.isLoading = this.viewLoading.isLoading;
37956
+ if (isNotNil2(loadingText)) {
37957
+ this.state.loadingText = loadingText;
37958
+ } else {
37959
+ const { appViewParams } = this.model;
37960
+ const LoaddingTextValue = (_a3 = appViewParams == null ? void 0 : appViewParams.find(
37961
+ (item) => item.id.toLowerCase() === "srfloadingtext"
37962
+ )) == null ? void 0 : _a3.value;
37963
+ this.state.loadingText = LoaddingTextValue || ibiz.config.view.loadingText;
37964
+ }
37947
37965
  }
37948
37966
  endLoading() {
37949
37967
  this.viewLoading.end();
@@ -38694,7 +38712,7 @@ import {
38694
38712
  NoticeError as NoticeError2,
38695
38713
  RuntimeError as RuntimeError31
38696
38714
  } from "@ibiz-template/core";
38697
- import { clone as clone20, isNil as isNil26 } from "ramda";
38715
+ import { clone as clone20, isNil as isNil26, isNotNil as isNotNil3 } from "ramda";
38698
38716
  import { notNilEmpty as notNilEmpty9 } from "qx-util";
38699
38717
  var ControlController = class extends BaseController {
38700
38718
  /**
@@ -38818,6 +38836,7 @@ var ControlController = class extends BaseController {
38818
38836
  super.initState();
38819
38837
  this.state.activated = true;
38820
38838
  this.state.isLoading = false;
38839
+ this.state.loadingText = "";
38821
38840
  this.state.disabled = false;
38822
38841
  this.state.maskOption = { mode: "BLANK" };
38823
38842
  this.state.zIndex = void 0;
@@ -38826,6 +38845,9 @@ var ControlController = class extends BaseController {
38826
38845
  async onCreated() {
38827
38846
  var _a3;
38828
38847
  await super.onCreated();
38848
+ if (isNotNil3(ibiz.config.view.loadingText)) {
38849
+ this.state.loadingText = ibiz.config.view.loadingText;
38850
+ }
38829
38851
  if (this.controlPanel) {
38830
38852
  this.childNames.push(this.controlPanel.name);
38831
38853
  const provider = await getControlProvider(this.controlPanel);
@@ -38916,9 +38938,16 @@ var ControlController = class extends BaseController {
38916
38938
  * @date 2022-09-21 15:09:18
38917
38939
  * @return {*} {Promise<void>}
38918
38940
  */
38919
- async startLoading() {
38941
+ async startLoading(loadingText) {
38920
38942
  this.state.isLoading = true;
38921
- this.ctx.startLoading();
38943
+ if (isNotNil3(loadingText)) {
38944
+ this.state.loadingText = loadingText;
38945
+ } else if (isNotNil3(ibiz.config.view.loadingText)) {
38946
+ this.state.loadingText = ibiz.config.view.loadingText;
38947
+ } else {
38948
+ this.state.loadingText = "";
38949
+ }
38950
+ this.ctx.startLoading(loadingText);
38922
38951
  }
38923
38952
  /**
38924
38953
  * 加载完毕
@@ -51739,7 +51768,7 @@ import {
51739
51768
  isElementSame as isElementSame2,
51740
51769
  RuntimeModelError as RuntimeModelError57
51741
51770
  } from "@ibiz-template/core";
51742
- import { isNil as isNil31, isNotNil as isNotNil3 } from "ramda";
51771
+ import { isNil as isNil31, isNotNil as isNotNil4 } from "ramda";
51743
51772
  import { createUUID as createUUID14, isBoolean } from "qx-util";
51744
51773
 
51745
51774
  // src/controller/control/data-view/data-view.service.ts
@@ -52344,7 +52373,7 @@ var DataViewControlController = class extends MDControlController {
52344
52373
  */
52345
52374
  onClickNew(event, group) {
52346
52375
  const params = { ...this.params };
52347
- if (isNotNil3(group)) {
52376
+ if (isNotNil4(group)) {
52348
52377
  Object.assign(params, { srfgroup: group });
52349
52378
  }
52350
52379
  UIActionUtil.execAndResolved(
@@ -54280,7 +54309,7 @@ import { recursiveIterate as recursiveIterate8 } from "@ibiz-template/core";
54280
54309
 
54281
54310
  // src/controller/control/form/form/form.service.ts
54282
54311
  import { recursiveIterate as recursiveIterate7 } from "@ibiz-template/core";
54283
- import { clone as clone38, isNil as isNil32, isNotNil as isNotNil4 } from "ramda";
54312
+ import { clone as clone38, isNil as isNil32, isNotNil as isNotNil5 } from "ramda";
54284
54313
  var FormService = class extends ControlService {
54285
54314
  constructor() {
54286
54315
  super(...arguments);
@@ -54325,7 +54354,7 @@ var FormService = class extends ControlService {
54325
54354
  if (defaultVal !== void 0) {
54326
54355
  data[name2] = defaultVal;
54327
54356
  }
54328
- if (isNil32(data[name2]) && isNotNil4(defaultData[name2])) {
54357
+ if (isNil32(data[name2]) && isNotNil5(defaultData[name2])) {
54329
54358
  data[name2] = defaultData[name2];
54330
54359
  }
54331
54360
  }
@@ -55848,11 +55877,15 @@ var FormDRUIPartController = class extends FormDetailController {
55848
55877
  // src/controller/control/form/form-detail/form-group-panel/form-group-panel.controller.ts
55849
55878
  import { clone as clone39 } from "ramda";
55850
55879
 
55880
+ // src/controller/control/form/form-detail/form-container/form-container.controller.ts
55881
+ import { isNotNil as isNotNil6 } from "ramda";
55882
+
55851
55883
  // src/controller/control/form/form-detail/form-container/form-container.state.ts
55852
55884
  var FormContainerState = class extends FormDetailState {
55853
55885
  constructor() {
55854
55886
  super(...arguments);
55855
55887
  this.loading = false;
55888
+ this.loadingText = "";
55856
55889
  }
55857
55890
  };
55858
55891
 
@@ -55870,10 +55903,16 @@ var FormContainerController = class extends FormDetailController {
55870
55903
  }
55871
55904
  /**
55872
55905
  * @description 开始加载中
55906
+ * @param {(string | undefined)} [loadingText] 加载提示文本
55873
55907
  * @memberof FormContainerController
55874
55908
  */
55875
- startLoading() {
55909
+ startLoading(loadingText) {
55876
55910
  this.state.loading = true;
55911
+ if (isNotNil6(loadingText)) {
55912
+ this.state.loadingText = loadingText;
55913
+ } else {
55914
+ this.state.loadingText = "";
55915
+ }
55877
55916
  }
55878
55917
  /**
55879
55918
  * @description 结束加载中
@@ -61153,7 +61192,20 @@ var GridController = class extends MDControlController {
61153
61192
  value = ValueExUtil.toText(fieldColumnC.model, value);
61154
61193
  }
61155
61194
  if (this.allExportCodelistMap.get(key)) {
61156
- value = ((_b2 = this.allExportCodelistMap.get(key).find((x) => x.value === item[key])) == null ? void 0 : _b2.text) || value;
61195
+ const codelist = fieldColumnC.codeList;
61196
+ const getVal2 = (val) => {
61197
+ var _a4;
61198
+ return ((_a4 = this.allExportCodelistMap.get(key).find((x) => x.value == val)) == null ? void 0 : _a4.text) || val;
61199
+ };
61200
+ if (codelist && codelist.valueSeparator) {
61201
+ const textSeparator = codelist.textSeparator || codelist.valueSeparator || ",";
61202
+ const values = (_b2 = item[key]) == null ? void 0 : _b2.split(
61203
+ codelist.valueSeparator
61204
+ );
61205
+ value = values == null ? void 0 : values.map((v) => getVal2(v)).join(textSeparator);
61206
+ } else {
61207
+ value = getVal2(item[key]);
61208
+ }
61157
61209
  } else {
61158
61210
  value = this.formatValue(isDate, format, value) + unitName;
61159
61211
  }
@@ -64057,6 +64109,9 @@ var PanelItemController = class {
64057
64109
  }
64058
64110
  };
64059
64111
 
64112
+ // src/controller/control/panel/panel-container/panel-container.controller.ts
64113
+ import { isNotNil as isNotNil7 } from "ramda";
64114
+
64060
64115
  // src/controller/control/panel/panel-container/panel-container.state.ts
64061
64116
  var PanelContainerState = class extends PanelItemState {
64062
64117
  constructor() {
@@ -64068,6 +64123,13 @@ var PanelContainerState = class extends PanelItemState {
64068
64123
  * @memberof PanelContainerState
64069
64124
  */
64070
64125
  this.loading = false;
64126
+ /**
64127
+ * @description 加载提示文本
64128
+ * @exposedoc
64129
+ * @type {string}
64130
+ * @memberof PanelContainerState
64131
+ */
64132
+ this.loadingText = "";
64071
64133
  }
64072
64134
  };
64073
64135
 
@@ -64086,10 +64148,16 @@ var PanelContainerController = class extends PanelItemController {
64086
64148
  /**
64087
64149
  * @description 开始加载中
64088
64150
  * @exposedoc
64151
+ * @param {string} [loadingText] 加载提示文本
64089
64152
  * @memberof PanelContainerController
64090
64153
  */
64091
- startLoading() {
64154
+ startLoading(loadingText) {
64092
64155
  this.state.loading = true;
64156
+ if (isNotNil7(loadingText)) {
64157
+ this.state.loadingText = loadingText;
64158
+ } else {
64159
+ this.state.loadingText = "";
64160
+ }
64093
64161
  }
64094
64162
  /**
64095
64163
  * @description 结束加载中
@@ -67008,7 +67076,7 @@ import {
67008
67076
  RuntimeError as RuntimeError60,
67009
67077
  RuntimeModelError as RuntimeModelError67
67010
67078
  } from "@ibiz-template/core";
67011
- import { clone as clone47, isNil as isNil38, isNotNil as isNotNil5 } from "ramda";
67079
+ import { clone as clone47, isNil as isNil38, isNotNil as isNotNil8 } from "ramda";
67012
67080
  import { createUUID as createUUID20 } from "qx-util";
67013
67081
 
67014
67082
  // src/controller/control/md-ctrl/md-ctrl.service.ts
@@ -67493,7 +67561,7 @@ var MDCtrlController = class extends MDControlController {
67493
67561
  */
67494
67562
  onClickNew(event, group) {
67495
67563
  const params = { ...this.params };
67496
- if (isNotNil5(group)) {
67564
+ if (isNotNil8(group)) {
67497
67565
  Object.assign(params, { srfgroup: group });
67498
67566
  }
67499
67567
  UIActionUtil.execAndResolved(
@@ -67654,7 +67722,23 @@ var MDCtrlController = class extends MDControlController {
67654
67722
  var _a3;
67655
67723
  let value = item[key];
67656
67724
  if (this.allExportCodelistMap.get(key)) {
67657
- value = ((_a3 = this.allExportCodelistMap.get(key).find((x) => x.value === item[key])) == null ? void 0 : _a3.text) || value;
67725
+ const getVal2 = (val) => {
67726
+ var _a4;
67727
+ return ((_a4 = this.allExportCodelistMap.get(key).find((x) => x.value == val)) == null ? void 0 : _a4.text) || val;
67728
+ };
67729
+ const currentColumn = this.allExportColumns.find((exportColumn) => {
67730
+ return exportColumn.appDEFieldId === key;
67731
+ });
67732
+ const codelist = currentColumn == null ? void 0 : currentColumn.codeList;
67733
+ if (codelist && codelist.valueSeparator) {
67734
+ const textSeparator = codelist.textSeparator || codelist.valueSeparator || ",";
67735
+ const values = (_a3 = item[key]) == null ? void 0 : _a3.split(
67736
+ codelist.valueSeparator
67737
+ );
67738
+ value = values == null ? void 0 : values.map((v) => getVal2(v)).join(textSeparator);
67739
+ } else {
67740
+ value = getVal2(item[key]);
67741
+ }
67658
67742
  } else {
67659
67743
  value = "".concat(value != null ? value : "");
67660
67744
  }