@lowdefy/blocks-basic 4.7.3 → 5.0.0
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 +22 -18
- package/dist/blocks/Anchor/{schema.js → meta.js} +12 -18
- package/dist/blocks/Box/Box.js +9 -16
- package/dist/blocks/Box/{schema.js → meta.js} +13 -22
- package/dist/blocks/DangerousHtml/DangerousHtml.js +5 -10
- package/dist/blocks/DangerousHtml/{schema.js → meta.js} +6 -8
- package/dist/blocks/Html/Html.js +5 -10
- package/dist/blocks/Html/{schema.js → meta.js} +9 -18
- package/dist/blocks/Icon/Icon.js +2 -8
- package/dist/blocks/Icon/{schema.js → meta.js} +11 -18
- package/dist/blocks/Img/Img.js +10 -18
- package/dist/blocks/Img/{schema.js → meta.js} +6 -8
- package/dist/blocks/List/List.js +8 -13
- package/dist/blocks/List/{schema.js → meta.js} +12 -18
- package/dist/blocks/Span/Span.js +9 -16
- package/dist/blocks/Span/{schema.js → meta.js} +12 -18
- package/dist/blocks/Throw/Throw.js +2 -8
- package/dist/blocks/Throw/{schema.js → meta.js} +3 -6
- package/dist/{schemas.js → metas.js} +9 -9
- package/dist/types.js +4 -19
- package/package.json +14 -12
- package/dist/blocks/Anchor/schema.json +0 -100
- package/dist/blocks/Box/schema.json +0 -34
- package/dist/blocks/DangerousHtml/schema.json +0 -30
- package/dist/blocks/Html/schema.json +0 -33
- package/dist/blocks/Icon/schema.json +0 -63
- package/dist/blocks/Img/schema.json +0 -59
- package/dist/blocks/List/schema.json +0 -40
- package/dist/blocks/Span/schema.json +0 -30
- package/dist/blocks/Throw/schema.json +0 -19
|
@@ -14,19 +14,20 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import React from 'react';
|
|
16
16
|
import { get } from '@lowdefy/helpers';
|
|
17
|
-
import {
|
|
18
|
-
const AnchorBlock = ({ blockId, events, components: { Icon, Link }, methods, properties })=>{
|
|
17
|
+
import { withBlockDefaults } from '@lowdefy/block-utils';
|
|
18
|
+
const AnchorBlock = ({ blockId, classNames, events, components: { Icon, Link, ShortcutBadge }, methods, properties, styles })=>{
|
|
19
19
|
const disabled = properties.disabled || get(events, 'onClick.loading');
|
|
20
20
|
const { icon, title, ...linkProperties } = properties;
|
|
21
21
|
return /*#__PURE__*/ React.createElement(Link, {
|
|
22
22
|
id: blockId,
|
|
23
|
-
className:
|
|
24
|
-
|
|
25
|
-
disabled
|
|
23
|
+
className: classNames?.element,
|
|
24
|
+
style: {
|
|
25
|
+
...disabled ? {
|
|
26
26
|
color: '#BEBEBE',
|
|
27
27
|
cursor: 'not-allowed'
|
|
28
|
-
}
|
|
29
|
-
|
|
28
|
+
} : {},
|
|
29
|
+
...styles?.element
|
|
30
|
+
},
|
|
30
31
|
disabled: disabled,
|
|
31
32
|
onClick: ()=>methods.triggerEvent({
|
|
32
33
|
name: 'onClick'
|
|
@@ -34,19 +35,22 @@ const AnchorBlock = ({ blockId, events, components: { Icon, Link }, methods, pro
|
|
|
34
35
|
...linkProperties
|
|
35
36
|
}, (defaultTitle)=>/*#__PURE__*/ React.createElement(React.Fragment, null, icon && /*#__PURE__*/ React.createElement(Icon, {
|
|
36
37
|
blockId: `${blockId}_icon`,
|
|
38
|
+
classNames: {
|
|
39
|
+
element: classNames?.icon
|
|
40
|
+
},
|
|
37
41
|
events: events,
|
|
38
42
|
properties: get(events, 'onClick.loading') ? {
|
|
39
43
|
name: 'AiOutlineLoading3Quarters',
|
|
40
44
|
spin: true
|
|
41
|
-
} : icon
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
} : icon,
|
|
46
|
+
styles: {
|
|
47
|
+
element: {
|
|
48
|
+
marginRight: 4,
|
|
49
|
+
...styles?.icon
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}), title || defaultTitle, /*#__PURE__*/ React.createElement(ShortcutBadge, {
|
|
53
|
+
shortcut: events.onClick?.shortcut
|
|
54
|
+
})));
|
|
51
55
|
};
|
|
52
|
-
export default AnchorBlock;
|
|
56
|
+
export default withBlockDefaults(AnchorBlock);
|
|
@@ -13,7 +13,18 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ export default {
|
|
16
|
-
|
|
16
|
+
category: 'display',
|
|
17
|
+
icons: [
|
|
18
|
+
'AiOutlineLoading3Quarters'
|
|
19
|
+
],
|
|
20
|
+
valueType: null,
|
|
21
|
+
cssKeys: {
|
|
22
|
+
element: 'The anchor element.',
|
|
23
|
+
icon: 'The icon in the Anchor.'
|
|
24
|
+
},
|
|
25
|
+
events: {
|
|
26
|
+
onClick: 'Called when Anchor is clicked. Renders a shortcut badge when a shortcut is configured.'
|
|
27
|
+
},
|
|
17
28
|
properties: {
|
|
18
29
|
type: 'object',
|
|
19
30
|
additionalProperties: false,
|
|
@@ -91,27 +102,10 @@
|
|
|
91
102
|
default: false,
|
|
92
103
|
description: 'Disable scrolling to the top of the page after page transition. Can only be used with pageId link and newTab false.'
|
|
93
104
|
},
|
|
94
|
-
style: {
|
|
95
|
-
type: 'object',
|
|
96
|
-
description: 'Css style object to applied to anchor.',
|
|
97
|
-
docs: {
|
|
98
|
-
displayType: 'yaml'
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
105
|
title: {
|
|
102
106
|
type: 'string',
|
|
103
107
|
description: 'Text to display in the anchor.'
|
|
104
108
|
}
|
|
105
109
|
}
|
|
106
|
-
},
|
|
107
|
-
events: {
|
|
108
|
-
type: 'object',
|
|
109
|
-
additionalProperties: false,
|
|
110
|
-
properties: {
|
|
111
|
-
onClick: {
|
|
112
|
-
type: 'array',
|
|
113
|
-
description: 'Called when Anchor is clicked.'
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
110
|
}
|
|
117
111
|
};
|
package/dist/blocks/Box/Box.js
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import React from 'react';
|
|
16
|
-
import {
|
|
17
|
-
const Box = ({ blockId, content, events, methods, properties })=>{
|
|
16
|
+
import { withBlockDefaults } from '@lowdefy/block-utils';
|
|
17
|
+
const Box = ({ blockId, classNames, content, events, methods, properties, styles })=>{
|
|
18
18
|
return /*#__PURE__*/ React.createElement("div", {
|
|
19
19
|
id: blockId,
|
|
20
20
|
"data-testid": blockId,
|
|
@@ -24,19 +24,12 @@ const Box = ({ blockId, content, events, methods, properties })=>{
|
|
|
24
24
|
onPaste: ()=>methods.triggerEvent({
|
|
25
25
|
name: 'onPaste'
|
|
26
26
|
}),
|
|
27
|
-
className:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
])
|
|
27
|
+
className: classNames?.element,
|
|
28
|
+
style: {
|
|
29
|
+
outline: 'none',
|
|
30
|
+
cursor: events.onClick && 'pointer',
|
|
31
|
+
...styles?.element
|
|
32
|
+
}
|
|
34
33
|
}, properties.content || content.content && content.content());
|
|
35
34
|
};
|
|
36
|
-
|
|
37
|
-
Box.meta = {
|
|
38
|
-
category: 'container',
|
|
39
|
-
icons: [],
|
|
40
|
-
styles: []
|
|
41
|
-
};
|
|
42
|
-
export default Box;
|
|
35
|
+
export default withBlockDefaults(Box);
|
|
@@ -13,7 +13,19 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ export default {
|
|
16
|
-
|
|
16
|
+
category: 'container',
|
|
17
|
+
icons: [],
|
|
18
|
+
valueType: null,
|
|
19
|
+
slots: {
|
|
20
|
+
content: 'Child blocks in the Box.'
|
|
21
|
+
},
|
|
22
|
+
cssKeys: {
|
|
23
|
+
element: 'The Box element.'
|
|
24
|
+
},
|
|
25
|
+
events: {
|
|
26
|
+
onClick: 'Trigger actions when the Box is clicked.',
|
|
27
|
+
onPaste: 'Trigger actions when the element is focused and a paste event is triggered.'
|
|
28
|
+
},
|
|
17
29
|
properties: {
|
|
18
30
|
type: 'object',
|
|
19
31
|
additionalProperties: false,
|
|
@@ -21,27 +33,6 @@
|
|
|
21
33
|
content: {
|
|
22
34
|
type: 'string',
|
|
23
35
|
description: 'Box content string. Overrides the "content" content area.'
|
|
24
|
-
},
|
|
25
|
-
style: {
|
|
26
|
-
type: 'object',
|
|
27
|
-
description: 'Css style object to apply to Box div.',
|
|
28
|
-
docs: {
|
|
29
|
-
displayType: 'yaml'
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
events: {
|
|
35
|
-
type: 'object',
|
|
36
|
-
additionalProperties: false,
|
|
37
|
-
properties: {
|
|
38
|
-
onClick: {
|
|
39
|
-
type: 'array',
|
|
40
|
-
description: 'Trigger actions when the Box is clicked.'
|
|
41
|
-
},
|
|
42
|
-
onPaste: {
|
|
43
|
-
type: 'array',
|
|
44
|
-
description: 'Trigger actions when the element is focused and a paste event is triggered.'
|
|
45
36
|
}
|
|
46
37
|
}
|
|
47
38
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import React from 'react';
|
|
16
16
|
import DOMPurify from 'dompurify';
|
|
17
|
-
import {
|
|
17
|
+
import { withBlockDefaults } from '@lowdefy/block-utils';
|
|
18
18
|
import { type } from '@lowdefy/helpers';
|
|
19
19
|
let DangerousHtml = class DangerousHtml extends React.Component {
|
|
20
20
|
componentDidMount() {
|
|
@@ -26,7 +26,7 @@ let DangerousHtml = class DangerousHtml extends React.Component {
|
|
|
26
26
|
this.div.innerHTML = DOMPurify.sanitize(htmlString, this.DOMPurifyOptions);
|
|
27
27
|
}
|
|
28
28
|
render() {
|
|
29
|
-
const { blockId,
|
|
29
|
+
const { blockId, classNames, styles } = this.props;
|
|
30
30
|
return /*#__PURE__*/ React.createElement("div", {
|
|
31
31
|
id: blockId,
|
|
32
32
|
"data-testid": blockId,
|
|
@@ -35,7 +35,8 @@ let DangerousHtml = class DangerousHtml extends React.Component {
|
|
|
35
35
|
this.div = el;
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
|
-
className:
|
|
38
|
+
className: classNames?.element,
|
|
39
|
+
style: styles?.element
|
|
39
40
|
});
|
|
40
41
|
}
|
|
41
42
|
constructor(props){
|
|
@@ -47,10 +48,4 @@ let DangerousHtml = class DangerousHtml extends React.Component {
|
|
|
47
48
|
this.DOMPurifyOptions = props.properties.DOMPurifyOptions;
|
|
48
49
|
}
|
|
49
50
|
};
|
|
50
|
-
|
|
51
|
-
DangerousHtml.meta = {
|
|
52
|
-
category: 'display',
|
|
53
|
-
icons: [],
|
|
54
|
-
styles: []
|
|
55
|
-
};
|
|
56
|
-
export default DangerousHtml;
|
|
51
|
+
export default withBlockDefaults(DangerousHtml);
|
|
@@ -13,7 +13,12 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ export default {
|
|
16
|
-
|
|
16
|
+
category: 'display',
|
|
17
|
+
icons: [],
|
|
18
|
+
valueType: null,
|
|
19
|
+
cssKeys: {
|
|
20
|
+
element: 'The DangerousHtml element.'
|
|
21
|
+
},
|
|
17
22
|
properties: {
|
|
18
23
|
type: 'object',
|
|
19
24
|
additionalProperties: false,
|
|
@@ -31,13 +36,6 @@
|
|
|
31
36
|
docs: {
|
|
32
37
|
displayType: 'yaml'
|
|
33
38
|
}
|
|
34
|
-
},
|
|
35
|
-
style: {
|
|
36
|
-
type: 'object',
|
|
37
|
-
description: 'Css style object to apply to Html div.',
|
|
38
|
-
docs: {
|
|
39
|
-
displayType: 'yaml'
|
|
40
|
-
}
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
41
|
}
|
package/dist/blocks/Html/Html.js
CHANGED
|
@@ -13,19 +13,14 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import React from 'react';
|
|
16
|
-
import {
|
|
17
|
-
const HtmlBlock = ({ blockId, events, properties, methods })=>/*#__PURE__*/ React.createElement(HtmlComponent, {
|
|
16
|
+
import { withBlockDefaults, HtmlComponent } from '@lowdefy/block-utils';
|
|
17
|
+
const HtmlBlock = ({ blockId, classNames, events, properties, methods, styles })=>/*#__PURE__*/ React.createElement(HtmlComponent, {
|
|
18
18
|
div: true,
|
|
19
19
|
events: events,
|
|
20
20
|
html: properties.html,
|
|
21
21
|
id: blockId,
|
|
22
22
|
methods: methods,
|
|
23
|
-
|
|
23
|
+
className: classNames?.element,
|
|
24
|
+
style: styles?.element
|
|
24
25
|
});
|
|
25
|
-
|
|
26
|
-
HtmlBlock.meta = {
|
|
27
|
-
category: 'display',
|
|
28
|
-
icons: [],
|
|
29
|
-
styles: []
|
|
30
|
-
};
|
|
31
|
-
export default HtmlBlock;
|
|
26
|
+
export default withBlockDefaults(HtmlBlock);
|
|
@@ -13,7 +13,15 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ export default {
|
|
16
|
-
|
|
16
|
+
category: 'display',
|
|
17
|
+
icons: [],
|
|
18
|
+
valueType: null,
|
|
19
|
+
cssKeys: {
|
|
20
|
+
element: 'The Html element.'
|
|
21
|
+
},
|
|
22
|
+
events: {
|
|
23
|
+
onTextSelection: 'Trigger action when text is selected and pass selected text to the event object.'
|
|
24
|
+
},
|
|
17
25
|
properties: {
|
|
18
26
|
type: 'object',
|
|
19
27
|
additionalProperties: false,
|
|
@@ -24,23 +32,6 @@
|
|
|
24
32
|
docs: {
|
|
25
33
|
displayType: 'text-area'
|
|
26
34
|
}
|
|
27
|
-
},
|
|
28
|
-
style: {
|
|
29
|
-
type: 'object',
|
|
30
|
-
description: 'Css style object to apply to Html div.',
|
|
31
|
-
docs: {
|
|
32
|
-
displayType: 'yaml'
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
events: {
|
|
38
|
-
type: 'object',
|
|
39
|
-
additionalProperties: false,
|
|
40
|
-
properties: {
|
|
41
|
-
onTextSelection: {
|
|
42
|
-
type: 'array',
|
|
43
|
-
description: 'Trigger action when text is selected and pass selected text to the event object.'
|
|
44
35
|
}
|
|
45
36
|
}
|
|
46
37
|
}
|
package/dist/blocks/Icon/Icon.js
CHANGED
|
@@ -13,12 +13,6 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import React from 'react';
|
|
16
|
-
import {
|
|
16
|
+
import { withBlockDefaults } from '@lowdefy/block-utils';
|
|
17
17
|
const IconBlock = ({ components: { Icon }, ...props })=>/*#__PURE__*/ React.createElement(Icon, props);
|
|
18
|
-
|
|
19
|
-
IconBlock.meta = {
|
|
20
|
-
category: 'display',
|
|
21
|
-
icons: [],
|
|
22
|
-
styles: []
|
|
23
|
-
};
|
|
24
|
-
export default IconBlock;
|
|
18
|
+
export default withBlockDefaults(IconBlock);
|
|
@@ -13,7 +13,17 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ export default {
|
|
16
|
-
|
|
16
|
+
category: 'display',
|
|
17
|
+
icons: [
|
|
18
|
+
'AiOutlineCloseCircle'
|
|
19
|
+
],
|
|
20
|
+
valueType: null,
|
|
21
|
+
cssKeys: {
|
|
22
|
+
element: 'The Icon element.'
|
|
23
|
+
},
|
|
24
|
+
events: {
|
|
25
|
+
onClick: 'Trigger actions when icon is clicked.'
|
|
26
|
+
},
|
|
17
27
|
properties: {
|
|
18
28
|
type: 'object',
|
|
19
29
|
additionalProperties: false,
|
|
@@ -53,28 +63,11 @@
|
|
|
53
63
|
type: 'string',
|
|
54
64
|
description: 'Icon hover title for accessibility.'
|
|
55
65
|
},
|
|
56
|
-
style: {
|
|
57
|
-
type: 'object',
|
|
58
|
-
description: 'CSS style object.',
|
|
59
|
-
docs: {
|
|
60
|
-
displayType: 'yaml'
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
66
|
disableLoadingIcon: {
|
|
64
67
|
type: 'boolean',
|
|
65
68
|
default: false,
|
|
66
69
|
description: "While loading after the icon has been clicked, don't render the loading icon."
|
|
67
70
|
}
|
|
68
71
|
}
|
|
69
|
-
},
|
|
70
|
-
events: {
|
|
71
|
-
type: 'object',
|
|
72
|
-
additionalProperties: false,
|
|
73
|
-
properties: {
|
|
74
|
-
onClick: {
|
|
75
|
-
type: 'array',
|
|
76
|
-
description: 'Trigger actions when icon is clicked.'
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
72
|
}
|
|
80
73
|
};
|
package/dist/blocks/Img/Img.js
CHANGED
|
@@ -13,29 +13,21 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import React from 'react';
|
|
16
|
-
import {
|
|
17
|
-
const ImgBlock = ({ blockId, events, properties, methods })=>{
|
|
18
|
-
const { style, ...allProps } = properties;
|
|
16
|
+
import { withBlockDefaults } from '@lowdefy/block-utils';
|
|
17
|
+
const ImgBlock = ({ blockId, classNames, events, properties, methods, styles })=>{
|
|
19
18
|
return /*#__PURE__*/ React.createElement("img", {
|
|
20
|
-
...
|
|
19
|
+
...properties,
|
|
21
20
|
id: blockId,
|
|
22
21
|
"data-testid": blockId,
|
|
23
22
|
onClick: ()=>methods.triggerEvent({
|
|
24
23
|
name: 'onClick'
|
|
25
24
|
}),
|
|
26
|
-
className:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
])
|
|
25
|
+
className: classNames?.element,
|
|
26
|
+
style: {
|
|
27
|
+
outline: 'none',
|
|
28
|
+
cursor: events.onClick && 'pointer',
|
|
29
|
+
...styles?.element
|
|
30
|
+
}
|
|
33
31
|
});
|
|
34
32
|
};
|
|
35
|
-
|
|
36
|
-
ImgBlock.meta = {
|
|
37
|
-
category: 'display',
|
|
38
|
-
icons: [],
|
|
39
|
-
styles: []
|
|
40
|
-
};
|
|
41
|
-
export default ImgBlock;
|
|
33
|
+
export default withBlockDefaults(ImgBlock);
|
|
@@ -13,7 +13,12 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ export default {
|
|
16
|
-
|
|
16
|
+
category: 'display',
|
|
17
|
+
icons: [],
|
|
18
|
+
valueType: null,
|
|
19
|
+
cssKeys: {
|
|
20
|
+
element: 'The Img element.'
|
|
21
|
+
},
|
|
17
22
|
properties: {
|
|
18
23
|
type: 'object',
|
|
19
24
|
additionalProperties: false,
|
|
@@ -69,13 +74,6 @@
|
|
|
69
74
|
displayType: 'text-area'
|
|
70
75
|
}
|
|
71
76
|
},
|
|
72
|
-
style: {
|
|
73
|
-
type: 'object',
|
|
74
|
-
description: 'Css style object to applied to the image.',
|
|
75
|
-
docs: {
|
|
76
|
-
displayType: 'yaml'
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
77
|
width: {
|
|
80
78
|
type: 'number',
|
|
81
79
|
description: 'Width of the image.'
|
package/dist/blocks/List/List.js
CHANGED
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import React, { useEffect } from 'react';
|
|
16
|
-
import {
|
|
16
|
+
import { withBlockDefaults } from '@lowdefy/block-utils';
|
|
17
17
|
import Box from '../Box/Box.js';
|
|
18
|
-
const List = ({ blockId, events, list, methods, properties })=>{
|
|
18
|
+
const List = ({ blockId, classNames, events, list, methods, properties, styles })=>{
|
|
19
19
|
useEffect(()=>{
|
|
20
20
|
methods.registerMethod('pushItem', methods.pushItem);
|
|
21
21
|
methods.registerMethod('unshiftItem', methods.unshiftItem);
|
|
@@ -26,15 +26,17 @@ const List = ({ blockId, events, list, methods, properties })=>{
|
|
|
26
26
|
return /*#__PURE__*/ React.createElement(Box, {
|
|
27
27
|
blockId: blockId,
|
|
28
28
|
events: events,
|
|
29
|
-
properties: {
|
|
30
|
-
|
|
29
|
+
properties: {},
|
|
30
|
+
classNames: classNames,
|
|
31
|
+
styles: {
|
|
32
|
+
element: {
|
|
31
33
|
...properties.direction ? {
|
|
32
34
|
display: 'flex',
|
|
33
35
|
flexDirection: properties.direction,
|
|
34
36
|
flexWrap: properties.wrap ? properties.wrap : 'wrap',
|
|
35
37
|
overflow: properties.scroll ? 'auto' : 'visible'
|
|
36
38
|
} : {},
|
|
37
|
-
...
|
|
39
|
+
...styles?.element
|
|
38
40
|
}
|
|
39
41
|
},
|
|
40
42
|
methods: methods,
|
|
@@ -43,11 +45,4 @@ const List = ({ blockId, events, list, methods, properties })=>{
|
|
|
43
45
|
}
|
|
44
46
|
});
|
|
45
47
|
};
|
|
46
|
-
|
|
47
|
-
List.meta = {
|
|
48
|
-
category: 'list',
|
|
49
|
-
valueType: 'array',
|
|
50
|
-
icons: [],
|
|
51
|
-
styles: []
|
|
52
|
-
};
|
|
53
|
-
export default List;
|
|
48
|
+
export default withBlockDefaults(List);
|
|
@@ -13,7 +13,18 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ export default {
|
|
16
|
-
|
|
16
|
+
category: 'list',
|
|
17
|
+
icons: [],
|
|
18
|
+
valueType: 'array',
|
|
19
|
+
slots: {
|
|
20
|
+
content: 'Blocks rendered for each list item.'
|
|
21
|
+
},
|
|
22
|
+
cssKeys: {
|
|
23
|
+
element: 'The List element.'
|
|
24
|
+
},
|
|
25
|
+
events: {
|
|
26
|
+
onClick: 'Trigger actions when the List is clicked.'
|
|
27
|
+
},
|
|
17
28
|
properties: {
|
|
18
29
|
type: 'object',
|
|
19
30
|
additionalProperties: false,
|
|
@@ -40,23 +51,6 @@
|
|
|
40
51
|
scroll: {
|
|
41
52
|
type: 'boolean',
|
|
42
53
|
description: "Specifies whether scrolling should be applied to the List, can be true or false. Applies the 'overflow' css property to the List block - defaults to 'visible', requires List direction to be set."
|
|
43
|
-
},
|
|
44
|
-
style: {
|
|
45
|
-
type: 'object',
|
|
46
|
-
description: 'Css style object to apply to List block.',
|
|
47
|
-
docs: {
|
|
48
|
-
displayType: 'yaml'
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
events: {
|
|
54
|
-
type: 'object',
|
|
55
|
-
additionalProperties: false,
|
|
56
|
-
properties: {
|
|
57
|
-
onClick: {
|
|
58
|
-
type: 'array',
|
|
59
|
-
description: 'Trigger actions when the List is clicked.'
|
|
60
54
|
}
|
|
61
55
|
}
|
|
62
56
|
}
|
package/dist/blocks/Span/Span.js
CHANGED
|
@@ -13,25 +13,18 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import React from 'react';
|
|
16
|
-
import {
|
|
17
|
-
const Span = ({ blockId, content, events, methods, properties })=>/*#__PURE__*/ React.createElement("span", {
|
|
16
|
+
import { withBlockDefaults } from '@lowdefy/block-utils';
|
|
17
|
+
const Span = ({ blockId, classNames, content, events, methods, properties, styles })=>/*#__PURE__*/ React.createElement("span", {
|
|
18
18
|
id: blockId,
|
|
19
19
|
"data-testid": blockId,
|
|
20
20
|
onClick: ()=>methods.triggerEvent({
|
|
21
21
|
name: 'onClick'
|
|
22
22
|
}),
|
|
23
|
-
className:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
])
|
|
23
|
+
className: classNames?.element,
|
|
24
|
+
style: {
|
|
25
|
+
outline: 'none',
|
|
26
|
+
cursor: events.onClick && 'pointer',
|
|
27
|
+
...styles?.element
|
|
28
|
+
}
|
|
30
29
|
}, properties.content || content.content && content.content());
|
|
31
|
-
|
|
32
|
-
Span.meta = {
|
|
33
|
-
category: 'container',
|
|
34
|
-
icons: [],
|
|
35
|
-
styles: []
|
|
36
|
-
};
|
|
37
|
-
export default Span;
|
|
30
|
+
export default withBlockDefaults(Span);
|
|
@@ -13,7 +13,18 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ export default {
|
|
16
|
-
|
|
16
|
+
category: 'container',
|
|
17
|
+
icons: [],
|
|
18
|
+
valueType: null,
|
|
19
|
+
slots: {
|
|
20
|
+
content: 'Child blocks in the Span.'
|
|
21
|
+
},
|
|
22
|
+
cssKeys: {
|
|
23
|
+
element: 'The Span element.'
|
|
24
|
+
},
|
|
25
|
+
events: {
|
|
26
|
+
onClick: 'Trigger actions when the Span is clicked.'
|
|
27
|
+
},
|
|
17
28
|
properties: {
|
|
18
29
|
type: 'object',
|
|
19
30
|
additionalProperties: false,
|
|
@@ -21,23 +32,6 @@
|
|
|
21
32
|
content: {
|
|
22
33
|
type: 'string',
|
|
23
34
|
description: 'Span content string. Overrides the "content" content area.'
|
|
24
|
-
},
|
|
25
|
-
style: {
|
|
26
|
-
type: 'object',
|
|
27
|
-
description: 'Css style object to apply to Span div.',
|
|
28
|
-
docs: {
|
|
29
|
-
displayType: 'yaml'
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
events: {
|
|
35
|
-
type: 'object',
|
|
36
|
-
additionalProperties: false,
|
|
37
|
-
properties: {
|
|
38
|
-
onClick: {
|
|
39
|
-
type: 'array',
|
|
40
|
-
description: 'Trigger actions when the Span is clicked.'
|
|
41
35
|
}
|
|
42
36
|
}
|
|
43
37
|
}
|
|
@@ -13,15 +13,9 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ import React from 'react';
|
|
16
|
-
import {
|
|
16
|
+
import { withBlockDefaults } from '@lowdefy/block-utils';
|
|
17
17
|
const Throw = ({ properties })=>{
|
|
18
18
|
const message = properties.message || 'Intentional error thrown by Throw block';
|
|
19
19
|
throw new Error(message);
|
|
20
20
|
};
|
|
21
|
-
|
|
22
|
-
Throw.meta = {
|
|
23
|
-
category: 'display',
|
|
24
|
-
icons: [],
|
|
25
|
-
styles: []
|
|
26
|
-
};
|
|
27
|
-
export default Throw;
|
|
21
|
+
export default withBlockDefaults(Throw);
|
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/ export default {
|
|
16
|
-
|
|
16
|
+
category: 'display',
|
|
17
|
+
icons: [],
|
|
18
|
+
valueType: null,
|
|
17
19
|
properties: {
|
|
18
20
|
type: 'object',
|
|
19
21
|
additionalProperties: false,
|
|
@@ -24,10 +26,5 @@
|
|
|
24
26
|
default: 'Intentional error thrown by Throw block'
|
|
25
27
|
}
|
|
26
28
|
}
|
|
27
|
-
},
|
|
28
|
-
events: {
|
|
29
|
-
type: 'object',
|
|
30
|
-
additionalProperties: false,
|
|
31
|
-
properties: {}
|
|
32
29
|
}
|
|
33
30
|
};
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/ export { default as Anchor } from './blocks/Anchor/
|
|
16
|
-
export { default as Box } from './blocks/Box/
|
|
17
|
-
export { default as DangerousHtml } from './blocks/DangerousHtml/
|
|
18
|
-
export { default as Html } from './blocks/Html/
|
|
19
|
-
export { default as Icon } from './blocks/Icon/
|
|
20
|
-
export { default as Img } from './blocks/Img/
|
|
21
|
-
export { default as List } from './blocks/List/
|
|
22
|
-
export { default as Span } from './blocks/Span/
|
|
23
|
-
export { default as Throw } from './blocks/Throw/
|
|
15
|
+
*/ export { default as Anchor } from './blocks/Anchor/meta.js';
|
|
16
|
+
export { default as Box } from './blocks/Box/meta.js';
|
|
17
|
+
export { default as DangerousHtml } from './blocks/DangerousHtml/meta.js';
|
|
18
|
+
export { default as Html } from './blocks/Html/meta.js';
|
|
19
|
+
export { default as Icon } from './blocks/Icon/meta.js';
|
|
20
|
+
export { default as Img } from './blocks/Img/meta.js';
|
|
21
|
+
export { default as List } from './blocks/List/meta.js';
|
|
22
|
+
export { default as Span } from './blocks/Span/meta.js';
|
|
23
|
+
export { default as Throw } from './blocks/Throw/meta.js';
|
package/dist/types.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/*
|
|
2
2
|
Copyright 2020-2026 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -12,21 +12,6 @@
|
|
|
12
12
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
13
|
See the License for the specific language governing permissions and
|
|
14
14
|
limitations under the License.
|
|
15
|
-
*/ import
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Object.keys(blocks).forEach((block)=>{
|
|
19
|
-
icons[block] = blocks[block].meta.icons ?? [];
|
|
20
|
-
styles[block] = blocks[block].meta.styles ?? [];
|
|
21
|
-
});
|
|
22
|
-
export default {
|
|
23
|
-
blocks: Object.keys(blocks),
|
|
24
|
-
icons,
|
|
25
|
-
styles: {
|
|
26
|
-
default: [],
|
|
27
|
-
...styles
|
|
28
|
-
}
|
|
29
|
-
}; // export default {
|
|
30
|
-
// blocks: ['Anchor', 'Box', 'DangerousHtml', 'Html', 'Icon', 'Img', 'List', 'Span'],
|
|
31
|
-
// styles: { default: ['style.less'], Anchor: ['blocks/Anchor/style.less'] },
|
|
32
|
-
// };
|
|
15
|
+
*/ import { extractBlockTypes } from '@lowdefy/block-utils';
|
|
16
|
+
import * as metas from './metas.js';
|
|
17
|
+
export default extractBlockTypes(metas);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/blocks-basic",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Basic html Lowdefy blocks.",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -35,32 +35,34 @@
|
|
|
35
35
|
"./*": "./dist/*",
|
|
36
36
|
"./blocks": "./dist/blocks.js",
|
|
37
37
|
"./e2e": "./dist/e2e.js",
|
|
38
|
-
"./
|
|
38
|
+
"./metas": "./dist/metas.js",
|
|
39
39
|
"./types": "./dist/types.js"
|
|
40
40
|
},
|
|
41
41
|
"files": [
|
|
42
42
|
"dist/*"
|
|
43
43
|
],
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@lowdefy/block-utils": "
|
|
46
|
-
"@lowdefy/helpers": "
|
|
47
|
-
"dompurify": "3.2.4"
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
"@lowdefy/block-utils": "5.0.0",
|
|
46
|
+
"@lowdefy/helpers": "5.0.0",
|
|
47
|
+
"dompurify": "3.2.4"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"react": ">=18",
|
|
51
|
+
"react-dom": ">=18"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
52
|
-
"@lowdefy/block-dev-e2e": "
|
|
53
|
-
"@lowdefy/e2e-utils": "
|
|
54
|
+
"@lowdefy/block-dev-e2e": "5.0.0",
|
|
55
|
+
"@lowdefy/e2e-utils": "5.0.0",
|
|
54
56
|
"@playwright/test": "1.50.1",
|
|
55
|
-
"@swc/cli": "0.
|
|
56
|
-
"@swc/core": "1.
|
|
57
|
+
"@swc/cli": "0.8.0",
|
|
58
|
+
"@swc/core": "1.15.18",
|
|
57
59
|
"copyfiles": "2.4.1"
|
|
58
60
|
},
|
|
59
61
|
"publishConfig": {
|
|
60
62
|
"access": "public"
|
|
61
63
|
},
|
|
62
64
|
"scripts": {
|
|
63
|
-
"build": "swc src --out-dir dist --config-file ../../../../.swcrc --
|
|
65
|
+
"build": "swc src --out-dir dist --config-file ../../../../.swcrc --cli-config-file ../../../../.swc-cli.json && pnpm copyfiles",
|
|
64
66
|
"clean": "rm -rf dist",
|
|
65
67
|
"copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
|
|
66
68
|
"e2e": "playwright test --config e2e/playwright.config.js",
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"properties": {
|
|
7
|
-
"ariaLabel": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "Arial-label to apply to link tag."
|
|
10
|
-
},
|
|
11
|
-
"back": {
|
|
12
|
-
"type": "boolean",
|
|
13
|
-
"description": "When the link is clicked, trigger the browser back."
|
|
14
|
-
},
|
|
15
|
-
"home": {
|
|
16
|
-
"type": "boolean",
|
|
17
|
-
"description": "When the link is clicked, route to the home page."
|
|
18
|
-
},
|
|
19
|
-
"input": {
|
|
20
|
-
"type": "object",
|
|
21
|
-
"description": "When the link is clicked, pass data as the input object to the next Lowdefy page. Can only be used with pageId link and newTab false.",
|
|
22
|
-
"docs": {
|
|
23
|
-
"displayType": "yaml"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"urlQuery": {
|
|
27
|
-
"type": "object",
|
|
28
|
-
"description": "When the link is clicked, pass data as a url query to the next page.",
|
|
29
|
-
"docs": {
|
|
30
|
-
"displayType": "yaml"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"disabled": {
|
|
34
|
-
"type": "boolean",
|
|
35
|
-
"default": false,
|
|
36
|
-
"description": "Disable the anchor if true."
|
|
37
|
-
},
|
|
38
|
-
"icon": {
|
|
39
|
-
"type": ["string", "object"],
|
|
40
|
-
"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 for anchor icon.",
|
|
41
|
-
"docs": {
|
|
42
|
-
"displayType": "icon"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"pageId": {
|
|
46
|
-
"type": "string",
|
|
47
|
-
"description": "When the link is clicked, route to the provided Lowdefy page."
|
|
48
|
-
},
|
|
49
|
-
"href": {
|
|
50
|
-
"type": "string",
|
|
51
|
-
"description": "The href to link to when the anchor link is clicked."
|
|
52
|
-
},
|
|
53
|
-
"url": {
|
|
54
|
-
"type": "string",
|
|
55
|
-
"description": "External url to link to when the anchor link is clicked."
|
|
56
|
-
},
|
|
57
|
-
"rel": {
|
|
58
|
-
"type": "string",
|
|
59
|
-
"default": "noopener noreferrer",
|
|
60
|
-
"description": "The relationship of the linked URL as space-separated link types."
|
|
61
|
-
},
|
|
62
|
-
"newTab": {
|
|
63
|
-
"type": "boolean",
|
|
64
|
-
"default": false,
|
|
65
|
-
"description": "Open link in a new tab when the anchor link is clicked."
|
|
66
|
-
},
|
|
67
|
-
"replace": {
|
|
68
|
-
"type": "boolean",
|
|
69
|
-
"default": false,
|
|
70
|
-
"description": "Prevent adding a new entry into browser history by replacing the url instead of pushing into history. Can only be used with pageId link and newTab false."
|
|
71
|
-
},
|
|
72
|
-
"scroll": {
|
|
73
|
-
"type": "boolean",
|
|
74
|
-
"default": false,
|
|
75
|
-
"description": "Disable scrolling to the top of the page after page transition. Can only be used with pageId link and newTab false."
|
|
76
|
-
},
|
|
77
|
-
"style": {
|
|
78
|
-
"type": "object",
|
|
79
|
-
"description": "Css style object to applied to anchor.",
|
|
80
|
-
"docs": {
|
|
81
|
-
"displayType": "yaml"
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
"title": {
|
|
85
|
-
"type": "string",
|
|
86
|
-
"description": "Text to display in the anchor."
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
},
|
|
90
|
-
"events": {
|
|
91
|
-
"type": "object",
|
|
92
|
-
"additionalProperties": false,
|
|
93
|
-
"properties": {
|
|
94
|
-
"onClick": {
|
|
95
|
-
"type": "array",
|
|
96
|
-
"description": "Called when Anchor is clicked."
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"properties": {
|
|
7
|
-
"content": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "Box content string. Overrides the \"content\" content area."
|
|
10
|
-
},
|
|
11
|
-
"style": {
|
|
12
|
-
"type": "object",
|
|
13
|
-
"description": "Css style object to apply to Box 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 Box is clicked."
|
|
27
|
-
},
|
|
28
|
-
"onPaste": {
|
|
29
|
-
"type": "array",
|
|
30
|
-
"description": "Trigger actions when the element is focused and a paste event is triggered."
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"properties": {
|
|
7
|
-
"html": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "Content to be rendered as Html.",
|
|
10
|
-
"docs": {
|
|
11
|
-
"displayType": "text-area"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"DOMPurifyOptions": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"description": "Customize DOMPurify options. Options are only applied when the block is mounted, thus any parsed settings is only applied at first render.",
|
|
17
|
-
"docs": {
|
|
18
|
-
"displayType": "yaml"
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
"style": {
|
|
22
|
-
"type": "object",
|
|
23
|
-
"description": "Css style object to apply to Html div.",
|
|
24
|
-
"docs": {
|
|
25
|
-
"displayType": "yaml"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"properties": {
|
|
7
|
-
"html": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "Content to be rendered as Html.",
|
|
10
|
-
"docs": {
|
|
11
|
-
"displayType": "text-area"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"style": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"description": "Css style object to apply to Html div.",
|
|
17
|
-
"docs": {
|
|
18
|
-
"displayType": "yaml"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"events": {
|
|
24
|
-
"type": "object",
|
|
25
|
-
"additionalProperties": false,
|
|
26
|
-
"properties": {
|
|
27
|
-
"onTextSelection": {
|
|
28
|
-
"type": "array",
|
|
29
|
-
"description": "Trigger action when text is selected and pass selected text to the event object."
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"properties": {
|
|
7
|
-
"color": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "Primary icon color.",
|
|
10
|
-
"docs": {
|
|
11
|
-
"displayType": "color"
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"name": {
|
|
15
|
-
"type": "string",
|
|
16
|
-
"default": "AiOutlineCloseCircle",
|
|
17
|
-
"description": "Name of icon to be displayed."
|
|
18
|
-
},
|
|
19
|
-
"rotate": {
|
|
20
|
-
"type": "number",
|
|
21
|
-
"description": "Number of degrees to rotate the icon."
|
|
22
|
-
},
|
|
23
|
-
"size": {
|
|
24
|
-
"type": ["string", "number"],
|
|
25
|
-
"description": "Size of the icon.",
|
|
26
|
-
"docs": {
|
|
27
|
-
"displayType": "number"
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"spin": {
|
|
31
|
-
"type": "boolean",
|
|
32
|
-
"default": false,
|
|
33
|
-
"description": "Continuously spin icon with animation."
|
|
34
|
-
},
|
|
35
|
-
"title": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"description": "Icon hover title for accessibility."
|
|
38
|
-
},
|
|
39
|
-
"style": {
|
|
40
|
-
"type": "object",
|
|
41
|
-
"description": "CSS style object.",
|
|
42
|
-
"docs": {
|
|
43
|
-
"displayType": "yaml"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"disableLoadingIcon": {
|
|
47
|
-
"type": "boolean",
|
|
48
|
-
"default": false,
|
|
49
|
-
"description": "While loading after the icon has been clicked, don't render the loading icon."
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"events": {
|
|
54
|
-
"type": "object",
|
|
55
|
-
"additionalProperties": false,
|
|
56
|
-
"properties": {
|
|
57
|
-
"onClick": {
|
|
58
|
-
"type": "array",
|
|
59
|
-
"description": "Trigger actions when icon is clicked."
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"required": ["src"],
|
|
7
|
-
"properties": {
|
|
8
|
-
"src": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"description": "The image URL."
|
|
11
|
-
},
|
|
12
|
-
"alt": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"description": "Alternative text description of the image."
|
|
15
|
-
},
|
|
16
|
-
"crossOrigin": {
|
|
17
|
-
"type": "string",
|
|
18
|
-
"enum": ["anonymous", "use-credentials"],
|
|
19
|
-
"description": "Indicates if the fetching of the image must be done using a CORS request."
|
|
20
|
-
},
|
|
21
|
-
"decoding": {
|
|
22
|
-
"type": "string",
|
|
23
|
-
"enum": ["sync", "async", "auto"],
|
|
24
|
-
"description": "An image decoding hint to the browser. Sync for atomic presentation with other content, async, to reduce delay in presenting other content and auto leave to browser to decide."
|
|
25
|
-
},
|
|
26
|
-
"height": {
|
|
27
|
-
"type": "number",
|
|
28
|
-
"description": "Height of the image."
|
|
29
|
-
},
|
|
30
|
-
"loading": {
|
|
31
|
-
"type": "string",
|
|
32
|
-
"enum": ["eager", "lazy"],
|
|
33
|
-
"description": "How the browser should load the image. Eager loads the image immediately, lazy, defers loading until the image it reaches a calculated distance from the viewport, as defined by the browser."
|
|
34
|
-
},
|
|
35
|
-
"sizes": {
|
|
36
|
-
"type": "string",
|
|
37
|
-
"description": "Indicating a set of source sizes of strings separated by commas."
|
|
38
|
-
},
|
|
39
|
-
"srcSet": {
|
|
40
|
-
"type": "string",
|
|
41
|
-
"description": "Possible image sources for the user agent to use, strings separated by commas.",
|
|
42
|
-
"docs": {
|
|
43
|
-
"displayType": "text-area"
|
|
44
|
-
}
|
|
45
|
-
},
|
|
46
|
-
"style": {
|
|
47
|
-
"type": "object",
|
|
48
|
-
"description": "Css style object to applied to the image.",
|
|
49
|
-
"docs": {
|
|
50
|
-
"displayType": "yaml"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
"width": {
|
|
54
|
-
"type": "number",
|
|
55
|
-
"description": "Width of the image."
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"properties": {
|
|
7
|
-
"direction": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"enum": ["row", "column", "row-reverse", "column-reverse"],
|
|
10
|
-
"description": "List content along a 'row' or down a 'column'. Applies the 'flex-direction' css property to the List block."
|
|
11
|
-
},
|
|
12
|
-
"wrap": {
|
|
13
|
-
"type": "string",
|
|
14
|
-
"enum": ["wrap", "nowrap", "wrap-reverse"],
|
|
15
|
-
"description": "Specifies wrapping style to be applied to List block as 'wrap', 'nowrap' or 'wrap-reverse'. Applies the 'flex-wrap' css property to the List block - defaults to 'wrap', requires List direction to be set."
|
|
16
|
-
},
|
|
17
|
-
"scroll": {
|
|
18
|
-
"type": "boolean",
|
|
19
|
-
"description": "Specifies whether scrolling should be applied to the List, can be true or false. Applies the 'overflow' css property to the List block - defaults to 'visible', requires List direction to be set."
|
|
20
|
-
},
|
|
21
|
-
"style": {
|
|
22
|
-
"type": "object",
|
|
23
|
-
"description": "Css style object to apply to List block.",
|
|
24
|
-
"docs": {
|
|
25
|
-
"displayType": "yaml"
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
"events": {
|
|
31
|
-
"type": "object",
|
|
32
|
-
"additionalProperties": false,
|
|
33
|
-
"properties": {
|
|
34
|
-
"onClick": {
|
|
35
|
-
"type": "array",
|
|
36
|
-
"description": "Trigger actions when the List is clicked."
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"type": "object",
|
|
3
|
-
"properties": {
|
|
4
|
-
"type": "object",
|
|
5
|
-
"additionalProperties": false,
|
|
6
|
-
"properties": {
|
|
7
|
-
"message": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"description": "Error message to throw.",
|
|
10
|
-
"default": "Intentional error thrown by Throw block"
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
"events": {
|
|
15
|
-
"type": "object",
|
|
16
|
-
"additionalProperties": false,
|
|
17
|
-
"properties": {}
|
|
18
|
-
}
|
|
19
|
-
}
|