@lowdefy/blocks-basic 3.23.0 → 4.0.0-alpha.5
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/blocks/Anchor/Anchor.js +88 -0
- package/dist/blocks/Anchor/schema.json +61 -0
- package/dist/blocks/Box/Box.js +41 -0
- package/dist/blocks/Box/schema.json +30 -0
- package/dist/blocks/DangerousHtml/DangerousHtml.js +57 -0
- package/dist/blocks/DangerousHtml/schema.json +30 -0
- package/dist/blocks/Html/Html.js +32 -0
- package/dist/blocks/Html/schema.json +23 -0
- package/dist/blocks/Icon/Icon.js +28 -0
- package/dist/blocks/Icon/schema.json +63 -0
- package/dist/blocks/Img/Img.js +43 -0
- package/dist/blocks/Img/schema.json +59 -0
- package/dist/blocks/List/List.js +56 -0
- package/dist/blocks/List/schema.json +40 -0
- package/dist/blocks/Span/Span.js +41 -0
- package/dist/blocks/Span/schema.json +30 -0
- package/dist/blocks.js +22 -0
- package/dist/types.js +30 -0
- package/package.json +31 -37
- package/dist/14.js +0 -2
- package/dist/14.js.LICENSE.txt +0 -43
- package/dist/203.js +0 -1
- package/dist/22.js +0 -1
- package/dist/261.js +0 -1
- package/dist/328.js +0 -2
- package/dist/328.js.LICENSE.txt +0 -1
- package/dist/330.js +0 -1
- package/dist/397.js +0 -1
- package/dist/52.js +0 -1
- package/dist/700.js +0 -1
- package/dist/757.js +0 -2
- package/dist/757.js.LICENSE.txt +0 -14
- package/dist/93.js +0 -1
- package/dist/941.js +0 -1
- package/dist/964.js +0 -1
- package/dist/main.js +0 -1
- package/dist/meta/Box.json +0 -1
- package/dist/meta/Context.json +0 -1
- package/dist/meta/DangerousHtml.json +0 -1
- package/dist/meta/Html.json +0 -1
- package/dist/meta/Img.json +0 -1
- package/dist/meta/List.json +0 -1
- package/dist/meta/Span.json +0 -1
- package/dist/remoteEntry.js +0 -1
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2020-2021 Lowdefy, Inc
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/ import React from 'react';
|
|
17
|
+
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
18
|
+
const Span = ({ blockId , content , events , methods , properties })=>/*#__PURE__*/ _jsx("span", {
|
|
19
|
+
id: blockId,
|
|
20
|
+
"data-testid": blockId,
|
|
21
|
+
onClick: ()=>methods.triggerEvent({
|
|
22
|
+
name: 'onClick'
|
|
23
|
+
})
|
|
24
|
+
,
|
|
25
|
+
className: methods.makeCssClass([
|
|
26
|
+
{
|
|
27
|
+
outline: 'none',
|
|
28
|
+
cursor: events.onClick && 'pointer'
|
|
29
|
+
},
|
|
30
|
+
properties.style,
|
|
31
|
+
]),
|
|
32
|
+
children: properties.content || content.content && content.content()
|
|
33
|
+
})
|
|
34
|
+
;
|
|
35
|
+
Span.defaultProps = blockDefaultProps;
|
|
36
|
+
Span.meta = {
|
|
37
|
+
category: 'container',
|
|
38
|
+
loading: false
|
|
39
|
+
};
|
|
40
|
+
Span.styles = [];
|
|
41
|
+
export default Span;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"properties": {
|
|
4
|
+
"type": "object",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"properties": {
|
|
7
|
+
"content": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "Span content string. Overrides the \"content\" content area."
|
|
10
|
+
},
|
|
11
|
+
"style": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"description": "Css style object to apply to Span div.",
|
|
14
|
+
"docs": {
|
|
15
|
+
"displayType": "yaml"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"events": {
|
|
21
|
+
"type": "object",
|
|
22
|
+
"additionalProperties": false,
|
|
23
|
+
"properties": {
|
|
24
|
+
"onClick": {
|
|
25
|
+
"type": "array",
|
|
26
|
+
"description": "Trigger actions when the Span is clicked."
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
package/dist/blocks.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ export { default as Anchor } from './blocks/Anchor/Anchor.js';
|
|
16
|
+
export { default as Box } from './blocks/Box/Box.js';
|
|
17
|
+
export { default as DangerousHtml } from './blocks/DangerousHtml/DangerousHtml.js';
|
|
18
|
+
export { default as Html } from './blocks/Html/Html.js';
|
|
19
|
+
export { default as Icon } from './blocks/Icon/Icon.js';
|
|
20
|
+
export { default as Img } from './blocks/Img/Img.js';
|
|
21
|
+
export { default as List } from './blocks/List/List.js';
|
|
22
|
+
export { default as Span } from './blocks/Span/Span.js';
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* eslint-disable import/namespace */ /*
|
|
2
|
+
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
|
+
*/ import * as blocks from './blocks.js';
|
|
16
|
+
const styles = {
|
|
17
|
+
};
|
|
18
|
+
Object.keys(blocks).forEach((block)=>{
|
|
19
|
+
styles[block] = blocks[block].styles || [];
|
|
20
|
+
});
|
|
21
|
+
export default {
|
|
22
|
+
blocks: Object.keys(blocks),
|
|
23
|
+
styles: {
|
|
24
|
+
default: [],
|
|
25
|
+
...styles
|
|
26
|
+
}
|
|
27
|
+
}; // export default {
|
|
28
|
+
// blocks: ['Anchor', 'Box', 'DangerousHtml', 'Html', 'Icon', 'Img', 'List', 'Span'],
|
|
29
|
+
// styles: { default: ['style.less'], Anchor: ['blocks/Anchor/style.less'] },
|
|
30
|
+
// };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/blocks-basic",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-alpha.5",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Basic html Lowdefy blocks.",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -25,54 +25,48 @@
|
|
|
25
25
|
"type": "git",
|
|
26
26
|
"url": "https://github.com/lowdefy/lowdefy.git"
|
|
27
27
|
},
|
|
28
|
-
"
|
|
28
|
+
"type": "module",
|
|
29
|
+
"exports": {
|
|
30
|
+
"./*": "./dist/*",
|
|
31
|
+
"./blocks": "./dist/blocks.js",
|
|
32
|
+
"./types": "./dist/types.js"
|
|
33
|
+
},
|
|
29
34
|
"files": [
|
|
30
35
|
"dist/*"
|
|
31
36
|
],
|
|
32
37
|
"scripts": {
|
|
33
|
-
"build": "
|
|
38
|
+
"build": "yarn swc",
|
|
34
39
|
"clean": "rm -rf dist",
|
|
40
|
+
"copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
|
|
35
41
|
"prepare": "yarn build",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"test": "jest --coverage
|
|
42
|
+
"swc": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && yarn copyfiles",
|
|
43
|
+
"test:watch": "jest --coverage --watch",
|
|
44
|
+
"test": "jest --coverage"
|
|
39
45
|
},
|
|
40
46
|
"dependencies": {
|
|
41
|
-
"@lowdefy/block-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"react
|
|
47
|
+
"@lowdefy/block-utils": "4.0.0-alpha.5",
|
|
48
|
+
"@lowdefy/helpers": "4.0.0-alpha.5",
|
|
49
|
+
"dompurify": "2.3.3",
|
|
50
|
+
"react": "18.0.0-alpha-327d5c484-20211106",
|
|
51
|
+
"react-dom": "18.0.0-alpha-327d5c484-20211106"
|
|
45
52
|
},
|
|
46
53
|
"devDependencies": {
|
|
47
|
-
"@babel/
|
|
48
|
-
"@
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"html-webpack-plugin": "5.3.1",
|
|
61
|
-
"identity-obj-proxy": "3.0.0",
|
|
62
|
-
"jest": "26.6.3",
|
|
63
|
-
"js-yaml": "4.1.0",
|
|
64
|
-
"react-markdown": "5.0.3",
|
|
65
|
-
"react-syntax-highlighter": "15.4.3",
|
|
66
|
-
"style-loader": "2.0.0",
|
|
67
|
-
"webpack": "5.38.1",
|
|
68
|
-
"webpack-cli": "4.7.0",
|
|
69
|
-
"webpack-dev-server": "3.11.2",
|
|
70
|
-
"webpack-merge": "5.7.3",
|
|
71
|
-
"yaml-jest": "1.0.5",
|
|
72
|
-
"yaml-loader": "0.6.0"
|
|
54
|
+
"@babel/preset-react": "7.16.0",
|
|
55
|
+
"@emotion/jest": "11.5.0",
|
|
56
|
+
"@lowdefy/block-dev": "4.0.0-alpha.5",
|
|
57
|
+
"@swc/cli": "0.1.52",
|
|
58
|
+
"@swc/core": "1.2.112",
|
|
59
|
+
"@swc/jest": "0.2.9",
|
|
60
|
+
"@testing-library/dom": "8.10.1",
|
|
61
|
+
"@testing-library/react": "13.0.0-alpha.4",
|
|
62
|
+
"@testing-library/user-event": "14.0.0-alpha.14",
|
|
63
|
+
"copyfiles": "2.4.1",
|
|
64
|
+
"jest": "27.3.1",
|
|
65
|
+
"jest-serializer-html": "7.1.0",
|
|
66
|
+
"jest-transform-yaml": "0.1.2"
|
|
73
67
|
},
|
|
74
68
|
"publishConfig": {
|
|
75
69
|
"access": "public"
|
|
76
70
|
},
|
|
77
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "995fcdb020927f3cdc626fc99c15a2e4137bd962"
|
|
78
72
|
}
|