@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,28 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2026 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import { createBlockHelper, escapeId } from '@lowdefy/e2e-utils';
|
|
16
|
+
import { expect } from '@playwright/test';
|
|
17
|
+
const locator = (page, blockId)=>page.locator(`#${escapeId(blockId)}_input`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
do: {
|
|
21
|
+
fill: (page, blockId, val)=>locator(page, blockId).fill(val),
|
|
22
|
+
clear: (page, blockId)=>locator(page, blockId).clear()
|
|
23
|
+
},
|
|
24
|
+
expect: {
|
|
25
|
+
value: (page, blockId, val)=>expect(locator(page, blockId)).toHaveValue(val),
|
|
26
|
+
placeholder: (page, blockId, text)=>expect(locator(page, blockId)).toHaveAttribute('placeholder', text)
|
|
27
|
+
}
|
|
28
|
+
});
|
|
@@ -0,0 +1,243 @@
|
|
|
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
|
+
allowClear: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
default: false,
|
|
24
|
+
description: 'Allow the user to clear their input.'
|
|
25
|
+
},
|
|
26
|
+
allowedRegions: {
|
|
27
|
+
type: 'array',
|
|
28
|
+
description: 'List of allowed ISO 3166-1 alpha-2 region codes. If allowedRegions is [] or null, the default list of all regions is used.',
|
|
29
|
+
items: {
|
|
30
|
+
type: 'string'
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
autoFocus: {
|
|
34
|
+
type: 'boolean',
|
|
35
|
+
default: false,
|
|
36
|
+
description: 'Autofocus to the block on page load.'
|
|
37
|
+
},
|
|
38
|
+
bordered: {
|
|
39
|
+
type: 'boolean',
|
|
40
|
+
default: true,
|
|
41
|
+
description: 'Whether or not the text input has a border style.'
|
|
42
|
+
},
|
|
43
|
+
defaultRegion: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: 'The dial code of the default region to be used.'
|
|
46
|
+
},
|
|
47
|
+
disabled: {
|
|
48
|
+
type: 'boolean',
|
|
49
|
+
default: false,
|
|
50
|
+
description: 'Disable the block if true.'
|
|
51
|
+
},
|
|
52
|
+
maxLength: {
|
|
53
|
+
type: 'integer',
|
|
54
|
+
description: 'The max number of input characters.'
|
|
55
|
+
},
|
|
56
|
+
placeholder: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
description: 'Placeholder text inside the block before user types input.'
|
|
59
|
+
},
|
|
60
|
+
prefix: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'Prefix text for the block, priority over $prefix_con.'
|
|
63
|
+
},
|
|
64
|
+
prefixIcon: {
|
|
65
|
+
type: [
|
|
66
|
+
'string',
|
|
67
|
+
'object'
|
|
68
|
+
],
|
|
69
|
+
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 to prefix the text input.",
|
|
70
|
+
docs: {
|
|
71
|
+
displayType: 'icon'
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
inputStyle: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
description: 'Css style to applied to input.',
|
|
77
|
+
docs: {
|
|
78
|
+
displayType: 'yaml'
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
label: {
|
|
82
|
+
type: 'object',
|
|
83
|
+
description: 'Label properties.',
|
|
84
|
+
additionalProperties: false,
|
|
85
|
+
properties: {
|
|
86
|
+
align: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
enum: [
|
|
89
|
+
'left',
|
|
90
|
+
'right'
|
|
91
|
+
],
|
|
92
|
+
default: 'left',
|
|
93
|
+
description: 'Align label left or right when inline.'
|
|
94
|
+
},
|
|
95
|
+
colon: {
|
|
96
|
+
type: 'boolean',
|
|
97
|
+
default: true,
|
|
98
|
+
description: 'Append label with colon.'
|
|
99
|
+
},
|
|
100
|
+
extra: {
|
|
101
|
+
type: 'string',
|
|
102
|
+
description: 'Extra text to display beneath the content - supports html.'
|
|
103
|
+
},
|
|
104
|
+
title: {
|
|
105
|
+
type: 'string',
|
|
106
|
+
description: 'Label title - supports html.'
|
|
107
|
+
},
|
|
108
|
+
span: {
|
|
109
|
+
type: 'number',
|
|
110
|
+
description: 'Label inline span.'
|
|
111
|
+
},
|
|
112
|
+
disabled: {
|
|
113
|
+
type: 'boolean',
|
|
114
|
+
default: false,
|
|
115
|
+
description: 'Hide input label.'
|
|
116
|
+
},
|
|
117
|
+
hasFeedback: {
|
|
118
|
+
type: 'boolean',
|
|
119
|
+
default: true,
|
|
120
|
+
description: 'Display feedback extra from validation, this does not disable validation.'
|
|
121
|
+
},
|
|
122
|
+
inline: {
|
|
123
|
+
type: 'boolean',
|
|
124
|
+
default: false,
|
|
125
|
+
description: 'Render input and label inline.'
|
|
126
|
+
},
|
|
127
|
+
extraStyle: {
|
|
128
|
+
type: 'object',
|
|
129
|
+
description: 'Css style to applied to label extra.',
|
|
130
|
+
docs: {
|
|
131
|
+
displayType: 'yaml'
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
feedbackStyle: {
|
|
135
|
+
type: 'object',
|
|
136
|
+
description: 'Css style to applied to label feedback.',
|
|
137
|
+
docs: {
|
|
138
|
+
displayType: 'yaml'
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
optionsStyle: {
|
|
144
|
+
type: 'object',
|
|
145
|
+
description: 'Css style to applied to option elements.',
|
|
146
|
+
docs: {
|
|
147
|
+
displayType: 'yaml'
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
replaceInput: {
|
|
151
|
+
type: 'object',
|
|
152
|
+
description: 'Regex used to sanitize input.',
|
|
153
|
+
properties: {
|
|
154
|
+
pattern: {
|
|
155
|
+
type: 'string',
|
|
156
|
+
description: 'The regular expression pattern to use to sanitize input.'
|
|
157
|
+
},
|
|
158
|
+
flags: {
|
|
159
|
+
type: 'string',
|
|
160
|
+
description: "The regex flags to use. The default value is 'gm'."
|
|
161
|
+
},
|
|
162
|
+
replacement: {
|
|
163
|
+
type: 'string',
|
|
164
|
+
description: "The string used to replace the input that matches the pattern. The default value is ''."
|
|
165
|
+
}
|
|
166
|
+
},
|
|
167
|
+
docs: {
|
|
168
|
+
displayType: 'yaml'
|
|
169
|
+
}
|
|
170
|
+
},
|
|
171
|
+
selectStyle: {
|
|
172
|
+
type: 'object',
|
|
173
|
+
description: 'Css style to applied to selector.',
|
|
174
|
+
docs: {
|
|
175
|
+
displayType: 'yaml'
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
showArrow: {
|
|
179
|
+
type: 'boolean',
|
|
180
|
+
default: true,
|
|
181
|
+
description: 'Show the suffix icon at the drop-down position of the selector.'
|
|
182
|
+
},
|
|
183
|
+
size: {
|
|
184
|
+
type: 'string',
|
|
185
|
+
enum: [
|
|
186
|
+
'small',
|
|
187
|
+
'middle',
|
|
188
|
+
'large'
|
|
189
|
+
],
|
|
190
|
+
default: 'middle',
|
|
191
|
+
description: 'Size of the block.'
|
|
192
|
+
},
|
|
193
|
+
suffix: {
|
|
194
|
+
type: 'string',
|
|
195
|
+
description: 'Suffix text for the block, priority over suffixIcon.'
|
|
196
|
+
},
|
|
197
|
+
suffixIcon: {
|
|
198
|
+
type: [
|
|
199
|
+
'string',
|
|
200
|
+
'object'
|
|
201
|
+
],
|
|
202
|
+
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 to suffix the text input.",
|
|
203
|
+
docs: {
|
|
204
|
+
displayType: 'icon'
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
title: {
|
|
208
|
+
type: 'string',
|
|
209
|
+
description: 'Title to describe the input component, if no title is specified the block id is displayed - supports html.'
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
events: {
|
|
214
|
+
type: 'object',
|
|
215
|
+
additionalProperties: false,
|
|
216
|
+
properties: {
|
|
217
|
+
onInputChange: {
|
|
218
|
+
type: 'array',
|
|
219
|
+
description: 'Trigger action when text input is changed.'
|
|
220
|
+
},
|
|
221
|
+
onCodeChange: {
|
|
222
|
+
type: 'array',
|
|
223
|
+
description: 'Trigger action when the selector is changed.'
|
|
224
|
+
},
|
|
225
|
+
onChange: {
|
|
226
|
+
type: 'array',
|
|
227
|
+
description: 'Trigger action when the number is changed.'
|
|
228
|
+
},
|
|
229
|
+
onBlur: {
|
|
230
|
+
type: 'array',
|
|
231
|
+
description: 'Trigger action event occurs when input loses focus.'
|
|
232
|
+
},
|
|
233
|
+
onFocus: {
|
|
234
|
+
type: 'array',
|
|
235
|
+
description: 'Trigger action when input gets focus.'
|
|
236
|
+
},
|
|
237
|
+
onPressEnter: {
|
|
238
|
+
type: 'array',
|
|
239
|
+
description: 'Trigger action when enter is pressed while text input is focused.'
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
};
|
|
@@ -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.
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
/* Firefox */
|
|
30
|
-
input[type=number] {
|
|
30
|
+
input[type='number'] {
|
|
31
31
|
-moz-appearance: textfield;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -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
|
+
// Locator targets the trigger wrapper. The overlay is a portal (.ant-popover).
|
|
18
|
+
const locator = (page, blockId)=>page.locator(`#bl-${escapeId(blockId)}`);
|
|
19
|
+
export default createBlockHelper({
|
|
20
|
+
locator,
|
|
21
|
+
do: {
|
|
22
|
+
click: (page, blockId)=>locator(page, blockId).click(),
|
|
23
|
+
hover: (page, blockId)=>locator(page, blockId).hover()
|
|
24
|
+
},
|
|
25
|
+
expect: {
|
|
26
|
+
overlayVisible: (page, _blockId)=>expect(page.locator('.ant-popover')).toBeVisible(),
|
|
27
|
+
overlayHidden: (page, _blockId)=>expect(page.locator('.ant-popover')).toBeHidden()
|
|
28
|
+
}
|
|
29
|
+
});
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
title: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
description: 'Title of the card.'
|
|
24
|
+
},
|
|
25
|
+
color: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
description: 'Popover background color.',
|
|
28
|
+
docs: {
|
|
29
|
+
displayType: 'color'
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
defaultOpen: {
|
|
33
|
+
type: 'boolean',
|
|
34
|
+
description: 'Whether the popover is open by default.',
|
|
35
|
+
default: false
|
|
36
|
+
},
|
|
37
|
+
autoAdjustOverflow: {
|
|
38
|
+
type: 'boolean',
|
|
39
|
+
description: 'Whether to adjust popup placement automatically when popup is off screen',
|
|
40
|
+
default: true
|
|
41
|
+
},
|
|
42
|
+
placement: {
|
|
43
|
+
type: 'string',
|
|
44
|
+
description: 'Placement of the popover.',
|
|
45
|
+
enum: [
|
|
46
|
+
'top',
|
|
47
|
+
'topLeft',
|
|
48
|
+
'topRight',
|
|
49
|
+
'left',
|
|
50
|
+
'leftTop',
|
|
51
|
+
'leftBottom',
|
|
52
|
+
'right',
|
|
53
|
+
'rightTop',
|
|
54
|
+
'rightBottom',
|
|
55
|
+
'bottom',
|
|
56
|
+
'bottomLeft',
|
|
57
|
+
'bottomRight'
|
|
58
|
+
],
|
|
59
|
+
default: 'bottom'
|
|
60
|
+
},
|
|
61
|
+
trigger: {
|
|
62
|
+
type: 'string',
|
|
63
|
+
description: 'Trigger mode which executes the popover.',
|
|
64
|
+
enum: [
|
|
65
|
+
'hover',
|
|
66
|
+
'click',
|
|
67
|
+
'focus'
|
|
68
|
+
],
|
|
69
|
+
default: 'hover'
|
|
70
|
+
},
|
|
71
|
+
zIndex: {
|
|
72
|
+
type: 'number',
|
|
73
|
+
description: 'Z-index of the popover.'
|
|
74
|
+
},
|
|
75
|
+
overlayInnerStyle: {
|
|
76
|
+
type: 'object',
|
|
77
|
+
description: 'Style of overlay inner div.',
|
|
78
|
+
docs: {
|
|
79
|
+
displayType: 'yaml'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
mouseEnterDelay: {
|
|
83
|
+
type: 'number',
|
|
84
|
+
description: 'Delay in milliseconds, before tooltip is shown on mouse enter.',
|
|
85
|
+
default: 0.1
|
|
86
|
+
},
|
|
87
|
+
mouseLeaveDelay: {
|
|
88
|
+
type: 'number',
|
|
89
|
+
description: 'Delay in milliseconds, before tooltip is hidden on mouse leave.',
|
|
90
|
+
default: 0.1
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
events: {
|
|
95
|
+
type: 'object',
|
|
96
|
+
additionalProperties: false,
|
|
97
|
+
properties: {
|
|
98
|
+
onOpenChange: {
|
|
99
|
+
type: 'array',
|
|
100
|
+
description: 'Trigger actions when visibility of the tooltip card is changed.'
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
};
|
|
@@ -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, escapeId } from '@lowdefy/e2e-utils';
|
|
16
|
+
import { expect } from '@playwright/test';
|
|
17
|
+
const locator = (page, blockId)=>page.locator(`#${escapeId(blockId)}`);
|
|
18
|
+
export default createBlockHelper({
|
|
19
|
+
locator,
|
|
20
|
+
expect: {
|
|
21
|
+
percent: (page, blockId, val)=>expect(locator(page, blockId).locator('.ant-progress-bg')).toHaveAttribute('style', new RegExp(`width: ${val}%`))
|
|
22
|
+
}
|
|
23
|
+
});
|
|
@@ -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
|
+
type: {
|
|
22
|
+
type: 'string',
|
|
23
|
+
default: 'line',
|
|
24
|
+
enum: [
|
|
25
|
+
'line',
|
|
26
|
+
'circle',
|
|
27
|
+
'dashboard'
|
|
28
|
+
],
|
|
29
|
+
description: 'Set type of progress display.'
|
|
30
|
+
},
|
|
31
|
+
showInfo: {
|
|
32
|
+
type: 'boolean',
|
|
33
|
+
default: true,
|
|
34
|
+
description: 'Whether to display the progress value and the status icon.'
|
|
35
|
+
},
|
|
36
|
+
percent: {
|
|
37
|
+
type: 'number',
|
|
38
|
+
default: 0,
|
|
39
|
+
description: 'Set the completion percentage.'
|
|
40
|
+
},
|
|
41
|
+
status: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
enum: [
|
|
44
|
+
'success',
|
|
45
|
+
'exception',
|
|
46
|
+
'normal',
|
|
47
|
+
'active'
|
|
48
|
+
],
|
|
49
|
+
default: 'normal',
|
|
50
|
+
description: 'Set the status of the Progress.'
|
|
51
|
+
},
|
|
52
|
+
strokeLinecap: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
default: 'round',
|
|
55
|
+
enum: [
|
|
56
|
+
'round',
|
|
57
|
+
'square'
|
|
58
|
+
],
|
|
59
|
+
description: 'Set the style of the progress linecap.'
|
|
60
|
+
},
|
|
61
|
+
strokeColor: {
|
|
62
|
+
type: [
|
|
63
|
+
'string',
|
|
64
|
+
'object'
|
|
65
|
+
],
|
|
66
|
+
description: 'Color of progress bar.',
|
|
67
|
+
docs: {
|
|
68
|
+
displayType: 'color'
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
success: {
|
|
72
|
+
type: 'number',
|
|
73
|
+
default: 0,
|
|
74
|
+
description: 'Segmented success percent.'
|
|
75
|
+
},
|
|
76
|
+
trailColor: {
|
|
77
|
+
type: 'string',
|
|
78
|
+
description: 'Color of unfilled part.',
|
|
79
|
+
docs: {
|
|
80
|
+
displayType: 'color'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
strokeWidth: {
|
|
84
|
+
type: 'number',
|
|
85
|
+
description: 'Set the width of the progress bar.'
|
|
86
|
+
},
|
|
87
|
+
width: {
|
|
88
|
+
type: 'number',
|
|
89
|
+
default: 132,
|
|
90
|
+
description: 'Set the canvas width of the circular progress.'
|
|
91
|
+
},
|
|
92
|
+
gapDegree: {
|
|
93
|
+
type: 'number',
|
|
94
|
+
default: 75,
|
|
95
|
+
description: 'The gap degree of half circle.'
|
|
96
|
+
},
|
|
97
|
+
gapPosition: {
|
|
98
|
+
type: 'string',
|
|
99
|
+
enum: [
|
|
100
|
+
'top',
|
|
101
|
+
'bottom',
|
|
102
|
+
'left',
|
|
103
|
+
'right'
|
|
104
|
+
],
|
|
105
|
+
default: 'top',
|
|
106
|
+
description: 'The gap position.'
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
};
|
|
@@ -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.
|
|
@@ -49,9 +49,13 @@ const RadioSelector = ({ blockId, components, events, loading, properties, requi
|
|
|
49
49
|
]),
|
|
50
50
|
disabled: properties.disabled || loading,
|
|
51
51
|
onChange: (event)=>{
|
|
52
|
-
|
|
52
|
+
const val = type.isPrimitive(uniqueValueOptions[event.target.value]) ? uniqueValueOptions[event.target.value] : uniqueValueOptions[event.target.value].value;
|
|
53
|
+
methods.setValue(val);
|
|
53
54
|
methods.triggerEvent({
|
|
54
|
-
name: 'onChange'
|
|
55
|
+
name: 'onChange',
|
|
56
|
+
event: {
|
|
57
|
+
value: val
|
|
58
|
+
}
|
|
55
59
|
});
|
|
56
60
|
},
|
|
57
61
|
value: `${getValueIndex(value, uniqueValueOptions)}`
|
|
@@ -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, 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
|
+
select: (page, blockId, text)=>locator(page, blockId).locator('.ant-radio-wrapper').filter({
|
|
22
|
+
hasText: text
|
|
23
|
+
}).click()
|
|
24
|
+
},
|
|
25
|
+
expect: {
|
|
26
|
+
value: (page, blockId, text)=>expect(locator(page, blockId).locator('.ant-radio-wrapper-checked').filter({
|
|
27
|
+
hasText: text
|
|
28
|
+
})).toBeVisible()
|
|
29
|
+
}
|
|
30
|
+
});
|