@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,162 @@
|
|
|
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
|
+
code: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
default: false,
|
|
24
|
+
description: 'Apply code style.'
|
|
25
|
+
},
|
|
26
|
+
content: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Paragraph text content - supports html.',
|
|
29
|
+
docs: {
|
|
30
|
+
displayType: 'text-area'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
copyable: {
|
|
34
|
+
description: 'Provide copy text button.',
|
|
35
|
+
default: false,
|
|
36
|
+
oneOf: [
|
|
37
|
+
{
|
|
38
|
+
type: 'boolean'
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: 'object',
|
|
42
|
+
additionalProperties: false,
|
|
43
|
+
properties: {
|
|
44
|
+
text: {
|
|
45
|
+
type: 'string',
|
|
46
|
+
description: 'Paragraph text to copy when clicked.'
|
|
47
|
+
},
|
|
48
|
+
icon: {
|
|
49
|
+
type: [
|
|
50
|
+
'string',
|
|
51
|
+
'object',
|
|
52
|
+
'array'
|
|
53
|
+
],
|
|
54
|
+
description: 'Copy icon, can be an array or two icons for before and after clicked.',
|
|
55
|
+
docs: {
|
|
56
|
+
displayType: 'icon'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
tooltips: {
|
|
60
|
+
type: [
|
|
61
|
+
'string',
|
|
62
|
+
'array'
|
|
63
|
+
],
|
|
64
|
+
description: 'Tooltip text, can be an array or two strings for before and after clicked.',
|
|
65
|
+
docs: {
|
|
66
|
+
displayType: 'string'
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
delete: {
|
|
74
|
+
type: 'boolean',
|
|
75
|
+
default: false,
|
|
76
|
+
description: 'Apply deleted (strikethrough) style.'
|
|
77
|
+
},
|
|
78
|
+
disabled: {
|
|
79
|
+
type: 'boolean',
|
|
80
|
+
default: false,
|
|
81
|
+
description: 'Apply disabled style.'
|
|
82
|
+
},
|
|
83
|
+
ellipsis: {
|
|
84
|
+
default: false,
|
|
85
|
+
oneOf: [
|
|
86
|
+
{
|
|
87
|
+
type: 'boolean',
|
|
88
|
+
description: 'Display ellipsis when text overflows a single line.'
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
type: 'object',
|
|
92
|
+
additionalProperties: false,
|
|
93
|
+
properties: {
|
|
94
|
+
rows: {
|
|
95
|
+
type: 'number',
|
|
96
|
+
description: 'Max rows of content.'
|
|
97
|
+
},
|
|
98
|
+
expandable: {
|
|
99
|
+
type: 'boolean',
|
|
100
|
+
description: 'Expand hidden content when clicked.'
|
|
101
|
+
},
|
|
102
|
+
suffix: {
|
|
103
|
+
type: 'string',
|
|
104
|
+
description: 'Suffix of ellipses content.'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
italic: {
|
|
111
|
+
type: 'boolean',
|
|
112
|
+
default: false,
|
|
113
|
+
description: 'Apply italic style.'
|
|
114
|
+
},
|
|
115
|
+
mark: {
|
|
116
|
+
type: 'boolean',
|
|
117
|
+
default: false,
|
|
118
|
+
description: 'Apply marked (highlighted) style.'
|
|
119
|
+
},
|
|
120
|
+
strong: {
|
|
121
|
+
type: 'boolean',
|
|
122
|
+
default: false,
|
|
123
|
+
description: 'Apply strong (bold) style.'
|
|
124
|
+
},
|
|
125
|
+
type: {
|
|
126
|
+
type: 'string',
|
|
127
|
+
default: 'default',
|
|
128
|
+
enum: [
|
|
129
|
+
'success',
|
|
130
|
+
'default',
|
|
131
|
+
'secondary',
|
|
132
|
+
'warning',
|
|
133
|
+
'danger'
|
|
134
|
+
],
|
|
135
|
+
description: "Additional types. Don't specify for default."
|
|
136
|
+
},
|
|
137
|
+
underline: {
|
|
138
|
+
type: 'boolean',
|
|
139
|
+
default: false,
|
|
140
|
+
description: 'Apply underline style.'
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
events: {
|
|
145
|
+
type: 'object',
|
|
146
|
+
additionalProperties: false,
|
|
147
|
+
properties: {
|
|
148
|
+
onExpand: {
|
|
149
|
+
type: 'array',
|
|
150
|
+
description: 'Trigger action when ellipse expand is clicked.'
|
|
151
|
+
},
|
|
152
|
+
onCopy: {
|
|
153
|
+
type: 'array',
|
|
154
|
+
description: 'Trigger action when copy text is clicked.'
|
|
155
|
+
},
|
|
156
|
+
onTextSelection: {
|
|
157
|
+
type: 'array',
|
|
158
|
+
description: 'Trigger action when text is selected and pass selected text to the event object.'
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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(`#bl-${escapeId(blockId)} .ant-typography`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
do: {
|
|
21
|
+
edit: async (page, blockId, val)=>{
|
|
22
|
+
await locator(page, blockId).getByRole('button', {
|
|
23
|
+
name: 'Edit'
|
|
24
|
+
}).first().click();
|
|
25
|
+
const textarea = page.locator('.ant-typography-edit-content textarea');
|
|
26
|
+
await textarea.fill(val);
|
|
27
|
+
await textarea.press('Enter');
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
expect: {
|
|
31
|
+
text: (page, blockId, text)=>expect(locator(page, blockId)).toHaveText(text)
|
|
32
|
+
}
|
|
33
|
+
});
|
|
@@ -0,0 +1,192 @@
|
|
|
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
|
+
code: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
default: false,
|
|
24
|
+
description: 'Apply code style.'
|
|
25
|
+
},
|
|
26
|
+
copyable: {
|
|
27
|
+
default: false,
|
|
28
|
+
oneOf: [
|
|
29
|
+
{
|
|
30
|
+
type: 'boolean',
|
|
31
|
+
description: 'Provide copy text button.'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: 'object',
|
|
35
|
+
additionalProperties: false,
|
|
36
|
+
properties: {
|
|
37
|
+
text: {
|
|
38
|
+
type: 'string',
|
|
39
|
+
description: 'Paragraph text to copy when clicked.'
|
|
40
|
+
},
|
|
41
|
+
icon: {
|
|
42
|
+
type: [
|
|
43
|
+
'string',
|
|
44
|
+
'object',
|
|
45
|
+
'array'
|
|
46
|
+
],
|
|
47
|
+
description: 'Copy icon, can be an array or two icons for before and after clicked.',
|
|
48
|
+
docs: {
|
|
49
|
+
displayType: 'icon'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
tooltips: {
|
|
53
|
+
type: [
|
|
54
|
+
'string',
|
|
55
|
+
'array'
|
|
56
|
+
],
|
|
57
|
+
description: 'Tooltip text, can be an array or two strings for before and after clicked.',
|
|
58
|
+
docs: {
|
|
59
|
+
displayType: 'string'
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
delete: {
|
|
67
|
+
type: 'boolean',
|
|
68
|
+
default: false,
|
|
69
|
+
description: 'Apply deleted (strikethrough) style.'
|
|
70
|
+
},
|
|
71
|
+
disabled: {
|
|
72
|
+
type: 'boolean',
|
|
73
|
+
default: false,
|
|
74
|
+
description: 'Apply disabled style.'
|
|
75
|
+
},
|
|
76
|
+
editable: {
|
|
77
|
+
default: true,
|
|
78
|
+
oneOf: [
|
|
79
|
+
{
|
|
80
|
+
type: 'boolean',
|
|
81
|
+
description: 'Allow paragraph editing when true, editable settings can be provided with editable object.'
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
type: 'object',
|
|
85
|
+
additionalProperties: false,
|
|
86
|
+
properties: {
|
|
87
|
+
icon: {
|
|
88
|
+
type: [
|
|
89
|
+
'string',
|
|
90
|
+
'object'
|
|
91
|
+
],
|
|
92
|
+
description: 'Edit icon.',
|
|
93
|
+
docs: {
|
|
94
|
+
displayType: 'icon'
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
tooltip: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
description: 'Edit tooltip text.'
|
|
100
|
+
},
|
|
101
|
+
editing: {
|
|
102
|
+
type: 'boolean',
|
|
103
|
+
description: 'Control editing state.'
|
|
104
|
+
},
|
|
105
|
+
maxLength: {
|
|
106
|
+
type: 'number',
|
|
107
|
+
description: 'Max length of text area input.'
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
ellipsis: {
|
|
114
|
+
default: false,
|
|
115
|
+
oneOf: [
|
|
116
|
+
{
|
|
117
|
+
type: 'boolean',
|
|
118
|
+
description: 'Display ellipsis when text overflows a single line.'
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
type: 'object',
|
|
122
|
+
additionalProperties: false,
|
|
123
|
+
properties: {
|
|
124
|
+
rows: {
|
|
125
|
+
type: 'number',
|
|
126
|
+
description: 'Max rows of content.'
|
|
127
|
+
},
|
|
128
|
+
expandable: {
|
|
129
|
+
type: 'boolean',
|
|
130
|
+
description: 'Expand hidden content when clicked.'
|
|
131
|
+
},
|
|
132
|
+
suffix: {
|
|
133
|
+
type: 'string',
|
|
134
|
+
description: 'Suffix of ellipses content.'
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
italic: {
|
|
141
|
+
type: 'boolean',
|
|
142
|
+
default: false,
|
|
143
|
+
description: 'Apply italic style.'
|
|
144
|
+
},
|
|
145
|
+
mark: {
|
|
146
|
+
type: 'boolean',
|
|
147
|
+
default: false,
|
|
148
|
+
description: 'Apply marked (highlighted) style.'
|
|
149
|
+
},
|
|
150
|
+
strong: {
|
|
151
|
+
type: 'boolean',
|
|
152
|
+
default: false,
|
|
153
|
+
description: 'Apply strong (bold) style.'
|
|
154
|
+
},
|
|
155
|
+
type: {
|
|
156
|
+
type: 'string',
|
|
157
|
+
default: 'default',
|
|
158
|
+
enum: [
|
|
159
|
+
'success',
|
|
160
|
+
'default',
|
|
161
|
+
'secondary',
|
|
162
|
+
'warning',
|
|
163
|
+
'danger'
|
|
164
|
+
],
|
|
165
|
+
description: "Additional types. Don't specify for default."
|
|
166
|
+
},
|
|
167
|
+
underline: {
|
|
168
|
+
type: 'boolean',
|
|
169
|
+
default: false,
|
|
170
|
+
description: 'Apply underline style.'
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
events: {
|
|
175
|
+
type: 'object',
|
|
176
|
+
additionalProperties: false,
|
|
177
|
+
properties: {
|
|
178
|
+
onExpand: {
|
|
179
|
+
type: 'array',
|
|
180
|
+
description: 'Trigger action when ellipse expand is clicked.'
|
|
181
|
+
},
|
|
182
|
+
onCopy: {
|
|
183
|
+
type: 'array',
|
|
184
|
+
description: 'Trigger action when copy text is clicked.'
|
|
185
|
+
},
|
|
186
|
+
onChange: {
|
|
187
|
+
type: 'array',
|
|
188
|
+
description: 'Trigger action when paragraph is changed.'
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
};
|
|
@@ -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.
|
|
@@ -41,7 +41,10 @@ const PasswordInput = ({ blockId, components, events, loading, methods, properti
|
|
|
41
41
|
onChange: (event)=>{
|
|
42
42
|
methods.setValue(event.target.value);
|
|
43
43
|
methods.triggerEvent({
|
|
44
|
-
name: 'onChange'
|
|
44
|
+
name: 'onChange',
|
|
45
|
+
event: {
|
|
46
|
+
value: event.target.value
|
|
47
|
+
}
|
|
45
48
|
});
|
|
46
49
|
const cStart = event.target.selectionStart;
|
|
47
50
|
const cEnd = event.target.selectionEnd;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
},
|
|
24
|
+
expect: {
|
|
25
|
+
value: (page, blockId, val)=>expect(locator(page, blockId)).toHaveValue(val),
|
|
26
|
+
placeholder: (page, blockId, text)=>expect(locator(page, blockId)).toHaveAttribute('placeholder', text)
|
|
27
|
+
}
|
|
28
|
+
});
|
|
@@ -0,0 +1,152 @@
|
|
|
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
|
+
autoFocus: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
default: false,
|
|
24
|
+
description: 'Autofocus to the block on page load.'
|
|
25
|
+
},
|
|
26
|
+
bordered: {
|
|
27
|
+
type: 'boolean',
|
|
28
|
+
default: true,
|
|
29
|
+
description: 'Whether or not the input has a border style.'
|
|
30
|
+
},
|
|
31
|
+
disabled: {
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
default: false,
|
|
34
|
+
description: 'Disable the block if true.'
|
|
35
|
+
},
|
|
36
|
+
placeholder: {
|
|
37
|
+
type: 'string',
|
|
38
|
+
description: 'Placeholder text inside the block before user types input.'
|
|
39
|
+
},
|
|
40
|
+
inputStyle: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
description: 'Css style to applied to input.',
|
|
43
|
+
docs: {
|
|
44
|
+
displayType: 'yaml'
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
label: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
description: 'Label properties.',
|
|
50
|
+
additionalProperties: false,
|
|
51
|
+
properties: {
|
|
52
|
+
align: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
enum: [
|
|
55
|
+
'left',
|
|
56
|
+
'right'
|
|
57
|
+
],
|
|
58
|
+
default: 'left',
|
|
59
|
+
description: 'Align label left or right when inline.'
|
|
60
|
+
},
|
|
61
|
+
colon: {
|
|
62
|
+
type: 'boolean',
|
|
63
|
+
default: true,
|
|
64
|
+
description: 'Append label with colon.'
|
|
65
|
+
},
|
|
66
|
+
extra: {
|
|
67
|
+
type: 'string',
|
|
68
|
+
description: 'Extra text to display beneath the content - supports html.'
|
|
69
|
+
},
|
|
70
|
+
title: {
|
|
71
|
+
type: 'string',
|
|
72
|
+
description: 'Label title - supports html.'
|
|
73
|
+
},
|
|
74
|
+
span: {
|
|
75
|
+
type: 'number',
|
|
76
|
+
description: 'Label inline span.'
|
|
77
|
+
},
|
|
78
|
+
disabled: {
|
|
79
|
+
type: 'boolean',
|
|
80
|
+
default: false,
|
|
81
|
+
description: 'Hide input label.'
|
|
82
|
+
},
|
|
83
|
+
hasFeedback: {
|
|
84
|
+
type: 'boolean',
|
|
85
|
+
default: true,
|
|
86
|
+
description: 'Display feedback extra from validation, this does not disable validation.'
|
|
87
|
+
},
|
|
88
|
+
inline: {
|
|
89
|
+
type: 'boolean',
|
|
90
|
+
default: false,
|
|
91
|
+
description: 'Render input and label inline.'
|
|
92
|
+
},
|
|
93
|
+
extraStyle: {
|
|
94
|
+
type: 'object',
|
|
95
|
+
description: 'Css style to applied to label extra.',
|
|
96
|
+
docs: {
|
|
97
|
+
displayType: 'yaml'
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
feedbackStyle: {
|
|
101
|
+
type: 'object',
|
|
102
|
+
description: 'Css style to applied to label feedback.',
|
|
103
|
+
docs: {
|
|
104
|
+
displayType: 'yaml'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
size: {
|
|
110
|
+
type: 'string',
|
|
111
|
+
enum: [
|
|
112
|
+
'small',
|
|
113
|
+
'default',
|
|
114
|
+
'large'
|
|
115
|
+
],
|
|
116
|
+
default: 'default',
|
|
117
|
+
description: 'Size of the block.'
|
|
118
|
+
},
|
|
119
|
+
title: {
|
|
120
|
+
type: 'string',
|
|
121
|
+
description: 'Title to describe the input component, if no title is specified the block id is displayed - supports html.'
|
|
122
|
+
},
|
|
123
|
+
visibilityToggle: {
|
|
124
|
+
type: 'boolean',
|
|
125
|
+
default: true,
|
|
126
|
+
description: 'Show password visibility toggle button.'
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
events: {
|
|
131
|
+
type: 'object',
|
|
132
|
+
additionalProperties: false,
|
|
133
|
+
properties: {
|
|
134
|
+
onBlur: {
|
|
135
|
+
type: 'array',
|
|
136
|
+
description: 'Trigger action event occurs when text input loses focus.'
|
|
137
|
+
},
|
|
138
|
+
onChange: {
|
|
139
|
+
type: 'array',
|
|
140
|
+
description: 'Trigger action when text input is changed.'
|
|
141
|
+
},
|
|
142
|
+
onFocus: {
|
|
143
|
+
type: 'array',
|
|
144
|
+
description: 'Trigger action when text input gets focus.'
|
|
145
|
+
},
|
|
146
|
+
onPressEnter: {
|
|
147
|
+
type: 'array',
|
|
148
|
+
description: 'Trigger action when enter is pressed while text input is focused.'
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
};
|
|
@@ -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.
|
|
@@ -65,7 +65,14 @@ function AddOnSelect({ blockId, defaultValue, loading, methods, properties, uniq
|
|
|
65
65
|
name: 'onCodeChange'
|
|
66
66
|
});
|
|
67
67
|
methods.triggerEvent({
|
|
68
|
-
name: 'onChange'
|
|
68
|
+
name: 'onChange',
|
|
69
|
+
event: {
|
|
70
|
+
value: {
|
|
71
|
+
input,
|
|
72
|
+
region,
|
|
73
|
+
phone_number
|
|
74
|
+
}
|
|
75
|
+
}
|
|
69
76
|
});
|
|
70
77
|
},
|
|
71
78
|
onBlur: ()=>{
|
|
@@ -177,7 +184,14 @@ const PhoneNumberInput = ({ blockId, components: { Icon, Link }, events, loading
|
|
|
177
184
|
name: 'onInputChange'
|
|
178
185
|
});
|
|
179
186
|
methods.triggerEvent({
|
|
180
|
-
name: 'onChange'
|
|
187
|
+
name: 'onChange',
|
|
188
|
+
event: {
|
|
189
|
+
value: {
|
|
190
|
+
input,
|
|
191
|
+
region,
|
|
192
|
+
phone_number
|
|
193
|
+
}
|
|
194
|
+
}
|
|
181
195
|
});
|
|
182
196
|
},
|
|
183
197
|
onPressEnter: ()=>{
|