@ray-js/components 1.4.43 → 1.4.45

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.
Files changed (38) hide show
  1. package/lib/Button/Button.thing.js +1 -1
  2. package/lib/Button/Button.wechat.js +1 -1
  3. package/lib/CheckboxGroup/CheckboxGroup.js +1 -1
  4. package/lib/Form/Form.wechat.js +1 -0
  5. package/lib/Icon/Icon.js +3 -3
  6. package/lib/Icon/Icon.thing.js +3 -3
  7. package/lib/Icon/Icon.wechat.js +3 -3
  8. package/lib/Image/Image.js +2 -2
  9. package/lib/Image/Image.wechat.js +2 -1
  10. package/lib/Input/Input.js +5 -4
  11. package/lib/Input/Input.thing.js +3 -2
  12. package/lib/Input/Input.wechat.js +5 -4
  13. package/lib/MovableView/MovableView.js +2 -2
  14. package/lib/PageContainer/PageContainer.js +7 -7
  15. package/lib/Picker/Picker.js +3 -2
  16. package/lib/Picker/Picker.thing.js +4 -3
  17. package/lib/Picker/Picker.wechat.js +4 -3
  18. package/lib/PickerView/PickerView.js +1 -1
  19. package/lib/PickerView/PickerView.thing.js +3 -3
  20. package/lib/PickerView/PickerView.wechat.js +3 -3
  21. package/lib/ScrollView/ScrollView.js +3 -3
  22. package/lib/Slider/Slider.js +2 -2
  23. package/lib/Swiper/Swiper.js +3 -2
  24. package/lib/Swiper/Swiper.thing.js +3 -2
  25. package/lib/Swiper/Swiper.wechat.js +3 -2
  26. package/lib/Switch/Switch.js +1 -1
  27. package/lib/Switch/Switch.thing.js +1 -1
  28. package/lib/Switch/Switch.wechat.js +1 -1
  29. package/lib/Text/Text.wechat.js +1 -0
  30. package/lib/Textarea/Textarea.js +3 -3
  31. package/lib/Textarea/Textarea.thing.js +1 -1
  32. package/lib/Textarea/Textarea.wechat.js +1 -1
  33. package/lib/View/View.js +1 -0
  34. package/lib/View/View.thing.js +1 -0
  35. package/lib/View/View.wechat.js +1 -0
  36. package/lib/core/index.js +1 -1
  37. package/lib/utils/handleProps.js +2 -1
  38. 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 ? void 0 : onClick(event);
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 ? void 0 : onClick(event);
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 ? void 0 : _props$onChange.call(props, {
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
@@ -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: `iconfont ${type} ${className}`,
15
+ className: "iconfont ".concat(type, " ").concat(className),
16
16
  style: _objectSpread(_objectSpread({}, style), {}, {
17
- color: `${color}`,
18
- fontSize: `${size}px`
17
+ color: "".concat(color),
18
+ fontSize: "".concat(size, "px")
19
19
  })
20
20
  });
21
21
  };
@@ -11,10 +11,10 @@ const Icon = props => {
11
11
  className
12
12
  } = props;
13
13
  return /*#__PURE__*/React.createElement(Text, {
14
- className: `iconfont ${type} ${className}`,
14
+ className: "iconfont ".concat(type, " ").concat(className),
15
15
  style: _objectSpread(_objectSpread({}, style), {}, {
16
- color: `${color}`,
17
- fontSize: `${size}px`
16
+ color: "".concat(color),
17
+ fontSize: "".concat(size, "px")
18
18
  })
19
19
  });
20
20
  };
@@ -12,10 +12,10 @@ const Icon = props => {
12
12
  className
13
13
  } = props;
14
14
  return /*#__PURE__*/React.createElement(Text, {
15
- className: `iconfont ${type} ${className}`,
15
+ className: "iconfont ".concat(type, " ").concat(className),
16
16
  style: _objectSpread(_objectSpread({}, style), {}, {
17
- color: `${color}`,
18
- fontSize: `${size}px`
17
+ color: "".concat(color),
18
+ fontSize: "".concat(size, "px")
19
19
  })
20
20
  });
21
21
  };
@@ -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 ? void 0 : _props$onLoad.call(props, _objectSpread(_objectSpread({
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 ? void 0 : _props$onError.call(props, _objectSpread(_objectSpread({
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 ? void 0 : onLoad({
37
+ onLoad === null || onLoad === void 0 || onLoad({
37
38
  width: e.detail.width,
38
39
  height: e.detail.height,
39
40
  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 = ["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 ? void 0 : onFocus({
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 ? void 0 : onBlur({
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 ? void 0 : onConfirm({
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 ? void 0 : _props$onInput.call(props, {
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
@@ -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 ? void 0 : onInput(event);
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 ? void 0 : onConfirm(event);
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 ? void 0 : onInput({
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 ? void 0 : onBlur({
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 ? void 0 : onConfirm(event);
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 ? void 0 : onFocus({
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 ? void 0 : onChange(_objectSpread(_objectSpread({
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 ? void 0 : onScale(_objectSpread(_objectSpread({
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 ? void 0 : _props$onClickOverlay.call(props, {
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 ? void 0 : _props$onBeforeEnter.call(props, {
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 ? void 0 : _props$onEnter.call(props, {
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 ? void 0 : _props$onAfterEnter.call(props, {
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 ? void 0 : _props$onBeforeLeave.call(props, {
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 ? void 0 : _props$onLeave.call(props, {
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 ? void 0 : _props$onAfterLeave.call(props, {
67
+ (_props$onAfterLeave = props.onAfterLeave) === null || _props$onAfterLeave === void 0 || _props$onAfterLeave.call(props, {
68
68
  type: 'afterleave',
69
69
  origin: e
70
70
  });
@@ -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 ? void 0 : _props$onChange.call(props, {
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 ? void 0 : _props$onCancel.call(props, {
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 ? void 0 : onChange({
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 ? void 0 : onCancel({
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 ? void 0 : onCancel({
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 ? void 0 : onChange({
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 ? void 0 : onCancel({
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 ? void 0 : onCancel({
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 ? void 0 : _props$onChange.call(props, {
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 ? void 0 : onChange({
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 ? void 0 : onPickstart({
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 ? void 0 : onPickend({
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 ? void 0 : onChange({
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 ? void 0 : onPickstart({
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 ? void 0 : onPickend({
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 ? void 0 : onScroll(_objectSpread(_objectSpread({
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 ? void 0 : onScrollToUpper(_objectSpread(_objectSpread({
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 ? void 0 : onScrollToLower(_objectSpread(_objectSpread({
36
+ onScrollToLower === null || onScrollToLower === void 0 || onScrollToLower(_objectSpread(_objectSpread({
37
37
  type: 'scrolltolower'
38
38
  }, e.detail), {}, {
39
39
  origin: e
@@ -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 ? void 0 : _props$onChange.call(props, {
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 ? void 0 : _props$onChanging.call(props, {
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
@@ -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 ? void 0 : onChange(event === null || event === void 0 ? void 0 : event.detail);
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 ? void 0 : onAfterChange(event === null || event === void 0 ? void 0 : event.detail);
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 ? void 0 : onChange(event);
37
+ onChange === null || onChange === void 0 || onChange(event);
37
38
  },
38
39
  onAnimationFinish: function (event) {
39
- onAfterChange === null || onAfterChange === void 0 ? void 0 : onAfterChange(event);
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 ? void 0 : onChange(event);
37
+ onChange === null || onChange === void 0 || onChange(event);
37
38
  },
38
39
  onAnimationFinish: function (event) {
39
- onAfterChange === null || onAfterChange === void 0 ? void 0 : onAfterChange(event);
40
+ onAfterChange === null || onAfterChange === void 0 || onAfterChange(event);
40
41
  },
41
42
  current: internalCurrent
42
43
  }, propsAlias(restProps, SwiperPropsAlias)), function () {
@@ -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 ? void 0 : _props$onChange.call(props, _objectSpread(_objectSpread({
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 ? void 0 : onChange({
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 ? void 0 : onChange({
22
+ onChange === null || onChange === void 0 || onChange({
23
23
  type: 'change',
24
24
  value: e.detail.value,
25
25
  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 = ["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';
@@ -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 ? void 0 : onInput({
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 ? void 0 : onFocus({
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 ? void 0 : onBlur({
37
+ onBlur === null || onBlur === void 0 || onBlur({
38
38
  type: 'blur',
39
39
  value: e.detail.value,
40
40
  origin: e
@@ -43,7 +43,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
43
43
  const {
44
44
  value
45
45
  } = e.detail;
46
- onInput === null || onInput === void 0 ? void 0 : onInput({
46
+ onInput === null || onInput === void 0 || onInput({
47
47
  value
48
48
  });
49
49
  },
@@ -42,7 +42,7 @@ const Input = /*#__PURE__*/React.forwardRef((props, ref) => {
42
42
  const {
43
43
  value
44
44
  } = e.detail;
45
- onInput === null || onInput === void 0 ? void 0 : onInput({
45
+ onInput === null || onInput === void 0 || onInput({
46
46
  value
47
47
  });
48
48
  },
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';
@@ -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';
@@ -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 `V${Math.random().toString(32).substr(2, 6).toUpperCase()}`;
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));
@@ -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 `${k}:${v}`;
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.43",
3
+ "version": "1.4.45",
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.43",
33
- "@ray-js/framework-shared": "1.4.43",
34
- "ahooks": "^3.7.8",
32
+ "@ray-js/adapter": "1.4.45",
33
+ "@ray-js/framework-shared": "1.4.45",
34
+ "ahooks": "^3.7.10",
35
35
  "clsx": "^1.2.1",
36
- "core-js": "^3.35.0",
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"
43
+ "@ray-js/cli": "1.4.45"
44
44
  },
45
45
  "publishConfig": {
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.org"
48
48
  },
49
- "gitHead": "9da07e2e3428fda38f38d51718aea5e8589928fd"
49
+ "gitHead": "3d43182ecec581aec70f654706be0b070e38011b"
50
50
  }