@lowdefy/blocks-antd 4.0.0-alpha.7 → 4.0.0-alpha.8

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 +3 -5
  2. package/dist/blocks/Alert/Alert.js +19 -7
  3. package/dist/blocks/AutoComplete/AutoComplete.js +29 -31
  4. package/dist/blocks/Avatar/Avatar.js +4 -6
  5. package/dist/blocks/Badge/Badge.js +4 -6
  6. package/dist/blocks/Breadcrumb/Breadcrumb.js +47 -41
  7. package/dist/blocks/Button/Button.js +7 -9
  8. package/dist/blocks/ButtonSelector/ButtonSelector.js +24 -26
  9. package/dist/blocks/Card/Card.js +3 -5
  10. package/dist/blocks/CheckboxSelector/CheckboxSelector.js +28 -31
  11. package/dist/blocks/CheckboxSwitch/CheckboxSwitch.js +9 -12
  12. package/dist/blocks/Collapse/Collapse.js +29 -18
  13. package/dist/blocks/Comment/Comment.js +4 -6
  14. package/dist/blocks/ConfirmModal/ConfirmModal.js +2 -3
  15. package/dist/blocks/Content/Content.js +3 -5
  16. package/dist/blocks/ControlledList/ControlledList.js +46 -56
  17. package/dist/blocks/DateRangeSelector/DateRangeSelector.js +45 -49
  18. package/dist/blocks/DateRangeSelector/schema.json +1 -1
  19. package/dist/blocks/DateSelector/DateSelector.js +38 -42
  20. package/dist/blocks/DateSelector/schema.json +1 -1
  21. package/dist/blocks/DateTimeSelector/DateTimeSelector.js +45 -49
  22. package/dist/blocks/DateTimeSelector/schema.json +1 -1
  23. package/dist/blocks/Descriptions/Descriptions.js +34 -36
  24. package/dist/blocks/Divider/Divider.js +6 -8
  25. package/dist/blocks/Drawer/Drawer.js +3 -5
  26. package/dist/blocks/Footer/Footer.js +3 -5
  27. package/dist/blocks/Header/Header.js +3 -5
  28. package/dist/blocks/Label/Label.js +52 -60
  29. package/dist/blocks/Layout/Layout.js +3 -5
  30. package/dist/blocks/Menu/Menu.js +127 -124
  31. package/dist/blocks/Message/Message.js +2 -3
  32. package/dist/blocks/MobileMenu/MobileMenu.js +75 -82
  33. package/dist/blocks/Modal/Modal.js +67 -57
  34. package/dist/blocks/MonthSelector/MonthSelector.js +37 -41
  35. package/dist/blocks/MonthSelector/schema.json +1 -1
  36. package/dist/blocks/MultipleSelector/MultipleSelector.js +93 -99
  37. package/dist/blocks/MultipleSelector/schema.json +3 -3
  38. package/dist/blocks/Notification/Notification.js +4 -5
  39. package/dist/blocks/NumberInput/NumberInput.js +2 -3
  40. package/dist/blocks/PageHCF/PageHCF.js +26 -33
  41. package/dist/blocks/PageHCSF/PageHCSF.js +53 -65
  42. package/dist/blocks/PageHSCF/PageHSCF.js +53 -65
  43. package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +141 -166
  44. package/dist/blocks/PageSHCF/PageSHCF.js +52 -64
  45. package/dist/blocks/PageSiderMenu/PageSiderMenu.js +245 -280
  46. package/dist/blocks/Pagination/Pagination.js +1 -2
  47. package/dist/blocks/Paragraph/Paragraph.js +13 -13
  48. package/dist/blocks/ParagraphInput/ParagraphInput.js +11 -11
  49. package/dist/blocks/PasswordInput/PasswordInput.js +2 -3
  50. package/dist/blocks/Progress/Progress.js +1 -2
  51. package/dist/blocks/RadioSelector/RadioSelector.js +28 -31
  52. package/dist/blocks/RatingSlider/RatingSlider.js +115 -122
  53. package/dist/blocks/RatingSlider/schema.json +2 -2
  54. package/dist/blocks/Result/Result.js +5 -7
  55. package/dist/blocks/Selector/Selector.js +85 -91
  56. package/dist/blocks/Selector/schema.json +2 -2
  57. package/dist/blocks/Sider/Sider.js +2 -5
  58. package/dist/blocks/Statistic/Statistic.js +3 -4
  59. package/dist/blocks/Switch/Switch.js +9 -12
  60. package/dist/blocks/Switch/schema.json +2 -2
  61. package/dist/blocks/Tabs/Tabs.js +27 -21
  62. package/dist/blocks/TextArea/TextArea.js +2 -3
  63. package/dist/blocks/TextInput/TextInput.js +4 -5
  64. package/dist/blocks/TimelineList/TimelineList.js +47 -36
  65. package/dist/blocks/Title/Title.js +13 -13
  66. package/dist/blocks/TitleInput/TitleInput.js +11 -11
  67. package/dist/blocks/Tooltip/Tooltip.js +3 -8
  68. package/dist/blocks/WeekSelector/WeekSelector.js +37 -41
  69. package/dist/blocks/WeekSelector/schema.json +1 -1
  70. package/package.json +9 -9
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -17,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
17
16
  import { Affix } from 'antd';
18
17
  import { get } from '@lowdefy/helpers';
19
18
  import { blockDefaultProps } from '@lowdefy/block-utils';
20
- const AffixBlock = ({ blockId , content , methods , properties , rename })=>/*#__PURE__*/ _jsx(Affix, {
19
+ const AffixBlock = ({ blockId , content , methods , properties , rename })=>/*#__PURE__*/ React.createElement(Affix, {
21
20
  id: blockId,
22
21
  className: methods.makeCssClass(properties.style),
23
22
  offsetBottom: properties.offsetBottom,
@@ -31,9 +30,8 @@ const AffixBlock = ({ blockId , content , methods , properties , rename })=>/*#
31
30
  affixed
32
31
  }
33
32
  });
34
- },
35
- children: content.content && content.content()
36
- })
33
+ }
34
+ }, content.content && content.content())
37
35
  ;
38
36
  AffixBlock.defaultProps = blockDefaultProps;
39
37
  AffixBlock.meta = {
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -17,16 +16,30 @@ import { jsx as _jsx } from "react/jsx-runtime";
17
16
  import { Alert } from 'antd';
18
17
  import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
19
18
  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
+ }
20
33
  const AlertBlock = ({ blockId , content , events , components: { Icon } , methods , properties })=>{
21
34
  const additionalProps = {};
22
35
  if (properties.icon) {
23
- additionalProps.icon = /*#__PURE__*/ _jsx(Icon, {
36
+ additionalProps.icon = /*#__PURE__*/ React.createElement(Icon, {
24
37
  blockId: `${blockId}_icon`,
25
38
  events: events,
26
39
  properties: properties.icon
27
40
  });
28
41
  }
29
- return(/*#__PURE__*/ _jsx(Alert, {
42
+ return(/*#__PURE__*/ React.createElement(Alert, _extends({
30
43
  action: content.action && content.action(),
31
44
  afterClose: ()=>methods.triggerEvent({
32
45
  name: 'afterClose'
@@ -40,7 +53,7 @@ const AlertBlock = ({ blockId , content , events , components: { Icon } , metho
40
53
  methods
41
54
  }),
42
55
  id: blockId,
43
- message: type.isNone(properties.message) ? /*#__PURE__*/ _jsx("div", {
56
+ message: type.isNone(properties.message) ? /*#__PURE__*/ React.createElement("div", {
44
57
  style: {
45
58
  marginBottom: -4
46
59
  }
@@ -53,9 +66,8 @@ const AlertBlock = ({ blockId , content , events , components: { Icon } , metho
53
66
  })
54
67
  ,
55
68
  showIcon: properties.showIcon === false ? false : true,
56
- type: properties.type,
57
- ...additionalProps
58
- }));
69
+ type: properties.type
70
+ }, additionalProps)));
59
71
  };
60
72
  AlertBlock.defaultProps = blockDefaultProps;
61
73
  AlertBlock.meta = {
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -22,7 +21,7 @@ import getUniqueValues from '../../getUniqueValues.js';
22
21
  const Option = AutoComplete.Option;
23
22
  const AutoCompleteInput = ({ blockId , components , events , loading , methods , properties , required , validation , value , })=>{
24
23
  const uniqueValueOptions = getUniqueValues(properties.options || []);
25
- return(/*#__PURE__*/ _jsx(Label, {
24
+ return(/*#__PURE__*/ React.createElement(Label, {
26
25
  blockId: blockId,
27
26
  components: components,
28
27
  events: events,
@@ -35,7 +34,7 @@ const AutoCompleteInput = ({ blockId , components , events , loading , methods ,
35
34
  required: required,
36
35
  loading: loading,
37
36
  content: {
38
- content: ()=>/*#__PURE__*/ _jsx(AutoComplete, {
37
+ content: ()=>/*#__PURE__*/ React.createElement(AutoComplete, {
39
38
  id: `${blockId}_input`,
40
39
  autoFocus: properties.autoFocus,
41
40
  backfill: properties.backfill,
@@ -66,34 +65,33 @@ const AutoCompleteInput = ({ blockId , components , events , loading , methods ,
66
65
  }
67
66
  });
68
67
  },
69
- value: type.isNone(value) ? undefined : value,
70
- children: (properties.options || []).map((opt, i)=>type.isPrimitive(opt) ? /*#__PURE__*/ _jsx(Option, {
71
- className: methods.makeCssClass(properties.optionsStyle),
72
- id: `${blockId}_${i}`,
73
- value: `${i}`,
74
- children: renderHtml({
75
- html: `${opt}`,
76
- methods
77
- })
78
- }, i) : /*#__PURE__*/ _jsx(Option, {
79
- className: methods.makeCssClass([
80
- properties.optionsStyle,
81
- opt.style
82
- ]),
83
- disabled: opt.disabled,
84
- filterstring: opt.filterString,
85
- id: `${blockId}_${i}`,
86
- value: `${i}`,
87
- children: type.isNone(opt.label) ? renderHtml({
88
- html: `${opt.value}`,
89
- methods
90
- }) : renderHtml({
91
- html: opt.label,
92
- methods
93
- })
94
- }, i)
95
- )
96
- })
68
+ value: type.isNone(value) ? undefined : value
69
+ }, (properties.options || []).map((opt, i)=>type.isPrimitive(opt) ? /*#__PURE__*/ React.createElement(Option, {
70
+ className: methods.makeCssClass(properties.optionsStyle),
71
+ id: `${blockId}_${i}`,
72
+ key: i,
73
+ value: `${i}`
74
+ }, renderHtml({
75
+ html: `${opt}`,
76
+ methods
77
+ })) : /*#__PURE__*/ React.createElement(Option, {
78
+ className: methods.makeCssClass([
79
+ properties.optionsStyle,
80
+ opt.style
81
+ ]),
82
+ disabled: opt.disabled,
83
+ filterstring: opt.filterString,
84
+ id: `${blockId}_${i}`,
85
+ key: i,
86
+ value: `${i}`
87
+ }, type.isNone(opt.label) ? renderHtml({
88
+ html: `${opt.value}`,
89
+ methods
90
+ }) : renderHtml({
91
+ html: opt.label,
92
+ methods
93
+ }))
94
+ ))
97
95
  }
98
96
  }));
99
97
  };
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -16,7 +15,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
15
  */ import React from 'react';
17
16
  import { Avatar } from 'antd';
18
17
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
- const AvatarBlock = ({ blockId , events , components: { Icon } , methods , properties })=>/*#__PURE__*/ _jsx(Avatar, {
18
+ const AvatarBlock = ({ blockId , events , components: { Icon } , methods , properties })=>/*#__PURE__*/ React.createElement(Avatar, {
20
19
  id: blockId,
21
20
  alt: properties.alt,
22
21
  gap: properties.gap,
@@ -34,13 +33,12 @@ const AvatarBlock = ({ blockId , events , components: { Icon } , methods , prop
34
33
  },
35
34
  properties.style,
36
35
  ]),
37
- icon: properties.icon && /*#__PURE__*/ _jsx(Icon, {
36
+ icon: properties.icon && /*#__PURE__*/ React.createElement(Icon, {
38
37
  blockId: `${blockId}_icon`,
39
38
  events: events,
40
39
  properties: properties.icon
41
- }),
42
- children: properties.content
43
- })
40
+ })
41
+ }, properties.content)
44
42
  ;
45
43
  AvatarBlock.defaultProps = blockDefaultProps;
46
44
  AvatarBlock.meta = {
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -17,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
17
16
  import { type } from '@lowdefy/helpers';
18
17
  import { Badge } from 'antd';
19
18
  import { blockDefaultProps } from '@lowdefy/block-utils';
20
- const BadgeBlock = ({ blockId , events , content , components: { Icon } , properties })=>/*#__PURE__*/ _jsx(Badge, {
19
+ const BadgeBlock = ({ blockId , events , content , components: { Icon } , properties })=>/*#__PURE__*/ React.createElement(Badge, {
21
20
  id: blockId,
22
21
  color: properties.color,
23
22
  dot: properties.dot,
@@ -28,13 +27,12 @@ const BadgeBlock = ({ blockId , events , content , components: { Icon } , prope
28
27
  status: properties.status,
29
28
  text: properties.text,
30
29
  title: properties.title,
31
- count: properties.icon && /*#__PURE__*/ _jsx(Icon, {
30
+ count: properties.icon && /*#__PURE__*/ React.createElement(Icon, {
32
31
  blockId: `${blockId}_icon`,
33
32
  events: events,
34
33
  properties: properties.icon
35
- }) || properties.count,
36
- children: content.content && content.content()
37
- })
34
+ }) || properties.count
35
+ }, content.content && content.content())
38
36
  ;
39
37
  BadgeBlock.defaultProps = blockDefaultProps;
40
38
  BadgeBlock.meta = {
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -17,53 +16,60 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
17
16
  import { type, get } from '@lowdefy/helpers';
18
17
  import { Breadcrumb } from 'antd';
19
18
  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
+ }
20
33
  const BreadcrumbBlock = ({ blockId , events , components: { Icon , Link } , methods , properties , rename , })=>{
21
34
  const onClickActionName = get(rename, 'events.onClick', {
22
35
  default: 'onClick'
23
36
  });
24
- return(/*#__PURE__*/ _jsx(Breadcrumb, {
37
+ return(/*#__PURE__*/ React.createElement(Breadcrumb, {
25
38
  id: blockId,
26
39
  separator: properties.separator,
27
- className: methods.makeCssClass(properties.style),
28
- children: (properties.list || []).map((link, index)=>/*#__PURE__*/ _jsx(Breadcrumb.Item, {
29
- onClick: events[onClickActionName] && (()=>methods.triggerEvent({
30
- name: onClickActionName,
31
- event: {
32
- link,
33
- index
34
- }
35
- })
36
- ),
37
- children: /*#__PURE__*/ _jsx(Link, {
38
- id: `${blockId}_${index}`,
39
- className: methods.makeCssClass([
40
- {
41
- cursor: events[onClickActionName] && 'pointer'
42
- },
43
- link.style,
44
- ]),
45
- ...link,
46
- children: (defaultTitle)=>/*#__PURE__*/ _jsxs(_Fragment, {
47
- children: [
48
- link.icon && /*#__PURE__*/ _jsx(Icon, {
49
- blockId: `${blockId}_${index}_icon`,
50
- events: events,
51
- properties: {
52
- name: type.isString(link.icon) && link.icon,
53
- ...type.isObject(link.icon) ? link.icon : {},
54
- style: {
55
- paddingRight: 8,
56
- ...link.icon.style || {}
57
- }
58
- }
59
- }),
60
- type.isString(link) ? link : link.label || defaultTitle
61
- ]
62
- })
40
+ className: methods.makeCssClass(properties.style)
41
+ }, (properties.list || []).map((link, index)=>/*#__PURE__*/ React.createElement(Breadcrumb.Item, {
42
+ key: index,
43
+ onClick: events[onClickActionName] && (()=>methods.triggerEvent({
44
+ name: onClickActionName,
45
+ event: {
46
+ link,
47
+ index
48
+ }
63
49
  })
64
- }, index)
65
- )
66
- }));
50
+ )
51
+ }, /*#__PURE__*/ React.createElement(Link, _extends({
52
+ id: `${blockId}_${index}`,
53
+ className: methods.makeCssClass([
54
+ {
55
+ cursor: events[onClickActionName] && 'pointer'
56
+ },
57
+ link.style,
58
+ ])
59
+ }, link), (defaultTitle)=>/*#__PURE__*/ React.createElement(React.Fragment, null, link.icon && /*#__PURE__*/ React.createElement(Icon, {
60
+ blockId: `${blockId}_${index}_icon`,
61
+ events: events,
62
+ properties: {
63
+ name: type.isString(link.icon) && link.icon,
64
+ ...type.isObject(link.icon) ? link.icon : {},
65
+ style: {
66
+ paddingRight: 8,
67
+ ...link.icon.style || {}
68
+ }
69
+ }
70
+ }), type.isString(link) ? link : link.label || defaultTitle)
71
+ ))
72
+ )));
67
73
  };
68
74
  BreadcrumbBlock.defaultProps = blockDefaultProps;
69
75
  BreadcrumbBlock.meta = {
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -22,7 +21,7 @@ const ButtonBlock = ({ blockId , events , loading , components: { Icon } , meth
22
21
  const onClickActionName = get(rename, 'events.onClick', {
23
22
  default: 'onClick'
24
23
  });
25
- return(/*#__PURE__*/ _jsx(Button, {
24
+ return(/*#__PURE__*/ React.createElement(Button, {
26
25
  block: properties.block,
27
26
  className: methods.makeCssClass([
28
27
  {
@@ -50,7 +49,7 @@ const ButtonBlock = ({ blockId , events , loading , components: { Icon } , meth
50
49
  type: get(properties, 'type', {
51
50
  default: 'primary'
52
51
  }),
53
- icon: properties.icon && /*#__PURE__*/ _jsx(Icon, {
52
+ icon: properties.icon && /*#__PURE__*/ React.createElement(Icon, {
54
53
  blockId: `${blockId}_icon`,
55
54
  events: events,
56
55
  properties: properties.icon
@@ -58,12 +57,11 @@ const ButtonBlock = ({ blockId , events , loading , components: { Icon } , meth
58
57
  onClick: onClick || (()=>methods.triggerEvent({
59
58
  name: onClickActionName
60
59
  })
61
- ),
62
- children: !properties.hideTitle && renderHtml({
63
- html: type.isNone(properties.title) ? blockId : properties.title,
64
- methods
65
- })
66
- }));
60
+ )
61
+ }, !properties.hideTitle && renderHtml({
62
+ html: type.isNone(properties.title) ? blockId : properties.title,
63
+ methods
64
+ })));
67
65
  };
68
66
  ButtonBlock.defaultProps = blockDefaultProps;
69
67
  ButtonBlock.meta = {
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -22,7 +21,7 @@ import getValueIndex from '../../getValueIndex.js';
22
21
  import getUniqueValues from '../../getUniqueValues.js';
23
22
  const ButtonSelector = ({ blockId , components , events , loading , properties , required , validation , value , methods , })=>{
24
23
  const uniqueValueOptions = getUniqueValues(properties.options || []);
25
- return(/*#__PURE__*/ _jsx(Label, {
24
+ return(/*#__PURE__*/ React.createElement(Label, {
26
25
  blockId: blockId,
27
26
  components: components,
28
27
  events: events,
@@ -35,7 +34,7 @@ const ButtonSelector = ({ blockId , components , events , loading , properties ,
35
34
  required: required,
36
35
  loading: loading,
37
36
  content: {
38
- content: ()=>/*#__PURE__*/ _jsx(Radio.Group, {
37
+ content: ()=>/*#__PURE__*/ React.createElement(Radio.Group, {
39
38
  id: `${blockId}_input`,
40
39
  className: methods.makeCssClass([
41
40
  properties.color && {
@@ -55,29 +54,28 @@ const ButtonSelector = ({ blockId , components , events , loading , properties ,
55
54
  name: 'onChange'
56
55
  });
57
56
  },
58
- value: type.isNone(value) ? undefined : getValueIndex(value, properties.options || []),
59
- children: uniqueValueOptions.map((opt, i)=>type.isPrimitive(opt) ? /*#__PURE__*/ _jsx(Radio.Button, {
60
- id: `${blockId}_${i}`,
61
- value: `${i}`,
62
- children: renderHtml({
63
- html: `${opt}`,
64
- methods
65
- })
66
- }, i) : /*#__PURE__*/ _jsx(Radio.Button, {
67
- id: `${blockId}_${i}`,
68
- value: `${i}`,
69
- disabled: opt.disabled,
70
- className: methods.makeCssClass(opt.style),
71
- children: type.isNone(opt.label) ? renderHtml({
72
- html: `${opt.value}`,
73
- methods
74
- }) : renderHtml({
75
- html: opt.label,
76
- methods
77
- })
78
- }, i)
79
- )
80
- })
57
+ value: type.isNone(value) ? undefined : getValueIndex(value, properties.options || [])
58
+ }, uniqueValueOptions.map((opt, i)=>type.isPrimitive(opt) ? /*#__PURE__*/ React.createElement(Radio.Button, {
59
+ id: `${blockId}_${i}`,
60
+ key: i,
61
+ value: `${i}`
62
+ }, renderHtml({
63
+ html: `${opt}`,
64
+ methods
65
+ })) : /*#__PURE__*/ React.createElement(Radio.Button, {
66
+ id: `${blockId}_${i}`,
67
+ key: i,
68
+ value: `${i}`,
69
+ disabled: opt.disabled,
70
+ className: methods.makeCssClass(opt.style)
71
+ }, type.isNone(opt.label) ? renderHtml({
72
+ html: `${opt.value}`,
73
+ methods
74
+ }) : renderHtml({
75
+ html: opt.label,
76
+ methods
77
+ }))
78
+ ))
81
79
  }
82
80
  }));
83
81
  };
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -16,7 +15,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
15
  */ import React from 'react';
17
16
  import { Card } from 'antd';
18
17
  import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
19
- const CardBlock = ({ blockId , content , properties , methods , events })=>/*#__PURE__*/ _jsx(Card, {
18
+ const CardBlock = ({ blockId , content , properties , methods , events })=>/*#__PURE__*/ React.createElement(Card, {
20
19
  id: blockId,
21
20
  title: content.title ? content.title() : renderHtml({
22
21
  html: properties.title,
@@ -39,9 +38,8 @@ const CardBlock = ({ blockId , content , properties , methods , events })=>/*#_
39
38
  cursor: events.onClick && 'pointer'
40
39
  },
41
40
  properties.style,
42
- ]),
43
- children: content.content && content.content()
44
- })
41
+ ])
42
+ }, content.content && content.content())
45
43
  ;
46
44
  CardBlock.defaultProps = blockDefaultProps;
47
45
  CardBlock.meta = {
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -22,7 +21,7 @@ import getValueIndex from '../../getValueIndex.js';
22
21
  import getUniqueValues from '../../getUniqueValues.js';
23
22
  const CheckboxSelector = ({ blockId , components , events , loading , properties , required , validation , value , methods , })=>{
24
23
  const uniqueValueOptions = getUniqueValues(properties.options || []);
25
- return(/*#__PURE__*/ _jsx(Label, {
24
+ return(/*#__PURE__*/ React.createElement(Label, {
26
25
  blockId: blockId,
27
26
  components: components,
28
27
  events: events,
@@ -35,7 +34,7 @@ const CheckboxSelector = ({ blockId , components , events , loading , properties
35
34
  required: required,
36
35
  loading: loading,
37
36
  content: {
38
- content: ()=>/*#__PURE__*/ _jsx(Checkbox.Group, {
37
+ content: ()=>/*#__PURE__*/ React.createElement(Checkbox.Group, {
39
38
  id: `${blockId}_input`,
40
39
  className: methods.makeCssClass([
41
40
  properties.color && {
@@ -57,34 +56,32 @@ const CheckboxSelector = ({ blockId , components , events , loading , properties
57
56
  name: 'onChange'
58
57
  });
59
58
  },
60
- value: getValueIndex(value, uniqueValueOptions, true),
61
- children: /*#__PURE__*/ _jsx(Space, {
62
- direction: properties.direction,
63
- wrap: type.isNone(properties.wrap) ? true : properties.wrap,
64
- align: type.isNone(properties.align) ? 'start' : properties.align,
65
- children: uniqueValueOptions.map((opt, i)=>type.isPrimitive(opt) ? /*#__PURE__*/ _jsx(Checkbox, {
66
- id: `${blockId}_${i}`,
67
- value: `${i}`,
68
- children: renderHtml({
69
- html: `${opt}`,
70
- methods
71
- })
72
- }, i) : /*#__PURE__*/ _jsx(Checkbox, {
73
- id: `${blockId}_${i}`,
74
- value: `${i}`,
75
- disabled: opt.disabled,
76
- className: methods.makeCssClass(opt.style),
77
- children: type.isNone(opt.label) ? renderHtml({
78
- html: `${opt.value}`,
79
- methods
80
- }) : renderHtml({
81
- html: opt.label,
82
- methods
83
- })
84
- }, i)
85
- )
86
- })
87
- })
59
+ value: getValueIndex(value, uniqueValueOptions, true)
60
+ }, /*#__PURE__*/ React.createElement(Space, {
61
+ direction: properties.direction,
62
+ wrap: type.isNone(properties.wrap) ? true : properties.wrap,
63
+ align: type.isNone(properties.align) ? 'start' : properties.align
64
+ }, uniqueValueOptions.map((opt, i)=>type.isPrimitive(opt) ? /*#__PURE__*/ React.createElement(Checkbox, {
65
+ id: `${blockId}_${i}`,
66
+ key: i,
67
+ value: `${i}`
68
+ }, renderHtml({
69
+ html: `${opt}`,
70
+ methods
71
+ })) : /*#__PURE__*/ React.createElement(Checkbox, {
72
+ id: `${blockId}_${i}`,
73
+ key: i,
74
+ value: `${i}`,
75
+ disabled: opt.disabled,
76
+ className: methods.makeCssClass(opt.style)
77
+ }, type.isNone(opt.label) ? renderHtml({
78
+ html: `${opt.value}`,
79
+ methods
80
+ }) : renderHtml({
81
+ html: opt.label,
82
+ methods
83
+ }))
84
+ )))
88
85
  }
89
86
  }));
90
87
  };
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -18,7 +17,7 @@ import { Checkbox, Space } from 'antd';
18
17
  import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
19
18
  import Label from '../Label/Label.js';
20
19
  const CheckboxSwitch = ({ blockId , components , events , loading , properties , required , validation , value , methods , })=>{
21
- return(/*#__PURE__*/ _jsx(Label, {
20
+ return(/*#__PURE__*/ React.createElement(Label, {
22
21
  blockId: blockId,
23
22
  components: components,
24
23
  events: events,
@@ -31,7 +30,7 @@ const CheckboxSwitch = ({ blockId , components , events , loading , properties ,
31
30
  required: required,
32
31
  loading: loading,
33
32
  content: {
34
- content: ()=>/*#__PURE__*/ _jsx(Checkbox, {
33
+ content: ()=>/*#__PURE__*/ React.createElement(Checkbox, {
35
34
  id: `${blockId}_input`,
36
35
  checked: value,
37
36
  disabled: properties.disabled,
@@ -52,15 +51,13 @@ const CheckboxSwitch = ({ blockId , components , events , loading , properties ,
52
51
  methods.triggerEvent({
53
52
  name: 'onChange'
54
53
  });
55
- },
56
- children: /*#__PURE__*/ _jsx(Space, {
57
- wrap: true,
58
- children: renderHtml({
59
- html: properties.description,
60
- methods
61
- })
62
- })
63
- })
54
+ }
55
+ }, /*#__PURE__*/ React.createElement(Space, {
56
+ wrap: true
57
+ }, renderHtml({
58
+ html: properties.description,
59
+ methods
60
+ })))
64
61
  }
65
62
  }));
66
63
  };