@ray-js/components 1.4.43 → 1.4.44
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/Button/Button.thing.js +1 -1
- package/lib/Button/Button.wechat.js +1 -1
- package/lib/CheckboxGroup/CheckboxGroup.js +1 -1
- package/lib/Form/Form.wechat.js +1 -0
- package/lib/Icon/Icon.js +3 -3
- package/lib/Icon/Icon.thing.js +3 -3
- package/lib/Icon/Icon.wechat.js +3 -3
- package/lib/Image/Image.js +2 -2
- package/lib/Image/Image.wechat.js +2 -1
- package/lib/Input/Input.js +5 -4
- package/lib/Input/Input.thing.js +3 -2
- package/lib/Input/Input.wechat.js +5 -4
- package/lib/MovableView/MovableView.js +2 -2
- package/lib/PageContainer/PageContainer.js +7 -7
- package/lib/Picker/Picker.js +3 -2
- package/lib/Picker/Picker.thing.js +4 -3
- package/lib/Picker/Picker.wechat.js +4 -3
- package/lib/PickerView/PickerView.js +1 -1
- package/lib/PickerView/PickerView.thing.js +3 -3
- package/lib/PickerView/PickerView.wechat.js +3 -3
- package/lib/ScrollView/ScrollView.js +3 -3
- package/lib/Slider/Slider.js +2 -2
- package/lib/Swiper/Swiper.js +3 -2
- package/lib/Swiper/Swiper.thing.js +3 -2
- package/lib/Swiper/Swiper.wechat.js +3 -2
- package/lib/Switch/Switch.js +1 -1
- package/lib/Switch/Switch.thing.js +1 -1
- package/lib/Switch/Switch.wechat.js +1 -1
- package/lib/Text/Text.wechat.js +1 -0
- package/lib/Textarea/Textarea.js +3 -3
- package/lib/Textarea/Textarea.thing.js +1 -1
- package/lib/Textarea/Textarea.wechat.js +1 -1
- package/lib/View/View.js +1 -0
- package/lib/View/View.thing.js +1 -0
- package/lib/View/View.wechat.js +1 -0
- package/lib/core/index.js +1 -1
- package/lib/utils/handleProps.js +2 -1
- package/package.json +7 -7
@@ -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,
|
@@ -15,7 +15,7 @@ const CheckboxGroup = props => {
|
|
15
15
|
const currentNode = React.useRef(null);
|
16
16
|
useEventListener('clickoverlay', e => {
|
17
17
|
var _props$onChange;
|
18
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0
|
18
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, {
|
19
19
|
type: e.type,
|
20
20
|
value: e.detail.value,
|
21
21
|
origin: e
|
package/lib/Form/Form.wechat.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import * as React from 'react';
|
5
6
|
import { Form as RemaxForm } from '@ray-core/wechat';
|
6
7
|
import { useTouch } from '@ray-js/framework-shared';
|
package/lib/Icon/Icon.js
CHANGED
@@ -12,10 +12,10 @@ const Icon = props => {
|
|
12
12
|
className
|
13
13
|
} = props;
|
14
14
|
return /*#__PURE__*/React.createElement(Text, {
|
15
|
-
className:
|
15
|
+
className: "iconfont ".concat(type, " ").concat(className),
|
16
16
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
17
|
-
color:
|
18
|
-
fontSize:
|
17
|
+
color: "".concat(color),
|
18
|
+
fontSize: "".concat(size, "px")
|
19
19
|
})
|
20
20
|
});
|
21
21
|
};
|
package/lib/Icon/Icon.thing.js
CHANGED
@@ -11,10 +11,10 @@ const Icon = props => {
|
|
11
11
|
className
|
12
12
|
} = props;
|
13
13
|
return /*#__PURE__*/React.createElement(Text, {
|
14
|
-
className:
|
14
|
+
className: "iconfont ".concat(type, " ").concat(className),
|
15
15
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
16
|
-
color:
|
17
|
-
fontSize:
|
16
|
+
color: "".concat(color),
|
17
|
+
fontSize: "".concat(size, "px")
|
18
18
|
})
|
19
19
|
});
|
20
20
|
};
|
package/lib/Icon/Icon.wechat.js
CHANGED
@@ -12,10 +12,10 @@ const Icon = props => {
|
|
12
12
|
className
|
13
13
|
} = props;
|
14
14
|
return /*#__PURE__*/React.createElement(Text, {
|
15
|
-
className:
|
15
|
+
className: "iconfont ".concat(type, " ").concat(className),
|
16
16
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
17
|
-
color:
|
18
|
-
fontSize:
|
17
|
+
color: "".concat(color),
|
18
|
+
fontSize: "".concat(size, "px")
|
19
19
|
})
|
20
20
|
});
|
21
21
|
};
|
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
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["style", "className", "onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart", "onLoad", "onError", "mode"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import clsx from 'clsx';
|
5
6
|
import * as React from 'react';
|
6
7
|
import { inlineStyle, useTouch } from '@ray-js/framework-shared';
|
@@ -33,7 +34,7 @@ const Image = props => {
|
|
33
34
|
className: clsx('ray-image', className),
|
34
35
|
mode: mode,
|
35
36
|
onLoad: e => {
|
36
|
-
onLoad === null || onLoad === void 0
|
37
|
+
onLoad === null || onLoad === void 0 || onLoad({
|
37
38
|
width: e.detail.width,
|
38
39
|
height: e.detail.height,
|
39
40
|
origin: e
|
package/lib/Input/Input.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["placeholderStyle", "className", "maxLength", "onBlur", "onFocus", "onConfirm"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import * as React from 'react';
|
5
6
|
import clsx from 'clsx';
|
6
7
|
import { useEventListener } from 'ahooks';
|
@@ -21,7 +22,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
21
22
|
const [placeholderStyleClassName] = useStylesheet(inlineStyle(placeholderStyle));
|
22
23
|
const currentNode = ref || React.useRef(null);
|
23
24
|
useEventListener('focus', e => {
|
24
|
-
onFocus === null || onFocus === void 0
|
25
|
+
onFocus === null || onFocus === void 0 || onFocus({
|
25
26
|
type: 'focus',
|
26
27
|
value: e.detail.value,
|
27
28
|
origin: e
|
@@ -33,7 +34,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
33
34
|
const {
|
34
35
|
value
|
35
36
|
} = e.target;
|
36
|
-
onBlur === null || onBlur === void 0
|
37
|
+
onBlur === null || onBlur === void 0 || onBlur({
|
37
38
|
type: 'blur',
|
38
39
|
value,
|
39
40
|
origin: e
|
@@ -45,7 +46,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
45
46
|
const {
|
46
47
|
value
|
47
48
|
} = e.target;
|
48
|
-
onConfirm === null || onConfirm === void 0
|
49
|
+
onConfirm === null || onConfirm === void 0 || onConfirm({
|
49
50
|
type: 'confirm',
|
50
51
|
value,
|
51
52
|
origin: e
|
@@ -63,7 +64,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
63
64
|
const {
|
64
65
|
value
|
65
66
|
} = e.target;
|
66
|
-
(_props$onInput = props.onInput) === null || _props$onInput === void 0
|
67
|
+
(_props$onInput = props.onInput) === null || _props$onInput === void 0 || _props$onInput.call(props, {
|
67
68
|
type: 'input',
|
68
69
|
value,
|
69
70
|
origin: e
|
package/lib/Input/Input.thing.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["name", "id", "className", "style", "disabled", "type", "value", "focus", "maxLength", "onBlur", "onConfirm", "onFocus", "onInput", "password", "placeholder", "placeholderStyle"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import * as React from 'react';
|
5
6
|
import clsx from 'clsx';
|
6
7
|
import { Input as RemaxInput } from '@ray-js/adapter';
|
@@ -65,7 +66,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
65
66
|
// 内部 value 管控
|
66
67
|
bufferValue.current = value;
|
67
68
|
event.value = value;
|
68
|
-
onInput === null || onInput === void 0
|
69
|
+
onInput === null || onInput === void 0 || onInput(event);
|
69
70
|
},
|
70
71
|
onBlur: onBlur,
|
71
72
|
onConfirm: function (event) {
|
@@ -73,7 +74,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
73
74
|
value = ''
|
74
75
|
} = event.detail;
|
75
76
|
setInternalValue(value);
|
76
|
-
onConfirm === null || onConfirm === void 0
|
77
|
+
onConfirm === null || onConfirm === void 0 || onConfirm(event);
|
77
78
|
},
|
78
79
|
onFocus: onFocus,
|
79
80
|
value: internalValue
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["name", "id", "className", "style", "disabled", "type", "value", "focus", "maxLength", "onBlur", "onConfirm", "onFocus", "onInput", "password", "placeholder", "placeholderStyle"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import * as React from 'react';
|
5
6
|
import clsx from 'clsx';
|
6
7
|
import { Input as RemaxInput } from '@ray-core/wechat';
|
@@ -65,7 +66,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
65
66
|
} = event.detail;
|
66
67
|
// 内部 value 管控
|
67
68
|
bufferValue.current = value;
|
68
|
-
onInput === null || onInput === void 0
|
69
|
+
onInput === null || onInput === void 0 || onInput({
|
69
70
|
type: 'input',
|
70
71
|
value,
|
71
72
|
origin: event
|
@@ -75,7 +76,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
75
76
|
const {
|
76
77
|
value = ''
|
77
78
|
} = event.detail;
|
78
|
-
onBlur === null || onBlur === void 0
|
79
|
+
onBlur === null || onBlur === void 0 || onBlur({
|
79
80
|
type: 'blur',
|
80
81
|
value,
|
81
82
|
origin: event
|
@@ -86,7 +87,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
86
87
|
value = ''
|
87
88
|
} = event.detail;
|
88
89
|
setInternalValue(value);
|
89
|
-
onConfirm === null || onConfirm === void 0
|
90
|
+
onConfirm === null || onConfirm === void 0 || onConfirm(event);
|
90
91
|
},
|
91
92
|
onFocus: function (event) {
|
92
93
|
const {
|
@@ -94,7 +95,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
|
|
94
95
|
height = 0
|
95
96
|
} = event.detail;
|
96
97
|
setInternalValue(value);
|
97
|
-
onFocus === null || onFocus === void 0
|
98
|
+
onFocus === null || onFocus === void 0 || onFocus({
|
98
99
|
type: 'focus',
|
99
100
|
value,
|
100
101
|
height,
|
@@ -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
|
@@ -10,7 +10,7 @@ const PageContainer = props => {
|
|
10
10
|
const currentNode = useRef(null);
|
11
11
|
useEventListener('clickoverlay', e => {
|
12
12
|
var _props$onClickOverlay;
|
13
|
-
(_props$onClickOverlay = props.onClickOverlay) === null || _props$onClickOverlay === void 0
|
13
|
+
(_props$onClickOverlay = props.onClickOverlay) === null || _props$onClickOverlay === void 0 || _props$onClickOverlay.call(props, {
|
14
14
|
type: 'clickoverlay',
|
15
15
|
origin: e
|
16
16
|
});
|
@@ -19,7 +19,7 @@ const PageContainer = props => {
|
|
19
19
|
});
|
20
20
|
useEventListener('beforeenter', e => {
|
21
21
|
var _props$onBeforeEnter;
|
22
|
-
(_props$onBeforeEnter = props.onBeforeEnter) === null || _props$onBeforeEnter === void 0
|
22
|
+
(_props$onBeforeEnter = props.onBeforeEnter) === null || _props$onBeforeEnter === void 0 || _props$onBeforeEnter.call(props, {
|
23
23
|
type: 'beforeenter',
|
24
24
|
origin: e
|
25
25
|
});
|
@@ -28,7 +28,7 @@ const PageContainer = props => {
|
|
28
28
|
});
|
29
29
|
useEventListener('enter', e => {
|
30
30
|
var _props$onEnter;
|
31
|
-
(_props$onEnter = props.onEnter) === null || _props$onEnter === void 0
|
31
|
+
(_props$onEnter = props.onEnter) === null || _props$onEnter === void 0 || _props$onEnter.call(props, {
|
32
32
|
type: 'enter',
|
33
33
|
origin: e
|
34
34
|
});
|
@@ -37,7 +37,7 @@ const PageContainer = props => {
|
|
37
37
|
});
|
38
38
|
useEventListener('afterenter', e => {
|
39
39
|
var _props$onAfterEnter;
|
40
|
-
(_props$onAfterEnter = props.onAfterEnter) === null || _props$onAfterEnter === void 0
|
40
|
+
(_props$onAfterEnter = props.onAfterEnter) === null || _props$onAfterEnter === void 0 || _props$onAfterEnter.call(props, {
|
41
41
|
type: 'afterenter',
|
42
42
|
origin: e
|
43
43
|
});
|
@@ -46,7 +46,7 @@ const PageContainer = props => {
|
|
46
46
|
});
|
47
47
|
useEventListener('beforeleave', e => {
|
48
48
|
var _props$onBeforeLeave;
|
49
|
-
(_props$onBeforeLeave = props.onBeforeLeave) === null || _props$onBeforeLeave === void 0
|
49
|
+
(_props$onBeforeLeave = props.onBeforeLeave) === null || _props$onBeforeLeave === void 0 || _props$onBeforeLeave.call(props, {
|
50
50
|
type: 'beforeleave',
|
51
51
|
origin: e
|
52
52
|
});
|
@@ -55,7 +55,7 @@ const PageContainer = props => {
|
|
55
55
|
});
|
56
56
|
useEventListener('leave', e => {
|
57
57
|
var _props$onLeave;
|
58
|
-
(_props$onLeave = props.onLeave) === null || _props$onLeave === void 0
|
58
|
+
(_props$onLeave = props.onLeave) === null || _props$onLeave === void 0 || _props$onLeave.call(props, {
|
59
59
|
type: 'leave',
|
60
60
|
origin: e
|
61
61
|
});
|
@@ -64,7 +64,7 @@ const PageContainer = props => {
|
|
64
64
|
});
|
65
65
|
useEventListener('afterleave', e => {
|
66
66
|
var _props$onAfterLeave;
|
67
|
-
(_props$onAfterLeave = props.onAfterLeave) === null || _props$onAfterLeave === void 0
|
67
|
+
(_props$onAfterLeave = props.onAfterLeave) === null || _props$onAfterLeave === void 0 || _props$onAfterLeave.call(props, {
|
68
68
|
type: 'afterleave',
|
69
69
|
origin: e
|
70
70
|
});
|
package/lib/Picker/Picker.js
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
2
3
|
import * as React from 'react';
|
3
4
|
import { useTouch } from '@ray-js/framework-shared';
|
4
5
|
import { useEventListener } from 'ahooks';
|
@@ -16,7 +17,7 @@ const Picker = props => {
|
|
16
17
|
const currentNode = React.useRef(null);
|
17
18
|
useEventListener('change', e => {
|
18
19
|
var _props$onChange;
|
19
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0
|
20
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, {
|
20
21
|
type: 'change',
|
21
22
|
value: e.detail.value,
|
22
23
|
origin: e
|
@@ -26,7 +27,7 @@ const Picker = props => {
|
|
26
27
|
});
|
27
28
|
useEventListener('cancel', e => {
|
28
29
|
var _props$onCancel;
|
29
|
-
(_props$onCancel = props.onCancel) === null || _props$onCancel === void 0
|
30
|
+
(_props$onCancel = props.onCancel) === null || _props$onCancel === void 0 || _props$onCancel.call(props, {
|
30
31
|
type: 'cancel',
|
31
32
|
origin: e
|
32
33
|
});
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["className", "style", "id", "onChange", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onClick", "onCancel"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import clsx from 'clsx';
|
5
6
|
import * as React from 'react';
|
6
7
|
import { inlineStyle, useTouch } from '@ray-js/framework-shared';
|
@@ -28,20 +29,20 @@ const Picker = props => {
|
|
28
29
|
});
|
29
30
|
return /*#__PURE__*/React.createElement(RemaxPicker, _extends({
|
30
31
|
onChange: e => {
|
31
|
-
onChange === null || onChange === void 0
|
32
|
+
onChange === null || onChange === void 0 || onChange({
|
32
33
|
type: e.type,
|
33
34
|
value: e.detail.value,
|
34
35
|
origin: e
|
35
36
|
});
|
36
37
|
},
|
37
38
|
onCancel: e => {
|
38
|
-
onCancel === null || onCancel === void 0
|
39
|
+
onCancel === null || onCancel === void 0 || onCancel({
|
39
40
|
type: e.type,
|
40
41
|
origin: e
|
41
42
|
});
|
42
43
|
},
|
43
44
|
onColumnChange: e => {
|
44
|
-
onCancel === null || onCancel === void 0
|
45
|
+
onCancel === null || onCancel === void 0 || onCancel({
|
45
46
|
type: e.type,
|
46
47
|
value: e.detail.value,
|
47
48
|
origin: e
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["className", "style", "id", "onChange", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onClick", "onCancel"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import clsx from 'clsx';
|
5
6
|
import * as React from 'react';
|
6
7
|
import { inlineStyle, useTouch } from '@ray-js/framework-shared';
|
@@ -28,20 +29,20 @@ const Picker = props => {
|
|
28
29
|
});
|
29
30
|
return /*#__PURE__*/React.createElement(RemaxPicker, _extends({
|
30
31
|
onChange: e => {
|
31
|
-
onChange === null || onChange === void 0
|
32
|
+
onChange === null || onChange === void 0 || onChange({
|
32
33
|
type: e.type,
|
33
34
|
value: e.detail.value,
|
34
35
|
origin: e
|
35
36
|
});
|
36
37
|
},
|
37
38
|
onCancel: e => {
|
38
|
-
onCancel === null || onCancel === void 0
|
39
|
+
onCancel === null || onCancel === void 0 || onCancel({
|
39
40
|
type: e.type,
|
40
41
|
origin: e
|
41
42
|
});
|
42
43
|
},
|
43
44
|
onColumnChange: e => {
|
44
|
-
onCancel === null || onCancel === void 0
|
45
|
+
onCancel === null || onCancel === void 0 || onCancel({
|
45
46
|
type: e.type,
|
46
47
|
value: e.detail.value,
|
47
48
|
origin: e
|
@@ -14,7 +14,7 @@ const PickerView = props => {
|
|
14
14
|
const currentNode = React.useRef(null);
|
15
15
|
useEventListener('change', e => {
|
16
16
|
var _props$onChange;
|
17
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0
|
17
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, {
|
18
18
|
type: 'change',
|
19
19
|
// @ts-ignore
|
20
20
|
value: e.detail.value,
|
@@ -19,21 +19,21 @@ const Picker = props => {
|
|
19
19
|
restProps = _objectWithoutProperties(props, _excluded);
|
20
20
|
return /*#__PURE__*/React.createElement(RemaxPickerView, _extends({
|
21
21
|
onChange: e => {
|
22
|
-
onChange === null || onChange === void 0
|
22
|
+
onChange === null || onChange === void 0 || onChange({
|
23
23
|
type: 'change',
|
24
24
|
value: e.detail.value,
|
25
25
|
origin: e
|
26
26
|
});
|
27
27
|
},
|
28
28
|
onPickstart: e => {
|
29
|
-
onPickstart === null || onPickstart === void 0
|
29
|
+
onPickstart === null || onPickstart === void 0 || onPickstart({
|
30
30
|
type: 'pickstart',
|
31
31
|
value: e.detail.value,
|
32
32
|
origin: e
|
33
33
|
});
|
34
34
|
},
|
35
35
|
onPickend: e => {
|
36
|
-
onPickend === null || onPickend === void 0
|
36
|
+
onPickend === null || onPickend === void 0 || onPickend({
|
37
37
|
type: 'pickend',
|
38
38
|
value: e.detail.value,
|
39
39
|
origin: e
|
@@ -19,21 +19,21 @@ const Picker = props => {
|
|
19
19
|
restProps = _objectWithoutProperties(props, _excluded);
|
20
20
|
return /*#__PURE__*/React.createElement(RemaxPickerView, _extends({
|
21
21
|
onChange: e => {
|
22
|
-
onChange === null || onChange === void 0
|
22
|
+
onChange === null || onChange === void 0 || onChange({
|
23
23
|
type: 'change',
|
24
24
|
value: e.detail.value,
|
25
25
|
origin: e
|
26
26
|
});
|
27
27
|
},
|
28
28
|
onPickstart: e => {
|
29
|
-
onPickstart === null || onPickstart === void 0
|
29
|
+
onPickstart === null || onPickstart === void 0 || onPickstart({
|
30
30
|
type: 'pickstart',
|
31
31
|
value: e.detail.value,
|
32
32
|
origin: e
|
33
33
|
});
|
34
34
|
},
|
35
35
|
onPickend: e => {
|
36
|
-
onPickend === null || onPickend === void 0
|
36
|
+
onPickend === null || onPickend === void 0 || onPickend({
|
37
37
|
type: 'pickend',
|
38
38
|
value: e.detail.value,
|
39
39
|
origin: e
|
@@ -15,7 +15,7 @@ const ScrollView = props => {
|
|
15
15
|
restProps = _objectWithoutProperties(props, _excluded);
|
16
16
|
const currentNode = React.useRef(null);
|
17
17
|
useEventListener('scroll', e => {
|
18
|
-
onScroll === null || onScroll === void 0
|
18
|
+
onScroll === null || onScroll === void 0 || onScroll(_objectSpread(_objectSpread({
|
19
19
|
type: 'scroll'
|
20
20
|
}, e.detail), {}, {
|
21
21
|
origin: e
|
@@ -24,7 +24,7 @@ const ScrollView = props => {
|
|
24
24
|
target: currentNode
|
25
25
|
});
|
26
26
|
useEventListener('scrolltoupper', e => {
|
27
|
-
onScrollToUpper === null || onScrollToUpper === void 0
|
27
|
+
onScrollToUpper === null || onScrollToUpper === void 0 || onScrollToUpper(_objectSpread(_objectSpread({
|
28
28
|
type: 'scrolltoupper'
|
29
29
|
}, e.detail), {}, {
|
30
30
|
origin: e
|
@@ -33,7 +33,7 @@ const ScrollView = props => {
|
|
33
33
|
target: currentNode
|
34
34
|
});
|
35
35
|
useEventListener('scrolltolower', e => {
|
36
|
-
onScrollToLower === null || onScrollToLower === void 0
|
36
|
+
onScrollToLower === null || onScrollToLower === void 0 || onScrollToLower(_objectSpread(_objectSpread({
|
37
37
|
type: 'scrolltolower'
|
38
38
|
}, e.detail), {}, {
|
39
39
|
origin: e
|
package/lib/Slider/Slider.js
CHANGED
@@ -6,7 +6,7 @@ const Slider = props => {
|
|
6
6
|
const currentNode = React.useRef(null);
|
7
7
|
useEventListener('change', e => {
|
8
8
|
var _props$onChange;
|
9
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0
|
9
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, {
|
10
10
|
type: 'change',
|
11
11
|
value: e.detail.value,
|
12
12
|
origin: e
|
@@ -16,7 +16,7 @@ const Slider = props => {
|
|
16
16
|
});
|
17
17
|
useEventListener('changing', e => {
|
18
18
|
var _props$onChanging;
|
19
|
-
(_props$onChanging = props.onChanging) === null || _props$onChanging === void 0
|
19
|
+
(_props$onChanging = props.onChanging) === null || _props$onChanging === void 0 || _props$onChanging.call(props, {
|
20
20
|
type: 'changing',
|
21
21
|
value: e.detail.value,
|
22
22
|
origin: e
|
package/lib/Swiper/Swiper.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["id", "style", "className", "current", "dataSource", "onAfterChange", "onChange", "renderItem", "children"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
// import clsx from 'clsx';
|
5
6
|
import * as React from 'react';
|
6
7
|
import handleProps from '../utils/handleProps';
|
@@ -28,10 +29,10 @@ function Swiper(props) {
|
|
28
29
|
}
|
29
30
|
}, [current]);
|
30
31
|
function handleChange(event) {
|
31
|
-
onChange === null || onChange === void 0
|
32
|
+
onChange === null || onChange === void 0 || onChange(event === null || event === void 0 ? void 0 : event.detail);
|
32
33
|
}
|
33
34
|
function handleAfterChange(event) {
|
34
|
-
onAfterChange === null || onAfterChange === void 0
|
35
|
+
onAfterChange === null || onAfterChange === void 0 || onAfterChange(event === null || event === void 0 ? void 0 : event.detail);
|
35
36
|
}
|
36
37
|
useEventListener('change', e => {
|
37
38
|
handleChange(e);
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["id", "style", "className", "current", "dataSource", "onAfterChange", "onChange", "renderItem", "children"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import clsx from 'clsx';
|
5
6
|
import * as React from 'react';
|
6
7
|
import { inlineStyle } from '@ray-js/framework-shared';
|
@@ -33,10 +34,10 @@ function Swiper(props) {
|
|
33
34
|
style: inlineStyle(style),
|
34
35
|
className: clsx('ray-swiper', className),
|
35
36
|
onChange: function (event) {
|
36
|
-
onChange === null || onChange === void 0
|
37
|
+
onChange === null || onChange === void 0 || onChange(event);
|
37
38
|
},
|
38
39
|
onAnimationFinish: function (event) {
|
39
|
-
onAfterChange === null || onAfterChange === void 0
|
40
|
+
onAfterChange === null || onAfterChange === void 0 || onAfterChange(event);
|
40
41
|
},
|
41
42
|
current: internalCurrent
|
42
43
|
}, propsAlias(restProps, SwiperPropsAlias)), function () {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["id", "style", "className", "current", "dataSource", "onAfterChange", "onChange", "renderItem", "children"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import clsx from 'clsx';
|
5
6
|
import * as React from 'react';
|
6
7
|
import { inlineStyle } from '@ray-js/framework-shared';
|
@@ -33,10 +34,10 @@ function Swiper(props) {
|
|
33
34
|
style: inlineStyle(style),
|
34
35
|
className: clsx('ray-swiper', className),
|
35
36
|
onChange: function (event) {
|
36
|
-
onChange === null || onChange === void 0
|
37
|
+
onChange === null || onChange === void 0 || onChange(event);
|
37
38
|
},
|
38
39
|
onAnimationFinish: function (event) {
|
39
|
-
onAfterChange === null || onAfterChange === void 0
|
40
|
+
onAfterChange === null || onAfterChange === void 0 || onAfterChange(event);
|
40
41
|
},
|
41
42
|
current: internalCurrent
|
42
43
|
}, propsAlias(restProps, SwiperPropsAlias)), function () {
|
package/lib/Switch/Switch.js
CHANGED
@@ -7,7 +7,7 @@ const Switch = props => {
|
|
7
7
|
const currentNode = React.useRef(null);
|
8
8
|
useEventListener('change', e => {
|
9
9
|
var _props$onChange;
|
10
|
-
(_props$onChange = props.onChange) === null || _props$onChange === void 0
|
10
|
+
(_props$onChange = props.onChange) === null || _props$onChange === void 0 || _props$onChange.call(props, _objectSpread(_objectSpread({
|
11
11
|
type: 'change'
|
12
12
|
}, e.detail), {}, {
|
13
13
|
origin: e
|
@@ -18,7 +18,7 @@ const Switch = props => {
|
|
18
18
|
return /*#__PURE__*/React.createElement(RemaxSwitch, _extends({
|
19
19
|
id: id,
|
20
20
|
onChange: e => {
|
21
|
-
onChange === null || onChange === void 0
|
21
|
+
onChange === null || onChange === void 0 || onChange({
|
22
22
|
type: 'change',
|
23
23
|
value: e.detail.value,
|
24
24
|
origin: e
|
@@ -19,7 +19,7 @@ const Switch = props => {
|
|
19
19
|
return /*#__PURE__*/React.createElement(RemaxSwitch, _extends({
|
20
20
|
id: id,
|
21
21
|
onChange: e => {
|
22
|
-
onChange === null || onChange === void 0
|
22
|
+
onChange === null || onChange === void 0 || onChange({
|
23
23
|
type: 'change',
|
24
24
|
value: e.detail.value,
|
25
25
|
origin: e
|
package/lib/Text/Text.wechat.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import * as React from 'react';
|
5
6
|
import { Text as RemaxText } from '@ray-core/wechat';
|
6
7
|
import { useTouch } from '@ray-js/framework-shared';
|
package/lib/Textarea/Textarea.js
CHANGED
@@ -16,7 +16,7 @@ const Textarea = props => {
|
|
16
16
|
restProps = _objectWithoutProperties(props, _excluded);
|
17
17
|
const currentNode = React.useRef(null);
|
18
18
|
useEventListener('input', e => {
|
19
|
-
onInput === null || onInput === void 0
|
19
|
+
onInput === null || onInput === void 0 || onInput({
|
20
20
|
type: 'input',
|
21
21
|
value: e.detail.value,
|
22
22
|
origin: e
|
@@ -25,7 +25,7 @@ const Textarea = props => {
|
|
25
25
|
target: currentNode
|
26
26
|
});
|
27
27
|
useEventListener('focus', e => {
|
28
|
-
onFocus === null || onFocus === void 0
|
28
|
+
onFocus === null || onFocus === void 0 || onFocus({
|
29
29
|
type: 'focus',
|
30
30
|
value: e.detail.value,
|
31
31
|
origin: e
|
@@ -34,7 +34,7 @@ const Textarea = props => {
|
|
34
34
|
target: currentNode
|
35
35
|
});
|
36
36
|
useEventListener('blur', e => {
|
37
|
-
onBlur === null || onBlur === void 0
|
37
|
+
onBlur === null || onBlur === void 0 || onBlur({
|
38
38
|
type: 'blur',
|
39
39
|
value: e.detail.value,
|
40
40
|
origin: e
|
package/lib/View/View.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["id", "className", "style", "children", "hoverClassName", "hoverStartTime", "hoverStayTime", "hoverable", "onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart", "onTransitionEnd"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import * as React from 'react';
|
5
6
|
import clsx from 'clsx';
|
6
7
|
import PropTypes from 'prop-types';
|
package/lib/View/View.thing.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["id", "className", "style", "hoverClassName", "hoverStartTime", "hoverStayTime", "children", "onLongClick", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onClick", "hoverable", "onTransitionEnd"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import * as React from 'react';
|
5
6
|
import clsx from 'clsx';
|
6
7
|
import PropTypes from 'prop-types';
|
package/lib/View/View.wechat.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["id", "className", "style", "hoverClassName", "hoverStartTime", "hoverStayTime", "children", "onLongClick", "onTouchStart", "onTouchMove", "onTouchEnd", "onTouchCancel", "onClick", "hoverable", "onTransitionEnd"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import * as React from 'react';
|
5
6
|
import clsx from 'clsx';
|
6
7
|
import { inlineStyle, useTouch } from '@ray-js/framework-shared';
|
package/lib/core/index.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
export function generateId() {
|
2
|
-
return
|
2
|
+
return "V".concat(Math.random().toString(32).substr(2, 6).toUpperCase());
|
3
3
|
}
|
4
4
|
export function nextFrame(duration) {
|
5
5
|
return new Promise(resolve => setTimeout(resolve, duration !== null && duration !== void 0 ? duration : 1000 / 30));
|
package/lib/utils/handleProps.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
3
|
const _excluded = ["className", "hoverClassName", "hoverStyle", "refresherDefaultStyle", "overlayStyle", "customStyle", "indicatorStyle", "maskStyle", "placeholderStyle", "borderStyle", "style", "children"];
|
4
|
+
import "core-js/modules/web.dom-collections.iterator.js";
|
4
5
|
import { inlineStyle } from '@ray-js/framework-shared';
|
5
6
|
import { paramCase } from 'param-case';
|
6
7
|
import s2o from 'style-to-object';
|
@@ -13,7 +14,7 @@ const transformStyle = originStyle => {
|
|
13
14
|
}
|
14
15
|
return Object.entries(inlineStyle(tempStyle)).map(_ref => {
|
15
16
|
let [k, v] = _ref;
|
16
|
-
return
|
17
|
+
return "".concat(k, ":").concat(v);
|
17
18
|
}).join(';');
|
18
19
|
};
|
19
20
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ray-js/components",
|
3
|
-
"version": "1.4.
|
3
|
+
"version": "1.4.44",
|
4
4
|
"description": "Ray basic components",
|
5
5
|
"keywords": [
|
6
6
|
"ray"
|
@@ -29,22 +29,22 @@
|
|
29
29
|
"dependencies": {
|
30
30
|
"@ray-core/macro": "^0.3.9",
|
31
31
|
"@ray-core/wechat": "^0.3.9",
|
32
|
-
"@ray-js/adapter": "1.4.
|
33
|
-
"@ray-js/framework-shared": "1.4.
|
34
|
-
"ahooks": "^3.7.
|
32
|
+
"@ray-js/adapter": "1.4.44",
|
33
|
+
"@ray-js/framework-shared": "1.4.44",
|
34
|
+
"ahooks": "^3.7.10",
|
35
35
|
"clsx": "^1.2.1",
|
36
|
-
"core-js": "^3.
|
36
|
+
"core-js": "^3.36.0",
|
37
37
|
"hooks": "^0.3.2",
|
38
38
|
"param-case": "^3.0.4",
|
39
39
|
"react": "^17.0.2",
|
40
40
|
"style-to-object": "^0.3.0"
|
41
41
|
},
|
42
42
|
"devDependencies": {
|
43
|
-
"@ray-js/cli": "1.4.
|
43
|
+
"@ray-js/cli": "1.4.44"
|
44
44
|
},
|
45
45
|
"publishConfig": {
|
46
46
|
"access": "public",
|
47
47
|
"registry": "https://registry.npmjs.org"
|
48
48
|
},
|
49
|
-
"gitHead": "
|
49
|
+
"gitHead": "f18e70a94d4b1e9e916ea373da3cafeb8b4d4ab6"
|
50
50
|
}
|