@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,219 @@
|
|
|
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: true,
|
|
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
|
+
bordered: {
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
default: true,
|
|
34
|
+
description: 'Whether or not the input has a border style.'
|
|
35
|
+
},
|
|
36
|
+
disabled: {
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
default: false,
|
|
39
|
+
description: 'Disable the block if true.'
|
|
40
|
+
},
|
|
41
|
+
disabledDates: {
|
|
42
|
+
type: 'object',
|
|
43
|
+
description: 'Disable specific dates so that they can not be chosen.',
|
|
44
|
+
properties: {
|
|
45
|
+
min: {
|
|
46
|
+
type: [
|
|
47
|
+
'string',
|
|
48
|
+
'object'
|
|
49
|
+
],
|
|
50
|
+
description: 'Disable all dates less than the minimum date. Can be a date string or a _date object.',
|
|
51
|
+
docs: {
|
|
52
|
+
displayType: 'date'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
max: {
|
|
56
|
+
type: [
|
|
57
|
+
'string',
|
|
58
|
+
'object'
|
|
59
|
+
],
|
|
60
|
+
description: 'Disable all dates greater than the maximum date. Can be a date string or a _date object.',
|
|
61
|
+
docs: {
|
|
62
|
+
displayType: 'date'
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
dates: {
|
|
66
|
+
type: 'array',
|
|
67
|
+
description: 'Array of specific dates to be disabled. Can be date strings or a _date objects.',
|
|
68
|
+
items: {
|
|
69
|
+
type: [
|
|
70
|
+
'string',
|
|
71
|
+
'object'
|
|
72
|
+
],
|
|
73
|
+
description: 'Specific dates to be disabled.',
|
|
74
|
+
docs: {
|
|
75
|
+
displayType: 'date'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
ranges: {
|
|
80
|
+
type: 'array',
|
|
81
|
+
description: 'Array of array pairs of start and end dates be disabled. Can be date strings or a _date objects.',
|
|
82
|
+
items: {
|
|
83
|
+
type: 'array',
|
|
84
|
+
description: 'Specific date ranges to be disabled.',
|
|
85
|
+
items: {
|
|
86
|
+
type: [
|
|
87
|
+
'string',
|
|
88
|
+
'object'
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
docs: {
|
|
92
|
+
displayType: 'dateRange'
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
format: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
default: 'YYYY-MM',
|
|
101
|
+
description: 'Format in which to format the date value, eg. "MMMM YYYY" will format a date value of 1999-12-31 as "December 1999". The format has to conform to moment.js formats.'
|
|
102
|
+
},
|
|
103
|
+
inputStyle: {
|
|
104
|
+
type: 'object',
|
|
105
|
+
description: 'Css style to applied to input.',
|
|
106
|
+
docs: {
|
|
107
|
+
displayType: 'yaml'
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
placeholder: {
|
|
111
|
+
type: 'string',
|
|
112
|
+
default: 'Select Month',
|
|
113
|
+
description: 'Placeholder text inside the block before user types input.'
|
|
114
|
+
},
|
|
115
|
+
showToday: {
|
|
116
|
+
type: 'boolean',
|
|
117
|
+
default: true,
|
|
118
|
+
description: 'Shows a button to easily select the current date if true.'
|
|
119
|
+
},
|
|
120
|
+
size: {
|
|
121
|
+
type: 'string',
|
|
122
|
+
enum: [
|
|
123
|
+
'small',
|
|
124
|
+
'default',
|
|
125
|
+
'large'
|
|
126
|
+
],
|
|
127
|
+
default: 'default',
|
|
128
|
+
description: 'Size of the block.'
|
|
129
|
+
},
|
|
130
|
+
suffixIcon: {
|
|
131
|
+
type: [
|
|
132
|
+
'string',
|
|
133
|
+
'object'
|
|
134
|
+
],
|
|
135
|
+
default: 'AiOutlineCalendar',
|
|
136
|
+
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 on right-hand side of the date picker.",
|
|
137
|
+
docs: {
|
|
138
|
+
displayType: 'icon'
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
label: {
|
|
142
|
+
type: 'object',
|
|
143
|
+
description: 'Label properties.',
|
|
144
|
+
additionalProperties: false,
|
|
145
|
+
properties: {
|
|
146
|
+
align: {
|
|
147
|
+
type: 'string',
|
|
148
|
+
enum: [
|
|
149
|
+
'left',
|
|
150
|
+
'right'
|
|
151
|
+
],
|
|
152
|
+
default: 'left',
|
|
153
|
+
description: 'Align label left or right when inline.'
|
|
154
|
+
},
|
|
155
|
+
colon: {
|
|
156
|
+
type: 'boolean',
|
|
157
|
+
default: true,
|
|
158
|
+
description: 'Append label with colon.'
|
|
159
|
+
},
|
|
160
|
+
extra: {
|
|
161
|
+
type: 'string',
|
|
162
|
+
description: 'Extra text to display beneath the content - supports html.'
|
|
163
|
+
},
|
|
164
|
+
title: {
|
|
165
|
+
type: 'string',
|
|
166
|
+
description: 'Label title - supports html.'
|
|
167
|
+
},
|
|
168
|
+
span: {
|
|
169
|
+
type: 'number',
|
|
170
|
+
description: 'Label inline span.'
|
|
171
|
+
},
|
|
172
|
+
disabled: {
|
|
173
|
+
type: 'boolean',
|
|
174
|
+
default: false,
|
|
175
|
+
description: 'Hide input label.'
|
|
176
|
+
},
|
|
177
|
+
hasFeedback: {
|
|
178
|
+
type: 'boolean',
|
|
179
|
+
default: true,
|
|
180
|
+
description: 'Display feedback extra from validation, this does not disable validation.'
|
|
181
|
+
},
|
|
182
|
+
inline: {
|
|
183
|
+
type: 'boolean',
|
|
184
|
+
default: false,
|
|
185
|
+
description: 'Render input and label inline.'
|
|
186
|
+
},
|
|
187
|
+
extraStyle: {
|
|
188
|
+
type: 'object',
|
|
189
|
+
description: 'Css style to applied to label extra.',
|
|
190
|
+
docs: {
|
|
191
|
+
displayType: 'yaml'
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
feedbackStyle: {
|
|
195
|
+
type: 'object',
|
|
196
|
+
description: 'Css style to applied to label feedback.',
|
|
197
|
+
docs: {
|
|
198
|
+
displayType: 'yaml'
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
title: {
|
|
204
|
+
type: 'string',
|
|
205
|
+
description: 'Month selector label title - supports html.'
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
events: {
|
|
210
|
+
type: 'object',
|
|
211
|
+
additionalProperties: false,
|
|
212
|
+
properties: {
|
|
213
|
+
onChange: {
|
|
214
|
+
type: 'array',
|
|
215
|
+
description: 'Trigger actions when selection is changed.'
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
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(`.ant-select:has(#${escapeId(blockId)}_input)`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
do: {
|
|
21
|
+
select: async (page, blockId, val)=>{
|
|
22
|
+
const sel = locator(page, blockId);
|
|
23
|
+
const isOpen = await sel.evaluate((el)=>el.classList.contains('ant-select-open'));
|
|
24
|
+
if (!isOpen) {
|
|
25
|
+
await sel.click();
|
|
26
|
+
}
|
|
27
|
+
await page.locator('.ant-select-dropdown:not(.ant-select-dropdown-hidden) .ant-select-item-option-content').filter({
|
|
28
|
+
hasText: val
|
|
29
|
+
}).click();
|
|
30
|
+
},
|
|
31
|
+
clear: async (page, blockId)=>{
|
|
32
|
+
await locator(page, blockId).hover();
|
|
33
|
+
await locator(page, blockId).locator('.ant-select-clear').click();
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
expect: {
|
|
37
|
+
valueCount: (page, blockId, count)=>expect(locator(page, blockId).locator('.ant-select-selection-item')).toHaveCount(count),
|
|
38
|
+
values: (page, blockId, vals)=>Promise.all(vals.map((val)=>expect(locator(page, blockId).locator('.ant-select-selection-item').filter({
|
|
39
|
+
hasText: val
|
|
40
|
+
})).toBeVisible()))
|
|
41
|
+
}
|
|
42
|
+
});
|
|
@@ -0,0 +1,332 @@
|
|
|
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: true,
|
|
24
|
+
description: 'Allow the user to clear the selected value, sets the value to null.'
|
|
25
|
+
},
|
|
26
|
+
autoClearSearchValue: {
|
|
27
|
+
type: 'boolean',
|
|
28
|
+
default: true,
|
|
29
|
+
description: 'Whether the current search will be cleared on selecting an item.'
|
|
30
|
+
},
|
|
31
|
+
autoFocus: {
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
default: false,
|
|
34
|
+
description: 'Autofocus to the block on page load.'
|
|
35
|
+
},
|
|
36
|
+
bordered: {
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
default: true,
|
|
39
|
+
description: 'Whether or not the selector has a border style.'
|
|
40
|
+
},
|
|
41
|
+
clearIcon: {
|
|
42
|
+
type: [
|
|
43
|
+
'string',
|
|
44
|
+
'object'
|
|
45
|
+
],
|
|
46
|
+
default: 'AiOutlineCloseCircle',
|
|
47
|
+
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 at far right position of the selector, shown when user is given option to clear input.",
|
|
48
|
+
docs: {
|
|
49
|
+
displayType: 'icon'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
disabled: {
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
default: false,
|
|
55
|
+
description: 'Disable the block if true.'
|
|
56
|
+
},
|
|
57
|
+
inputStyle: {
|
|
58
|
+
type: 'object',
|
|
59
|
+
description: 'Css style to applied to input.',
|
|
60
|
+
docs: {
|
|
61
|
+
displayType: 'yaml'
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
optionsStyle: {
|
|
65
|
+
type: 'object',
|
|
66
|
+
description: 'Css style to applied to option elements.',
|
|
67
|
+
docs: {
|
|
68
|
+
displayType: 'yaml'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
label: {
|
|
72
|
+
type: 'object',
|
|
73
|
+
description: 'Label properties.',
|
|
74
|
+
additionalProperties: false,
|
|
75
|
+
properties: {
|
|
76
|
+
align: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
enum: [
|
|
79
|
+
'left',
|
|
80
|
+
'right'
|
|
81
|
+
],
|
|
82
|
+
default: 'left',
|
|
83
|
+
description: 'Align label left or right when inline.'
|
|
84
|
+
},
|
|
85
|
+
colon: {
|
|
86
|
+
type: 'boolean',
|
|
87
|
+
default: true,
|
|
88
|
+
description: 'Append label with colon.'
|
|
89
|
+
},
|
|
90
|
+
extra: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'Extra text to display beneath the content - supports html.'
|
|
93
|
+
},
|
|
94
|
+
title: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
description: 'Label title - supports html.'
|
|
97
|
+
},
|
|
98
|
+
span: {
|
|
99
|
+
type: 'number',
|
|
100
|
+
description: 'Label inline span.'
|
|
101
|
+
},
|
|
102
|
+
disabled: {
|
|
103
|
+
type: 'boolean',
|
|
104
|
+
default: false,
|
|
105
|
+
description: 'Hide input label.'
|
|
106
|
+
},
|
|
107
|
+
hasFeedback: {
|
|
108
|
+
type: 'boolean',
|
|
109
|
+
default: true,
|
|
110
|
+
description: 'Display feedback extra from validation, this does not disable validation.'
|
|
111
|
+
},
|
|
112
|
+
inline: {
|
|
113
|
+
type: 'boolean',
|
|
114
|
+
default: false,
|
|
115
|
+
description: 'Render input and label inline.'
|
|
116
|
+
},
|
|
117
|
+
extraStyle: {
|
|
118
|
+
type: 'object',
|
|
119
|
+
description: 'Css style to applied to label extra.',
|
|
120
|
+
docs: {
|
|
121
|
+
displayType: 'yaml'
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
feedbackStyle: {
|
|
125
|
+
type: 'object',
|
|
126
|
+
description: 'Css style to applied to label feedback.',
|
|
127
|
+
docs: {
|
|
128
|
+
displayType: 'yaml'
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
options: {
|
|
134
|
+
default: [],
|
|
135
|
+
oneOf: [
|
|
136
|
+
{
|
|
137
|
+
type: 'array',
|
|
138
|
+
description: 'Options can either be an array of primitive values, on an array of label, value pairs - supports html.',
|
|
139
|
+
items: {
|
|
140
|
+
type: 'string'
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
type: 'array',
|
|
145
|
+
description: 'Options can either be an array of primitive values, on an array of label, value pairs.',
|
|
146
|
+
items: {
|
|
147
|
+
type: 'number'
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
type: 'array',
|
|
152
|
+
description: 'Options can either be an array of primitive values, on an array of label, value pairs.',
|
|
153
|
+
items: {
|
|
154
|
+
type: 'boolean'
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
type: 'array',
|
|
159
|
+
description: 'Options can either be an array of primitive values, on an array of label, value pairs.',
|
|
160
|
+
items: {
|
|
161
|
+
type: 'object',
|
|
162
|
+
required: [
|
|
163
|
+
'value'
|
|
164
|
+
],
|
|
165
|
+
properties: {
|
|
166
|
+
label: {
|
|
167
|
+
type: 'string',
|
|
168
|
+
description: 'Value label shown to user - supports html.'
|
|
169
|
+
},
|
|
170
|
+
value: {
|
|
171
|
+
description: 'Value selected. Can be of any type.',
|
|
172
|
+
oneOf: [
|
|
173
|
+
{
|
|
174
|
+
type: 'string'
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
type: 'number'
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
type: 'boolean'
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
type: 'object'
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
type: 'array'
|
|
187
|
+
}
|
|
188
|
+
],
|
|
189
|
+
docs: {
|
|
190
|
+
displayType: 'yaml'
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
disabled: {
|
|
194
|
+
type: 'boolean',
|
|
195
|
+
default: false,
|
|
196
|
+
description: 'Disable the option if true.'
|
|
197
|
+
},
|
|
198
|
+
filterString: {
|
|
199
|
+
type: 'string',
|
|
200
|
+
description: 'String to match against when filtering selector options during. If no filterString is provided the filter method matches against options.label.'
|
|
201
|
+
},
|
|
202
|
+
style: {
|
|
203
|
+
type: 'object',
|
|
204
|
+
description: 'Css style to applied to option.',
|
|
205
|
+
docs: {
|
|
206
|
+
displayType: 'yaml'
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
tag: {
|
|
210
|
+
type: 'object',
|
|
211
|
+
properties: {
|
|
212
|
+
color: {
|
|
213
|
+
type: 'string',
|
|
214
|
+
description: 'Color of the Tag. Preset options are success, processing, error, warning, default, blue, cyan, geekblue, gold, green, lime, magenta, orange, purple, red, volcano, or alternatively any hex color.',
|
|
215
|
+
docs: {
|
|
216
|
+
displayType: 'color'
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
title: {
|
|
220
|
+
type: 'string',
|
|
221
|
+
description: 'Content title of tag - supports html.'
|
|
222
|
+
},
|
|
223
|
+
icon: {
|
|
224
|
+
type: [
|
|
225
|
+
'string',
|
|
226
|
+
'object'
|
|
227
|
+
],
|
|
228
|
+
description: 'Name of an Ant Design Icon or properties of an Icon block to customize alert icon.',
|
|
229
|
+
docs: {
|
|
230
|
+
displayType: 'icon'
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
maxTagCount: {
|
|
241
|
+
type: 'number',
|
|
242
|
+
description: 'Max tag count to show.'
|
|
243
|
+
},
|
|
244
|
+
placeholder: {
|
|
245
|
+
type: 'string',
|
|
246
|
+
default: 'Select item',
|
|
247
|
+
description: 'Placeholder text inside the block before user selects input.'
|
|
248
|
+
},
|
|
249
|
+
loadingPlaceholder: {
|
|
250
|
+
type: 'string',
|
|
251
|
+
default: 'Loading',
|
|
252
|
+
description: 'Placeholder text to show in options while the block is loading.'
|
|
253
|
+
},
|
|
254
|
+
notFoundContent: {
|
|
255
|
+
type: 'string',
|
|
256
|
+
default: 'not Found',
|
|
257
|
+
description: 'Placeholder text to show when list of options are empty.'
|
|
258
|
+
},
|
|
259
|
+
selectedIcon: {
|
|
260
|
+
type: [
|
|
261
|
+
'string',
|
|
262
|
+
'object'
|
|
263
|
+
],
|
|
264
|
+
default: 'AiOutlineCheck',
|
|
265
|
+
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 showing when a selection is made in the drop-down list.",
|
|
266
|
+
docs: {
|
|
267
|
+
displayType: 'icon'
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
showArrow: {
|
|
271
|
+
type: 'boolean',
|
|
272
|
+
default: true,
|
|
273
|
+
description: 'Show the suffix icon at the drop-down position of the selector.'
|
|
274
|
+
},
|
|
275
|
+
size: {
|
|
276
|
+
type: 'string',
|
|
277
|
+
enum: [
|
|
278
|
+
'small',
|
|
279
|
+
'default',
|
|
280
|
+
'large'
|
|
281
|
+
],
|
|
282
|
+
default: 'default',
|
|
283
|
+
description: 'Size of the block.'
|
|
284
|
+
},
|
|
285
|
+
suffixIcon: {
|
|
286
|
+
type: [
|
|
287
|
+
'string',
|
|
288
|
+
'object'
|
|
289
|
+
],
|
|
290
|
+
default: 'AiOutlineDown',
|
|
291
|
+
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 at the drop-down position of the selector.",
|
|
292
|
+
docs: {
|
|
293
|
+
displayType: 'icon'
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
title: {
|
|
297
|
+
type: 'string',
|
|
298
|
+
description: 'Multiple selector label title - supports html.'
|
|
299
|
+
},
|
|
300
|
+
renderTags: {
|
|
301
|
+
type: 'boolean',
|
|
302
|
+
description: 'When true, the selected option labels are rendered as tags in the selector input. This field must be true to render option tag values.'
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
},
|
|
306
|
+
events: {
|
|
307
|
+
type: 'object',
|
|
308
|
+
additionalProperties: false,
|
|
309
|
+
properties: {
|
|
310
|
+
onChange: {
|
|
311
|
+
type: 'array',
|
|
312
|
+
description: 'Trigger actions when selection is changed.'
|
|
313
|
+
},
|
|
314
|
+
onBlur: {
|
|
315
|
+
type: 'array',
|
|
316
|
+
description: 'Trigger action event occurs when selector loses focus.'
|
|
317
|
+
},
|
|
318
|
+
onFocus: {
|
|
319
|
+
type: 'array',
|
|
320
|
+
description: 'Trigger action when selector gets focus.'
|
|
321
|
+
},
|
|
322
|
+
onClear: {
|
|
323
|
+
type: 'array',
|
|
324
|
+
description: 'Trigger action when selector gets cleared.'
|
|
325
|
+
},
|
|
326
|
+
onSearch: {
|
|
327
|
+
type: 'array',
|
|
328
|
+
description: "Trigger actions when input is changed. 'value' is passed to the _event operator to be used in actions such as search queries."
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
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 } from '@lowdefy/e2e-utils';
|
|
16
|
+
import { expect } from '@playwright/test';
|
|
17
|
+
// Notification renders as a global portal notice — not scoped to a blockId.
|
|
18
|
+
// The locator targets the notice container directly.
|
|
19
|
+
const locator = (page)=>page.locator('.ant-notification-notice');
|
|
20
|
+
export default createBlockHelper({
|
|
21
|
+
locator,
|
|
22
|
+
expect: {
|
|
23
|
+
shown: (page, _blockId, text)=>expect(page.locator('.ant-notification-notice').filter({
|
|
24
|
+
hasText: text
|
|
25
|
+
})).toBeVisible()
|
|
26
|
+
}
|
|
27
|
+
});
|