@lowdefy/blocks-antd 4.0.0-alpha.35 → 4.0.0-alpha.37
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/dist/blocks/DateTimeSelector/DateTimeSelector.js +3 -1
- package/dist/blocks/NumberInput/NumberInput.js +1 -0
- package/dist/blocks/NumberInput/schema.json +7 -0
- package/dist/blocks/Paragraph/style.less +1 -0
- package/dist/blocks/RadioSelector/RadioSelector.js +1 -1
- package/dist/blocks/Title/style.less +1 -0
- package/package.json +7 -7
|
@@ -72,7 +72,9 @@ const DateTimeSelector = ({ blockId , components: { Icon } , events , loading ,
|
|
|
72
72
|
minuteStep: properties.minuteStep || 5,
|
|
73
73
|
secondStep: properties.secondStep || 30
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
onSelect: (newVal)=>{
|
|
76
|
+
// NOTE: we use on select instead of onChange to make the block UX
|
|
77
|
+
// more like the DataSelector which changes date on click and not on ok.
|
|
76
78
|
methods.setValue(!newVal ? null : moment.utc(newVal.add(properties.selectUTC ? newVal.utcOffset() : 0, 'minutes')).startOf(timeUnit).toDate());
|
|
77
79
|
methods.triggerEvent({
|
|
78
80
|
name: 'onChange'
|
|
@@ -47,6 +47,7 @@ const NumberInput = ({ blockId , events , components , loading , methods , prope
|
|
|
47
47
|
keyboard: properties.keyboard,
|
|
48
48
|
max: properties.max,
|
|
49
49
|
min: properties.min,
|
|
50
|
+
parser: properties.parser,
|
|
50
51
|
placeholder: properties.placeholder,
|
|
51
52
|
precision: properties.precision,
|
|
52
53
|
size: properties.size,
|
|
@@ -110,6 +110,13 @@
|
|
|
110
110
|
"type": "number",
|
|
111
111
|
"description": "Maximum value allowed by the block."
|
|
112
112
|
},
|
|
113
|
+
"parser": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"description": "A function specifying the value extracted from the formatter.",
|
|
116
|
+
"docs": {
|
|
117
|
+
"displayType": "yaml"
|
|
118
|
+
}
|
|
119
|
+
},
|
|
113
120
|
"placeholder": {
|
|
114
121
|
"type": "string",
|
|
115
122
|
"description": "Placeholder text inside the block to show message before user types input."
|
|
@@ -62,7 +62,7 @@ const RadioSelector = ({ blockId , components , events , loading , properties ,
|
|
|
62
62
|
}, uniqueValueOptions.map((opt, i)=>type.isPrimitive(opt) ? /*#__PURE__*/ React.createElement(Radio, {
|
|
63
63
|
id: `${blockId}_${opt}`,
|
|
64
64
|
key: i,
|
|
65
|
-
value: i
|
|
65
|
+
value: `${i}`
|
|
66
66
|
}, renderHtml({
|
|
67
67
|
html: `${opt}`,
|
|
68
68
|
methods
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/blocks-antd",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.37",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lowdefy Ant Design Blocks",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@ant-design/icons": "4.7.0",
|
|
54
|
-
"@lowdefy/block-utils": "4.0.0-alpha.
|
|
55
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
54
|
+
"@lowdefy/block-utils": "4.0.0-alpha.37",
|
|
55
|
+
"@lowdefy/helpers": "4.0.0-alpha.37",
|
|
56
56
|
"antd": "4.22.5",
|
|
57
57
|
"classnames": "2.3.1",
|
|
58
58
|
"moment": "2.29.4",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@emotion/jest": "11.9.1",
|
|
66
|
-
"@lowdefy/block-dev": "4.0.0-alpha.
|
|
67
|
-
"@lowdefy/jest-yaml-transform": "4.0.0-alpha.
|
|
68
|
-
"@lowdefy/node-utils": "4.0.0-alpha.
|
|
66
|
+
"@lowdefy/block-dev": "4.0.0-alpha.37",
|
|
67
|
+
"@lowdefy/jest-yaml-transform": "4.0.0-alpha.37",
|
|
68
|
+
"@lowdefy/node-utils": "4.0.0-alpha.37",
|
|
69
69
|
"@swc/cli": "0.1.57",
|
|
70
70
|
"@swc/core": "1.2.194",
|
|
71
71
|
"@swc/jest": "0.2.21",
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"publishConfig": {
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
|
-
"gitHead": "
|
|
83
|
+
"gitHead": "855e81894be16837be556de36a036215f1efe021"
|
|
84
84
|
}
|