@lowdefy/blocks-antd 4.0.0-rc.0 → 4.0.0-rc.2
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/style.less +1 -1
- package/dist/blocks/Alert/Alert.js +16 -16
- package/dist/blocks/Alert/style.less +1 -1
- package/dist/blocks/AutoComplete/AutoComplete.js +2 -2
- package/dist/blocks/AutoComplete/style.less +1 -1
- package/dist/blocks/Avatar/Avatar.js +2 -2
- package/dist/blocks/Avatar/style.less +1 -1
- package/dist/blocks/Badge/Badge.js +1 -1
- package/dist/blocks/Badge/style.less +1 -1
- package/dist/blocks/Breadcrumb/Breadcrumb.js +18 -18
- package/dist/blocks/Breadcrumb/style.less +1 -1
- package/dist/blocks/Button/Button.js +3 -3
- package/dist/blocks/Button/style.less +1 -1
- package/dist/blocks/ButtonSelector/ButtonSelector.js +3 -3
- package/dist/blocks/ButtonSelector/style.less +1 -1
- package/dist/blocks/Card/Card.js +2 -2
- package/dist/blocks/Card/style.less +1 -1
- package/dist/blocks/CheckboxSelector/CheckboxSelector.js +3 -3
- package/dist/blocks/CheckboxSelector/style.less +1 -1
- package/dist/blocks/CheckboxSwitch/CheckboxSwitch.js +3 -3
- package/dist/blocks/CheckboxSwitch/style.less +1 -1
- package/dist/blocks/Collapse/Collapse.js +16 -16
- package/dist/blocks/Collapse/style.less +1 -1
- package/dist/blocks/Comment/Comment.js +1 -1
- package/dist/blocks/Comment/style.less +1 -1
- package/dist/blocks/ConfirmModal/ConfirmModal.js +1 -1
- package/dist/blocks/ConfirmModal/style.less +1 -1
- package/dist/blocks/Content/Content.js +1 -1
- package/dist/blocks/Content/style.less +1 -1
- package/dist/blocks/ControlledList/ControlledList.js +3 -3
- package/dist/blocks/ControlledList/style.less +1 -1
- package/dist/blocks/DateRangeSelector/DateRangeSelector.js +3 -3
- package/dist/blocks/DateRangeSelector/style.less +1 -1
- package/dist/blocks/DateSelector/DateSelector.js +2 -2
- package/dist/blocks/DateSelector/style.less +1 -1
- package/dist/blocks/DateTimeSelector/DateTimeSelector.js +2 -2
- package/dist/blocks/DateTimeSelector/style.less +1 -1
- package/dist/blocks/Descriptions/Descriptions.js +7 -7
- package/dist/blocks/Descriptions/style.less +1 -1
- package/dist/blocks/Divider/Divider.js +1 -1
- package/dist/blocks/Divider/style.less +1 -1
- package/dist/blocks/Drawer/Drawer.js +1 -1
- package/dist/blocks/Drawer/style.less +1 -1
- package/dist/blocks/Footer/Footer.js +1 -1
- package/dist/blocks/Footer/style.less +1 -1
- package/dist/blocks/Header/Header.js +2 -2
- package/dist/blocks/Header/style.less +1 -1
- package/dist/blocks/Label/Label.js +17 -17
- package/dist/blocks/Label/getLabelCol.js +1 -1
- package/dist/blocks/Label/getWrapperCol.js +1 -1
- package/dist/blocks/Label/labelLogic.js +5 -5
- package/dist/blocks/Label/style.less +1 -1
- package/dist/blocks/Layout/Layout.js +1 -1
- package/dist/blocks/Layout/style.less +1 -1
- package/dist/blocks/Menu/Menu.js +28 -28
- package/dist/blocks/Menu/style.less +1 -1
- package/dist/blocks/Message/Message.js +1 -1
- package/dist/blocks/Message/style.less +1 -1
- package/dist/blocks/MobileMenu/MobileMenu.js +3 -3
- package/dist/blocks/MobileMenu/style.less +1 -1
- package/dist/blocks/Modal/Modal.js +16 -16
- package/dist/blocks/Modal/style.less +1 -1
- package/dist/blocks/MonthSelector/MonthSelector.js +2 -2
- package/dist/blocks/MonthSelector/style.less +1 -1
- package/dist/blocks/MultipleSelector/MultipleSelector.js +3 -3
- package/dist/blocks/MultipleSelector/style.less +1 -1
- package/dist/blocks/Notification/Notification.js +1 -1
- package/dist/blocks/Notification/style.less +1 -1
- package/dist/blocks/NumberInput/NumberInput.js +2 -2
- package/dist/blocks/NumberInput/style.less +1 -1
- package/dist/blocks/PageHCF/PageHCF.js +1 -1
- package/dist/blocks/PageHCF/style.less +1 -1
- package/dist/blocks/PageHCSF/PageHCSF.js +1 -1
- package/dist/blocks/PageHCSF/style.less +1 -1
- package/dist/blocks/PageHSCF/PageHSCF.js +1 -1
- package/dist/blocks/PageHSCF/style.less +1 -1
- package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +7 -7
- package/dist/blocks/PageHeaderMenu/style.less +1 -1
- package/dist/blocks/PageSHCF/PageSHCF.js +1 -1
- package/dist/blocks/PageSHCF/style.less +1 -1
- package/dist/blocks/PageSiderMenu/PageSiderMenu.js +7 -7
- package/dist/blocks/PageSiderMenu/style.less +1 -1
- package/dist/blocks/Pagination/Pagination.js +1 -1
- package/dist/blocks/Pagination/style.less +1 -1
- package/dist/blocks/Paragraph/Paragraph.js +2 -2
- package/dist/blocks/Paragraph/style.less +1 -1
- package/dist/blocks/ParagraphInput/ParagraphInput.js +3 -3
- package/dist/blocks/ParagraphInput/style.less +1 -1
- package/dist/blocks/PasswordInput/PasswordInput.js +2 -2
- package/dist/blocks/PasswordInput/style.less +1 -1
- package/dist/blocks/Progress/Progress.js +1 -1
- package/dist/blocks/Progress/style.less +1 -1
- package/dist/blocks/RadioSelector/RadioSelector.js +3 -3
- package/dist/blocks/RadioSelector/style.less +1 -1
- package/dist/blocks/RatingSlider/RatingSlider.js +7 -7
- package/dist/blocks/RatingSlider/style.less +1 -1
- package/dist/blocks/Result/Result.js +1 -1
- package/dist/blocks/Result/style.less +1 -1
- package/dist/blocks/Selector/Selector.js +3 -3
- package/dist/blocks/Selector/style.less +1 -1
- package/dist/blocks/Sider/Sider.js +1 -1
- package/dist/blocks/Sider/style.less +1 -1
- package/dist/blocks/Statistic/Statistic.js +1 -1
- package/dist/blocks/Statistic/style.less +1 -1
- package/dist/blocks/Switch/Switch.js +3 -3
- package/dist/blocks/Switch/style.less +1 -1
- package/dist/blocks/Tabs/Tabs.js +16 -16
- package/dist/blocks/Tabs/style.less +1 -1
- package/dist/blocks/TextArea/TextArea.js +2 -2
- package/dist/blocks/TextArea/style.less +1 -1
- package/dist/blocks/TextInput/TextInput.js +2 -2
- package/dist/blocks/TextInput/style.less +1 -1
- package/dist/blocks/TimelineList/TimelineList.js +16 -16
- package/dist/blocks/TimelineList/style.less +1 -1
- package/dist/blocks/Title/Title.js +3 -3
- package/dist/blocks/Title/style.less +1 -1
- package/dist/blocks/TitleInput/TitleInput.js +4 -4
- package/dist/blocks/TitleInput/style.less +1 -1
- package/dist/blocks/Tooltip/Tooltip.js +1 -1
- package/dist/blocks/Tooltip/style.less +1 -1
- package/dist/blocks/WeekSelector/WeekSelector.js +2 -2
- 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 +2 -2
- package/package.json +20 -21
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
function _extends() {
|
|
2
|
-
_extends = Object.assign || function(target) {
|
|
3
|
-
for(var i = 1; i < arguments.length; i++){
|
|
4
|
-
var source = arguments[i];
|
|
5
|
-
for(var key in source){
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7
|
-
target[key] = source[key];
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return target;
|
|
12
|
-
};
|
|
13
|
-
return _extends.apply(this, arguments);
|
|
14
|
-
}
|
|
15
1
|
/*
|
|
16
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 Lowdefy, Inc
|
|
17
3
|
|
|
18
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
19
5
|
you may not use this file except in compliance with the License.
|
|
@@ -26,7 +12,21 @@ function _extends() {
|
|
|
26
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
27
13
|
See the License for the specific language governing permissions and
|
|
28
14
|
limitations under the License.
|
|
29
|
-
*/
|
|
15
|
+
*/ function _extends() {
|
|
16
|
+
_extends = Object.assign || function(target) {
|
|
17
|
+
for(var i = 1; i < arguments.length; i++){
|
|
18
|
+
var source = arguments[i];
|
|
19
|
+
for(var key in source){
|
|
20
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
21
|
+
target[key] = source[key];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return target;
|
|
26
|
+
};
|
|
27
|
+
return _extends.apply(this, arguments);
|
|
28
|
+
}
|
|
29
|
+
import React from 'react';
|
|
30
30
|
import { Alert } from 'antd';
|
|
31
31
|
import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
|
|
32
32
|
import { type } from '@lowdefy/helpers';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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.
|
|
@@ -18,7 +18,7 @@ import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
|
18
18
|
import { type } from '@lowdefy/helpers';
|
|
19
19
|
import Label from '../Label/Label.js';
|
|
20
20
|
const Option = AutoComplete.Option;
|
|
21
|
-
const AutoCompleteInput = ({ blockId , components , events , loading , methods , properties , required , validation , value
|
|
21
|
+
const AutoCompleteInput = ({ blockId , components , events , loading , methods , properties , required , validation , value })=>{
|
|
22
22
|
return /*#__PURE__*/ React.createElement(Label, {
|
|
23
23
|
blockId: blockId,
|
|
24
24
|
components: components,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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.
|
|
@@ -30,7 +30,7 @@ const AvatarBlock = ({ blockId , events , components: { Icon } , methods , prop
|
|
|
30
30
|
backgroundColor: !properties.src && properties.color,
|
|
31
31
|
cursor: events.onClick && 'pointer'
|
|
32
32
|
},
|
|
33
|
-
properties.style
|
|
33
|
+
properties.style
|
|
34
34
|
]),
|
|
35
35
|
icon: properties.icon && /*#__PURE__*/ React.createElement(Icon, {
|
|
36
36
|
blockId: `${blockId}_icon`,
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
function _extends() {
|
|
2
|
-
_extends = Object.assign || function(target) {
|
|
3
|
-
for(var i = 1; i < arguments.length; i++){
|
|
4
|
-
var source = arguments[i];
|
|
5
|
-
for(var key in source){
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7
|
-
target[key] = source[key];
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return target;
|
|
12
|
-
};
|
|
13
|
-
return _extends.apply(this, arguments);
|
|
14
|
-
}
|
|
15
1
|
/*
|
|
16
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 Lowdefy, Inc
|
|
17
3
|
|
|
18
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
19
5
|
you may not use this file except in compliance with the License.
|
|
@@ -26,11 +12,25 @@ function _extends() {
|
|
|
26
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
27
13
|
See the License for the specific language governing permissions and
|
|
28
14
|
limitations under the License.
|
|
29
|
-
*/
|
|
15
|
+
*/ function _extends() {
|
|
16
|
+
_extends = Object.assign || function(target) {
|
|
17
|
+
for(var i = 1; i < arguments.length; i++){
|
|
18
|
+
var source = arguments[i];
|
|
19
|
+
for(var key in source){
|
|
20
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
21
|
+
target[key] = source[key];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return target;
|
|
26
|
+
};
|
|
27
|
+
return _extends.apply(this, arguments);
|
|
28
|
+
}
|
|
29
|
+
import React from 'react';
|
|
30
30
|
import { type, get } from '@lowdefy/helpers';
|
|
31
31
|
import { Breadcrumb } from 'antd';
|
|
32
32
|
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
33
|
-
const BreadcrumbBlock = ({ blockId , events , components: { Icon , Link } , methods , properties , rename
|
|
33
|
+
const BreadcrumbBlock = ({ blockId , events , components: { Icon , Link } , methods , properties , rename })=>{
|
|
34
34
|
const onClickActionName = get(rename, 'events.onClick', {
|
|
35
35
|
default: 'onClick'
|
|
36
36
|
});
|
|
@@ -53,7 +53,7 @@ const BreadcrumbBlock = ({ blockId , events , components: { Icon , Link } , met
|
|
|
53
53
|
{
|
|
54
54
|
cursor: events[onClickActionName] && 'pointer'
|
|
55
55
|
},
|
|
56
|
-
link.style
|
|
56
|
+
link.style
|
|
57
57
|
])
|
|
58
58
|
}, link), ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, link.icon && /*#__PURE__*/ React.createElement(Icon, {
|
|
59
59
|
blockId: `${blockId}_${index}_icon`,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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 , components: { Icon } , events , loading , methods , onClick , properties , rename
|
|
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
|
});
|
|
@@ -40,7 +40,7 @@ const ButtonBlock = ({ blockId , components: { Icon } , events , loading , meth
|
|
|
40
40
|
borderColor: properties.color
|
|
41
41
|
}
|
|
42
42
|
},
|
|
43
|
-
properties.style
|
|
43
|
+
properties.style
|
|
44
44
|
]),
|
|
45
45
|
disabled: properties.disabled || get(events, `${onClickActionName}.loading`) || loading,
|
|
46
46
|
ghost: properties.ghost,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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.
|
|
@@ -19,7 +19,7 @@ import { type } from '@lowdefy/helpers';
|
|
|
19
19
|
import Label from '../Label/Label.js';
|
|
20
20
|
import getValueIndex from '../../getValueIndex.js';
|
|
21
21
|
import getUniqueValues from '../../getUniqueValues.js';
|
|
22
|
-
const ButtonSelector = ({ blockId , components , events , loading , properties , required , validation , value , methods
|
|
22
|
+
const ButtonSelector = ({ blockId , components , events , loading , properties , required , validation , value , methods })=>{
|
|
23
23
|
const uniqueValueOptions = getUniqueValues(properties.options || []);
|
|
24
24
|
return /*#__PURE__*/ React.createElement(Label, {
|
|
25
25
|
blockId: blockId,
|
|
@@ -42,7 +42,7 @@ const ButtonSelector = ({ blockId , components , events , loading , properties ,
|
|
|
42
42
|
borderColor: `${properties.color} !important`
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
properties.inputStyle
|
|
45
|
+
properties.inputStyle
|
|
46
46
|
]),
|
|
47
47
|
disabled: properties.disabled || loading,
|
|
48
48
|
size: properties.size,
|
package/dist/blocks/Card/Card.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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,7 @@ const CardBlock = ({ blockId , content , properties , methods , events })=>/*#_
|
|
|
36
36
|
outline: 'none',
|
|
37
37
|
cursor: events.onClick && 'pointer'
|
|
38
38
|
},
|
|
39
|
-
properties.style
|
|
39
|
+
properties.style
|
|
40
40
|
])
|
|
41
41
|
}, content.content && content.content());
|
|
42
42
|
CardBlock.defaultProps = blockDefaultProps;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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.
|
|
@@ -19,7 +19,7 @@ import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
|
|
|
19
19
|
import Label from '../Label/Label.js';
|
|
20
20
|
import getValueIndex from '../../getValueIndex.js';
|
|
21
21
|
import getUniqueValues from '../../getUniqueValues.js';
|
|
22
|
-
const CheckboxSelector = ({ blockId , components , events , loading , properties , required , validation , value , methods
|
|
22
|
+
const CheckboxSelector = ({ blockId , components , events , loading , properties , required , validation , value , methods })=>{
|
|
23
23
|
const uniqueValueOptions = getUniqueValues(properties.options || []);
|
|
24
24
|
return /*#__PURE__*/ React.createElement(Label, {
|
|
25
25
|
blockId: blockId,
|
|
@@ -42,7 +42,7 @@ const CheckboxSelector = ({ blockId , components , events , loading , properties
|
|
|
42
42
|
borderColor: `${properties.color} !important`
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
|
-
properties.inputStyle
|
|
45
|
+
properties.inputStyle
|
|
46
46
|
]),
|
|
47
47
|
disabled: properties.disabled || loading,
|
|
48
48
|
onChange: (newVal)=>{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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,7 +16,7 @@
|
|
|
16
16
|
import { Checkbox, Space } from 'antd';
|
|
17
17
|
import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
|
|
18
18
|
import Label from '../Label/Label.js';
|
|
19
|
-
const CheckboxSwitch = ({ blockId , components , events , loading , properties , required , validation , value , methods
|
|
19
|
+
const CheckboxSwitch = ({ blockId , components , events , loading , properties , required , validation , value , methods })=>{
|
|
20
20
|
return /*#__PURE__*/ React.createElement(Label, {
|
|
21
21
|
blockId: blockId,
|
|
22
22
|
components: components,
|
|
@@ -43,7 +43,7 @@ const CheckboxSwitch = ({ blockId , components , events , loading , properties ,
|
|
|
43
43
|
properties.description && {
|
|
44
44
|
marginRight: '30px'
|
|
45
45
|
},
|
|
46
|
-
properties.inputStyle
|
|
46
|
+
properties.inputStyle
|
|
47
47
|
]),
|
|
48
48
|
onChange: (e)=>{
|
|
49
49
|
methods.setValue(e.target.checked);
|
|
@@ -1,19 +1,5 @@
|
|
|
1
|
-
function _extends() {
|
|
2
|
-
_extends = Object.assign || function(target) {
|
|
3
|
-
for(var i = 1; i < arguments.length; i++){
|
|
4
|
-
var source = arguments[i];
|
|
5
|
-
for(var key in source){
|
|
6
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
7
|
-
target[key] = source[key];
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
return target;
|
|
12
|
-
};
|
|
13
|
-
return _extends.apply(this, arguments);
|
|
14
|
-
}
|
|
15
1
|
/*
|
|
16
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 Lowdefy, Inc
|
|
17
3
|
|
|
18
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
19
5
|
you may not use this file except in compliance with the License.
|
|
@@ -26,7 +12,21 @@ function _extends() {
|
|
|
26
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
27
13
|
See the License for the specific language governing permissions and
|
|
28
14
|
limitations under the License.
|
|
29
|
-
*/
|
|
15
|
+
*/ function _extends() {
|
|
16
|
+
_extends = Object.assign || function(target) {
|
|
17
|
+
for(var i = 1; i < arguments.length; i++){
|
|
18
|
+
var source = arguments[i];
|
|
19
|
+
for(var key in source){
|
|
20
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
21
|
+
target[key] = source[key];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return target;
|
|
26
|
+
};
|
|
27
|
+
return _extends.apply(this, arguments);
|
|
28
|
+
}
|
|
29
|
+
import React from 'react';
|
|
30
30
|
import { Collapse } from 'antd';
|
|
31
31
|
import { serializer, type } from '@lowdefy/helpers';
|
|
32
32
|
import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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 { get } from '@lowdefy/helpers';
|
|
|
17
17
|
import { List, Typography } from 'antd';
|
|
18
18
|
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
19
19
|
import Button from '../Button/Button.js';
|
|
20
|
-
const ControlledListBlock = ({ blockId , components: { Icon , Link } , events , list , methods , properties
|
|
20
|
+
const ControlledListBlock = ({ blockId , components: { Icon , Link } , events , list , methods , properties })=>{
|
|
21
21
|
useEffect(()=>{
|
|
22
22
|
methods.registerMethod('moveItemDown', methods.moveItemDown);
|
|
23
23
|
methods.registerMethod('moveItemUp', methods.moveItemUp);
|
|
@@ -115,7 +115,7 @@ const ControlledListBlock = ({ blockId , components: { Icon , Link } , events ,
|
|
|
115
115
|
}
|
|
116
116
|
},
|
|
117
117
|
onClick: ()=>methods.removeItem(i)
|
|
118
|
-
})
|
|
118
|
+
})
|
|
119
119
|
]
|
|
120
120
|
}, item.content && item.content({
|
|
121
121
|
width: '100%'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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.
|
|
@@ -25,7 +25,7 @@ const rangeValue = (value, format)=>{
|
|
|
25
25
|
if (value) return value.map((val)=>moment.utc(val).startOf('day'));
|
|
26
26
|
return null;
|
|
27
27
|
};
|
|
28
|
-
const DateRangeSelector = ({ blockId , components: { Icon } , events , loading , methods , properties , required , validation , value
|
|
28
|
+
const DateRangeSelector = ({ blockId , components: { Icon } , events , loading , methods , properties , required , validation , value })=>{
|
|
29
29
|
return /*#__PURE__*/ React.createElement(Label, {
|
|
30
30
|
blockId: blockId,
|
|
31
31
|
components: {
|
|
@@ -66,7 +66,7 @@ const DateRangeSelector = ({ blockId , components: { Icon } , events , loading
|
|
|
66
66
|
status: validation.status,
|
|
67
67
|
placeholder: type.isArray(properties.placeholder) && [
|
|
68
68
|
properties.placeholder[0] || 'Start Date',
|
|
69
|
-
properties.placeholder[1] || 'End Date'
|
|
69
|
+
properties.placeholder[1] || 'End Date'
|
|
70
70
|
] || [
|
|
71
71
|
'Start Date',
|
|
72
72
|
'End Date'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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.
|
|
@@ -19,7 +19,7 @@ import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
|
19
19
|
import { DatePicker } from 'antd';
|
|
20
20
|
import Label from '../Label/Label.js';
|
|
21
21
|
import disabledDate from '../../disabledDate.js';
|
|
22
|
-
const DateSelector = ({ blockId , components: { Icon } , events , loading , methods , properties , required , validation , value
|
|
22
|
+
const DateSelector = ({ blockId , components: { Icon } , events , loading , methods , properties , required , validation , value })=>{
|
|
23
23
|
return /*#__PURE__*/ React.createElement(Label, {
|
|
24
24
|
blockId: blockId,
|
|
25
25
|
components: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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.
|
|
@@ -19,7 +19,7 @@ import { type } from '@lowdefy/helpers';
|
|
|
19
19
|
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
20
20
|
import Label from '../Label/Label.js';
|
|
21
21
|
import disabledDate from '../../disabledDate.js';
|
|
22
|
-
const DateTimeSelector = ({ blockId , components: { Icon } , events , loading , methods , properties , required , validation , value
|
|
22
|
+
const DateTimeSelector = ({ blockId , components: { Icon } , events , loading , methods , properties , required , validation , value })=>{
|
|
23
23
|
const timeUnit = !type.isString(properties.timeFormat) ? 'minute' : properties.timeFormat === 'HH:mm:ss' ? 'second' : properties.timeFormat === 'HH' ? 'hour' : 'minute';
|
|
24
24
|
return /*#__PURE__*/ React.createElement(Label, {
|
|
25
25
|
blockId: blockId,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2023 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.
|
|
@@ -39,12 +39,12 @@ const DescriptionsBlock = ({ blockId , content , properties , methods })=>{
|
|
|
39
39
|
html: properties.title,
|
|
40
40
|
methods
|
|
41
41
|
})
|
|
42
|
-
}, dataItem.map((
|
|
43
|
-
let row =
|
|
44
|
-
if (type.isPrimitive(
|
|
42
|
+
}, dataItem.map((item, i)=>{
|
|
43
|
+
let row = item;
|
|
44
|
+
if (type.isPrimitive(item)) {
|
|
45
45
|
row = {
|
|
46
|
-
value:
|
|
47
|
-
key:
|
|
46
|
+
value: item,
|
|
47
|
+
key: item.toString()
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
50
|
const itemOption = (properties.itemOptions || []).find((item)=>row.key === item.key) || {};
|
|
@@ -64,7 +64,7 @@ const DescriptionsBlock = ({ blockId , content , properties , methods })=>{
|
|
|
64
64
|
whiteSpace: 'pre-wrap'
|
|
65
65
|
},
|
|
66
66
|
type.isFunction(itemOption.style) ? itemOption.style(row, i) : itemOption.style,
|
|
67
|
-
row.style
|
|
67
|
+
row.style
|
|
68
68
|
])}`
|
|
69
69
|
}, renderHtml({
|
|
70
70
|
html: value,
|