@lowdefy/block-utils 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.
- package/dist/HtmlComponent.js +4 -4
- package/dist/blockDefaultProps.js +2 -4
- package/dist/makeCssClass.js +1 -2
- package/dist/mediaToCssObject.js +1 -2
- package/dist/renderHtml.js +1 -2
- package/package.json +17 -16
package/dist/HtmlComponent.js
CHANGED
|
@@ -27,7 +27,7 @@ let HtmlComponent = class HtmlComponent extends React.Component {
|
|
|
27
27
|
render() {
|
|
28
28
|
const { div , id , methods , style } = this.props;
|
|
29
29
|
if (div === true) {
|
|
30
|
-
return
|
|
30
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
31
31
|
id: id,
|
|
32
32
|
"data-testid": id,
|
|
33
33
|
ref: (el)=>{
|
|
@@ -36,9 +36,9 @@ let HtmlComponent = class HtmlComponent extends React.Component {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
className: methods.makeCssClass(style)
|
|
39
|
-
})
|
|
39
|
+
});
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return /*#__PURE__*/ React.createElement("span", {
|
|
42
42
|
id: id,
|
|
43
43
|
"data-testid": id,
|
|
44
44
|
ref: (el)=>{
|
|
@@ -47,7 +47,7 @@ let HtmlComponent = class HtmlComponent extends React.Component {
|
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
className: methods.makeCssClass(style)
|
|
50
|
-
})
|
|
50
|
+
});
|
|
51
51
|
}
|
|
52
52
|
constructor(props){
|
|
53
53
|
super(props);
|
|
@@ -23,10 +23,8 @@ const blockDefaultProps = {
|
|
|
23
23
|
menus: [],
|
|
24
24
|
methods: {
|
|
25
25
|
makeCssClass: makeCssClass,
|
|
26
|
-
registerEvent: ()=>undefined
|
|
27
|
-
,
|
|
28
|
-
registerMethod: ()=>undefined
|
|
29
|
-
,
|
|
26
|
+
registerEvent: ()=>undefined,
|
|
27
|
+
registerMethod: ()=>undefined,
|
|
30
28
|
triggerEvent: ()=>undefined
|
|
31
29
|
},
|
|
32
30
|
properties: {},
|
package/dist/makeCssClass.js
CHANGED
|
@@ -15,6 +15,5 @@
|
|
|
15
15
|
*/ import { css } from '@emotion/css';
|
|
16
16
|
import { mergeObjects } from '@lowdefy/helpers';
|
|
17
17
|
import mediaToCssObject from './mediaToCssObject.js';
|
|
18
|
-
const makeCssClass = (styles, styleObjectOnly)=>styleObjectOnly ? mediaToCssObject(mergeObjects(styles), true)[0] : css(mediaToCssObject(styles))
|
|
19
|
-
;
|
|
18
|
+
const makeCssClass = (styles, styleObjectOnly)=>styleObjectOnly ? mediaToCssObject(mergeObjects(styles), true)[0] : css(mediaToCssObject(styles));
|
|
20
19
|
export default makeCssClass;
|
package/dist/mediaToCssObject.js
CHANGED
|
@@ -37,8 +37,7 @@ const media = {
|
|
|
37
37
|
xxl: `@media screen and (min-width: ${breakpoints.xl}px)`
|
|
38
38
|
};
|
|
39
39
|
const mediaRegex = /@media\s+(xs|sm|md|lg|xl|xxl)\s*{/gm;
|
|
40
|
-
const setReplacer = (_, group)=>media[group] + ' {'
|
|
41
|
-
;
|
|
40
|
+
const setReplacer = (_, group)=>media[group] + ' {';
|
|
42
41
|
const mediaToCssObject = (styles, styleObjectOnly)=>{
|
|
43
42
|
if (type.isString(styles)) {
|
|
44
43
|
return styles.replace(mediaRegex, setReplacer);
|
package/dist/renderHtml.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/block-utils",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
4
|
-
"
|
|
3
|
+
"version": "4.0.0-alpha.13",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lowdefy Block Utils",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
7
7
|
"keywords": [
|
|
@@ -43,26 +43,27 @@
|
|
|
43
43
|
"test": "jest --coverage"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@emotion/css": "11.
|
|
47
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
48
|
-
"dompurify": "2.3.
|
|
49
|
-
"react": "
|
|
50
|
-
"react-dom": "
|
|
46
|
+
"@emotion/css": "11.9.0",
|
|
47
|
+
"@lowdefy/helpers": "4.0.0-alpha.13",
|
|
48
|
+
"dompurify": "2.3.8",
|
|
49
|
+
"react": "18.1.0",
|
|
50
|
+
"react-dom": "18.1.0"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@emotion/jest": "11.
|
|
54
|
-
"@swc/cli": "0.1.
|
|
55
|
-
"@swc/core": "1.2.
|
|
56
|
-
"@swc/jest": "0.2.
|
|
57
|
-
"@testing-library/dom": "8.
|
|
58
|
-
"@testing-library/react": "13.
|
|
59
|
-
"@testing-library/user-event": "14.
|
|
53
|
+
"@emotion/jest": "11.9.1",
|
|
54
|
+
"@swc/cli": "0.1.57",
|
|
55
|
+
"@swc/core": "1.2.194",
|
|
56
|
+
"@swc/jest": "0.2.21",
|
|
57
|
+
"@testing-library/dom": "8.13.0",
|
|
58
|
+
"@testing-library/react": "13.3.0",
|
|
59
|
+
"@testing-library/user-event": "14.2.0",
|
|
60
60
|
"copyfiles": "2.4.1",
|
|
61
|
-
"jest": "
|
|
61
|
+
"jest": "28.1.0",
|
|
62
|
+
"jest-environment-jsdom": "28.1.0",
|
|
62
63
|
"jest-serializer-html": "7.1.0"
|
|
63
64
|
},
|
|
64
65
|
"publishConfig": {
|
|
65
66
|
"access": "public"
|
|
66
67
|
},
|
|
67
|
-
"gitHead": "
|
|
68
|
+
"gitHead": "e99b4b6c1f59804982fc148c0fe39dcf13b35d77"
|
|
68
69
|
}
|