@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,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 } from '@lowdefy/e2e-utils';
|
|
16
|
+
import { expect } from '@playwright/test';
|
|
17
|
+
const locator = (page, blockId)=>page.locator(`#${blockId}_input`);
|
|
18
|
+
const wrapper = (page, blockId)=>page.locator(`#bl-${blockId} .ant-checkbox-wrapper`);
|
|
19
|
+
export default createBlockHelper({
|
|
20
|
+
locator,
|
|
21
|
+
do: {
|
|
22
|
+
check: async (page, blockId)=>{
|
|
23
|
+
if (!await locator(page, blockId).isChecked()) await wrapper(page, blockId).click();
|
|
24
|
+
},
|
|
25
|
+
uncheck: async (page, blockId)=>{
|
|
26
|
+
if (await locator(page, blockId).isChecked()) await wrapper(page, blockId).click();
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
expect: {
|
|
30
|
+
checked: (page, blockId)=>expect(locator(page, blockId)).toBeChecked(),
|
|
31
|
+
unchecked: (page, blockId)=>expect(locator(page, blockId)).not.toBeChecked()
|
|
32
|
+
}
|
|
33
|
+
});
|
|
@@ -0,0 +1,122 @@
|
|
|
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: 'Selected checkbox color.',
|
|
24
|
+
docs: {
|
|
25
|
+
displayType: 'color'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
disabled: {
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
default: false,
|
|
31
|
+
description: 'Disable the block if true.'
|
|
32
|
+
},
|
|
33
|
+
inputStyle: {
|
|
34
|
+
type: 'object',
|
|
35
|
+
description: 'Css style to applied to input.',
|
|
36
|
+
docs: {
|
|
37
|
+
displayType: 'yaml'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
description: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: 'Text to display next to the checkbox - supports html.'
|
|
43
|
+
},
|
|
44
|
+
label: {
|
|
45
|
+
type: 'object',
|
|
46
|
+
description: 'Label properties.',
|
|
47
|
+
additionalProperties: false,
|
|
48
|
+
properties: {
|
|
49
|
+
align: {
|
|
50
|
+
type: 'string',
|
|
51
|
+
enum: [
|
|
52
|
+
'left',
|
|
53
|
+
'right'
|
|
54
|
+
],
|
|
55
|
+
default: 'left',
|
|
56
|
+
description: 'Align label left or right when inline.'
|
|
57
|
+
},
|
|
58
|
+
colon: {
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
default: true,
|
|
61
|
+
description: 'Append label with colon.'
|
|
62
|
+
},
|
|
63
|
+
extra: {
|
|
64
|
+
type: 'string',
|
|
65
|
+
description: 'Extra text to display beneath the content - supports html.'
|
|
66
|
+
},
|
|
67
|
+
title: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
description: 'Label title - supports html.'
|
|
70
|
+
},
|
|
71
|
+
span: {
|
|
72
|
+
type: 'number',
|
|
73
|
+
description: 'Label inline span.'
|
|
74
|
+
},
|
|
75
|
+
disabled: {
|
|
76
|
+
type: 'boolean',
|
|
77
|
+
default: false,
|
|
78
|
+
description: 'Hide input label.'
|
|
79
|
+
},
|
|
80
|
+
hasFeedback: {
|
|
81
|
+
type: 'boolean',
|
|
82
|
+
default: true,
|
|
83
|
+
description: 'Display feedback extra from validation, this does not disable validation.'
|
|
84
|
+
},
|
|
85
|
+
inline: {
|
|
86
|
+
type: 'boolean',
|
|
87
|
+
default: false,
|
|
88
|
+
description: 'Render input and label inline.'
|
|
89
|
+
},
|
|
90
|
+
extraStyle: {
|
|
91
|
+
type: 'object',
|
|
92
|
+
description: 'Css style to applied to label extra.',
|
|
93
|
+
docs: {
|
|
94
|
+
displayType: 'yaml'
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
feedbackStyle: {
|
|
98
|
+
type: 'object',
|
|
99
|
+
description: 'Css style to applied to label feedback.',
|
|
100
|
+
docs: {
|
|
101
|
+
displayType: 'yaml'
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
title: {
|
|
107
|
+
type: 'string',
|
|
108
|
+
description: 'Title to describe the input component, if no title is specified the block id is displayed - supports html.'
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
events: {
|
|
113
|
+
type: 'object',
|
|
114
|
+
additionalProperties: false,
|
|
115
|
+
properties: {
|
|
116
|
+
onChange: {
|
|
117
|
+
type: 'array',
|
|
118
|
+
description: 'Trigger actions when selection is changed.'
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
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-collapse`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
do: {
|
|
21
|
+
expand: (page, blockId, label)=>locator(page, blockId).locator('.ant-collapse-header').filter({
|
|
22
|
+
hasText: label
|
|
23
|
+
}).click(),
|
|
24
|
+
collapse: (page, blockId, label)=>locator(page, blockId).locator('.ant-collapse-header').filter({
|
|
25
|
+
hasText: label
|
|
26
|
+
}).click()
|
|
27
|
+
},
|
|
28
|
+
expect: {
|
|
29
|
+
expanded: (page, blockId, label)=>expect(locator(page, blockId).locator('.ant-collapse-item-active .ant-collapse-header').filter({
|
|
30
|
+
hasText: label
|
|
31
|
+
})).toBeVisible(),
|
|
32
|
+
panelCount: (page, blockId, count)=>expect(locator(page, blockId).locator('.ant-collapse-item')).toHaveCount(count)
|
|
33
|
+
}
|
|
34
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
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
|
+
accordion: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
default: false,
|
|
24
|
+
description: 'If true, only one panel is open at a time.'
|
|
25
|
+
},
|
|
26
|
+
activeKey: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: "Current panel's key."
|
|
29
|
+
},
|
|
30
|
+
bordered: {
|
|
31
|
+
type: 'boolean',
|
|
32
|
+
default: true,
|
|
33
|
+
description: 'Toggles rendering of the border around the collapse block.'
|
|
34
|
+
},
|
|
35
|
+
defaultActiveKey: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
description: "Initial active panel's key, if activeKey is not set."
|
|
38
|
+
},
|
|
39
|
+
destroyInactivePanel: {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
default: false,
|
|
42
|
+
description: 'Destroy inactive panel.'
|
|
43
|
+
},
|
|
44
|
+
expandIcon: {
|
|
45
|
+
type: [
|
|
46
|
+
'string',
|
|
47
|
+
'object'
|
|
48
|
+
],
|
|
49
|
+
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 for expand icon on the right of selector.",
|
|
50
|
+
docs: {
|
|
51
|
+
displayType: 'icon'
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
expandIconPosition: {
|
|
55
|
+
type: 'string',
|
|
56
|
+
enum: [
|
|
57
|
+
'left',
|
|
58
|
+
'right'
|
|
59
|
+
],
|
|
60
|
+
default: 'left',
|
|
61
|
+
description: 'Set position of expand icon.'
|
|
62
|
+
},
|
|
63
|
+
forceRender: {
|
|
64
|
+
type: 'boolean',
|
|
65
|
+
default: 'false',
|
|
66
|
+
description: 'Force render for all panels.'
|
|
67
|
+
},
|
|
68
|
+
panels: {
|
|
69
|
+
type: 'array',
|
|
70
|
+
items: {
|
|
71
|
+
type: 'object',
|
|
72
|
+
properties: {
|
|
73
|
+
title: {
|
|
74
|
+
type: 'string',
|
|
75
|
+
description: 'Title of the panel - supports html.'
|
|
76
|
+
},
|
|
77
|
+
key: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
description: 'Key of the panel.'
|
|
80
|
+
},
|
|
81
|
+
extraKey: {
|
|
82
|
+
type: 'string',
|
|
83
|
+
description: 'Key for the extra area of the panel.'
|
|
84
|
+
},
|
|
85
|
+
disabled: {
|
|
86
|
+
type: 'boolean',
|
|
87
|
+
default: false,
|
|
88
|
+
description: 'Disable the panel if true.'
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
showArrow: {
|
|
94
|
+
type: 'boolean',
|
|
95
|
+
default: true,
|
|
96
|
+
description: 'Show expand icon.'
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
events: {
|
|
101
|
+
type: 'object',
|
|
102
|
+
additionalProperties: false,
|
|
103
|
+
properties: {
|
|
104
|
+
onChange: {
|
|
105
|
+
type: 'array',
|
|
106
|
+
description: 'Trigger actions when collapse item is toggled.'
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { createBlockHelper } 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
|
+
author: (page, blockId, text)=>expect(locator(page, blockId).locator('.ant-comment-content-author-name')).toHaveText(text),
|
|
22
|
+
content: (page, blockId, text)=>expect(locator(page, blockId).locator('.ant-comment-content-detail')).toHaveText(text)
|
|
23
|
+
}
|
|
24
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
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
|
+
author: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'Comment author title. Overrides the "author" content area.'
|
|
24
|
+
},
|
|
25
|
+
avatar: {
|
|
26
|
+
oneOf: [
|
|
27
|
+
{
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'Source URL of a avatar image.'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
type: 'object',
|
|
33
|
+
description: 'Avatar block properties.',
|
|
34
|
+
docs: {
|
|
35
|
+
displayType: 'avatar'
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
content: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: 'Comment content. Overrides the "content" content area.'
|
|
43
|
+
},
|
|
44
|
+
datetime: {
|
|
45
|
+
type: [
|
|
46
|
+
'object',
|
|
47
|
+
'string'
|
|
48
|
+
],
|
|
49
|
+
description: 'Comment date and time.',
|
|
50
|
+
docs: {
|
|
51
|
+
displayType: 'string'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
};
|
|
@@ -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
|
+
// ConfirmModal renders via Modal.confirm() as a portal. Ant Design 4 does not
|
|
18
|
+
// forward the id prop to the portal DOM element, so we target the first visible
|
|
19
|
+
// confirm modal.
|
|
20
|
+
const locator = (page, _blockId)=>page.locator('.ant-modal-confirm:visible').first();
|
|
21
|
+
export default createBlockHelper({
|
|
22
|
+
locator,
|
|
23
|
+
do: {
|
|
24
|
+
ok: (page, _blockId)=>locator(page, _blockId).locator('.ant-btn-primary').click(),
|
|
25
|
+
cancel: (page, _blockId)=>locator(page, _blockId).locator('.ant-btn:not(.ant-btn-primary)').click()
|
|
26
|
+
},
|
|
27
|
+
expect: {
|
|
28
|
+
title: (page, _blockId, text)=>expect(locator(page, _blockId).locator('.ant-modal-confirm-title')).toHaveText(text)
|
|
29
|
+
}
|
|
30
|
+
});
|
|
@@ -0,0 +1,148 @@
|
|
|
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
|
+
properties: {
|
|
17
|
+
type: 'object',
|
|
18
|
+
additionalProperties: false,
|
|
19
|
+
properties: {
|
|
20
|
+
title: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'Modal title - supports html.'
|
|
23
|
+
},
|
|
24
|
+
bodyStyle: {
|
|
25
|
+
type: 'object',
|
|
26
|
+
description: 'Css style to applied to modal body.',
|
|
27
|
+
docs: {
|
|
28
|
+
displayType: 'yaml'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
centered: {
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
default: false,
|
|
34
|
+
description: 'Centered Modal.'
|
|
35
|
+
},
|
|
36
|
+
closable: {
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
default: false,
|
|
39
|
+
description: 'Whether a close (x) button is visible on top right of the confirm dialog or not.'
|
|
40
|
+
},
|
|
41
|
+
content: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
description: 'Modal content. Overridden by the "content" content area - supports html.'
|
|
44
|
+
},
|
|
45
|
+
icon: {
|
|
46
|
+
type: [
|
|
47
|
+
'string',
|
|
48
|
+
'object'
|
|
49
|
+
],
|
|
50
|
+
description: "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize modal icon.",
|
|
51
|
+
docs: {
|
|
52
|
+
displayType: 'icon'
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
mask: {
|
|
56
|
+
type: 'boolean',
|
|
57
|
+
default: true,
|
|
58
|
+
description: 'Whether show mask or not.'
|
|
59
|
+
},
|
|
60
|
+
maskClosable: {
|
|
61
|
+
type: 'boolean',
|
|
62
|
+
default: false,
|
|
63
|
+
description: 'Whether to close the modal dialog when the mask (area outside the modal) is clicked.'
|
|
64
|
+
},
|
|
65
|
+
modalStyle: {
|
|
66
|
+
type: 'object',
|
|
67
|
+
description: 'Css style to applied to modal.',
|
|
68
|
+
docs: {
|
|
69
|
+
displayType: 'yaml'
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
okText: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
default: 'Ok',
|
|
75
|
+
description: 'Text of the Ok button.'
|
|
76
|
+
},
|
|
77
|
+
cancelText: {
|
|
78
|
+
type: 'string',
|
|
79
|
+
default: 'Cancel',
|
|
80
|
+
description: 'Text of the Cancel button.'
|
|
81
|
+
},
|
|
82
|
+
okButton: {
|
|
83
|
+
type: 'object',
|
|
84
|
+
description: 'Ok button properties.',
|
|
85
|
+
docs: {
|
|
86
|
+
displayType: 'button'
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
cancelButton: {
|
|
90
|
+
type: 'object',
|
|
91
|
+
description: 'Cancel button properties.',
|
|
92
|
+
docs: {
|
|
93
|
+
displayType: 'button'
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
width: {
|
|
97
|
+
type: [
|
|
98
|
+
'number',
|
|
99
|
+
'string'
|
|
100
|
+
],
|
|
101
|
+
default: 416,
|
|
102
|
+
description: 'Width of the modal dialog.',
|
|
103
|
+
docs: {
|
|
104
|
+
displayType: 'string'
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
zIndex: {
|
|
108
|
+
type: 'number',
|
|
109
|
+
default: 1000,
|
|
110
|
+
description: 'The z-index of the Modal.'
|
|
111
|
+
},
|
|
112
|
+
status: {
|
|
113
|
+
type: 'string',
|
|
114
|
+
enum: [
|
|
115
|
+
'success',
|
|
116
|
+
'error',
|
|
117
|
+
'info',
|
|
118
|
+
'warning',
|
|
119
|
+
'confirm'
|
|
120
|
+
],
|
|
121
|
+
default: 'confirm',
|
|
122
|
+
description: 'Modal status type.'
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
events: {
|
|
127
|
+
type: 'object',
|
|
128
|
+
additionalProperties: false,
|
|
129
|
+
properties: {
|
|
130
|
+
onOk: {
|
|
131
|
+
type: 'array',
|
|
132
|
+
description: 'Trigger actions when Ok button is clicked.'
|
|
133
|
+
},
|
|
134
|
+
onOpen: {
|
|
135
|
+
type: 'array',
|
|
136
|
+
description: 'Trigger actions when confirm modal is opened.'
|
|
137
|
+
},
|
|
138
|
+
onCancel: {
|
|
139
|
+
type: 'array',
|
|
140
|
+
description: 'Trigger actions when Cancel button is clicked.'
|
|
141
|
+
},
|
|
142
|
+
onClose: {
|
|
143
|
+
type: 'array',
|
|
144
|
+
description: 'Triggered after onOk or onCancel actions are completed.'
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
const locator = (page, blockId)=>page.locator(`#bl-${blockId} .ant-layout-content`);
|
|
17
|
+
export default createBlockHelper({
|
|
18
|
+
locator
|
|
19
|
+
});
|
|
@@ -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
|
+
*/ export default {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
properties: {
|
|
21
|
+
style: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
description: 'Css style object to applied to content.',
|
|
24
|
+
docs: {
|
|
25
|
+
displayType: 'yaml'
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
};
|