@ibiz-template/runtime 0.7.41-alpha.144 → 0.7.41-alpha.145

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
@@ -20017,7 +20017,8 @@ var GlobalConfig = class {
20017
20017
  aiTopicStorageMode: "DEFAULT",
20018
20018
  aiInputPlaceholder: "",
20019
20019
  aiMinimizeContainerId: void 0,
20020
- showScrollTo: "none"
20020
+ showScrollTo: "none",
20021
+ aiChatMessagePageSize: 100
20021
20022
  };
20022
20023
  // 全局分页流布局配置
20023
20024
  this.drtab = {
@@ -76058,17 +76059,22 @@ var AIUtilService = class {
76058
76059
  ...params
76059
76060
  }
76060
76061
  );
76061
- const result = this.handleUserResponse(
76062
+ let result = this.handleUserResponse(
76062
76063
  response,
76063
76064
  "messagemodelMapping"
76064
76065
  );
76066
+ if (result && result.length > 0) {
76067
+ result = result.sort((a, b) => {
76068
+ return a.sequence - b.sequence;
76069
+ });
76070
+ }
76065
76071
  let total = response.headers["x-total"];
76066
76072
  if (total) {
76067
76073
  total = Number(total);
76068
76074
  } else {
76069
76075
  total = result.length;
76070
76076
  }
76071
- return { total, data: result.reverse() };
76077
+ return { total, data: result };
76072
76078
  }
76073
76079
  /**
76074
76080
  * 删除消息(多个以逗号分割)
@@ -91653,11 +91659,7 @@ var TimerTrigger = class extends LogicTrigger {
91653
91659
  };
91654
91660
 
91655
91661
  // src/logic-scheduler/executor/app-ui-logic-executor.ts
91656
- import {
91657
- ModelError as ModelError32,
91658
- RuntimeError as RuntimeError85,
91659
- RuntimeModelError as RuntimeModelError73
91660
- } from "@ibiz-template/core";
91662
+ import { RuntimeError as RuntimeError85, RuntimeModelError as RuntimeModelError73 } from "@ibiz-template/core";
91661
91663
  import { notNilEmpty as notNilEmpty11 } from "qx-util";
91662
91664
  var AppUILogicExecutor = class extends LogicExecutor {
91663
91665
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -91795,12 +91797,32 @@ var AppUILogicExecutor = class extends LogicExecutor {
91795
91797
  const { data, view } = parameters;
91796
91798
  const { enableWizardAdd, enableBatchAdd, batchAddOnly, newDataAppView } = appUILogic;
91797
91799
  let newViewRef;
91800
+ let isBatchAdd = false;
91798
91801
  if (enableWizardAdd) {
91799
91802
  newViewRef = await this.getWizardNewViewRef(appUILogic, parameters);
91800
91803
  if (!newViewRef) {
91801
91804
  return { ok: false };
91802
91805
  }
91803
91806
  } else if (enableBatchAdd) {
91807
+ const parentDeName = calcDeCodeNameById(
91808
+ view.parentView.model.appDataEntityId
91809
+ );
91810
+ const batchViews = appUILogic.batchAddAppViews;
91811
+ newViewRef = batchViews == null ? void 0 : batchViews.find((viewRef) => {
91812
+ return viewRef.refMode.toLowerCase() !== parentDeName;
91813
+ });
91814
+ if (newViewRef) {
91815
+ isBatchAdd = true;
91816
+ } else {
91817
+ newViewRef = newDataAppView;
91818
+ if (!newViewRef || !newViewRef.refAppViewId) {
91819
+ throw new RuntimeModelError73(
91820
+ appUILogic,
91821
+ ibiz.i18n.t("runtime.logicScheduler.executor.newdataViewLogic")
91822
+ );
91823
+ }
91824
+ }
91825
+ } else if (batchAddOnly) {
91804
91826
  const parentDeName = calcDeCodeNameById(
91805
91827
  view.parentView.model.appDataEntityId
91806
91828
  );
@@ -91814,11 +91836,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
91814
91836
  ibiz.i18n.t("runtime.logicScheduler.executor.selectionView")
91815
91837
  );
91816
91838
  }
91817
- } else if (batchAddOnly) {
91818
- throw new ModelError32(
91819
- appUILogic,
91820
- ibiz.i18n.t("runtime.logicScheduler.executor.noSupportedBatchAddOnly")
91821
- );
91839
+ isBatchAdd = true;
91822
91840
  } else {
91823
91841
  newViewRef = newDataAppView;
91824
91842
  if (!newViewRef || !newViewRef.refAppViewId) {
@@ -91867,7 +91885,7 @@ var AppUILogicExecutor = class extends LogicExecutor {
91867
91885
  tempParams,
91868
91886
  { ctx: view.getCtx(), ...rest, openMode: newViewRef.openMode }
91869
91887
  );
91870
- if (enableBatchAdd && result.data) {
91888
+ if (isBatchAdd && result.data) {
91871
91889
  await this.doBatchAdd(
91872
91890
  appUILogic,
91873
91891
  result.data,
@@ -92778,7 +92796,6 @@ var en = {
92778
92796
  entityAttributeValues: "Data Source No Form Type Applied Entity Attribute Values",
92779
92797
  editViews: "No edit views were found for the entity associated with the form type {formTypeValue}.",
92780
92798
  selectionView: "Selection view that needs to be opened for batch add was not found",
92781
- noSupportedBatchAddOnly: "batchAddOnly is not supported yet.",
92782
92799
  newdataViewLogic: "The newdata view logic is not configured to default to a new data view",
92783
92800
  indexEntity: "Missing Default Index Entity Selection View",
92784
92801
  checkOne: "Please check one piece of data",
@@ -93492,7 +93509,6 @@ var zhCn = {
93492
93509
  entityAttributeValues: "\u6570\u636E\u6E90\u65E0\u8868\u5355\u7C7B\u578B\u5E94\u7528\u5B9E\u4F53\u5C5E\u6027\u503C",
93493
93510
  editViews: "\u6CA1\u6709\u627E\u5230\u4E0E\u8868\u5355\u7C7B\u578B{formTypeValue}\u76F8\u5173\u7684\u5B9E\u4F53\u7684\u7F16\u8F91\u89C6\u56FE",
93494
93511
  selectionView: "\u6CA1\u6709\u627E\u5230\u6279\u6DFB\u52A0\u9700\u8981\u6253\u5F00\u7684\u9009\u62E9\u89C6\u56FE",
93495
- noSupportedBatchAddOnly: "batchAddOnly\u6682\u672A\u652F\u6301",
93496
93512
  newdataViewLogic: "newdata\u89C6\u56FE\u903B\u8F91\u6CA1\u6709\u914D\u7F6E\u9ED8\u8BA4\u65B0\u5EFA\u6570\u636E\u89C6\u56FE",
93497
93513
  indexEntity: "\u7F3A\u5C11\u9ED8\u8BA4\u7D22\u5F15\u5B9E\u4F53\u9009\u62E9\u89C6\u56FE",
93498
93514
  checkOne: "\u8BF7\u9009\u4E2D\u4E00\u6761\u6570\u636E",