@lowdefy/blocks-antd 4.0.0-alpha.8 → 4.0.0-alpha.9
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 -2
- package/dist/blocks/Affix/style.less +1 -1
- package/dist/blocks/Alert/Alert.js +1 -7
- package/dist/blocks/Alert/style.less +1 -1
- package/dist/blocks/AutoComplete/AutoComplete.js +2 -6
- package/dist/blocks/AutoComplete/style.less +1 -1
- package/dist/blocks/Avatar/Avatar.js +1 -4
- package/dist/blocks/Avatar/schema.json +1 -1
- package/dist/blocks/Avatar/style.less +1 -1
- package/dist/blocks/Badge/Badge.js +1 -2
- package/dist/blocks/Badge/schema.json +1 -1
- package/dist/blocks/Badge/style.less +1 -1
- package/dist/blocks/Breadcrumb/Breadcrumb.js +1 -7
- package/dist/blocks/Breadcrumb/schema.json +1 -1
- package/dist/blocks/Breadcrumb/style.less +1 -1
- package/dist/blocks/Button/Button.js +8 -7
- package/dist/blocks/Button/schema.json +1 -1
- package/dist/blocks/Button/style.less +1 -1
- package/dist/blocks/ButtonSelector/ButtonSelector.js +2 -6
- package/dist/blocks/ButtonSelector/style.less +1 -1
- package/dist/blocks/Card/Card.js +1 -7
- package/dist/blocks/Card/style.less +1 -1
- package/dist/blocks/CheckboxSelector/CheckboxSelector.js +2 -6
- package/dist/blocks/CheckboxSelector/style.less +1 -1
- package/dist/blocks/CheckboxSwitch/CheckboxSwitch.js +2 -6
- package/dist/blocks/CheckboxSwitch/style.less +1 -1
- package/dist/blocks/Collapse/Collapse.js +1 -7
- package/dist/blocks/Collapse/schema.json +1 -1
- package/dist/blocks/Collapse/style.less +1 -1
- package/dist/blocks/Comment/Comment.js +1 -4
- package/dist/blocks/Comment/style.less +1 -1
- package/dist/blocks/ConfirmModal/ConfirmModal.js +17 -4
- package/dist/blocks/ConfirmModal/schema.json +1 -1
- package/dist/blocks/ConfirmModal/style.less +1 -1
- package/dist/blocks/Content/Content.js +1 -2
- package/dist/blocks/Content/style.less +1 -1
- package/dist/blocks/ControlledList/ControlledList.js +2 -8
- package/dist/blocks/ControlledList/style.less +1 -1
- package/dist/blocks/DateRangeSelector/DateRangeSelector.js +2 -6
- package/dist/blocks/DateRangeSelector/schema.json +1 -1
- package/dist/blocks/DateRangeSelector/style.less +1 -1
- package/dist/blocks/DateSelector/DateSelector.js +3 -7
- package/dist/blocks/DateSelector/schema.json +1 -1
- package/dist/blocks/DateSelector/style.less +1 -1
- package/dist/blocks/DateTimeSelector/DateTimeSelector.js +3 -7
- package/dist/blocks/DateTimeSelector/schema.json +1 -1
- package/dist/blocks/DateTimeSelector/style.less +1 -1
- package/dist/blocks/Descriptions/Descriptions.js +1 -7
- package/dist/blocks/Descriptions/style.less +1 -1
- package/dist/blocks/Divider/Divider.js +1 -7
- package/dist/blocks/Divider/style.less +1 -1
- package/dist/blocks/Drawer/Drawer.js +1 -2
- package/dist/blocks/Drawer/style.less +1 -1
- package/dist/blocks/Footer/Footer.js +1 -2
- package/dist/blocks/Footer/style.less +1 -1
- package/dist/blocks/Header/Header.js +1 -5
- package/dist/blocks/Header/schema.json +0 -4
- package/dist/blocks/Header/style.less +1 -1
- package/dist/blocks/Label/Label.js +1 -4
- 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/style.less +1 -1
- package/dist/blocks/Layout/Layout.js +1 -7
- package/dist/blocks/Layout/style.less +1 -1
- package/dist/blocks/Menu/Menu.js +8 -69
- package/dist/blocks/Menu/schema.json +1 -15
- package/dist/blocks/Menu/style.less +1 -1
- package/dist/blocks/Message/Message.js +1 -2
- package/dist/blocks/Message/schema.json +1 -1
- package/dist/blocks/Message/style.less +1 -1
- package/dist/blocks/MobileMenu/MobileMenu.js +2 -4
- package/dist/blocks/MobileMenu/schema.json +1 -15
- package/dist/blocks/MobileMenu/style.less +1 -1
- package/dist/blocks/Modal/Modal.js +1 -2
- package/dist/blocks/Modal/style.less +1 -1
- package/dist/blocks/MonthSelector/MonthSelector.js +2 -6
- package/dist/blocks/MonthSelector/schema.json +1 -1
- package/dist/blocks/MonthSelector/style.less +1 -1
- package/dist/blocks/MultipleSelector/MultipleSelector.js +2 -6
- package/dist/blocks/MultipleSelector/schema.json +3 -3
- package/dist/blocks/MultipleSelector/style.less +1 -1
- package/dist/blocks/Notification/Notification.js +1 -2
- package/dist/blocks/Notification/schema.json +2 -2
- package/dist/blocks/Notification/style.less +1 -1
- package/dist/blocks/NumberInput/NumberInput.js +2 -6
- package/dist/blocks/NumberInput/style.less +1 -1
- package/dist/blocks/PageHCF/PageHCF.js +1 -7
- package/dist/blocks/PageHCF/schema.json +0 -29
- package/dist/blocks/PageHCF/style.less +1 -1
- package/dist/blocks/PageHCSF/PageHCSF.js +1 -7
- package/dist/blocks/PageHCSF/schema.json +0 -30
- package/dist/blocks/PageHCSF/style.less +1 -1
- package/dist/blocks/PageHSCF/PageHSCF.js +1 -7
- package/dist/blocks/PageHSCF/schema.json +0 -30
- package/dist/blocks/PageHSCF/style.less +1 -1
- package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +2 -9
- package/dist/blocks/PageHeaderMenu/schema.json +1 -24
- package/dist/blocks/PageHeaderMenu/style.less +1 -1
- package/dist/blocks/PageSHCF/PageSHCF.js +1 -7
- package/dist/blocks/PageSHCF/schema.json +0 -30
- package/dist/blocks/PageSHCF/style.less +1 -1
- package/dist/blocks/PageSiderMenu/PageSiderMenu.js +4 -12
- package/dist/blocks/PageSiderMenu/schema.json +1 -31
- package/dist/blocks/PageSiderMenu/style.less +1 -1
- package/dist/blocks/Pagination/Pagination.js +3 -9
- package/dist/blocks/Pagination/style.less +1 -1
- package/dist/blocks/Paragraph/Paragraph.js +1 -4
- package/dist/blocks/Paragraph/style.less +1 -1
- package/dist/blocks/ParagraphInput/ParagraphInput.js +3 -6
- package/dist/blocks/ParagraphInput/style.less +1 -1
- package/dist/blocks/PasswordInput/PasswordInput.js +2 -6
- package/dist/blocks/PasswordInput/style.less +1 -1
- package/dist/blocks/Progress/Progress.js +1 -7
- package/dist/blocks/Progress/style.less +1 -1
- package/dist/blocks/RadioSelector/RadioSelector.js +2 -6
- package/dist/blocks/RadioSelector/style.less +1 -1
- package/dist/blocks/RatingSlider/RatingSlider.js +4 -7
- package/dist/blocks/RatingSlider/schema.json +2 -2
- package/dist/blocks/RatingSlider/style.less +1 -1
- package/dist/blocks/Result/Result.js +1 -7
- package/dist/blocks/Result/schema.json +1 -1
- package/dist/blocks/Result/style.less +1 -1
- package/dist/blocks/Selector/Selector.js +2 -6
- package/dist/blocks/Selector/schema.json +2 -2
- package/dist/blocks/Selector/style.less +1 -1
- package/dist/blocks/Sider/Sider.js +3 -5
- package/dist/blocks/Sider/schema.json +0 -7
- package/dist/blocks/Sider/style.less +1 -1
- package/dist/blocks/Statistic/Statistic.js +1 -7
- package/dist/blocks/Statistic/schema.json +2 -2
- package/dist/blocks/Statistic/style.less +1 -1
- package/dist/blocks/Switch/Switch.js +2 -7
- package/dist/blocks/Switch/schema.json +2 -2
- package/dist/blocks/Switch/style.less +1 -1
- package/dist/blocks/Tabs/Tabs.js +1 -7
- package/dist/blocks/Tabs/schema.json +1 -1
- package/dist/blocks/Tabs/style.less +1 -1
- package/dist/blocks/TextArea/TextArea.js +2 -6
- package/dist/blocks/TextArea/style.less +1 -1
- package/dist/blocks/TextInput/TextInput.js +2 -6
- package/dist/blocks/TextInput/schema.json +2 -2
- package/dist/blocks/TextInput/style.less +1 -1
- package/dist/blocks/TimelineList/TimelineList.js +1 -7
- package/dist/blocks/TimelineList/style.less +1 -1
- package/dist/blocks/Title/Title.js +1 -7
- package/dist/blocks/Title/style.less +1 -1
- package/dist/blocks/TitleInput/TitleInput.js +3 -9
- package/dist/blocks/TitleInput/style.less +1 -1
- package/dist/blocks/Tooltip/Tooltip.js +1 -7
- package/dist/blocks/Tooltip/style.less +1 -1
- package/dist/blocks/WeekSelector/WeekSelector.js +2 -6
- package/dist/blocks/WeekSelector/schema.json +1 -1
- 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/getUniqueValues.js +1 -1
- package/dist/getValueIndex.js +1 -1
- 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 +6 -6
|
@@ -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.
|
|
@@ -36,7 +36,6 @@ const AffixBlock = ({ blockId , content , methods , properties , rename })=>/*#
|
|
|
36
36
|
AffixBlock.defaultProps = blockDefaultProps;
|
|
37
37
|
AffixBlock.meta = {
|
|
38
38
|
category: 'container',
|
|
39
|
-
loading: false,
|
|
40
39
|
icons: [],
|
|
41
40
|
styles: [
|
|
42
41
|
'blocks/Affix/style.less'
|
|
@@ -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.
|
|
@@ -72,12 +72,6 @@ const AlertBlock = ({ blockId , content , events , components: { Icon } , metho
|
|
|
72
72
|
AlertBlock.defaultProps = blockDefaultProps;
|
|
73
73
|
AlertBlock.meta = {
|
|
74
74
|
category: 'container',
|
|
75
|
-
loading: {
|
|
76
|
-
type: 'Skeleton',
|
|
77
|
-
properties: {
|
|
78
|
-
height: 40
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
75
|
icons: [],
|
|
82
76
|
styles: [
|
|
83
77
|
'blocks/Alert/style.less'
|
|
@@ -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.
|
|
@@ -32,7 +32,6 @@ const AutoCompleteInput = ({ blockId , components , events , loading , methods ,
|
|
|
32
32
|
},
|
|
33
33
|
validation: validation,
|
|
34
34
|
required: required,
|
|
35
|
-
loading: loading,
|
|
36
35
|
content: {
|
|
37
36
|
content: ()=>/*#__PURE__*/ React.createElement(AutoComplete, {
|
|
38
37
|
id: `${blockId}_input`,
|
|
@@ -41,7 +40,7 @@ const AutoCompleteInput = ({ blockId , components , events , loading , methods ,
|
|
|
41
40
|
bordered: properties.bordered,
|
|
42
41
|
className: methods.makeCssClass(properties.inputStyle),
|
|
43
42
|
defaultOpen: properties.defaultOpen,
|
|
44
|
-
disabled: properties.disabled,
|
|
43
|
+
disabled: properties.disabled || loading,
|
|
45
44
|
placeholder: properties.placeholder || 'Type or select item',
|
|
46
45
|
allowClear: properties.allowClear !== false,
|
|
47
46
|
size: properties.size,
|
|
@@ -99,9 +98,6 @@ AutoCompleteInput.defaultProps = blockDefaultProps;
|
|
|
99
98
|
AutoCompleteInput.meta = {
|
|
100
99
|
valueType: 'string',
|
|
101
100
|
category: 'input',
|
|
102
|
-
loading: {
|
|
103
|
-
type: 'SkeletonInput'
|
|
104
|
-
},
|
|
105
101
|
icons: [
|
|
106
102
|
...Label.meta.icons
|
|
107
103
|
],
|
|
@@ -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.
|
|
@@ -43,9 +43,6 @@ const AvatarBlock = ({ blockId , events , components: { Icon } , methods , prop
|
|
|
43
43
|
AvatarBlock.defaultProps = blockDefaultProps;
|
|
44
44
|
AvatarBlock.meta = {
|
|
45
45
|
category: 'display',
|
|
46
|
-
loading: {
|
|
47
|
-
type: 'SkeletonAvatar'
|
|
48
|
-
},
|
|
49
46
|
icons: [],
|
|
50
47
|
styles: [
|
|
51
48
|
'blocks/Avatar/style.less'
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
},
|
|
26
26
|
"icon": {
|
|
27
27
|
"type": ["string", "object"],
|
|
28
|
-
"description": "Name of an
|
|
28
|
+
"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 use an icon in avatar.",
|
|
29
29
|
"docs": {
|
|
30
30
|
"displayType": "icon"
|
|
31
31
|
}
|
|
@@ -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.
|
|
@@ -37,7 +37,6 @@ const BadgeBlock = ({ blockId , events , content , components: { Icon } , prope
|
|
|
37
37
|
BadgeBlock.defaultProps = blockDefaultProps;
|
|
38
38
|
BadgeBlock.meta = {
|
|
39
39
|
category: 'container',
|
|
40
|
-
loading: false,
|
|
41
40
|
icons: [],
|
|
42
41
|
styles: [
|
|
43
42
|
'blocks/Badge/style.less'
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"icon": {
|
|
33
33
|
"type": ["string", "object"],
|
|
34
|
-
"description": "Name of an
|
|
34
|
+
"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 use an icon in badge.",
|
|
35
35
|
"docs": {
|
|
36
36
|
"displayType": "icon"
|
|
37
37
|
}
|
|
@@ -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.
|
|
@@ -74,12 +74,6 @@ const BreadcrumbBlock = ({ blockId , events , components: { Icon , Link } , met
|
|
|
74
74
|
BreadcrumbBlock.defaultProps = blockDefaultProps;
|
|
75
75
|
BreadcrumbBlock.meta = {
|
|
76
76
|
category: 'display',
|
|
77
|
-
loading: {
|
|
78
|
-
type: 'SkeletonParagraph',
|
|
79
|
-
properties: {
|
|
80
|
-
lines: 1
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
77
|
icons: [],
|
|
84
78
|
styles: [
|
|
85
79
|
'blocks/Breadcrumb/style.less'
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"icon": {
|
|
55
55
|
"type": ["string", "object"],
|
|
56
|
-
"description": "Name of an
|
|
56
|
+
"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 use an icon in breadcrumb link.",
|
|
57
57
|
"docs": {
|
|
58
58
|
"displayType": "icon"
|
|
59
59
|
}
|
|
@@ -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.
|
|
@@ -17,7 +17,7 @@ import { Button } from 'antd';
|
|
|
17
17
|
import { get, type } from '@lowdefy/helpers';
|
|
18
18
|
import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
|
|
19
19
|
import color from '../../color.js';
|
|
20
|
-
const ButtonBlock = ({ blockId ,
|
|
20
|
+
const ButtonBlock = ({ blockId , components: { Icon } , events , loading , methods , onClick , properties , rename , })=>{
|
|
21
21
|
const onClickActionName = get(rename, 'events.onClick', {
|
|
22
22
|
default: 'onClick'
|
|
23
23
|
});
|
|
@@ -34,16 +34,20 @@ const ButtonBlock = ({ blockId , events , loading , components: { Icon } , meth
|
|
|
34
34
|
'&:hover': properties.color && {
|
|
35
35
|
backgroundColor: color(properties.color, 5),
|
|
36
36
|
borderColor: color(properties.color, 5)
|
|
37
|
+
},
|
|
38
|
+
'&:focus': properties.color && {
|
|
39
|
+
backgroundColor: properties.color,
|
|
40
|
+
borderColor: properties.color
|
|
37
41
|
}
|
|
38
42
|
},
|
|
39
43
|
properties.style,
|
|
40
44
|
]),
|
|
41
|
-
disabled: properties.disabled || get(events, `${onClickActionName}.loading`),
|
|
45
|
+
disabled: properties.disabled || get(events, `${onClickActionName}.loading`) || loading,
|
|
42
46
|
ghost: properties.ghost,
|
|
43
47
|
danger: properties.danger,
|
|
44
48
|
href: properties.href,
|
|
45
49
|
id: blockId,
|
|
46
|
-
loading:
|
|
50
|
+
loading: get(events, `${onClickActionName}.loading`),
|
|
47
51
|
shape: properties.shape,
|
|
48
52
|
size: properties.size,
|
|
49
53
|
type: get(properties, 'type', {
|
|
@@ -66,9 +70,6 @@ const ButtonBlock = ({ blockId , events , loading , components: { Icon } , meth
|
|
|
66
70
|
ButtonBlock.defaultProps = blockDefaultProps;
|
|
67
71
|
ButtonBlock.meta = {
|
|
68
72
|
category: 'display',
|
|
69
|
-
loading: {
|
|
70
|
-
type: 'SkeletonButton'
|
|
71
|
-
},
|
|
72
73
|
icons: [],
|
|
73
74
|
styles: [
|
|
74
75
|
'blocks/Button/style.less'
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"icon": {
|
|
44
44
|
"type": ["string", "object"],
|
|
45
|
-
"description": "Name of an
|
|
45
|
+
"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 use icon in button.",
|
|
46
46
|
"docs": {
|
|
47
47
|
"displayType": "icon"
|
|
48
48
|
}
|
|
@@ -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.
|
|
@@ -32,7 +32,6 @@ const ButtonSelector = ({ blockId , components , events , loading , properties ,
|
|
|
32
32
|
},
|
|
33
33
|
validation: validation,
|
|
34
34
|
required: required,
|
|
35
|
-
loading: loading,
|
|
36
35
|
content: {
|
|
37
36
|
content: ()=>/*#__PURE__*/ React.createElement(Radio.Group, {
|
|
38
37
|
id: `${blockId}_input`,
|
|
@@ -45,7 +44,7 @@ const ButtonSelector = ({ blockId , components , events , loading , properties ,
|
|
|
45
44
|
},
|
|
46
45
|
properties.inputStyle,
|
|
47
46
|
]),
|
|
48
|
-
disabled: properties.disabled,
|
|
47
|
+
disabled: properties.disabled || loading,
|
|
49
48
|
size: properties.size,
|
|
50
49
|
buttonStyle: properties.buttonStyle ? properties.buttonStyle : 'solid',
|
|
51
50
|
onChange: (event)=>{
|
|
@@ -83,9 +82,6 @@ ButtonSelector.defaultProps = blockDefaultProps;
|
|
|
83
82
|
ButtonSelector.meta = {
|
|
84
83
|
valueType: 'any',
|
|
85
84
|
category: 'input',
|
|
86
|
-
loading: {
|
|
87
|
-
type: 'SkeletonInput'
|
|
88
|
-
},
|
|
89
85
|
icons: [
|
|
90
86
|
...Label.meta.icons
|
|
91
87
|
],
|
package/dist/blocks/Card/Card.js
CHANGED
|
@@ -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.
|
|
@@ -44,12 +44,6 @@ const CardBlock = ({ blockId , content , properties , methods , events })=>/*#_
|
|
|
44
44
|
CardBlock.defaultProps = blockDefaultProps;
|
|
45
45
|
CardBlock.meta = {
|
|
46
46
|
category: 'container',
|
|
47
|
-
loading: {
|
|
48
|
-
type: 'Skeleton',
|
|
49
|
-
properties: {
|
|
50
|
-
height: 80
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
47
|
icons: [],
|
|
54
48
|
styles: [
|
|
55
49
|
'blocks/Card/style.less'
|
|
@@ -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.
|
|
@@ -32,7 +32,6 @@ const CheckboxSelector = ({ blockId , components , events , loading , properties
|
|
|
32
32
|
},
|
|
33
33
|
validation: validation,
|
|
34
34
|
required: required,
|
|
35
|
-
loading: loading,
|
|
36
35
|
content: {
|
|
37
36
|
content: ()=>/*#__PURE__*/ React.createElement(Checkbox.Group, {
|
|
38
37
|
id: `${blockId}_input`,
|
|
@@ -45,7 +44,7 @@ const CheckboxSelector = ({ blockId , components , events , loading , properties
|
|
|
45
44
|
},
|
|
46
45
|
properties.inputStyle,
|
|
47
46
|
]),
|
|
48
|
-
disabled: properties.disabled,
|
|
47
|
+
disabled: properties.disabled || loading,
|
|
49
48
|
onChange: (newVal)=>{
|
|
50
49
|
const val = [];
|
|
51
50
|
newVal.forEach((nv)=>{
|
|
@@ -89,9 +88,6 @@ CheckboxSelector.defaultProps = blockDefaultProps;
|
|
|
89
88
|
CheckboxSelector.meta = {
|
|
90
89
|
valueType: 'array',
|
|
91
90
|
category: 'input',
|
|
92
|
-
loading: {
|
|
93
|
-
type: 'SkeletonInput'
|
|
94
|
-
},
|
|
95
91
|
icons: [
|
|
96
92
|
...Label.meta.icons
|
|
97
93
|
],
|
|
@@ -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.
|
|
@@ -28,12 +28,11 @@ const CheckboxSwitch = ({ blockId , components , events , loading , properties ,
|
|
|
28
28
|
},
|
|
29
29
|
validation: validation,
|
|
30
30
|
required: required,
|
|
31
|
-
loading: loading,
|
|
32
31
|
content: {
|
|
33
32
|
content: ()=>/*#__PURE__*/ React.createElement(Checkbox, {
|
|
34
33
|
id: `${blockId}_input`,
|
|
35
34
|
checked: value,
|
|
36
|
-
disabled: properties.disabled,
|
|
35
|
+
disabled: properties.disabled || loading,
|
|
37
36
|
className: methods.makeCssClass([
|
|
38
37
|
properties.color && {
|
|
39
38
|
'& > span.ant-checkbox-checked:not(.ant-checkbox-disabled) > span': {
|
|
@@ -65,9 +64,6 @@ CheckboxSwitch.defaultProps = blockDefaultProps;
|
|
|
65
64
|
CheckboxSwitch.meta = {
|
|
66
65
|
valueType: 'boolean',
|
|
67
66
|
category: 'input',
|
|
68
|
-
loading: {
|
|
69
|
-
type: 'SkeletonInput'
|
|
70
|
-
},
|
|
71
67
|
icons: [
|
|
72
68
|
...Label.meta.icons
|
|
73
69
|
],
|
|
@@ -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.
|
|
@@ -85,12 +85,6 @@ const CollapseBlock = ({ blockId , events , content , components: { Icon } , me
|
|
|
85
85
|
CollapseBlock.defaultProps = blockDefaultProps;
|
|
86
86
|
CollapseBlock.meta = {
|
|
87
87
|
category: 'container',
|
|
88
|
-
loading: {
|
|
89
|
-
type: 'Skeleton',
|
|
90
|
-
properties: {
|
|
91
|
-
height: 80
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
88
|
icons: [],
|
|
95
89
|
styles: [
|
|
96
90
|
'blocks/Collapse/style.less'
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"expandIcon": {
|
|
31
31
|
"type": ["string", "object"],
|
|
32
|
-
"description": "Name of an
|
|
32
|
+
"description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block for expand icon on the right of selector.",
|
|
33
33
|
"docs": {
|
|
34
34
|
"displayType": "icon"
|
|
35
35
|
}
|
|
@@ -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.
|
|
@@ -48,9 +48,6 @@ const CommentBlock = ({ blockId , components , content , properties , methods }
|
|
|
48
48
|
CommentBlock.defaultProps = blockDefaultProps;
|
|
49
49
|
CommentBlock.meta = {
|
|
50
50
|
category: 'container',
|
|
51
|
-
loading: {
|
|
52
|
-
type: 'SkeletonParagraph'
|
|
53
|
-
},
|
|
54
51
|
icons: [],
|
|
55
52
|
styles: [
|
|
56
53
|
'blocks/Comment/style.less'
|
|
@@ -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.
|
|
@@ -43,8 +43,22 @@ const ConfirmModal = ({ blockId , events , content , components: { Icon } , met
|
|
|
43
43
|
className: methods.makeCssClass(properties.modalStyle),
|
|
44
44
|
closable: properties.closable,
|
|
45
45
|
okText: properties.okText || 'Ok',
|
|
46
|
-
okButtonProps: properties.okButton
|
|
47
|
-
|
|
46
|
+
okButtonProps: properties.okButton && properties.okButton.icon ? {
|
|
47
|
+
...properties.okButton,
|
|
48
|
+
icon: properties.okButton.icon && /*#__PURE__*/ React.createElement(Icon, {
|
|
49
|
+
blockId: `${blockId}_ok_icon`,
|
|
50
|
+
events: events,
|
|
51
|
+
properties: properties.okButton.icon
|
|
52
|
+
})
|
|
53
|
+
} : properties.okButton,
|
|
54
|
+
cancelButtonProps: properties.cancelButton && properties.cancelButton.icon ? {
|
|
55
|
+
...properties.cancelButton,
|
|
56
|
+
icon: properties.cancelButton.icon && /*#__PURE__*/ React.createElement(Icon, {
|
|
57
|
+
blockId: `${blockId}_ok_icon`,
|
|
58
|
+
events: events,
|
|
59
|
+
properties: properties.cancelButton.icon
|
|
60
|
+
})
|
|
61
|
+
} : properties.cancelButton,
|
|
48
62
|
cancelText: properties.cancelText || 'Cancel',
|
|
49
63
|
centered: properties.centered || false,
|
|
50
64
|
mask: properties.mask !== undefined ? properties.mask : true,
|
|
@@ -74,7 +88,6 @@ const ConfirmModal = ({ blockId , events , content , components: { Icon } , met
|
|
|
74
88
|
ConfirmModal.defaultProps = blockDefaultProps;
|
|
75
89
|
ConfirmModal.meta = {
|
|
76
90
|
category: 'container',
|
|
77
|
-
loading: false,
|
|
78
91
|
icons: [],
|
|
79
92
|
styles: [
|
|
80
93
|
'blocks/ConfirmModal/style.less'
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"icon": {
|
|
32
32
|
"type": ["string", "object"],
|
|
33
|
-
"description": "Name of an
|
|
33
|
+
"description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize modal icon.",
|
|
34
34
|
"docs": {
|
|
35
35
|
"displayType": "icon"
|
|
36
36
|
}
|
|
@@ -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.
|
|
@@ -24,7 +24,6 @@ const ContentBlock = ({ blockId , content , methods , properties })=>/*#__PURE_
|
|
|
24
24
|
ContentBlock.defaultProps = blockDefaultProps;
|
|
25
25
|
ContentBlock.meta = {
|
|
26
26
|
category: 'container',
|
|
27
|
-
loading: false,
|
|
28
27
|
icons: [],
|
|
29
28
|
styles: [
|
|
30
29
|
'blocks/Content/style.less'
|
|
@@ -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.
|
|
@@ -109,7 +109,7 @@ const ControlledListBlock = ({ blockId , components: { Icon , Link } , events ,
|
|
|
109
109
|
name: 'AiOutlineMinusCircle',
|
|
110
110
|
...properties.removeItemIcon,
|
|
111
111
|
style: {
|
|
112
|
-
paddingLeft: properties.size === 'small' ?
|
|
112
|
+
paddingLeft: properties.size === 'small' ? 2 : properties.size === 'large' ? 6 : 4,
|
|
113
113
|
fontSize: properties.size === 'small' ? 16 : properties.size === 'large' ? 20 : 18,
|
|
114
114
|
...properties.removeItemIcon && properties.removeItemIcon.style ? properties.removeItemIcon.style : {}
|
|
115
115
|
}
|
|
@@ -126,12 +126,6 @@ ControlledListBlock.defaultProps = blockDefaultProps;
|
|
|
126
126
|
ControlledListBlock.meta = {
|
|
127
127
|
valueType: 'array',
|
|
128
128
|
category: 'list',
|
|
129
|
-
loading: {
|
|
130
|
-
type: 'Skeleton',
|
|
131
|
-
properties: {
|
|
132
|
-
height: 80
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
129
|
icons: [
|
|
136
130
|
'AiOutlinePlus',
|
|
137
131
|
'AiOutlineMinusCircle'
|
|
@@ -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.
|
|
@@ -41,7 +41,6 @@ const DateRangeSelector = ({ blockId , components: { Icon } , events , loading
|
|
|
41
41
|
},
|
|
42
42
|
validation: validation,
|
|
43
43
|
required: required,
|
|
44
|
-
loading: loading,
|
|
45
44
|
content: {
|
|
46
45
|
content: ()=>/*#__PURE__*/ React.createElement("div", {
|
|
47
46
|
className: methods.makeCssClass({
|
|
@@ -60,7 +59,7 @@ const DateRangeSelector = ({ blockId , components: { Icon } , events , loading
|
|
|
60
59
|
},
|
|
61
60
|
properties.inputStyle
|
|
62
61
|
]),
|
|
63
|
-
disabled: properties.disabled,
|
|
62
|
+
disabled: properties.disabled || loading,
|
|
64
63
|
disabledDate: disabledDate(properties.disabledDates),
|
|
65
64
|
format: properties.format || 'YYYY-MM-DD',
|
|
66
65
|
getPopupContainer: ()=>document.getElementById(`${blockId}_popup`)
|
|
@@ -95,9 +94,6 @@ DateRangeSelector.defaultProps = blockDefaultProps;
|
|
|
95
94
|
DateRangeSelector.meta = {
|
|
96
95
|
valueType: 'array',
|
|
97
96
|
category: 'input',
|
|
98
|
-
loading: {
|
|
99
|
-
type: 'SkeletonInput'
|
|
100
|
-
},
|
|
101
97
|
icons: [
|
|
102
98
|
...Label.meta.icons,
|
|
103
99
|
'AiOutlineCalendar'
|