@rsmax/wechat 1.3.7 → 1.3.8
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/CHANGELOG.md +13 -0
- package/cjs/api/index.d.ts +266 -81
- package/cjs/api/index.js +388 -83
- package/cjs/hostComponents/Button/index.d.ts +33 -1
- package/cjs/hostComponents/Button/node.d.ts +6 -0
- package/cjs/hostComponents/Button/node.js +6 -0
- package/cjs/hostComponents/CoverImage/index.d.ts +6 -0
- package/cjs/hostComponents/CoverImage/node.d.ts +1 -0
- package/cjs/hostComponents/CoverImage/node.js +1 -0
- package/cjs/hostComponents/EditorPortal/index.d.ts +10 -0
- package/cjs/hostComponents/EditorPortal/index.js +12 -0
- package/cjs/hostComponents/EditorPortal/node.d.ts +8 -0
- package/cjs/hostComponents/EditorPortal/node.js +11 -0
- package/cjs/hostComponents/RichText/index.d.ts +5 -0
- package/cjs/hostComponents/RichText/node.d.ts +1 -0
- package/cjs/hostComponents/RichText/node.js +1 -0
- package/cjs/hostComponents/ScrollView/index.d.ts +11 -1
- package/cjs/hostComponents/ScrollView/node.d.ts +2 -0
- package/cjs/hostComponents/ScrollView/node.js +2 -0
- package/cjs/hostComponents/Selection/index.d.ts +15 -0
- package/cjs/hostComponents/Selection/index.js +13 -0
- package/cjs/hostComponents/Selection/node.d.ts +10 -0
- package/cjs/hostComponents/Selection/node.js +13 -0
- package/cjs/hostComponents/index.d.ts +2 -0
- package/cjs/hostComponents/index.js +2 -0
- package/cjs/hostComponents/node.js +4 -0
- package/esm/api/index.d.ts +266 -81
- package/esm/api/index.js +378 -77
- package/esm/hostComponents/Button/index.d.ts +33 -1
- package/esm/hostComponents/Button/node.d.ts +6 -0
- package/esm/hostComponents/Button/node.js +6 -0
- package/esm/hostComponents/CoverImage/index.d.ts +6 -0
- package/esm/hostComponents/CoverImage/node.d.ts +1 -0
- package/esm/hostComponents/CoverImage/node.js +1 -0
- package/esm/hostComponents/EditorPortal/index.d.ts +10 -0
- package/esm/hostComponents/EditorPortal/index.js +9 -0
- package/esm/hostComponents/EditorPortal/node.d.ts +8 -0
- package/esm/hostComponents/EditorPortal/node.js +8 -0
- package/esm/hostComponents/RichText/index.d.ts +5 -0
- package/esm/hostComponents/RichText/node.d.ts +1 -0
- package/esm/hostComponents/RichText/node.js +1 -0
- package/esm/hostComponents/ScrollView/index.d.ts +11 -1
- package/esm/hostComponents/ScrollView/node.d.ts +2 -0
- package/esm/hostComponents/ScrollView/node.js +2 -0
- package/esm/hostComponents/Selection/index.d.ts +15 -0
- package/esm/hostComponents/Selection/index.js +10 -0
- package/esm/hostComponents/Selection/node.d.ts +10 -0
- package/esm/hostComponents/Selection/node.js +10 -0
- package/esm/hostComponents/index.d.ts +2 -0
- package/esm/hostComponents/index.js +2 -0
- package/esm/hostComponents/node.js +4 -0
- package/package.json +6 -6
|
@@ -168,6 +168,22 @@ export interface ButtonProps extends BaseProps {
|
|
|
168
168
|
* 用户点击后可以快速发送小程序消息,open-type="contact"时有效
|
|
169
169
|
*/
|
|
170
170
|
showMessageCard?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* 3.0.1
|
|
173
|
+
* 当手机号快速验证或手机号实时验证额度用尽时,是否对用户展示“申请获取你的手机号,但该功能使用次数已达当前小程序上限,暂时无法使用”的提示,
|
|
174
|
+
* 默认展示,open-type="getPhoneNumber" 或 open-type="getRealtimePhoneNumber" 时有效
|
|
175
|
+
*/
|
|
176
|
+
phoneNumberNoQuotaToast?: boolean;
|
|
177
|
+
/**
|
|
178
|
+
* 3.7.8
|
|
179
|
+
* 转发的文本消息是否要带小程序入口
|
|
180
|
+
*/
|
|
181
|
+
needShowEntrance?: boolean;
|
|
182
|
+
/**
|
|
183
|
+
* 3.7.8
|
|
184
|
+
* 从消息小程序入口打开小程序的路径,默认为聊天工具启动路径
|
|
185
|
+
*/
|
|
186
|
+
entrancePath?: string;
|
|
171
187
|
/**
|
|
172
188
|
* 1.3.0
|
|
173
189
|
* 用户点击该按钮时,会返回获取到的用户信息,回调的detail数据与wx.getUserInfo返回的一致,
|
|
@@ -179,11 +195,22 @@ export interface ButtonProps extends BaseProps {
|
|
|
179
195
|
* 客服消息回调,open-type="contact"时有效
|
|
180
196
|
*/
|
|
181
197
|
onContact?: (event: GenericEvent) => any;
|
|
198
|
+
/**
|
|
199
|
+
* 2.26.2
|
|
200
|
+
* 新的一次性订阅消息下发机制,open-type=liveActivity 时有效
|
|
201
|
+
* https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/subscribe-message-2.html
|
|
202
|
+
*/
|
|
203
|
+
onCreateLiveActivity?: (event: GenericEvent) => any;
|
|
182
204
|
/**
|
|
183
205
|
* 1.2.0
|
|
184
|
-
*
|
|
206
|
+
* 手机号快速验证,open-type=getPhoneNumber时有效
|
|
185
207
|
*/
|
|
186
208
|
onGetPhoneNumber?: (event: GenericEvent) => any;
|
|
209
|
+
/**
|
|
210
|
+
* 2.24.2
|
|
211
|
+
* 手机号实时验证,open-type=getRealtimePhoneNumber 时有效
|
|
212
|
+
*/
|
|
213
|
+
onGetRealtimePhoneNumber?: (event: GenericEvent) => any;
|
|
187
214
|
/**
|
|
188
215
|
* 1.9.5
|
|
189
216
|
* 当使用开放能力时,发生错误的回调,open-type=launchApp时有效
|
|
@@ -215,6 +242,11 @@ export interface ButtonProps extends BaseProps {
|
|
|
215
242
|
* https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/userProfile.html
|
|
216
243
|
*/
|
|
217
244
|
onChooseAvatar?: (event: GenericEvent) => any;
|
|
245
|
+
/**2.32.3
|
|
246
|
+
* 用户同意隐私协议按钮
|
|
247
|
+
* https://developers.weixin.qq.com/miniprogram/dev/framework/user-privacy/PrivacyAuthorize.html
|
|
248
|
+
*/
|
|
249
|
+
agreePrivacyAuthorization?: (event: GenericEvent) => any;
|
|
218
250
|
}
|
|
219
251
|
/**
|
|
220
252
|
* https://developers.weixin.qq.com/miniprogram/dev/component/button.html
|
|
@@ -33,15 +33,21 @@ export declare const alias: {
|
|
|
33
33
|
shareMessageTitle: string;
|
|
34
34
|
shareMessageImg: string;
|
|
35
35
|
showMessageCard: string;
|
|
36
|
+
phoneNumberNoQuotaToast: string;
|
|
37
|
+
needShowEntrance: string;
|
|
38
|
+
entrancePath: string;
|
|
36
39
|
onGetUserInfo: string;
|
|
37
40
|
onContact: string;
|
|
41
|
+
onCreateLiveActivity: string;
|
|
38
42
|
onGetPhoneNumber: string;
|
|
43
|
+
onGetRealtimePhoneNumber: string;
|
|
39
44
|
onError: string;
|
|
40
45
|
onOpenSetting: string;
|
|
41
46
|
onLaunchApp: string;
|
|
42
47
|
onAddFriend: string;
|
|
43
48
|
onAddGroupApp: string;
|
|
44
49
|
onChooseAvatar: string;
|
|
50
|
+
agreePrivacyAuthorization: string;
|
|
45
51
|
onTap: string;
|
|
46
52
|
onClick: string;
|
|
47
53
|
};
|
|
@@ -36,15 +36,21 @@ exports.alias = {
|
|
|
36
36
|
shareMessageTitle: 'share-message-title',
|
|
37
37
|
shareMessageImg: 'share-message-img',
|
|
38
38
|
showMessageCard: 'show-message-card',
|
|
39
|
+
phoneNumberNoQuotaToast: 'phone-number-no-quota-toast',
|
|
40
|
+
needShowEntrance: 'need-show-entrance',
|
|
41
|
+
entrancePath: 'entrance-path',
|
|
39
42
|
onGetUserInfo: 'bindgetuserinfo',
|
|
40
43
|
onContact: 'bindcontact',
|
|
44
|
+
onCreateLiveActivity: 'bindcreateliveactivity',
|
|
41
45
|
onGetPhoneNumber: 'bindgetphonenumber',
|
|
46
|
+
onGetRealtimePhoneNumber: 'bindgetrealtimephonenumber',
|
|
42
47
|
onError: 'binderror',
|
|
43
48
|
onOpenSetting: 'bindopensetting',
|
|
44
49
|
onLaunchApp: 'bindlaunchapp',
|
|
45
50
|
onAddFriend: 'bindaddfriend',
|
|
46
51
|
onAddGroupApp: 'bindaddgroupapp',
|
|
47
52
|
onChooseAvatar: 'bindchooseavatar',
|
|
53
|
+
agreePrivacyAuthorization: 'bindagreeprivacyauthorization',
|
|
48
54
|
onTap: 'bindtap',
|
|
49
55
|
onClick: 'bindtap',
|
|
50
56
|
};
|
|
@@ -3,6 +3,12 @@ import { BaseProps, GenericEvent } from '../../types/component';
|
|
|
3
3
|
export interface CoverImageProps extends BaseProps {
|
|
4
4
|
/** 图标路径,支持临时路径、网络地址(1.6.0起支持)、云文件ID(2.2.3起支持)。暂不支持base64格式。 1.4.0 */
|
|
5
5
|
src?: string;
|
|
6
|
+
/**
|
|
7
|
+
* 2.13.0格式固定为 https://servicewechat.com/{appid}/{version}/page-frame.html,
|
|
8
|
+
* 其中 {appid} 为小程序的 appid,{version} 为小程序的版本号,
|
|
9
|
+
* 版本号为 0 表示为开发版、体验版以及审核版本,版本号为 devtools 表示为开发者工具,其余为正式版本;
|
|
10
|
+
*/
|
|
11
|
+
referrerPolicy?: string;
|
|
6
12
|
/** 图片加载成功时触发 2.1.0 */
|
|
7
13
|
onLoad?: (event: GenericEvent) => any;
|
|
8
14
|
/** 图片加载失败时触发 2.1.0 */
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '../../types/component';
|
|
3
|
+
export interface EditorPortal extends BaseProps {
|
|
4
|
+
key: string;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* 3.7.11
|
|
8
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/component/editor-portal.html
|
|
9
|
+
*/
|
|
10
|
+
export declare const EditorPortal: React.ComponentType<EditorPortal>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EditorPortal = void 0;
|
|
4
|
+
const runtime_1 = require("@rsmax/runtime");
|
|
5
|
+
/**
|
|
6
|
+
* 3.7.11
|
|
7
|
+
* @see https://developers.weixin.qq.com/miniprogram/dev/component/editor-portal.html
|
|
8
|
+
*/
|
|
9
|
+
exports.EditorPortal = (0, runtime_1.createHostComponent)('editor-portal');
|
|
10
|
+
exports.EditorPortal.defaultProps = {
|
|
11
|
+
key: '',
|
|
12
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.props = exports.alias = void 0;
|
|
4
|
+
exports.alias = {
|
|
5
|
+
id: 'id',
|
|
6
|
+
className: 'class',
|
|
7
|
+
style: 'style',
|
|
8
|
+
animation: 'animation',
|
|
9
|
+
portalKey: 'key',
|
|
10
|
+
};
|
|
11
|
+
exports.props = Object.values(exports.alias);
|
|
@@ -5,6 +5,11 @@ export interface RichTextProps extends BaseProps {
|
|
|
5
5
|
nodes?: any[] | string;
|
|
6
6
|
/** 显示连续空格 2.4.1 */
|
|
7
7
|
space?: 'ensp' | 'emsp' | 'nbsp';
|
|
8
|
+
/**
|
|
9
|
+
* 2.24.0
|
|
10
|
+
* 文本是否可选,该属性会使节点显示为 block
|
|
11
|
+
*/
|
|
12
|
+
userSelect?: boolean;
|
|
8
13
|
}
|
|
9
14
|
/**
|
|
10
15
|
* https://developers.weixin.qq.com/miniprogram/dev/component/rich-text.html
|
|
@@ -15,10 +15,20 @@ export interface ScrollViewProps extends BaseProps {
|
|
|
15
15
|
scrollLeft?: number | string;
|
|
16
16
|
/** 值应为某子元素id(id不能以数字开头)。设置哪个方向可滚动,则在哪个方向滚动到该元素 1.0.0 */
|
|
17
17
|
scrollIntoView?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 3.1.0
|
|
20
|
+
* 跳转到 scroll-into-view 目标节点时的额外偏移。skyline 自 3.1.0 版本开始支持,webview 自 3.6.0 版本开始支持。
|
|
21
|
+
*/
|
|
22
|
+
scrollIntoViewOffset?: number;
|
|
18
23
|
/** (default: false) 在设置滚动条位置时使用动画过渡 1.0.0 */
|
|
19
24
|
scrollWithAnimation?: boolean;
|
|
20
25
|
/** (default: false) iOS点击顶部状态栏、安卓双击标题栏时,滚动条返回顶部,只支持竖向 1.0.0 */
|
|
21
26
|
enableBackToTop?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* 2.25.3
|
|
29
|
+
* 开启 passive 特性,能优化一定的滚动性能
|
|
30
|
+
*/
|
|
31
|
+
enablePassive?: boolean;
|
|
22
32
|
/** (default: false) 启用 flexbox 布局。开启后,当前节点声明了 display: flex 就会成为 flex container,并作用于其孩子节点。 2.7.3 */
|
|
23
33
|
enableFlex?: boolean;
|
|
24
34
|
/** 滚动到顶部/左边时触发 1.0.0 */
|
|
@@ -43,7 +53,7 @@ export interface ScrollViewProps extends BaseProps {
|
|
|
43
53
|
onRefresherPulling?: (event: GenericEvent) => void;
|
|
44
54
|
/** 自定义下拉刷新被触发 2.10.1 */
|
|
45
55
|
onRefresherRefresh?: (event: GenericEvent) => void;
|
|
46
|
-
/**
|
|
56
|
+
/** 自定义下拉刷新被复位 2.10.1 */
|
|
47
57
|
onRefresherRestore?: (event: GenericEvent) => void;
|
|
48
58
|
/** 自定义下拉刷新被中止 2.10.1 */
|
|
49
59
|
onRefresherAbort?: (event: GenericEvent) => void;
|
|
@@ -10,8 +10,10 @@ export declare const alias: {
|
|
|
10
10
|
scrollTop: string;
|
|
11
11
|
scrollLeft: string;
|
|
12
12
|
scrollIntoView: string;
|
|
13
|
+
scrollIntoViewOffset: string;
|
|
13
14
|
scrollWithAnimation: string;
|
|
14
15
|
enableBackToTop: string;
|
|
16
|
+
enablePassive: string;
|
|
15
17
|
enableFlex: string;
|
|
16
18
|
onScrollToUpper: string;
|
|
17
19
|
onScrollToLower: string;
|
|
@@ -13,8 +13,10 @@ exports.alias = {
|
|
|
13
13
|
scrollTop: 'scroll-top',
|
|
14
14
|
scrollLeft: 'scroll-left',
|
|
15
15
|
scrollIntoView: 'scroll-into-view',
|
|
16
|
+
scrollIntoViewOffset: 'scroll-into-view-offset',
|
|
16
17
|
scrollWithAnimation: 'scroll-with-animation',
|
|
17
18
|
enableBackToTop: 'enable-back-to-top',
|
|
19
|
+
enablePassive: 'enable-passive',
|
|
18
20
|
enableFlex: 'enable-flex',
|
|
19
21
|
onScrollToUpper: 'bindscrolltoupper',
|
|
20
22
|
onScrollToLower: 'bindscrolltolower',
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '../../types/component';
|
|
3
|
+
export interface SelectionProps extends BaseProps {
|
|
4
|
+
/**
|
|
5
|
+
* 是否隐藏客户端原生文本选区按钮
|
|
6
|
+
*/
|
|
7
|
+
disableContextMenu?: boolean;
|
|
8
|
+
onSelectionChange?: (event: any) => any;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* 3.6.4
|
|
12
|
+
* 渲染框架支持情况:WebView
|
|
13
|
+
* https://developers.weixin.qq.com/miniprogram/dev/component/selection.html
|
|
14
|
+
*/
|
|
15
|
+
export declare const Selection: React.ComponentType<SelectionProps>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Selection = void 0;
|
|
4
|
+
const runtime_1 = require("@rsmax/runtime");
|
|
5
|
+
/**
|
|
6
|
+
* 3.6.4
|
|
7
|
+
* 渲染框架支持情况:WebView
|
|
8
|
+
* https://developers.weixin.qq.com/miniprogram/dev/component/selection.html
|
|
9
|
+
*/
|
|
10
|
+
exports.Selection = (0, runtime_1.createHostComponent)('selection');
|
|
11
|
+
exports.Selection.defaultProps = {
|
|
12
|
+
disableContextMenu: false,
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.props = exports.alias = void 0;
|
|
4
|
+
exports.alias = {
|
|
5
|
+
id: 'id',
|
|
6
|
+
className: 'class',
|
|
7
|
+
style: 'style',
|
|
8
|
+
animation: 'animation',
|
|
9
|
+
onSelectionChange: 'bindselectionchange',
|
|
10
|
+
onTap: 'bindtap',
|
|
11
|
+
onClick: 'bindtap',
|
|
12
|
+
};
|
|
13
|
+
exports.props = Object.values(exports.alias);
|
|
@@ -36,6 +36,7 @@ export * from './Canvas';
|
|
|
36
36
|
export * from './OpenData';
|
|
37
37
|
export * from './OfficialAccount';
|
|
38
38
|
export * from './Editor';
|
|
39
|
+
export * from './EditorPortal';
|
|
39
40
|
export * from './Audio';
|
|
40
41
|
export * from './Ad';
|
|
41
42
|
export * from './WebView';
|
|
@@ -51,3 +52,4 @@ export * from './RootPortal';
|
|
|
51
52
|
export * from './AdCustom';
|
|
52
53
|
export * from './PageMeta';
|
|
53
54
|
export * from './NavigationBar';
|
|
55
|
+
export * from './Selection';
|
|
@@ -52,6 +52,7 @@ __exportStar(require("./Canvas"), exports);
|
|
|
52
52
|
__exportStar(require("./OpenData"), exports);
|
|
53
53
|
__exportStar(require("./OfficialAccount"), exports);
|
|
54
54
|
__exportStar(require("./Editor"), exports);
|
|
55
|
+
__exportStar(require("./EditorPortal"), exports);
|
|
55
56
|
__exportStar(require("./Audio"), exports);
|
|
56
57
|
__exportStar(require("./Ad"), exports);
|
|
57
58
|
__exportStar(require("./WebView"), exports);
|
|
@@ -67,3 +68,4 @@ __exportStar(require("./RootPortal"), exports);
|
|
|
67
68
|
__exportStar(require("./AdCustom"), exports);
|
|
68
69
|
__exportStar(require("./PageMeta"), exports);
|
|
69
70
|
__exportStar(require("./NavigationBar"), exports);
|
|
71
|
+
__exportStar(require("./Selection"), exports);
|
|
@@ -33,6 +33,7 @@ const checkbox = __importStar(require("./Checkbox/node"));
|
|
|
33
33
|
const coverImage = __importStar(require("./CoverImage/node"));
|
|
34
34
|
const coverView = __importStar(require("./CoverView/node"));
|
|
35
35
|
const editor = __importStar(require("./Editor/node"));
|
|
36
|
+
const editorPortal = __importStar(require("./EditorPortal/node"));
|
|
36
37
|
const form = __importStar(require("./Form/node"));
|
|
37
38
|
const functionalPageNavigator = __importStar(require("./FunctionalPageNavigator/node"));
|
|
38
39
|
const icon = __importStar(require("./Icon/node"));
|
|
@@ -76,6 +77,7 @@ const rootPortal = __importStar(require("./RootPortal/node"));
|
|
|
76
77
|
const channelLive = __importStar(require("./ChannelLive"));
|
|
77
78
|
const channelVideo = __importStar(require("./ChannelVideo"));
|
|
78
79
|
const snapshot = __importStar(require("./Snapshot"));
|
|
80
|
+
const selection = __importStar(require("./Selection"));
|
|
79
81
|
const hostComponents = new Map();
|
|
80
82
|
hostComponents.set('ad', ad);
|
|
81
83
|
hostComponents.set('audio', audio);
|
|
@@ -87,6 +89,7 @@ hostComponents.set('checkbox', checkbox);
|
|
|
87
89
|
hostComponents.set('cover-image', coverImage);
|
|
88
90
|
hostComponents.set('cover-view', coverView);
|
|
89
91
|
hostComponents.set('editor', editor);
|
|
92
|
+
hostComponents.set('editor-portal', editorPortal);
|
|
90
93
|
hostComponents.set('form', form);
|
|
91
94
|
hostComponents.set('functional-page-navigator', functionalPageNavigator);
|
|
92
95
|
hostComponents.set('icon', icon);
|
|
@@ -130,4 +133,5 @@ hostComponents.set('root-portal', rootPortal);
|
|
|
130
133
|
hostComponents.set('channel-live', channelLive);
|
|
131
134
|
hostComponents.set('channel-video', channelVideo);
|
|
132
135
|
hostComponents.set('snapshot', snapshot);
|
|
136
|
+
hostComponents.set('selection', selection);
|
|
133
137
|
exports.default = hostComponents;
|