@ray-js/components 1.5.0-beta.11 → 1.5.0
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/lib/Button/Button.thing.js +1 -1
- package/lib/Button/Button.wechat.js +1 -1
- package/lib/Camera/Camera.d.ts +2 -1
- package/lib/Camera/Camera.js +1 -3
- package/lib/Camera/Camera.wechat.js +1 -1
- package/lib/CheckboxGroup/CheckboxGroup.js +3 -2
- package/lib/CheckboxGroup/props.d.ts +5 -2
- package/lib/CoverView/CoverView.js +1 -1
- package/lib/CoverView/CoverView.wechat.js +1 -1
- package/lib/Icon/Icon.js +3 -2
- package/lib/Icon/Icon.thing.js +3 -2
- package/lib/Icon/Icon.wechat.js +3 -2
- package/lib/Icon/iconfont/iconfont.css +3 -3
- package/lib/Icon/iconfont/iconfont.json +1 -1
- package/lib/Iframe/Iframe.js +1 -1
- package/lib/Image/Image.js +2 -2
- package/lib/Image/Image.wechat.js +1 -1
- package/lib/Input/Input.js +9 -8
- package/lib/Input/Input.thing.js +2 -2
- package/lib/Input/Input.wechat.js +8 -7
- package/lib/Input/props.d.ts +13 -47
- package/lib/IpcPlayer/IpcPlayer.d.ts +2 -1
- package/lib/IpcPlayer/IpcPlayer.js +1 -3
- package/lib/IpcPlayer/IpcPlayer.wechat.js +1 -1
- package/lib/Map/Map.js +1 -1
- package/lib/MovableView/MovableView.js +2 -2
- package/lib/NativeVideo/NativeVideo.d.ts +2 -1
- package/lib/NativeVideo/NativeVideo.js +1 -3
- package/lib/NativeVideo/NativeVideo.wechat.js +1 -1
- package/lib/PageContainer/PageContainer.js +15 -14
- package/lib/PageContainer/props.d.ts +4 -6
- package/lib/Picker/Picker.js +5 -4
- package/lib/Picker/Picker.thing.js +7 -6
- package/lib/Picker/Picker.wechat.js +7 -6
- package/lib/PickerView/PickerView.js +3 -2
- package/lib/PickerView/PickerView.thing.js +7 -6
- package/lib/PickerView/PickerView.wechat.js +7 -6
- package/lib/RadioGroup/RadioGroup.js +3 -2
- package/lib/RadioGroup/props.d.ts +4 -14
- package/lib/ScrollView/ScrollView.js +3 -3
- package/lib/Slider/Slider.js +5 -4
- package/lib/Slider/Slider.thing.js +5 -4
- package/lib/Slider/Slider.wechat.js +5 -4
- package/lib/Slider/props.d.ts +7 -30
- package/lib/Swiper/Swiper.js +3 -2
- package/lib/Swiper/Swiper.thing.js +2 -2
- package/lib/Swiper/Swiper.wechat.js +2 -2
- package/lib/Swiper/props.d.ts +3 -0
- package/lib/Switch/Switch.js +1 -1
- package/lib/Switch/Switch.thing.js +3 -2
- package/lib/Switch/Switch.wechat.js +3 -2
- package/lib/Switch/props.d.ts +4 -15
- package/lib/Textarea/Textarea.js +7 -6
- package/lib/Textarea/Textarea.thing.js +1 -1
- package/lib/Textarea/Textarea.wechat.js +1 -1
- package/lib/Textarea/props.d.ts +10 -3
- package/lib/Video/Video.js +1 -1
- package/lib/Video/Video.wechat.js +1 -1
- package/lib/WebView/WebView.js +1 -1
- package/package.json +9 -9
@@ -26,7 +26,7 @@ const Button = props => {
|
|
26
26
|
onClick: event => {
|
27
27
|
if (disabled) return;
|
28
28
|
if (loading) return;
|
29
|
-
onClick === null || onClick === void 0
|
29
|
+
onClick === null || onClick === void 0 || onClick(event);
|
30
30
|
},
|
31
31
|
disabled: disabled,
|
32
32
|
size: size,
|
@@ -28,7 +28,7 @@ const Button = props => {
|
|
28
28
|
onClick: event => {
|
29
29
|
if (disabled) return;
|
30
30
|
if (loading) return;
|
31
|
-
onClick === null || onClick === void 0
|
31
|
+
onClick === null || onClick === void 0 || onClick(event);
|
32
32
|
},
|
33
33
|
disabled: disabled,
|
34
34
|
formType: formType,
|
package/lib/Camera/Camera.d.ts
CHANGED
package/lib/Camera/Camera.js
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
|
3
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
4
2
|
const Camera = () => {
|
5
|
-
return /*#__PURE__*/React.createElement("div", null, "web
|
3
|
+
return /*#__PURE__*/React.createElement("div", null, "The web side is not implemented yet.");
|
6
4
|
};
|
7
5
|
export default Camera;
|
@@ -3,6 +3,6 @@ import { View } from '@ray-js/components';
|
|
3
3
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
5
5
|
function Camera() {
|
6
|
-
return /*#__PURE__*/React.createElement(View, null, "
|
6
|
+
return /*#__PURE__*/React.createElement(View, null, "Wechat mini program side has not been implemented");
|
7
7
|
}
|
8
8
|
export default Camera;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
3
|
import * as React from 'react';
|
3
4
|
import handleProps from '../utils/handleProps';
|
4
5
|
import Label from '../Label';
|
@@ -15,11 +16,11 @@ const CheckboxGroup = props => {
|
|
15
16
|
const currentNode = React.useRef(null);
|
16
17
|
useEventListener('clickoverlay', e => {
|
17
18
|
var _props$onChange;
|
18
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0
|
19
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, _objectSpread(_objectSpread({}, e), {}, {
|
19
20
|
type: e.type,
|
20
21
|
value: e.detail.value,
|
21
22
|
origin: e
|
22
|
-
});
|
23
|
+
}));
|
23
24
|
}, {
|
24
25
|
target: currentNode
|
25
26
|
});
|
@@ -1,6 +1,7 @@
|
|
1
1
|
/// <reference types="react" />
|
2
2
|
import { BaseProps } from '../types';
|
3
3
|
import { CheckboxProps } from '../Checkbox/props';
|
4
|
+
import { GenericEvent } from '@ray-js/adapter';
|
4
5
|
export type CheckboxGroupOption = CheckboxProps & {
|
5
6
|
label: string;
|
6
7
|
};
|
@@ -31,9 +32,11 @@ export interface BaseCheckboxGroupProps extends Omit<BaseProps, 'children'> {
|
|
31
32
|
* @description.zh 选中项发生改变时触发 change 事件
|
32
33
|
* @default null
|
33
34
|
*/
|
34
|
-
onChange?: (event: {
|
35
|
+
onChange?: (event: GenericEvent<{
|
36
|
+
value: any;
|
37
|
+
} & {
|
35
38
|
type: string;
|
36
39
|
value: string[];
|
37
40
|
origin: any;
|
38
|
-
}) => void;
|
41
|
+
}>) => void;
|
39
42
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
const CoverView = () => {
|
3
|
-
return /*#__PURE__*/React.createElement("div", null, "web
|
3
|
+
return /*#__PURE__*/React.createElement("div", null, "The web side is not implemented yet.");
|
4
4
|
};
|
5
5
|
export default CoverView;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import { View } from '@ray-js/components';
|
3
3
|
function CoverView() {
|
4
|
-
return /*#__PURE__*/React.createElement(View, null, "
|
4
|
+
return /*#__PURE__*/React.createElement(View, null, "Wechat mini program side has not been implemented");
|
5
5
|
}
|
6
6
|
export default CoverView;
|
package/lib/Icon/Icon.js
CHANGED
@@ -8,10 +8,11 @@ const Icon = props => {
|
|
8
8
|
type,
|
9
9
|
size,
|
10
10
|
color,
|
11
|
-
style
|
11
|
+
style,
|
12
|
+
className
|
12
13
|
} = props;
|
13
14
|
return /*#__PURE__*/React.createElement(Text, {
|
14
|
-
className: "
|
15
|
+
className: "ray_iconfont ".concat(type, " ").concat(className),
|
15
16
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
16
17
|
color: "".concat(color),
|
17
18
|
fontSize: "".concat(size, "px")
|
package/lib/Icon/Icon.thing.js
CHANGED
@@ -7,10 +7,11 @@ const Icon = props => {
|
|
7
7
|
type,
|
8
8
|
size,
|
9
9
|
color,
|
10
|
-
style
|
10
|
+
style,
|
11
|
+
className
|
11
12
|
} = props;
|
12
13
|
return /*#__PURE__*/React.createElement(Text, {
|
13
|
-
className: "
|
14
|
+
className: "ray_iconfont ".concat(type, " ").concat(className),
|
14
15
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
15
16
|
color: "".concat(color),
|
16
17
|
fontSize: "".concat(size, "px")
|
package/lib/Icon/Icon.wechat.js
CHANGED
@@ -8,10 +8,11 @@ const Icon = props => {
|
|
8
8
|
type,
|
9
9
|
size,
|
10
10
|
color,
|
11
|
-
style
|
11
|
+
style,
|
12
|
+
className
|
12
13
|
} = props;
|
13
14
|
return /*#__PURE__*/React.createElement(Text, {
|
14
|
-
className: "
|
15
|
+
className: "ray_iconfont ".concat(type, " ").concat(className),
|
15
16
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
16
17
|
color: "".concat(color),
|
17
18
|
fontSize: "".concat(size, "px")
|
@@ -1,5 +1,5 @@
|
|
1
1
|
@font-face {
|
2
|
-
font-family: '
|
2
|
+
font-family: 'ray_iconfont';
|
3
3
|
/* Project id 3149224 这里需要转成base64,否则微信会编译找不到iconfont文件
|
4
4
|
见issue https://github.com/NervJS/taro-ui/issues/202
|
5
5
|
*/
|
@@ -11,8 +11,8 @@
|
|
11
11
|
format('truetype');
|
12
12
|
}
|
13
13
|
|
14
|
-
.
|
15
|
-
font-family: '
|
14
|
+
.ray_iconfont {
|
15
|
+
font-family: 'ray_iconfont' !important;
|
16
16
|
font-size: 16px;
|
17
17
|
font-style: normal;
|
18
18
|
-webkit-font-smoothing: antialiased;
|
package/lib/Iframe/Iframe.js
CHANGED
@@ -2,6 +2,6 @@ import React from 'react';
|
|
2
2
|
|
3
3
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
4
4
|
const Iframe = () => {
|
5
|
-
return /*#__PURE__*/React.createElement("div", null, "web
|
5
|
+
return /*#__PURE__*/React.createElement("div", null, "The web side is not implemented yet");
|
6
6
|
};
|
7
7
|
export default Iframe;
|
package/lib/Image/Image.js
CHANGED
@@ -7,7 +7,7 @@ const Image = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
7
7
|
const currentNode = ref || React.useRef(null);
|
8
8
|
useEventListener('load', e => {
|
9
9
|
var _props$onLoad;
|
10
|
-
(_props$onLoad = props.onLoad) === null || _props$onLoad === void 0
|
10
|
+
(_props$onLoad = props.onLoad) === null || _props$onLoad === void 0 || _props$onLoad.call(props, _objectSpread(_objectSpread({
|
11
11
|
type: e.type
|
12
12
|
}, e.detail), {}, {
|
13
13
|
origin
|
@@ -17,7 +17,7 @@ const Image = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
17
17
|
});
|
18
18
|
useEventListener('error', e => {
|
19
19
|
var _props$onError;
|
20
|
-
(_props$onError = props.onError) === null || _props$onError === void 0
|
20
|
+
(_props$onError = props.onError) === null || _props$onError === void 0 || _props$onError.call(props, _objectSpread(_objectSpread({
|
21
21
|
type: e.type
|
22
22
|
}, e.detail), {}, {
|
23
23
|
origin
|
@@ -34,7 +34,7 @@ const Image = props => {
|
|
34
34
|
className: clsx('ray-image', className),
|
35
35
|
mode: mode,
|
36
36
|
onLoad: e => {
|
37
|
-
onLoad === null || onLoad === void 0
|
37
|
+
onLoad === null || onLoad === void 0 || onLoad({
|
38
38
|
width: e.detail.width,
|
39
39
|
height: e.detail.height,
|
40
40
|
origin: e
|
package/lib/Input/Input.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
4
|
const _excluded = ["placeholderStyle", "className", "maxLength", "onBlur", "onFocus", "onConfirm"];
|
4
5
|
import "core-js/modules/web.dom-collections.iterator.js";
|
@@ -22,11 +23,11 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
22
23
|
const [placeholderStyleClassName] = useStylesheet(inlineStyle(placeholderStyle));
|
23
24
|
const currentNode = ref || React.useRef(null);
|
24
25
|
useEventListener('focus', e => {
|
25
|
-
onFocus === null || onFocus === void 0
|
26
|
+
onFocus === null || onFocus === void 0 || onFocus(_objectSpread(_objectSpread({}, e), {}, {
|
26
27
|
type: 'focus',
|
27
28
|
value: e.detail.value,
|
28
29
|
origin: e
|
29
|
-
});
|
30
|
+
}));
|
30
31
|
}, {
|
31
32
|
target: currentNode
|
32
33
|
});
|
@@ -34,11 +35,11 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
34
35
|
const {
|
35
36
|
value
|
36
37
|
} = e.target;
|
37
|
-
onBlur === null || onBlur === void 0
|
38
|
+
onBlur === null || onBlur === void 0 || onBlur(_objectSpread(_objectSpread({}, e), {}, {
|
38
39
|
type: 'blur',
|
39
40
|
value,
|
40
41
|
origin: e
|
41
|
-
});
|
42
|
+
}));
|
42
43
|
}, {
|
43
44
|
target: currentNode
|
44
45
|
});
|
@@ -46,11 +47,11 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
46
47
|
const {
|
47
48
|
value
|
48
49
|
} = e.target;
|
49
|
-
onConfirm === null || onConfirm === void 0
|
50
|
+
onConfirm === null || onConfirm === void 0 || onConfirm(_objectSpread(_objectSpread({}, e), {}, {
|
50
51
|
type: 'confirm',
|
51
52
|
value,
|
52
53
|
origin: e
|
53
|
-
});
|
54
|
+
}));
|
54
55
|
}, {
|
55
56
|
target: currentNode
|
56
57
|
});
|
@@ -64,11 +65,11 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
64
65
|
const {
|
65
66
|
value
|
66
67
|
} = e.target;
|
67
|
-
(_props$onInput = props.onInput) === null || _props$onInput === void 0
|
68
|
+
(_props$onInput = props.onInput) === null || _props$onInput === void 0 || _props$onInput.call(props, _objectSpread(_objectSpread({}, e), {}, {
|
68
69
|
type: 'input',
|
69
70
|
value,
|
70
71
|
origin: e
|
71
|
-
});
|
72
|
+
}));
|
72
73
|
},
|
73
74
|
class: clsx('ray-input', styles.input, className, placeholderStyleClassName),
|
74
75
|
ref: currentNode
|
package/lib/Input/Input.thing.js
CHANGED
@@ -66,7 +66,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
66
66
|
// 内部 value 管控
|
67
67
|
bufferValue.current = value;
|
68
68
|
event.value = value;
|
69
|
-
onInput === null || onInput === void 0
|
69
|
+
onInput === null || onInput === void 0 || onInput(event);
|
70
70
|
},
|
71
71
|
onBlur: onBlur,
|
72
72
|
onConfirm: function (event) {
|
@@ -74,7 +74,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
74
74
|
value = ''
|
75
75
|
} = event.detail;
|
76
76
|
setInternalValue(value);
|
77
|
-
onConfirm === null || onConfirm === void 0
|
77
|
+
onConfirm === null || onConfirm === void 0 || onConfirm(event);
|
78
78
|
},
|
79
79
|
onFocus: onFocus,
|
80
80
|
value: internalValue
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
4
|
const _excluded = ["name", "id", "className", "style", "disabled", "type", "value", "focus", "maxLength", "onBlur", "onConfirm", "onFocus", "onInput", "password", "placeholder", "placeholderStyle"];
|
4
5
|
import "core-js/modules/web.dom-collections.iterator.js";
|
@@ -66,28 +67,28 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
66
67
|
} = event.detail;
|
67
68
|
// 内部 value 管控
|
68
69
|
bufferValue.current = value;
|
69
|
-
onInput === null || onInput === void 0
|
70
|
+
onInput === null || onInput === void 0 || onInput(_objectSpread(_objectSpread({}, event), {}, {
|
70
71
|
type: 'input',
|
71
72
|
value,
|
72
73
|
origin: event
|
73
|
-
});
|
74
|
+
}));
|
74
75
|
},
|
75
76
|
onBlur: function (event) {
|
76
77
|
const {
|
77
78
|
value = ''
|
78
79
|
} = event.detail;
|
79
|
-
onBlur === null || onBlur === void 0
|
80
|
+
onBlur === null || onBlur === void 0 || onBlur(_objectSpread(_objectSpread({}, event), {}, {
|
80
81
|
type: 'blur',
|
81
82
|
value,
|
82
83
|
origin: event
|
83
|
-
});
|
84
|
+
}));
|
84
85
|
},
|
85
86
|
onConfirm: function (event) {
|
86
87
|
const {
|
87
88
|
value = ''
|
88
89
|
} = event.detail;
|
89
90
|
setInternalValue(value);
|
90
|
-
onConfirm === null || onConfirm === void 0
|
91
|
+
onConfirm === null || onConfirm === void 0 || onConfirm(event);
|
91
92
|
},
|
92
93
|
onFocus: function (event) {
|
93
94
|
const {
|
@@ -95,12 +96,12 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
95
96
|
height = 0
|
96
97
|
} = event.detail;
|
97
98
|
setInternalValue(value);
|
98
|
-
onFocus === null || onFocus === void 0
|
99
|
+
onFocus === null || onFocus === void 0 || onFocus(_objectSpread(_objectSpread({}, event), {}, {
|
99
100
|
type: 'focus',
|
100
101
|
value,
|
101
102
|
height,
|
102
103
|
origin: event
|
103
|
-
});
|
104
|
+
}));
|
104
105
|
},
|
105
106
|
value: internalValue
|
106
107
|
}, selection, restProps));
|
package/lib/Input/props.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
+
import { GenericEvent } from '@ray-js/adapter';
|
1
2
|
import { BaseProps } from '../types';
|
2
|
-
import { GenericEvent as WxEvent } from '@ray-core/wechat';
|
3
3
|
export type InputType = 'text' | 'number' | 'digit' | 'idcard';
|
4
4
|
export interface InputProps extends BaseProps {
|
5
5
|
/**
|
@@ -63,66 +63,32 @@ export interface InputProps extends BaseProps {
|
|
63
63
|
* @description.zh 输入事件
|
64
64
|
* @default undefined
|
65
65
|
*/
|
66
|
-
onInput?: (event: {
|
67
|
-
|
68
|
-
|
69
|
-
* @description.zh 类型
|
70
|
-
* @default undefined
|
71
|
-
*/
|
72
|
-
type: string;
|
73
|
-
/**
|
74
|
-
* @description.en value
|
75
|
-
* @description.zh 价值
|
76
|
-
* @default undefined
|
77
|
-
*/
|
78
|
-
value: string;
|
79
|
-
origin: WxEvent | Event;
|
80
|
-
}) => void;
|
66
|
+
onInput?: (event: GenericEvent<{
|
67
|
+
value: any;
|
68
|
+
}>) => void;
|
81
69
|
/**
|
82
70
|
* @description.en onConfirm
|
83
71
|
* @description.zh 确认事件
|
84
72
|
* @default undefined
|
85
73
|
*/
|
86
|
-
onConfirm?: (event:
|
74
|
+
onConfirm?: (event: GenericEvent<{
|
75
|
+
value: any;
|
76
|
+
}>) => void;
|
87
77
|
/**
|
88
78
|
* @description.en onFocus
|
89
79
|
* @description.zh 焦点事件
|
90
80
|
* @default undefined
|
91
81
|
*/
|
92
|
-
onFocus?: (event: {
|
93
|
-
|
94
|
-
|
95
|
-
* @description.zh 类型
|
96
|
-
* @default undefined
|
97
|
-
*/
|
98
|
-
type: string;
|
99
|
-
/**
|
100
|
-
* @description.en value
|
101
|
-
* @description.zh 价值
|
102
|
-
* @default undefined
|
103
|
-
*/
|
104
|
-
value: string;
|
105
|
-
origin: WxEvent | FocusEvent;
|
106
|
-
}) => void;
|
82
|
+
onFocus?: (event: GenericEvent<{
|
83
|
+
value: any;
|
84
|
+
}>) => void;
|
107
85
|
/**
|
108
86
|
* @description.en onBlur
|
109
87
|
* @description.zh 丢焦事件
|
110
88
|
* @default undefined
|
111
89
|
*/
|
112
|
-
onBlur?: (event: {
|
113
|
-
|
114
|
-
|
115
|
-
* @description.zh 类型
|
116
|
-
* @default undefined
|
117
|
-
*/
|
118
|
-
type: string;
|
119
|
-
/**
|
120
|
-
* @description.en value
|
121
|
-
* @description.zh 价值
|
122
|
-
* @default undefined
|
123
|
-
*/
|
124
|
-
value: string;
|
125
|
-
origin: WxEvent | FocusEvent;
|
126
|
-
}) => void;
|
90
|
+
onBlur?: (event: GenericEvent<{
|
91
|
+
value: any;
|
92
|
+
}>) => void;
|
127
93
|
}
|
128
94
|
export declare const defaultInputProps: Partial<InputProps>;
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
|
3
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
4
2
|
const IpcPlayer = () => {
|
5
|
-
return /*#__PURE__*/React.createElement("div", null, "web
|
3
|
+
return /*#__PURE__*/React.createElement("div", null, "The web side is not implemented yet.");
|
6
4
|
};
|
7
5
|
export default IpcPlayer;
|
@@ -3,6 +3,6 @@ import { View } from '@ray-js/components';
|
|
3
3
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
5
5
|
function IpcPlayer() {
|
6
|
-
return /*#__PURE__*/React.createElement(View, null, "
|
6
|
+
return /*#__PURE__*/React.createElement(View, null, "Wechat mini program side has not been implemented");
|
7
7
|
}
|
8
8
|
export default IpcPlayer;
|
package/lib/Map/Map.js
CHANGED
@@ -14,7 +14,7 @@ export const MovableView = props => {
|
|
14
14
|
restProps = _objectWithoutProperties(props, _excluded);
|
15
15
|
const currentNode = React.useRef(null);
|
16
16
|
useEventListener('change', e => {
|
17
|
-
onChange === null || onChange === void 0
|
17
|
+
onChange === null || onChange === void 0 || onChange(_objectSpread(_objectSpread({
|
18
18
|
type: 'change'
|
19
19
|
}, e.detail), {}, {
|
20
20
|
origin: e
|
@@ -23,7 +23,7 @@ export const MovableView = props => {
|
|
23
23
|
target: currentNode
|
24
24
|
});
|
25
25
|
useEventListener('scale', e => {
|
26
|
-
onScale === null || onScale === void 0
|
26
|
+
onScale === null || onScale === void 0 || onScale(_objectSpread(_objectSpread({
|
27
27
|
type: 'scale'
|
28
28
|
}, e.detail), {}, {
|
29
29
|
origin: e
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
|
3
|
-
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
4
2
|
const NativeVideo = () => {
|
5
|
-
return /*#__PURE__*/React.createElement("div", null, "web
|
3
|
+
return /*#__PURE__*/React.createElement("div", null, "The web side is not implemented yet.");
|
6
4
|
};
|
7
5
|
export default NativeVideo;
|
@@ -3,6 +3,6 @@ import { View } from '@ray-js/components';
|
|
3
3
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
5
5
|
function NativeVideo() {
|
6
|
-
return /*#__PURE__*/React.createElement(View, null, "
|
6
|
+
return /*#__PURE__*/React.createElement(View, null, "Wechat mini program side has not been implemented");
|
7
7
|
}
|
8
8
|
export default NativeVideo;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
3
|
import React, { useRef } from 'react';
|
3
4
|
import { useEventListener } from 'ahooks';
|
4
5
|
import { defaultPageContainerProps } from './props';
|
@@ -10,64 +11,64 @@ const PageContainer = props => {
|
|
10
11
|
const currentNode = useRef(null);
|
11
12
|
useEventListener('clickoverlay', e => {
|
12
13
|
var _props$onClickOverlay;
|
13
|
-
(_props$onClickOverlay = props.onClickOverlay) === null || _props$onClickOverlay === void 0
|
14
|
+
(_props$onClickOverlay = props.onClickOverlay) === null || _props$onClickOverlay === void 0 || _props$onClickOverlay.call(props, _objectSpread(_objectSpread({}, e), {}, {
|
14
15
|
type: 'clickoverlay',
|
15
16
|
origin: e
|
16
|
-
});
|
17
|
+
}));
|
17
18
|
}, {
|
18
19
|
target: currentNode
|
19
20
|
});
|
20
21
|
useEventListener('beforeenter', e => {
|
21
22
|
var _props$onBeforeEnter;
|
22
|
-
(_props$onBeforeEnter = props.onBeforeEnter) === null || _props$onBeforeEnter === void 0
|
23
|
+
(_props$onBeforeEnter = props.onBeforeEnter) === null || _props$onBeforeEnter === void 0 || _props$onBeforeEnter.call(props, _objectSpread(_objectSpread({}, e), {}, {
|
23
24
|
type: 'beforeenter',
|
24
25
|
origin: e
|
25
|
-
});
|
26
|
+
}));
|
26
27
|
}, {
|
27
28
|
target: currentNode
|
28
29
|
});
|
29
30
|
useEventListener('enter', e => {
|
30
31
|
var _props$onEnter;
|
31
|
-
(_props$onEnter = props.onEnter) === null || _props$onEnter === void 0
|
32
|
+
(_props$onEnter = props.onEnter) === null || _props$onEnter === void 0 || _props$onEnter.call(props, _objectSpread(_objectSpread({}, e), {}, {
|
32
33
|
type: 'enter',
|
33
34
|
origin: e
|
34
|
-
});
|
35
|
+
}));
|
35
36
|
}, {
|
36
37
|
target: currentNode
|
37
38
|
});
|
38
39
|
useEventListener('afterenter', e => {
|
39
40
|
var _props$onAfterEnter;
|
40
|
-
(_props$onAfterEnter = props.onAfterEnter) === null || _props$onAfterEnter === void 0
|
41
|
+
(_props$onAfterEnter = props.onAfterEnter) === null || _props$onAfterEnter === void 0 || _props$onAfterEnter.call(props, _objectSpread(_objectSpread({}, e), {}, {
|
41
42
|
type: 'afterenter',
|
42
43
|
origin: e
|
43
|
-
});
|
44
|
+
}));
|
44
45
|
}, {
|
45
46
|
target: currentNode
|
46
47
|
});
|
47
48
|
useEventListener('beforeleave', e => {
|
48
49
|
var _props$onBeforeLeave;
|
49
|
-
(_props$onBeforeLeave = props.onBeforeLeave) === null || _props$onBeforeLeave === void 0
|
50
|
+
(_props$onBeforeLeave = props.onBeforeLeave) === null || _props$onBeforeLeave === void 0 || _props$onBeforeLeave.call(props, _objectSpread(_objectSpread({}, e), {}, {
|
50
51
|
type: 'beforeleave',
|
51
52
|
origin: e
|
52
|
-
});
|
53
|
+
}));
|
53
54
|
}, {
|
54
55
|
target: currentNode
|
55
56
|
});
|
56
57
|
useEventListener('leave', e => {
|
57
58
|
var _props$onLeave;
|
58
|
-
(_props$onLeave = props.onLeave) === null || _props$onLeave === void 0
|
59
|
+
(_props$onLeave = props.onLeave) === null || _props$onLeave === void 0 || _props$onLeave.call(props, _objectSpread(_objectSpread({}, e), {}, {
|
59
60
|
type: 'leave',
|
60
61
|
origin: e
|
61
|
-
});
|
62
|
+
}));
|
62
63
|
}, {
|
63
64
|
target: currentNode
|
64
65
|
});
|
65
66
|
useEventListener('afterleave', e => {
|
66
67
|
var _props$onAfterLeave;
|
67
|
-
(_props$onAfterLeave = props.onAfterLeave) === null || _props$onAfterLeave === void 0
|
68
|
+
(_props$onAfterLeave = props.onAfterLeave) === null || _props$onAfterLeave === void 0 || _props$onAfterLeave.call(props, _objectSpread(_objectSpread({}, e), {}, {
|
68
69
|
type: 'afterleave',
|
69
70
|
origin: e
|
70
|
-
});
|
71
|
+
}));
|
71
72
|
}, {
|
72
73
|
target: currentNode
|
73
74
|
});
|
@@ -1,11 +1,9 @@
|
|
1
1
|
import { BaseProps } from '../types';
|
2
2
|
import * as React from 'react';
|
3
|
-
import {
|
4
|
-
export type PageContainerEventType = {
|
5
|
-
|
6
|
-
|
7
|
-
origin: BaseEvent;
|
8
|
-
};
|
3
|
+
import { GenericEvent } from '@ray-js/adapter';
|
4
|
+
export type PageContainerEventType = GenericEvent<{
|
5
|
+
value: any;
|
6
|
+
}>;
|
9
7
|
export type PageContainerProps = BaseProps & {
|
10
8
|
/** 文本是否可选 */
|
11
9
|
show?: boolean;
|