@lowdefy/blocks-antd 4.0.0-alpha.12 → 4.0.0-alpha.13

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 (62) 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 +4 -6
  4. package/dist/blocks/Avatar/Avatar.js +2 -4
  5. package/dist/blocks/Badge/Badge.js +1 -2
  6. package/dist/blocks/Breadcrumb/Breadcrumb.js +17 -20
  7. package/dist/blocks/Button/Button.js +3 -4
  8. package/dist/blocks/ButtonSelector/ButtonSelector.js +3 -4
  9. package/dist/blocks/Card/Card.js +2 -4
  10. package/dist/blocks/CheckboxSelector/CheckboxSelector.js +3 -4
  11. package/dist/blocks/CheckboxSwitch/CheckboxSwitch.js +2 -2
  12. package/dist/blocks/Collapse/Collapse.js +19 -23
  13. package/dist/blocks/Comment/Comment.js +2 -2
  14. package/dist/blocks/ConfirmModal/ConfirmModal.js +2 -2
  15. package/dist/blocks/Content/Content.js +1 -2
  16. package/dist/blocks/ControlledList/ControlledList.js +2 -2
  17. package/dist/blocks/DateRangeSelector/DateRangeSelector.js +6 -10
  18. package/dist/blocks/DateSelector/DateSelector.js +3 -4
  19. package/dist/blocks/DateTimeSelector/DateTimeSelector.js +3 -4
  20. package/dist/blocks/Descriptions/Descriptions.js +6 -8
  21. package/dist/blocks/Divider/Divider.js +1 -2
  22. package/dist/blocks/Drawer/Drawer.js +4 -6
  23. package/dist/blocks/Footer/Footer.js +1 -2
  24. package/dist/blocks/Header/Header.js +1 -2
  25. package/dist/blocks/Label/Label.js +20 -24
  26. package/dist/blocks/Layout/Layout.js +1 -2
  27. package/dist/blocks/Menu/Menu.js +39 -47
  28. package/dist/blocks/Message/Message.js +3 -4
  29. package/dist/blocks/MobileMenu/MobileMenu.js +4 -6
  30. package/dist/blocks/Modal/Modal.js +19 -22
  31. package/dist/blocks/MonthSelector/MonthSelector.js +3 -4
  32. package/dist/blocks/MultipleSelector/MultipleSelector.js +5 -8
  33. package/dist/blocks/Notification/Notification.js +4 -6
  34. package/dist/blocks/NumberInput/NumberInput.js +2 -2
  35. package/dist/blocks/PageHCF/PageHCF.js +1 -2
  36. package/dist/blocks/PageHCSF/PageHCSF.js +1 -2
  37. package/dist/blocks/PageHSCF/PageHSCF.js +1 -2
  38. package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +2 -2
  39. package/dist/blocks/PageSHCF/PageSHCF.js +1 -2
  40. package/dist/blocks/PageSiderMenu/PageSiderMenu.js +3 -4
  41. package/dist/blocks/Pagination/Pagination.js +3 -4
  42. package/dist/blocks/Paragraph/Paragraph.js +1 -2
  43. package/dist/blocks/ParagraphInput/ParagraphInput.js +2 -2
  44. package/dist/blocks/PasswordInput/PasswordInput.js +4 -4
  45. package/dist/blocks/Progress/Progress.js +1 -2
  46. package/dist/blocks/RadioSelector/RadioSelector.js +3 -4
  47. package/dist/blocks/RatingSlider/RatingSlider.js +4 -6
  48. package/dist/blocks/Result/Result.js +1 -2
  49. package/dist/blocks/Selector/Selector.js +5 -8
  50. package/dist/blocks/Sider/Sider.js +4 -6
  51. package/dist/blocks/Statistic/Statistic.js +1 -2
  52. package/dist/blocks/Switch/Switch.js +2 -2
  53. package/dist/blocks/Tabs/Tabs.js +20 -25
  54. package/dist/blocks/TextArea/TextArea.js +4 -4
  55. package/dist/blocks/TextInput/TextInput.js +4 -4
  56. package/dist/blocks/TimelineList/TimelineList.js +18 -18
  57. package/dist/blocks/Title/Title.js +2 -2
  58. package/dist/blocks/TitleInput/TitleInput.js +2 -2
  59. package/dist/blocks/Tooltip/Tooltip.js +1 -2
  60. package/dist/blocks/WeekSelector/WeekSelector.js +3 -4
  61. package/dist/disabledDate.js +3 -6
  62. package/package.json +21 -20
@@ -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 = {
@@ -21,7 +21,7 @@ import getUniqueValues from '../../getUniqueValues.js';
21
21
  const Option = AutoComplete.Option;
22
22
  const AutoCompleteInput = ({ blockId , components , events , loading , methods , properties , required , validation , value , })=>{
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,
@@ -44,8 +44,7 @@ const AutoCompleteInput = ({ blockId , components , events , loading , methods ,
44
44
  placeholder: properties.placeholder || 'Type or select item',
45
45
  allowClear: properties.allowClear !== false,
46
46
  size: properties.size,
47
- filterOption: (input, option)=>(option.filterstring || option.children.props.html || '').toLowerCase().indexOf(input.toLowerCase()) >= 0
48
- ,
47
+ filterOption: (input, option)=>(option.filterstring || option.children.props.html || '').toLowerCase().indexOf(input.toLowerCase()) >= 0,
49
48
  onChange: (newVal)=>{
50
49
  let val = type.isPrimitive(uniqueValueOptions[newVal]) ? uniqueValueOptions[newVal] : uniqueValueOptions[newVal].value;
51
50
  if (type.isNone(val)) {
@@ -89,10 +88,9 @@ const AutoCompleteInput = ({ blockId , components , events , loading , methods ,
89
88
  }) : renderHtml({
90
89
  html: opt.label,
91
90
  methods
92
- }))
93
- ))
91
+ }))))
94
92
  }
95
- }));
93
+ });
96
94
  };
97
95
  AutoCompleteInput.defaultProps = blockDefaultProps;
98
96
  AutoCompleteInput.meta = {
@@ -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([
@@ -67,9 +66,7 @@ const BreadcrumbBlock = ({ blockId , events , components: { Icon , Link } , met
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 || defaultTitle)))));
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,8 +60,7 @@ 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,
69
66
  placeholder: type.isArray(properties.placeholder) && [
@@ -79,8 +76,7 @@ const DateRangeSelector = ({ blockId , components: { Icon } , events , loading
79
76
  properties: properties.suffixIcon || 'AiOutlineCalendar'
80
77
  }),
81
78
  onChange: (newVal)=>{
82
- methods.setValue(!newVal ? null : newVal.map((val)=>moment.utc(val.add(val.utcOffset(), 'minutes')).startOf('day').toDate()
83
- ));
79
+ methods.setValue(!newVal ? null : newVal.map((val)=>moment.utc(val.add(val.utcOffset(), 'minutes')).startOf('day').toDate()));
84
80
  methods.triggerEvent({
85
81
  name: 'onChange'
86
82
  });
@@ -88,7 +84,7 @@ const DateRangeSelector = ({ blockId , components: { Icon } , events , loading
88
84
  value: rangeValue(value)
89
85
  }))
90
86
  }
91
- }));
87
+ });
92
88
  };
93
89
  DateRangeSelector.defaultProps = blockDefaultProps;
94
90
  DateRangeSelector.meta = {
@@ -20,7 +20,7 @@ import { DatePicker } from 'antd';
20
20
  import Label from '../Label/Label.js';
21
21
  import disabledDate from '../../disabledDate.js';
22
22
  const DateSelector = ({ blockId , components: { Icon } , events , loading , methods , properties , required , validation , value , })=>{
23
- return(/*#__PURE__*/ React.createElement(Label, {
23
+ return /*#__PURE__*/ React.createElement(Label, {
24
24
  blockId: blockId,
25
25
  components: {
26
26
  Icon
@@ -53,8 +53,7 @@ const DateSelector = ({ blockId , components: { Icon } , events , loading , met
53
53
  ]),
54
54
  disabled: properties.disabled || loading,
55
55
  format: properties.format || 'YYYY-MM-DD',
56
- getPopupContainer: ()=>document.getElementById(`${blockId}_popup`)
57
- ,
56
+ getPopupContainer: ()=>document.getElementById(`${blockId}_popup`),
58
57
  placeholder: properties.placeholder || 'Select Date',
59
58
  showToday: properties.showToday,
60
59
  size: properties.size,
@@ -73,7 +72,7 @@ const DateSelector = ({ blockId , components: { Icon } , events , loading , met
73
72
  value: type.isDate(value) ? moment.utc(value).startOf('day') : null
74
73
  }))
75
74
  }
76
- }));
75
+ });
77
76
  };
78
77
  DateSelector.defaultProps = blockDefaultProps;
79
78
  DateSelector.meta = {
@@ -21,7 +21,7 @@ import Label from '../Label/Label.js';
21
21
  import disabledDate from '../../disabledDate.js';
22
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
- return(/*#__PURE__*/ React.createElement(Label, {
24
+ return /*#__PURE__*/ React.createElement(Label, {
25
25
  blockId: blockId,
26
26
  components: {
27
27
  Icon
@@ -55,8 +55,7 @@ const DateTimeSelector = ({ blockId , components: { Icon } , events , loading ,
55
55
  disabled: properties.disabled || loading,
56
56
  disabledDate: disabledDate(properties.disabledDates),
57
57
  format: properties.format || 'YYYY-MM-DD HH:mm',
58
- getPopupContainer: ()=>document.getElementById(`${blockId}_popup`)
59
- ,
58
+ getPopupContainer: ()=>document.getElementById(`${blockId}_popup`),
60
59
  placeholder: properties.placeholder || 'Select Date & Time',
61
60
  showNow: properties.showNow,
62
61
  showToday: properties.showToday,
@@ -81,7 +80,7 @@ const DateTimeSelector = ({ blockId , components: { Icon } , events , loading ,
81
80
  value: !type.isDate(value) ? null : properties.selectUTC ? moment.utc(value) : moment(value)
82
81
  }))
83
82
  }
84
- }));
83
+ });
85
84
  };
86
85
  DateTimeSelector.defaultProps = blockDefaultProps;
87
86
  DateTimeSelector.meta = {
@@ -22,11 +22,10 @@ const DescriptionsBlock = ({ blockId , content , properties , methods })=>{
22
22
  dataItem = Object.keys(dataItem).map((key)=>({
23
23
  value: dataItem[key],
24
24
  key
25
- })
26
- );
25
+ }));
27
26
  }
28
27
  const { makeCssClass } = methods;
29
- return(/*#__PURE__*/ React.createElement(Descriptions, {
28
+ return /*#__PURE__*/ React.createElement(Descriptions, {
30
29
  id: blockId,
31
30
  bordered: properties.bordered,
32
31
  colon: properties.colon,
@@ -48,11 +47,10 @@ const DescriptionsBlock = ({ blockId , content , properties , methods })=>{
48
47
  key: item1.toString()
49
48
  };
50
49
  }
51
- const itemOption = (properties.itemOptions || []).find((item)=>row.key === item.key
52
- ) || {};
50
+ const itemOption = (properties.itemOptions || []).find((item)=>row.key === item.key) || {};
53
51
  const value = type.isFunction(itemOption.transformValue) ? itemOption.transformValue(row.value, row, i) : row.value;
54
52
  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, {
53
+ return /*#__PURE__*/ React.createElement(Descriptions.Item, {
56
54
  key: i,
57
55
  label: renderHtml({
58
56
  html: label,
@@ -71,8 +69,8 @@ const DescriptionsBlock = ({ blockId , content , properties , methods })=>{
71
69
  }, renderHtml({
72
70
  html: value,
73
71
  methods
74
- })));
75
- })));
72
+ }));
73
+ }));
76
74
  };
77
75
  DescriptionsBlock.defaultProps = blockDefaultProps;
78
76
  DescriptionsBlock.meta = {
@@ -25,8 +25,7 @@ const DividerBlock = ({ blockId , properties , methods })=>/*#__PURE__*/ React.
25
25
  }, renderHtml({
26
26
  html: properties.title,
27
27
  methods
28
- }))
29
- ;
28
+ }));
30
29
  DividerBlock.defaultProps = blockDefaultProps;
31
30
  DividerBlock.meta = {
32
31
  category: 'display',
@@ -48,8 +48,7 @@ const DrawerBlock = ({ blockId , content , properties , methods , rename , onClo
48
48
  setOpen,
49
49
  methods,
50
50
  rename
51
- })
52
- );
51
+ }));
53
52
  methods.registerMethod(get(rename, 'methods.setOpen', {
54
53
  default: 'setOpen'
55
54
  }), ({ open })=>triggerSetOpen({
@@ -57,10 +56,9 @@ const DrawerBlock = ({ blockId , content , properties , methods , rename , onClo
57
56
  setOpen,
58
57
  methods,
59
58
  rename
60
- })
61
- );
59
+ }));
62
60
  });
63
- return(/*#__PURE__*/ React.createElement(Drawer, {
61
+ return /*#__PURE__*/ React.createElement(Drawer, {
64
62
  id: blockId,
65
63
  closable: properties.closable,
66
64
  extra: content.extra && content.extra(),
@@ -93,7 +91,7 @@ const DrawerBlock = ({ blockId , content , properties , methods , rename , onClo
93
91
  bodyStyle: methods.makeCssClass(properties.bodyStyle, true),
94
92
  maskStyle: methods.makeCssClass(properties.maskStyle, true),
95
93
  contentWrapperStyle: methods.makeCssClass(properties.contentWrapperStyle, true)
96
- }, content.content && content.content()));
94
+ }, content.content && content.content());
97
95
  };
98
96
  DrawerBlock.defaultProps = blockDefaultProps;
99
97
  DrawerBlock.meta = {
@@ -24,8 +24,7 @@ const FooterBlock = ({ blockId , content , methods , properties })=>/*#__PURE__
24
24
  },
25
25
  properties.style
26
26
  ])} hide-on-print`
27
- }, content.content && content.content())
28
- ;
27
+ }, content.content && content.content());
29
28
  FooterBlock.defaultProps = blockDefaultProps;
30
29
  FooterBlock.meta = {
31
30
  category: 'container',