@builder.io/sdk-react-native 0.1.3 → 0.1.4
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/columns/columns.js +4 -4
- package/dist/blocks/form/form.js +6 -6
- package/dist/blocks/symbol/symbol.js +2 -2
- package/dist/components/render-block/block-styles.js +2 -2
- package/dist/components/render-block/render-block.js +6 -6
- package/dist/components/render-block/render-component.js +4 -4
- package/dist/components/render-block/render-repeated-block.js +2 -2
- package/dist/components/render-blocks.js +4 -4
- package/dist/components/render-content/components/render-styles.js +2 -2
- package/dist/components/render-content/index.js +2 -2
- package/dist/components/render-content/render-content.js +4 -4
- package/dist/components/render-inlined-styles.js +2 -2
- package/dist/constants/builder-registered-components.js +14 -14
- package/dist/index-helpers/blocks-exports.js +16 -16
- package/package.json +1 -1
- package/src/blocks/columns/columns.jsx +2 -2
- package/src/blocks/form/form.jsx +2 -2
- package/src/blocks/symbol/symbol.jsx +1 -1
- package/src/components/render-block/block-styles.jsx +1 -1
- package/src/components/render-block/render-block.jsx +3 -3
- package/src/components/render-block/render-component.jsx +2 -2
- package/src/components/render-block/render-repeated-block.jsx +1 -1
- package/src/components/render-blocks.jsx +2 -2
- package/src/components/render-content/components/render-styles.jsx +1 -1
- package/src/components/render-content/index.js +1 -1
- package/src/components/render-content/render-content.jsx +2 -2
- package/src/components/render-inlined-styles.jsx +2 -2
- package/src/constants/builder-registered-components.js +7 -7
- package/src/index-helpers/blocks-exports.js +8 -8
|
@@ -28,9 +28,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const React = __importStar(require("react"));
|
|
30
30
|
const react_native_1 = require("react-native");
|
|
31
|
-
const
|
|
31
|
+
const render_blocks_1 = __importDefault(require("../../components/render-blocks"));
|
|
32
32
|
const device_sizes_1 = require("../../constants/device-sizes");
|
|
33
|
-
const
|
|
33
|
+
const render_inlined_styles_1 = __importDefault(require("../../components/render-inlined-styles"));
|
|
34
34
|
const target_js_1 = require("../../constants/target.js");
|
|
35
35
|
const css_1 = require("../../helpers/css");
|
|
36
36
|
function Columns(props) {
|
|
@@ -136,9 +136,9 @@ function Columns(props) {
|
|
|
136
136
|
}
|
|
137
137
|
return (React.createElement(react_native_1.View, { style: styles.view1 },
|
|
138
138
|
target_js_1.TARGET !== "reactNative" ? (React.createElement(React.Fragment, null,
|
|
139
|
-
React.createElement(
|
|
139
|
+
React.createElement(render_inlined_styles_1.default, { styles: columnsStyles() }))) : null, (_a = props.columns) === null || _a === void 0 ? void 0 :
|
|
140
140
|
_a.map((column, index) => (React.createElement(react_native_1.View, { style: styles.view2, key: index },
|
|
141
|
-
React.createElement(
|
|
141
|
+
React.createElement(render_blocks_1.default, { blocks: column.blocks, path: `component.options.columns.${index}.blocks`, parent: props.builderBlock.id, styleProp: {
|
|
142
142
|
flexGrow: "1",
|
|
143
143
|
} }))))));
|
|
144
144
|
}
|
package/dist/blocks/form/form.js
CHANGED
|
@@ -30,8 +30,8 @@ const BaseText_1 = __importDefault(require("../BaseText"));
|
|
|
30
30
|
const React = __importStar(require("react"));
|
|
31
31
|
const react_native_1 = require("react-native");
|
|
32
32
|
const react_1 = require("react");
|
|
33
|
-
const
|
|
34
|
-
const
|
|
33
|
+
const render_block_1 = __importDefault(require("../../components/render-block/render-block"));
|
|
34
|
+
const render_blocks_1 = __importDefault(require("../../components/render-blocks"));
|
|
35
35
|
const is_editing_js_1 = require("../../functions/is-editing.js");
|
|
36
36
|
function FormComponent(props) {
|
|
37
37
|
var _a, _b;
|
|
@@ -208,13 +208,13 @@ function FormComponent(props) {
|
|
|
208
208
|
const builderContext = (0, react_1.useContext)(BuilderContext);
|
|
209
209
|
return (React.createElement(react_native_1.View, { validate: props.validate, ref: formRef, action: !props.sendWithJs && props.action, method: props.method, name: props.name, onSubmit: (event) => onSubmit(event), ...props.attributes },
|
|
210
210
|
" ",
|
|
211
|
-
props.builderBlock && props.builderBlock.children ? (React.createElement(React.Fragment, null, (_b = (_a = props.builderBlock) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.map((block) => (React.createElement(
|
|
211
|
+
props.builderBlock && props.builderBlock.children ? (React.createElement(React.Fragment, null, (_b = (_a = props.builderBlock) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.map((block) => (React.createElement(render_block_1.default, { block: block, context: builderContext }))))) : null,
|
|
212
212
|
" ",
|
|
213
213
|
submissionState() === "error" ? (React.createElement(React.Fragment, null,
|
|
214
|
-
React.createElement(
|
|
214
|
+
React.createElement(render_blocks_1.default, { dataPath: "errorMessage", blocks: props.errorMessage }))) : null,
|
|
215
215
|
" ",
|
|
216
216
|
submissionState() === "sending" ? (React.createElement(React.Fragment, null,
|
|
217
|
-
React.createElement(
|
|
217
|
+
React.createElement(render_blocks_1.default, { dataPath: "sendingMessage", blocks: props.sendingMessage }))) : null,
|
|
218
218
|
" ",
|
|
219
219
|
submissionState() === "error" && responseData ? (React.createElement(React.Fragment, null,
|
|
220
220
|
React.createElement(react_native_1.View, { style: styles.view1 },
|
|
@@ -223,7 +223,7 @@ function FormComponent(props) {
|
|
|
223
223
|
" "))) : null,
|
|
224
224
|
" ",
|
|
225
225
|
submissionState() === "success" ? (React.createElement(React.Fragment, null,
|
|
226
|
-
React.createElement(
|
|
226
|
+
React.createElement(render_blocks_1.default, { dataPath: "successMessage", blocks: props.successMessage }))) : null,
|
|
227
227
|
" "));
|
|
228
228
|
}
|
|
229
229
|
exports.default = FormComponent;
|
|
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
const React = __importStar(require("react"));
|
|
30
30
|
const react_native_1 = require("react-native");
|
|
31
31
|
const react_1 = require("react");
|
|
32
|
-
const
|
|
32
|
+
const render_content_1 = __importDefault(require("../../components/render-content/render-content"));
|
|
33
33
|
const builder_context_js_1 = __importDefault(require("../../context/builder.context.js"));
|
|
34
34
|
const index_js_1 = require("../../functions/get-content/index.js");
|
|
35
35
|
const target_1 = require("../../constants/target");
|
|
@@ -88,7 +88,7 @@ function Symbol(props) {
|
|
|
88
88
|
return (React.createElement(react_native_1.View, { ...props.attributes, dataSet: {
|
|
89
89
|
class: className(),
|
|
90
90
|
} },
|
|
91
|
-
React.createElement(
|
|
91
|
+
React.createElement(render_content_1.default, { apiKey: builderContext.apiKey, context: builderContext.context, customComponents: Object.values(builderContext.registeredComponents), data: {
|
|
92
92
|
...(_a = props.symbol) === null || _a === void 0 ? void 0 : _a.data,
|
|
93
93
|
...builderContext.state,
|
|
94
94
|
...(_d = (_c = (_b = props.symbol) === null || _b === void 0 ? void 0 : _b.content) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.state,
|
|
@@ -32,7 +32,7 @@ const device_sizes_js_1 = require("../../constants/device-sizes.js");
|
|
|
32
32
|
const target_js_1 = require("../../constants/target.js");
|
|
33
33
|
const get_processed_block_js_1 = require("../../functions/get-processed-block.js");
|
|
34
34
|
const css_js_1 = require("../../helpers/css.js");
|
|
35
|
-
const
|
|
35
|
+
const render_inlined_styles_1 = __importDefault(require("../render-inlined-styles"));
|
|
36
36
|
function BlockStyles(props) {
|
|
37
37
|
function useBlock() {
|
|
38
38
|
return (0, get_processed_block_js_1.getProcessedBlock)({
|
|
@@ -74,6 +74,6 @@ function BlockStyles(props) {
|
|
|
74
74
|
return [largeStylesClass, mediumStylesClass, smallStylesClass].join(" ");
|
|
75
75
|
}
|
|
76
76
|
return (React.createElement(React.Fragment, null, target_js_1.TARGET !== "reactNative" && css() ? (React.createElement(React.Fragment, null,
|
|
77
|
-
React.createElement(
|
|
77
|
+
React.createElement(render_inlined_styles_1.default, { styles: css() }))) : null));
|
|
78
78
|
}
|
|
79
79
|
exports.default = BlockStyles;
|
|
@@ -34,12 +34,12 @@ const get_block_component_options_js_1 = require("../../functions/get-block-comp
|
|
|
34
34
|
const get_block_properties_js_1 = require("../../functions/get-block-properties.js");
|
|
35
35
|
const get_block_tag_js_1 = require("../../functions/get-block-tag.js");
|
|
36
36
|
const get_processed_block_js_1 = require("../../functions/get-processed-block.js");
|
|
37
|
-
const
|
|
37
|
+
const block_styles_1 = __importDefault(require("./block-styles"));
|
|
38
38
|
const render_block_helpers_js_1 = require("./render-block.helpers.js");
|
|
39
|
-
const
|
|
39
|
+
const render_repeated_block_1 = __importDefault(require("./render-repeated-block"));
|
|
40
40
|
const target_js_1 = require("../../constants/target.js");
|
|
41
41
|
const extract_text_styles_js_1 = require("../../functions/extract-text-styles.js");
|
|
42
|
-
const
|
|
42
|
+
const render_component_1 = __importDefault(require("./render-component"));
|
|
43
43
|
const get_react_native_block_styles_js_1 = require("../../functions/get-react-native-block-styles.js");
|
|
44
44
|
function RenderBlock(props) {
|
|
45
45
|
var _a, _b;
|
|
@@ -144,11 +144,11 @@ function RenderBlock(props) {
|
|
|
144
144
|
return (React.createElement(React.Fragment, null, !(component === null || component === void 0 ? void 0 : component.noWrap) ? (React.createElement(React.Fragment, null,
|
|
145
145
|
(0, render_block_helpers_js_1.isEmptyHtmlElement)(tag()) ? (React.createElement(React.Fragment, null,
|
|
146
146
|
React.createElement(react_native_1.View, { ...attributes(), ...actions() }))) : null,
|
|
147
|
-
!(0, render_block_helpers_js_1.isEmptyHtmlElement)(tag()) && repeatItemData ? (React.createElement(React.Fragment, null, repeatItemData === null || repeatItemData === void 0 ? void 0 : repeatItemData.map((data, index) => (React.createElement(
|
|
147
|
+
!(0, render_block_helpers_js_1.isEmptyHtmlElement)(tag()) && repeatItemData ? (React.createElement(React.Fragment, null, repeatItemData === null || repeatItemData === void 0 ? void 0 : repeatItemData.map((data, index) => (React.createElement(render_repeated_block_1.default, { key: index, repeatContext: data.context, block: data.block }))))) : null,
|
|
148
148
|
!(0, render_block_helpers_js_1.isEmptyHtmlElement)(tag()) && !repeatItemData ? (React.createElement(React.Fragment, null,
|
|
149
149
|
React.createElement(react_native_1.View, { ...attributes(), ...actions() },
|
|
150
|
-
React.createElement(
|
|
150
|
+
React.createElement(render_component_1.default, { ...renderComponentProps() }), (_a = childrenWithoutParentComponent()) === null || _a === void 0 ? void 0 :
|
|
151
151
|
_a.map((child) => (React.createElement(RenderBlock, { key: "render-block-" + child.id, block: child, context: childrenContext() }))), (_b = childrenWithoutParentComponent()) === null || _b === void 0 ? void 0 :
|
|
152
|
-
_b.map((child) => (React.createElement(
|
|
152
|
+
_b.map((child) => (React.createElement(block_styles_1.default, { key: "block-style-" + child.id, block: child, context: childrenContext() })))))) : null)) : (React.createElement(render_component_1.default, { ...renderComponentProps() }))));
|
|
153
153
|
}
|
|
154
154
|
exports.default = RenderBlock;
|
|
@@ -29,8 +29,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
const React = __importStar(require("react"));
|
|
30
30
|
const react_native_1 = require("react-native");
|
|
31
31
|
const react_1 = require("react");
|
|
32
|
-
const
|
|
33
|
-
const
|
|
32
|
+
const block_styles_1 = __importDefault(require("./block-styles"));
|
|
33
|
+
const render_block_1 = __importDefault(require("./render-block"));
|
|
34
34
|
const builder_context_js_1 = __importDefault(require("../../context/builder.context.js"));
|
|
35
35
|
function RenderComponent(props) {
|
|
36
36
|
var _a, _b;
|
|
@@ -44,7 +44,7 @@ function RenderComponent(props) {
|
|
|
44
44
|
inheritedStyles: props.context.inheritedStyles,
|
|
45
45
|
} }, props.componentRef ? (React.createElement(React.Fragment, null,
|
|
46
46
|
React.createElement(ComponentRefRef, { ...props.componentOptions }, (_a = props.blockChildren) === null || _a === void 0 ? void 0 :
|
|
47
|
-
_a.map((child) => (React.createElement(
|
|
48
|
-
_b.map((child) => (React.createElement(
|
|
47
|
+
_a.map((child) => (React.createElement(render_block_1.default, { key: "render-block-" + child.id, block: child, context: props.context }))), (_b = props.blockChildren) === null || _b === void 0 ? void 0 :
|
|
48
|
+
_b.map((child) => (React.createElement(block_styles_1.default, { key: "block-style-" + child.id, block: child, context: props.context })))))) : null));
|
|
49
49
|
}
|
|
50
50
|
exports.default = RenderComponent;
|
|
@@ -30,7 +30,7 @@ const React = __importStar(require("react"));
|
|
|
30
30
|
const react_native_1 = require("react-native");
|
|
31
31
|
const react_1 = require("react");
|
|
32
32
|
const builder_context_js_1 = __importDefault(require("../../context/builder.context.js"));
|
|
33
|
-
const
|
|
33
|
+
const render_block_1 = __importDefault(require("./render-block"));
|
|
34
34
|
function RenderRepeatedBlock(props) {
|
|
35
35
|
return (React.createElement(builder_context_js_1.default.Provider, { value: {
|
|
36
36
|
content: props.repeatContext.content,
|
|
@@ -40,6 +40,6 @@ function RenderRepeatedBlock(props) {
|
|
|
40
40
|
registeredComponents: props.repeatContext.registeredComponents,
|
|
41
41
|
inheritedStyles: props.repeatContext.inheritedStyles,
|
|
42
42
|
} },
|
|
43
|
-
React.createElement(
|
|
43
|
+
React.createElement(render_block_1.default, { block: props.block, context: props.repeatContext })));
|
|
44
44
|
}
|
|
45
45
|
exports.default = RenderRepeatedBlock;
|
|
@@ -31,8 +31,8 @@ const react_native_1 = require("react-native");
|
|
|
31
31
|
const react_1 = require("react");
|
|
32
32
|
const builder_context_js_1 = __importDefault(require("../context/builder.context.js"));
|
|
33
33
|
const is_editing_js_1 = require("../functions/is-editing.js");
|
|
34
|
-
const
|
|
35
|
-
const
|
|
34
|
+
const block_styles_1 = __importDefault(require("./render-block/block-styles"));
|
|
35
|
+
const render_block_1 = __importDefault(require("./render-block/render-block"));
|
|
36
36
|
function RenderBlocks(props) {
|
|
37
37
|
var _a, _b;
|
|
38
38
|
function className() {
|
|
@@ -67,8 +67,8 @@ function RenderBlocks(props) {
|
|
|
67
67
|
return (React.createElement(react_native_1.View, { "builder-path": props.path, "builder-parent-id": props.parent, dataSet: {
|
|
68
68
|
class: className(),
|
|
69
69
|
}, style: styles.view1, onClick: (event) => onClick(), onMouseEnter: (event) => onMouseEnter() },
|
|
70
|
-
props.blocks ? (React.createElement(React.Fragment, null, (_a = props.blocks) === null || _a === void 0 ? void 0 : _a.map((block) => (React.createElement(
|
|
71
|
-
props.blocks ? (React.createElement(React.Fragment, null, (_b = props.blocks) === null || _b === void 0 ? void 0 : _b.map((block) => (React.createElement(
|
|
70
|
+
props.blocks ? (React.createElement(React.Fragment, null, (_a = props.blocks) === null || _a === void 0 ? void 0 : _a.map((block) => (React.createElement(render_block_1.default, { key: "render-block-" + block.id, block: block, context: builderContext }))))) : null,
|
|
71
|
+
props.blocks ? (React.createElement(React.Fragment, null, (_b = props.blocks) === null || _b === void 0 ? void 0 : _b.map((block) => (React.createElement(block_styles_1.default, { key: "block-style-" + block.id, block: block, context: builderContext }))))) : null));
|
|
72
72
|
}
|
|
73
73
|
exports.default = RenderBlocks;
|
|
74
74
|
const styles = react_native_1.StyleSheet.create({
|
|
@@ -28,7 +28,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
const React = __importStar(require("react"));
|
|
30
30
|
const react_native_1 = require("react-native");
|
|
31
|
-
const
|
|
31
|
+
const render_inlined_styles_1 = __importDefault(require("../../render-inlined-styles"));
|
|
32
32
|
function RenderContentStyles(props) {
|
|
33
33
|
function getCssFromFont(font) {
|
|
34
34
|
var _a, _b;
|
|
@@ -86,6 +86,6 @@ ${getFontCss({
|
|
|
86
86
|
customFonts: props.customFonts,
|
|
87
87
|
})}`;
|
|
88
88
|
}
|
|
89
|
-
return React.createElement(
|
|
89
|
+
return React.createElement(render_inlined_styles_1.default, { styles: injectedStyles() });
|
|
90
90
|
}
|
|
91
91
|
exports.default = RenderContentStyles;
|
|
@@ -4,5 +4,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
const
|
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return
|
|
7
|
+
const render_content_1 = __importDefault(require("./render-content"));
|
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return render_content_1.default; } });
|
|
@@ -39,8 +39,8 @@ const is_editing_js_1 = require("../../functions/is-editing.js");
|
|
|
39
39
|
const is_previewing_js_1 = require("../../functions/is-previewing.js");
|
|
40
40
|
const register_component_js_1 = require("../../functions/register-component.js");
|
|
41
41
|
const index_js_2 = require("../../functions/track/index.js");
|
|
42
|
-
const
|
|
43
|
-
const
|
|
42
|
+
const render_blocks_1 = __importDefault(require("../render-blocks"));
|
|
43
|
+
const render_styles_1 = __importDefault(require("./components/render-styles"));
|
|
44
44
|
const builder_context_js_1 = __importDefault(require("../../context/builder.context.js"));
|
|
45
45
|
const init_editing_js_1 = require("../../scripts/init-editing.js");
|
|
46
46
|
const nullable_js_1 = require("../../helpers/nullable.js");
|
|
@@ -319,7 +319,7 @@ function RenderContent(props) {
|
|
|
319
319
|
registeredComponents: allRegisteredComponents,
|
|
320
320
|
} }, useContent() ? (React.createElement(React.Fragment, null,
|
|
321
321
|
React.createElement(react_native_1.View, { ref: elementRef, onClick: (event) => onClick(event), "builder-content-id": (_e = useContent === null || useContent === void 0 ? void 0 : useContent()) === null || _e === void 0 ? void 0 : _e.id, "builder-model": props.model },
|
|
322
|
-
shouldRenderContentStyles() ? (React.createElement(
|
|
323
|
-
React.createElement(
|
|
322
|
+
shouldRenderContentStyles() ? (React.createElement(render_styles_1.default, { cssCode: (_g = (_f = useContent === null || useContent === void 0 ? void 0 : useContent()) === null || _f === void 0 ? void 0 : _f.data) === null || _g === void 0 ? void 0 : _g.cssCode, customFonts: (_j = (_h = useContent === null || useContent === void 0 ? void 0 : useContent()) === null || _h === void 0 ? void 0 : _h.data) === null || _j === void 0 ? void 0 : _j.customFonts })) : null,
|
|
323
|
+
React.createElement(render_blocks_1.default, { blocks: (_l = (_k = useContent === null || useContent === void 0 ? void 0 : useContent()) === null || _k === void 0 ? void 0 : _k.data) === null || _l === void 0 ? void 0 : _l.blocks, key: forceReRenderCount })))) : null));
|
|
324
324
|
}
|
|
325
325
|
exports.default = RenderContent;
|
|
@@ -35,8 +35,8 @@ function RenderInlinedStyles(props) {
|
|
|
35
35
|
// https://github.com/sveltejs/vite-plugin-svelte/issues/315#issuecomment-1109000027
|
|
36
36
|
return "sty" + "le";
|
|
37
37
|
}
|
|
38
|
-
return (React.createElement(React.Fragment, null, target_js_1.TARGET === "svelte" ? (React.createElement(React.Fragment, null,
|
|
39
|
-
React.createElement(react_native_1.View, { dangerouslySetInnerHTML: { __html:
|
|
38
|
+
return (React.createElement(React.Fragment, null, target_js_1.TARGET === "svelte" || target_js_1.TARGET === "qwik" ? (React.createElement(React.Fragment, null,
|
|
39
|
+
React.createElement(react_native_1.View, { dangerouslySetInnerHTML: { __html: props.styles } }))) : (React.createElement(react_native_1.View, null,
|
|
40
40
|
React.createElement(react_native_1.Text, null, props.styles)))));
|
|
41
41
|
}
|
|
42
42
|
exports.default = RenderInlinedStyles;
|
|
@@ -20,27 +20,27 @@ var __spreadValues = (a, b) => {
|
|
|
20
20
|
}
|
|
21
21
|
return a;
|
|
22
22
|
};
|
|
23
|
-
const
|
|
23
|
+
const button_1 = __importDefault(require("../blocks/button/button"));
|
|
24
24
|
const component_info_1 = require("../blocks/button/component-info");
|
|
25
|
-
const
|
|
25
|
+
const columns_1 = __importDefault(require("../blocks/columns/columns"));
|
|
26
26
|
const component_info_2 = require("../blocks/columns/component-info");
|
|
27
27
|
const component_info_3 = require("../blocks/fragment/component-info");
|
|
28
|
-
const
|
|
28
|
+
const fragment_1 = __importDefault(require("../blocks/fragment/fragment"));
|
|
29
29
|
const component_info_4 = require("../blocks/image/component-info");
|
|
30
|
-
const
|
|
30
|
+
const image_1 = __importDefault(require("../blocks/image/image"));
|
|
31
31
|
const component_info_5 = require("../blocks/section/component-info");
|
|
32
|
-
const
|
|
32
|
+
const section_1 = __importDefault(require("../blocks/section/section"));
|
|
33
33
|
const component_info_6 = require("../blocks/symbol/component-info");
|
|
34
|
-
const
|
|
34
|
+
const symbol_1 = __importDefault(require("../blocks/symbol/symbol"));
|
|
35
35
|
const component_info_7 = require("../blocks/text/component-info");
|
|
36
|
-
const
|
|
36
|
+
const text_1 = __importDefault(require("../blocks/text/text"));
|
|
37
37
|
const getDefaultRegisteredComponents = () => [
|
|
38
|
-
__spreadValues({ component:
|
|
39
|
-
__spreadValues({ component:
|
|
40
|
-
__spreadValues({ component:
|
|
41
|
-
__spreadValues({ component:
|
|
42
|
-
__spreadValues({ component:
|
|
43
|
-
__spreadValues({ component:
|
|
44
|
-
__spreadValues({ component:
|
|
38
|
+
__spreadValues({ component: columns_1.default }, component_info_2.componentInfo),
|
|
39
|
+
__spreadValues({ component: image_1.default }, component_info_4.componentInfo),
|
|
40
|
+
__spreadValues({ component: text_1.default }, component_info_7.componentInfo),
|
|
41
|
+
__spreadValues({ component: symbol_1.default }, component_info_6.componentInfo),
|
|
42
|
+
__spreadValues({ component: button_1.default }, component_info_1.componentInfo),
|
|
43
|
+
__spreadValues({ component: section_1.default }, component_info_5.componentInfo),
|
|
44
|
+
__spreadValues({ component: fragment_1.default }, component_info_3.componentInfo)
|
|
45
45
|
];
|
|
46
46
|
exports.getDefaultRegisteredComponents = getDefaultRegisteredComponents;
|
|
@@ -4,19 +4,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Text = exports.Symbol = exports.Section = exports.RenderContent = exports.Image = exports.Fragment = exports.Columns = exports.Button = void 0;
|
|
7
|
-
const
|
|
8
|
-
Object.defineProperty(exports, "Columns", { enumerable: true, get: function () { return
|
|
9
|
-
const
|
|
10
|
-
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return
|
|
11
|
-
const
|
|
12
|
-
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return
|
|
13
|
-
const
|
|
14
|
-
Object.defineProperty(exports, "Symbol", { enumerable: true, get: function () { return
|
|
15
|
-
const
|
|
16
|
-
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return
|
|
17
|
-
const
|
|
18
|
-
Object.defineProperty(exports, "Section", { enumerable: true, get: function () { return
|
|
19
|
-
const
|
|
20
|
-
Object.defineProperty(exports, "Fragment", { enumerable: true, get: function () { return
|
|
21
|
-
const
|
|
22
|
-
Object.defineProperty(exports, "RenderContent", { enumerable: true, get: function () { return
|
|
7
|
+
const columns_1 = __importDefault(require("../blocks/columns/columns"));
|
|
8
|
+
Object.defineProperty(exports, "Columns", { enumerable: true, get: function () { return columns_1.default; } });
|
|
9
|
+
const image_1 = __importDefault(require("../blocks/image/image"));
|
|
10
|
+
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return image_1.default; } });
|
|
11
|
+
const text_1 = __importDefault(require("../blocks/text/text"));
|
|
12
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return text_1.default; } });
|
|
13
|
+
const symbol_1 = __importDefault(require("../blocks/symbol/symbol"));
|
|
14
|
+
Object.defineProperty(exports, "Symbol", { enumerable: true, get: function () { return symbol_1.default; } });
|
|
15
|
+
const button_1 = __importDefault(require("../blocks/button/button"));
|
|
16
|
+
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return button_1.default; } });
|
|
17
|
+
const section_1 = __importDefault(require("../blocks/section/section"));
|
|
18
|
+
Object.defineProperty(exports, "Section", { enumerable: true, get: function () { return section_1.default; } });
|
|
19
|
+
const fragment_1 = __importDefault(require("../blocks/fragment/fragment"));
|
|
20
|
+
Object.defineProperty(exports, "Fragment", { enumerable: true, get: function () { return fragment_1.default; } });
|
|
21
|
+
const render_content_1 = __importDefault(require("../components/render-content/render-content"));
|
|
22
|
+
Object.defineProperty(exports, "RenderContent", { enumerable: true, get: function () { return render_content_1.default; } });
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { View, StyleSheet, Image, Text } from "react-native";
|
|
3
|
-
import RenderBlocks from "../../components/render-blocks
|
|
3
|
+
import RenderBlocks from "../../components/render-blocks";
|
|
4
4
|
import { getSizesForBreakpoints } from "../../constants/device-sizes";
|
|
5
|
-
import RenderInlinedStyles from "../../components/render-inlined-styles
|
|
5
|
+
import RenderInlinedStyles from "../../components/render-inlined-styles";
|
|
6
6
|
import { TARGET } from "../../constants/target.js";
|
|
7
7
|
import { convertStyleMapToCSS } from "../../helpers/css";
|
|
8
8
|
|
package/src/blocks/form/form.jsx
CHANGED
|
@@ -2,8 +2,8 @@ import BaseText from "../BaseText";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { View, StyleSheet, Image, Text } from "react-native";
|
|
4
4
|
import { useState, useContext, useRef } from "react";
|
|
5
|
-
import RenderBlock from "../../components/render-block/render-block
|
|
6
|
-
import BuilderBlocks from "../../components/render-blocks
|
|
5
|
+
import RenderBlock from "../../components/render-block/render-block";
|
|
6
|
+
import BuilderBlocks from "../../components/render-blocks";
|
|
7
7
|
import { isEditing } from "../../functions/is-editing.js";
|
|
8
8
|
|
|
9
9
|
export default function FormComponent(props) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { View, StyleSheet, Image, Text } from "react-native";
|
|
3
3
|
import { useState, useContext, useEffect } from "react";
|
|
4
|
-
import RenderContent from "../../components/render-content/render-content
|
|
4
|
+
import RenderContent from "../../components/render-content/render-content";
|
|
5
5
|
import BuilderContext from "../../context/builder.context.js";
|
|
6
6
|
import { getContent } from "../../functions/get-content/index.js";
|
|
7
7
|
import { TARGET } from "../../constants/target";
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
import { TARGET } from "../../constants/target.js";
|
|
8
8
|
import { getProcessedBlock } from "../../functions/get-processed-block.js";
|
|
9
9
|
import { createCssClass } from "../../helpers/css.js";
|
|
10
|
-
import RenderInlinedStyles from "../render-inlined-styles
|
|
10
|
+
import RenderInlinedStyles from "../render-inlined-styles";
|
|
11
11
|
|
|
12
12
|
export default function BlockStyles(props) {
|
|
13
13
|
function useBlock() {
|
|
@@ -6,16 +6,16 @@ import { getBlockComponentOptions } from "../../functions/get-block-component-op
|
|
|
6
6
|
import { getBlockProperties } from "../../functions/get-block-properties.js";
|
|
7
7
|
import { getBlockTag } from "../../functions/get-block-tag.js";
|
|
8
8
|
import { getProcessedBlock } from "../../functions/get-processed-block.js";
|
|
9
|
-
import BlockStyles from "./block-styles
|
|
9
|
+
import BlockStyles from "./block-styles";
|
|
10
10
|
import {
|
|
11
11
|
getComponent,
|
|
12
12
|
getRepeatItemData,
|
|
13
13
|
isEmptyHtmlElement,
|
|
14
14
|
} from "./render-block.helpers.js";
|
|
15
|
-
import RenderRepeatedBlock from "./render-repeated-block
|
|
15
|
+
import RenderRepeatedBlock from "./render-repeated-block";
|
|
16
16
|
import { TARGET } from "../../constants/target.js";
|
|
17
17
|
import { extractTextStyles } from "../../functions/extract-text-styles.js";
|
|
18
|
-
import RenderComponent from "./render-component
|
|
18
|
+
import RenderComponent from "./render-component";
|
|
19
19
|
import { getReactNativeBlockStyles } from "../../functions/get-react-native-block-styles.js";
|
|
20
20
|
|
|
21
21
|
export default function RenderBlock(props) {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { View, StyleSheet, Image, Text } from "react-native";
|
|
3
3
|
import { useContext } from "react";
|
|
4
|
-
import BlockStyles from "./block-styles
|
|
5
|
-
import RenderBlock from "./render-block
|
|
4
|
+
import BlockStyles from "./block-styles";
|
|
5
|
+
import RenderBlock from "./render-block";
|
|
6
6
|
import BuilderContext from "../../context/builder.context.js";
|
|
7
7
|
|
|
8
8
|
export default function RenderComponent(props) {
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
import { View, StyleSheet, Image, Text } from "react-native";
|
|
3
3
|
import { useContext } from "react";
|
|
4
4
|
import BuilderContext from "../../context/builder.context.js";
|
|
5
|
-
import RenderBlock from "./render-block
|
|
5
|
+
import RenderBlock from "./render-block";
|
|
6
6
|
|
|
7
7
|
export default function RenderRepeatedBlock(props) {
|
|
8
8
|
return (
|
|
@@ -3,8 +3,8 @@ import { View, StyleSheet, Image, Text } from "react-native";
|
|
|
3
3
|
import { useContext } from "react";
|
|
4
4
|
import BuilderContext from "../context/builder.context.js";
|
|
5
5
|
import { isEditing } from "../functions/is-editing.js";
|
|
6
|
-
import BlockStyles from "./render-block/block-styles
|
|
7
|
-
import RenderBlock from "./render-block/render-block
|
|
6
|
+
import BlockStyles from "./render-block/block-styles";
|
|
7
|
+
import RenderBlock from "./render-block/render-block";
|
|
8
8
|
|
|
9
9
|
export default function RenderBlocks(props) {
|
|
10
10
|
function className() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { View, StyleSheet, Image, Text } from "react-native";
|
|
3
|
-
import RenderInlinedStyles from "../../render-inlined-styles
|
|
3
|
+
import RenderInlinedStyles from "../../render-inlined-styles";
|
|
4
4
|
|
|
5
5
|
export default function RenderContentStyles(props) {
|
|
6
6
|
function getCssFromFont(font) {
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
createRegisterComponentMessage,
|
|
15
15
|
} from "../../functions/register-component.js";
|
|
16
16
|
import { _track } from "../../functions/track/index.js";
|
|
17
|
-
import RenderBlocks from "../render-blocks
|
|
18
|
-
import RenderContentStyles from "./components/render-styles
|
|
17
|
+
import RenderBlocks from "../render-blocks";
|
|
18
|
+
import RenderContentStyles from "./components/render-styles";
|
|
19
19
|
import builderContext from "../../context/builder.context.js";
|
|
20
20
|
import {
|
|
21
21
|
registerInsertMenu,
|
|
@@ -15,9 +15,9 @@ export default function RenderInlinedStyles(props) {
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<>
|
|
18
|
-
{TARGET === "svelte" ? (
|
|
18
|
+
{TARGET === "svelte" || TARGET === "qwik" ? (
|
|
19
19
|
<>
|
|
20
|
-
<View dangerouslySetInnerHTML={{ __html:
|
|
20
|
+
<View dangerouslySetInnerHTML={{ __html: props.styles }} />
|
|
21
21
|
</>
|
|
22
22
|
) : (
|
|
23
23
|
<View>
|
|
@@ -14,20 +14,20 @@ var __spreadValues = (a, b) => {
|
|
|
14
14
|
}
|
|
15
15
|
return a;
|
|
16
16
|
};
|
|
17
|
-
import { default as Button } from "../blocks/button/button
|
|
17
|
+
import { default as Button } from "../blocks/button/button";
|
|
18
18
|
import { componentInfo as buttonComponentInfo } from "../blocks/button/component-info";
|
|
19
|
-
import { default as Columns } from "../blocks/columns/columns
|
|
19
|
+
import { default as Columns } from "../blocks/columns/columns";
|
|
20
20
|
import { componentInfo as columnsComponentInfo } from "../blocks/columns/component-info";
|
|
21
21
|
import { componentInfo as fragmentComponentInfo } from "../blocks/fragment/component-info";
|
|
22
|
-
import { default as Fragment } from "../blocks/fragment/fragment
|
|
22
|
+
import { default as Fragment } from "../blocks/fragment/fragment";
|
|
23
23
|
import { componentInfo as imageComponentInfo } from "../blocks/image/component-info";
|
|
24
|
-
import { default as Image } from "../blocks/image/image
|
|
24
|
+
import { default as Image } from "../blocks/image/image";
|
|
25
25
|
import { componentInfo as sectionComponentInfo } from "../blocks/section/component-info";
|
|
26
|
-
import { default as Section } from "../blocks/section/section
|
|
26
|
+
import { default as Section } from "../blocks/section/section";
|
|
27
27
|
import { componentInfo as symbolComponentInfo } from "../blocks/symbol/component-info";
|
|
28
|
-
import { default as Symbol } from "../blocks/symbol/symbol
|
|
28
|
+
import { default as Symbol } from "../blocks/symbol/symbol";
|
|
29
29
|
import { componentInfo as textComponentInfo } from "../blocks/text/component-info";
|
|
30
|
-
import { default as Text } from "../blocks/text/text
|
|
30
|
+
import { default as Text } from "../blocks/text/text";
|
|
31
31
|
const getDefaultRegisteredComponents = () => [
|
|
32
32
|
__spreadValues({ component: Columns }, columnsComponentInfo),
|
|
33
33
|
__spreadValues({ component: Image }, imageComponentInfo),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { default as default2 } from "../blocks/columns/columns
|
|
2
|
-
import { default as default3 } from "../blocks/image/image
|
|
3
|
-
import { default as default4 } from "../blocks/text/text
|
|
4
|
-
import { default as default5 } from "../blocks/symbol/symbol
|
|
5
|
-
import { default as default6 } from "../blocks/button/button
|
|
6
|
-
import { default as default7 } from "../blocks/section/section
|
|
7
|
-
import { default as default8 } from "../blocks/fragment/fragment
|
|
8
|
-
import { default as default9 } from "../components/render-content/render-content
|
|
1
|
+
import { default as default2 } from "../blocks/columns/columns";
|
|
2
|
+
import { default as default3 } from "../blocks/image/image";
|
|
3
|
+
import { default as default4 } from "../blocks/text/text";
|
|
4
|
+
import { default as default5 } from "../blocks/symbol/symbol";
|
|
5
|
+
import { default as default6 } from "../blocks/button/button";
|
|
6
|
+
import { default as default7 } from "../blocks/section/section";
|
|
7
|
+
import { default as default8 } from "../blocks/fragment/fragment";
|
|
8
|
+
import { default as default9 } from "../components/render-content/render-content";
|
|
9
9
|
export {
|
|
10
10
|
default6 as Button,
|
|
11
11
|
default2 as Columns,
|