@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,115 @@
|
|
|
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
|
+
bottom: {
|
|
22
|
+
type: 'number',
|
|
23
|
+
default: 24,
|
|
24
|
+
description: 'Distance from the bottom of the viewport, when placement is bottomRight or bottomLeft (unit: pixels).'
|
|
25
|
+
},
|
|
26
|
+
button: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
description: 'Button object to customized the close button. Triggers onClose event when clicked.',
|
|
29
|
+
docs: {
|
|
30
|
+
displayType: 'button'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
description: {
|
|
34
|
+
type: 'string',
|
|
35
|
+
description: 'The content of notification box - supports html.'
|
|
36
|
+
},
|
|
37
|
+
duration: {
|
|
38
|
+
type: 'number',
|
|
39
|
+
default: 4.5,
|
|
40
|
+
description: 'Time in seconds before Notification is closed. When set to 0 or null, it will never be closed automatically.'
|
|
41
|
+
},
|
|
42
|
+
icon: {
|
|
43
|
+
type: [
|
|
44
|
+
'string',
|
|
45
|
+
'object'
|
|
46
|
+
],
|
|
47
|
+
description: "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize notification icon.",
|
|
48
|
+
docs: {
|
|
49
|
+
displayType: 'icon'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
closeIcon: {
|
|
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 customize close icon.",
|
|
58
|
+
docs: {
|
|
59
|
+
displayType: 'icon'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
message: {
|
|
63
|
+
type: 'string',
|
|
64
|
+
description: 'The title of notification box - supports html.'
|
|
65
|
+
},
|
|
66
|
+
notificationStyle: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
description: 'Css style to applied to notification.',
|
|
69
|
+
docs: {
|
|
70
|
+
displayType: 'yaml'
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
placement: {
|
|
74
|
+
type: 'string',
|
|
75
|
+
enum: [
|
|
76
|
+
'topLeft',
|
|
77
|
+
'topRight',
|
|
78
|
+
'bottomLeft',
|
|
79
|
+
'bottomRight'
|
|
80
|
+
],
|
|
81
|
+
default: 'topRight',
|
|
82
|
+
description: 'Position of Notification.'
|
|
83
|
+
},
|
|
84
|
+
top: {
|
|
85
|
+
type: 'number',
|
|
86
|
+
default: 24,
|
|
87
|
+
description: 'Distance from the top of the viewport, when placement is topRight or topLeft (unit: pixels).'
|
|
88
|
+
},
|
|
89
|
+
status: {
|
|
90
|
+
type: 'string',
|
|
91
|
+
enum: [
|
|
92
|
+
'success',
|
|
93
|
+
'error',
|
|
94
|
+
'info',
|
|
95
|
+
'warning'
|
|
96
|
+
],
|
|
97
|
+
description: 'Notification status type.'
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
events: {
|
|
102
|
+
type: 'object',
|
|
103
|
+
additionalProperties: false,
|
|
104
|
+
properties: {
|
|
105
|
+
onClose: {
|
|
106
|
+
type: 'array',
|
|
107
|
+
description: 'Trigger actions when notification is closed.'
|
|
108
|
+
},
|
|
109
|
+
onClick: {
|
|
110
|
+
type: 'array',
|
|
111
|
+
description: 'Trigger actions when notification is clicked.'
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
@@ -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.
|
|
@@ -56,7 +56,10 @@ const NumberInput = ({ blockId, events, components, loading, methods, properties
|
|
|
56
56
|
onChange: (newVal)=>{
|
|
57
57
|
methods.setValue(newVal);
|
|
58
58
|
methods.triggerEvent({
|
|
59
|
-
name: 'onChange'
|
|
59
|
+
name: 'onChange',
|
|
60
|
+
event: {
|
|
61
|
+
value: newVal
|
|
62
|
+
}
|
|
60
63
|
});
|
|
61
64
|
},
|
|
62
65
|
onPressEnter: ()=>{
|
|
@@ -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, escapeId } from '@lowdefy/e2e-utils';
|
|
16
|
+
import { expect } from '@playwright/test';
|
|
17
|
+
const locator = (page, blockId)=>page.locator(`#${escapeId(blockId)}_input`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
do: {
|
|
21
|
+
fill: (page, blockId, val)=>locator(page, blockId).fill(String(val)),
|
|
22
|
+
clear: (page, blockId)=>locator(page, blockId).clear(),
|
|
23
|
+
pressEnter: (page, blockId)=>locator(page, blockId).press('Enter')
|
|
24
|
+
},
|
|
25
|
+
expect: {
|
|
26
|
+
value: (page, blockId, val)=>expect(locator(page, blockId)).toHaveValue(String(val)),
|
|
27
|
+
placeholder: (page, blockId, text)=>expect(locator(page, blockId)).toHaveAttribute('placeholder', text)
|
|
28
|
+
}
|
|
29
|
+
});
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export default {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
additionalProperties: false,
|
|
20
|
+
properties: {
|
|
21
|
+
autoFocus: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
default: false,
|
|
24
|
+
description: 'Autofocus to the block on page load.'
|
|
25
|
+
},
|
|
26
|
+
bordered: {
|
|
27
|
+
type: 'boolean',
|
|
28
|
+
default: true,
|
|
29
|
+
description: 'Whether or not the number input has a border style.'
|
|
30
|
+
},
|
|
31
|
+
controls: {
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
default: true,
|
|
34
|
+
description: 'Whether or not to show the +- controls.'
|
|
35
|
+
},
|
|
36
|
+
disabled: {
|
|
37
|
+
type: 'boolean',
|
|
38
|
+
default: false,
|
|
39
|
+
description: 'Disable the block if true.'
|
|
40
|
+
},
|
|
41
|
+
formatter: {
|
|
42
|
+
type: 'object',
|
|
43
|
+
description: 'A function specifying the format of the value presented.',
|
|
44
|
+
docs: {
|
|
45
|
+
displayType: 'yaml'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
keyboard: {
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
default: true,
|
|
51
|
+
description: 'If enabled, control input with keyboard up and down.'
|
|
52
|
+
},
|
|
53
|
+
inputStyle: {
|
|
54
|
+
type: 'object',
|
|
55
|
+
description: 'Css style to applied to input.',
|
|
56
|
+
docs: {
|
|
57
|
+
displayType: 'yaml'
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
label: {
|
|
61
|
+
type: 'object',
|
|
62
|
+
description: 'Label properties.',
|
|
63
|
+
additionalProperties: false,
|
|
64
|
+
properties: {
|
|
65
|
+
align: {
|
|
66
|
+
type: 'string',
|
|
67
|
+
enum: [
|
|
68
|
+
'left',
|
|
69
|
+
'right'
|
|
70
|
+
],
|
|
71
|
+
default: 'left',
|
|
72
|
+
description: 'Align label left or right when inline.'
|
|
73
|
+
},
|
|
74
|
+
colon: {
|
|
75
|
+
type: 'boolean',
|
|
76
|
+
default: true,
|
|
77
|
+
description: 'Append label with colon.'
|
|
78
|
+
},
|
|
79
|
+
extra: {
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'Extra text to display beneath the content - supports html.'
|
|
82
|
+
},
|
|
83
|
+
title: {
|
|
84
|
+
type: 'string',
|
|
85
|
+
description: 'Label title - supports html.'
|
|
86
|
+
},
|
|
87
|
+
span: {
|
|
88
|
+
type: 'number',
|
|
89
|
+
description: 'Label inline span.'
|
|
90
|
+
},
|
|
91
|
+
disabled: {
|
|
92
|
+
type: 'boolean',
|
|
93
|
+
default: false,
|
|
94
|
+
description: 'Hide input label.'
|
|
95
|
+
},
|
|
96
|
+
hasFeedback: {
|
|
97
|
+
type: 'boolean',
|
|
98
|
+
default: true,
|
|
99
|
+
description: 'Display feedback extra from validation, this does not disable validation.'
|
|
100
|
+
},
|
|
101
|
+
inline: {
|
|
102
|
+
type: 'boolean',
|
|
103
|
+
default: false,
|
|
104
|
+
description: 'Render input and label inline.'
|
|
105
|
+
},
|
|
106
|
+
extraStyle: {
|
|
107
|
+
type: 'object',
|
|
108
|
+
description: 'Css style to applied to label extra.',
|
|
109
|
+
docs: {
|
|
110
|
+
displayType: 'yaml'
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
feedbackStyle: {
|
|
114
|
+
type: 'object',
|
|
115
|
+
description: 'Css style to applied to label feedback.',
|
|
116
|
+
docs: {
|
|
117
|
+
displayType: 'yaml'
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
min: {
|
|
123
|
+
type: 'number',
|
|
124
|
+
description: 'Minimum value allowed by the block.'
|
|
125
|
+
},
|
|
126
|
+
max: {
|
|
127
|
+
type: 'number',
|
|
128
|
+
description: 'Maximum value allowed by the block.'
|
|
129
|
+
},
|
|
130
|
+
parser: {
|
|
131
|
+
type: 'object',
|
|
132
|
+
description: 'A function specifying the value extracted from the formatter.',
|
|
133
|
+
docs: {
|
|
134
|
+
displayType: 'yaml'
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
placeholder: {
|
|
138
|
+
type: 'string',
|
|
139
|
+
description: 'Placeholder text inside the block to show message before user types input.'
|
|
140
|
+
},
|
|
141
|
+
decimalSeparator: {
|
|
142
|
+
type: 'string',
|
|
143
|
+
default: '.',
|
|
144
|
+
description: 'Separator between number and decimal places.'
|
|
145
|
+
},
|
|
146
|
+
precision: {
|
|
147
|
+
type: 'integer',
|
|
148
|
+
description: 'Precision (number of decimal places) allowed by the block.'
|
|
149
|
+
},
|
|
150
|
+
size: {
|
|
151
|
+
type: 'string',
|
|
152
|
+
enum: [
|
|
153
|
+
'small',
|
|
154
|
+
'default',
|
|
155
|
+
'large'
|
|
156
|
+
],
|
|
157
|
+
default: 'default',
|
|
158
|
+
description: 'Size of the block.'
|
|
159
|
+
},
|
|
160
|
+
step: {
|
|
161
|
+
type: 'number',
|
|
162
|
+
default: 1,
|
|
163
|
+
description: 'The number to which the current value is increased or decreased. It can be an integer or decimal.'
|
|
164
|
+
},
|
|
165
|
+
title: {
|
|
166
|
+
type: 'string',
|
|
167
|
+
description: 'Number input label title - supports html.'
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
events: {
|
|
172
|
+
type: 'object',
|
|
173
|
+
additionalProperties: false,
|
|
174
|
+
properties: {
|
|
175
|
+
onBlur: {
|
|
176
|
+
type: 'array',
|
|
177
|
+
description: 'Trigger action event occurs when number input loses focus.'
|
|
178
|
+
},
|
|
179
|
+
onChange: {
|
|
180
|
+
type: 'array',
|
|
181
|
+
description: 'Trigger action when number input is changed.'
|
|
182
|
+
},
|
|
183
|
+
onFocus: {
|
|
184
|
+
type: 'array',
|
|
185
|
+
description: 'Trigger action when number input gets focus.'
|
|
186
|
+
},
|
|
187
|
+
onPressEnter: {
|
|
188
|
+
type: 'array',
|
|
189
|
+
description: 'Trigger actions when input is focused and enter is pressed.'
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
};
|
|
@@ -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, escapeId } from '@lowdefy/e2e-utils';
|
|
16
|
+
import { expect } from '@playwright/test';
|
|
17
|
+
const locator = (page, blockId)=>page.locator(`#bl-${escapeId(blockId)}`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
do: {
|
|
21
|
+
clickMenuItem: (page, blockId, menuItemText)=>locator(page, blockId).locator('.ant-menu-item').filter({
|
|
22
|
+
hasText: menuItemText
|
|
23
|
+
}).click(),
|
|
24
|
+
clickLogo: (page, blockId)=>locator(page, blockId).locator(`#${escapeId(blockId)}_header`).locator('a').first().click()
|
|
25
|
+
},
|
|
26
|
+
expect: {
|
|
27
|
+
menuItemActive: (page, blockId, menuItemText)=>expect(locator(page, blockId).locator('.ant-menu-item-selected').filter({
|
|
28
|
+
hasText: menuItemText
|
|
29
|
+
})).toBeVisible(),
|
|
30
|
+
menuItemVisible: (page, blockId, menuItemText)=>expect(locator(page, blockId).locator('.ant-menu-item').filter({
|
|
31
|
+
hasText: menuItemText
|
|
32
|
+
})).toBeVisible()
|
|
33
|
+
}
|
|
34
|
+
});
|
|
@@ -0,0 +1,241 @@
|
|
|
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
|
+
logo: {
|
|
22
|
+
type: 'object',
|
|
23
|
+
description: 'Header logo settings.',
|
|
24
|
+
additionalProperties: false,
|
|
25
|
+
properties: {
|
|
26
|
+
src: {
|
|
27
|
+
type: 'string',
|
|
28
|
+
description: 'Header logo source url.'
|
|
29
|
+
},
|
|
30
|
+
srcMobile: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
description: 'Header logo img element for mobile.'
|
|
33
|
+
},
|
|
34
|
+
breakpoint: {
|
|
35
|
+
type: 'number',
|
|
36
|
+
description: 'Header logo breakpoint for switching between mobile and desktop logo.'
|
|
37
|
+
},
|
|
38
|
+
alt: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
default: 'Lowdefy',
|
|
41
|
+
description: 'Header logo alternative text.'
|
|
42
|
+
},
|
|
43
|
+
style: {
|
|
44
|
+
type: 'object',
|
|
45
|
+
description: 'Css style object to apply to logo.',
|
|
46
|
+
docs: {
|
|
47
|
+
displayType: 'yaml'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
header: {
|
|
53
|
+
type: 'object',
|
|
54
|
+
description: 'Header properties.',
|
|
55
|
+
additionalProperties: false,
|
|
56
|
+
properties: {
|
|
57
|
+
theme: {
|
|
58
|
+
type: 'string',
|
|
59
|
+
enum: [
|
|
60
|
+
'light',
|
|
61
|
+
'dark'
|
|
62
|
+
],
|
|
63
|
+
default: 'dark',
|
|
64
|
+
description: 'Header theme color.'
|
|
65
|
+
},
|
|
66
|
+
contentStyle: {
|
|
67
|
+
type: 'object',
|
|
68
|
+
description: 'Header content css style object.',
|
|
69
|
+
docs: {
|
|
70
|
+
displayType: 'yaml'
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
style: {
|
|
74
|
+
type: 'object',
|
|
75
|
+
description: 'Header css style object.',
|
|
76
|
+
docs: {
|
|
77
|
+
displayType: 'yaml'
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
footer: {
|
|
83
|
+
type: 'object',
|
|
84
|
+
description: 'Footer properties.',
|
|
85
|
+
additionalProperties: false,
|
|
86
|
+
properties: {
|
|
87
|
+
style: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
description: 'Footer css style object.',
|
|
90
|
+
docs: {
|
|
91
|
+
displayType: 'yaml'
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
content: {
|
|
97
|
+
type: 'object',
|
|
98
|
+
description: 'Content properties.',
|
|
99
|
+
additionalProperties: false,
|
|
100
|
+
properties: {
|
|
101
|
+
style: {
|
|
102
|
+
type: 'object',
|
|
103
|
+
description: 'Content css style object.',
|
|
104
|
+
docs: {
|
|
105
|
+
displayType: 'yaml'
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
breadcrumb: {
|
|
111
|
+
type: 'object',
|
|
112
|
+
description: 'Breadcrumb properties.',
|
|
113
|
+
properties: {
|
|
114
|
+
separator: {
|
|
115
|
+
type: 'string',
|
|
116
|
+
default: '/',
|
|
117
|
+
description: 'Use a custom separator string.'
|
|
118
|
+
},
|
|
119
|
+
list: {
|
|
120
|
+
type: 'array',
|
|
121
|
+
description: 'List of breadcrumb links.',
|
|
122
|
+
items: {
|
|
123
|
+
type: 'string',
|
|
124
|
+
description: 'Title of the breadcrumb link.'
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
menu: {
|
|
130
|
+
type: 'object',
|
|
131
|
+
description: 'Menu properties.',
|
|
132
|
+
properties: {
|
|
133
|
+
theme: {
|
|
134
|
+
type: 'string',
|
|
135
|
+
enum: [
|
|
136
|
+
'dark',
|
|
137
|
+
'light'
|
|
138
|
+
],
|
|
139
|
+
default: 'dark',
|
|
140
|
+
description: 'Color theme of menu.'
|
|
141
|
+
},
|
|
142
|
+
links: {
|
|
143
|
+
type: 'array',
|
|
144
|
+
items: {
|
|
145
|
+
type: 'object',
|
|
146
|
+
required: [
|
|
147
|
+
'id',
|
|
148
|
+
'type'
|
|
149
|
+
],
|
|
150
|
+
properties: {
|
|
151
|
+
id: {
|
|
152
|
+
type: 'string',
|
|
153
|
+
description: 'Menu item id.'
|
|
154
|
+
},
|
|
155
|
+
pageId: {
|
|
156
|
+
type: 'string',
|
|
157
|
+
description: 'Page to link to.'
|
|
158
|
+
},
|
|
159
|
+
properties: {
|
|
160
|
+
type: 'object',
|
|
161
|
+
description: 'properties from menu item.',
|
|
162
|
+
properties: {
|
|
163
|
+
title: {
|
|
164
|
+
type: 'string',
|
|
165
|
+
description: 'Menu item title.'
|
|
166
|
+
},
|
|
167
|
+
icon: {
|
|
168
|
+
type: [
|
|
169
|
+
'string',
|
|
170
|
+
'object'
|
|
171
|
+
],
|
|
172
|
+
description: "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon on menu item.",
|
|
173
|
+
docs: {
|
|
174
|
+
displayType: 'icon'
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
},
|
|
184
|
+
menuLg: {
|
|
185
|
+
type: 'object',
|
|
186
|
+
description: 'Menu large screen properties. Overwrites menu properties on desktop screen sizes.',
|
|
187
|
+
docs: {
|
|
188
|
+
displayType: 'yaml'
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
menuMd: {
|
|
192
|
+
type: 'object',
|
|
193
|
+
description: 'Mobile menu properties. Overwrites menu properties on mobile screen sizes.',
|
|
194
|
+
docs: {
|
|
195
|
+
displayType: 'yaml'
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
style: {
|
|
199
|
+
type: 'object',
|
|
200
|
+
description: 'Css style object to apply to layout.',
|
|
201
|
+
docs: {
|
|
202
|
+
displayType: 'yaml'
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
events: {
|
|
208
|
+
type: 'object',
|
|
209
|
+
additionalProperties: false,
|
|
210
|
+
properties: {
|
|
211
|
+
onBreadcrumbClick: {
|
|
212
|
+
type: 'array',
|
|
213
|
+
description: 'Trigger action when a breadcrumb item is clicked.'
|
|
214
|
+
},
|
|
215
|
+
onClose: {
|
|
216
|
+
type: 'array',
|
|
217
|
+
description: 'Trigger action when mobile menu is closed.'
|
|
218
|
+
},
|
|
219
|
+
onMenuItemClick: {
|
|
220
|
+
type: 'array',
|
|
221
|
+
description: 'Trigger action when menu item is clicked.'
|
|
222
|
+
},
|
|
223
|
+
onMenuItemSelect: {
|
|
224
|
+
type: 'array',
|
|
225
|
+
description: 'Trigger action when menu item is selected.'
|
|
226
|
+
},
|
|
227
|
+
onOpen: {
|
|
228
|
+
type: 'array',
|
|
229
|
+
description: 'Trigger action when mobile menu is open.'
|
|
230
|
+
},
|
|
231
|
+
onToggleDrawer: {
|
|
232
|
+
type: 'array',
|
|
233
|
+
description: 'Trigger action when mobile menu drawer is toggled.'
|
|
234
|
+
},
|
|
235
|
+
onToggleMenuGroup: {
|
|
236
|
+
type: 'array',
|
|
237
|
+
description: 'Trigger action when mobile menu group is opened.'
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
};
|