@ibiz-template/core 0.7.41-alpha.2 → 0.7.41-alpha.28
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 +60 -13
- package/dist/index.system.min.js +1 -1
- package/out/context/index.d.ts.map +1 -1
- package/out/environment/environment.d.ts.map +1 -1
- package/out/environment/environment.js +1 -0
- package/out/interface/api/chat-message/i-api-chat-message.d.ts +63 -0
- package/out/interface/api/chat-message/i-api-chat-message.d.ts.map +1 -0
- package/out/interface/api/chat-message/i-api-chat-message.js +1 -0
- package/out/interface/api/chat-message/index.d.ts +2 -0
- package/out/interface/api/chat-message/index.d.ts.map +1 -0
- package/out/interface/api/chat-message/index.js +1 -0
- package/out/interface/api/environment/i-environment.d.ts +6 -0
- package/out/interface/api/environment/i-environment.d.ts.map +1 -1
- package/out/interface/api/index.d.ts +1 -0
- package/out/interface/api/index.d.ts.map +1 -1
- package/out/interface/api/index.js +1 -0
- package/out/interface/i-chat-message/i-chat-message.d.ts +2 -49
- package/out/interface/i-chat-message/i-chat-message.d.ts.map +1 -1
- package/out/utils/download-file/download-file.d.ts.map +1 -1
- package/out/utils/download-file/download-file.js +6 -0
- package/out/utils/interceptor/core-interceptor.js +2 -1
- package/out/utils/net/net.d.ts +1 -1
- package/out/utils/net/net.d.ts.map +1 -1
- package/out/utils/recursive/find-recursive-child.d.ts +20 -0
- package/out/utils/recursive/find-recursive-child.d.ts.map +1 -1
- package/out/utils/recursive/find-recursive-child.js +69 -7
- package/out/utils/string-util/string-util.d.ts.map +1 -1
- package/out/utils/string-util/string-util.js +2 -4
- 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(
|
|
5456
|
-
|
|
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
|
}
|
|
@@ -6125,9 +6131,11 @@ async function setRemoteStyle(url) {
|
|
|
6125
6131
|
import { mergeDeepRight as mergeDeepRight2 } from "ramda";
|
|
6126
6132
|
var IterateOpts = {
|
|
6127
6133
|
/** 子集合属性数组 */
|
|
6128
|
-
childrenFields: ["children"]
|
|
6134
|
+
childrenFields: ["children"],
|
|
6135
|
+
/** 是否跳出当前操作 */
|
|
6136
|
+
isBreak: false
|
|
6129
6137
|
};
|
|
6130
|
-
var
|
|
6138
|
+
var ReturnError = new Error("\u4E2D\u65AD\u64CD\u4F5C");
|
|
6131
6139
|
function getChildField(parent, fields) {
|
|
6132
6140
|
var _a;
|
|
6133
6141
|
for (const field of fields) {
|
|
@@ -6136,14 +6144,25 @@ function getChildField(parent, fields) {
|
|
|
6136
6144
|
}
|
|
6137
6145
|
}
|
|
6138
6146
|
}
|
|
6147
|
+
function getChildFieldObj(parent, fields) {
|
|
6148
|
+
for (const field of fields) {
|
|
6149
|
+
if (parent[field]) {
|
|
6150
|
+
return parent[field];
|
|
6151
|
+
}
|
|
6152
|
+
}
|
|
6153
|
+
}
|
|
6139
6154
|
function _recursiveIterate(parent, callback, opts) {
|
|
6140
6155
|
const { childrenFields } = mergeDeepRight2(IterateOpts, opts || {});
|
|
6141
6156
|
const children = getChildField(parent, childrenFields);
|
|
6142
6157
|
if (children == null ? void 0 : children.length) {
|
|
6143
|
-
for (
|
|
6144
|
-
const
|
|
6145
|
-
|
|
6146
|
-
|
|
6158
|
+
for (let i = 0; i < children.length; i++) {
|
|
6159
|
+
const child = children[i];
|
|
6160
|
+
const result = callback(child, parent);
|
|
6161
|
+
if (result) {
|
|
6162
|
+
if (opts == null ? void 0 : opts.isBreak) {
|
|
6163
|
+
break;
|
|
6164
|
+
}
|
|
6165
|
+
throw ReturnError;
|
|
6147
6166
|
}
|
|
6148
6167
|
recursiveIterate(child, callback, opts);
|
|
6149
6168
|
}
|
|
@@ -6153,7 +6172,33 @@ function recursiveIterate(parent, callback, opts) {
|
|
|
6153
6172
|
try {
|
|
6154
6173
|
_recursiveIterate(parent, callback, opts);
|
|
6155
6174
|
} catch (error) {
|
|
6156
|
-
if (error !==
|
|
6175
|
+
if (error !== ReturnError) {
|
|
6176
|
+
throw error;
|
|
6177
|
+
}
|
|
6178
|
+
}
|
|
6179
|
+
}
|
|
6180
|
+
function _recursiveExecute(parent, callback, opts) {
|
|
6181
|
+
const { childrenFields } = mergeDeepRight2(IterateOpts, opts || {});
|
|
6182
|
+
const children = getChildFieldObj(parent, childrenFields);
|
|
6183
|
+
if (children) {
|
|
6184
|
+
for (let i = 0; i < Object.values(children).length; i++) {
|
|
6185
|
+
const child = Object.values(children)[i];
|
|
6186
|
+
const result = callback(child, parent);
|
|
6187
|
+
if (result) {
|
|
6188
|
+
if (opts == null ? void 0 : opts.isBreak) {
|
|
6189
|
+
break;
|
|
6190
|
+
}
|
|
6191
|
+
throw ReturnError;
|
|
6192
|
+
}
|
|
6193
|
+
_recursiveExecute(child, callback, opts);
|
|
6194
|
+
}
|
|
6195
|
+
}
|
|
6196
|
+
}
|
|
6197
|
+
function recursiveExecute(parent, callback, opts) {
|
|
6198
|
+
try {
|
|
6199
|
+
_recursiveExecute(parent, callback, opts);
|
|
6200
|
+
} catch (error) {
|
|
6201
|
+
if (error !== ReturnError) {
|
|
6157
6202
|
throw error;
|
|
6158
6203
|
}
|
|
6159
6204
|
}
|
|
@@ -6498,6 +6543,7 @@ export {
|
|
|
6498
6543
|
RuntimeModelError,
|
|
6499
6544
|
StringUtil,
|
|
6500
6545
|
UrlHelper,
|
|
6546
|
+
_recursiveExecute,
|
|
6501
6547
|
awaitTimeout,
|
|
6502
6548
|
base64ToBlob,
|
|
6503
6549
|
base64ToStr,
|
|
@@ -6535,6 +6581,7 @@ export {
|
|
|
6535
6581
|
mergeInLeft,
|
|
6536
6582
|
onClickOutside,
|
|
6537
6583
|
plus,
|
|
6584
|
+
recursiveExecute,
|
|
6538
6585
|
recursiveIterate,
|
|
6539
6586
|
resetAppCookie,
|
|
6540
6587
|
selectFile,
|