@lowdefy/blocks-antd 4.0.0-alpha.9 → 4.0.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/dist/blocks/Affix/Affix.js +1 -2
  2. package/dist/blocks/Alert/Alert.js +18 -20
  3. package/dist/blocks/AutoComplete/AutoComplete.js +15 -37
  4. package/dist/blocks/AutoComplete/schema.json +5 -46
  5. package/dist/blocks/Avatar/Avatar.js +2 -4
  6. package/dist/blocks/Badge/Badge.js +1 -2
  7. package/dist/blocks/Breadcrumb/Breadcrumb.js +19 -22
  8. package/dist/blocks/Button/Button.js +3 -4
  9. package/dist/blocks/ButtonSelector/ButtonSelector.js +3 -4
  10. package/dist/blocks/Card/Card.js +2 -4
  11. package/dist/blocks/CheckboxSelector/CheckboxSelector.js +3 -4
  12. package/dist/blocks/CheckboxSwitch/CheckboxSwitch.js +2 -2
  13. package/dist/blocks/Collapse/Collapse.js +19 -23
  14. package/dist/blocks/Comment/Comment.js +2 -2
  15. package/dist/blocks/ConfirmModal/ConfirmModal.js +2 -2
  16. package/dist/blocks/Content/Content.js +1 -2
  17. package/dist/blocks/ControlledList/ControlledList.js +2 -2
  18. package/dist/blocks/DateRangeSelector/DateRangeSelector.js +8 -11
  19. package/dist/blocks/DateSelector/DateSelector.js +5 -5
  20. package/dist/blocks/DateTimeSelector/DateTimeSelector.js +8 -6
  21. package/dist/blocks/Descriptions/Descriptions.js +6 -8
  22. package/dist/blocks/Divider/Divider.js +1 -2
  23. package/dist/blocks/Drawer/Drawer.js +4 -6
  24. package/dist/blocks/Footer/Footer.js +1 -2
  25. package/dist/blocks/Header/Header.js +1 -2
  26. package/dist/blocks/Label/Label.js +29 -33
  27. package/dist/blocks/Label/labelLogic.js +10 -10
  28. package/dist/blocks/Label/style.less +4 -0
  29. package/dist/blocks/Layout/Layout.js +1 -2
  30. package/dist/blocks/Menu/Menu.js +56 -64
  31. package/dist/blocks/Message/Message.js +3 -4
  32. package/dist/blocks/MobileMenu/MobileMenu.js +4 -6
  33. package/dist/blocks/Modal/Modal.js +19 -22
  34. package/dist/blocks/MonthSelector/MonthSelector.js +5 -5
  35. package/dist/blocks/MultipleSelector/MultipleSelector.js +6 -8
  36. package/dist/blocks/Notification/Notification.js +4 -6
  37. package/dist/blocks/NumberInput/NumberInput.js +4 -2
  38. package/dist/blocks/NumberInput/schema.json +7 -0
  39. package/dist/blocks/PageHCF/PageHCF.js +1 -2
  40. package/dist/blocks/PageHCSF/PageHCSF.js +1 -2
  41. package/dist/blocks/PageHSCF/PageHSCF.js +1 -2
  42. package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +43 -31
  43. package/dist/blocks/PageHeaderMenu/schema.json +5 -5
  44. package/dist/blocks/PageSHCF/PageSHCF.js +1 -2
  45. package/dist/blocks/PageSiderMenu/PageSiderMenu.js +40 -38
  46. package/dist/blocks/PageSiderMenu/schema.json +5 -5
  47. package/dist/blocks/Pagination/Pagination.js +3 -4
  48. package/dist/blocks/Paragraph/Paragraph.js +1 -2
  49. package/dist/blocks/Paragraph/style.less +1 -0
  50. package/dist/blocks/ParagraphInput/ParagraphInput.js +2 -2
  51. package/dist/blocks/PasswordInput/PasswordInput.js +5 -4
  52. package/dist/blocks/Progress/Progress.js +1 -2
  53. package/dist/blocks/RadioSelector/RadioSelector.js +6 -7
  54. package/dist/blocks/RatingSlider/RatingSlider.js +4 -6
  55. package/dist/blocks/Result/Result.js +1 -2
  56. package/dist/blocks/Selector/Selector.js +6 -8
  57. package/dist/blocks/Sider/Sider.js +4 -6
  58. package/dist/blocks/Statistic/Statistic.js +1 -2
  59. package/dist/blocks/Switch/Switch.js +2 -2
  60. package/dist/blocks/Tabs/Tabs.js +20 -25
  61. package/dist/blocks/TextArea/TextArea.js +4 -4
  62. package/dist/blocks/TextInput/TextInput.js +7 -6
  63. package/dist/blocks/TimelineList/TimelineList.js +18 -18
  64. package/dist/blocks/Title/Title.js +2 -2
  65. package/dist/blocks/Title/style.less +1 -0
  66. package/dist/blocks/TitleInput/TitleInput.js +2 -2
  67. package/dist/blocks/Tooltip/Tooltip.js +1 -2
  68. package/dist/blocks/WeekSelector/WeekSelector.js +5 -5
  69. package/dist/disabledDate.js +3 -6
  70. package/package.json +24 -24
@@ -31,8 +31,7 @@ const AffixBlock = ({ blockId , content , methods , properties , rename })=>/*#
31
31
  }
32
32
  });
33
33
  }
34
- }, content.content && content.content())
35
- ;
34
+ }, content.content && content.content());
36
35
  AffixBlock.defaultProps = blockDefaultProps;
37
36
  AffixBlock.meta = {
38
37
  category: 'container',
@@ -1,3 +1,17 @@
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
+ }
1
15
  /*
2
16
  Copyright 2020-2022 Lowdefy, Inc
3
17
 
@@ -16,20 +30,6 @@
16
30
  import { Alert } from 'antd';
17
31
  import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
18
32
  import { type } from '@lowdefy/helpers';
19
- function _extends() {
20
- _extends = Object.assign || function(target) {
21
- for(var i = 1; i < arguments.length; i++){
22
- var source = arguments[i];
23
- for(var key in source){
24
- if (Object.prototype.hasOwnProperty.call(source, key)) {
25
- target[key] = source[key];
26
- }
27
- }
28
- }
29
- return target;
30
- };
31
- return _extends.apply(this, arguments);
32
- }
33
33
  const AlertBlock = ({ blockId , content , events , components: { Icon } , methods , properties })=>{
34
34
  const additionalProps = {};
35
35
  if (properties.icon) {
@@ -39,12 +39,11 @@ const AlertBlock = ({ blockId , content , events , components: { Icon } , metho
39
39
  properties: properties.icon
40
40
  });
41
41
  }
42
- return(/*#__PURE__*/ React.createElement(Alert, _extends({
42
+ return /*#__PURE__*/ React.createElement(Alert, _extends({
43
43
  action: content.action && content.action(),
44
44
  afterClose: ()=>methods.triggerEvent({
45
45
  name: 'afterClose'
46
- })
47
- ,
46
+ }),
48
47
  banner: properties.banner,
49
48
  closable: properties.closable,
50
49
  closeText: properties.closeText,
@@ -63,11 +62,10 @@ const AlertBlock = ({ blockId , content , events , components: { Icon } , metho
63
62
  }),
64
63
  onClose: ()=>methods.triggerEvent({
65
64
  name: 'onClose'
66
- })
67
- ,
65
+ }),
68
66
  showIcon: properties.showIcon === false ? false : true,
69
67
  type: properties.type
70
- }, additionalProps)));
68
+ }, additionalProps));
71
69
  };
72
70
  AlertBlock.defaultProps = blockDefaultProps;
73
71
  AlertBlock.meta = {
@@ -14,14 +14,12 @@
14
14
  limitations under the License.
15
15
  */ import React from 'react';
16
16
  import { AutoComplete } from 'antd';
17
- import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
17
+ import { blockDefaultProps } from '@lowdefy/block-utils';
18
18
  import { type } from '@lowdefy/helpers';
19
19
  import Label from '../Label/Label.js';
20
- import getUniqueValues from '../../getUniqueValues.js';
21
20
  const Option = AutoComplete.Option;
22
21
  const AutoCompleteInput = ({ blockId , components , events , loading , methods , properties , required , validation , value , })=>{
23
- const uniqueValueOptions = getUniqueValues(properties.options || []);
24
- return(/*#__PURE__*/ React.createElement(Label, {
22
+ return /*#__PURE__*/ React.createElement(Label, {
25
23
  blockId: blockId,
26
24
  components: components,
27
25
  events: events,
@@ -38,20 +36,20 @@ const AutoCompleteInput = ({ blockId , components , events , loading , methods ,
38
36
  autoFocus: properties.autoFocus,
39
37
  backfill: properties.backfill,
40
38
  bordered: properties.bordered,
41
- className: methods.makeCssClass(properties.inputStyle),
39
+ className: methods.makeCssClass([
40
+ {
41
+ width: '100%'
42
+ },
43
+ properties.inputStyle
44
+ ]),
42
45
  defaultOpen: properties.defaultOpen,
43
46
  disabled: properties.disabled || loading,
44
47
  placeholder: properties.placeholder || 'Type or select item',
45
48
  allowClear: properties.allowClear !== false,
46
49
  size: properties.size,
47
- filterOption: (input, option)=>(option.filterstring || option.children.props.html || '').toLowerCase().indexOf(input.toLowerCase()) >= 0
48
- ,
50
+ filterOption: (input, option)=>`${option.value}`.toLowerCase().indexOf(input.toLowerCase()) >= 0,
49
51
  onChange: (newVal)=>{
50
- let val = type.isPrimitive(uniqueValueOptions[newVal]) ? uniqueValueOptions[newVal] : uniqueValueOptions[newVal].value;
51
- if (type.isNone(val)) {
52
- val = newVal;
53
- }
54
- methods.setValue(val);
52
+ methods.setValue(newVal);
55
53
  methods.triggerEvent({
56
54
  name: 'onChange'
57
55
  });
@@ -64,35 +62,15 @@ const AutoCompleteInput = ({ blockId , components , events , loading , methods ,
64
62
  }
65
63
  });
66
64
  },
67
- value: type.isNone(value) ? undefined : value
68
- }, (properties.options || []).map((opt, i)=>type.isPrimitive(opt) ? /*#__PURE__*/ React.createElement(Option, {
65
+ value: type.isNone(value) ? undefined : `${value}`
66
+ }, (properties.options || []).map((opt, i)=>/*#__PURE__*/ React.createElement(Option, {
69
67
  className: methods.makeCssClass(properties.optionsStyle),
70
68
  id: `${blockId}_${i}`,
71
69
  key: i,
72
- value: `${i}`
73
- }, renderHtml({
74
- html: `${opt}`,
75
- methods
76
- })) : /*#__PURE__*/ React.createElement(Option, {
77
- className: methods.makeCssClass([
78
- properties.optionsStyle,
79
- opt.style
80
- ]),
81
- disabled: opt.disabled,
82
- filterstring: opt.filterString,
83
- id: `${blockId}_${i}`,
84
- key: i,
85
- value: `${i}`
86
- }, type.isNone(opt.label) ? renderHtml({
87
- html: `${opt.value}`,
88
- methods
89
- }) : renderHtml({
90
- html: opt.label,
91
- methods
92
- }))
93
- ))
70
+ value: `${opt}`
71
+ }, `${opt}`)))
94
72
  }
95
- }));
73
+ });
96
74
  };
97
75
  AutoCompleteInput.defaultProps = blockDefaultProps;
98
76
  AutoCompleteInput.meta = {
@@ -101,52 +101,11 @@
101
101
  },
102
102
  "options": {
103
103
  "default": [],
104
- "oneOf": [
105
- {
106
- "type": "array",
107
- "description": "Options can either be an array of string values, on an array of label, value pairs - supports html.",
108
- "items": {
109
- "type": "string"
110
- }
111
- },
112
- {
113
- "type": "array",
114
- "description": "Options can either be an array of string values, on an array of label, value pairs.",
115
- "items": {
116
- "type": "object",
117
- "required": ["value"],
118
- "properties": {
119
- "label": {
120
- "type": "string",
121
- "description": "Value label shown to user - supports html."
122
- },
123
- "value": {
124
- "description": "Value selected. Can be of any type.",
125
- "type": "string",
126
- "docs": {
127
- "displayType": "yaml"
128
- }
129
- },
130
- "disabled": {
131
- "type": "boolean",
132
- "default": false,
133
- "description": "Disable the option if true."
134
- },
135
- "filterString": {
136
- "type": "string",
137
- "description": "String to match against when filtering selector options during. If no filterString is provided the filter method matches against options.label."
138
- },
139
- "style": {
140
- "type": "object",
141
- "description": "Css style to applied to option.",
142
- "docs": {
143
- "displayType": "yaml"
144
- }
145
- }
146
- }
147
- }
148
- }
149
- ]
104
+ "type": "array",
105
+ "description": "Options can either be an array of string values.",
106
+ "items": {
107
+ "type": "string"
108
+ }
150
109
  },
151
110
  "optionsStyle": {
152
111
  "type": "object",
@@ -24,8 +24,7 @@ const AvatarBlock = ({ blockId , events , components: { Icon } , methods , prop
24
24
  src: properties.src,
25
25
  onClick: ()=>methods.triggerEvent({
26
26
  name: 'onClick'
27
- })
28
- ,
27
+ }),
29
28
  className: methods.makeCssClass([
30
29
  {
31
30
  backgroundColor: !properties.src && properties.color,
@@ -38,8 +37,7 @@ const AvatarBlock = ({ blockId , events , components: { Icon } , methods , prop
38
37
  events: events,
39
38
  properties: properties.icon
40
39
  })
41
- }, properties.content)
42
- ;
40
+ }, properties.content);
43
41
  AvatarBlock.defaultProps = blockDefaultProps;
44
42
  AvatarBlock.meta = {
45
43
  category: 'display',
@@ -32,8 +32,7 @@ const BadgeBlock = ({ blockId , events , content , components: { Icon } , prope
32
32
  events: events,
33
33
  properties: properties.icon
34
34
  }) || properties.count
35
- }, content.content && content.content())
36
- ;
35
+ }, content.content && content.content());
37
36
  BadgeBlock.defaultProps = blockDefaultProps;
38
37
  BadgeBlock.meta = {
39
38
  category: 'container',
@@ -1,3 +1,17 @@
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
+ }
1
15
  /*
2
16
  Copyright 2020-2022 Lowdefy, Inc
3
17
 
@@ -16,25 +30,11 @@
16
30
  import { type, get } from '@lowdefy/helpers';
17
31
  import { Breadcrumb } from 'antd';
18
32
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
- function _extends() {
20
- _extends = Object.assign || function(target) {
21
- for(var i = 1; i < arguments.length; i++){
22
- var source = arguments[i];
23
- for(var key in source){
24
- if (Object.prototype.hasOwnProperty.call(source, key)) {
25
- target[key] = source[key];
26
- }
27
- }
28
- }
29
- return target;
30
- };
31
- return _extends.apply(this, arguments);
32
- }
33
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
  });
37
- return(/*#__PURE__*/ React.createElement(Breadcrumb, {
37
+ return /*#__PURE__*/ React.createElement(Breadcrumb, {
38
38
  id: blockId,
39
39
  separator: properties.separator,
40
40
  className: methods.makeCssClass(properties.style)
@@ -46,8 +46,7 @@ const BreadcrumbBlock = ({ blockId , events , components: { Icon , Link } , met
46
46
  link,
47
47
  index
48
48
  }
49
- })
50
- )
49
+ }))
51
50
  }, /*#__PURE__*/ React.createElement(Link, _extends({
52
51
  id: `${blockId}_${index}`,
53
52
  className: methods.makeCssClass([
@@ -56,20 +55,18 @@ const BreadcrumbBlock = ({ blockId , events , components: { Icon , Link } , met
56
55
  },
57
56
  link.style,
58
57
  ])
59
- }, link), (defaultTitle)=>/*#__PURE__*/ React.createElement(React.Fragment, null, link.icon && /*#__PURE__*/ React.createElement(Icon, {
58
+ }, link), ()=>/*#__PURE__*/ React.createElement(React.Fragment, null, link.icon && /*#__PURE__*/ React.createElement(Icon, {
60
59
  blockId: `${blockId}_${index}_icon`,
61
60
  events: events,
62
61
  properties: {
63
62
  name: type.isString(link.icon) && link.icon,
64
63
  ...type.isObject(link.icon) ? link.icon : {},
65
64
  style: {
66
- paddingRight: 8,
65
+ marginRight: 8,
67
66
  ...link.icon.style || {}
68
67
  }
69
68
  }
70
- }), type.isString(link) ? link : link.label || defaultTitle)
71
- ))
72
- )));
69
+ }), type.isString(link) ? link : link.label)))));
73
70
  };
74
71
  BreadcrumbBlock.defaultProps = blockDefaultProps;
75
72
  BreadcrumbBlock.meta = {
@@ -21,7 +21,7 @@ const ButtonBlock = ({ blockId , components: { Icon } , events , loading , meth
21
21
  const onClickActionName = get(rename, 'events.onClick', {
22
22
  default: 'onClick'
23
23
  });
24
- return(/*#__PURE__*/ React.createElement(Button, {
24
+ return /*#__PURE__*/ React.createElement(Button, {
25
25
  block: properties.block,
26
26
  className: methods.makeCssClass([
27
27
  {
@@ -60,12 +60,11 @@ const ButtonBlock = ({ blockId , components: { Icon } , events , loading , meth
60
60
  }),
61
61
  onClick: onClick || (()=>methods.triggerEvent({
62
62
  name: onClickActionName
63
- })
64
- )
63
+ }))
65
64
  }, !properties.hideTitle && renderHtml({
66
65
  html: type.isNone(properties.title) ? blockId : properties.title,
67
66
  methods
68
- })));
67
+ }));
69
68
  };
70
69
  ButtonBlock.defaultProps = blockDefaultProps;
71
70
  ButtonBlock.meta = {
@@ -21,7 +21,7 @@ import getValueIndex from '../../getValueIndex.js';
21
21
  import getUniqueValues from '../../getUniqueValues.js';
22
22
  const ButtonSelector = ({ blockId , components , events , loading , properties , required , validation , value , methods , })=>{
23
23
  const uniqueValueOptions = getUniqueValues(properties.options || []);
24
- return(/*#__PURE__*/ React.createElement(Label, {
24
+ return /*#__PURE__*/ React.createElement(Label, {
25
25
  blockId: blockId,
26
26
  components: components,
27
27
  events: events,
@@ -73,10 +73,9 @@ const ButtonSelector = ({ blockId , components , events , loading , properties ,
73
73
  }) : renderHtml({
74
74
  html: opt.label,
75
75
  methods
76
- }))
77
- ))
76
+ }))))
78
77
  }
79
- }));
78
+ });
80
79
  };
81
80
  ButtonSelector.defaultProps = blockDefaultProps;
82
81
  ButtonSelector.meta = {
@@ -30,8 +30,7 @@ const CardBlock = ({ blockId , content , properties , methods , events })=>/*#_
30
30
  type: properties.inner ? 'inner' : null,
31
31
  onClick: ()=>methods.triggerEvent({
32
32
  name: 'onClick'
33
- })
34
- ,
33
+ }),
35
34
  className: methods.makeCssClass([
36
35
  {
37
36
  outline: 'none',
@@ -39,8 +38,7 @@ const CardBlock = ({ blockId , content , properties , methods , events })=>/*#_
39
38
  },
40
39
  properties.style,
41
40
  ])
42
- }, content.content && content.content())
43
- ;
41
+ }, content.content && content.content());
44
42
  CardBlock.defaultProps = blockDefaultProps;
45
43
  CardBlock.meta = {
46
44
  category: 'container',
@@ -21,7 +21,7 @@ import getValueIndex from '../../getValueIndex.js';
21
21
  import getUniqueValues from '../../getUniqueValues.js';
22
22
  const CheckboxSelector = ({ blockId , components , events , loading , properties , required , validation , value , methods , })=>{
23
23
  const uniqueValueOptions = getUniqueValues(properties.options || []);
24
- return(/*#__PURE__*/ React.createElement(Label, {
24
+ return /*#__PURE__*/ React.createElement(Label, {
25
25
  blockId: blockId,
26
26
  components: components,
27
27
  events: events,
@@ -79,10 +79,9 @@ const CheckboxSelector = ({ blockId , components , events , loading , properties
79
79
  }) : renderHtml({
80
80
  html: opt.label,
81
81
  methods
82
- }))
83
- )))
82
+ })))))
84
83
  }
85
- }));
84
+ });
86
85
  };
87
86
  CheckboxSelector.defaultProps = blockDefaultProps;
88
87
  CheckboxSelector.meta = {
@@ -17,7 +17,7 @@ import { Checkbox, Space } from 'antd';
17
17
  import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
18
18
  import Label from '../Label/Label.js';
19
19
  const CheckboxSwitch = ({ blockId , components , events , loading , properties , required , validation , value , methods , })=>{
20
- return(/*#__PURE__*/ React.createElement(Label, {
20
+ return /*#__PURE__*/ React.createElement(Label, {
21
21
  blockId: blockId,
22
22
  components: components,
23
23
  events: events,
@@ -58,7 +58,7 @@ const CheckboxSwitch = ({ blockId , components , events , loading , properties ,
58
58
  methods
59
59
  })))
60
60
  }
61
- }));
61
+ });
62
62
  };
63
63
  CheckboxSwitch.defaultProps = blockDefaultProps;
64
64
  CheckboxSwitch.meta = {
@@ -1,3 +1,17 @@
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
+ }
1
15
  /*
2
16
  Copyright 2020-2022 Lowdefy, Inc
3
17
 
@@ -16,26 +30,11 @@
16
30
  import { Collapse } from 'antd';
17
31
  import { serializer, type } from '@lowdefy/helpers';
18
32
  import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
19
- function _extends() {
20
- _extends = Object.assign || function(target) {
21
- for(var i = 1; i < arguments.length; i++){
22
- var source = arguments[i];
23
- for(var key in source){
24
- if (Object.prototype.hasOwnProperty.call(source, key)) {
25
- target[key] = source[key];
26
- }
27
- }
28
- }
29
- return target;
30
- };
31
- return _extends.apply(this, arguments);
32
- }
33
33
  const CollapseBlock = ({ blockId , events , content , components: { Icon } , methods , properties })=>{
34
34
  const panels = properties.panels || Object.keys(content).sort().map((key)=>({
35
35
  key,
36
36
  title: key
37
- })
38
- );
37
+ }));
39
38
  const additionalProps = {};
40
39
  if (properties.activeKey) {
41
40
  additionalProps.activeKey = properties.activeKey;
@@ -46,7 +45,7 @@ const CollapseBlock = ({ blockId , events , content , components: { Icon } , me
46
45
  name: propertiesIconExpand
47
46
  };
48
47
  }
49
- return(/*#__PURE__*/ React.createElement(Collapse, _extends({
48
+ return /*#__PURE__*/ React.createElement(Collapse, _extends({
50
49
  id: blockId,
51
50
  defaultActiveKey: properties.defaultActiveKey || panels[0].key,
52
51
  bordered: properties.bordered,
@@ -56,8 +55,7 @@ const CollapseBlock = ({ blockId , events , content , components: { Icon } , me
56
55
  event: {
57
56
  activeKey
58
57
  }
59
- })
60
- ,
58
+ }),
61
59
  expandIcon: propertiesIconExpand && (({ isActive })=>/*#__PURE__*/ React.createElement(Icon, {
62
60
  blockId: `${blockId}_expandIcon`,
63
61
  events: events,
@@ -65,8 +63,7 @@ const CollapseBlock = ({ blockId , events , content , components: { Icon } , me
65
63
  rotate: isActive ? 90 : 0,
66
64
  ...propertiesIconExpand
67
65
  }
68
- })
69
- ),
66
+ })),
70
67
  expandIconPosition: properties.expandIconPosition,
71
68
  destroyInactivePanel: properties.destroyInactivePanel
72
69
  }, additionalProps), panels.map((panel)=>/*#__PURE__*/ React.createElement(Collapse.Panel, {
@@ -79,8 +76,7 @@ const CollapseBlock = ({ blockId , events , content , components: { Icon } , me
79
76
  }),
80
77
  key: panel.key,
81
78
  showArrow: properties.showArrow
82
- }, content[panel.key] && content[panel.key]())
83
- )));
79
+ }, content[panel.key] && content[panel.key]())));
84
80
  };
85
81
  CollapseBlock.defaultProps = blockDefaultProps;
86
82
  CollapseBlock.meta = {
@@ -30,7 +30,7 @@ const CommentBlock = ({ blockId , components , content , properties , methods }
30
30
  content: properties.author.substring(0, 2)
31
31
  };
32
32
  }
33
- return(/*#__PURE__*/ React.createElement(Comment, {
33
+ return /*#__PURE__*/ React.createElement(Comment, {
34
34
  id: blockId,
35
35
  actions: [
36
36
  content.actions && content.actions()
@@ -43,7 +43,7 @@ const CommentBlock = ({ blockId , components , content , properties , methods }
43
43
  properties: avatar,
44
44
  methods: methods
45
45
  })
46
- }, content.children && content.children()));
46
+ }, content.children && content.children());
47
47
  };
48
48
  CommentBlock.defaultProps = blockDefaultProps;
49
49
  CommentBlock.meta = {
@@ -81,9 +81,9 @@ const ConfirmModal = ({ blockId , events , content , components: { Icon } , met
81
81
  });
82
82
  });
83
83
  });
84
- return(/*#__PURE__*/ React.createElement("div", {
84
+ return /*#__PURE__*/ React.createElement("div", {
85
85
  id: blockId
86
- }));
86
+ });
87
87
  };
88
88
  ConfirmModal.defaultProps = blockDefaultProps;
89
89
  ConfirmModal.meta = {
@@ -19,8 +19,7 @@ const Content = Layout.Content;
19
19
  const ContentBlock = ({ blockId , content , methods , properties })=>/*#__PURE__*/ React.createElement(Content, {
20
20
  id: blockId,
21
21
  className: methods.makeCssClass(properties.style)
22
- }, content.content && content.content())
23
- ;
22
+ }, content.content && content.content());
24
23
  ContentBlock.defaultProps = blockDefaultProps;
25
24
  ContentBlock.meta = {
26
25
  category: 'container',
@@ -42,7 +42,7 @@ const ControlledListBlock = ({ blockId , components: { Icon , Link } , events ,
42
42
  width: '100%'
43
43
  }
44
44
  };
45
- return(/*#__PURE__*/ React.createElement(List, {
45
+ return /*#__PURE__*/ React.createElement(List, {
46
46
  id: blockId,
47
47
  size: properties.size,
48
48
  header: (properties.title || properties.addToFront && !properties.hideAddButton) && /*#__PURE__*/ React.createElement("div", {
@@ -120,7 +120,7 @@ const ControlledListBlock = ({ blockId , components: { Icon , Link } , events ,
120
120
  }, item.content && item.content({
121
121
  width: '100%'
122
122
  }))
123
- }));
123
+ });
124
124
  };
125
125
  ControlledListBlock.defaultProps = blockDefaultProps;
126
126
  ControlledListBlock.meta = {
@@ -21,14 +21,12 @@ import Label from '../Label/Label.js';
21
21
  import disabledDate from '../../disabledDate.js';
22
22
  const RangePicker = DatePicker.RangePicker;
23
23
  const rangeValue = (value, format)=>{
24
- if (value && format) return value.map((val)=>moment.utc(val, format).startOf('day')
25
- );
26
- if (value) return value.map((val)=>moment.utc(val).startOf('day')
27
- );
24
+ if (value && format) return value.map((val)=>moment.utc(val, format).startOf('day'));
25
+ if (value) return value.map((val)=>moment.utc(val).startOf('day'));
28
26
  return null;
29
27
  };
30
28
  const DateRangeSelector = ({ blockId , components: { Icon } , events , loading , methods , properties , required , validation , value , })=>{
31
- return(/*#__PURE__*/ React.createElement(Label, {
29
+ return /*#__PURE__*/ React.createElement(Label, {
32
30
  blockId: blockId,
33
31
  components: {
34
32
  Icon
@@ -62,10 +60,10 @@ const DateRangeSelector = ({ blockId , components: { Icon } , events , loading
62
60
  disabled: properties.disabled || loading,
63
61
  disabledDate: disabledDate(properties.disabledDates),
64
62
  format: properties.format || 'YYYY-MM-DD',
65
- getPopupContainer: ()=>document.getElementById(`${blockId}_popup`)
66
- ,
63
+ getPopupContainer: ()=>document.getElementById(`${blockId}_popup`),
67
64
  separator: properties.separator || '~',
68
65
  size: properties.size,
66
+ status: validation.status,
69
67
  placeholder: type.isArray(properties.placeholder) && [
70
68
  properties.placeholder[0] || 'Start Date',
71
69
  properties.placeholder[1] || 'End Date',
@@ -73,14 +71,13 @@ const DateRangeSelector = ({ blockId , components: { Icon } , events , loading
73
71
  'Start Date',
74
72
  'End Date'
75
73
  ],
76
- suffixIcon: properties.suffixIcon && /*#__PURE__*/ React.createElement(Icon, {
74
+ suffixIcon: /*#__PURE__*/ React.createElement(Icon, {
77
75
  blockId: `${blockId}_suffixIcon`,
78
76
  events: events,
79
77
  properties: properties.suffixIcon || 'AiOutlineCalendar'
80
78
  }),
81
79
  onChange: (newVal)=>{
82
- methods.setValue(!newVal ? null : newVal.map((val)=>moment.utc(val.add(val.utcOffset(), 'minutes')).startOf('day').toDate()
83
- ));
80
+ methods.setValue(!newVal ? null : newVal.map((val)=>moment.utc(val.add(val.utcOffset(), 'minutes')).startOf('day').toDate()));
84
81
  methods.triggerEvent({
85
82
  name: 'onChange'
86
83
  });
@@ -88,7 +85,7 @@ const DateRangeSelector = ({ blockId , components: { Icon } , events , loading
88
85
  value: rangeValue(value)
89
86
  }))
90
87
  }
91
- }));
88
+ });
92
89
  };
93
90
  DateRangeSelector.defaultProps = blockDefaultProps;
94
91
  DateRangeSelector.meta = {