@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,168 @@
|
|
|
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
|
+
color: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Title color.',
|
|
29
|
+
docs: {
|
|
30
|
+
displayType: 'color'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
content: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'Title text content - supports html.'
|
|
36
|
+
},
|
|
37
|
+
copyable: {
|
|
38
|
+
default: false,
|
|
39
|
+
oneOf: [
|
|
40
|
+
{
|
|
41
|
+
type: 'boolean',
|
|
42
|
+
description: 'Provide copy text button.'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
type: 'object',
|
|
46
|
+
additionalProperties: false,
|
|
47
|
+
properties: {
|
|
48
|
+
text: {
|
|
49
|
+
type: 'string',
|
|
50
|
+
description: 'Paragraph text to copy when clicked.'
|
|
51
|
+
},
|
|
52
|
+
icon: {
|
|
53
|
+
type: [
|
|
54
|
+
'string',
|
|
55
|
+
'object',
|
|
56
|
+
'array'
|
|
57
|
+
],
|
|
58
|
+
description: 'Copy icon, can be an array or two icons for before and after clicked.',
|
|
59
|
+
docs: {
|
|
60
|
+
displayType: 'icon'
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
tooltips: {
|
|
64
|
+
type: [
|
|
65
|
+
'string',
|
|
66
|
+
'array'
|
|
67
|
+
],
|
|
68
|
+
description: 'Tooltip text, can be an array or two strings for before and after clicked.',
|
|
69
|
+
docs: {
|
|
70
|
+
displayType: 'string'
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
delete: {
|
|
78
|
+
type: 'boolean',
|
|
79
|
+
default: false,
|
|
80
|
+
description: 'Apply deleted (strikethrough) style.'
|
|
81
|
+
},
|
|
82
|
+
disabled: {
|
|
83
|
+
type: 'boolean',
|
|
84
|
+
default: false,
|
|
85
|
+
description: 'Apply disabled style.'
|
|
86
|
+
},
|
|
87
|
+
ellipsis: {
|
|
88
|
+
default: false,
|
|
89
|
+
oneOf: [
|
|
90
|
+
{
|
|
91
|
+
type: 'boolean',
|
|
92
|
+
description: 'Display ellipsis when text overflows a single line.'
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
type: 'object',
|
|
96
|
+
additionalProperties: false,
|
|
97
|
+
properties: {
|
|
98
|
+
rows: {
|
|
99
|
+
type: 'number',
|
|
100
|
+
description: 'Max rows of content.'
|
|
101
|
+
},
|
|
102
|
+
expandable: {
|
|
103
|
+
type: 'boolean',
|
|
104
|
+
description: 'Expand hidden content when clicked.'
|
|
105
|
+
},
|
|
106
|
+
suffix: {
|
|
107
|
+
type: 'string',
|
|
108
|
+
description: 'Suffix of ellipses content.'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
italic: {
|
|
115
|
+
type: 'boolean',
|
|
116
|
+
default: false,
|
|
117
|
+
description: 'Apply italic style.'
|
|
118
|
+
},
|
|
119
|
+
level: {
|
|
120
|
+
type: 'number',
|
|
121
|
+
default: 1,
|
|
122
|
+
enum: [
|
|
123
|
+
1,
|
|
124
|
+
2,
|
|
125
|
+
3,
|
|
126
|
+
4,
|
|
127
|
+
5
|
|
128
|
+
],
|
|
129
|
+
description: 'Set title type. Matches with h1, h2, h3 and h4.'
|
|
130
|
+
},
|
|
131
|
+
mark: {
|
|
132
|
+
type: 'boolean',
|
|
133
|
+
default: false,
|
|
134
|
+
description: 'Apply marked (highlighted) style.'
|
|
135
|
+
},
|
|
136
|
+
type: {
|
|
137
|
+
type: 'string',
|
|
138
|
+
default: 'default',
|
|
139
|
+
enum: [
|
|
140
|
+
'secondary',
|
|
141
|
+
'warning',
|
|
142
|
+
'danger',
|
|
143
|
+
'success'
|
|
144
|
+
],
|
|
145
|
+
description: "Additional types. Don't specify for default."
|
|
146
|
+
},
|
|
147
|
+
underline: {
|
|
148
|
+
type: 'boolean',
|
|
149
|
+
default: false,
|
|
150
|
+
description: 'Apply underline style.'
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
events: {
|
|
155
|
+
type: 'object',
|
|
156
|
+
additionalProperties: false,
|
|
157
|
+
properties: {
|
|
158
|
+
onExpand: {
|
|
159
|
+
type: 'array',
|
|
160
|
+
description: 'Trigger action when ellipse expand is clicked.'
|
|
161
|
+
},
|
|
162
|
+
onCopy: {
|
|
163
|
+
type: 'array',
|
|
164
|
+
description: 'Trigger action when copy text is clicked.'
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
};
|
|
@@ -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,207 @@
|
|
|
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
|
+
color: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Title color.',
|
|
29
|
+
docs: {
|
|
30
|
+
displayType: 'color'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
copyable: {
|
|
34
|
+
default: false,
|
|
35
|
+
oneOf: [
|
|
36
|
+
{
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
description: 'Provide copy text button.'
|
|
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
|
+
editable: {
|
|
111
|
+
default: true,
|
|
112
|
+
oneOf: [
|
|
113
|
+
{
|
|
114
|
+
type: 'boolean',
|
|
115
|
+
description: 'Allow paragraph editing when true, editable settings can be provided with editable object.'
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
type: 'object',
|
|
119
|
+
additionalProperties: false,
|
|
120
|
+
properties: {
|
|
121
|
+
icon: {
|
|
122
|
+
type: [
|
|
123
|
+
'string',
|
|
124
|
+
'object'
|
|
125
|
+
],
|
|
126
|
+
description: 'Edit icon.',
|
|
127
|
+
docs: {
|
|
128
|
+
displayType: 'icon'
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
tooltip: {
|
|
132
|
+
type: 'string',
|
|
133
|
+
description: 'Edit tooltip text.'
|
|
134
|
+
},
|
|
135
|
+
editing: {
|
|
136
|
+
type: 'boolean',
|
|
137
|
+
default: false,
|
|
138
|
+
description: 'Control editing state.'
|
|
139
|
+
},
|
|
140
|
+
maxLength: {
|
|
141
|
+
type: 'number',
|
|
142
|
+
description: 'Max length of text area input.'
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
italic: {
|
|
149
|
+
type: 'boolean',
|
|
150
|
+
default: false,
|
|
151
|
+
description: 'Apply italic style.'
|
|
152
|
+
},
|
|
153
|
+
level: {
|
|
154
|
+
type: 'number',
|
|
155
|
+
default: 1,
|
|
156
|
+
enum: [
|
|
157
|
+
1,
|
|
158
|
+
2,
|
|
159
|
+
3,
|
|
160
|
+
4,
|
|
161
|
+
5
|
|
162
|
+
],
|
|
163
|
+
description: 'Set title type. Matches with h1, h2, h3 and h4.'
|
|
164
|
+
},
|
|
165
|
+
mark: {
|
|
166
|
+
type: 'boolean',
|
|
167
|
+
default: false,
|
|
168
|
+
description: 'Apply marked (highlighted) style.'
|
|
169
|
+
},
|
|
170
|
+
type: {
|
|
171
|
+
type: 'string',
|
|
172
|
+
default: 'default',
|
|
173
|
+
enum: [
|
|
174
|
+
'default',
|
|
175
|
+
'secondary',
|
|
176
|
+
'warning',
|
|
177
|
+
'danger',
|
|
178
|
+
'success'
|
|
179
|
+
],
|
|
180
|
+
description: "Additional types. Don't specify for default."
|
|
181
|
+
},
|
|
182
|
+
underline: {
|
|
183
|
+
type: 'boolean',
|
|
184
|
+
default: false,
|
|
185
|
+
description: 'Apply underline style.'
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
events: {
|
|
190
|
+
type: 'object',
|
|
191
|
+
additionalProperties: false,
|
|
192
|
+
properties: {
|
|
193
|
+
onExpand: {
|
|
194
|
+
type: 'array',
|
|
195
|
+
description: 'Trigger action when ellipse expand is clicked.'
|
|
196
|
+
},
|
|
197
|
+
onCopy: {
|
|
198
|
+
type: 'array',
|
|
199
|
+
description: 'Trigger action when copy text is clicked.'
|
|
200
|
+
},
|
|
201
|
+
onChange: {
|
|
202
|
+
type: 'array',
|
|
203
|
+
description: 'Trigger action when title is changed.'
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
};
|
|
@@ -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
|
+
// Locator targets the trigger wrapper. The overlay is a portal (.ant-tooltip).
|
|
18
|
+
const locator = (page, blockId)=>page.locator(`#bl-${escapeId(blockId)}`);
|
|
19
|
+
export default createBlockHelper({
|
|
20
|
+
locator,
|
|
21
|
+
do: {
|
|
22
|
+
hover: (page, blockId)=>locator(page, blockId).hover()
|
|
23
|
+
},
|
|
24
|
+
expect: {
|
|
25
|
+
overlayVisible: (page, _blockId)=>expect(page.locator('.ant-tooltip')).toBeVisible(),
|
|
26
|
+
overlayHidden: (page, _blockId)=>expect(page.locator('.ant-tooltip')).toBeHidden()
|
|
27
|
+
}
|
|
28
|
+
});
|
|
@@ -0,0 +1,109 @@
|
|
|
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
|
+
arrowPointAtCenter: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
default: false,
|
|
24
|
+
description: 'Whether the arrow is pointed at the center of target.'
|
|
25
|
+
},
|
|
26
|
+
autoAdjustOverflow: {
|
|
27
|
+
type: 'boolean',
|
|
28
|
+
default: true,
|
|
29
|
+
description: 'Whether to adjust popup placement automatically when popup is off screen.'
|
|
30
|
+
},
|
|
31
|
+
overlayStyle: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
description: 'Style of the tooltip card.',
|
|
34
|
+
docs: {
|
|
35
|
+
displayType: 'yaml'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
color: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'The background color.',
|
|
41
|
+
docs: {
|
|
42
|
+
displayType: 'color'
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
defaultVisible: {
|
|
46
|
+
type: 'boolean',
|
|
47
|
+
default: false,
|
|
48
|
+
description: 'Whether the floating tooltip card is visible by default.'
|
|
49
|
+
},
|
|
50
|
+
mouseEnterDelay: {
|
|
51
|
+
type: 'number',
|
|
52
|
+
default: 0.1,
|
|
53
|
+
description: 'Delay in seconds, before tooltip is shown on mouse enter.'
|
|
54
|
+
},
|
|
55
|
+
mouseLeaveDelay: {
|
|
56
|
+
type: 'number',
|
|
57
|
+
default: 0.1,
|
|
58
|
+
description: 'Delay in seconds, before tooltip is shown on mouse enter.'
|
|
59
|
+
},
|
|
60
|
+
placement: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
enum: [
|
|
63
|
+
'top',
|
|
64
|
+
'left',
|
|
65
|
+
'right',
|
|
66
|
+
'bottom',
|
|
67
|
+
'topLeft',
|
|
68
|
+
'topRight',
|
|
69
|
+
'bottomLeft',
|
|
70
|
+
'bottomRight',
|
|
71
|
+
'leftTop',
|
|
72
|
+
'leftBottom',
|
|
73
|
+
'rightTop',
|
|
74
|
+
'rightBottom'
|
|
75
|
+
],
|
|
76
|
+
default: 'top',
|
|
77
|
+
description: 'The position of the tooltip relative to the target.'
|
|
78
|
+
},
|
|
79
|
+
trigger: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
enum: [
|
|
82
|
+
'hover',
|
|
83
|
+
'focus',
|
|
84
|
+
'click'
|
|
85
|
+
],
|
|
86
|
+
default: 'hover',
|
|
87
|
+
description: 'Tooltip trigger mode.'
|
|
88
|
+
},
|
|
89
|
+
title: {
|
|
90
|
+
type: 'string',
|
|
91
|
+
description: 'Title to show in the title area - supports html. Overwritten by blocks in the title content area.'
|
|
92
|
+
},
|
|
93
|
+
zIndex: {
|
|
94
|
+
type: 'integer',
|
|
95
|
+
description: 'The z-index of the Tooltip.'
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
events: {
|
|
100
|
+
type: 'object',
|
|
101
|
+
additionalProperties: false,
|
|
102
|
+
properties: {
|
|
103
|
+
onVisibleChange: {
|
|
104
|
+
type: 'array',
|
|
105
|
+
description: 'Trigger action when visibility of the tooltip card is changed.'
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
@@ -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.
|
|
@@ -70,9 +70,13 @@ const TreeSelector = ({ blockId, properties, content, methods, value })=>{
|
|
|
70
70
|
value
|
|
71
71
|
]);
|
|
72
72
|
const onSelect = (selectedKeys)=>{
|
|
73
|
-
|
|
73
|
+
const val = selectedKeys.map((key)=>valueMap[key]).flat();
|
|
74
|
+
methods.setValue(val);
|
|
74
75
|
methods.triggerEvent({
|
|
75
|
-
name: 'onChange'
|
|
76
|
+
name: 'onChange',
|
|
77
|
+
event: {
|
|
78
|
+
value: val
|
|
79
|
+
}
|
|
76
80
|
});
|
|
77
81
|
setSelectedKeys(selectedKeys);
|
|
78
82
|
};
|
|
@@ -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-tree`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
do: {
|
|
21
|
+
expand: (page, blockId, label)=>locator(page, blockId).locator('.ant-tree-treenode').filter({
|
|
22
|
+
hasText: label
|
|
23
|
+
}).locator('.ant-tree-switcher').click(),
|
|
24
|
+
clickNode: (page, blockId, label)=>locator(page, blockId).locator('.ant-tree-node-content-wrapper').filter({
|
|
25
|
+
hasText: label
|
|
26
|
+
}).click()
|
|
27
|
+
},
|
|
28
|
+
expect: {
|
|
29
|
+
selected: (page, blockId, label)=>expect(locator(page, blockId).locator('.ant-tree-treenode-selected').filter({
|
|
30
|
+
hasText: label
|
|
31
|
+
})).toBeVisible()
|
|
32
|
+
}
|
|
33
|
+
});
|