@ray-js/adapter 1.4.0-alpha.9 → 1.4.1

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/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ Copyright © 2014-2022 Tuya.inc
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -12,5 +12,11 @@ export interface ButtonProps extends BaseProps {
12
12
  hoverStayTime?: number;
13
13
  hoverStopPropagation?: boolean;
14
14
  children?: React.ReactNode;
15
+ openType?: string;
16
+ onFeedback?: (event: TouchEvent & {
17
+ detail: {
18
+ type: 'success' | 'fail';
19
+ };
20
+ }) => void;
15
21
  }
16
22
  export declare const Button: React.ComponentType<ButtonProps>;
@@ -24,6 +24,7 @@ export declare const alias: {
24
24
  onLongTap: string;
25
25
  onLongClick: string;
26
26
  onLongPress: string;
27
+ onFeedback: string;
27
28
  disableScroll: string;
28
29
  hoverClass: string;
29
30
  hidden: string;
@@ -2,5 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.props = exports.alias = void 0;
4
4
  const universal_1 = require("../universal");
5
- exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { className: 'class', animation: 'animation', id: 'id', style: 'style', size: 'size', type: 'type', plain: 'plain', disabled: 'disabled', loading: 'loading', formType: 'form-type', openType: 'open-type', hoverClassName: 'hover-class', hoverStartTime: 'hover-start-time', hoverStayTime: 'hover-stay-time', hoverStopPropagation: 'hover-stop-propagation', onGetPhoneNumber: 'bindgetphonenumber', onTap: 'bindtap', onClick: 'bindtap', onTouchStart: 'bindtouchstart', onTouchMove: 'bindtouchmove', onTouchEnd: 'bindtouchend', onTouchCancel: 'bindtouchcancel', onLongTap: 'bindlongtap', onLongClick: 'bindlongtap', onLongPress: 'bindlongpress' });
5
+ exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { className: 'class', animation: 'animation', id: 'id', style: 'style', size: 'size', type: 'type', plain: 'plain', disabled: 'disabled', loading: 'loading', formType: 'form-type', openType: 'open-type', hoverClassName: 'hover-class', hoverStartTime: 'hover-start-time', hoverStayTime: 'hover-stay-time', hoverStopPropagation: 'hover-stop-propagation', onGetPhoneNumber: 'bindgetphonenumber', onTap: 'bindtap', onClick: 'bindtap', onTouchStart: 'bindtouchstart', onTouchMove: 'bindtouchmove', onTouchEnd: 'bindtouchend', onTouchCancel: 'bindtouchcancel', onLongTap: 'bindlongtap', onLongClick: 'bindlongtap', onLongPress: 'bindlongpress',
6
+ // ray 1.3.20添加
7
+ onFeedback: 'bindfeedback' });
6
8
  exports.props = Object.values(exports.alias);
@@ -8,6 +8,7 @@ export interface InputProps extends BaseProps {
8
8
  placeholderStyle?: string;
9
9
  disabled?: boolean;
10
10
  maxLength?: number;
11
+ maxlength?: number;
11
12
  confirmType?: 'send' | 'search' | 'next' | 'go' | 'done';
12
13
  /**
13
14
  * string | number 输入框内容左侧内容缩进,仅在涂鸦小程序有效
@@ -10,6 +10,7 @@ export declare const alias: {
10
10
  placeholderStyle: string;
11
11
  disabled: string;
12
12
  maxLength: string;
13
+ maxlength: string;
13
14
  confirmType: string;
14
15
  indentStart: string;
15
16
  indentEnd: string;
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.props = exports.alias = void 0;
4
4
  const universal_1 = require("../universal");
5
- exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { id: 'id', className: 'class', animation: 'animation', style: 'style', value: 'value', type: 'type', password: 'password', placeholder: 'placeholder', placeholderStyle: 'placeholder-style', disabled: 'disabled', maxLength: 'maxlength', confirmType: 'confirm-type', indentStart: 'indent-start', indentEnd: 'indent-end', onInput: 'bindinput', onFocus: 'bindfocus', onBlur: 'bindblur', onConfirm: 'bindconfirm' });
5
+ exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { id: 'id', className: 'class', animation: 'animation', style: 'style', value: 'value', type: 'type', password: 'password', placeholder: 'placeholder', placeholderStyle: 'placeholder-style', disabled: 'disabled', maxLength: 'maxlength', maxlength: 'maxlength', confirmType: 'confirm-type', indentStart: 'indent-start', indentEnd: 'indent-end', onInput: 'bindinput', onFocus: 'bindfocus', onBlur: 'bindblur', onConfirm: 'bindconfirm' });
6
6
  exports.props = Object.values(exports.alias);
@@ -60,5 +60,7 @@ export interface PickerProps extends BaseProps {
60
60
  * 可为每一列的顶部添加一个自定义的项
61
61
  */
62
62
  customItem?: string;
63
+ cancelText?: string;
64
+ confirmText?: string;
63
65
  }
64
66
  export declare const Picker: React.ComponentType<PickerProps>;
@@ -18,6 +18,8 @@ export declare const alias: {
18
18
  disabled: string;
19
19
  onClick: string;
20
20
  onTap: string;
21
+ confirmText: string;
22
+ cancelText: string;
21
23
  disableScroll: string;
22
24
  hoverClass: string;
23
25
  hoverClassName: string;
@@ -2,5 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.props = exports.alias = void 0;
4
4
  const universal_1 = require("../universal");
5
- exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { id: 'id', name: 'name', className: 'class', animation: 'animation', style: 'style', mode: 'mode', range: 'range', rangeKey: 'range-key', value: 'value', onChange: 'bindchange', onCancel: 'bindcancel', onColumnChange: 'bindcolumnchange', start: 'start', end: 'end', fields: 'fields', customItem: 'custom-item', disabled: 'disabled', onClick: 'bindtap', onTap: 'bindtap' });
5
+ exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { id: 'id', name: 'name', className: 'class', animation: 'animation', style: 'style', mode: 'mode', range: 'range', rangeKey: 'range-key', value: 'value', onChange: 'bindchange', onCancel: 'bindcancel', onColumnChange: 'bindcolumnchange', start: 'start', end: 'end', fields: 'fields', customItem: 'custom-item', disabled: 'disabled', onClick: 'bindtap', onTap: 'bindtap',
6
+ // 1.4.1 支持属性
7
+ confirmText: 'confirm-text', cancelText: 'cancel-text' });
6
8
  exports.props = Object.values(exports.alias);
@@ -8,6 +8,7 @@ type RichTextNode = {
8
8
  export interface RichTextProps extends BaseProps {
9
9
  /** 节点列表/HTML String,现支持两种节点,通过 type 来区分,分别是元素节点和文本节点,默认是元素节点,在富文本区域里显示的 HTML 节点。 */
10
10
  nodes?: string | RichTextNode[];
11
+ onSelect: (e: any) => void;
11
12
  }
12
13
  export declare const RichText: React.ComponentType<RichTextProps>;
13
14
  export {};
@@ -1,5 +1,6 @@
1
1
  export declare const alias: {
2
2
  nodes: string;
3
+ onSelect: string;
3
4
  id: string;
4
5
  disableScroll: string;
5
6
  hoverClass: string;
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.props = exports.alias = void 0;
4
4
  const universal_1 = require("../universal");
5
- exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { nodes: 'nodes' });
5
+ exports.alias = Object.assign(Object.assign({}, universal_1.universalAlias), { nodes: 'nodes', onSelect: 'bindselect' });
6
6
  exports.props = Object.values(exports.alias);
@@ -12,5 +12,11 @@ export interface ButtonProps extends BaseProps {
12
12
  hoverStayTime?: number;
13
13
  hoverStopPropagation?: boolean;
14
14
  children?: React.ReactNode;
15
+ openType?: string;
16
+ onFeedback?: (event: TouchEvent & {
17
+ detail: {
18
+ type: 'success' | 'fail';
19
+ };
20
+ }) => void;
15
21
  }
16
22
  export declare const Button: React.ComponentType<ButtonProps>;
@@ -24,6 +24,7 @@ export declare const alias: {
24
24
  onLongTap: string;
25
25
  onLongClick: string;
26
26
  onLongPress: string;
27
+ onFeedback: string;
27
28
  disableScroll: string;
28
29
  hoverClass: string;
29
30
  hidden: string;
@@ -1,3 +1,5 @@
1
1
  import { universalAlias } from '../universal';
2
- export const alias = Object.assign(Object.assign({}, universalAlias), { className: 'class', animation: 'animation', id: 'id', style: 'style', size: 'size', type: 'type', plain: 'plain', disabled: 'disabled', loading: 'loading', formType: 'form-type', openType: 'open-type', hoverClassName: 'hover-class', hoverStartTime: 'hover-start-time', hoverStayTime: 'hover-stay-time', hoverStopPropagation: 'hover-stop-propagation', onGetPhoneNumber: 'bindgetphonenumber', onTap: 'bindtap', onClick: 'bindtap', onTouchStart: 'bindtouchstart', onTouchMove: 'bindtouchmove', onTouchEnd: 'bindtouchend', onTouchCancel: 'bindtouchcancel', onLongTap: 'bindlongtap', onLongClick: 'bindlongtap', onLongPress: 'bindlongpress' });
2
+ export const alias = Object.assign(Object.assign({}, universalAlias), { className: 'class', animation: 'animation', id: 'id', style: 'style', size: 'size', type: 'type', plain: 'plain', disabled: 'disabled', loading: 'loading', formType: 'form-type', openType: 'open-type', hoverClassName: 'hover-class', hoverStartTime: 'hover-start-time', hoverStayTime: 'hover-stay-time', hoverStopPropagation: 'hover-stop-propagation', onGetPhoneNumber: 'bindgetphonenumber', onTap: 'bindtap', onClick: 'bindtap', onTouchStart: 'bindtouchstart', onTouchMove: 'bindtouchmove', onTouchEnd: 'bindtouchend', onTouchCancel: 'bindtouchcancel', onLongTap: 'bindlongtap', onLongClick: 'bindlongtap', onLongPress: 'bindlongpress',
3
+ // ray 1.3.20添加
4
+ onFeedback: 'bindfeedback' });
3
5
  export const props = Object.values(alias);
@@ -8,6 +8,7 @@ export interface InputProps extends BaseProps {
8
8
  placeholderStyle?: string;
9
9
  disabled?: boolean;
10
10
  maxLength?: number;
11
+ maxlength?: number;
11
12
  confirmType?: 'send' | 'search' | 'next' | 'go' | 'done';
12
13
  /**
13
14
  * string | number 输入框内容左侧内容缩进,仅在涂鸦小程序有效
@@ -10,6 +10,7 @@ export declare const alias: {
10
10
  placeholderStyle: string;
11
11
  disabled: string;
12
12
  maxLength: string;
13
+ maxlength: string;
13
14
  confirmType: string;
14
15
  indentStart: string;
15
16
  indentEnd: string;
@@ -1,3 +1,3 @@
1
1
  import { universalAlias } from '../universal';
2
- export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', className: 'class', animation: 'animation', style: 'style', value: 'value', type: 'type', password: 'password', placeholder: 'placeholder', placeholderStyle: 'placeholder-style', disabled: 'disabled', maxLength: 'maxlength', confirmType: 'confirm-type', indentStart: 'indent-start', indentEnd: 'indent-end', onInput: 'bindinput', onFocus: 'bindfocus', onBlur: 'bindblur', onConfirm: 'bindconfirm' });
2
+ export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', className: 'class', animation: 'animation', style: 'style', value: 'value', type: 'type', password: 'password', placeholder: 'placeholder', placeholderStyle: 'placeholder-style', disabled: 'disabled', maxLength: 'maxlength', maxlength: 'maxlength', confirmType: 'confirm-type', indentStart: 'indent-start', indentEnd: 'indent-end', onInput: 'bindinput', onFocus: 'bindfocus', onBlur: 'bindblur', onConfirm: 'bindconfirm' });
3
3
  export const props = Object.values(alias);
@@ -60,5 +60,7 @@ export interface PickerProps extends BaseProps {
60
60
  * 可为每一列的顶部添加一个自定义的项
61
61
  */
62
62
  customItem?: string;
63
+ cancelText?: string;
64
+ confirmText?: string;
63
65
  }
64
66
  export declare const Picker: React.ComponentType<PickerProps>;
@@ -18,6 +18,8 @@ export declare const alias: {
18
18
  disabled: string;
19
19
  onClick: string;
20
20
  onTap: string;
21
+ confirmText: string;
22
+ cancelText: string;
21
23
  disableScroll: string;
22
24
  hoverClass: string;
23
25
  hoverClassName: string;
@@ -1,3 +1,5 @@
1
1
  import { universalAlias } from '../universal';
2
- export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', name: 'name', className: 'class', animation: 'animation', style: 'style', mode: 'mode', range: 'range', rangeKey: 'range-key', value: 'value', onChange: 'bindchange', onCancel: 'bindcancel', onColumnChange: 'bindcolumnchange', start: 'start', end: 'end', fields: 'fields', customItem: 'custom-item', disabled: 'disabled', onClick: 'bindtap', onTap: 'bindtap' });
2
+ export const alias = Object.assign(Object.assign({}, universalAlias), { id: 'id', name: 'name', className: 'class', animation: 'animation', style: 'style', mode: 'mode', range: 'range', rangeKey: 'range-key', value: 'value', onChange: 'bindchange', onCancel: 'bindcancel', onColumnChange: 'bindcolumnchange', start: 'start', end: 'end', fields: 'fields', customItem: 'custom-item', disabled: 'disabled', onClick: 'bindtap', onTap: 'bindtap',
3
+ // 1.4.1 支持属性
4
+ confirmText: 'confirm-text', cancelText: 'cancel-text' });
3
5
  export const props = Object.values(alias);
@@ -8,6 +8,7 @@ type RichTextNode = {
8
8
  export interface RichTextProps extends BaseProps {
9
9
  /** 节点列表/HTML String,现支持两种节点,通过 type 来区分,分别是元素节点和文本节点,默认是元素节点,在富文本区域里显示的 HTML 节点。 */
10
10
  nodes?: string | RichTextNode[];
11
+ onSelect: (e: any) => void;
11
12
  }
12
13
  export declare const RichText: React.ComponentType<RichTextProps>;
13
14
  export {};
@@ -1,5 +1,6 @@
1
1
  export declare const alias: {
2
2
  nodes: string;
3
+ onSelect: string;
3
4
  id: string;
4
5
  disableScroll: string;
5
6
  hoverClass: string;
@@ -1,3 +1,3 @@
1
1
  import { universalAlias } from '../universal';
2
- export const alias = Object.assign(Object.assign({}, universalAlias), { nodes: 'nodes' });
2
+ export const alias = Object.assign(Object.assign({}, universalAlias), { nodes: 'nodes', onSelect: 'bindselect' });
3
3
  export const props = Object.values(alias);
package/node.js ADDED
@@ -0,0 +1 @@
1
+ module.exports = require('./cjs/node')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/adapter",
3
- "version": "1.4.0-alpha.9",
3
+ "version": "1.4.1",
4
4
  "description": "Ray adapter for tuya",
5
5
  "keywords": [
6
6
  "ray"
@@ -18,6 +18,7 @@
18
18
  "files": [
19
19
  "cjs",
20
20
  "esm",
21
+ "node.js",
21
22
  "templates"
22
23
  ],
23
24
  "scripts": {
@@ -33,7 +34,7 @@
33
34
  "@ray-core/types": "^0.3.6"
34
35
  },
35
36
  "devDependencies": {
36
- "@ray-js/types": "^1.4.0-alpha.9",
37
+ "@ray-js/types": "^1.4.1",
37
38
  "concurrently": "^6.5.1"
38
39
  },
39
40
  "publishConfig": {
@@ -41,5 +42,5 @@
41
42
  "registry": "https://registry.npmjs.org"
42
43
  },
43
44
  "esnext": "./esm/index.js",
44
- "gitHead": "14cb935df10f020e714b44bb41d4899646db751c"
45
+ "gitHead": "7c45027c91f744019b2b0f9ca76f2b65f6a2c857"
45
46
  }