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

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 (229) hide show
  1. package/dist/blocks/Affix/Affix.js +11 -6
  2. package/dist/blocks/Affix/style.less +1 -1
  3. package/dist/blocks/Alert/Alert.js +28 -10
  4. package/dist/blocks/Alert/style.less +1 -1
  5. package/dist/blocks/AutoComplete/AutoComplete.js +41 -34
  6. package/dist/blocks/AutoComplete/style.less +1 -1
  7. package/dist/blocks/Avatar/Avatar.js +12 -7
  8. package/dist/blocks/Avatar/schema.json +1 -1
  9. package/dist/blocks/Avatar/style.less +1 -1
  10. package/dist/blocks/Badge/Badge.js +12 -7
  11. package/dist/blocks/Badge/schema.json +1 -1
  12. package/dist/blocks/Badge/style.less +1 -1
  13. package/dist/blocks/Breadcrumb/Breadcrumb.js +56 -64
  14. package/dist/blocks/Breadcrumb/schema.json +1 -1
  15. package/dist/blocks/Breadcrumb/style.less +1 -1
  16. package/dist/blocks/Button/Button.js +22 -13
  17. package/dist/blocks/Button/schema.json +1 -1
  18. package/dist/blocks/Button/style.less +1 -1
  19. package/dist/blocks/ButtonSelector/ButtonSelector.js +36 -29
  20. package/dist/blocks/ButtonSelector/style.less +1 -1
  21. package/dist/blocks/Card/Card.js +11 -6
  22. package/dist/blocks/Card/style.less +1 -1
  23. package/dist/blocks/CheckboxSelector/CheckboxSelector.js +40 -34
  24. package/dist/blocks/CheckboxSelector/style.less +1 -1
  25. package/dist/blocks/CheckboxSwitch/CheckboxSwitch.js +21 -15
  26. package/dist/blocks/CheckboxSwitch/style.less +1 -1
  27. package/dist/blocks/Collapse/Collapse.js +38 -21
  28. package/dist/blocks/Collapse/schema.json +1 -1
  29. package/dist/blocks/Collapse/style.less +1 -1
  30. package/dist/blocks/Comment/Comment.js +13 -9
  31. package/dist/blocks/Comment/style.less +1 -1
  32. package/dist/blocks/ConfirmModal/ConfirmModal.js +28 -10
  33. package/dist/blocks/ConfirmModal/schema.json +1 -1
  34. package/dist/blocks/ConfirmModal/style.less +1 -1
  35. package/dist/blocks/Content/Content.js +11 -6
  36. package/dist/blocks/Content/style.less +1 -1
  37. package/dist/blocks/ControlledList/ControlledList.js +61 -63
  38. package/dist/blocks/ControlledList/style.less +1 -1
  39. package/dist/blocks/DateRangeSelector/DateRangeSelector.js +55 -50
  40. package/dist/blocks/DateRangeSelector/schema.json +2 -2
  41. package/dist/blocks/DateRangeSelector/style.less +1 -1
  42. package/dist/blocks/DateSelector/DateSelector.js +49 -44
  43. package/dist/blocks/DateSelector/schema.json +2 -2
  44. package/dist/blocks/DateSelector/style.less +1 -1
  45. package/dist/blocks/DateTimeSelector/DateTimeSelector.js +56 -51
  46. package/dist/blocks/DateTimeSelector/schema.json +2 -2
  47. package/dist/blocks/DateTimeSelector/style.less +1 -1
  48. package/dist/blocks/Descriptions/Descriptions.js +42 -38
  49. package/dist/blocks/Descriptions/style.less +1 -1
  50. package/dist/blocks/Divider/Divider.js +14 -9
  51. package/dist/blocks/Divider/style.less +1 -1
  52. package/dist/blocks/Drawer/Drawer.js +11 -6
  53. package/dist/blocks/Drawer/style.less +1 -1
  54. package/dist/blocks/Footer/Footer.js +11 -6
  55. package/dist/blocks/Footer/style.less +1 -1
  56. package/dist/blocks/Header/Header.js +11 -9
  57. package/dist/blocks/Header/schema.json +0 -4
  58. package/dist/blocks/Header/style.less +1 -1
  59. package/dist/blocks/Label/Label.js +70 -67
  60. package/dist/blocks/Label/getLabelCol.js +1 -1
  61. package/dist/blocks/Label/getWrapperCol.js +1 -1
  62. package/dist/blocks/Label/labelLogic.js +2 -3
  63. package/dist/blocks/Label/style.less +1 -1
  64. package/dist/blocks/Layout/Layout.js +11 -6
  65. package/dist/blocks/Layout/style.less +1 -1
  66. package/dist/blocks/Menu/Menu.js +123 -218
  67. package/dist/blocks/Menu/schema.json +1 -15
  68. package/dist/blocks/Menu/style.less +1 -1
  69. package/dist/blocks/Message/Message.js +11 -6
  70. package/dist/blocks/Message/schema.json +1 -1
  71. package/dist/blocks/Message/style.less +1 -1
  72. package/dist/blocks/MobileMenu/MobileMenu.js +85 -85
  73. package/dist/blocks/MobileMenu/schema.json +1 -15
  74. package/dist/blocks/MobileMenu/style.less +1 -1
  75. package/dist/blocks/Modal/Modal.js +76 -60
  76. package/dist/blocks/Modal/style.less +1 -1
  77. package/dist/blocks/MonthSelector/MonthSelector.js +47 -42
  78. package/dist/blocks/MonthSelector/schema.json +2 -2
  79. package/dist/blocks/MonthSelector/style.less +1 -1
  80. package/dist/blocks/MultipleSelector/MultipleSelector.js +104 -99
  81. package/dist/blocks/MultipleSelector/schema.json +6 -6
  82. package/dist/blocks/MultipleSelector/style.less +1 -1
  83. package/dist/blocks/Notification/Notification.js +13 -8
  84. package/dist/blocks/Notification/schema.json +2 -2
  85. package/dist/blocks/Notification/style.less +1 -1
  86. package/dist/blocks/NumberInput/NumberInput.js +14 -6
  87. package/dist/blocks/NumberInput/style.less +1 -1
  88. package/dist/blocks/PageHCF/PageHCF.js +34 -34
  89. package/dist/blocks/PageHCF/schema.json +0 -29
  90. package/dist/blocks/PageHCF/style.less +1 -1
  91. package/dist/blocks/PageHCSF/PageHCSF.js +61 -66
  92. package/dist/blocks/PageHCSF/schema.json +0 -30
  93. package/dist/blocks/PageHCSF/style.less +1 -1
  94. package/dist/blocks/PageHSCF/PageHSCF.js +61 -66
  95. package/dist/blocks/PageHSCF/schema.json +0 -30
  96. package/dist/blocks/PageHSCF/style.less +1 -1
  97. package/dist/blocks/PageHeaderMenu/PageHeaderMenu.js +151 -167
  98. package/dist/blocks/PageHeaderMenu/schema.json +1 -24
  99. package/dist/blocks/PageHeaderMenu/style.less +1 -1
  100. package/dist/blocks/PageSHCF/PageSHCF.js +60 -65
  101. package/dist/blocks/PageSHCF/schema.json +0 -30
  102. package/dist/blocks/PageSHCF/style.less +1 -1
  103. package/dist/blocks/PageSiderMenu/PageSiderMenu.js +258 -285
  104. package/dist/blocks/PageSiderMenu/schema.json +1 -31
  105. package/dist/blocks/PageSiderMenu/style.less +1 -1
  106. package/dist/blocks/Pagination/Pagination.js +17 -5
  107. package/dist/blocks/Pagination/style.less +1 -1
  108. package/dist/blocks/Paragraph/Paragraph.js +21 -14
  109. package/dist/blocks/Paragraph/style.less +1 -1
  110. package/dist/blocks/ParagraphInput/ParagraphInput.js +22 -14
  111. package/dist/blocks/ParagraphInput/style.less +1 -1
  112. package/dist/blocks/PasswordInput/PasswordInput.js +14 -6
  113. package/dist/blocks/PasswordInput/style.less +1 -1
  114. package/dist/blocks/Progress/Progress.js +9 -3
  115. package/dist/blocks/Progress/style.less +1 -1
  116. package/dist/blocks/RadioSelector/RadioSelector.js +40 -34
  117. package/dist/blocks/RadioSelector/style.less +1 -1
  118. package/dist/blocks/RatingSlider/RatingSlider.js +127 -126
  119. package/dist/blocks/RatingSlider/schema.json +4 -4
  120. package/dist/blocks/RatingSlider/style.less +1 -1
  121. package/dist/blocks/Result/Result.js +13 -8
  122. package/dist/blocks/Result/schema.json +1 -1
  123. package/dist/blocks/Result/style.less +1 -1
  124. package/dist/blocks/Selector/Selector.js +96 -91
  125. package/dist/blocks/Selector/schema.json +4 -4
  126. package/dist/blocks/Selector/style.less +1 -1
  127. package/dist/blocks/Sider/Sider.js +12 -9
  128. package/dist/blocks/Sider/schema.json +0 -7
  129. package/dist/blocks/Sider/style.less +1 -1
  130. package/dist/blocks/Statistic/Statistic.js +11 -5
  131. package/dist/blocks/Statistic/schema.json +2 -2
  132. package/dist/blocks/Statistic/style.less +1 -1
  133. package/dist/blocks/Switch/Switch.js +22 -19
  134. package/dist/blocks/Switch/schema.json +4 -4
  135. package/dist/blocks/Switch/style.less +1 -1
  136. package/dist/blocks/Tabs/Tabs.js +36 -24
  137. package/dist/blocks/Tabs/schema.json +1 -1
  138. package/dist/blocks/Tabs/style.less +1 -1
  139. package/dist/blocks/TextArea/TextArea.js +14 -6
  140. package/dist/blocks/TextArea/style.less +1 -1
  141. package/dist/blocks/TextInput/TextInput.js +16 -8
  142. package/dist/blocks/TextInput/schema.json +2 -2
  143. package/dist/blocks/TextInput/style.less +1 -1
  144. package/dist/blocks/TimelineList/TimelineList.js +56 -40
  145. package/dist/blocks/TimelineList/schema.json +4 -1
  146. package/dist/blocks/TimelineList/style.less +1 -1
  147. package/dist/blocks/Title/Title.js +21 -14
  148. package/dist/blocks/Title/style.less +1 -1
  149. package/dist/blocks/TitleInput/TitleInput.js +22 -14
  150. package/dist/blocks/TitleInput/style.less +1 -1
  151. package/dist/blocks/Tooltip/Tooltip.js +11 -9
  152. package/dist/blocks/Tooltip/style.less +1 -1
  153. package/dist/blocks/WeekSelector/WeekSelector.js +47 -42
  154. package/dist/blocks/WeekSelector/schema.json +2 -2
  155. package/dist/blocks/WeekSelector/style.less +1 -1
  156. package/dist/blocks.js +74 -0
  157. package/dist/color.js +1 -1
  158. package/dist/disabledDate.js +2 -3
  159. package/dist/getUniqueValues.js +1 -1
  160. package/dist/getValueIndex.js +1 -1
  161. package/dist/style.less +1 -1
  162. package/dist/{blocks/Alert/index.js → types.js} +16 -19
  163. package/dist/useRunAfterUpdate.js +1 -1
  164. package/dist/validationExamples.js +1 -1
  165. package/package.json +27 -23
  166. package/dist/blocks/Affix/index.js +0 -26
  167. package/dist/blocks/AutoComplete/index.js +0 -33
  168. package/dist/blocks/Avatar/index.js +0 -28
  169. package/dist/blocks/Badge/index.js +0 -26
  170. package/dist/blocks/Breadcrumb/index.js +0 -31
  171. package/dist/blocks/Button/index.js +0 -28
  172. package/dist/blocks/ButtonSelector/index.js +0 -33
  173. package/dist/blocks/Card/index.js +0 -31
  174. package/dist/blocks/CheckboxSelector/index.js +0 -33
  175. package/dist/blocks/CheckboxSwitch/index.js +0 -36
  176. package/dist/blocks/Collapse/index.js +0 -31
  177. package/dist/blocks/Comment/index.js +0 -28
  178. package/dist/blocks/ConfirmModal/index.js +0 -59
  179. package/dist/blocks/Content/index.js +0 -26
  180. package/dist/blocks/ControlledList/index.js +0 -36
  181. package/dist/blocks/DateRangeSelector/index.js +0 -33
  182. package/dist/blocks/DateSelector/index.js +0 -33
  183. package/dist/blocks/DateTimeSelector/index.js +0 -33
  184. package/dist/blocks/Descriptions/index.js +0 -31
  185. package/dist/blocks/Divider/index.js +0 -31
  186. package/dist/blocks/Drawer/index.js +0 -41
  187. package/dist/blocks/Footer/index.js +0 -26
  188. package/dist/blocks/Header/index.js +0 -26
  189. package/dist/blocks/Label/index.js +0 -32
  190. package/dist/blocks/Layout/index.js +0 -31
  191. package/dist/blocks/Menu/index.js +0 -26
  192. package/dist/blocks/Message/index.js +0 -53
  193. package/dist/blocks/MobileMenu/index.js +0 -41
  194. package/dist/blocks/Modal/index.js +0 -41
  195. package/dist/blocks/MonthSelector/index.js +0 -33
  196. package/dist/blocks/MultipleSelector/index.js +0 -33
  197. package/dist/blocks/Notification/index.js +0 -59
  198. package/dist/blocks/NumberInput/index.js +0 -33
  199. package/dist/blocks/PageHCF/index.js +0 -31
  200. package/dist/blocks/PageHCSF/index.js +0 -46
  201. package/dist/blocks/PageHSCF/index.js +0 -46
  202. package/dist/blocks/PageHeaderMenu/index.js +0 -46
  203. package/dist/blocks/PageSHCF/index.js +0 -46
  204. package/dist/blocks/PageSiderMenu/index.js +0 -57
  205. package/dist/blocks/Pagination/index.js +0 -37
  206. package/dist/blocks/Paragraph/index.js +0 -28
  207. package/dist/blocks/ParagraphInput/index.js +0 -36
  208. package/dist/blocks/PasswordInput/index.js +0 -33
  209. package/dist/blocks/Progress/index.js +0 -31
  210. package/dist/blocks/RadioSelector/index.js +0 -33
  211. package/dist/blocks/RatingSlider/index.js +0 -33
  212. package/dist/blocks/Result/index.js +0 -31
  213. package/dist/blocks/S3UploadButton/S3UploadButton.js +0 -171
  214. package/dist/blocks/S3UploadButton/index.js +0 -29
  215. package/dist/blocks/S3UploadButton/schema.json +0 -83
  216. package/dist/blocks/S3UploadButton/style.less +0 -18
  217. package/dist/blocks/Selector/index.js +0 -33
  218. package/dist/blocks/Sider/index.js +0 -41
  219. package/dist/blocks/Statistic/index.js +0 -31
  220. package/dist/blocks/Switch/index.js +0 -33
  221. package/dist/blocks/Tabs/index.js +0 -31
  222. package/dist/blocks/TextArea/index.js +0 -33
  223. package/dist/blocks/TextInput/index.js +0 -33
  224. package/dist/blocks/TimelineList/index.js +0 -31
  225. package/dist/blocks/Title/index.js +0 -31
  226. package/dist/blocks/TitleInput/index.js +0 -39
  227. package/dist/blocks/Tooltip/index.js +0 -31
  228. package/dist/blocks/WeekSelector/index.js +0 -33
  229. package/dist/index.js +0 -152
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
4
3
 
5
4
  Licensed under the Apache License, Version 2.0 (the "License");
6
5
  you may not use this file except in compliance with the License.
@@ -57,14 +56,13 @@ const SiderBlock = ({ blockId , properties , content , methods , rename })=>{
57
56
  })
58
57
  );
59
58
  });
60
- return(/*#__PURE__*/ _jsx(Sider, {
59
+ return(/*#__PURE__*/ React.createElement(Sider, {
61
60
  id: blockId,
62
61
  className: `${methods.makeCssClass([
63
62
  {
64
- overflow: 'auto',
65
- backgroundColor: properties.color && `${properties.color} !important`
63
+ overflow: 'auto'
66
64
  },
67
- properties.style,
65
+ properties.style
68
66
  ])} hide-on-print`,
69
67
  breakpoint: properties.breakpoint,
70
68
  collapsed: !openState,
@@ -76,9 +74,14 @@ const SiderBlock = ({ blockId , properties , content , methods , rename })=>{
76
74
  onBreakpoint: ()=>methods.triggerEvent({
77
75
  name: 'onBreakpoint'
78
76
  })
79
- ,
80
- children: content.content && content.content()
81
- }));
77
+ }, content.content && content.content()));
82
78
  };
83
79
  SiderBlock.defaultProps = blockDefaultProps;
80
+ SiderBlock.meta = {
81
+ category: 'container',
82
+ icons: [],
83
+ styles: [
84
+ 'blocks/Sider/style.less'
85
+ ]
86
+ };
84
87
  export default SiderBlock;
@@ -18,13 +18,6 @@
18
18
  "type": "boolean",
19
19
  "description": "Whether can be collapsed"
20
20
  },
21
- "color": {
22
- "type": "string",
23
- "description": "Sider color",
24
- "docs": {
25
- "displayType": "color"
26
- }
27
- },
28
21
  "initialCollapsed": {
29
22
  "type": "boolean",
30
23
  "default": true,
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
4
3
 
5
4
  Licensed under the Apache License, Version 2.0 (the "License");
6
5
  you may not use this file except in compliance with the License.
@@ -17,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
17
16
  import { Statistic } from 'antd';
18
17
  import { type } from '@lowdefy/helpers';
19
18
  import { blockDefaultProps, renderHtml } from '@lowdefy/block-utils';
20
- const StatisticBlock = ({ blockId , components: { Icon } , events , properties , methods })=>/*#__PURE__*/ _jsx(Statistic, {
19
+ const StatisticBlock = ({ blockId , components: { Icon } , events , properties , methods })=>/*#__PURE__*/ React.createElement(Statistic, {
21
20
  className: methods.makeCssClass(properties.style),
22
21
  decimalSeparator: properties.decimalSeparator,
23
22
  groupSeparator: properties.groupSeparator,
@@ -30,12 +29,12 @@ const StatisticBlock = ({ blockId , components: { Icon } , events , properties
30
29
  }),
31
30
  value: type.isNone(properties.value) ? '' : properties.value,
32
31
  valueStyle: methods.makeCssClass(properties.valueStyle, true),
33
- prefix: properties.prefixIcon ? /*#__PURE__*/ _jsx(Icon, {
32
+ prefix: properties.prefixIcon ? /*#__PURE__*/ React.createElement(Icon, {
34
33
  blockId: `${blockId}_prefixIcon`,
35
34
  events: events,
36
35
  properties: properties.prefixIcon
37
36
  }) : properties.prefix || '',
38
- suffix: properties.suffixIcon ? /*#__PURE__*/ _jsx(Icon, {
37
+ suffix: properties.suffixIcon ? /*#__PURE__*/ React.createElement(Icon, {
39
38
  blockId: `${blockId}_suffixIcon`,
40
39
  events: events,
41
40
  properties: properties.suffixIcon
@@ -43,4 +42,11 @@ const StatisticBlock = ({ blockId , components: { Icon } , events , properties
43
42
  })
44
43
  ;
45
44
  StatisticBlock.defaultProps = blockDefaultProps;
45
+ StatisticBlock.meta = {
46
+ category: 'display',
47
+ icons: [],
48
+ styles: [
49
+ 'blocks/Statistic/style.less'
50
+ ]
51
+ };
46
52
  export default StatisticBlock;
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "prefixIcon": {
31
31
  "type": ["string", "object"],
32
- "description": "Name of an Ant Design Icon or properties of an Icon block to customize icon which prefix the statistic.",
32
+ "description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon which prefix the statistic.",
33
33
  "docs": {
34
34
  "displayType": "icon"
35
35
  }
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "suffixIcon": {
42
42
  "type": ["string", "object"],
43
- "description": "Name of an Ant Design Icon or properties of an Icon block to customize icon which suffix the statistic.",
43
+ "description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon which suffix the statistic.",
44
44
  "docs": {
45
45
  "displayType": "icon"
46
46
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
4
3
 
5
4
  Licensed under the Apache License, Version 2.0 (the "License");
6
5
  you may not use this file except in compliance with the License.
@@ -31,14 +30,13 @@ const SwitchBlock = ({ blockId , components: { Icon , Link } , events , loading
31
30
  name: propertiesIconUnchecked
32
31
  };
33
32
  }
34
- return(/*#__PURE__*/ _jsx(Label, {
33
+ return(/*#__PURE__*/ React.createElement(Label, {
35
34
  blockId: blockId,
36
35
  components: {
37
36
  Icon,
38
37
  Link
39
38
  },
40
39
  events: events,
41
- loading: loading,
42
40
  properties: {
43
41
  title: properties.title,
44
42
  size: properties.size,
@@ -47,7 +45,7 @@ const SwitchBlock = ({ blockId , components: { Icon , Link } , events , loading
47
45
  required: required,
48
46
  validation: validation,
49
47
  content: {
50
- content: ()=>/*#__PURE__*/ _jsx(Switch, {
48
+ content: ()=>/*#__PURE__*/ React.createElement(Switch, {
51
49
  autoFocus: properties.autoFocus,
52
50
  checked: !!value,
53
51
  className: methods.makeCssClass([
@@ -58,30 +56,23 @@ const SwitchBlock = ({ blockId , components: { Icon , Link } , events , loading
58
56
  },
59
57
  properties.inputStyle,
60
58
  ]),
61
- disabled: properties.disabled,
62
- loading: loading,
59
+ disabled: properties.disabled || loading,
63
60
  id: `${blockId}_input`,
64
61
  size: properties.size,
65
- checkedChildren: properties.checkedText ? /*#__PURE__*/ _jsx("span", {
66
- children: properties.checkedText
67
- }) : /*#__PURE__*/ _jsx(Icon, {
62
+ checkedChildren: properties.checkedText ? /*#__PURE__*/ React.createElement("span", null, properties.checkedText) : /*#__PURE__*/ React.createElement(Icon, {
68
63
  blockId: `${blockId}_checkedIcon`,
69
64
  events: events,
70
65
  properties: {
71
- name: 'CheckOutlined',
72
- ...propertiesIconChecked || {
73
- }
66
+ name: 'AiOutlineCheck',
67
+ ...propertiesIconChecked || {}
74
68
  }
75
69
  }),
76
- unCheckedChildren: properties.uncheckedText ? /*#__PURE__*/ _jsx("span", {
77
- children: properties.uncheckedText
78
- }) : /*#__PURE__*/ _jsx(Icon, {
70
+ unCheckedChildren: properties.uncheckedText ? /*#__PURE__*/ React.createElement("span", null, properties.uncheckedText) : /*#__PURE__*/ React.createElement(Icon, {
79
71
  blockId: `${blockId}_uncheckedIcon`,
80
72
  events: events,
81
73
  properties: {
82
- name: 'CloseOutlined',
83
- ...propertiesIconUnchecked || {
84
- }
74
+ name: 'AiOutlineClose',
75
+ ...propertiesIconUnchecked || {}
85
76
  }
86
77
  }),
87
78
  onChange: (newVal)=>{
@@ -95,4 +86,16 @@ const SwitchBlock = ({ blockId , components: { Icon , Link } , events , loading
95
86
  }));
96
87
  };
97
88
  SwitchBlock.defaultProps = blockDefaultProps;
89
+ SwitchBlock.meta = {
90
+ valueType: 'boolean',
91
+ category: 'input',
92
+ icons: [
93
+ ...Label.meta.icons,
94
+ 'AiOutlineCheck',
95
+ 'AiOutlineClose'
96
+ ],
97
+ styles: [
98
+ 'blocks/Switch/style.less'
99
+ ]
100
+ };
98
101
  export default SwitchBlock;
@@ -11,8 +11,8 @@
11
11
  },
12
12
  "checkedIcon": {
13
13
  "type": ["string", "object"],
14
- "default": "CheckOutlined",
15
- "description": "Name of an Ant Design Icon or properties of an Icon block to customize icon to shown when switch is checked (true).",
14
+ "default": "AiOutlineCheck",
15
+ "description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon to shown when switch is checked (true).",
16
16
  "docs": {
17
17
  "displayType": "icon"
18
18
  }
@@ -111,8 +111,8 @@
111
111
  },
112
112
  "uncheckedIcon": {
113
113
  "type": ["string", "object"],
114
- "default": "CloseOutlined",
115
- "description": "Name of an Ant Design Icon or properties of an Icon block to customize icon to shown when switch is unchecked (false).",
114
+ "default": "AiOutlineClose",
115
+ "description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon to shown when switch is unchecked (false).",
116
116
  "docs": {
117
117
  "displayType": "icon"
118
118
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  /*
3
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
4
3
 
5
4
  Licensed under the Apache License, Version 2.0 (the "License");
6
5
  you may not use this file except in compliance with the License.
@@ -16,6 +15,20 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
15
  */ import React from 'react';
17
16
  import { blockDefaultProps } from '@lowdefy/block-utils';
18
17
  import { Tabs } from 'antd';
18
+ function _extends() {
19
+ _extends = Object.assign || function(target) {
20
+ for(var i = 1; i < arguments.length; i++){
21
+ var source = arguments[i];
22
+ for(var key in source){
23
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
24
+ target[key] = source[key];
25
+ }
26
+ }
27
+ }
28
+ return target;
29
+ };
30
+ return _extends.apply(this, arguments);
31
+ }
19
32
  const getTabs = ({ content , properties })=>{
20
33
  let tabs = properties.tabs;
21
34
  if (!tabs) {
@@ -30,8 +43,7 @@ const getTabs = ({ content , properties })=>{
30
43
  );
31
44
  };
32
45
  const getAdditionalProps = ({ content , properties })=>{
33
- const additionalProps = {
34
- };
46
+ const additionalProps = {};
35
47
  if (properties.activeKey) {
36
48
  additionalProps.activeKey = properties.activeKey;
37
49
  }
@@ -49,7 +61,7 @@ const TabsBlock = ({ blockId , components: { Icon } , events , content , method
49
61
  content,
50
62
  properties
51
63
  });
52
- return(/*#__PURE__*/ _jsx(Tabs, {
64
+ return(/*#__PURE__*/ React.createElement(Tabs, _extends({
53
65
  animated: properties.animated !== undefined ? properties.animated : true,
54
66
  defaultActiveKey: properties.defaultActiveKey || tabs[0].key,
55
67
  id: blockId,
@@ -77,25 +89,25 @@ const TabsBlock = ({ blockId , components: { Icon } , events , content , method
77
89
  key
78
90
  }
79
91
  })
80
- ,
81
- ...additionalProps,
82
- children: tabs.map((tab)=>/*#__PURE__*/ _jsx(Tabs.TabPane, {
83
- disabled: tab.disabled,
84
- tab: /*#__PURE__*/ _jsxs("span", {
85
- className: methods.makeCssClass(tab.titleStyle),
86
- children: [
87
- tab.icon && /*#__PURE__*/ _jsx(Icon, {
88
- blockId: `${blockId}_icon`,
89
- events: events,
90
- properties: tab.icon
91
- }),
92
- tab.title || tab.key
93
- ]
94
- }),
95
- children: content[tab.key] && content[tab.key]()
96
- }, tab.key)
97
- )
98
- }));
92
+ }, additionalProps), tabs.map((tab)=>/*#__PURE__*/ React.createElement(Tabs.TabPane, {
93
+ disabled: tab.disabled,
94
+ key: tab.key,
95
+ tab: /*#__PURE__*/ React.createElement("span", {
96
+ className: methods.makeCssClass(tab.titleStyle)
97
+ }, tab.icon && /*#__PURE__*/ React.createElement(Icon, {
98
+ blockId: `${blockId}_icon`,
99
+ events: events,
100
+ properties: tab.icon
101
+ }), tab.title || tab.key)
102
+ }, content[tab.key] && content[tab.key]())
103
+ )));
99
104
  };
100
105
  TabsBlock.defaultProps = blockDefaultProps;
106
+ TabsBlock.meta = {
107
+ category: 'container',
108
+ icons: [],
109
+ styles: [
110
+ 'blocks/Tabs/style.less'
111
+ ]
112
+ };
101
113
  export default TabsBlock;
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "icon": {
58
58
  "type": ["string", "object"],
59
- "description": "Name of an Ant Design Icon or properties of an Icon block to customize icon to show in tab title.",
59
+ "description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon to show in tab title.",
60
60
  "docs": {
61
61
  "displayType": "icon"
62
62
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
4
3
 
5
4
  Licensed under the Apache License, Version 2.0 (the "License");
6
5
  you may not use this file except in compliance with the License.
@@ -21,7 +20,7 @@ import Label from '../Label/Label.js';
21
20
  import useRunAfterUpdate from '../../useRunAfterUpdate.js';
22
21
  const TextAreaComp = Input.TextArea;
23
22
  const TextAreaBlock = ({ blockId , components , events , loading , properties , required , validation , value , methods , })=>{
24
- return(/*#__PURE__*/ _jsx(Label, {
23
+ return(/*#__PURE__*/ React.createElement(Label, {
25
24
  blockId: blockId,
26
25
  components: components,
27
26
  events: events,
@@ -32,17 +31,16 @@ const TextAreaBlock = ({ blockId , components , events , loading , properties ,
32
31
  },
33
32
  validation: validation,
34
33
  required: required,
35
- loading: loading,
36
34
  content: {
37
35
  content: ()=>{
38
36
  const runAfterUpdate = useRunAfterUpdate();
39
- return(/*#__PURE__*/ _jsx(TextAreaComp, {
37
+ return(/*#__PURE__*/ React.createElement(TextAreaComp, {
40
38
  id: `${blockId}_input`,
41
39
  allowClear: properties.allowClear,
42
40
  autoFocus: properties.autoFocus,
43
41
  bordered: properties.bordered,
44
42
  className: methods.makeCssClass(properties.inputStyle),
45
- disabled: properties.disabled,
43
+ disabled: properties.disabled || loading,
46
44
  maxLength: properties.maxLength,
47
45
  placeholder: properties.placeholder,
48
46
  showCount: properties.showCount,
@@ -76,4 +74,14 @@ const TextAreaBlock = ({ blockId , components , events , loading , properties ,
76
74
  }));
77
75
  };
78
76
  TextAreaBlock.defaultProps = blockDefaultProps;
77
+ TextAreaBlock.meta = {
78
+ valueType: 'string',
79
+ category: 'input',
80
+ icons: [
81
+ ...Label.meta.icons
82
+ ],
83
+ styles: [
84
+ 'blocks/TextArea/style.less'
85
+ ]
86
+ };
79
87
  export default TextAreaBlock;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
4
3
 
5
4
  Licensed under the Apache License, Version 2.0 (the "License");
6
5
  you may not use this file except in compliance with the License.
@@ -19,14 +18,13 @@ import { blockDefaultProps } from '@lowdefy/block-utils';
19
18
  import Label from '../Label/Label.js';
20
19
  import useRunAfterUpdate from '../../useRunAfterUpdate.js';
21
20
  const TextInput = ({ blockId , components: { Icon , Link } , events , loading , methods , properties , required , validation , value , })=>{
22
- return(/*#__PURE__*/ _jsx(Label, {
21
+ return(/*#__PURE__*/ React.createElement(Label, {
23
22
  blockId: blockId,
24
23
  components: {
25
24
  Icon,
26
25
  Link
27
26
  },
28
27
  events: events,
29
- loading: loading,
30
28
  properties: {
31
29
  title: properties.title,
32
30
  size: properties.size,
@@ -37,13 +35,13 @@ const TextInput = ({ blockId , components: { Icon , Link } , events , loading ,
37
35
  content: {
38
36
  content: ()=>{
39
37
  const runAfterUpdate = useRunAfterUpdate();
40
- return(/*#__PURE__*/ _jsx(Input, {
38
+ return(/*#__PURE__*/ React.createElement(Input, {
41
39
  id: `${blockId}_input`,
42
40
  allowClear: properties.allowClear,
43
41
  autoFocus: properties.autoFocus,
44
42
  bordered: properties.bordered,
45
43
  className: methods.makeCssClass(properties.inputStyle),
46
- disabled: properties.disabled,
44
+ disabled: properties.disabled || loading,
47
45
  maxLength: properties.maxLength,
48
46
  placeholder: properties.placeholder,
49
47
  size: properties.size,
@@ -64,12 +62,12 @@ const TextInput = ({ blockId , components: { Icon , Link } , events , loading ,
64
62
  name: 'onPressEnter'
65
63
  });
66
64
  },
67
- prefix: properties.prefix || properties.prefixIcon && /*#__PURE__*/ _jsx(Icon, {
65
+ prefix: properties.prefix || properties.prefixIcon && /*#__PURE__*/ React.createElement(Icon, {
68
66
  blockId: `${blockId}_prefixIcon`,
69
67
  events: events,
70
68
  properties: properties.prefixIcon
71
69
  }),
72
- suffix: properties.suffix || properties.suffixIcon && /*#__PURE__*/ _jsx(Icon, {
70
+ suffix: properties.suffix || properties.suffixIcon && /*#__PURE__*/ React.createElement(Icon, {
73
71
  blockId: `${blockId}_suffixIcon`,
74
72
  events: events,
75
73
  properties: properties.suffixIcon
@@ -80,4 +78,14 @@ const TextInput = ({ blockId , components: { Icon , Link } , events , loading ,
80
78
  }));
81
79
  };
82
80
  TextInput.defaultProps = blockDefaultProps;
81
+ TextInput.meta = {
82
+ valueType: 'string',
83
+ category: 'input',
84
+ icons: [
85
+ ...Label.meta.icons
86
+ ],
87
+ styles: [
88
+ 'blocks/TextInput/style.less'
89
+ ]
90
+ };
83
91
  export default TextInput;
@@ -38,7 +38,7 @@
38
38
  },
39
39
  "prefixIcon": {
40
40
  "type": ["string", "object"],
41
- "description": "Name of an Ant Design Icon or properties of an Icon block to customize icon to prefix the text input.",
41
+ "description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon to prefix the text input.",
42
42
  "docs": {
43
43
  "displayType": "icon"
44
44
  }
@@ -121,7 +121,7 @@
121
121
  },
122
122
  "suffixIcon": {
123
123
  "type": ["string", "object"],
124
- "description": "Name of an Ant Design Icon or properties of an Icon block to customize icon to suffix the text input.",
124
+ "description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block to customize icon to suffix the text input.",
125
125
  "docs": {
126
126
  "displayType": "icon"
127
127
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,6 +1,5 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
4
3
 
5
4
  Licensed under the Apache License, Version 2.0 (the "License");
6
5
  you may not use this file except in compliance with the License.
@@ -17,16 +16,29 @@ import { jsx as _jsx } from "react/jsx-runtime";
17
16
  import { Timeline } from 'antd';
18
17
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
18
  import { get, mergeObjects, serializer, 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
  // TODO: need to pass value to list blocks to render item level settings.
21
34
  const TimelineList = ({ blockId , components: { Icon } , events , list , methods , properties })=>{
22
35
  // Temporary fix until list blocks get value from state
23
36
  const value = properties.data;
24
- const other = {
25
- };
37
+ const other = {};
26
38
  if (properties.mode) {
27
39
  other.mode = properties.mode;
28
40
  }
29
- return(/*#__PURE__*/ _jsx(Timeline, {
41
+ return(/*#__PURE__*/ React.createElement(Timeline, _extends({
30
42
  id: blockId,
31
43
  className: methods.makeCssClass([
32
44
  {
@@ -35,7 +47,7 @@ const TimelineList = ({ blockId , components: { Icon } , events , list , method
35
47
  properties.style
36
48
  ]),
37
49
  pending: properties.pending,
38
- pendingDot: properties.pendingDotIcon && /*#__PURE__*/ _jsx(Icon, {
50
+ pendingDot: properties.pendingDotIcon && /*#__PURE__*/ React.createElement(Icon, {
39
51
  blockId: `${blockId}_pendingDotIcon`,
40
52
  events: events,
41
53
  properties: mergeObjects([
@@ -47,40 +59,44 @@ const TimelineList = ({ blockId , components: { Icon } , events , list , method
47
59
  properties.pendingDotIcon
48
60
  ])
49
61
  }),
50
- reverse: properties.reverse,
51
- ...other,
52
- children: (list || []).map((child, i)=>{
53
- let icon = serializer.copy(get(value, `${i}.${properties.iconField || 'icon'}`));
54
- let style = get(value, `${i}.${properties.styleField || 'style'}`);
55
- if (type.isString(icon)) {
56
- icon = {
57
- name: icon
58
- };
59
- }
60
- if (!type.isObject(style)) {
61
- style = {
62
- };
63
- }
64
- const color = get(value, `${i}.${properties.colorField || 'color'}`);
65
- return(/*#__PURE__*/ _jsx(Timeline.Item, {
66
- color: color,
67
- position: get(value, `${i}.${properties.positionField || 'position'}`),
68
- label: get(value, `${i}.${properties.labelField || 'label'}`),
69
- dot: icon && /*#__PURE__*/ _jsx(Icon, {
70
- blockId: `${blockId}_${i}_icon`,
71
- events: events,
72
- properties: mergeObjects([
73
- {
74
- style,
75
- color
76
- },
77
- icon
78
- ])
79
- }),
80
- children: child.content && child.content()
81
- }, `${blockId}_${i}`));
82
- })
83
- }));
62
+ reverse: properties.reverse
63
+ }, other), (list || []).map((child, i)=>{
64
+ let icon = serializer.copy(get(value, `${i}.${properties.iconField || 'icon'}`));
65
+ let style = get(value, `${i}.${properties.styleField || 'style'}`);
66
+ if (type.isString(icon)) {
67
+ icon = {
68
+ name: icon
69
+ };
70
+ }
71
+ if (!type.isObject(style)) {
72
+ style = {};
73
+ }
74
+ const color = get(value, `${i}.${properties.colorField || 'color'}`);
75
+ return(/*#__PURE__*/ React.createElement(Timeline.Item, {
76
+ key: `${blockId}_${i}`,
77
+ color: color,
78
+ position: get(value, `${i}.${properties.positionField || 'position'}`),
79
+ label: get(value, `${i}.${properties.labelField || 'label'}`),
80
+ dot: icon && /*#__PURE__*/ React.createElement(Icon, {
81
+ blockId: `${blockId}_${i}_icon`,
82
+ events: events,
83
+ properties: mergeObjects([
84
+ {
85
+ style,
86
+ color
87
+ },
88
+ icon
89
+ ])
90
+ })
91
+ }, child.content && child.content()));
92
+ })));
84
93
  };
85
94
  TimelineList.defaultProps = blockDefaultProps;
95
+ TimelineList.meta = {
96
+ category: 'list',
97
+ icons: [],
98
+ styles: [
99
+ 'blocks/TimelineList/style.less'
100
+ ]
101
+ };
86
102
  export default TimelineList;