@ibiz-template/runtime 0.7.27 → 0.7.28-alpha.0

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 CHANGED
@@ -15108,12 +15108,18 @@ var BIReportUtil = class {
15108
15108
  );
15109
15109
  if (res.data) {
15110
15110
  config = await this.translateDEReportToConfig(res.data);
15111
+ if (data.srfreporttag) {
15112
+ config.reportTag = data.srfreporttag;
15113
+ }
15114
+ if (data.srfbischematag) {
15115
+ config.selectedSchemeId = data.srfbischematag;
15116
+ }
15111
15117
  }
15112
15118
  } catch (error) {
15113
15119
  throw new RuntimeError25(error.message);
15114
15120
  }
15115
15121
  } else if (data.mode === "UI") {
15116
- config = data.reportPanel.generator.config;
15122
+ config = this.translateReportPanelToConfig(data.reportPanel.model);
15117
15123
  }
15118
15124
  const modal = ibiz.overlay.createModal(
15119
15125
  "iBizBIReportDesign",
@@ -15320,7 +15326,8 @@ var BIReportUtil = class {
15320
15326
  bireportuimodel: JSON.stringify({
15321
15327
  selectChartType,
15322
15328
  style,
15323
- filter: data == null ? void 0 : data.filter
15329
+ filter: data == null ? void 0 : data.filter,
15330
+ group: data == null ? void 0 : data.group
15324
15331
  }),
15325
15332
  pssysappid: app.model.codeName,
15326
15333
  bireporttag: reportTag,
@@ -25372,6 +25379,22 @@ var ToolbarController = class extends ControlController {
25372
25379
  }
25373
25380
  }
25374
25381
  }
25382
+ const groupItem = item;
25383
+ if (groupItem.groupExtractMode && groupItem.uiactionGroup && groupItem.uiactionGroup.uiactionGroupDetails) {
25384
+ groupItem.uiactionGroup.uiactionGroupDetails.forEach(
25385
+ (detail) => {
25386
+ const actionid = detail.uiactionId;
25387
+ if (actionid) {
25388
+ const buttonState = new UIActionButtonState(
25389
+ detail.id,
25390
+ this.context.srfappid,
25391
+ actionid
25392
+ );
25393
+ this.state.buttonsState.addState(detail.id, buttonState);
25394
+ }
25395
+ }
25396
+ );
25397
+ }
25375
25398
  },
25376
25399
  { childrenFields: ["detoolbarItems"] }
25377
25400
  );
@@ -25528,14 +25551,6 @@ var DashboardController = class extends ControlController {
25528
25551
  * @type {{ [key: string]: IPortletController }}
25529
25552
  */
25530
25553
  this.portlets = {};
25531
- /**
25532
- * 启用动态
25533
- *
25534
- * @author tony001
25535
- * @date 2024-06-27 11:06:24
25536
- * @type {boolean}
25537
- */
25538
- this.enableDynamic = false;
25539
25554
  }
25540
25555
  initState() {
25541
25556
  super.initState();
@@ -25544,9 +25559,6 @@ var DashboardController = class extends ControlController {
25544
25559
  this.model.enableCustomized = true;
25545
25560
  await super.onCreated();
25546
25561
  await this.initPortlets(this.model.controls);
25547
- if (this.controlParams.enabledynamic === "true") {
25548
- this.enableDynamic = true;
25549
- }
25550
25562
  const { appDataEntityId } = this.view.model;
25551
25563
  if (appDataEntityId) {
25552
25564
  this.view.evt.on("onDataChange", (event) => {
@@ -25642,20 +25654,47 @@ var DashboardController = class extends ControlController {
25642
25654
  async loadAllDynaPortlet() {
25643
25655
  var _a;
25644
25656
  const app = ibiz.hub.getApp(ibiz.env.appId);
25645
- const res = await app.deService.exec(
25646
- "psappportlet",
25647
- "fetchdefault",
25648
- this.context,
25649
- {
25650
- size: 1e3,
25651
- n_pssysappid_eq: app.model.codeName,
25652
- n_dynamodelflag_noteq: 0
25657
+ const result = [];
25658
+ if (this.controlParams.dynamiccodelist) {
25659
+ const dynamicCodeListTag = this.controlParams.dynamiccodelist;
25660
+ const codeListItems = await app.codeList.get(
25661
+ dynamicCodeListTag,
25662
+ this.context,
25663
+ this.params
25664
+ );
25665
+ if (codeListItems && codeListItems.length > 0) {
25666
+ codeListItems.forEach((item) => {
25667
+ result.push({
25668
+ ...item.data,
25669
+ psappportletid: item.value,
25670
+ psappportletname: item.text
25671
+ });
25672
+ });
25673
+ }
25674
+ } else {
25675
+ const res = await app.deService.exec(
25676
+ "psappportlet",
25677
+ "fetchdefault",
25678
+ this.context,
25679
+ {
25680
+ size: 1e3,
25681
+ n_pssysappid_eq: app.model.codeName,
25682
+ n_dynamodelflag_noteq: 0
25683
+ }
25684
+ );
25685
+ if (res && ((_a = res.data) == null ? void 0 : _a.length) > 0) {
25686
+ res.data.forEach((item) => {
25687
+ result.push({
25688
+ psappportletid: item.psappportletid,
25689
+ codename: item.codename,
25690
+ psappportletname: item.psappportletname,
25691
+ groupcodename: "Ungroup",
25692
+ groupname: "\u672A\u5206\u7C7B"
25693
+ });
25694
+ });
25653
25695
  }
25654
- );
25655
- if (res && ((_a = res.data) == null ? void 0 : _a.length) > 0) {
25656
- return res.data;
25657
25696
  }
25658
- return [];
25697
+ return result;
25659
25698
  }
25660
25699
  /**
25661
25700
  * 通过指定标识加载门户部件
@@ -33003,7 +33042,7 @@ import {
33003
33042
  ModelError as ModelError29,
33004
33043
  plus as plus3,
33005
33044
  base64ToStr,
33006
- isBase64
33045
+ isEmoji
33007
33046
  } from "@ibiz-template/core";
33008
33047
  import dayjs6 from "dayjs";
33009
33048
  import { debounce as debounce2 } from "lodash-es";
@@ -33301,7 +33340,7 @@ var GridFieldColumnController = class extends GridColumnController {
33301
33340
  return ValueExUtil.toText(this.model, value);
33302
33341
  }
33303
33342
  const strVal = "".concat(isNilOrEmpty8(value) ? "" : value);
33304
- if (Number.isNaN(Number(strVal)) && isBase64(strVal)) {
33343
+ if (isEmoji(strVal)) {
33305
33344
  return base64ToStr(strVal);
33306
33345
  }
33307
33346
  if (!this.valueFormat) {
@@ -40968,37 +41007,6 @@ var ReportPanelController = class extends ControlController {
40968
41007
  });
40969
41008
  }
40970
41009
  }
40971
- /**
40972
- * 打开设计界面
40973
- *
40974
- * @author tony001
40975
- * @date 2024-06-18 16:06:46
40976
- * @return {*} {Promise<IModalData>}
40977
- */
40978
- async openReportDesignPage() {
40979
- if (this.state.reportType && this.isBIReport) {
40980
- const modal = ibiz.overlay.createModal(
40981
- "iBizBIReportDesign",
40982
- {
40983
- dismiss: (_data) => modal.dismiss(_data),
40984
- context: this.context,
40985
- viewParams: this.params,
40986
- config: await ibiz.util.biReport.translateReportPanelToConfig(
40987
- this.model
40988
- )
40989
- },
40990
- {
40991
- width: "90%",
40992
- height: "90%",
40993
- footerHide: true
40994
- }
40995
- );
40996
- modal.present();
40997
- const result = await modal.onWillDismiss();
40998
- return result;
40999
- }
41000
- return { ok: false, data: [] };
41001
- }
41002
41010
  };
41003
41011
 
41004
41012
  // src/controller/control/gantt/gantt.controller.ts