yach.open.jssdk 4.4.5-beta.1 → 4.4.5-beta.3
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/yach_jssdk_4.4.5-beta.3.js +1 -0
- package/es/api/biz/util/getConfig.d.ts +13 -0
- package/es/api/biz/util/getConfig.js +19 -0
- package/es/api/biz/util/knowledgeBaseSelect.js +9 -1
- package/es/api/biz/util/knowledgeSelectParams.d.ts +14 -0
- package/es/api/biz/util/knowledgeSelectParams.js +19 -0
- package/es/api/biz/util/mediaFileUploadV2.d.ts +26 -0
- package/es/api/biz/util/mediaFileUploadV2.js +15 -0
- package/es/api/biz/util/openMediaFileDialogV2.d.ts +23 -0
- package/es/api/biz/util/openMediaFileDialogV2.js +16 -0
- package/es/api/biz/util/openPublish.d.ts +2 -2
- package/es/api/primary/updateTab.d.ts +9 -0
- package/es/api/primary/updateTab.js +15 -0
- package/es/index.d.ts +11 -1
- package/es/index.js +12 -2
- package/es/lib/helper/pcIframe.d.ts +8 -25
- package/es/lib/helper/pcIframe.js +29 -5
- package/es/lib/sdk/sdk.typings.d.ts +1 -0
- package/es/utils/env.js +4 -2
- package/libs/api/biz/util/getConfig.d.ts +13 -0
- package/libs/api/biz/util/getConfig.js +26 -0
- package/libs/api/biz/util/knowledgeBaseSelect.js +9 -1
- package/libs/api/biz/util/knowledgeSelectParams.d.ts +14 -0
- package/libs/api/biz/util/knowledgeSelectParams.js +26 -0
- package/libs/api/biz/util/mediaFileUploadV2.d.ts +26 -0
- package/libs/api/biz/util/mediaFileUploadV2.js +23 -0
- package/libs/api/biz/util/openMediaFileDialogV2.d.ts +23 -0
- package/libs/api/biz/util/openMediaFileDialogV2.js +24 -0
- package/libs/api/biz/util/openPublish.d.ts +2 -2
- package/libs/api/primary/updateTab.d.ts +9 -0
- package/libs/api/primary/updateTab.js +22 -0
- package/libs/index.d.ts +11 -1
- package/libs/index.js +41 -1
- package/libs/lib/helper/pcIframe.d.ts +8 -25
- package/libs/lib/helper/pcIframe.js +29 -5
- package/libs/lib/sdk/sdk.typings.d.ts +1 -0
- package/libs/utils/env.js +4 -2
- package/package.json +1 -1
- package/dist/yach_jssdk_4.4.3-beta5.js +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IError } from '../../common.typings';
|
|
2
|
+
export interface GetConfigResult {
|
|
3
|
+
code: number;
|
|
4
|
+
message: string;
|
|
5
|
+
data: any;
|
|
6
|
+
}
|
|
7
|
+
export interface GetConfigParams {
|
|
8
|
+
configNode: String;
|
|
9
|
+
onSuccess?: (res: GetConfigResult) => void;
|
|
10
|
+
onFail?: (err: IError) => void;
|
|
11
|
+
}
|
|
12
|
+
declare function getConfig(params: GetConfigParams): void;
|
|
13
|
+
export { getConfig };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.getConfig = getConfig;
|
|
9
|
+
var _initAPI = _interopRequireDefault(require("../../initAPI"));
|
|
10
|
+
var ios = {
|
|
11
|
+
vs: '1.9.12'
|
|
12
|
+
};
|
|
13
|
+
var android = {
|
|
14
|
+
vs: '1.9.12'
|
|
15
|
+
};
|
|
16
|
+
var platform = {
|
|
17
|
+
ios: ios,
|
|
18
|
+
android: android
|
|
19
|
+
};
|
|
20
|
+
var apiName = 'biz.util.getConfig';
|
|
21
|
+
function getConfig(params) {
|
|
22
|
+
(0, _initAPI["default"])(apiName, {
|
|
23
|
+
params: params,
|
|
24
|
+
platform: platform
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -10,8 +10,16 @@ var _initAPI = _interopRequireDefault(require("../../initAPI"));
|
|
|
10
10
|
var pc = {
|
|
11
11
|
vs: '1.8.8'
|
|
12
12
|
};
|
|
13
|
+
var ios = {
|
|
14
|
+
vs: '1.9.12'
|
|
15
|
+
};
|
|
16
|
+
var android = {
|
|
17
|
+
vs: '1.9.12'
|
|
18
|
+
};
|
|
13
19
|
var platform = {
|
|
14
|
-
pc: pc
|
|
20
|
+
pc: pc,
|
|
21
|
+
ios: ios,
|
|
22
|
+
android: android
|
|
15
23
|
};
|
|
16
24
|
var apiName = 'biz.util.knowledgeBaseSelect';
|
|
17
25
|
function knowledgeBaseSelect(params) {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IError } from '../../common.typings';
|
|
2
|
+
export interface KnowledgeSelectParamsResult {
|
|
3
|
+
code: number;
|
|
4
|
+
message: string;
|
|
5
|
+
data: any;
|
|
6
|
+
}
|
|
7
|
+
export interface KnowledgeSelectParams {
|
|
8
|
+
type: number;
|
|
9
|
+
result: KnowledgeSelectParamsResult;
|
|
10
|
+
onSuccess?: (res: KnowledgeSelectParamsResult) => void;
|
|
11
|
+
onFail?: (err: IError) => void;
|
|
12
|
+
}
|
|
13
|
+
declare function knowledgeSelectParams(params: KnowledgeSelectParams): void;
|
|
14
|
+
export { knowledgeSelectParams };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.knowledgeSelectParams = knowledgeSelectParams;
|
|
9
|
+
var _initAPI = _interopRequireDefault(require("../../initAPI"));
|
|
10
|
+
var ios = {
|
|
11
|
+
vs: '1.9.12'
|
|
12
|
+
};
|
|
13
|
+
var android = {
|
|
14
|
+
vs: '1.9.12'
|
|
15
|
+
};
|
|
16
|
+
var platform = {
|
|
17
|
+
ios: ios,
|
|
18
|
+
android: android
|
|
19
|
+
};
|
|
20
|
+
var apiName = 'biz.util.knowledgeSelectParams';
|
|
21
|
+
function knowledgeSelectParams(params) {
|
|
22
|
+
(0, _initAPI["default"])(apiName, {
|
|
23
|
+
params: params,
|
|
24
|
+
platform: platform
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IError } from '../../common.typings';
|
|
2
|
+
export interface IBizUtilFileUploadProgress {
|
|
3
|
+
loaded: number;
|
|
4
|
+
total: number;
|
|
5
|
+
speed: number;
|
|
6
|
+
percent: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IBizUtilFileUploadResult {
|
|
9
|
+
data?: {
|
|
10
|
+
fileId?: string;
|
|
11
|
+
filePath?: string;
|
|
12
|
+
fileName?: string;
|
|
13
|
+
sourcePath?: string;
|
|
14
|
+
relation_id?: string;
|
|
15
|
+
videoPic?: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface IBizUtilFileUploadParams {
|
|
19
|
+
/** 支持上传附件的文件类型,至少一个,支持多种类型 */
|
|
20
|
+
files?: Array<Object>;
|
|
21
|
+
onSuccess?: (data: IBizUtilFileUploadResult) => void;
|
|
22
|
+
onFail?: (err: IError) => void;
|
|
23
|
+
onProgress?: (data: IBizUtilFileUploadProgress) => void;
|
|
24
|
+
}
|
|
25
|
+
declare function mediaFileUploadV2(params: IBizUtilFileUploadParams): void;
|
|
26
|
+
export { mediaFileUploadV2 };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.mediaFileUploadV2 = mediaFileUploadV2;
|
|
9
|
+
var _initAPI = _interopRequireDefault(require("../../initAPI"));
|
|
10
|
+
/*
|
|
11
|
+
* @Descripttion:
|
|
12
|
+
* @Author: olei<wangzheng_jzb@100tal.com>
|
|
13
|
+
* @Date: 2020-09-08 17:15:21
|
|
14
|
+
* @LastEditors: olei<wangzheng_jzb@100tal.com>
|
|
15
|
+
* @LastEditTime: 2020-09-15 11:48:01
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
var apiName = 'biz.util.mediaFileUploadV2';
|
|
19
|
+
function mediaFileUploadV2(params) {
|
|
20
|
+
(0, _initAPI["default"])(apiName, {
|
|
21
|
+
params: params
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IError } from '../../common.typings';
|
|
2
|
+
export interface IBizUtilOpenFileDialogResult {
|
|
3
|
+
data?: {
|
|
4
|
+
files?: Array<Object>;
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
export interface IBizUtilOpenFileDialogParams {
|
|
8
|
+
/** multiple是否支持多文件 */
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
/** 支持图片附件的文件类型 */
|
|
11
|
+
imageOpt?: {
|
|
12
|
+
max?: Number;
|
|
13
|
+
};
|
|
14
|
+
/** 支持视频附件的文件类型 */
|
|
15
|
+
videoOpt?: {
|
|
16
|
+
max?: Number;
|
|
17
|
+
duration?: Number;
|
|
18
|
+
};
|
|
19
|
+
onSuccess?: (data: IBizUtilOpenFileDialogResult) => void;
|
|
20
|
+
onFail?: (err: IError) => void;
|
|
21
|
+
}
|
|
22
|
+
declare function openMediaFileDialogV2(params: IBizUtilOpenFileDialogParams): void;
|
|
23
|
+
export { openMediaFileDialogV2 };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.openMediaFileDialogV2 = openMediaFileDialogV2;
|
|
9
|
+
var _initAPI = _interopRequireDefault(require("../../initAPI"));
|
|
10
|
+
/*
|
|
11
|
+
* @Descripttion:
|
|
12
|
+
* @Author: zhangyong<zhangyong_jzb@100tal.com>
|
|
13
|
+
* @Date: 2025-07-28 17:15:05
|
|
14
|
+
* @LastEditors: zhangyong<zhangyong_jzb@100tal.com>
|
|
15
|
+
* @LastEditTime: 2025-07-28 17:16:05
|
|
16
|
+
* 新增文件选择器——针对移动端专用——支持ios文件导出
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
var apiName = 'biz.util.openMediaFileDialogV2';
|
|
20
|
+
function openMediaFileDialogV2(params) {
|
|
21
|
+
(0, _initAPI["default"])(apiName, {
|
|
22
|
+
params: params
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -7,10 +7,10 @@ export interface IOpenPublishResult {
|
|
|
7
7
|
export interface IOpenPublishParams {
|
|
8
8
|
squadId?: string;
|
|
9
9
|
squadName?: string;
|
|
10
|
-
|
|
10
|
+
source: string;
|
|
11
11
|
multiple?: boolean;
|
|
12
12
|
topicType: '0' | '1' | '2';
|
|
13
|
-
|
|
13
|
+
topicTypeMultiple?: boolean;
|
|
14
14
|
content?: string;
|
|
15
15
|
pic?: string;
|
|
16
16
|
video?: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IError } from '../common.typings';
|
|
2
|
+
export interface IPrimaryUpdateTab {
|
|
3
|
+
/** 应用标题 */
|
|
4
|
+
title?: string;
|
|
5
|
+
onSuccess?: () => void;
|
|
6
|
+
onFail?: (err: IError) => void;
|
|
7
|
+
}
|
|
8
|
+
declare function updateTab(params: IPrimaryUpdateTab): void;
|
|
9
|
+
export { updateTab };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property");
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
|
5
|
+
_Object$defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.updateTab = updateTab;
|
|
9
|
+
var _initAPI = _interopRequireDefault(require("../initAPI"));
|
|
10
|
+
var apiName = 'primary.updateTab';
|
|
11
|
+
var pc = {
|
|
12
|
+
vs: '1.9.12'
|
|
13
|
+
};
|
|
14
|
+
var platform = {
|
|
15
|
+
pc: pc
|
|
16
|
+
};
|
|
17
|
+
function updateTab(params) {
|
|
18
|
+
(0, _initAPI["default"])(apiName, {
|
|
19
|
+
params: params,
|
|
20
|
+
platform: platform
|
|
21
|
+
});
|
|
22
|
+
}
|
package/libs/index.d.ts
CHANGED
|
@@ -24,7 +24,9 @@ import { remind } from './api/biz/util/remind';
|
|
|
24
24
|
import { takePicture } from './api/biz/util/takePicture';
|
|
25
25
|
import { openVideoPlayer } from './api/biz/util/openVideoPlayer';
|
|
26
26
|
import { openMediaFileDialog } from './api/biz/util/openMediaFileDialog';
|
|
27
|
+
import { openMediaFileDialogV2 } from './api/biz/util/openMediaFileDialogV2';
|
|
27
28
|
import { mediaFileUpload } from './api/biz/util/mediaFileUpload';
|
|
29
|
+
import { mediaFileUploadV2 } from './api/biz/util/mediaFileUploadV2';
|
|
28
30
|
import { invoice } from './api/biz/util/invoice';
|
|
29
31
|
import { pushWorkMsg } from './api/biz/util/pushWorkMsg';
|
|
30
32
|
import { openTalYoungToTopic } from './api/biz/util/openTalYoungToTopic';
|
|
@@ -51,10 +53,12 @@ import { weeklyRead } from './api/biz/util/weeklyRead';
|
|
|
51
53
|
import { disableScreenCapture } from './api/biz/util/disableScreenCapture';
|
|
52
54
|
import { openFutureGroup } from './api/biz/util/openFutureGroup';
|
|
53
55
|
import { knowledgeBaseSelect } from './api/biz/util/knowledgeBaseSelect';
|
|
56
|
+
import { knowledgeSelectParams } from './api/biz/util/knowledgeSelectParams';
|
|
54
57
|
import { lorebaseShowList } from './api/biz/util/lorebaseShowList';
|
|
55
58
|
import { lorebaseRefreshNodeWebview } from './api/biz/util/lorebaseRefreshNodeWebview';
|
|
56
59
|
import { copy } from './api/biz/util/copy';
|
|
57
60
|
import { openPublish } from './api/biz/util/openPublish';
|
|
61
|
+
import { getConfig } from './api/biz/util/getConfig';
|
|
58
62
|
/**navigation*/
|
|
59
63
|
import { setIcon } from './api/biz/navigation/setIcon';
|
|
60
64
|
import { setTitle } from './api/biz/navigation/setTitle';
|
|
@@ -84,6 +88,7 @@ import { openTeamChat } from './api/biz/chat/openTeamChat';
|
|
|
84
88
|
import { openSquad } from './api/biz/chat/openSquad';
|
|
85
89
|
import { sendP2PMsg } from './api/biz/chat/sendP2PMsg';
|
|
86
90
|
import { createTab } from './api/primary/createTab';
|
|
91
|
+
import { updateTab } from './api/primary/updateTab';
|
|
87
92
|
import { weeklyShare } from './api/primary/weeklyShare';
|
|
88
93
|
import { fullScreen } from './api/primary/fullScreen';
|
|
89
94
|
import { exitFullScreen } from './api/primary/exitFullScreen';
|
|
@@ -135,7 +140,7 @@ import { send as webViewMessageSend } from './api/biz/webViewMessage/send';
|
|
|
135
140
|
import { talYoungFilesUpload } from './api/app/custom/talYoungFilesUpload';
|
|
136
141
|
import { addAppToNav } from './api/biz/util/addAppToNav';
|
|
137
142
|
declare const version: string, sdkVersion: string, env: import("./lib/sdk/sdk.typings").IENV, platform: import("./lib/sdk/sdk.typings").ENV_ENUM, platformV2: import("./lib/sdk/sdk.typings").PlatformV2Props, config: (configParams: import("./lib/sdk/sdk.typings").IConfigParams) => void, ready: (readyCallback: () => void) => void, error: (callback: (err: any) => void) => void, on: (methodName: string, listener: (e: any) => void) => void, off: (methodName: string, listener: (e: any) => void) => void;
|
|
138
|
-
export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, injectScript, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, weeklyShare, fullScreen, exitFullScreen, showPreloader, showCustomOverlayContent, hidePreloader, hideCustomOverlayContent, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, writeLog, flushLog, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openVideoPlayer, openMediaFileDialog, mediaFileUpload, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, assistantCreate, yachEvent, topicEvent, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, tencentMeeting, tencentMeetingBegin, createModifySchedule, onlineDocmentOpenTeamChat, entergroupCheck, resetSessionUnread, weeklyRead, openFutureGroup, knowledgeBaseSelect, lorebaseShowList, lorebaseRefreshNodeWebview, openPublish, setLight, openUserSchedule, disableScreenCapture, setPanGestureEnable, addAppToNav, copy, capturePage, };
|
|
143
|
+
export { version, sdkVersion, env, platform, platformV2, config, ready, error, on, off, openLink, feedback, open, openSlidePanel, share, previewFile, previewImage, downloadFile, uploadAttachment, clipboardFileUpload, proxy, datepicker, scan, chosen, openSingleWebview, getSingleWebviewData, injectScript, closeWindow, showCallMenu, call, setIcon, setTitle, setMenu, close, replacePage, quit, setRight, setTitleExpandIcon, updateExpandTitle, setLeft, goBack, complexPicker, departmentsPicker, groupComplexPicker, chooseConversationByCorpId, pickConversation, openSingleChat, openTeamChat, openSquad, sendP2PMsg, mapView, multipointView, requestAuthCode, createTab, updateTab, weeklyShare, fullScreen, exitFullScreen, showPreloader, showCustomOverlayContent, hidePreloader, hideCustomOverlayContent, vibrate, toast, alert, confirm, getPhoneInfo, getUUID, checkStepPermission, getGeolocation, getGeolocationSwitch, getLang, startRecord, stopRecord, onRecordEnd, downloadAudio, playAudio, pauseAudio, stopAudio, onPlayEnd, resumeAudio, getNetworkType, isAtTal, webViewBounceDisable, pullToRefreshEnable, pullToRefreshStop, pullToRefreshDisable, getItem, setItem, removeItem, writeLog, flushLog, remind, takePicture, datetimepicker, actionSheet, webViewMessageSend, talYoungFilesUpload, openVideoPlayer, openMediaFileDialog, openMediaFileDialogV2, mediaFileUpload, mediaFileUploadV2, invoice, pushWorkMsg, openTalYoungToTopic, getToken, authStart, authFinish, assistantCreate, yachEvent, topicEvent, openTogetherEyeWebview, getTogetherConfig, rouseApp, externalLinkPreviewFile, savePic, zfbAuth, complain, onRecordEnd_v2, startRecord_v2, stopRecord_v2, selectDepartment, setWindowBig, tencentMeeting, tencentMeetingBegin, createModifySchedule, onlineDocmentOpenTeamChat, entergroupCheck, resetSessionUnread, weeklyRead, openFutureGroup, knowledgeBaseSelect, knowledgeSelectParams, lorebaseShowList, lorebaseRefreshNodeWebview, openPublish, setLight, openUserSchedule, disableScreenCapture, setPanGestureEnable, addAppToNav, copy, capturePage, getConfig, };
|
|
139
144
|
declare const _default: {
|
|
140
145
|
version: string;
|
|
141
146
|
sdkVersion: string;
|
|
@@ -177,7 +182,9 @@ declare const _default: {
|
|
|
177
182
|
takePicture: typeof takePicture;
|
|
178
183
|
openVideoPlayer: typeof openVideoPlayer;
|
|
179
184
|
openMediaFileDialog: typeof openMediaFileDialog;
|
|
185
|
+
openMediaFileDialogV2: typeof openMediaFileDialogV2;
|
|
180
186
|
mediaFileUpload: typeof mediaFileUpload;
|
|
187
|
+
mediaFileUploadV2: typeof mediaFileUploadV2;
|
|
181
188
|
invoice: typeof invoice;
|
|
182
189
|
pushWorkMsg: typeof pushWorkMsg;
|
|
183
190
|
openTalYoungToTopic: typeof openTalYoungToTopic;
|
|
@@ -200,11 +207,13 @@ declare const _default: {
|
|
|
200
207
|
disableScreenCapture: typeof disableScreenCapture;
|
|
201
208
|
addAppToNav: typeof addAppToNav;
|
|
202
209
|
knowledgeBaseSelect: typeof knowledgeBaseSelect;
|
|
210
|
+
knowledgeSelectParams: typeof knowledgeSelectParams;
|
|
203
211
|
lorebaseShowList: typeof lorebaseShowList;
|
|
204
212
|
lorebaseRefreshNodeWebview: typeof lorebaseRefreshNodeWebview;
|
|
205
213
|
copy: typeof copy;
|
|
206
214
|
openPublish: typeof openPublish;
|
|
207
215
|
capturePage: typeof capturePage;
|
|
216
|
+
getConfig: typeof getConfig;
|
|
208
217
|
};
|
|
209
218
|
telephone: {
|
|
210
219
|
showCallMenu: typeof showCallMenu;
|
|
@@ -257,6 +266,7 @@ declare const _default: {
|
|
|
257
266
|
};
|
|
258
267
|
primary: {
|
|
259
268
|
createTab: typeof createTab;
|
|
269
|
+
updateTab: typeof updateTab;
|
|
260
270
|
weeklyShare: typeof weeklyShare;
|
|
261
271
|
fullScreen: typeof fullScreen;
|
|
262
272
|
exitFullScreen: typeof exitFullScreen;
|
package/libs/index.js
CHANGED
|
@@ -199,6 +199,12 @@ _Object$defineProperty(exports, "fullScreen", {
|
|
|
199
199
|
return _fullScreen.fullScreen;
|
|
200
200
|
}
|
|
201
201
|
});
|
|
202
|
+
_Object$defineProperty(exports, "getConfig", {
|
|
203
|
+
enumerable: true,
|
|
204
|
+
get: function get() {
|
|
205
|
+
return _getConfig.getConfig;
|
|
206
|
+
}
|
|
207
|
+
});
|
|
202
208
|
_Object$defineProperty(exports, "getGeolocation", {
|
|
203
209
|
enumerable: true,
|
|
204
210
|
get: function get() {
|
|
@@ -307,6 +313,12 @@ _Object$defineProperty(exports, "knowledgeBaseSelect", {
|
|
|
307
313
|
return _knowledgeBaseSelect.knowledgeBaseSelect;
|
|
308
314
|
}
|
|
309
315
|
});
|
|
316
|
+
_Object$defineProperty(exports, "knowledgeSelectParams", {
|
|
317
|
+
enumerable: true,
|
|
318
|
+
get: function get() {
|
|
319
|
+
return _knowledgeSelectParams.knowledgeSelectParams;
|
|
320
|
+
}
|
|
321
|
+
});
|
|
310
322
|
_Object$defineProperty(exports, "lorebaseRefreshNodeWebview", {
|
|
311
323
|
enumerable: true,
|
|
312
324
|
get: function get() {
|
|
@@ -331,6 +343,12 @@ _Object$defineProperty(exports, "mediaFileUpload", {
|
|
|
331
343
|
return _mediaFileUpload.mediaFileUpload;
|
|
332
344
|
}
|
|
333
345
|
});
|
|
346
|
+
_Object$defineProperty(exports, "mediaFileUploadV2", {
|
|
347
|
+
enumerable: true,
|
|
348
|
+
get: function get() {
|
|
349
|
+
return _mediaFileUploadV.mediaFileUploadV2;
|
|
350
|
+
}
|
|
351
|
+
});
|
|
334
352
|
_Object$defineProperty(exports, "multipointView", {
|
|
335
353
|
enumerable: true,
|
|
336
354
|
get: function get() {
|
|
@@ -386,6 +404,12 @@ _Object$defineProperty(exports, "openMediaFileDialog", {
|
|
|
386
404
|
return _openMediaFileDialog.openMediaFileDialog;
|
|
387
405
|
}
|
|
388
406
|
});
|
|
407
|
+
_Object$defineProperty(exports, "openMediaFileDialogV2", {
|
|
408
|
+
enumerable: true,
|
|
409
|
+
get: function get() {
|
|
410
|
+
return _openMediaFileDialogV.openMediaFileDialogV2;
|
|
411
|
+
}
|
|
412
|
+
});
|
|
389
413
|
_Object$defineProperty(exports, "openPublish", {
|
|
390
414
|
enumerable: true,
|
|
391
415
|
get: function get() {
|
|
@@ -737,6 +761,12 @@ _Object$defineProperty(exports, "updateExpandTitle", {
|
|
|
737
761
|
return _updateExpandTitle.updateExpandTitle;
|
|
738
762
|
}
|
|
739
763
|
});
|
|
764
|
+
_Object$defineProperty(exports, "updateTab", {
|
|
765
|
+
enumerable: true,
|
|
766
|
+
get: function get() {
|
|
767
|
+
return _updateTab.updateTab;
|
|
768
|
+
}
|
|
769
|
+
});
|
|
740
770
|
_Object$defineProperty(exports, "uploadAttachment", {
|
|
741
771
|
enumerable: true,
|
|
742
772
|
get: function get() {
|
|
@@ -818,7 +848,9 @@ var _remind = require("./api/biz/util/remind");
|
|
|
818
848
|
var _takePicture = require("./api/biz/util/takePicture");
|
|
819
849
|
var _openVideoPlayer = require("./api/biz/util/openVideoPlayer");
|
|
820
850
|
var _openMediaFileDialog = require("./api/biz/util/openMediaFileDialog");
|
|
851
|
+
var _openMediaFileDialogV = require("./api/biz/util/openMediaFileDialogV2");
|
|
821
852
|
var _mediaFileUpload = require("./api/biz/util/mediaFileUpload");
|
|
853
|
+
var _mediaFileUploadV = require("./api/biz/util/mediaFileUploadV2");
|
|
822
854
|
var _invoice = require("./api/biz/util/invoice");
|
|
823
855
|
var _pushWorkMsg = require("./api/biz/util/pushWorkMsg");
|
|
824
856
|
var _openTalYoungToTopic = require("./api/biz/util/openTalYoungToTopic");
|
|
@@ -845,10 +877,12 @@ var _weeklyRead = require("./api/biz/util/weeklyRead");
|
|
|
845
877
|
var _disableScreenCapture = require("./api/biz/util/disableScreenCapture");
|
|
846
878
|
var _openFutureGroup = require("./api/biz/util/openFutureGroup");
|
|
847
879
|
var _knowledgeBaseSelect = require("./api/biz/util/knowledgeBaseSelect");
|
|
880
|
+
var _knowledgeSelectParams = require("./api/biz/util/knowledgeSelectParams");
|
|
848
881
|
var _lorebaseShowList = require("./api/biz/util/lorebaseShowList");
|
|
849
882
|
var _lorebaseRefreshNodeWebview = require("./api/biz/util/lorebaseRefreshNodeWebview");
|
|
850
883
|
var _copy = require("./api/biz/util/copy");
|
|
851
884
|
var _openPublish = require("./api/biz/util/openPublish");
|
|
885
|
+
var _getConfig = require("./api/biz/util/getConfig");
|
|
852
886
|
var _setIcon = require("./api/biz/navigation/setIcon");
|
|
853
887
|
var _setTitle = require("./api/biz/navigation/setTitle");
|
|
854
888
|
var _setMenu = require("./api/biz/navigation/setMenu");
|
|
@@ -874,6 +908,7 @@ var _openTeamChat = require("./api/biz/chat/openTeamChat");
|
|
|
874
908
|
var _openSquad = require("./api/biz/chat/openSquad");
|
|
875
909
|
var _sendP2PMsg = require("./api/biz/chat/sendP2PMsg");
|
|
876
910
|
var _createTab = require("./api/primary/createTab");
|
|
911
|
+
var _updateTab = require("./api/primary/updateTab");
|
|
877
912
|
var _weeklyShare = require("./api/primary/weeklyShare");
|
|
878
913
|
var _fullScreen = require("./api/primary/fullScreen");
|
|
879
914
|
var _exitFullScreen = require("./api/primary/exitFullScreen");
|
|
@@ -1001,7 +1036,9 @@ var _default = exports["default"] = {
|
|
|
1001
1036
|
takePicture: _takePicture.takePicture,
|
|
1002
1037
|
openVideoPlayer: _openVideoPlayer.openVideoPlayer,
|
|
1003
1038
|
openMediaFileDialog: _openMediaFileDialog.openMediaFileDialog,
|
|
1039
|
+
openMediaFileDialogV2: _openMediaFileDialogV.openMediaFileDialogV2,
|
|
1004
1040
|
mediaFileUpload: _mediaFileUpload.mediaFileUpload,
|
|
1041
|
+
mediaFileUploadV2: _mediaFileUploadV.mediaFileUploadV2,
|
|
1005
1042
|
invoice: _invoice.invoice,
|
|
1006
1043
|
pushWorkMsg: _pushWorkMsg.pushWorkMsg,
|
|
1007
1044
|
openTalYoungToTopic: _openTalYoungToTopic.openTalYoungToTopic,
|
|
@@ -1024,11 +1061,13 @@ var _default = exports["default"] = {
|
|
|
1024
1061
|
disableScreenCapture: _disableScreenCapture.disableScreenCapture,
|
|
1025
1062
|
addAppToNav: _addAppToNav.addAppToNav,
|
|
1026
1063
|
knowledgeBaseSelect: _knowledgeBaseSelect.knowledgeBaseSelect,
|
|
1064
|
+
knowledgeSelectParams: _knowledgeSelectParams.knowledgeSelectParams,
|
|
1027
1065
|
lorebaseShowList: _lorebaseShowList.lorebaseShowList,
|
|
1028
1066
|
lorebaseRefreshNodeWebview: _lorebaseRefreshNodeWebview.lorebaseRefreshNodeWebview,
|
|
1029
1067
|
copy: _copy.copy,
|
|
1030
1068
|
openPublish: _openPublish.openPublish,
|
|
1031
|
-
capturePage: _screen.capturePage
|
|
1069
|
+
capturePage: _screen.capturePage,
|
|
1070
|
+
getConfig: _getConfig.getConfig
|
|
1032
1071
|
},
|
|
1033
1072
|
telephone: {
|
|
1034
1073
|
showCallMenu: _showCallMenu.showCallMenu,
|
|
@@ -1081,6 +1120,7 @@ var _default = exports["default"] = {
|
|
|
1081
1120
|
},
|
|
1082
1121
|
primary: {
|
|
1083
1122
|
createTab: _createTab.createTab,
|
|
1123
|
+
updateTab: _updateTab.updateTab,
|
|
1084
1124
|
weeklyShare: _weeklyShare.weeklyShare,
|
|
1085
1125
|
fullScreen: _fullScreen.fullScreen,
|
|
1086
1126
|
exitFullScreen: _exitFullScreen.exitFullScreen
|
|
@@ -3,41 +3,24 @@ declare global {
|
|
|
3
3
|
sendToHost: any;
|
|
4
4
|
sendTo: any;
|
|
5
5
|
receiveBrowserViewData: any;
|
|
6
|
+
remoteSendToHost?: (payload: string) => void;
|
|
7
|
+
remoteReceiveFromHost?: (callback: (result: Record<string, any>) => void, moduleId?: string) => void;
|
|
6
8
|
}
|
|
7
9
|
}
|
|
8
|
-
|
|
9
|
-
invokeType?: 'browserView' | '';
|
|
10
|
-
[propName: string]: any;
|
|
11
|
-
}
|
|
12
|
-
declare class GenPostMsg {
|
|
13
|
-
private id;
|
|
14
|
-
private PromiseObj;
|
|
15
|
-
private methodName;
|
|
16
|
-
private plainMsg;
|
|
17
|
-
callback: (v: any) => void;
|
|
18
|
-
result: Promise<any>;
|
|
19
|
-
invokeType: 'browserView' | '';
|
|
20
|
-
constructor(method: string, param: APIParams, callback: any);
|
|
21
|
-
genid: () => string;
|
|
22
|
-
receiveResponse: (data: any) => void;
|
|
23
|
-
getPayload: () => {
|
|
24
|
-
msgId: string;
|
|
25
|
-
methodName: string;
|
|
26
|
-
body: object;
|
|
27
|
-
type: string;
|
|
28
|
-
invokeType: "" | "browserView";
|
|
29
|
-
};
|
|
30
|
-
}
|
|
10
|
+
declare type InvokeType = 'browserView' | 'moduleFederation' | '';
|
|
31
11
|
declare class Frame {
|
|
32
12
|
pendingMsgs: {};
|
|
13
|
+
invokeType?: InvokeType;
|
|
14
|
+
moduleId?: string;
|
|
33
15
|
constructor();
|
|
34
16
|
addPending: (e: any) => void;
|
|
35
17
|
deletePending: (e: any) => void;
|
|
36
18
|
getPending: (t: any) => any;
|
|
37
19
|
invokeAPIInBrowserView: (payload: string) => void;
|
|
38
20
|
invokeAPIInWebview: (payload: string) => void;
|
|
39
|
-
|
|
40
|
-
|
|
21
|
+
invokeAPIInModuleFederation: (payload: string) => void;
|
|
22
|
+
invokeAPI: (method: string, param: any, callback: any) => any;
|
|
23
|
+
handleCallback: (datas: any, invokeType?: InvokeType) => void;
|
|
41
24
|
init: () => void;
|
|
42
25
|
}
|
|
43
26
|
declare const frame: Frame;
|
|
@@ -29,6 +29,7 @@ var GenPostMsg = /*#__PURE__*/(0, _createClass2["default"])(function GenPostMsg(
|
|
|
29
29
|
return {
|
|
30
30
|
msgId: _this.id,
|
|
31
31
|
methodName: _this.methodName,
|
|
32
|
+
moduleId: _this.moduleId,
|
|
32
33
|
body: _this.plainMsg,
|
|
33
34
|
type: 'request',
|
|
34
35
|
invokeType: _this.invokeType
|
|
@@ -42,6 +43,7 @@ var GenPostMsg = /*#__PURE__*/(0, _createClass2["default"])(function GenPostMsg(
|
|
|
42
43
|
this.methodName = method;
|
|
43
44
|
this.plainMsg = param;
|
|
44
45
|
this.invokeType = param === null || param === void 0 ? void 0 : param.invokeType;
|
|
46
|
+
this.moduleId = param === null || param === void 0 ? void 0 : param.moduleId;
|
|
45
47
|
this.callback = callback;
|
|
46
48
|
// this.result = new Promise(
|
|
47
49
|
// function (resolve, reject) {
|
|
@@ -70,12 +72,25 @@ var Frame = /*#__PURE__*/(0, _createClass2["default"])(function Frame() {
|
|
|
70
72
|
this.invokeAPIInWebview = function (payload) {
|
|
71
73
|
window.sendToHost(payload);
|
|
72
74
|
};
|
|
75
|
+
this.invokeAPIInModuleFederation = function (payload) {
|
|
76
|
+
window.remoteSendToHost(payload);
|
|
77
|
+
};
|
|
73
78
|
this.invokeAPI = function (method, param, callback) {
|
|
74
|
-
var genPostMsg
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
var genPostMsg;
|
|
80
|
+
if (_this2.invokeType === 'moduleFederation') {
|
|
81
|
+
param.invokeType = _this2.invokeType;
|
|
82
|
+
param.moduleId = _this2.moduleId;
|
|
83
|
+
genPostMsg = new GenPostMsg(method, param, callback);
|
|
84
|
+
var payload = (0, _stringify["default"])(genPostMsg.getPayload());
|
|
85
|
+
_this2.invokeAPIInModuleFederation(payload);
|
|
86
|
+
} else {
|
|
87
|
+
genPostMsg = new GenPostMsg(method, param, callback);
|
|
88
|
+
var _payload = (0, _stringify["default"])(genPostMsg.getPayload());
|
|
89
|
+
var _param$invokeType = param.invokeType,
|
|
90
|
+
invokeType = _param$invokeType === void 0 ? '' : _param$invokeType;
|
|
91
|
+
invokeType === 'browserView' ? _this2.invokeAPIInBrowserView(_payload) : _this2.invokeAPIInWebview(_payload);
|
|
92
|
+
}
|
|
93
|
+
// 调用时传入 moduleId
|
|
79
94
|
_this2.addPending(genPostMsg);
|
|
80
95
|
return genPostMsg;
|
|
81
96
|
};
|
|
@@ -144,6 +159,13 @@ var Frame = /*#__PURE__*/(0, _createClass2["default"])(function Frame() {
|
|
|
144
159
|
}
|
|
145
160
|
};
|
|
146
161
|
this.init = function () {
|
|
162
|
+
var _a;
|
|
163
|
+
if (_this2.invokeType === 'moduleFederation') {
|
|
164
|
+
(_a = window.remoteReceiveFromHost) === null || _a === void 0 ? void 0 : _a.call(window, function (response) {
|
|
165
|
+
_this2.handleCallback(response);
|
|
166
|
+
}, _this2.moduleId);
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
147
169
|
window.addEventListener('message', function (msg) {
|
|
148
170
|
(0, _utils.log)('electron res: ', msg);
|
|
149
171
|
_this2.handleCallback(msg.data || {});
|
|
@@ -153,6 +175,8 @@ var Frame = /*#__PURE__*/(0, _createClass2["default"])(function Frame() {
|
|
|
153
175
|
});
|
|
154
176
|
};
|
|
155
177
|
this.pendingMsgs = {};
|
|
178
|
+
this.invokeType = window.remoteSendToHost && window.remoteReceiveFromHost && process ? 'moduleFederation' : '';
|
|
179
|
+
this.moduleId = Math.random().toString(36).substring(2, 15);
|
|
156
180
|
});
|
|
157
181
|
var frame = new Frame();
|
|
158
182
|
var _default = exports["default"] = frame;
|
package/libs/utils/env.js
CHANGED
|
@@ -17,7 +17,8 @@ function getENV() {
|
|
|
17
17
|
inPC = /YachPc/i.test(ua),
|
|
18
18
|
inIpad = /iPad/i.test(ua) && inYach,
|
|
19
19
|
inIPhone = /iPhone/i.test(ua) && inYach,
|
|
20
|
-
isTest = /Yachtest/.test(ua) && inYach
|
|
20
|
+
isTest = /Yachtest/.test(ua) && inYach,
|
|
21
|
+
inHarmonyNext = /HarmonyOSNext/i.test(ua) && inYach;
|
|
21
22
|
// platform
|
|
22
23
|
var platform = _sdk.ENV_ENUM.notInYach;
|
|
23
24
|
if (inIOS) {
|
|
@@ -42,7 +43,8 @@ function getENV() {
|
|
|
42
43
|
inAndroid: inAndroid,
|
|
43
44
|
inPC: inPC,
|
|
44
45
|
inIpad: inIpad,
|
|
45
|
-
inIPhone: inIPhone
|
|
46
|
+
inIPhone: inIPhone,
|
|
47
|
+
inHarmonyNext: inHarmonyNext
|
|
46
48
|
},
|
|
47
49
|
version: version,
|
|
48
50
|
language: language,
|