@lowdefy/blocks-antd 4.0.0-alpha.1 → 4.0.0-alpha.12
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 +11 -6
- package/dist/blocks/Affix/style.less +1 -1
- package/dist/blocks/Alert/Alert.js +28 -10
- package/dist/blocks/Alert/style.less +1 -1
- package/dist/blocks/AutoComplete/AutoComplete.js +41 -34
- package/dist/blocks/AutoComplete/style.less +1 -1
- package/dist/blocks/Avatar/Avatar.js +12 -7
- package/dist/blocks/Avatar/schema.json +1 -1
- package/dist/blocks/Avatar/style.less +1 -1
- package/dist/blocks/Badge/Badge.js +12 -7
- package/dist/blocks/Badge/schema.json +1 -1
- package/dist/blocks/Badge/style.less +1 -1
- package/dist/blocks/Breadcrumb/Breadcrumb.js +56 -64
- package/dist/blocks/Breadcrumb/schema.json +1 -1
- package/dist/blocks/Breadcrumb/style.less +1 -1
- package/dist/blocks/Button/Button.js +22 -13
- package/dist/blocks/Button/schema.json +1 -1
- package/dist/blocks/Button/style.less +1 -1
- package/dist/blocks/ButtonSelector/ButtonSelector.js +36 -29
- package/dist/blocks/ButtonSelector/style.less +1 -1
- package/dist/blocks/Card/Card.js +11 -6
- package/dist/blocks/Card/style.less +1 -1
- package/dist/blocks/CheckboxSelector/CheckboxSelector.js +40 -34
- package/dist/blocks/CheckboxSelector/style.less +1 -1
- package/dist/blocks/CheckboxSwitch/CheckboxSwitch.js +21 -15
- package/dist/blocks/CheckboxSwitch/style.less +1 -1
- package/dist/blocks/Collapse/Collapse.js +38 -21
- package/dist/blocks/Collapse/schema.json +1 -1
- package/dist/blocks/Collapse/style.less +1 -1
- package/dist/blocks/Comment/Comment.js +13 -9
- package/dist/blocks/Comment/style.less +1 -1
- package/dist/blocks/ConfirmModal/ConfirmModal.js +28 -10
- package/dist/blocks/ConfirmModal/schema.json +1 -1
- package/dist/blocks/ConfirmModal/style.less +1 -1
- package/dist/blocks/Content/Content.js +11 -6
- package/dist/blocks/Content/style.less +1 -1
- package/dist/blocks/ControlledList/ControlledList.js +61 -63
- package/dist/blocks/ControlledList/style.less +1 -1
- package/dist/blocks/DateRangeSelector/DateRangeSelector.js +55 -50
- package/dist/blocks/DateRangeSelector/schema.json +2 -2
- package/dist/blocks/DateRangeSelector/style.less +1 -1
- package/dist/blocks/DateSelector/DateSelector.js +49 -44
- package/dist/blocks/DateSelector/schema.json +2 -2
- package/dist/blocks/DateSelector/style.less +1 -1
- package/dist/blocks/DateTimeSelector/DateTimeSelector.js +56 -51
- package/dist/blocks/DateTimeSelector/schema.json +2 -2
- package/dist/blocks/DateTimeSelector/style.less +1 -1
- package/dist/blocks/Descriptions/Descriptions.js +42 -38
- package/dist/blocks/Descriptions/style.less +1 -1
- package/dist/blocks/Divider/Divider.js +14 -9
- package/dist/blocks/Divider/style.less +1 -1
- package/dist/blocks/Drawer/Drawer.js +11 -6
- package/dist/blocks/Drawer/style.less +1 -1
- package/dist/blocks/Footer/Footer.js +11 -6
- package/dist/blocks/Footer/style.less +1 -1
- package/dist/blocks/Header/Header.js +11 -9
- package/dist/blocks/Header/schema.json +0 -4
- package/dist/blocks/Header/style.less +1 -1
- package/dist/blocks/Label/Label.js +70 -67
- package/dist/blocks/Label/getLabelCol.js +1 -1
- package/dist/blocks/Label/getWrapperCol.js +1 -1
- package/dist/blocks/Label/labelLogic.js +2 -3
- package/dist/blocks/Label/style.less +1 -1
- package/dist/blocks/Layout/Layout.js +11 -6
- package/dist/blocks/Layout/style.less +1 -1
- package/dist/blocks/Menu/Menu.js +123 -218
- package/dist/blocks/Menu/schema.json +1 -15
- package/dist/blocks/Menu/style.less +1 -1
- package/dist/blocks/Message/Message.js +11 -6
- package/dist/blocks/Message/schema.json +1 -1
- package/dist/blocks/Message/style.less +1 -1
- package/dist/blocks/MobileMenu/MobileMenu.js +85 -85
- package/dist/blocks/MobileMenu/schema.json +1 -15
- package/dist/blocks/MobileMenu/style.less +1 -1
- package/dist/blocks/Modal/Modal.js +76 -60
- package/dist/blocks/Modal/style.less +1 -1
- package/dist/blocks/MonthSelector/MonthSelector.js +47 -42
- package/dist/blocks/MonthSelector/schema.json +2 -2
- package/dist/blocks/MonthSelector/style.less +1 -1
- package/dist/blocks/MultipleSelector/MultipleSelector.js +104 -99
- package/dist/blocks/MultipleSelector/schema.json +6 -6
- package/dist/blocks/MultipleSelector/style.less +1 -1
- package/dist/blocks/Notification/Notification.js +13 -8
- package/dist/blocks/Notification/schema.json +2 -2
- package/dist/blocks/Notification/style.less +1 -1
- package/dist/blocks/NumberInput/NumberInput.js +14 -6
- package/dist/blocks/NumberInput/style.less +1 -1
- package/dist/blocks/PageHCF/PageHCF.js +34 -34
- package/dist/blocks/PageHCF/schema.json +0 -29
- package/dist/blocks/PageHCF/style.less +1 -1
- package/dist/blocks/PageHCSF/PageHCSF.js +61 -66
- package/dist/blocks/PageHCSF/schema.json +0 -30
- package/dist/blocks/PageHCSF/style.less +1 -1
- package/dist/blocks/PageHSCF/PageHSCF.js +61 -66
- package/dist/blocks/PageHSCF/schema.json +0 -30
- package/dist/blocks/PageHSCF/style.less +1 -1
- package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +151 -167
- package/dist/blocks/PageHeaderMenu/schema.json +1 -24
- package/dist/blocks/PageHeaderMenu/style.less +1 -1
- package/dist/blocks/PageSHCF/PageSHCF.js +60 -65
- package/dist/blocks/PageSHCF/schema.json +0 -30
- package/dist/blocks/PageSHCF/style.less +1 -1
- package/dist/blocks/PageSiderMenu/PageSiderMenu.js +258 -285
- package/dist/blocks/PageSiderMenu/schema.json +1 -31
- package/dist/blocks/PageSiderMenu/style.less +1 -1
- package/dist/blocks/Pagination/Pagination.js +17 -5
- package/dist/blocks/Pagination/style.less +1 -1
- package/dist/blocks/Paragraph/Paragraph.js +21 -14
- package/dist/blocks/Paragraph/style.less +1 -1
- package/dist/blocks/ParagraphInput/ParagraphInput.js +22 -14
- package/dist/blocks/ParagraphInput/style.less +1 -1
- package/dist/blocks/PasswordInput/PasswordInput.js +14 -6
- package/dist/blocks/PasswordInput/style.less +1 -1
- package/dist/blocks/Progress/Progress.js +9 -3
- package/dist/blocks/Progress/style.less +1 -1
- package/dist/blocks/RadioSelector/RadioSelector.js +40 -34
- package/dist/blocks/RadioSelector/style.less +1 -1
- package/dist/blocks/RatingSlider/RatingSlider.js +127 -126
- package/dist/blocks/RatingSlider/schema.json +4 -4
- package/dist/blocks/RatingSlider/style.less +1 -1
- package/dist/blocks/Result/Result.js +13 -8
- package/dist/blocks/Result/schema.json +1 -1
- package/dist/blocks/Result/style.less +1 -1
- package/dist/blocks/Selector/Selector.js +96 -91
- package/dist/blocks/Selector/schema.json +4 -4
- package/dist/blocks/Selector/style.less +1 -1
- package/dist/blocks/Sider/Sider.js +12 -9
- package/dist/blocks/Sider/schema.json +0 -7
- package/dist/blocks/Sider/style.less +1 -1
- package/dist/blocks/Statistic/Statistic.js +11 -5
- package/dist/blocks/Statistic/schema.json +2 -2
- package/dist/blocks/Statistic/style.less +1 -1
- package/dist/blocks/Switch/Switch.js +22 -19
- package/dist/blocks/Switch/schema.json +4 -4
- package/dist/blocks/Switch/style.less +1 -1
- package/dist/blocks/Tabs/Tabs.js +36 -24
- package/dist/blocks/Tabs/schema.json +1 -1
- package/dist/blocks/Tabs/style.less +1 -1
- package/dist/blocks/TextArea/TextArea.js +14 -6
- package/dist/blocks/TextArea/style.less +1 -1
- package/dist/blocks/TextInput/TextInput.js +16 -8
- package/dist/blocks/TextInput/schema.json +2 -2
- package/dist/blocks/TextInput/style.less +1 -1
- package/dist/blocks/TimelineList/TimelineList.js +56 -40
- package/dist/blocks/TimelineList/schema.json +4 -1
- package/dist/blocks/TimelineList/style.less +1 -1
- package/dist/blocks/Title/Title.js +21 -14
- package/dist/blocks/Title/style.less +1 -1
- package/dist/blocks/TitleInput/TitleInput.js +22 -14
- package/dist/blocks/TitleInput/style.less +1 -1
- package/dist/blocks/Tooltip/Tooltip.js +11 -9
- package/dist/blocks/Tooltip/style.less +1 -1
- package/dist/blocks/WeekSelector/WeekSelector.js +47 -42
- package/dist/blocks/WeekSelector/schema.json +2 -2
- package/dist/blocks/WeekSelector/style.less +1 -1
- package/dist/blocks.js +74 -0
- package/dist/color.js +1 -1
- package/dist/disabledDate.js +2 -3
- package/dist/getUniqueValues.js +1 -1
- package/dist/getValueIndex.js +1 -1
- package/dist/style.less +1 -1
- package/dist/{blocks/Alert/index.js → types.js} +16 -19
- package/dist/useRunAfterUpdate.js +1 -1
- package/dist/validationExamples.js +1 -1
- package/package.json +27 -23
- package/dist/blocks/Affix/index.js +0 -26
- package/dist/blocks/AutoComplete/index.js +0 -33
- package/dist/blocks/Avatar/index.js +0 -28
- package/dist/blocks/Badge/index.js +0 -26
- package/dist/blocks/Breadcrumb/index.js +0 -31
- package/dist/blocks/Button/index.js +0 -28
- package/dist/blocks/ButtonSelector/index.js +0 -33
- package/dist/blocks/Card/index.js +0 -31
- package/dist/blocks/CheckboxSelector/index.js +0 -33
- package/dist/blocks/CheckboxSwitch/index.js +0 -36
- package/dist/blocks/Collapse/index.js +0 -31
- package/dist/blocks/Comment/index.js +0 -28
- package/dist/blocks/ConfirmModal/index.js +0 -59
- package/dist/blocks/Content/index.js +0 -26
- package/dist/blocks/ControlledList/index.js +0 -36
- package/dist/blocks/DateRangeSelector/index.js +0 -33
- package/dist/blocks/DateSelector/index.js +0 -33
- package/dist/blocks/DateTimeSelector/index.js +0 -33
- package/dist/blocks/Descriptions/index.js +0 -31
- package/dist/blocks/Divider/index.js +0 -31
- package/dist/blocks/Drawer/index.js +0 -41
- package/dist/blocks/Footer/index.js +0 -26
- package/dist/blocks/Header/index.js +0 -26
- package/dist/blocks/Label/index.js +0 -32
- package/dist/blocks/Layout/index.js +0 -31
- package/dist/blocks/Menu/index.js +0 -26
- package/dist/blocks/Message/index.js +0 -53
- package/dist/blocks/MobileMenu/index.js +0 -41
- package/dist/blocks/Modal/index.js +0 -41
- package/dist/blocks/MonthSelector/index.js +0 -33
- package/dist/blocks/MultipleSelector/index.js +0 -33
- package/dist/blocks/Notification/index.js +0 -59
- package/dist/blocks/NumberInput/index.js +0 -33
- package/dist/blocks/PageHCF/index.js +0 -31
- package/dist/blocks/PageHCSF/index.js +0 -46
- package/dist/blocks/PageHSCF/index.js +0 -46
- package/dist/blocks/PageHeaderMenu/index.js +0 -46
- package/dist/blocks/PageSHCF/index.js +0 -46
- package/dist/blocks/PageSiderMenu/index.js +0 -57
- package/dist/blocks/Pagination/index.js +0 -37
- package/dist/blocks/Paragraph/index.js +0 -28
- package/dist/blocks/ParagraphInput/index.js +0 -36
- package/dist/blocks/PasswordInput/index.js +0 -33
- package/dist/blocks/Progress/index.js +0 -31
- package/dist/blocks/RadioSelector/index.js +0 -33
- package/dist/blocks/RatingSlider/index.js +0 -33
- package/dist/blocks/Result/index.js +0 -31
- package/dist/blocks/S3UploadButton/S3UploadButton.js +0 -171
- package/dist/blocks/S3UploadButton/index.js +0 -29
- package/dist/blocks/S3UploadButton/schema.json +0 -83
- package/dist/blocks/S3UploadButton/style.less +0 -18
- package/dist/blocks/Selector/index.js +0 -33
- package/dist/blocks/Sider/index.js +0 -41
- package/dist/blocks/Statistic/index.js +0 -31
- package/dist/blocks/Switch/index.js +0 -33
- package/dist/blocks/Tabs/index.js +0 -31
- package/dist/blocks/TextArea/index.js +0 -33
- package/dist/blocks/TextInput/index.js +0 -33
- package/dist/blocks/TimelineList/index.js +0 -31
- package/dist/blocks/Title/index.js +0 -31
- package/dist/blocks/TitleInput/index.js +0 -39
- package/dist/blocks/Tooltip/index.js +0 -31
- package/dist/blocks/WeekSelector/index.js +0 -33
- package/dist/index.js +0 -152
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -27,7 +26,7 @@ const DescriptionsBlock = ({ blockId , content , properties , methods })=>{
|
|
|
27
26
|
);
|
|
28
27
|
}
|
|
29
28
|
const { makeCssClass } = methods;
|
|
30
|
-
return(/*#__PURE__*/
|
|
29
|
+
return(/*#__PURE__*/ React.createElement(Descriptions, {
|
|
31
30
|
id: blockId,
|
|
32
31
|
bordered: properties.bordered,
|
|
33
32
|
colon: properties.colon,
|
|
@@ -40,42 +39,47 @@ const DescriptionsBlock = ({ blockId , content , properties , methods })=>{
|
|
|
40
39
|
title: renderHtml({
|
|
41
40
|
html: properties.title,
|
|
42
41
|
methods
|
|
43
|
-
}),
|
|
44
|
-
children: dataItem.map((item1, i)=>{
|
|
45
|
-
let row = item1;
|
|
46
|
-
if (type.isPrimitive(item1)) {
|
|
47
|
-
row = {
|
|
48
|
-
value: item1,
|
|
49
|
-
key: item1.toString()
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
const itemOption = (properties.itemOptions || []).find((item)=>row.key === item.key
|
|
53
|
-
) || {
|
|
54
|
-
};
|
|
55
|
-
const value = type.isFunction(itemOption.transformValue) ? itemOption.transformValue(row.value, row, i) : row.value;
|
|
56
|
-
const label = type.isFunction(itemOption.transformLabel) ? itemOption.transformLabel(row.key || row.label, row, i) : row.key || row.label;
|
|
57
|
-
return(/*#__PURE__*/ _jsx(Descriptions.Item, {
|
|
58
|
-
label: renderHtml({
|
|
59
|
-
html: label,
|
|
60
|
-
methods
|
|
61
|
-
}),
|
|
62
|
-
contentStyle: row.contentStyle,
|
|
63
|
-
labelStyle: row.labelStyle,
|
|
64
|
-
span: row.span || (type.isFunction(itemOption.span) ? itemOption.span(row, i) : itemOption.span),
|
|
65
|
-
className: `${makeCssClass([
|
|
66
|
-
{
|
|
67
|
-
whiteSpace: 'pre-wrap'
|
|
68
|
-
},
|
|
69
|
-
type.isFunction(itemOption.style) ? itemOption.style(row, i) : itemOption.style,
|
|
70
|
-
row.style,
|
|
71
|
-
])}`,
|
|
72
|
-
children: renderHtml({
|
|
73
|
-
html: value,
|
|
74
|
-
methods
|
|
75
|
-
})
|
|
76
|
-
}, i));
|
|
77
42
|
})
|
|
78
|
-
})
|
|
43
|
+
}, dataItem.map((item1, i)=>{
|
|
44
|
+
let row = item1;
|
|
45
|
+
if (type.isPrimitive(item1)) {
|
|
46
|
+
row = {
|
|
47
|
+
value: item1,
|
|
48
|
+
key: item1.toString()
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const itemOption = (properties.itemOptions || []).find((item)=>row.key === item.key
|
|
52
|
+
) || {};
|
|
53
|
+
const value = type.isFunction(itemOption.transformValue) ? itemOption.transformValue(row.value, row, i) : row.value;
|
|
54
|
+
const label = type.isFunction(itemOption.transformLabel) ? itemOption.transformLabel(row.key || row.label, row, i) : row.key || row.label;
|
|
55
|
+
return(/*#__PURE__*/ React.createElement(Descriptions.Item, {
|
|
56
|
+
key: i,
|
|
57
|
+
label: renderHtml({
|
|
58
|
+
html: label,
|
|
59
|
+
methods
|
|
60
|
+
}),
|
|
61
|
+
contentStyle: row.contentStyle,
|
|
62
|
+
labelStyle: row.labelStyle,
|
|
63
|
+
span: row.span || (type.isFunction(itemOption.span) ? itemOption.span(row, i) : itemOption.span),
|
|
64
|
+
className: `${makeCssClass([
|
|
65
|
+
{
|
|
66
|
+
whiteSpace: 'pre-wrap'
|
|
67
|
+
},
|
|
68
|
+
type.isFunction(itemOption.style) ? itemOption.style(row, i) : itemOption.style,
|
|
69
|
+
row.style,
|
|
70
|
+
])}`
|
|
71
|
+
}, renderHtml({
|
|
72
|
+
html: value,
|
|
73
|
+
methods
|
|
74
|
+
})));
|
|
75
|
+
})));
|
|
79
76
|
};
|
|
80
77
|
DescriptionsBlock.defaultProps = blockDefaultProps;
|
|
78
|
+
DescriptionsBlock.meta = {
|
|
79
|
+
category: 'container',
|
|
80
|
+
icons: [],
|
|
81
|
+
styles: [
|
|
82
|
+
'blocks/Descriptions/style.less'
|
|
83
|
+
]
|
|
84
|
+
};
|
|
81
85
|
export default DescriptionsBlock;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -16,18 +15,24 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
16
15
|
*/ import React from 'react';
|
|
17
16
|
import { Divider } from 'antd';
|
|
18
17
|
import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
|
|
19
|
-
const DividerBlock = ({ blockId , properties , methods })=>/*#__PURE__*/
|
|
18
|
+
const DividerBlock = ({ blockId , properties , methods })=>/*#__PURE__*/ React.createElement(Divider, {
|
|
20
19
|
id: blockId,
|
|
21
20
|
dashed: properties.dashed,
|
|
22
21
|
orientation: properties.orientation,
|
|
23
22
|
plain: properties.plain,
|
|
24
23
|
style: properties.style,
|
|
25
|
-
type: properties.type
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})
|
|
24
|
+
type: properties.type
|
|
25
|
+
}, renderHtml({
|
|
26
|
+
html: properties.title,
|
|
27
|
+
methods
|
|
28
|
+
}))
|
|
31
29
|
;
|
|
32
30
|
DividerBlock.defaultProps = blockDefaultProps;
|
|
31
|
+
DividerBlock.meta = {
|
|
32
|
+
category: 'display',
|
|
33
|
+
icons: [],
|
|
34
|
+
styles: [
|
|
35
|
+
'blocks/Divider/style.less'
|
|
36
|
+
]
|
|
37
|
+
};
|
|
33
38
|
export default DividerBlock;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -61,7 +60,7 @@ const DrawerBlock = ({ blockId , content , properties , methods , rename , onClo
|
|
|
61
60
|
})
|
|
62
61
|
);
|
|
63
62
|
});
|
|
64
|
-
return(/*#__PURE__*/
|
|
63
|
+
return(/*#__PURE__*/ React.createElement(Drawer, {
|
|
65
64
|
id: blockId,
|
|
66
65
|
closable: properties.closable,
|
|
67
66
|
extra: content.extra && content.extra(),
|
|
@@ -93,9 +92,15 @@ const DrawerBlock = ({ blockId , content , properties , methods , rename , onClo
|
|
|
93
92
|
headerStyle: methods.makeCssClass(properties.headerStyle, true),
|
|
94
93
|
bodyStyle: methods.makeCssClass(properties.bodyStyle, true),
|
|
95
94
|
maskStyle: methods.makeCssClass(properties.maskStyle, true),
|
|
96
|
-
contentWrapperStyle: methods.makeCssClass(properties.contentWrapperStyle, true)
|
|
97
|
-
|
|
98
|
-
}));
|
|
95
|
+
contentWrapperStyle: methods.makeCssClass(properties.contentWrapperStyle, true)
|
|
96
|
+
}, content.content && content.content()));
|
|
99
97
|
};
|
|
100
98
|
DrawerBlock.defaultProps = blockDefaultProps;
|
|
99
|
+
DrawerBlock.meta = {
|
|
100
|
+
category: 'container',
|
|
101
|
+
icons: [],
|
|
102
|
+
styles: [
|
|
103
|
+
'blocks/Drawer/style.less'
|
|
104
|
+
]
|
|
105
|
+
};
|
|
101
106
|
export default DrawerBlock;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -17,16 +16,22 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
17
16
|
import { Layout } from 'antd';
|
|
18
17
|
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
19
18
|
const Footer = Layout.Footer;
|
|
20
|
-
const FooterBlock = ({ blockId , content , methods , properties })=>/*#__PURE__*/
|
|
19
|
+
const FooterBlock = ({ blockId , content , methods , properties })=>/*#__PURE__*/ React.createElement(Footer, {
|
|
21
20
|
id: blockId,
|
|
22
21
|
className: `${methods.makeCssClass([
|
|
23
22
|
{
|
|
24
23
|
margin: 'auto'
|
|
25
24
|
},
|
|
26
25
|
properties.style
|
|
27
|
-
])} hide-on-print
|
|
28
|
-
|
|
29
|
-
})
|
|
26
|
+
])} hide-on-print`
|
|
27
|
+
}, content.content && content.content())
|
|
30
28
|
;
|
|
31
29
|
FooterBlock.defaultProps = blockDefaultProps;
|
|
30
|
+
FooterBlock.meta = {
|
|
31
|
+
category: 'container',
|
|
32
|
+
icons: [],
|
|
33
|
+
styles: [
|
|
34
|
+
'blocks/Footer/style.less'
|
|
35
|
+
]
|
|
36
|
+
};
|
|
32
37
|
export default FooterBlock;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -17,19 +16,22 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
17
16
|
import { Layout } from 'antd';
|
|
18
17
|
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
19
18
|
const Header = Layout.Header;
|
|
20
|
-
const HeaderBlock = ({ blockId , content , methods , properties })=>/*#__PURE__*/
|
|
19
|
+
const HeaderBlock = ({ blockId , content , methods , properties })=>/*#__PURE__*/ React.createElement(Header, {
|
|
21
20
|
id: blockId,
|
|
22
21
|
className: `${methods.makeCssClass([
|
|
23
22
|
{
|
|
24
23
|
backgroundColor: properties.theme === 'light' && '#fff'
|
|
25
24
|
},
|
|
26
|
-
properties.color && {
|
|
27
|
-
backgroundColor: properties.color
|
|
28
|
-
},
|
|
29
25
|
properties.style,
|
|
30
|
-
])} hide-on-print
|
|
31
|
-
|
|
32
|
-
})
|
|
26
|
+
])} hide-on-print`
|
|
27
|
+
}, content.content && content.content())
|
|
33
28
|
;
|
|
34
29
|
HeaderBlock.defaultProps = blockDefaultProps;
|
|
30
|
+
HeaderBlock.meta = {
|
|
31
|
+
category: 'container',
|
|
32
|
+
icons: [],
|
|
33
|
+
styles: [
|
|
34
|
+
'blocks/Header/style.less'
|
|
35
|
+
]
|
|
36
|
+
};
|
|
35
37
|
export default HeaderBlock;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -19,8 +18,22 @@ import React from 'react';
|
|
|
19
18
|
import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
|
|
20
19
|
import { Col, Row } from 'antd';
|
|
21
20
|
import classNames from 'classnames';
|
|
22
|
-
import CSSMotion from 'rc-
|
|
21
|
+
import CSSMotion from 'rc-motion';
|
|
23
22
|
import labelLogic from './labelLogic.js';
|
|
23
|
+
function _extends() {
|
|
24
|
+
_extends = Object.assign || function(target) {
|
|
25
|
+
for(var i = 1; i < arguments.length; i++){
|
|
26
|
+
var source = arguments[i];
|
|
27
|
+
for(var key in source){
|
|
28
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
29
|
+
target[key] = source[key];
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return target;
|
|
34
|
+
};
|
|
35
|
+
return _extends.apply(this, arguments);
|
|
36
|
+
}
|
|
24
37
|
const validationKeyMap = {
|
|
25
38
|
error: 'errors',
|
|
26
39
|
warning: 'warnings'
|
|
@@ -37,81 +50,71 @@ const Label = ({ blockId , components: { Icon } , content , methods , propertie
|
|
|
37
50
|
});
|
|
38
51
|
if (!iconMap) {
|
|
39
52
|
iconMap = {
|
|
40
|
-
error: ()=>/*#__PURE__*/
|
|
41
|
-
properties: "
|
|
53
|
+
error: ()=>/*#__PURE__*/ React.createElement(Icon, {
|
|
54
|
+
properties: "AiFillCloseCircle"
|
|
42
55
|
})
|
|
43
56
|
,
|
|
44
|
-
success: ()=>/*#__PURE__*/
|
|
45
|
-
properties: "
|
|
57
|
+
success: ()=>/*#__PURE__*/ React.createElement(Icon, {
|
|
58
|
+
properties: "AiFillCheckCircle"
|
|
46
59
|
})
|
|
47
60
|
,
|
|
48
|
-
validating: ()=>/*#__PURE__*/
|
|
49
|
-
properties: "
|
|
61
|
+
validating: ()=>/*#__PURE__*/ React.createElement(Icon, {
|
|
62
|
+
properties: "AiOutlineLoading"
|
|
50
63
|
})
|
|
51
64
|
,
|
|
52
|
-
warning: ()=>/*#__PURE__*/
|
|
53
|
-
properties: "
|
|
65
|
+
warning: ()=>/*#__PURE__*/ React.createElement(Icon, {
|
|
66
|
+
properties: "AiFillExclamationCircle"
|
|
54
67
|
})
|
|
55
68
|
};
|
|
56
69
|
}
|
|
57
70
|
const IconNode = validation.status && iconMap[validation.status];
|
|
58
|
-
const icon = validation.status && IconNode ? /*#__PURE__*/
|
|
59
|
-
className: "ant-form-item-children-icon"
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}) : null;
|
|
63
|
-
return(/*#__PURE__*/ _jsxs(Row, {
|
|
71
|
+
const icon = validation.status && IconNode ? /*#__PURE__*/ React.createElement("span", {
|
|
72
|
+
className: "ant-form-item-children-icon"
|
|
73
|
+
}, /*#__PURE__*/ React.createElement(IconNode, null)) : null;
|
|
74
|
+
return(/*#__PURE__*/ React.createElement(Row, {
|
|
64
75
|
id: blockId,
|
|
65
|
-
className: rowClassName
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
visible: showFeedback,
|
|
96
|
-
motionName: "show-help",
|
|
97
|
-
motionAppear: true,
|
|
98
|
-
removeOnLeave: true,
|
|
99
|
-
children: ({ className: motionClassName })=>/*#__PURE__*/ _jsx("div", {
|
|
100
|
-
className: classNames(feedbackClassName, motionClassName),
|
|
101
|
-
children: validation[validationKeyMap[validation.status]] && validation[validationKeyMap[validation.status]].length > 0 && validation[validationKeyMap[validation.status]][0]
|
|
102
|
-
})
|
|
103
|
-
}),
|
|
104
|
-
showExtra && /*#__PURE__*/ _jsx("div", {
|
|
105
|
-
className: extraClassName,
|
|
106
|
-
children: renderHtml({
|
|
107
|
-
html: properties.extra,
|
|
108
|
-
methods
|
|
109
|
-
})
|
|
110
|
-
})
|
|
111
|
-
]
|
|
112
|
-
})
|
|
113
|
-
]
|
|
114
|
-
}));
|
|
76
|
+
className: rowClassName
|
|
77
|
+
}, label && /*#__PURE__*/ React.createElement(Col, _extends({}, labelCol, {
|
|
78
|
+
className: labelColClassName
|
|
79
|
+
}), /*#__PURE__*/ React.createElement("label", {
|
|
80
|
+
htmlFor: `${blockId}_input`,
|
|
81
|
+
className: labelClassName,
|
|
82
|
+
title: label
|
|
83
|
+
}, renderHtml({
|
|
84
|
+
html: label,
|
|
85
|
+
methods
|
|
86
|
+
}))), /*#__PURE__*/ React.createElement(Col, _extends({}, wrapperCol, {
|
|
87
|
+
className: "ant-form-item-control"
|
|
88
|
+
}), /*#__PURE__*/ React.createElement("div", {
|
|
89
|
+
className: "ant-form-item-control-input"
|
|
90
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
91
|
+
className: "ant-form-item-control-input-content"
|
|
92
|
+
}, content.content && content.content()), icon), /*#__PURE__*/ React.createElement(CSSMotion, {
|
|
93
|
+
visible: showFeedback,
|
|
94
|
+
motionName: "show-help",
|
|
95
|
+
motionAppear: true,
|
|
96
|
+
removeOnLeave: true
|
|
97
|
+
}, ({ className: motionClassName })=>/*#__PURE__*/ React.createElement("div", {
|
|
98
|
+
className: classNames(feedbackClassName, motionClassName)
|
|
99
|
+
}, validation[validationKeyMap[validation.status]] && validation[validationKeyMap[validation.status]].length > 0 && validation[validationKeyMap[validation.status]][0])
|
|
100
|
+
), showExtra && /*#__PURE__*/ React.createElement("div", {
|
|
101
|
+
className: extraClassName
|
|
102
|
+
}, renderHtml({
|
|
103
|
+
html: properties.extra,
|
|
104
|
+
methods
|
|
105
|
+
})))));
|
|
115
106
|
};
|
|
116
107
|
Label.defaultProps = blockDefaultProps;
|
|
108
|
+
Label.meta = {
|
|
109
|
+
category: 'container',
|
|
110
|
+
icons: [
|
|
111
|
+
'AiFillCloseCircle',
|
|
112
|
+
'AiFillCheckCircle',
|
|
113
|
+
'AiOutlineLoading',
|
|
114
|
+
'AiFillExclamationCircle'
|
|
115
|
+
],
|
|
116
|
+
styles: [
|
|
117
|
+
'blocks/Label/style.less'
|
|
118
|
+
]
|
|
119
|
+
};
|
|
117
120
|
export default Label;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 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.
|
|
@@ -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
|
} , })=>{
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -16,11 +15,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
16
15
|
*/ import React from 'react';
|
|
17
16
|
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
18
17
|
import { Layout } from 'antd';
|
|
19
|
-
const LayoutBlock = ({ blockId , content , properties , methods })=>/*#__PURE__*/
|
|
18
|
+
const LayoutBlock = ({ blockId , content , properties , methods })=>/*#__PURE__*/ React.createElement(Layout, {
|
|
20
19
|
id: blockId,
|
|
21
|
-
className: methods.makeCssClass(properties.style)
|
|
22
|
-
|
|
23
|
-
})
|
|
20
|
+
className: methods.makeCssClass(properties.style)
|
|
21
|
+
}, content.content && content.content())
|
|
24
22
|
;
|
|
25
23
|
LayoutBlock.defaultProps = blockDefaultProps;
|
|
24
|
+
LayoutBlock.meta = {
|
|
25
|
+
category: 'container',
|
|
26
|
+
icons: [],
|
|
27
|
+
styles: [
|
|
28
|
+
'blocks/Layout/style.less'
|
|
29
|
+
]
|
|
30
|
+
};
|
|
26
31
|
export default LayoutBlock;
|