@ibiz-template/core 0.7.41-alpha.1 → 0.7.41-alpha.101
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 +75 -15
- 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 +8 -1
- package/out/error/http-error/http-error.d.ts +2 -2
- package/out/error/http-error/http-error.d.ts.map +1 -1
- 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-devtool-config.d.ts +11 -1
- package/out/interface/api/environment/i-devtool-config.d.ts.map +1 -1
- package/out/interface/api/environment/i-environment.d.ts +138 -1
- package/out/interface/api/environment/i-environment.d.ts.map +1 -1
- package/out/interface/api/ibizsys/i-app-data.d.ts +57 -0
- package/out/interface/api/ibizsys/i-app-data.d.ts.map +1 -0
- package/out/interface/api/ibizsys/i-app-data.js +1 -0
- package/out/interface/api/ibizsys/i-org-data.d.ts +1 -1
- package/out/interface/api/ibizsys/index.d.ts +1 -0
- package/out/interface/api/ibizsys/index.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/api/utils/i-api-i18n.d.ts +9 -9
- package/out/interface/api/utils/index.d.ts +1 -0
- package/out/interface/api/utils/index.d.ts.map +1 -1
- package/out/interface/api/utils/message-center/base/i-message-base.d.ts +3 -3
- package/out/interface/api/utils/message-center/command/add-in-changed/i-command-add-in-changed.d.ts +1 -1
- package/out/interface/api/utils/message-center/command/async-action/i-command-async-action.d.ts +1 -1
- package/out/interface/api/utils/message-center/command/i-message-command.d.ts +1 -1
- package/out/interface/api/utils/message-center/command/internal-message/i-command-internal-message.d.ts +1 -1
- package/out/interface/api/utils/message-center/command/mark-open-data/i-command-mark-open-data.d.ts +1 -1
- package/out/interface/api/utils/message-center/common/i-message-center-event.d.ts +5 -0
- package/out/interface/api/utils/message-center/common/i-message-center-event.d.ts.map +1 -1
- package/out/interface/api/utils/message-center/common/i-portal-message.d.ts +3 -3
- package/out/interface/api/utils/message-center/console/i-message-console.d.ts +1 -1
- package/out/interface/api/utils/message-center/error/i-message-error.d.ts +1 -1
- package/out/interface/api/utils/message-center/i-message-center.d.ts +2 -2
- package/out/interface/api/utils/net/i-api-http-error.d.ts +39 -0
- package/out/interface/api/utils/net/i-api-http-error.d.ts.map +1 -0
- package/out/interface/api/utils/net/i-api-http-error.js +1 -0
- package/out/interface/api/utils/net/i-api-net.d.ts +1 -1
- 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 +11 -1
- package/out/utils/interceptor/core-interceptor.js +2 -1
- package/out/utils/net/http-response.d.ts +2 -1
- package/out/utils/net/http-response.d.ts.map +1 -1
- package/out/utils/net/http-response.js +5 -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 +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -3799,6 +3799,7 @@ var Environment = {
|
|
|
3799
3799
|
// 配置示例 DefaultOSSCat=cat
|
|
3800
3800
|
downloadFileUrl: "/ibizutil/download/{cat}",
|
|
3801
3801
|
uploadFileUrl: "/ibizutil/upload/{cat}",
|
|
3802
|
+
defaultOSSCat: "",
|
|
3802
3803
|
casLoginUrl: "",
|
|
3803
3804
|
loginMode: "DEFAULT" /* DEFAULT */,
|
|
3804
3805
|
menuPermissionMode: "MIXIN" /* MIXIN */,
|
|
@@ -3829,7 +3830,13 @@ var Environment = {
|
|
|
3829
3830
|
enableAI: true,
|
|
3830
3831
|
aMapSecurityJsCode: "",
|
|
3831
3832
|
aMapKey: "",
|
|
3832
|
-
runContainer: "
|
|
3833
|
+
runContainer: "DYNAENGINE",
|
|
3834
|
+
mobWeChatAppId: "",
|
|
3835
|
+
isPortalApp: false,
|
|
3836
|
+
isEnableMobLoading: false,
|
|
3837
|
+
mobLoadingCaption: "",
|
|
3838
|
+
mobLoadingDescription: "",
|
|
3839
|
+
mobLoadingBackground: ""
|
|
3833
3840
|
};
|
|
3834
3841
|
|
|
3835
3842
|
// src/error/http-error/http-error.ts
|
|
@@ -4419,6 +4426,7 @@ var CoreInterceptor = class extends Interceptor {
|
|
|
4419
4426
|
* @memberof CoreInterceptor
|
|
4420
4427
|
*/
|
|
4421
4428
|
async onResponseError(error) {
|
|
4429
|
+
var _a;
|
|
4422
4430
|
const { config, response } = error;
|
|
4423
4431
|
if (this.instance && (response == null ? void 0 : response.status) === 401 && config && !config._retry && config.url && // 排除获取系统信息、应用数据、刷新 token 预定义接口
|
|
4424
4432
|
(config.url.indexOf("/uaa/getbydcsystem/") === -1 || config.url.indexOf("/appdata") !== -1 || config.url.indexOf("/uaa/refresh_token/") !== -1)) {
|
|
@@ -4439,7 +4447,7 @@ var CoreInterceptor = class extends Interceptor {
|
|
|
4439
4447
|
}
|
|
4440
4448
|
const res = await ibiz.net.get(
|
|
4441
4449
|
"/appdata",
|
|
4442
|
-
ibiz.appUtil.getAppContext()
|
|
4450
|
+
(_a = ibiz.appUtil) == null ? void 0 : _a.getAppContext()
|
|
4443
4451
|
);
|
|
4444
4452
|
if (res && res.ok) {
|
|
4445
4453
|
ibiz.appData = res.data;
|
|
@@ -5050,9 +5058,10 @@ var HttpResponse = class {
|
|
|
5050
5058
|
* @param {unknown} [data] 返回的数据
|
|
5051
5059
|
* @param {number} [status] 状态码 (默认为 200)
|
|
5052
5060
|
* @param {string} [statusText] 状态描述 (默认为空字符)
|
|
5061
|
+
* @param {RawAxiosResponseHeaders | AxiosResponseHeaders} [headers] 响应头
|
|
5053
5062
|
* @memberof HttpResponse
|
|
5054
5063
|
*/
|
|
5055
|
-
constructor(data, status, statusText) {
|
|
5064
|
+
constructor(data, status, statusText, headers) {
|
|
5056
5065
|
/**
|
|
5057
5066
|
* @description 本地仿造响应
|
|
5058
5067
|
* @memberof HttpResponse
|
|
@@ -5069,6 +5078,9 @@ var HttpResponse = class {
|
|
|
5069
5078
|
if (this.status >= 200 && this.status < 300) {
|
|
5070
5079
|
this.ok = true;
|
|
5071
5080
|
}
|
|
5081
|
+
if (headers) {
|
|
5082
|
+
this.headers = headers;
|
|
5083
|
+
}
|
|
5072
5084
|
}
|
|
5073
5085
|
};
|
|
5074
5086
|
|
|
@@ -5452,10 +5464,8 @@ var StringUtil = class {
|
|
|
5452
5464
|
if (notNilEmpty2(params)) {
|
|
5453
5465
|
const strArr = str.match(this.paramsReg);
|
|
5454
5466
|
strArr == null ? void 0 : strArr.forEach((_key) => {
|
|
5455
|
-
const key = _key.slice(
|
|
5456
|
-
|
|
5457
|
-
str = str.replace("${params.".concat(key, "}"), params[key]);
|
|
5458
|
-
}
|
|
5467
|
+
const key = _key.slice(9, _key.length - 1);
|
|
5468
|
+
str = str.replace("${params.".concat(key, "}"), params[key] || "");
|
|
5459
5469
|
});
|
|
5460
5470
|
}
|
|
5461
5471
|
if (notNilEmpty2(data)) {
|
|
@@ -5842,9 +5852,18 @@ function calcMimeByFileName(fileName) {
|
|
|
5842
5852
|
case "tar":
|
|
5843
5853
|
mime = "application/x-tar";
|
|
5844
5854
|
break;
|
|
5845
|
-
case "
|
|
5855
|
+
case "xls":
|
|
5846
5856
|
mime = "application/vnd.ms-excel";
|
|
5847
5857
|
break;
|
|
5858
|
+
case "xlsx":
|
|
5859
|
+
mime = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
|
5860
|
+
break;
|
|
5861
|
+
case "pdf":
|
|
5862
|
+
mime = "application/pdf";
|
|
5863
|
+
break;
|
|
5864
|
+
case "html":
|
|
5865
|
+
mime = "text/html";
|
|
5866
|
+
break;
|
|
5848
5867
|
default:
|
|
5849
5868
|
mime = "";
|
|
5850
5869
|
}
|
|
@@ -6125,9 +6144,11 @@ async function setRemoteStyle(url) {
|
|
|
6125
6144
|
import { mergeDeepRight as mergeDeepRight2 } from "ramda";
|
|
6126
6145
|
var IterateOpts = {
|
|
6127
6146
|
/** 子集合属性数组 */
|
|
6128
|
-
childrenFields: ["children"]
|
|
6147
|
+
childrenFields: ["children"],
|
|
6148
|
+
/** 是否跳出当前操作 */
|
|
6149
|
+
isBreak: false
|
|
6129
6150
|
};
|
|
6130
|
-
var
|
|
6151
|
+
var ReturnError = new Error("\u4E2D\u65AD\u64CD\u4F5C");
|
|
6131
6152
|
function getChildField(parent, fields) {
|
|
6132
6153
|
var _a;
|
|
6133
6154
|
for (const field of fields) {
|
|
@@ -6136,14 +6157,25 @@ function getChildField(parent, fields) {
|
|
|
6136
6157
|
}
|
|
6137
6158
|
}
|
|
6138
6159
|
}
|
|
6160
|
+
function getChildFieldObj(parent, fields) {
|
|
6161
|
+
for (const field of fields) {
|
|
6162
|
+
if (parent[field]) {
|
|
6163
|
+
return parent[field];
|
|
6164
|
+
}
|
|
6165
|
+
}
|
|
6166
|
+
}
|
|
6139
6167
|
function _recursiveIterate(parent, callback, opts) {
|
|
6140
6168
|
const { childrenFields } = mergeDeepRight2(IterateOpts, opts || {});
|
|
6141
6169
|
const children = getChildField(parent, childrenFields);
|
|
6142
6170
|
if (children == null ? void 0 : children.length) {
|
|
6143
|
-
for (
|
|
6144
|
-
const
|
|
6145
|
-
|
|
6146
|
-
|
|
6171
|
+
for (let i = 0; i < children.length; i++) {
|
|
6172
|
+
const child = children[i];
|
|
6173
|
+
const result = callback(child, parent);
|
|
6174
|
+
if (result) {
|
|
6175
|
+
if (opts == null ? void 0 : opts.isBreak) {
|
|
6176
|
+
break;
|
|
6177
|
+
}
|
|
6178
|
+
throw ReturnError;
|
|
6147
6179
|
}
|
|
6148
6180
|
recursiveIterate(child, callback, opts);
|
|
6149
6181
|
}
|
|
@@ -6153,7 +6185,33 @@ function recursiveIterate(parent, callback, opts) {
|
|
|
6153
6185
|
try {
|
|
6154
6186
|
_recursiveIterate(parent, callback, opts);
|
|
6155
6187
|
} catch (error) {
|
|
6156
|
-
if (error !==
|
|
6188
|
+
if (error !== ReturnError) {
|
|
6189
|
+
throw error;
|
|
6190
|
+
}
|
|
6191
|
+
}
|
|
6192
|
+
}
|
|
6193
|
+
function _recursiveExecute(parent, callback, opts) {
|
|
6194
|
+
const { childrenFields } = mergeDeepRight2(IterateOpts, opts || {});
|
|
6195
|
+
const children = getChildFieldObj(parent, childrenFields);
|
|
6196
|
+
if (children) {
|
|
6197
|
+
for (let i = 0; i < Object.values(children).length; i++) {
|
|
6198
|
+
const child = Object.values(children)[i];
|
|
6199
|
+
const result = callback(child, parent);
|
|
6200
|
+
if (result) {
|
|
6201
|
+
if (opts == null ? void 0 : opts.isBreak) {
|
|
6202
|
+
break;
|
|
6203
|
+
}
|
|
6204
|
+
throw ReturnError;
|
|
6205
|
+
}
|
|
6206
|
+
_recursiveExecute(child, callback, opts);
|
|
6207
|
+
}
|
|
6208
|
+
}
|
|
6209
|
+
}
|
|
6210
|
+
function recursiveExecute(parent, callback, opts) {
|
|
6211
|
+
try {
|
|
6212
|
+
_recursiveExecute(parent, callback, opts);
|
|
6213
|
+
} catch (error) {
|
|
6214
|
+
if (error !== ReturnError) {
|
|
6157
6215
|
throw error;
|
|
6158
6216
|
}
|
|
6159
6217
|
}
|
|
@@ -6498,6 +6556,7 @@ export {
|
|
|
6498
6556
|
RuntimeModelError,
|
|
6499
6557
|
StringUtil,
|
|
6500
6558
|
UrlHelper,
|
|
6559
|
+
_recursiveExecute,
|
|
6501
6560
|
awaitTimeout,
|
|
6502
6561
|
base64ToBlob,
|
|
6503
6562
|
base64ToStr,
|
|
@@ -6535,6 +6594,7 @@ export {
|
|
|
6535
6594
|
mergeInLeft,
|
|
6536
6595
|
onClickOutside,
|
|
6537
6596
|
plus,
|
|
6597
|
+
recursiveExecute,
|
|
6538
6598
|
recursiveIterate,
|
|
6539
6599
|
resetAppCookie,
|
|
6540
6600
|
selectFile,
|