@ibiz-template/core 0.7.41-alpha.2 → 0.7.41-alpha.23

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 (27) hide show
  1. package/dist/index.esm.js +43 -6
  2. package/dist/index.system.min.js +1 -1
  3. package/out/context/index.d.ts.map +1 -1
  4. package/out/environment/environment.d.ts.map +1 -1
  5. package/out/environment/environment.js +1 -0
  6. package/out/interface/api/chat-message/i-api-chat-message.d.ts +63 -0
  7. package/out/interface/api/chat-message/i-api-chat-message.d.ts.map +1 -0
  8. package/out/interface/api/chat-message/i-api-chat-message.js +1 -0
  9. package/out/interface/api/chat-message/index.d.ts +2 -0
  10. package/out/interface/api/chat-message/index.d.ts.map +1 -0
  11. package/out/interface/api/chat-message/index.js +1 -0
  12. package/out/interface/api/environment/i-environment.d.ts +6 -0
  13. package/out/interface/api/environment/i-environment.d.ts.map +1 -1
  14. package/out/interface/api/index.d.ts +1 -0
  15. package/out/interface/api/index.d.ts.map +1 -1
  16. package/out/interface/api/index.js +1 -0
  17. package/out/interface/i-chat-message/i-chat-message.d.ts +2 -49
  18. package/out/interface/i-chat-message/i-chat-message.d.ts.map +1 -1
  19. package/out/utils/download-file/download-file.d.ts.map +1 -1
  20. package/out/utils/download-file/download-file.js +6 -0
  21. package/out/utils/interceptor/core-interceptor.js +2 -1
  22. package/out/utils/recursive/find-recursive-child.d.ts +16 -0
  23. package/out/utils/recursive/find-recursive-child.d.ts.map +1 -1
  24. package/out/utils/recursive/find-recursive-child.js +52 -0
  25. package/out/utils/string-util/string-util.d.ts.map +1 -1
  26. package/out/utils/string-util/string-util.js +2 -4
  27. package/package.json +2 -2
package/dist/index.esm.js CHANGED
@@ -3829,7 +3829,8 @@ var Environment = {
3829
3829
  enableAI: true,
3830
3830
  aMapSecurityJsCode: "",
3831
3831
  aMapKey: "",
3832
- runContainer: "DYNAENGINE"
3832
+ runContainer: "DYNAENGINE",
3833
+ mobWeChatAppId: ""
3833
3834
  };
3834
3835
 
3835
3836
  // src/error/http-error/http-error.ts
@@ -4419,6 +4420,7 @@ var CoreInterceptor = class extends Interceptor {
4419
4420
  * @memberof CoreInterceptor
4420
4421
  */
4421
4422
  async onResponseError(error) {
4423
+ var _a;
4422
4424
  const { config, response } = error;
4423
4425
  if (this.instance && (response == null ? void 0 : response.status) === 401 && config && !config._retry && config.url && // 排除获取系统信息、应用数据、刷新 token 预定义接口
4424
4426
  (config.url.indexOf("/uaa/getbydcsystem/") === -1 || config.url.indexOf("/appdata") !== -1 || config.url.indexOf("/uaa/refresh_token/") !== -1)) {
@@ -4439,7 +4441,7 @@ var CoreInterceptor = class extends Interceptor {
4439
4441
  }
4440
4442
  const res = await ibiz.net.get(
4441
4443
  "/appdata",
4442
- ibiz.appUtil.getAppContext()
4444
+ (_a = ibiz.appUtil) == null ? void 0 : _a.getAppContext()
4443
4445
  );
4444
4446
  if (res && res.ok) {
4445
4447
  ibiz.appData = res.data;
@@ -5452,10 +5454,8 @@ var StringUtil = class {
5452
5454
  if (notNilEmpty2(params)) {
5453
5455
  const strArr = str.match(this.paramsReg);
5454
5456
  strArr == null ? void 0 : strArr.forEach((_key) => {
5455
- const key = _key.slice(8, _key.length - 1);
5456
- if (params[key]) {
5457
- str = str.replace("${params.".concat(key, "}"), params[key]);
5458
- }
5457
+ const key = _key.slice(9, _key.length - 1);
5458
+ str = str.replace("${params.".concat(key, "}"), params[key] || "");
5459
5459
  });
5460
5460
  }
5461
5461
  if (notNilEmpty2(data)) {
@@ -5845,6 +5845,12 @@ function calcMimeByFileName(fileName) {
5845
5845
  case "xlsx":
5846
5846
  mime = "application/vnd.ms-excel";
5847
5847
  break;
5848
+ case "pdf":
5849
+ mime = "application/pdf";
5850
+ break;
5851
+ case "html":
5852
+ mime = "text/html";
5853
+ break;
5848
5854
  default:
5849
5855
  mime = "";
5850
5856
  }
@@ -6136,6 +6142,13 @@ function getChildField(parent, fields) {
6136
6142
  }
6137
6143
  }
6138
6144
  }
6145
+ function getChildFieldObj(parent, fields) {
6146
+ for (const field of fields) {
6147
+ if (parent[field]) {
6148
+ return parent[field];
6149
+ }
6150
+ }
6151
+ }
6139
6152
  function _recursiveIterate(parent, callback, opts) {
6140
6153
  const { childrenFields } = mergeDeepRight2(IterateOpts, opts || {});
6141
6154
  const children = getChildField(parent, childrenFields);
@@ -6158,6 +6171,28 @@ function recursiveIterate(parent, callback, opts) {
6158
6171
  }
6159
6172
  }
6160
6173
  }
6174
+ function _recursiveExecute(parent, callback, opts) {
6175
+ const { childrenFields } = mergeDeepRight2(IterateOpts, opts || {});
6176
+ const children = getChildFieldObj(parent, childrenFields);
6177
+ if (children) {
6178
+ for (const child of Object.values(children)) {
6179
+ const isBreak = callback(child, parent);
6180
+ if (isBreak) {
6181
+ throw BreakError;
6182
+ }
6183
+ _recursiveExecute(child, callback, opts);
6184
+ }
6185
+ }
6186
+ }
6187
+ function recursiveExecute(parent, callback, opts) {
6188
+ try {
6189
+ _recursiveExecute(parent, callback, opts);
6190
+ } catch (error) {
6191
+ if (error !== BreakError) {
6192
+ throw error;
6193
+ }
6194
+ }
6195
+ }
6161
6196
  var CompareOpts = {
6162
6197
  ...IterateOpts,
6163
6198
  /** 比较的属性 */
@@ -6498,6 +6533,7 @@ export {
6498
6533
  RuntimeModelError,
6499
6534
  StringUtil,
6500
6535
  UrlHelper,
6536
+ _recursiveExecute,
6501
6537
  awaitTimeout,
6502
6538
  base64ToBlob,
6503
6539
  base64ToStr,
@@ -6535,6 +6571,7 @@ export {
6535
6571
  mergeInLeft,
6536
6572
  onClickOutside,
6537
6573
  plus,
6574
+ recursiveExecute,
6538
6575
  recursiveIterate,
6539
6576
  resetAppCookie,
6540
6577
  selectFile,