@lowdefy/block-utils 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.
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -30,7 +29,7 @@ let ErrorBoundary = class ErrorBoundary extends Component {
30
29
  return fallback(error);
31
30
  }
32
31
  if (fullPage) {
33
- return(/*#__PURE__*/ _jsx(ErrorPage, {
32
+ return(/*#__PURE__*/ React.createElement(ErrorPage, {
34
33
  code: error.number,
35
34
  description: description || error.description,
36
35
  message: message || error.message,
package/dist/ErrorPage.js CHANGED
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -14,7 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
13
  See the License for the specific language governing permissions and
15
14
  limitations under the License.
16
15
  */ import React from 'react';
17
- const ErrorPage = ({ code , description , message , name })=>/*#__PURE__*/ _jsxs("div", {
16
+ const ErrorPage = ({ code , description , message , name })=>/*#__PURE__*/ React.createElement("div", {
18
17
  style: {
19
18
  height: '100%',
20
19
  fontFamily: 'system-ui',
@@ -22,57 +21,41 @@ const ErrorPage = ({ code , description , message , name })=>/*#__PURE__*/ _jsx
22
21
  display: 'flex',
23
22
  justifyContent: 'center',
24
23
  alignItems: 'center'
25
- },
26
- children: [
27
- /*#__PURE__*/ _jsx("div", {
28
- style: {
29
- flex: '0 1 auto',
30
- fontSize: '4.3em',
31
- fontWeight: '100',
32
- paddingRight: 30
33
- },
34
- children: code || 500
35
- }),
36
- /*#__PURE__*/ _jsxs("div", {
37
- style: {
38
- flex: '0 1 auto',
39
- paddingLeft: 30,
40
- maxWidth: 400,
41
- borderLeft: '1px solid #aeaeae'
42
- },
43
- children: [
44
- /*#__PURE__*/ _jsx("div", {
45
- style: {
46
- fontSize: '1.3em',
47
- fontWeight: '300',
48
- paddingBottom: 10
49
- },
50
- children: name || 'Error'
51
- }),
52
- /*#__PURE__*/ _jsx("div", {
53
- style: {
54
- fontSize: '0.9em'
55
- },
56
- children: message || 'An error has occurred.'
57
- }),
58
- /*#__PURE__*/ _jsx("div", {
59
- style: {
60
- fontSize: '0.9em'
61
- },
62
- children: description
63
- }),
64
- /*#__PURE__*/ _jsx("div", {
65
- style: {
66
- paddingTop: 20
67
- },
68
- children: /*#__PURE__*/ _jsx("a", {
69
- href: "/",
70
- children: "Return to home page"
71
- })
72
- })
73
- ]
74
- })
75
- ]
76
- })
24
+ }
25
+ }, /*#__PURE__*/ React.createElement("div", {
26
+ style: {
27
+ flex: '0 1 auto',
28
+ fontSize: '4.3em',
29
+ fontWeight: '100',
30
+ paddingRight: 30
31
+ }
32
+ }, code || 500), /*#__PURE__*/ React.createElement("div", {
33
+ style: {
34
+ flex: '0 1 auto',
35
+ paddingLeft: 30,
36
+ maxWidth: 400,
37
+ borderLeft: '1px solid #aeaeae'
38
+ }
39
+ }, /*#__PURE__*/ React.createElement("div", {
40
+ style: {
41
+ fontSize: '1.3em',
42
+ fontWeight: '300',
43
+ paddingBottom: 10
44
+ }
45
+ }, name || 'Error'), /*#__PURE__*/ React.createElement("div", {
46
+ style: {
47
+ fontSize: '0.9em'
48
+ }
49
+ }, message || 'An error has occurred.'), /*#__PURE__*/ React.createElement("div", {
50
+ style: {
51
+ fontSize: '0.9em'
52
+ }
53
+ }, description), /*#__PURE__*/ React.createElement("div", {
54
+ style: {
55
+ paddingTop: 20
56
+ }
57
+ }, /*#__PURE__*/ React.createElement("a", {
58
+ href: "/"
59
+ }, "Return to home page"))))
77
60
  ;
78
61
  export default ErrorPage;
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -28,7 +27,7 @@ let HtmlComponent = class HtmlComponent extends React.Component {
28
27
  render() {
29
28
  const { div , id , methods , style } = this.props;
30
29
  if (div === true) {
31
- return(/*#__PURE__*/ _jsx("div", {
30
+ return(/*#__PURE__*/ React.createElement("div", {
32
31
  id: id,
33
32
  "data-testid": id,
34
33
  ref: (el)=>{
@@ -39,7 +38,7 @@ let HtmlComponent = class HtmlComponent extends React.Component {
39
38
  className: methods.makeCssClass(style)
40
39
  }));
41
40
  }
42
- return(/*#__PURE__*/ _jsx("span", {
41
+ return(/*#__PURE__*/ React.createElement("span", {
43
42
  id: id,
44
43
  "data-testid": id,
45
44
  ref: (el)=>{
@@ -1,4 +1,3 @@
1
- import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
2
1
  /*
3
2
  Copyright 2020-2021 Lowdefy, Inc
4
3
 
@@ -18,9 +17,24 @@ import classNames from 'classnames';
18
17
  import { keyframes } from '@emotion/react';
19
18
  import { css } from '@emotion/css';
20
19
  import { omit, type } from '@lowdefy/helpers';
20
+ import Icon from '@ant-design/icons';
21
21
  import blockDefaultProps from './blockDefaultProps.js';
22
22
  import ErrorBoundary from './ErrorBoundary.js';
23
23
  import makeCssClass from './makeCssClass.js';
24
+ function _extends() {
25
+ _extends = Object.assign || function(target) {
26
+ for(var i = 1; i < arguments.length; i++){
27
+ var source = arguments[i];
28
+ for(var key in source){
29
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
30
+ target[key] = source[key];
31
+ }
32
+ }
33
+ }
34
+ return target;
35
+ };
36
+ return _extends.apply(this, arguments);
37
+ }
24
38
  const lowdefyProps = [
25
39
  'actionLog',
26
40
  'basePath',
@@ -72,30 +86,29 @@ const createIcon = (Icons)=>{
72
86
  if (!IconComp) {
73
87
  IconComp = AiOutlineExclamationCircle;
74
88
  }
75
- return(/*#__PURE__*/ _jsx(_Fragment, {
76
- children: events.onClick && events.onClick.loading && !propertiesObj.disableLoadingIcon ? /*#__PURE__*/ _jsx(AiOutlineLoading3Quarters, {
77
- ...iconProps,
78
- spin: true
79
- }) : /*#__PURE__*/ _jsx(ErrorBoundary, {
80
- fallback: ()=>/*#__PURE__*/ _jsx(AiOutlineExclamationCircle, {
81
- ...iconProps,
82
- color: '#F00'
83
- })
84
- ,
85
- children: /*#__PURE__*/ _jsx(IconComp, {
86
- id: blockId,
87
- onClick: events.onClick && (()=>methods.triggerEvent({
88
- name: 'onClick'
89
- })
90
- ),
91
- size: propertiesObj.size,
92
- title: propertiesObj.title,
93
- ...iconProps
89
+ return(/*#__PURE__*/ React.createElement(React.Fragment, null, events.onClick && events.onClick.loading && !propertiesObj.disableLoadingIcon ? /*#__PURE__*/ React.createElement(AiOutlineLoading3Quarters, _extends({}, {
90
+ ...iconProps,
91
+ spin: true
92
+ })) : /*#__PURE__*/ React.createElement(ErrorBoundary, {
93
+ fallback: ()=>/*#__PURE__*/ React.createElement(AiOutlineExclamationCircle, _extends({}, {
94
+ ...iconProps,
95
+ color: '#F00'
96
+ }))
97
+ }, /*#__PURE__*/ React.createElement(IconComp, _extends({
98
+ id: blockId,
99
+ onClick: events.onClick && (()=>methods.triggerEvent({
100
+ name: 'onClick'
94
101
  })
95
- })
96
- }));
102
+ ),
103
+ size: propertiesObj.size,
104
+ title: propertiesObj.title
105
+ }, iconProps)))));
97
106
  };
98
- IconBlock.defaultProps = blockDefaultProps;
99
- return IconBlock;
107
+ const AntIcon = (all)=>/*#__PURE__*/ React.createElement(Icon, {
108
+ component: ()=>/*#__PURE__*/ React.createElement(IconBlock, _extends({}, all))
109
+ })
110
+ ;
111
+ AntIcon.defaultProps = blockDefaultProps;
112
+ return AntIcon;
100
113
  };
101
114
  export default createIcon;
@@ -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 { type } from '@lowdefy/helpers';
18
17
  import HtmlComponent from './HtmlComponent.js';
19
- const renderHtml = ({ div , html , id , methods , style })=>type.isNone(html) ? undefined : /*#__PURE__*/ _jsx(HtmlComponent, {
18
+ const renderHtml = ({ div , html , id , methods , style })=>type.isNone(html) ? undefined : /*#__PURE__*/ React.createElement(HtmlComponent, {
20
19
  div: div,
21
20
  html: html,
22
21
  id: id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/block-utils",
3
- "version": "4.0.0-alpha.7",
3
+ "version": "4.0.0-alpha.8",
4
4
  "licence": "Apache-2.0",
5
5
  "description": "Lowdefy Block Utils",
6
6
  "homepage": "https://lowdefy.com",
@@ -39,13 +39,14 @@
39
39
  "test": "jest --coverage"
40
40
  },
41
41
  "dependencies": {
42
+ "@ant-design/icons": "4.7.0",
42
43
  "@emotion/css": "11.7.1",
43
44
  "@emotion/react": "11.7.1",
44
- "@lowdefy/helpers": "4.0.0-alpha.7",
45
+ "@lowdefy/helpers": "4.0.0-alpha.8",
45
46
  "classnames": "2.3.1",
46
47
  "dompurify": "2.3.5",
47
- "react": "18.0.0-rc.0",
48
- "react-dom": "18.0.0-rc.0"
48
+ "react": "17.0.2",
49
+ "react-dom": "17.0.2"
49
50
  },
50
51
  "devDependencies": {
51
52
  "@emotion/jest": "11.7.1",
@@ -61,5 +62,5 @@
61
62
  "publishConfig": {
62
63
  "access": "public"
63
64
  },
64
- "gitHead": "52ec14639d00de910cf9b8ab25bf933ca891cff5"
65
+ "gitHead": "9d56b83cf45e868afe3a1eeba750fe826eb74c8c"
65
66
  }