@lowdefy/blocks-antd 4.5.2 → 4.6.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,101 @@
|
|
|
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
|
+
color: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'Customize Badge dot color.',
|
|
24
|
+
docs: {
|
|
25
|
+
displayType: 'color'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
count: {
|
|
29
|
+
type: [
|
|
30
|
+
'number',
|
|
31
|
+
'string'
|
|
32
|
+
],
|
|
33
|
+
description: 'Text to show in badge.',
|
|
34
|
+
docs: {
|
|
35
|
+
displayType: 'string'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
dot: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
default: false,
|
|
41
|
+
description: 'Whether to display a red dot instead of count.'
|
|
42
|
+
},
|
|
43
|
+
size: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
default: 'default',
|
|
46
|
+
enum: [
|
|
47
|
+
'default',
|
|
48
|
+
'small'
|
|
49
|
+
],
|
|
50
|
+
description: 'Sets the size of badge if count is set.'
|
|
51
|
+
},
|
|
52
|
+
icon: {
|
|
53
|
+
type: [
|
|
54
|
+
'string',
|
|
55
|
+
'object'
|
|
56
|
+
],
|
|
57
|
+
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 use an icon in badge.",
|
|
58
|
+
docs: {
|
|
59
|
+
displayType: 'icon'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
offset: {
|
|
63
|
+
type: 'array',
|
|
64
|
+
items: {
|
|
65
|
+
type: 'number'
|
|
66
|
+
},
|
|
67
|
+
description: 'Set offset of the badge dot, array of numbers for x and y offset ([x,y]).'
|
|
68
|
+
},
|
|
69
|
+
overflowCount: {
|
|
70
|
+
type: 'number',
|
|
71
|
+
default: 99,
|
|
72
|
+
description: 'Max count to show'
|
|
73
|
+
},
|
|
74
|
+
showZero: {
|
|
75
|
+
type: 'boolean',
|
|
76
|
+
default: false,
|
|
77
|
+
description: 'Whether to show badge when count is zero.'
|
|
78
|
+
},
|
|
79
|
+
status: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
enum: [
|
|
82
|
+
'success',
|
|
83
|
+
'processing',
|
|
84
|
+
'default',
|
|
85
|
+
'error',
|
|
86
|
+
'warning'
|
|
87
|
+
],
|
|
88
|
+
default: null,
|
|
89
|
+
description: 'Set Badge as a status dot.'
|
|
90
|
+
},
|
|
91
|
+
text: {
|
|
92
|
+
type: 'string',
|
|
93
|
+
description: 'If status is set, text sets the display text of the status dot.'
|
|
94
|
+
},
|
|
95
|
+
title: {
|
|
96
|
+
type: 'string',
|
|
97
|
+
description: 'Text to show when hovering over the badge.'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { createBlockHelper } from '@lowdefy/e2e-utils';
|
|
16
|
+
import { expect } from '@playwright/test';
|
|
17
|
+
const locator = (page, blockId)=>page.locator(`#${blockId}`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
expect: {
|
|
21
|
+
itemCount: (page, blockId, count)=>expect(locator(page, blockId).locator('.ant-breadcrumb-link')).toHaveCount(count)
|
|
22
|
+
}
|
|
23
|
+
});
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
separator: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: '/',
|
|
24
|
+
description: 'Use a custom separator string.'
|
|
25
|
+
},
|
|
26
|
+
style: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
description: 'Css style object to applied to breadcrumb.',
|
|
29
|
+
docs: {
|
|
30
|
+
displayType: 'yaml'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
list: {
|
|
34
|
+
oneOf: [
|
|
35
|
+
{
|
|
36
|
+
type: 'array',
|
|
37
|
+
description: 'List of breadcrumb links.',
|
|
38
|
+
items: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: 'Title of the breadcrumb link.'
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: 'array',
|
|
45
|
+
description: 'List of breadcrumb links.',
|
|
46
|
+
items: {
|
|
47
|
+
type: 'object',
|
|
48
|
+
properties: {
|
|
49
|
+
label: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
description: 'Label of the breadcrumb link.'
|
|
52
|
+
},
|
|
53
|
+
pageId: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
description: 'Page id to link to when clicked.'
|
|
56
|
+
},
|
|
57
|
+
url: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
description: 'External url link.'
|
|
60
|
+
},
|
|
61
|
+
style: {
|
|
62
|
+
type: 'object',
|
|
63
|
+
description: 'Css style to apply to link.',
|
|
64
|
+
docs: {
|
|
65
|
+
displayType: 'yaml'
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
icon: {
|
|
69
|
+
type: [
|
|
70
|
+
'string',
|
|
71
|
+
'object'
|
|
72
|
+
],
|
|
73
|
+
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 use an icon in breadcrumb link.",
|
|
74
|
+
docs: {
|
|
75
|
+
displayType: 'icon'
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
events: {
|
|
86
|
+
type: 'object',
|
|
87
|
+
additionalProperties: false,
|
|
88
|
+
properties: {
|
|
89
|
+
onClick: {
|
|
90
|
+
type: 'array',
|
|
91
|
+
description: 'Triggered when breadcrumb item is clicked. Provides clicked link and index as args.'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { createBlockHelper } from '@lowdefy/e2e-utils';
|
|
16
|
+
import { expect } from '@playwright/test';
|
|
17
|
+
const locator = (page, blockId)=>page.locator(`#bl-${blockId} .ant-btn`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
do: {
|
|
21
|
+
click: (page, blockId)=>locator(page, blockId).click()
|
|
22
|
+
},
|
|
23
|
+
expect: {
|
|
24
|
+
loading: (page, blockId)=>expect(locator(page, blockId)).toHaveClass(/ant-btn-loading/),
|
|
25
|
+
notLoading: (page, blockId)=>expect(locator(page, blockId)).not.toHaveClass(/ant-btn-loading/),
|
|
26
|
+
text: (page, blockId, text)=>expect(locator(page, blockId)).toHaveText(text),
|
|
27
|
+
type: (page, blockId, type)=>expect(locator(page, blockId)).toHaveClass(new RegExp(`ant-btn-${type}`))
|
|
28
|
+
}
|
|
29
|
+
});
|
|
@@ -0,0 +1,123 @@
|
|
|
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
|
+
block: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
description: "Fit the button's span to its parent container span.",
|
|
24
|
+
default: false
|
|
25
|
+
},
|
|
26
|
+
color: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Button color.',
|
|
29
|
+
docs: {
|
|
30
|
+
displayType: 'color'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
danger: {
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
description: 'Set button style to danger.',
|
|
36
|
+
default: false
|
|
37
|
+
},
|
|
38
|
+
disabled: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
description: 'Disable the button if true.',
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
43
|
+
ghost: {
|
|
44
|
+
type: 'boolean',
|
|
45
|
+
description: "Make the button's background transparent when true.",
|
|
46
|
+
default: false
|
|
47
|
+
},
|
|
48
|
+
hideTitle: {
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
description: "Hide the button's title.",
|
|
51
|
+
default: false
|
|
52
|
+
},
|
|
53
|
+
href: {
|
|
54
|
+
type: 'string',
|
|
55
|
+
description: 'The URL to redirect to when the button is clicked. Useful when used with a type link button.'
|
|
56
|
+
},
|
|
57
|
+
icon: {
|
|
58
|
+
type: [
|
|
59
|
+
'string',
|
|
60
|
+
'object'
|
|
61
|
+
],
|
|
62
|
+
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 use icon in button.",
|
|
63
|
+
docs: {
|
|
64
|
+
displayType: 'icon'
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
shape: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
default: 'square',
|
|
70
|
+
enum: [
|
|
71
|
+
'circle',
|
|
72
|
+
'round',
|
|
73
|
+
'square'
|
|
74
|
+
],
|
|
75
|
+
description: 'Shape of the button.'
|
|
76
|
+
},
|
|
77
|
+
size: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
enum: [
|
|
80
|
+
'small',
|
|
81
|
+
'default',
|
|
82
|
+
'large'
|
|
83
|
+
],
|
|
84
|
+
default: 'default',
|
|
85
|
+
description: 'Size of the button.'
|
|
86
|
+
},
|
|
87
|
+
style: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
description: 'Css style object to applied to button.',
|
|
90
|
+
docs: {
|
|
91
|
+
displayType: 'yaml'
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
title: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
description: 'Title text on the button - supports html.'
|
|
97
|
+
},
|
|
98
|
+
type: {
|
|
99
|
+
type: 'string',
|
|
100
|
+
default: 'primary',
|
|
101
|
+
enum: [
|
|
102
|
+
'primary',
|
|
103
|
+
'default',
|
|
104
|
+
'dashed',
|
|
105
|
+
'danger',
|
|
106
|
+
'link',
|
|
107
|
+
'text'
|
|
108
|
+
],
|
|
109
|
+
description: 'The button type.'
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
events: {
|
|
114
|
+
type: 'object',
|
|
115
|
+
additionalProperties: false,
|
|
116
|
+
properties: {
|
|
117
|
+
onClick: {
|
|
118
|
+
type: 'array',
|
|
119
|
+
description: 'Trigger action when button is clicked.'
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
};
|
|
@@ -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.
|
|
@@ -48,9 +48,13 @@ const ButtonSelector = ({ blockId, components, events, loading, properties, requ
|
|
|
48
48
|
size: properties.size,
|
|
49
49
|
buttonStyle: properties.buttonStyle ? properties.buttonStyle : 'solid',
|
|
50
50
|
onChange: (event)=>{
|
|
51
|
-
|
|
51
|
+
const value = type.isPrimitive(uniqueValueOptions[event.target.value]) ? uniqueValueOptions[event.target.value] : uniqueValueOptions[event.target.value].value;
|
|
52
|
+
methods.setValue(value);
|
|
52
53
|
methods.triggerEvent({
|
|
53
|
-
name: 'onChange'
|
|
54
|
+
name: 'onChange',
|
|
55
|
+
event: {
|
|
56
|
+
value
|
|
57
|
+
}
|
|
54
58
|
});
|
|
55
59
|
},
|
|
56
60
|
value: type.isNone(value) ? undefined : getValueIndex(value, properties.options || [])
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
const locator = (page, blockId)=>page.locator(`#${blockId}_input`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
do: {
|
|
21
|
+
select: (page, blockId, text)=>locator(page, blockId).locator('.ant-radio-button-wrapper').filter({
|
|
22
|
+
hasText: text
|
|
23
|
+
}).click()
|
|
24
|
+
},
|
|
25
|
+
expect: {
|
|
26
|
+
value: (page, blockId, text)=>expect(locator(page, blockId).locator('.ant-radio-button-wrapper-checked').filter({
|
|
27
|
+
hasText: text
|
|
28
|
+
})).toBeVisible()
|
|
29
|
+
}
|
|
30
|
+
});
|
|
@@ -0,0 +1,214 @@
|
|
|
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
|
+
buttonStyle: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
enum: [
|
|
24
|
+
'solid',
|
|
25
|
+
'outline'
|
|
26
|
+
],
|
|
27
|
+
default: 'solid',
|
|
28
|
+
description: 'Style of the selected option button.'
|
|
29
|
+
},
|
|
30
|
+
color: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'Selected button color.',
|
|
33
|
+
docs: {
|
|
34
|
+
displayType: 'color'
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
disabled: {
|
|
38
|
+
type: 'boolean',
|
|
39
|
+
default: false,
|
|
40
|
+
description: 'Disable the block if true.'
|
|
41
|
+
},
|
|
42
|
+
inputStyle: {
|
|
43
|
+
type: 'object',
|
|
44
|
+
description: 'Css style to applied to input.',
|
|
45
|
+
docs: {
|
|
46
|
+
displayType: 'yaml'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
options: {
|
|
50
|
+
default: [],
|
|
51
|
+
oneOf: [
|
|
52
|
+
{
|
|
53
|
+
type: 'array',
|
|
54
|
+
description: 'Options can either be an array of primitive values, on an array of label, value pairs - supports html.',
|
|
55
|
+
items: {
|
|
56
|
+
type: 'string'
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
type: 'array',
|
|
61
|
+
description: 'Options can either be an array of primitive values, on an array of label, value pairs.',
|
|
62
|
+
items: {
|
|
63
|
+
type: 'number'
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
type: 'array',
|
|
68
|
+
description: 'Options can either be an array of primitive values, on an array of label, value pairs.',
|
|
69
|
+
items: {
|
|
70
|
+
type: 'boolean'
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: 'array',
|
|
75
|
+
description: 'Options can either be an array of primitive values, on an array of label, value pairs.',
|
|
76
|
+
items: {
|
|
77
|
+
type: 'object',
|
|
78
|
+
required: [
|
|
79
|
+
'value'
|
|
80
|
+
],
|
|
81
|
+
properties: {
|
|
82
|
+
label: {
|
|
83
|
+
type: 'string',
|
|
84
|
+
description: 'Value label shown to user - supports html.'
|
|
85
|
+
},
|
|
86
|
+
value: {
|
|
87
|
+
description: 'Value selected. Can be of any type.',
|
|
88
|
+
oneOf: [
|
|
89
|
+
{
|
|
90
|
+
type: 'string'
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
type: 'number'
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
type: 'boolean'
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
type: 'object'
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
type: 'array'
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
docs: {
|
|
106
|
+
displayType: 'yaml'
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
disabled: {
|
|
110
|
+
type: 'boolean',
|
|
111
|
+
default: false,
|
|
112
|
+
description: 'Disable the option if true.'
|
|
113
|
+
},
|
|
114
|
+
style: {
|
|
115
|
+
type: 'object',
|
|
116
|
+
description: 'Css style to applied to option.',
|
|
117
|
+
docs: {
|
|
118
|
+
displayType: 'yaml'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
size: {
|
|
127
|
+
type: 'string',
|
|
128
|
+
enum: [
|
|
129
|
+
'small',
|
|
130
|
+
'default',
|
|
131
|
+
'large'
|
|
132
|
+
],
|
|
133
|
+
default: 'default',
|
|
134
|
+
description: 'Size of the block.'
|
|
135
|
+
},
|
|
136
|
+
label: {
|
|
137
|
+
type: 'object',
|
|
138
|
+
description: 'Label properties.',
|
|
139
|
+
additionalProperties: false,
|
|
140
|
+
properties: {
|
|
141
|
+
align: {
|
|
142
|
+
type: 'string',
|
|
143
|
+
enum: [
|
|
144
|
+
'left',
|
|
145
|
+
'right'
|
|
146
|
+
],
|
|
147
|
+
default: 'left',
|
|
148
|
+
description: 'Align label left or right when inline.'
|
|
149
|
+
},
|
|
150
|
+
colon: {
|
|
151
|
+
type: 'boolean',
|
|
152
|
+
default: true,
|
|
153
|
+
description: 'Append label with colon.'
|
|
154
|
+
},
|
|
155
|
+
extra: {
|
|
156
|
+
type: 'string',
|
|
157
|
+
description: 'Extra text to display beneath the content - supports html.'
|
|
158
|
+
},
|
|
159
|
+
title: {
|
|
160
|
+
type: 'string',
|
|
161
|
+
description: 'Label title - supports html.'
|
|
162
|
+
},
|
|
163
|
+
span: {
|
|
164
|
+
type: 'number',
|
|
165
|
+
description: 'Label inline span.'
|
|
166
|
+
},
|
|
167
|
+
disabled: {
|
|
168
|
+
type: 'boolean',
|
|
169
|
+
default: false,
|
|
170
|
+
description: 'Hide input label.'
|
|
171
|
+
},
|
|
172
|
+
hasFeedback: {
|
|
173
|
+
type: 'boolean',
|
|
174
|
+
default: true,
|
|
175
|
+
description: 'Display feedback extra from validation, this does not disable validation.'
|
|
176
|
+
},
|
|
177
|
+
inline: {
|
|
178
|
+
type: 'boolean',
|
|
179
|
+
default: false,
|
|
180
|
+
description: 'Render input and label inline.'
|
|
181
|
+
},
|
|
182
|
+
extraStyle: {
|
|
183
|
+
type: 'object',
|
|
184
|
+
description: 'Css style to applied to label extra.',
|
|
185
|
+
docs: {
|
|
186
|
+
displayType: 'yaml'
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
feedbackStyle: {
|
|
190
|
+
type: 'object',
|
|
191
|
+
description: 'Css style to applied to label feedback.',
|
|
192
|
+
docs: {
|
|
193
|
+
displayType: 'yaml'
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
title: {
|
|
199
|
+
type: 'string',
|
|
200
|
+
description: 'Title to describe the input component, if no title is specified the block id is displayed - supports html.'
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
events: {
|
|
205
|
+
type: 'object',
|
|
206
|
+
additionalProperties: false,
|
|
207
|
+
properties: {
|
|
208
|
+
onChange: {
|
|
209
|
+
type: 'array',
|
|
210
|
+
description: 'Trigger actions when selection is changed.'
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
};
|