@lowdefy/blocks-antd 4.0.0-alpha.5 → 4.0.0-alpha.6
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 +5 -4
- package/dist/blocks/Alert/Alert.js +6 -6
- package/dist/blocks/AutoComplete/AutoComplete.js +7 -4
- package/dist/blocks/Avatar/Avatar.js +5 -4
- package/dist/blocks/Badge/Badge.js +5 -4
- package/dist/blocks/Breadcrumb/Breadcrumb.js +7 -8
- package/dist/blocks/Button/Button.js +5 -4
- package/dist/blocks/ButtonSelector/ButtonSelector.js +7 -4
- package/dist/blocks/Card/Card.js +5 -4
- package/dist/blocks/CheckboxSelector/CheckboxSelector.js +7 -4
- package/dist/blocks/CheckboxSwitch/CheckboxSwitch.js +7 -4
- package/dist/blocks/Collapse/Collapse.js +6 -6
- package/dist/blocks/Comment/Comment.js +6 -6
- package/dist/blocks/ConfirmModal/ConfirmModal.js +7 -8
- package/dist/blocks/Content/Content.js +5 -4
- package/dist/blocks/ControlledList/ControlledList.js +14 -13
- package/dist/blocks/DateRangeSelector/DateRangeSelector.js +7 -4
- package/dist/blocks/DateSelector/DateSelector.js +7 -4
- package/dist/blocks/DateTimeSelector/DateTimeSelector.js +7 -4
- package/dist/blocks/Descriptions/Descriptions.js +6 -6
- package/dist/blocks/Divider/Divider.js +5 -4
- package/dist/blocks/Drawer/Drawer.js +5 -4
- package/dist/blocks/Footer/Footer.js +5 -4
- package/dist/blocks/Header/Header.js +5 -4
- package/dist/blocks/Label/Label.js +16 -11
- package/dist/blocks/Label/labelLogic.js +1 -2
- package/dist/blocks/Layout/Layout.js +5 -4
- package/dist/blocks/Menu/Menu.js +8 -10
- package/dist/blocks/Message/Message.js +6 -6
- package/dist/blocks/MobileMenu/MobileMenu.js +11 -9
- package/dist/blocks/Modal/Modal.js +6 -6
- package/dist/blocks/MonthSelector/MonthSelector.js +7 -4
- package/dist/blocks/MultipleSelector/MultipleSelector.js +11 -6
- package/dist/blocks/Notification/Notification.js +6 -6
- package/dist/blocks/NumberInput/NumberInput.js +7 -4
- package/dist/blocks/PageHCF/PageHCF.js +5 -4
- package/dist/blocks/PageHCSF/PageHCSF.js +5 -4
- package/dist/blocks/PageHSCF/PageHSCF.js +5 -4
- package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +12 -7
- package/dist/blocks/PageSHCF/PageSHCF.js +5 -4
- package/dist/blocks/PageSiderMenu/PageSiderMenu.js +16 -11
- package/dist/blocks/Pagination/Pagination.js +5 -4
- package/dist/blocks/Paragraph/Paragraph.js +5 -4
- package/dist/blocks/ParagraphInput/ParagraphInput.js +5 -4
- package/dist/blocks/PasswordInput/PasswordInput.js +7 -4
- package/dist/blocks/Progress/Progress.js +5 -4
- package/dist/blocks/RadioSelector/RadioSelector.js +7 -4
- package/dist/blocks/RatingSlider/RatingSlider.js +9 -8
- package/dist/blocks/Result/Result.js +5 -4
- package/dist/blocks/S3UploadButton/S3UploadButton.js +9 -7
- package/dist/blocks/Selector/Selector.js +11 -6
- package/dist/blocks/Sider/Sider.js +5 -4
- package/dist/blocks/Statistic/Statistic.js +5 -4
- package/dist/blocks/Switch/Switch.js +9 -8
- package/dist/blocks/Tabs/Tabs.js +6 -6
- package/dist/blocks/TextArea/TextArea.js +7 -4
- package/dist/blocks/TextInput/TextInput.js +7 -4
- package/dist/blocks/TimelineList/TimelineList.js +7 -8
- package/dist/blocks/Title/Title.js +5 -4
- package/dist/blocks/TitleInput/TitleInput.js +5 -4
- package/dist/blocks/Tooltip/Tooltip.js +5 -4
- package/dist/blocks/WeekSelector/WeekSelector.js +7 -4
- package/dist/disabledDate.js +1 -2
- package/dist/types.js +5 -3
- package/package.json +14 -9
|
@@ -38,9 +38,10 @@ const AffixBlock = ({ blockId , content , methods , properties , rename })=>/*#
|
|
|
38
38
|
AffixBlock.defaultProps = blockDefaultProps;
|
|
39
39
|
AffixBlock.meta = {
|
|
40
40
|
category: 'container',
|
|
41
|
-
loading: false
|
|
41
|
+
loading: false,
|
|
42
|
+
icons: [],
|
|
43
|
+
styles: [
|
|
44
|
+
'blocks/Affix/style.less'
|
|
45
|
+
]
|
|
42
46
|
};
|
|
43
|
-
AffixBlock.styles = [
|
|
44
|
-
'blocks/Affix/style.less'
|
|
45
|
-
];
|
|
46
47
|
export default AffixBlock;
|
|
@@ -18,8 +18,7 @@ import { Alert } from 'antd';
|
|
|
18
18
|
import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
|
|
19
19
|
import { type } from '@lowdefy/helpers';
|
|
20
20
|
const AlertBlock = ({ blockId , content , events , components: { Icon } , methods , properties })=>{
|
|
21
|
-
const additionalProps = {
|
|
22
|
-
};
|
|
21
|
+
const additionalProps = {};
|
|
23
22
|
if (properties.icon) {
|
|
24
23
|
additionalProps.icon = /*#__PURE__*/ _jsx(Icon, {
|
|
25
24
|
blockId: `${blockId}_icon`,
|
|
@@ -66,9 +65,10 @@ AlertBlock.meta = {
|
|
|
66
65
|
properties: {
|
|
67
66
|
height: 40
|
|
68
67
|
}
|
|
69
|
-
}
|
|
68
|
+
},
|
|
69
|
+
icons: [],
|
|
70
|
+
styles: [
|
|
71
|
+
'blocks/Alert/style.less'
|
|
72
|
+
]
|
|
70
73
|
};
|
|
71
|
-
AlertBlock.styles = [
|
|
72
|
-
'blocks/Alert/style.less'
|
|
73
|
-
];
|
|
74
74
|
export default AlertBlock;
|
|
@@ -103,9 +103,12 @@ AutoCompleteInput.meta = {
|
|
|
103
103
|
category: 'input',
|
|
104
104
|
loading: {
|
|
105
105
|
type: 'SkeletonInput'
|
|
106
|
-
}
|
|
106
|
+
},
|
|
107
|
+
icons: [
|
|
108
|
+
...Label.meta.icons
|
|
109
|
+
],
|
|
110
|
+
styles: [
|
|
111
|
+
'blocks/AutoComplete/style.less'
|
|
112
|
+
]
|
|
107
113
|
};
|
|
108
|
-
AutoCompleteInput.styles = [
|
|
109
|
-
'blocks/AutoComplete/style.less'
|
|
110
|
-
];
|
|
111
114
|
export default AutoCompleteInput;
|
|
@@ -47,9 +47,10 @@ AvatarBlock.meta = {
|
|
|
47
47
|
category: 'display',
|
|
48
48
|
loading: {
|
|
49
49
|
type: 'SkeletonAvatar'
|
|
50
|
-
}
|
|
50
|
+
},
|
|
51
|
+
icons: [],
|
|
52
|
+
styles: [
|
|
53
|
+
'blocks/Avatar/style.less'
|
|
54
|
+
]
|
|
51
55
|
};
|
|
52
|
-
AvatarBlock.styles = [
|
|
53
|
-
'blocks/Avatar/style.less'
|
|
54
|
-
];
|
|
55
56
|
export default AvatarBlock;
|
|
@@ -39,9 +39,10 @@ const BadgeBlock = ({ blockId , events , content , components: { Icon } , prope
|
|
|
39
39
|
BadgeBlock.defaultProps = blockDefaultProps;
|
|
40
40
|
BadgeBlock.meta = {
|
|
41
41
|
category: 'container',
|
|
42
|
-
loading: false
|
|
42
|
+
loading: false,
|
|
43
|
+
icons: [],
|
|
44
|
+
styles: [
|
|
45
|
+
'blocks/Badge/style.less'
|
|
46
|
+
]
|
|
43
47
|
};
|
|
44
|
-
BadgeBlock.styles = [
|
|
45
|
-
'blocks/Badge/style.less'
|
|
46
|
-
];
|
|
47
48
|
export default BadgeBlock;
|
|
@@ -70,12 +70,10 @@ const BreadcrumbBlock = ({ basePath , blockId , events , components: { Icon , Li
|
|
|
70
70
|
events: events,
|
|
71
71
|
properties: {
|
|
72
72
|
name: type.isString(link.icon) && link.icon,
|
|
73
|
-
...type.isObject(link.icon) ? link.icon : {
|
|
74
|
-
},
|
|
73
|
+
...type.isObject(link.icon) ? link.icon : {},
|
|
75
74
|
style: {
|
|
76
75
|
paddingRight: 8,
|
|
77
|
-
...link.icon.style || {
|
|
78
|
-
}
|
|
76
|
+
...link.icon.style || {}
|
|
79
77
|
}
|
|
80
78
|
}
|
|
81
79
|
}),
|
|
@@ -94,9 +92,10 @@ BreadcrumbBlock.meta = {
|
|
|
94
92
|
properties: {
|
|
95
93
|
lines: 1
|
|
96
94
|
}
|
|
97
|
-
}
|
|
95
|
+
},
|
|
96
|
+
icons: [],
|
|
97
|
+
styles: [
|
|
98
|
+
'blocks/Breadcrumb/style.less'
|
|
99
|
+
]
|
|
98
100
|
};
|
|
99
|
-
BreadcrumbBlock.styles = [
|
|
100
|
-
'blocks/Breadcrumb/style.less'
|
|
101
|
-
];
|
|
102
101
|
export default BreadcrumbBlock;
|
|
@@ -70,9 +70,10 @@ ButtonBlock.meta = {
|
|
|
70
70
|
category: 'display',
|
|
71
71
|
loading: {
|
|
72
72
|
type: 'SkeletonButton'
|
|
73
|
-
}
|
|
73
|
+
},
|
|
74
|
+
icons: [],
|
|
75
|
+
styles: [
|
|
76
|
+
'blocks/Button/style.less'
|
|
77
|
+
]
|
|
74
78
|
};
|
|
75
|
-
ButtonBlock.styles = [
|
|
76
|
-
'blocks/Button/style.less'
|
|
77
|
-
];
|
|
78
79
|
export default ButtonBlock;
|
|
@@ -87,9 +87,12 @@ ButtonSelector.meta = {
|
|
|
87
87
|
category: 'input',
|
|
88
88
|
loading: {
|
|
89
89
|
type: 'SkeletonInput'
|
|
90
|
-
}
|
|
90
|
+
},
|
|
91
|
+
icons: [
|
|
92
|
+
...Label.meta.icons
|
|
93
|
+
],
|
|
94
|
+
styles: [
|
|
95
|
+
'blocks/ButtonSelector/style.less'
|
|
96
|
+
]
|
|
91
97
|
};
|
|
92
|
-
ButtonSelector.styles = [
|
|
93
|
-
'blocks/ButtonSelector/style.less'
|
|
94
|
-
];
|
|
95
98
|
export default ButtonSelector;
|
package/dist/blocks/Card/Card.js
CHANGED
|
@@ -94,9 +94,12 @@ CheckboxSelector.meta = {
|
|
|
94
94
|
category: 'input',
|
|
95
95
|
loading: {
|
|
96
96
|
type: 'SkeletonInput'
|
|
97
|
-
}
|
|
97
|
+
},
|
|
98
|
+
icons: [
|
|
99
|
+
...Label.meta.icons
|
|
100
|
+
],
|
|
101
|
+
styles: [
|
|
102
|
+
'blocks/CheckboxSelector/style.less'
|
|
103
|
+
]
|
|
98
104
|
};
|
|
99
|
-
CheckboxSelector.styles = [
|
|
100
|
-
'blocks/CheckboxSelector/style.less'
|
|
101
|
-
];
|
|
102
105
|
export default CheckboxSelector;
|
|
@@ -70,9 +70,12 @@ CheckboxSwitch.meta = {
|
|
|
70
70
|
category: 'input',
|
|
71
71
|
loading: {
|
|
72
72
|
type: 'SkeletonInput'
|
|
73
|
-
}
|
|
73
|
+
},
|
|
74
|
+
icons: [
|
|
75
|
+
...Label.meta.icons
|
|
76
|
+
],
|
|
77
|
+
styles: [
|
|
78
|
+
'blocks/CheckboxSwitch/style.less'
|
|
79
|
+
]
|
|
74
80
|
};
|
|
75
|
-
CheckboxSwitch.styles = [
|
|
76
|
-
'blocks/CheckboxSwitch/style.less'
|
|
77
|
-
];
|
|
78
81
|
export default CheckboxSwitch;
|
|
@@ -23,8 +23,7 @@ const CollapseBlock = ({ blockId , events , content , components: { Icon } , me
|
|
|
23
23
|
title: key
|
|
24
24
|
})
|
|
25
25
|
);
|
|
26
|
-
const additionalProps = {
|
|
27
|
-
};
|
|
26
|
+
const additionalProps = {};
|
|
28
27
|
if (properties.activeKey) {
|
|
29
28
|
additionalProps.activeKey = properties.activeKey;
|
|
30
29
|
}
|
|
@@ -80,9 +79,10 @@ CollapseBlock.meta = {
|
|
|
80
79
|
properties: {
|
|
81
80
|
height: 80
|
|
82
81
|
}
|
|
83
|
-
}
|
|
82
|
+
},
|
|
83
|
+
icons: [],
|
|
84
|
+
styles: [
|
|
85
|
+
'blocks/Collapse/style.less'
|
|
86
|
+
]
|
|
84
87
|
};
|
|
85
|
-
CollapseBlock.styles = [
|
|
86
|
-
'blocks/Collapse/style.less'
|
|
87
|
-
];
|
|
88
88
|
export default CollapseBlock;
|
|
@@ -19,8 +19,7 @@ import { type } from '@lowdefy/helpers';
|
|
|
19
19
|
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
20
20
|
import Avatar from '../Avatar/Avatar.js';
|
|
21
21
|
const CommentBlock = ({ blockId , components , content , properties , methods })=>{
|
|
22
|
-
let avatar = {
|
|
23
|
-
};
|
|
22
|
+
let avatar = {};
|
|
24
23
|
if (type.isObject(properties.avatar)) {
|
|
25
24
|
avatar = properties.avatar;
|
|
26
25
|
} else if (type.isString(properties.avatar)) {
|
|
@@ -53,9 +52,10 @@ CommentBlock.meta = {
|
|
|
53
52
|
category: 'container',
|
|
54
53
|
loading: {
|
|
55
54
|
type: 'SkeletonParagraph'
|
|
56
|
-
}
|
|
55
|
+
},
|
|
56
|
+
icons: [],
|
|
57
|
+
styles: [
|
|
58
|
+
'blocks/Comment/style.less'
|
|
59
|
+
]
|
|
57
60
|
};
|
|
58
|
-
CommentBlock.styles = [
|
|
59
|
-
'blocks/Comment/style.less'
|
|
60
|
-
];
|
|
61
61
|
export default CommentBlock;
|
|
@@ -18,10 +18,8 @@ import { Modal } from 'antd';
|
|
|
18
18
|
import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
|
|
19
19
|
const ConfirmModal = ({ blockId , events , content , components: { Icon } , methods , properties })=>{
|
|
20
20
|
useEffect(()=>{
|
|
21
|
-
methods.registerMethod('open', (args = {
|
|
22
|
-
|
|
23
|
-
const additionalProps = {
|
|
24
|
-
};
|
|
21
|
+
methods.registerMethod('open', (args = {})=>{
|
|
22
|
+
const additionalProps = {};
|
|
25
23
|
if (properties.icon) {
|
|
26
24
|
additionalProps.icon = /*#__PURE__*/ _jsx(Icon, {
|
|
27
25
|
blockId: `${blockId}_icon`,
|
|
@@ -77,9 +75,10 @@ const ConfirmModal = ({ blockId , events , content , components: { Icon } , met
|
|
|
77
75
|
ConfirmModal.defaultProps = blockDefaultProps;
|
|
78
76
|
ConfirmModal.meta = {
|
|
79
77
|
category: 'container',
|
|
80
|
-
loading: false
|
|
78
|
+
loading: false,
|
|
79
|
+
icons: [],
|
|
80
|
+
styles: [
|
|
81
|
+
'blocks/ConfirmModal/style.less'
|
|
82
|
+
]
|
|
81
83
|
};
|
|
82
|
-
ConfirmModal.styles = [
|
|
83
|
-
'blocks/ConfirmModal/style.less'
|
|
84
|
-
];
|
|
85
84
|
export default ConfirmModal;
|
|
@@ -26,9 +26,10 @@ const ContentBlock = ({ blockId , content , methods , properties })=>/*#__PURE_
|
|
|
26
26
|
ContentBlock.defaultProps = blockDefaultProps;
|
|
27
27
|
ContentBlock.meta = {
|
|
28
28
|
category: 'container',
|
|
29
|
-
loading: false
|
|
29
|
+
loading: false,
|
|
30
|
+
icons: [],
|
|
31
|
+
styles: [
|
|
32
|
+
'blocks/Content/style.less'
|
|
33
|
+
]
|
|
30
34
|
};
|
|
31
|
-
ContentBlock.styles = [
|
|
32
|
-
'blocks/Content/style.less'
|
|
33
|
-
];
|
|
34
35
|
export default ContentBlock;
|
|
@@ -55,8 +55,7 @@ const ControlledListBlock = ({ blockId , components: { Icon , Link } , events ,
|
|
|
55
55
|
properties.title ? /*#__PURE__*/ _jsx(Typography.Text, {
|
|
56
56
|
strong: true,
|
|
57
57
|
children: properties.title
|
|
58
|
-
}) : /*#__PURE__*/ _jsx("br", {
|
|
59
|
-
}),
|
|
58
|
+
}) : /*#__PURE__*/ _jsx("br", {}),
|
|
60
59
|
properties.addToFront && !properties.hideAddButton && /*#__PURE__*/ _jsx(Button, {
|
|
61
60
|
blockId: `${blockId}_add_button`,
|
|
62
61
|
components: {
|
|
@@ -65,7 +64,7 @@ const ControlledListBlock = ({ blockId , components: { Icon , Link } , events ,
|
|
|
65
64
|
},
|
|
66
65
|
events: events,
|
|
67
66
|
properties: {
|
|
68
|
-
icon: '
|
|
67
|
+
icon: 'AiOutlinePlus',
|
|
69
68
|
size: properties.size,
|
|
70
69
|
title: get(properties, 'addItemButton.title ') || 'Add Item',
|
|
71
70
|
type: 'default',
|
|
@@ -81,8 +80,7 @@ const ControlledListBlock = ({ blockId , components: { Icon , Link } , events ,
|
|
|
81
80
|
properties.footerStyle
|
|
82
81
|
]),
|
|
83
82
|
children: [
|
|
84
|
-
/*#__PURE__*/ _jsx("br", {
|
|
85
|
-
}),
|
|
83
|
+
/*#__PURE__*/ _jsx("br", {}),
|
|
86
84
|
/*#__PURE__*/ _jsx(Button, {
|
|
87
85
|
blockId: `${blockId}_add_button`,
|
|
88
86
|
components: {
|
|
@@ -91,7 +89,7 @@ const ControlledListBlock = ({ blockId , components: { Icon , Link } , events ,
|
|
|
91
89
|
},
|
|
92
90
|
events: events,
|
|
93
91
|
properties: {
|
|
94
|
-
icon: '
|
|
92
|
+
icon: 'AiOutlinePlus',
|
|
95
93
|
size: properties.size,
|
|
96
94
|
title: get(properties, 'addItemButton.title ') || 'Add Item',
|
|
97
95
|
type: 'dashed',
|
|
@@ -117,13 +115,12 @@ const ControlledListBlock = ({ blockId , components: { Icon , Link } , events ,
|
|
|
117
115
|
blockId: `${blockId}_${i}_remove_icon`,
|
|
118
116
|
events: events,
|
|
119
117
|
properties: {
|
|
120
|
-
name: '
|
|
118
|
+
name: 'AiOutlineMinusCircle',
|
|
121
119
|
...properties.removeItemIcon,
|
|
122
120
|
style: {
|
|
123
121
|
paddingLeft: properties.size === 'small' ? 16 : properties.size === 'large' ? 20 : 18,
|
|
124
122
|
fontSize: properties.size === 'small' ? 16 : properties.size === 'large' ? 20 : 18,
|
|
125
|
-
...properties.removeItemIcon && properties.removeItemIcon.style ? properties.removeItemIcon.style : {
|
|
126
|
-
}
|
|
123
|
+
...properties.removeItemIcon && properties.removeItemIcon.style ? properties.removeItemIcon.style : {}
|
|
127
124
|
}
|
|
128
125
|
},
|
|
129
126
|
onClick: ()=>methods.removeItem(i)
|
|
@@ -144,9 +141,13 @@ ControlledListBlock.meta = {
|
|
|
144
141
|
properties: {
|
|
145
142
|
height: 80
|
|
146
143
|
}
|
|
147
|
-
}
|
|
144
|
+
},
|
|
145
|
+
icons: [
|
|
146
|
+
'AiOutlinePlus',
|
|
147
|
+
'AiOutlineMinusCircle'
|
|
148
|
+
],
|
|
149
|
+
styles: [
|
|
150
|
+
'blocks/ControlledList/style.less'
|
|
151
|
+
]
|
|
148
152
|
};
|
|
149
|
-
ControlledListBlock.styles = [
|
|
150
|
-
'blocks/ControlledList/style.less'
|
|
151
|
-
];
|
|
152
153
|
export default ControlledListBlock;
|
|
@@ -102,9 +102,12 @@ DateRangeSelector.meta = {
|
|
|
102
102
|
category: 'input',
|
|
103
103
|
loading: {
|
|
104
104
|
type: 'SkeletonInput'
|
|
105
|
-
}
|
|
105
|
+
},
|
|
106
|
+
icons: [
|
|
107
|
+
...Label.meta.icons
|
|
108
|
+
],
|
|
109
|
+
styles: [
|
|
110
|
+
'blocks/DateRangeSelector/style.less'
|
|
111
|
+
]
|
|
106
112
|
};
|
|
107
|
-
DateRangeSelector.styles = [
|
|
108
|
-
'blocks/DateRangeSelector/style.less'
|
|
109
|
-
];
|
|
110
113
|
export default DateRangeSelector;
|
|
@@ -87,9 +87,12 @@ DateSelector.meta = {
|
|
|
87
87
|
category: 'input',
|
|
88
88
|
loading: {
|
|
89
89
|
type: 'SkeletonInput'
|
|
90
|
-
}
|
|
90
|
+
},
|
|
91
|
+
icons: [
|
|
92
|
+
...Label.meta.icons
|
|
93
|
+
],
|
|
94
|
+
styles: [
|
|
95
|
+
'blocks/DateSelector/style.less'
|
|
96
|
+
]
|
|
91
97
|
};
|
|
92
|
-
DateSelector.styles = [
|
|
93
|
-
'blocks/DateSelector/style.less'
|
|
94
|
-
];
|
|
95
98
|
export default DateSelector;
|
|
@@ -95,9 +95,12 @@ DateTimeSelector.meta = {
|
|
|
95
95
|
category: 'input',
|
|
96
96
|
loading: {
|
|
97
97
|
type: 'SkeletonInput'
|
|
98
|
-
}
|
|
98
|
+
},
|
|
99
|
+
icons: [
|
|
100
|
+
...Label.meta.icons
|
|
101
|
+
],
|
|
102
|
+
styles: [
|
|
103
|
+
'blocks/DateTimeSelector/style.less'
|
|
104
|
+
]
|
|
99
105
|
};
|
|
100
|
-
DateTimeSelector.styles = [
|
|
101
|
-
'blocks/DateTimeSelector/style.less'
|
|
102
|
-
];
|
|
103
106
|
export default DateTimeSelector;
|
|
@@ -50,8 +50,7 @@ const DescriptionsBlock = ({ blockId , content , properties , methods })=>{
|
|
|
50
50
|
};
|
|
51
51
|
}
|
|
52
52
|
const itemOption = (properties.itemOptions || []).find((item)=>row.key === item.key
|
|
53
|
-
) || {
|
|
54
|
-
};
|
|
53
|
+
) || {};
|
|
55
54
|
const value = type.isFunction(itemOption.transformValue) ? itemOption.transformValue(row.value, row, i) : row.value;
|
|
56
55
|
const label = type.isFunction(itemOption.transformLabel) ? itemOption.transformLabel(row.key || row.label, row, i) : row.key || row.label;
|
|
57
56
|
return(/*#__PURE__*/ _jsx(Descriptions.Item, {
|
|
@@ -85,9 +84,10 @@ DescriptionsBlock.meta = {
|
|
|
85
84
|
properties: {
|
|
86
85
|
height: 80
|
|
87
86
|
}
|
|
88
|
-
}
|
|
87
|
+
},
|
|
88
|
+
icons: [],
|
|
89
|
+
styles: [
|
|
90
|
+
'blocks/Descriptions/style.less'
|
|
91
|
+
]
|
|
89
92
|
};
|
|
90
|
-
DescriptionsBlock.styles = [
|
|
91
|
-
'blocks/Descriptions/style.less'
|
|
92
|
-
];
|
|
93
93
|
export default DescriptionsBlock;
|
|
@@ -100,9 +100,10 @@ const DrawerBlock = ({ blockId , content , properties , methods , rename , onClo
|
|
|
100
100
|
DrawerBlock.defaultProps = blockDefaultProps;
|
|
101
101
|
DrawerBlock.meta = {
|
|
102
102
|
category: 'container',
|
|
103
|
-
loading: false
|
|
103
|
+
loading: false,
|
|
104
|
+
icons: [],
|
|
105
|
+
styles: [
|
|
106
|
+
'blocks/Drawer/style.less'
|
|
107
|
+
]
|
|
104
108
|
};
|
|
105
|
-
DrawerBlock.styles = [
|
|
106
|
-
'blocks/Drawer/style.less'
|
|
107
|
-
];
|
|
108
109
|
export default DrawerBlock;
|
|
@@ -31,9 +31,10 @@ const FooterBlock = ({ blockId , content , methods , properties })=>/*#__PURE__
|
|
|
31
31
|
FooterBlock.defaultProps = blockDefaultProps;
|
|
32
32
|
FooterBlock.meta = {
|
|
33
33
|
category: 'container',
|
|
34
|
-
loading: false
|
|
34
|
+
loading: false,
|
|
35
|
+
icons: [],
|
|
36
|
+
styles: [
|
|
37
|
+
'blocks/Footer/style.less'
|
|
38
|
+
]
|
|
35
39
|
};
|
|
36
|
-
FooterBlock.styles = [
|
|
37
|
-
'blocks/Footer/style.less'
|
|
38
|
-
];
|
|
39
40
|
export default FooterBlock;
|
|
@@ -34,9 +34,10 @@ const HeaderBlock = ({ blockId , content , methods , properties })=>/*#__PURE__
|
|
|
34
34
|
HeaderBlock.defaultProps = blockDefaultProps;
|
|
35
35
|
HeaderBlock.meta = {
|
|
36
36
|
category: 'container',
|
|
37
|
-
loading: false
|
|
37
|
+
loading: false,
|
|
38
|
+
icons: [],
|
|
39
|
+
styles: [
|
|
40
|
+
'blocks/Header/style.less'
|
|
41
|
+
]
|
|
38
42
|
};
|
|
39
|
-
HeaderBlock.styles = [
|
|
40
|
-
'blocks/Header/style.less'
|
|
41
|
-
];
|
|
42
43
|
export default HeaderBlock;
|
|
@@ -19,7 +19,7 @@ import React from 'react';
|
|
|
19
19
|
import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
|
|
20
20
|
import { Col, Row } from 'antd';
|
|
21
21
|
import classNames from 'classnames';
|
|
22
|
-
import CSSMotion from 'rc-
|
|
22
|
+
import CSSMotion from 'rc-motion';
|
|
23
23
|
import labelLogic from './labelLogic.js';
|
|
24
24
|
const validationKeyMap = {
|
|
25
25
|
error: 'errors',
|
|
@@ -38,27 +38,26 @@ const Label = ({ blockId , components: { Icon } , content , methods , propertie
|
|
|
38
38
|
if (!iconMap) {
|
|
39
39
|
iconMap = {
|
|
40
40
|
error: ()=>/*#__PURE__*/ _jsx(Icon, {
|
|
41
|
-
properties: "
|
|
41
|
+
properties: "AiFillCloseCircle"
|
|
42
42
|
})
|
|
43
43
|
,
|
|
44
44
|
success: ()=>/*#__PURE__*/ _jsx(Icon, {
|
|
45
|
-
properties: "
|
|
45
|
+
properties: "AiFillCheckCircle"
|
|
46
46
|
})
|
|
47
47
|
,
|
|
48
48
|
validating: ()=>/*#__PURE__*/ _jsx(Icon, {
|
|
49
|
-
properties: "
|
|
49
|
+
properties: "AiOutlineLoading"
|
|
50
50
|
})
|
|
51
51
|
,
|
|
52
52
|
warning: ()=>/*#__PURE__*/ _jsx(Icon, {
|
|
53
|
-
properties: "
|
|
53
|
+
properties: "AiFillExclamationCircle"
|
|
54
54
|
})
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
const IconNode = validation.status && iconMap[validation.status];
|
|
58
58
|
const icon = validation.status && IconNode ? /*#__PURE__*/ _jsx("span", {
|
|
59
59
|
className: "ant-form-item-children-icon",
|
|
60
|
-
children: /*#__PURE__*/ _jsx(IconNode, {
|
|
61
|
-
})
|
|
60
|
+
children: /*#__PURE__*/ _jsx(IconNode, {})
|
|
62
61
|
}) : null;
|
|
63
62
|
return(/*#__PURE__*/ _jsxs(Row, {
|
|
64
63
|
id: blockId,
|
|
@@ -118,9 +117,15 @@ Label.meta = {
|
|
|
118
117
|
category: 'container',
|
|
119
118
|
loading: {
|
|
120
119
|
type: 'SkeletonInput'
|
|
121
|
-
}
|
|
120
|
+
},
|
|
121
|
+
icons: [
|
|
122
|
+
'AiFillCloseCircle',
|
|
123
|
+
'AiFillCheckCircle',
|
|
124
|
+
'AiOutlineLoading',
|
|
125
|
+
'AiFillExclamationCircle'
|
|
126
|
+
],
|
|
127
|
+
styles: [
|
|
128
|
+
'blocks/Label/style.less'
|
|
129
|
+
]
|
|
122
130
|
};
|
|
123
|
-
Label.styles = [
|
|
124
|
-
'blocks/Label/style.less'
|
|
125
|
-
];
|
|
126
131
|
export default Label;
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
import classNames from 'classnames';
|
|
17
17
|
import getWrapperCol from './getWrapperCol.js';
|
|
18
18
|
import getLabelCol from './getLabelCol.js';
|
|
19
|
-
const labelLogic = ({ blockId , content , methods , properties ={
|
|
20
|
-
} , required =false , validation ={
|
|
19
|
+
const labelLogic = ({ blockId , content , methods , properties ={} , required =false , validation ={
|
|
21
20
|
messages: [],
|
|
22
21
|
status: null
|
|
23
22
|
} , })=>{
|
package/dist/blocks/Menu/Menu.js
CHANGED
|
@@ -22,8 +22,7 @@ const getDefaultMenu = (menus, menuId = 'default', links)=>{
|
|
|
22
22
|
if (type.isArray(links)) return links;
|
|
23
23
|
if (!type.isArray(menus)) return [];
|
|
24
24
|
const menu = menus.find((item)=>item.menuId === menuId
|
|
25
|
-
) || menus[0] || {
|
|
26
|
-
};
|
|
25
|
+
) || menus[0] || {};
|
|
27
26
|
return menu.links || [];
|
|
28
27
|
};
|
|
29
28
|
const getTitle = (id, properties, defaultTitle)=>properties && properties.title || defaultTitle || id
|
|
@@ -77,8 +76,7 @@ const MenuComp = ({ basePath , blockId , components: { Icon , Link } , events ,
|
|
|
77
76
|
lineHeight: '64px',
|
|
78
77
|
display: properties.mode === 'horizontal' && 'inline-block'
|
|
79
78
|
};
|
|
80
|
-
const exProps = {
|
|
81
|
-
};
|
|
79
|
+
const exProps = {};
|
|
82
80
|
if (properties.mode === 'inline') {
|
|
83
81
|
exProps.collapsed = properties.collapsed;
|
|
84
82
|
exProps.inlineIndent = properties.inlineIndent;
|
|
@@ -132,8 +130,7 @@ const MenuComp = ({ basePath , blockId , components: { Icon , Link } , events ,
|
|
|
132
130
|
pageId
|
|
133
131
|
]).indexOf(link) !== -1
|
|
134
132
|
)
|
|
135
|
-
) || {
|
|
136
|
-
}).id,
|
|
133
|
+
) || {}).id,
|
|
137
134
|
] || [],
|
|
138
135
|
selectedKeys: properties.selectedKeys || [
|
|
139
136
|
pageId
|
|
@@ -311,9 +308,10 @@ const MenuComp = ({ basePath , blockId , components: { Icon , Link } , events ,
|
|
|
311
308
|
MenuComp.defaultProps = blockDefaultProps;
|
|
312
309
|
MenuComp.meta = {
|
|
313
310
|
category: 'display',
|
|
314
|
-
loading: false
|
|
311
|
+
loading: false,
|
|
312
|
+
icons: [],
|
|
313
|
+
styles: [
|
|
314
|
+
'blocks/Menu/style.less'
|
|
315
|
+
]
|
|
315
316
|
};
|
|
316
|
-
MenuComp.styles = [
|
|
317
|
-
'blocks/Menu/style.less'
|
|
318
|
-
];
|
|
319
317
|
export default MenuComp;
|
|
@@ -19,8 +19,7 @@ import { type } from '@lowdefy/helpers';
|
|
|
19
19
|
import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
|
|
20
20
|
const MessageBlock = ({ blockId , components: { Icon } , events , methods , properties })=>{
|
|
21
21
|
useEffect(()=>{
|
|
22
|
-
methods.registerMethod('open', (args = {
|
|
23
|
-
})=>{
|
|
22
|
+
methods.registerMethod('open', (args = {})=>{
|
|
24
23
|
return message[args.status || properties.status || 'success']({
|
|
25
24
|
id: `${blockId}_message`,
|
|
26
25
|
content: renderHtml({
|
|
@@ -48,9 +47,10 @@ const MessageBlock = ({ blockId , components: { Icon } , events , methods , pro
|
|
|
48
47
|
MessageBlock.defaultProps = blockDefaultProps;
|
|
49
48
|
MessageBlock.meta = {
|
|
50
49
|
category: 'display',
|
|
51
|
-
loading: false
|
|
50
|
+
loading: false,
|
|
51
|
+
icons: [],
|
|
52
|
+
styles: [
|
|
53
|
+
'blocks/Message/style.less'
|
|
54
|
+
]
|
|
52
55
|
};
|
|
53
|
-
MessageBlock.styles = [
|
|
54
|
-
'blocks/Message/style.less'
|
|
55
|
-
];
|
|
56
56
|
export default MessageBlock;
|