@ibiz-template/runtime 0.7.41-alpha.154 → 0.7.41-alpha.156

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 (35) hide show
  1. package/dist/index.esm.js +40 -5
  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 +3 -0
  5. package/out/interface/api/common/global-config/i-api-global-common-config.d.ts +23 -0
  6. package/out/interface/api/common/global-config/i-api-global-common-config.d.ts.map +1 -1
  7. package/out/interface/api/util/i-api-message-util.d.ts +15 -4
  8. package/out/interface/api/util/i-api-message-util.d.ts.map +1 -1
  9. package/out/interface/api/util/i-api-notification-util.d.ts +6 -0
  10. package/out/interface/api/util/i-api-notification-util.d.ts.map +1 -1
  11. package/out/interface/provider/i-platform-provider.d.ts +6 -0
  12. package/out/interface/provider/i-platform-provider.d.ts.map +1 -1
  13. package/out/platform/provider/platform-provider-base.d.ts.map +1 -1
  14. package/out/platform/provider/platform-provider-base.js +8 -2
  15. package/out/service/service/entity/method/de-action.d.ts +8 -0
  16. package/out/service/service/entity/method/de-action.d.ts.map +1 -1
  17. package/out/service/service/entity/method/de-action.js +28 -0
  18. package/out/service/service/file/file.service.d.ts.map +1 -1
  19. package/out/service/service/file/file.service.js +1 -0
  20. package/out/ui-action/provider/front-ui-action-provider.d.ts.map +1 -1
  21. package/out/ui-action/provider/front-ui-action-provider.js +2 -0
  22. package/out/utils/file-util/file-util.d.ts +6 -1
  23. package/out/utils/file-util/file-util.d.ts.map +1 -1
  24. package/out/utils/file-util/file-util.js +2 -2
  25. package/package.json +2 -2
  26. package/src/config/global-config.ts +3 -0
  27. package/src/interface/api/common/global-config/i-api-global-common-config.ts +26 -0
  28. package/src/interface/api/util/i-api-message-util.ts +37 -4
  29. package/src/interface/api/util/i-api-notification-util.ts +6 -0
  30. package/src/interface/provider/i-platform-provider.ts +6 -0
  31. package/src/platform/provider/platform-provider-base.ts +8 -2
  32. package/src/service/service/entity/method/de-action.ts +38 -0
  33. package/src/service/service/file/file.service.ts +1 -0
  34. package/src/ui-action/provider/front-ui-action-provider.ts +2 -0
  35. package/src/utils/file-util/file-util.ts +12 -2
package/dist/index.esm.js CHANGED
@@ -20025,7 +20025,10 @@ var GlobalConfig = class {
20025
20025
  aiDisableSelectScope: false,
20026
20026
  aiEnableWorkSpace: true,
20027
20027
  aiFilePreviewMode: "DEFAULT",
20028
- isEmbedAiHeaderHidden: false
20028
+ isEmbedAiHeaderHidden: false,
20029
+ aiEnableBasicGroup: true,
20030
+ aiNewTopicParamMode: "ACTIVATED",
20031
+ aiProjectSelectPlaceholder: void 0
20029
20032
  };
20030
20033
  // 全局分页流布局配置
20031
20034
  this.drtab = {
@@ -35720,6 +35723,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
35720
35723
  return;
35721
35724
  ibiz.platform.backendExport({
35722
35725
  url,
35726
+ context: resultContext,
35723
35727
  params,
35724
35728
  method: "get",
35725
35729
  newWindow: !resultParams.srfcontenttype
@@ -35853,6 +35857,7 @@ var FrontUIActionProvider = class extends UIActionProviderBase {
35853
35857
  url,
35854
35858
  data: params,
35855
35859
  method: "post",
35860
+ context: resultContext,
35856
35861
  params: queryParam
35857
35862
  });
35858
35863
  }
@@ -69164,14 +69169,19 @@ var PlatformProviderBase = class {
69164
69169
  * @memberof PlatformProviderBase
69165
69170
  */
69166
69171
  async backendExport(args) {
69167
- const { baseURL, url, method, params, data, newWindow } = args;
69172
+ const { baseURL, url, method, context, params, data, newWindow } = args;
69168
69173
  if (data && Object.prototype.hasOwnProperty.call(data, "srfexportdataset")) {
69169
69174
  delete data.srfexportdataset;
69170
69175
  }
69171
69176
  if (data && Object.prototype.hasOwnProperty.call(data, "srfexportdatakey")) {
69172
69177
  delete data.srfexportdatakey;
69173
69178
  }
69174
- const response = await ibiz.net.request(url, {
69179
+ let { net } = ibiz;
69180
+ if (context) {
69181
+ const app = await ibiz.hub.getAppAsync(context.srfappid);
69182
+ net = app.net;
69183
+ }
69184
+ const response = await net.request(url, {
69175
69185
  data,
69176
69186
  method,
69177
69187
  params,
@@ -72337,6 +72347,7 @@ var FileService = class {
72337
72347
  url,
72338
72348
  data: params,
72339
72349
  method: "post",
72350
+ context,
72340
72351
  params: queryParam
72341
72352
  });
72342
72353
  }
@@ -74353,6 +74364,24 @@ var DEActionMethod = class extends Method {
74353
74364
  }
74354
74365
  return handleListMap(data);
74355
74366
  }
74367
+ /**
74368
+ * 查询、删除、更新操作容错处理(上下文不存在业务数据主键但数据存在数据主键,将数据主键合入至上下文中)
74369
+ *
74370
+ * @param {IContext} context 上下文
74371
+ * @param {(IData | IData[] | undefined)} data 数据对象
74372
+ * @param {string} methodTag 行为标识
74373
+ */
74374
+ mergeKeyIntoContext(context, data, methodTag) {
74375
+ var _a3;
74376
+ if (methodTag !== "GET" && methodTag !== "REMOVE" && methodTag !== "UPDATE") {
74377
+ return;
74378
+ }
74379
+ const contextKey = (_a3 = this.entity.codeName) == null ? void 0 : _a3.toLowerCase();
74380
+ const entityKey = this.entity.keyAppDEFieldId;
74381
+ if (contextKey && entityKey && data && !isArray10(data) && isNil36(context[contextKey]) && data.hasOwnProperty(entityKey)) {
74382
+ context[contextKey] = data[entityKey];
74383
+ }
74384
+ }
74356
74385
  async exec(context, data, params, header) {
74357
74386
  let result;
74358
74387
  if (!context.srfappid) {
@@ -74391,6 +74420,7 @@ var DEActionMethod = class extends Method {
74391
74420
  }
74392
74421
  }
74393
74422
  const methodTag = this.method.actionTag ? this.method.actionTag.toUpperCase() : this.method.codeName.toUpperCase();
74423
+ this.mergeKeyIntoContext(context, data, methodTag);
74394
74424
  if (this.method.beforeCode) {
74395
74425
  await ScriptFactory.asyncExecScriptFn(
74396
74426
  {
@@ -80352,8 +80382,13 @@ var FileUtil = class {
80352
80382
  * @returns {*} {Promise<IData[]>}
80353
80383
  * @memberof FileUtil
80354
80384
  */
80355
- async chooseFileAndUpload(context, params, data, option = {}) {
80356
- const { accept, multiple, showUploadManager, extraParams } = option;
80385
+ async chooseFileAndUpload(context, params, data, option) {
80386
+ const {
80387
+ accept,
80388
+ extraParams,
80389
+ multiple = false,
80390
+ showUploadManager = true
80391
+ } = option || {};
80357
80392
  const urls = ibiz.util.file.calcFileUpDownUrl(
80358
80393
  context,
80359
80394
  params,