@lowdefy/blocks-antd 4.5.2 → 4.7.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/dist/blocks/Affix/Affix.js +1 -1
- package/dist/blocks/Affix/e2e.js +19 -0
- package/dist/blocks/Affix/schema.js +48 -0
- package/dist/blocks/Affix/style.less +1 -1
- package/dist/blocks/Alert/Alert.js +1 -1
- package/dist/blocks/Alert/e2e.js +32 -0
- package/dist/blocks/Alert/schema.js +84 -0
- package/dist/blocks/Alert/style.less +1 -1
- package/dist/blocks/AutoComplete/AutoComplete.js +5 -2
- package/dist/blocks/AutoComplete/e2e.js +42 -0
- package/dist/blocks/AutoComplete/schema.js +181 -0
- package/dist/blocks/AutoComplete/style.less +1 -1
- package/dist/blocks/Avatar/Avatar.js +1 -1
- package/dist/blocks/Avatar/e2e.js +19 -0
- package/dist/blocks/Avatar/schema.js +98 -0
- package/dist/blocks/Avatar/style.less +1 -1
- package/dist/blocks/Badge/Badge.js +1 -1
- package/dist/blocks/Badge/e2e.js +23 -0
- package/dist/blocks/Badge/schema.js +101 -0
- package/dist/blocks/Badge/style.less +1 -1
- package/dist/blocks/Breadcrumb/Breadcrumb.js +1 -1
- package/dist/blocks/Breadcrumb/e2e.js +23 -0
- package/dist/blocks/Breadcrumb/schema.js +95 -0
- package/dist/blocks/Breadcrumb/style.less +1 -1
- package/dist/blocks/Button/Button.js +1 -1
- package/dist/blocks/Button/e2e.js +29 -0
- package/dist/blocks/Button/schema.js +123 -0
- package/dist/blocks/Button/style.less +1 -1
- package/dist/blocks/ButtonSelector/ButtonSelector.js +7 -3
- package/dist/blocks/ButtonSelector/e2e.js +30 -0
- package/dist/blocks/ButtonSelector/schema.js +214 -0
- package/dist/blocks/ButtonSelector/style.less +1 -1
- package/dist/blocks/Card/Card.js +1 -1
- package/dist/blocks/Card/e2e.js +28 -0
- package/dist/blocks/Card/schema.js +75 -0
- package/dist/blocks/Card/style.less +1 -1
- package/dist/blocks/Carousel/Carousel.js +1 -1
- package/dist/blocks/Carousel/e2e.js +23 -0
- package/dist/blocks/Carousel/schema.js +202 -0
- package/dist/blocks/Carousel/style.less +1 -1
- package/dist/blocks/CheckboxSelector/CheckboxSelector.js +5 -2
- package/dist/blocks/CheckboxSelector/e2e.js +36 -0
- package/dist/blocks/CheckboxSelector/schema.js +220 -0
- package/dist/blocks/CheckboxSelector/style.less +1 -1
- package/dist/blocks/CheckboxSwitch/CheckboxSwitch.js +5 -2
- package/dist/blocks/CheckboxSwitch/e2e.js +33 -0
- package/dist/blocks/CheckboxSwitch/schema.js +122 -0
- package/dist/blocks/CheckboxSwitch/style.less +1 -1
- package/dist/blocks/Collapse/Collapse.js +1 -1
- package/dist/blocks/Collapse/e2e.js +34 -0
- package/dist/blocks/Collapse/schema.js +110 -0
- package/dist/blocks/Collapse/style.less +1 -1
- package/dist/blocks/Comment/Comment.js +1 -1
- package/dist/blocks/Comment/e2e.js +24 -0
- package/dist/blocks/Comment/schema.js +56 -0
- package/dist/blocks/Comment/style.less +1 -1
- package/dist/blocks/ConfirmModal/ConfirmModal.js +1 -1
- package/dist/blocks/ConfirmModal/e2e.js +30 -0
- package/dist/blocks/ConfirmModal/schema.js +148 -0
- package/dist/blocks/ConfirmModal/style.less +1 -1
- package/dist/blocks/Content/Content.js +1 -1
- package/dist/blocks/Content/e2e.js +19 -0
- package/dist/blocks/Content/schema.js +30 -0
- package/dist/blocks/Content/style.less +1 -1
- package/dist/blocks/ControlledList/ControlledList.js +1 -1
- package/dist/blocks/ControlledList/e2e.js +27 -0
- package/dist/blocks/ControlledList/schema.js +94 -0
- package/dist/blocks/ControlledList/style.less +1 -1
- package/dist/blocks/DateRangeSelector/DateRangeSelector.js +7 -3
- package/dist/blocks/DateRangeSelector/e2e.js +26 -0
- package/dist/blocks/DateRangeSelector/schema.js +266 -0
- package/dist/blocks/DateRangeSelector/style.less +1 -1
- package/dist/blocks/DateSelector/DateSelector.js +7 -3
- package/dist/blocks/DateSelector/e2e.js +32 -0
- package/dist/blocks/DateSelector/schema.js +219 -0
- package/dist/blocks/DateSelector/style.less +1 -1
- package/dist/blocks/DateTimeSelector/DateTimeSelector.js +7 -3
- package/dist/blocks/DateTimeSelector/e2e.js +32 -0
- package/dist/blocks/DateTimeSelector/schema.js +251 -0
- package/dist/blocks/DateTimeSelector/style.less +1 -1
- package/dist/blocks/Descriptions/Descriptions.js +1 -1
- package/dist/blocks/Descriptions/e2e.js +26 -0
- package/dist/blocks/Descriptions/schema.js +213 -0
- package/dist/blocks/Descriptions/style.less +1 -1
- package/dist/blocks/Divider/Divider.js +1 -1
- package/dist/blocks/Divider/e2e.js +19 -0
- package/dist/blocks/Divider/schema.js +56 -0
- package/dist/blocks/Divider/style.less +1 -1
- package/dist/blocks/Drawer/Drawer.js +1 -1
- package/dist/blocks/Drawer/e2e.js +27 -0
- package/dist/blocks/Drawer/schema.js +146 -0
- package/dist/blocks/Drawer/style.less +1 -1
- package/dist/blocks/Footer/Footer.js +1 -1
- package/dist/blocks/Footer/e2e.js +19 -0
- package/dist/blocks/Footer/schema.js +30 -0
- package/dist/blocks/Footer/style.less +1 -1
- package/dist/blocks/Header/Header.js +1 -1
- package/dist/blocks/Header/e2e.js +19 -0
- package/dist/blocks/Header/schema.js +39 -0
- package/dist/blocks/Header/style.less +1 -1
- package/dist/blocks/Label/Label.js +1 -1
- package/dist/blocks/Label/e2e.js +24 -0
- package/dist/blocks/Label/getLabelCol.js +1 -1
- package/dist/blocks/Label/getWrapperCol.js +1 -1
- package/dist/blocks/Label/labelLogic.js +1 -1
- package/dist/blocks/Label/schema.js +83 -0
- package/dist/blocks/Label/style.less +1 -1
- package/dist/blocks/Layout/Layout.js +1 -1
- package/dist/blocks/Layout/e2e.js +19 -0
- package/dist/blocks/Layout/schema.js +30 -0
- package/dist/blocks/Layout/style.less +1 -1
- package/dist/blocks/Menu/Menu.js +1 -1
- package/dist/blocks/Menu/e2e.js +30 -0
- package/dist/blocks/Menu/schema.js +283 -0
- package/dist/blocks/Menu/style.less +1 -1
- package/dist/blocks/Message/Message.js +1 -1
- package/dist/blocks/Message/e2e.js +27 -0
- package/dist/blocks/Message/schema.js +71 -0
- package/dist/blocks/Message/style.less +1 -1
- package/dist/blocks/MobileMenu/MobileMenu.js +1 -1
- package/dist/blocks/MobileMenu/e2e.js +32 -0
- package/dist/blocks/MobileMenu/schema.js +276 -0
- package/dist/blocks/MobileMenu/style.less +1 -1
- package/dist/blocks/Modal/Modal.js +1 -1
- package/dist/blocks/Modal/e2e.js +30 -0
- package/dist/blocks/Modal/schema.js +142 -0
- package/dist/blocks/Modal/style.less +1 -1
- package/dist/blocks/MonthSelector/MonthSelector.js +7 -3
- package/dist/blocks/MonthSelector/e2e.js +32 -0
- package/dist/blocks/MonthSelector/schema.js +219 -0
- package/dist/blocks/MonthSelector/style.less +1 -1
- package/dist/blocks/MultipleSelector/MultipleSelector.js +1 -1
- package/dist/blocks/MultipleSelector/e2e.js +42 -0
- package/dist/blocks/MultipleSelector/schema.js +332 -0
- package/dist/blocks/MultipleSelector/style.less +1 -1
- package/dist/blocks/Notification/Notification.js +1 -1
- package/dist/blocks/Notification/e2e.js +27 -0
- package/dist/blocks/Notification/schema.js +115 -0
- package/dist/blocks/Notification/style.less +1 -1
- package/dist/blocks/NumberInput/NumberInput.js +5 -2
- package/dist/blocks/NumberInput/e2e.js +29 -0
- package/dist/blocks/NumberInput/schema.js +193 -0
- package/dist/blocks/NumberInput/style.less +1 -1
- package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +1 -1
- package/dist/blocks/PageHeaderMenu/e2e.js +34 -0
- package/dist/blocks/PageHeaderMenu/schema.js +241 -0
- package/dist/blocks/PageHeaderMenu/style.less +1 -1
- package/dist/blocks/PageSiderMenu/PageSiderMenu.js +1 -1
- package/dist/blocks/PageSiderMenu/e2e.js +30 -0
- package/dist/blocks/PageSiderMenu/schema.js +321 -0
- package/dist/blocks/PageSiderMenu/style.less +1 -1
- package/dist/blocks/Pagination/Pagination.js +1 -1
- package/dist/blocks/Pagination/e2e.js +28 -0
- package/dist/blocks/Pagination/schema.js +101 -0
- package/dist/blocks/Pagination/style.less +1 -1
- package/dist/blocks/Paragraph/Paragraph.js +1 -1
- package/dist/blocks/Paragraph/e2e.js +27 -0
- package/dist/blocks/Paragraph/schema.js +162 -0
- package/dist/blocks/Paragraph/style.less +1 -1
- package/dist/blocks/ParagraphInput/ParagraphInput.js +1 -1
- package/dist/blocks/ParagraphInput/e2e.js +33 -0
- package/dist/blocks/ParagraphInput/schema.js +192 -0
- package/dist/blocks/ParagraphInput/style.less +1 -1
- package/dist/blocks/PasswordInput/PasswordInput.js +5 -2
- package/dist/blocks/PasswordInput/e2e.js +28 -0
- package/dist/blocks/PasswordInput/schema.js +152 -0
- package/dist/blocks/PasswordInput/style.less +1 -1
- package/dist/blocks/PhoneNumberInput/PhoneNumberInput.js +17 -3
- package/dist/blocks/PhoneNumberInput/e2e.js +28 -0
- package/dist/blocks/PhoneNumberInput/schema.js +243 -0
- package/dist/blocks/PhoneNumberInput/style.less +2 -2
- package/dist/blocks/Popover/Popover.js +1 -1
- package/dist/blocks/Popover/e2e.js +29 -0
- package/dist/blocks/Popover/schema.js +104 -0
- package/dist/blocks/Popover/style.less +1 -1
- package/dist/blocks/Progress/Progress.js +1 -1
- package/dist/blocks/Progress/e2e.js +23 -0
- package/dist/blocks/Progress/schema.js +110 -0
- package/dist/blocks/Progress/style.less +1 -1
- package/dist/blocks/RadioSelector/RadioSelector.js +7 -3
- package/dist/blocks/RadioSelector/e2e.js +30 -0
- package/dist/blocks/RadioSelector/schema.js +217 -0
- package/dist/blocks/RadioSelector/style.less +1 -1
- package/dist/blocks/RatingSlider/RatingSlider.js +7 -7
- package/dist/blocks/RatingSlider/e2e.js +33 -0
- package/dist/blocks/RatingSlider/schema.js +196 -0
- package/dist/blocks/RatingSlider/style.less +1 -1
- package/dist/blocks/Result/Result.js +1 -1
- package/dist/blocks/Result/e2e.js +30 -0
- package/dist/blocks/Result/schema.js +55 -0
- package/dist/blocks/Result/style.less +1 -1
- package/dist/blocks/Selector/Selector.js +7 -3
- package/dist/blocks/Selector/e2e.js +43 -0
- package/dist/blocks/Selector/schema.js +287 -0
- package/dist/blocks/Selector/style.less +1 -1
- package/dist/blocks/Sider/Sider.js +1 -1
- package/dist/blocks/Sider/e2e.js +19 -0
- package/dist/blocks/Sider/schema.js +98 -0
- package/dist/blocks/Sider/style.less +1 -1
- package/dist/blocks/Slider/Slider.js +5 -2
- package/dist/blocks/Slider/e2e.js +33 -0
- package/dist/blocks/Slider/style.less +1 -1
- package/dist/blocks/Statistic/Statistic.js +1 -1
- package/dist/blocks/Statistic/e2e.js +26 -0
- package/dist/blocks/Statistic/schema.js +94 -0
- package/dist/blocks/Statistic/style.less +1 -1
- package/dist/blocks/Switch/Switch.js +5 -2
- package/dist/blocks/Switch/e2e.js +27 -0
- package/dist/blocks/Switch/schema.js +162 -0
- package/dist/blocks/Switch/style.less +1 -1
- package/dist/blocks/Tabs/Tabs.js +1 -1
- package/dist/blocks/Tabs/e2e.js +31 -0
- package/dist/blocks/Tabs/schema.js +124 -0
- package/dist/blocks/Tabs/style.less +1 -1
- package/dist/blocks/Tag/Tag.js +1 -1
- package/dist/blocks/Tag/e2e.js +23 -0
- package/dist/blocks/Tag/schema.js +62 -0
- package/dist/blocks/Tag/style.less +1 -1
- package/dist/blocks/TextArea/TextArea.js +5 -2
- package/dist/blocks/TextArea/e2e.js +28 -0
- package/dist/blocks/TextArea/schema.js +196 -0
- package/dist/blocks/TextArea/style.less +1 -1
- package/dist/blocks/TextInput/TextInput.js +5 -2
- package/dist/blocks/TextInput/e2e.js +29 -0
- package/dist/blocks/TextInput/schema.js +223 -0
- package/dist/blocks/TextInput/style.less +1 -1
- package/dist/blocks/TimelineList/TimelineList.js +1 -1
- package/dist/blocks/TimelineList/e2e.js +23 -0
- package/dist/blocks/TimelineList/schema.js +86 -0
- package/dist/blocks/TimelineList/style.less +1 -1
- package/dist/blocks/Title/Title.js +1 -1
- package/dist/blocks/Title/e2e.js +24 -0
- package/dist/blocks/Title/schema.js +168 -0
- package/dist/blocks/Title/style.less +1 -1
- package/dist/blocks/TitleInput/TitleInput.js +1 -1
- package/dist/blocks/TitleInput/e2e.js +33 -0
- package/dist/blocks/TitleInput/schema.js +207 -0
- package/dist/blocks/TitleInput/style.less +1 -1
- package/dist/blocks/Tooltip/Tooltip.js +1 -1
- package/dist/blocks/Tooltip/e2e.js +28 -0
- package/dist/blocks/Tooltip/schema.js +109 -0
- package/dist/blocks/Tooltip/style.less +1 -1
- package/dist/blocks/TreeSelector/TreeSelector.js +7 -3
- package/dist/blocks/TreeSelector/e2e.js +33 -0
- package/dist/blocks/TreeSelector/schema.js +184 -0
- package/dist/blocks/TreeSelector/style.less +1 -1
- package/dist/blocks/WeekSelector/WeekSelector.js +7 -3
- package/dist/blocks/WeekSelector/e2e.js +32 -0
- package/dist/blocks/WeekSelector/schema.js +219 -0
- package/dist/blocks/WeekSelector/style.less +1 -1
- package/dist/blocks.js +1 -1
- package/dist/color.js +1 -1
- package/dist/disabledDate.js +1 -1
- package/dist/e2e.js +76 -0
- package/dist/getUniqueValues.js +1 -1
- package/dist/getValueIndex.js +1 -1
- package/dist/schemas.js +75 -0
- package/dist/style.less +1 -1
- package/dist/types.js +1 -1
- package/dist/useRunAfterUpdate.js +1 -1
- package/dist/validationExamples.js +1 -1
- package/package.json +12 -16
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export default {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
properties: {
|
|
21
|
+
allowClear: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
default: false,
|
|
24
|
+
description: 'Allow the user to clear their input.'
|
|
25
|
+
},
|
|
26
|
+
autoFocus: {
|
|
27
|
+
type: 'boolean',
|
|
28
|
+
default: false,
|
|
29
|
+
description: 'Autofocus to the block on page load.'
|
|
30
|
+
},
|
|
31
|
+
autoSize: {
|
|
32
|
+
oneOf: [
|
|
33
|
+
{
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
default: false,
|
|
36
|
+
description: 'Automatically extend the block number of rows.'
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
type: 'object',
|
|
40
|
+
description: 'Automatically extend the block number of rows, with a set minimum and maximum row amount.',
|
|
41
|
+
properties: {
|
|
42
|
+
minRows: {
|
|
43
|
+
type: 'integer',
|
|
44
|
+
description: 'Minimum number of rows the block can be.'
|
|
45
|
+
},
|
|
46
|
+
maxRows: {
|
|
47
|
+
type: 'integer',
|
|
48
|
+
description: 'Maximum number of rows the block can be.'
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
description: 'autoSize can either be a boolean value, or an object with minimum and maximum rows. Defining autoSize disables any prefix or suffix defined.'
|
|
54
|
+
},
|
|
55
|
+
bordered: {
|
|
56
|
+
type: 'boolean',
|
|
57
|
+
default: true,
|
|
58
|
+
description: 'Whether or not the textarea has a border style.'
|
|
59
|
+
},
|
|
60
|
+
disabled: {
|
|
61
|
+
type: 'boolean',
|
|
62
|
+
default: false,
|
|
63
|
+
description: 'Disable the block if true.'
|
|
64
|
+
},
|
|
65
|
+
inputStyle: {
|
|
66
|
+
type: 'object',
|
|
67
|
+
description: 'Css style to applied to input.',
|
|
68
|
+
docs: {
|
|
69
|
+
displayType: 'yaml'
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
label: {
|
|
73
|
+
type: 'object',
|
|
74
|
+
description: 'Label properties.',
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
properties: {
|
|
77
|
+
align: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
enum: [
|
|
80
|
+
'left',
|
|
81
|
+
'right'
|
|
82
|
+
],
|
|
83
|
+
default: 'left',
|
|
84
|
+
description: 'Align label left or right when inline.'
|
|
85
|
+
},
|
|
86
|
+
colon: {
|
|
87
|
+
type: 'boolean',
|
|
88
|
+
default: true,
|
|
89
|
+
description: 'Append label with colon.'
|
|
90
|
+
},
|
|
91
|
+
extra: {
|
|
92
|
+
type: 'string',
|
|
93
|
+
description: 'Extra text to display beneath the content - supports html.'
|
|
94
|
+
},
|
|
95
|
+
title: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
description: 'Label title - supports html.'
|
|
98
|
+
},
|
|
99
|
+
span: {
|
|
100
|
+
type: 'number',
|
|
101
|
+
description: 'Label inline span.'
|
|
102
|
+
},
|
|
103
|
+
disabled: {
|
|
104
|
+
type: 'boolean',
|
|
105
|
+
default: false,
|
|
106
|
+
description: 'Hide input label.'
|
|
107
|
+
},
|
|
108
|
+
hasFeedback: {
|
|
109
|
+
type: 'boolean',
|
|
110
|
+
default: true,
|
|
111
|
+
description: 'Display feedback extra from validation, this does not disable validation.'
|
|
112
|
+
},
|
|
113
|
+
inline: {
|
|
114
|
+
type: 'boolean',
|
|
115
|
+
default: false,
|
|
116
|
+
description: 'Render input and label inline.'
|
|
117
|
+
},
|
|
118
|
+
extraStyle: {
|
|
119
|
+
type: 'object',
|
|
120
|
+
description: 'Css style to applied to label extra.',
|
|
121
|
+
docs: {
|
|
122
|
+
displayType: 'yaml'
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
feedbackStyle: {
|
|
126
|
+
type: 'object',
|
|
127
|
+
description: 'Css style to applied to label feedback.',
|
|
128
|
+
docs: {
|
|
129
|
+
displayType: 'yaml'
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
maxLength: {
|
|
135
|
+
type: 'integer',
|
|
136
|
+
description: 'The max number of input characters.'
|
|
137
|
+
},
|
|
138
|
+
placeholder: {
|
|
139
|
+
type: 'string',
|
|
140
|
+
description: 'Placeholder text inside the block before user types input.'
|
|
141
|
+
},
|
|
142
|
+
rows: {
|
|
143
|
+
type: 'integer',
|
|
144
|
+
minimum: 1,
|
|
145
|
+
description: 'Number of rows in the block, should be greater or equal to 1. Defining rows disables any prefix.'
|
|
146
|
+
},
|
|
147
|
+
size: {
|
|
148
|
+
type: 'string',
|
|
149
|
+
enum: [
|
|
150
|
+
'small',
|
|
151
|
+
'middle',
|
|
152
|
+
'large'
|
|
153
|
+
],
|
|
154
|
+
default: 'middle',
|
|
155
|
+
description: 'Size of the block.'
|
|
156
|
+
},
|
|
157
|
+
showCount: {
|
|
158
|
+
type: [
|
|
159
|
+
'boolean',
|
|
160
|
+
'object'
|
|
161
|
+
],
|
|
162
|
+
default: false,
|
|
163
|
+
description: 'Show input character count.',
|
|
164
|
+
docs: {
|
|
165
|
+
displayType: 'boolean'
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
title: {
|
|
169
|
+
type: 'string',
|
|
170
|
+
description: 'Title to describe the input component, if no title is specified the block id is displayed - supports html.'
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
events: {
|
|
175
|
+
type: 'object',
|
|
176
|
+
additionalProperties: false,
|
|
177
|
+
properties: {
|
|
178
|
+
onBlur: {
|
|
179
|
+
type: 'array',
|
|
180
|
+
description: 'Trigger action event occurs when text input loses focus.'
|
|
181
|
+
},
|
|
182
|
+
onChange: {
|
|
183
|
+
type: 'array',
|
|
184
|
+
description: 'Trigger action when text input is changed.'
|
|
185
|
+
},
|
|
186
|
+
onFocus: {
|
|
187
|
+
type: 'array',
|
|
188
|
+
description: 'Trigger action when text input gets focus.'
|
|
189
|
+
},
|
|
190
|
+
onPressEnter: {
|
|
191
|
+
type: 'array',
|
|
192
|
+
description: 'Trigger action when enter is pressed while text input is focused.'
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
you may not use this file except in compliance with the License.
|
|
@@ -57,7 +57,10 @@ const TextInput = ({ blockId, components: { Icon, Link }, events, loading, metho
|
|
|
57
57
|
}
|
|
58
58
|
methods.setValue(input);
|
|
59
59
|
methods.triggerEvent({
|
|
60
|
-
name: 'onChange'
|
|
60
|
+
name: 'onChange',
|
|
61
|
+
event: {
|
|
62
|
+
value: input
|
|
63
|
+
}
|
|
61
64
|
});
|
|
62
65
|
const cStart = event.target.selectionStart;
|
|
63
66
|
const cEnd = event.target.selectionEnd;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { createBlockHelper, escapeId } from '@lowdefy/e2e-utils';
|
|
16
|
+
import { expect } from '@playwright/test';
|
|
17
|
+
const locator = (page, blockId)=>page.locator(`#${escapeId(blockId)}_input`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
do: {
|
|
21
|
+
fill: (page, blockId, val)=>locator(page, blockId).fill(val),
|
|
22
|
+
clear: (page, blockId)=>locator(page, blockId).clear(),
|
|
23
|
+
pressEnter: (page, blockId)=>locator(page, blockId).press('Enter')
|
|
24
|
+
},
|
|
25
|
+
expect: {
|
|
26
|
+
value: (page, blockId, val)=>expect(locator(page, blockId)).toHaveValue(val),
|
|
27
|
+
placeholder: (page, blockId, text)=>expect(locator(page, blockId)).toHaveAttribute('placeholder', text)
|
|
28
|
+
}
|
|
29
|
+
});
|
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export default {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
properties: {
|
|
21
|
+
allowClear: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
default: false,
|
|
24
|
+
description: 'Allow the user to clear their input.'
|
|
25
|
+
},
|
|
26
|
+
type: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
enum: [
|
|
29
|
+
'text',
|
|
30
|
+
'number',
|
|
31
|
+
'password',
|
|
32
|
+
'tel',
|
|
33
|
+
'email',
|
|
34
|
+
'url'
|
|
35
|
+
],
|
|
36
|
+
default: 'text',
|
|
37
|
+
description: "The type of input, (see <a href='https://developer.mozilla.org/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types'>MDN</a>)."
|
|
38
|
+
},
|
|
39
|
+
autoFocus: {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
default: false,
|
|
42
|
+
description: 'Autofocus to the block on page load.'
|
|
43
|
+
},
|
|
44
|
+
bordered: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
default: true,
|
|
47
|
+
description: 'Whether or not the text input has a border style.'
|
|
48
|
+
},
|
|
49
|
+
disabled: {
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
default: false,
|
|
52
|
+
description: 'Disable the block if true.'
|
|
53
|
+
},
|
|
54
|
+
maxLength: {
|
|
55
|
+
type: 'integer',
|
|
56
|
+
description: 'The max number of input characters.'
|
|
57
|
+
},
|
|
58
|
+
placeholder: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Placeholder text inside the block before user types input.'
|
|
61
|
+
},
|
|
62
|
+
prefix: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: 'Prefix text for the block, priority over $prefix_con.'
|
|
65
|
+
},
|
|
66
|
+
prefixIcon: {
|
|
67
|
+
type: [
|
|
68
|
+
'string',
|
|
69
|
+
'object'
|
|
70
|
+
],
|
|
71
|
+
description: "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon to prefix the text input.",
|
|
72
|
+
docs: {
|
|
73
|
+
displayType: 'icon'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
inputStyle: {
|
|
77
|
+
type: 'object',
|
|
78
|
+
description: 'Css style to applied to input.',
|
|
79
|
+
docs: {
|
|
80
|
+
displayType: 'yaml'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
label: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
description: 'Label properties.',
|
|
86
|
+
additionalProperties: false,
|
|
87
|
+
properties: {
|
|
88
|
+
align: {
|
|
89
|
+
type: 'string',
|
|
90
|
+
enum: [
|
|
91
|
+
'left',
|
|
92
|
+
'right'
|
|
93
|
+
],
|
|
94
|
+
default: 'left',
|
|
95
|
+
description: 'Align label left or right when inline.'
|
|
96
|
+
},
|
|
97
|
+
colon: {
|
|
98
|
+
type: 'boolean',
|
|
99
|
+
default: true,
|
|
100
|
+
description: 'Append label with colon.'
|
|
101
|
+
},
|
|
102
|
+
extra: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
description: 'Extra text to display beneath the content - supports html.'
|
|
105
|
+
},
|
|
106
|
+
title: {
|
|
107
|
+
type: 'string',
|
|
108
|
+
description: 'Label title - supports html.'
|
|
109
|
+
},
|
|
110
|
+
span: {
|
|
111
|
+
type: 'number',
|
|
112
|
+
description: 'Label inline span.'
|
|
113
|
+
},
|
|
114
|
+
disabled: {
|
|
115
|
+
type: 'boolean',
|
|
116
|
+
default: false,
|
|
117
|
+
description: 'Hide input label.'
|
|
118
|
+
},
|
|
119
|
+
hasFeedback: {
|
|
120
|
+
type: 'boolean',
|
|
121
|
+
default: true,
|
|
122
|
+
description: 'Display feedback extra from validation, this does not disable validation.'
|
|
123
|
+
},
|
|
124
|
+
inline: {
|
|
125
|
+
type: 'boolean',
|
|
126
|
+
default: false,
|
|
127
|
+
description: 'Render input and label inline.'
|
|
128
|
+
},
|
|
129
|
+
extraStyle: {
|
|
130
|
+
type: 'object',
|
|
131
|
+
description: 'Css style to applied to label extra.',
|
|
132
|
+
docs: {
|
|
133
|
+
displayType: 'yaml'
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
feedbackStyle: {
|
|
137
|
+
type: 'object',
|
|
138
|
+
description: 'Css style to applied to label feedback.',
|
|
139
|
+
docs: {
|
|
140
|
+
displayType: 'yaml'
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
},
|
|
145
|
+
replaceInput: {
|
|
146
|
+
type: 'object',
|
|
147
|
+
description: 'Regex used to sanitize input.',
|
|
148
|
+
properties: {
|
|
149
|
+
pattern: {
|
|
150
|
+
type: 'string',
|
|
151
|
+
description: 'The regular expression pattern to use to sanitize input.'
|
|
152
|
+
},
|
|
153
|
+
flags: {
|
|
154
|
+
type: 'string',
|
|
155
|
+
description: "The regex flags to use. The default value is 'gm'."
|
|
156
|
+
},
|
|
157
|
+
replacement: {
|
|
158
|
+
type: 'string',
|
|
159
|
+
description: "The string used to replace the input that matches the pattern. The default value is ''."
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
docs: {
|
|
163
|
+
displayType: 'yaml'
|
|
164
|
+
}
|
|
165
|
+
},
|
|
166
|
+
size: {
|
|
167
|
+
type: 'string',
|
|
168
|
+
enum: [
|
|
169
|
+
'small',
|
|
170
|
+
'middle',
|
|
171
|
+
'large'
|
|
172
|
+
],
|
|
173
|
+
default: 'middle',
|
|
174
|
+
description: 'Size of the block.'
|
|
175
|
+
},
|
|
176
|
+
showCount: {
|
|
177
|
+
type: 'boolean',
|
|
178
|
+
default: false,
|
|
179
|
+
description: 'Show text character count'
|
|
180
|
+
},
|
|
181
|
+
suffix: {
|
|
182
|
+
type: 'string',
|
|
183
|
+
description: 'Suffix text for the block, priority over suffixIcon.'
|
|
184
|
+
},
|
|
185
|
+
suffixIcon: {
|
|
186
|
+
type: [
|
|
187
|
+
'string',
|
|
188
|
+
'object'
|
|
189
|
+
],
|
|
190
|
+
description: "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon to suffix the text input.",
|
|
191
|
+
docs: {
|
|
192
|
+
displayType: 'icon'
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
title: {
|
|
196
|
+
type: 'string',
|
|
197
|
+
description: 'Title to describe the input component, if no title is specified the block id is displayed - supports html.'
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
events: {
|
|
202
|
+
type: 'object',
|
|
203
|
+
additionalProperties: false,
|
|
204
|
+
properties: {
|
|
205
|
+
onBlur: {
|
|
206
|
+
type: 'array',
|
|
207
|
+
description: 'Trigger action event occurs when text input loses focus.'
|
|
208
|
+
},
|
|
209
|
+
onChange: {
|
|
210
|
+
type: 'array',
|
|
211
|
+
description: 'Trigger action when text input is changed.'
|
|
212
|
+
},
|
|
213
|
+
onFocus: {
|
|
214
|
+
type: 'array',
|
|
215
|
+
description: 'Trigger action when text input gets focus.'
|
|
216
|
+
},
|
|
217
|
+
onPressEnter: {
|
|
218
|
+
type: 'array',
|
|
219
|
+
description: 'Trigger action when enter is pressed while text input is focused.'
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { createBlockHelper, escapeId } from '@lowdefy/e2e-utils';
|
|
16
|
+
import { expect } from '@playwright/test';
|
|
17
|
+
const locator = (page, blockId)=>page.locator(`#${escapeId(blockId)}`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
expect: {
|
|
21
|
+
itemCount: (page, blockId, count)=>expect(locator(page, blockId).locator('.ant-timeline-item')).toHaveCount(count)
|
|
22
|
+
}
|
|
23
|
+
});
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export default {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
properties: {
|
|
21
|
+
data: {
|
|
22
|
+
type: 'array',
|
|
23
|
+
docs: {
|
|
24
|
+
displayType: 'yaml'
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
style: {
|
|
28
|
+
type: 'object',
|
|
29
|
+
description: 'Css style object to apply to timeline.',
|
|
30
|
+
docs: {
|
|
31
|
+
displayType: 'yaml'
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
pendingDotIcon: {
|
|
35
|
+
type: [
|
|
36
|
+
'object',
|
|
37
|
+
'string'
|
|
38
|
+
],
|
|
39
|
+
description: 'Set the dot of the last ghost node when pending is true.',
|
|
40
|
+
docs: {
|
|
41
|
+
displayType: 'icon'
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
pending: {
|
|
45
|
+
type: 'boolean',
|
|
46
|
+
default: false,
|
|
47
|
+
description: "Set the last ghost node's existence or its content."
|
|
48
|
+
},
|
|
49
|
+
reverse: {
|
|
50
|
+
type: 'boolean',
|
|
51
|
+
default: false,
|
|
52
|
+
description: 'Reverse timeline nodes.'
|
|
53
|
+
},
|
|
54
|
+
iconField: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
description: "Use a custom icon field. Defaults to 'icon'."
|
|
57
|
+
},
|
|
58
|
+
styleField: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: "Use a custom style field. Defaults to 'style'."
|
|
61
|
+
},
|
|
62
|
+
colorField: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: "Use a custom color field. Defaults to 'color'."
|
|
65
|
+
},
|
|
66
|
+
positionField: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
description: "Use a custom position field. Defaults to 'position'."
|
|
69
|
+
},
|
|
70
|
+
labelField: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: "Use a custom label field. Defaults to 'label'."
|
|
73
|
+
},
|
|
74
|
+
mode: {
|
|
75
|
+
type: 'string',
|
|
76
|
+
enum: [
|
|
77
|
+
'left',
|
|
78
|
+
'right',
|
|
79
|
+
'alternate'
|
|
80
|
+
],
|
|
81
|
+
default: 'left',
|
|
82
|
+
description: 'By sending alternate the timeline will distribute the nodes to the left and right.'
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { createBlockHelper, escapeId } from '@lowdefy/e2e-utils';
|
|
16
|
+
import { expect } from '@playwright/test';
|
|
17
|
+
const locator = (page, blockId)=>page.locator(`#${escapeId(blockId)}`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
expect: {
|
|
21
|
+
text: (page, blockId, text)=>expect(locator(page, blockId)).toHaveText(text),
|
|
22
|
+
containsText: (page, blockId, text)=>expect(locator(page, blockId)).toContainText(text)
|
|
23
|
+
}
|
|
24
|
+
});
|