@builder.io/react 1.1.52 → 1.1.53-1
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/README.md +131 -53
- package/dist/builder-react-lite.cjs.js +12 -12
- package/dist/builder-react-lite.cjs.js.map +1 -1
- package/dist/builder-react-lite.esm.js +12 -12
- package/dist/builder-react-lite.esm.js.map +1 -1
- package/dist/builder-react.browser.js +13 -13
- package/dist/builder-react.browser.js.map +1 -1
- package/dist/builder-react.cjs.js +12 -12
- package/dist/builder-react.cjs.js.map +1 -1
- package/dist/builder-react.es5.js +12 -12
- package/dist/builder-react.es5.js.map +1 -1
- package/dist/builder-react.unpkg.js +13 -13
- package/dist/builder-react.unpkg.js.map +1 -1
- package/dist/lib/package.json +11 -14
- package/dist/lib/rollup.config.js +13 -13
- package/dist/lib/rollup.config.js.map +1 -1
- package/dist/lib/src/blocks/Button.js +5 -2
- package/dist/lib/src/blocks/Button.js.map +1 -1
- package/dist/lib/src/blocks/Columns.js +16 -13
- package/dist/lib/src/blocks/Columns.js.map +1 -1
- package/dist/lib/src/blocks/CustomCode.js +11 -7
- package/dist/lib/src/blocks/CustomCode.js.map +1 -1
- package/dist/lib/src/blocks/Embed.js +7 -4
- package/dist/lib/src/blocks/Embed.js.map +1 -1
- package/dist/lib/src/blocks/Fragment.js +5 -2
- package/dist/lib/src/blocks/Fragment.js.map +1 -1
- package/dist/lib/src/blocks/Image.js +37 -24
- package/dist/lib/src/blocks/Image.js.map +1 -1
- package/dist/lib/src/blocks/Mutation.js +3 -2
- package/dist/lib/src/blocks/Mutation.js.map +1 -1
- package/dist/lib/src/blocks/Router.js +16 -11
- package/dist/lib/src/blocks/Router.js.map +1 -1
- package/dist/lib/src/blocks/Section.js +9 -6
- package/dist/lib/src/blocks/Section.js.map +1 -1
- package/dist/lib/src/blocks/Slot.js +4 -3
- package/dist/lib/src/blocks/Slot.js.map +1 -1
- package/dist/lib/src/blocks/StateProvider.js +5 -2
- package/dist/lib/src/blocks/StateProvider.js.map +1 -1
- package/dist/lib/src/blocks/Symbol.js +13 -10
- package/dist/lib/src/blocks/Symbol.js.map +1 -1
- package/dist/lib/src/blocks/Text.js +9 -6
- package/dist/lib/src/blocks/Text.js.map +1 -1
- package/dist/lib/src/blocks/Video.js +12 -9
- package/dist/lib/src/blocks/Video.js.map +1 -1
- package/dist/lib/src/blocks/forms/Button.js +9 -2
- package/dist/lib/src/blocks/forms/Button.js.map +1 -1
- package/dist/lib/src/blocks/forms/Form.js +20 -13
- package/dist/lib/src/blocks/forms/Form.js.map +1 -1
- package/dist/lib/src/blocks/forms/Input.js +5 -2
- package/dist/lib/src/blocks/forms/Input.js.map +1 -1
- package/dist/lib/src/blocks/forms/Label.js +10 -2
- package/dist/lib/src/blocks/forms/Label.js.map +1 -1
- package/dist/lib/src/blocks/forms/Select.js +5 -2
- package/dist/lib/src/blocks/forms/Select.js.map +1 -1
- package/dist/lib/src/blocks/forms/TextArea.js +5 -2
- package/dist/lib/src/blocks/forms/TextArea.js.map +1 -1
- package/dist/lib/src/blocks/raw/Img.js +5 -2
- package/dist/lib/src/blocks/raw/Img.js.map +1 -1
- package/dist/lib/src/blocks/raw/RawText.js +21 -3
- package/dist/lib/src/blocks/raw/RawText.js.map +1 -1
- package/dist/lib/src/builder-react-lite.js +13 -12
- package/dist/lib/src/builder-react-lite.js.map +1 -1
- package/dist/lib/src/builder-react.js +56 -44
- package/dist/lib/src/builder-react.js.map +1 -1
- package/dist/lib/src/components/Link.js +3 -1
- package/dist/lib/src/components/Link.js.map +1 -1
- package/dist/lib/src/components/builder-block.component.js +37 -34
- package/dist/lib/src/components/builder-block.component.js.map +1 -1
- package/dist/lib/src/components/builder-blocks.component.js +12 -9
- package/dist/lib/src/components/builder-blocks.component.js.map +1 -1
- package/dist/lib/src/components/builder-component.component.js +47 -41
- package/dist/lib/src/components/builder-component.component.js.map +1 -1
- package/dist/lib/src/components/builder-content.component.js +16 -12
- package/dist/lib/src/components/builder-content.component.js.map +1 -1
- package/dist/lib/src/components/insert-spacer.component.js +11 -4
- package/dist/lib/src/components/insert-spacer.component.js.map +1 -1
- package/dist/lib/src/components/no-wrap.js +3 -1
- package/dist/lib/src/components/no-wrap.js.map +1 -1
- package/dist/lib/src/components/variants-provider.component.js +33 -13
- package/dist/lib/src/components/variants-provider.component.js.map +1 -1
- package/dist/lib/src/constants/device-sizes.constant.js +1 -0
- package/dist/lib/src/constants/device-sizes.constant.js.map +1 -1
- package/dist/lib/src/decorators/builder-block.decorator.js +1 -0
- package/dist/lib/src/decorators/builder-block.decorator.js.map +1 -1
- package/dist/lib/src/functions/apply-patch-with-mutation.js +12 -8
- package/dist/lib/src/functions/apply-patch-with-mutation.js.map +1 -1
- package/dist/lib/src/functions/block-to-html-string.js +10 -7
- package/dist/lib/src/functions/block-to-html-string.js.map +1 -1
- package/dist/lib/src/functions/debonce-next-tick.js +1 -0
- package/dist/lib/src/functions/debonce-next-tick.js.map +1 -1
- package/dist/lib/src/functions/get.js +3 -1
- package/dist/lib/src/functions/get.js.map +1 -1
- package/dist/lib/src/functions/no-wrap.js +3 -1
- package/dist/lib/src/functions/no-wrap.js.map +1 -1
- package/dist/lib/src/functions/safe-dynamic-require.js +1 -0
- package/dist/lib/src/functions/safe-dynamic-require.js.map +1 -1
- package/dist/lib/src/functions/set.js +3 -1
- package/dist/lib/src/functions/set.js.map +1 -1
- package/dist/lib/src/functions/string-to-function.js +6 -4
- package/dist/lib/src/functions/string-to-function.js.map +1 -1
- package/dist/lib/src/functions/throttle.js +1 -0
- package/dist/lib/src/functions/throttle.js.map +1 -1
- package/dist/lib/src/functions/update-metadata.js +1 -0
- package/dist/lib/src/functions/update-metadata.js.map +1 -1
- package/dist/lib/src/functions/with-builder.js +2 -1
- package/dist/lib/src/functions/with-builder.js.map +1 -1
- package/dist/lib/src/functions/with-children.js +3 -1
- package/dist/lib/src/functions/with-children.js.map +1 -1
- package/dist/lib/src/scripts/init-editing.js.map +1 -1
- package/dist/lib/src/store/builder-async-requests.js +5 -2
- package/dist/lib/src/store/builder-async-requests.js.map +1 -1
- package/dist/lib/src/store/builder-meta.js +1 -0
- package/dist/lib/src/store/builder-meta.js.map +1 -1
- package/dist/lib/src/store/builder-store.js +1 -0
- package/dist/lib/src/store/builder-store.js.map +1 -1
- package/dist/lib/test/basic.test.js +47 -31
- package/dist/lib/test/basic.test.js.map +1 -1
- package/dist/lib/test/functions/render-block.js +6 -3
- package/dist/lib/test/functions/render-block.js.map +1 -1
- package/dist/lib/test/image.test.js +20 -4
- package/dist/lib/test/image.test.js.map +1 -1
- package/dist/types/src/components/builder-block.component.d.ts +1 -1
- package/dist/types/src/components/builder-component.component.d.ts +16 -2
- package/dist/types/src/components/builder-content.component.d.ts +3 -1
- package/dist/types/src/components/no-wrap.d.ts +2 -1
- package/dist/types/src/functions/apply-patch-with-mutation.d.ts +1 -1
- package/lite.js +1 -1
- package/package.json +11 -14
- package/src/blocks/Router.tsx +1 -1
- package/src/components/builder-component.component.tsx +17 -3
- package/src/functions/string-to-function.ts +2 -2
- package/typedoc.js +8 -0
|
@@ -127,6 +127,7 @@ export interface BuilderComponentProps {
|
|
|
127
127
|
/**
|
|
128
128
|
* @package
|
|
129
129
|
* @deprecated use {@link model} instead.
|
|
130
|
+
* @hidden
|
|
130
131
|
*/
|
|
131
132
|
modelName?: string;
|
|
132
133
|
/**
|
|
@@ -136,6 +137,7 @@ export interface BuilderComponentProps {
|
|
|
136
137
|
/**
|
|
137
138
|
* @package
|
|
138
139
|
* @deprecated use {@link model} instead.
|
|
140
|
+
* @hidden
|
|
139
141
|
*/
|
|
140
142
|
name?: string;
|
|
141
143
|
/**
|
|
@@ -174,6 +176,7 @@ export interface BuilderComponentProps {
|
|
|
174
176
|
apiKey?: string;
|
|
175
177
|
/**
|
|
176
178
|
* @private
|
|
179
|
+
* @hidden
|
|
177
180
|
*/
|
|
178
181
|
codegen?: boolean;
|
|
179
182
|
options?: GetContentOptions;
|
|
@@ -209,6 +212,7 @@ export interface BuilderComponentProps {
|
|
|
209
212
|
content?: Content;
|
|
210
213
|
/**
|
|
211
214
|
* @package
|
|
215
|
+
* @hidden
|
|
212
216
|
*
|
|
213
217
|
* Location object that provides the current url, path, etc; for server side
|
|
214
218
|
* rendering.
|
|
@@ -222,10 +226,12 @@ export interface BuilderComponentProps {
|
|
|
222
226
|
/**
|
|
223
227
|
* @package
|
|
224
228
|
* @deprecated
|
|
229
|
+
* @hidden
|
|
225
230
|
*/
|
|
226
231
|
noAsync?: boolean;
|
|
227
232
|
/**
|
|
228
233
|
* @package
|
|
234
|
+
* @hidden
|
|
229
235
|
*
|
|
230
236
|
* Flag to render email content (small differences in our render logic for
|
|
231
237
|
* email support).
|
|
@@ -233,6 +239,7 @@ export interface BuilderComponentProps {
|
|
|
233
239
|
emailMode?: boolean;
|
|
234
240
|
/**
|
|
235
241
|
* @package
|
|
242
|
+
* @hidden
|
|
236
243
|
*
|
|
237
244
|
* Flag to render amp content (small differences in our render logic for amp
|
|
238
245
|
* support)
|
|
@@ -240,6 +247,7 @@ export interface BuilderComponentProps {
|
|
|
240
247
|
ampMode?: boolean;
|
|
241
248
|
/**
|
|
242
249
|
* @package
|
|
250
|
+
* @hidden
|
|
243
251
|
*
|
|
244
252
|
* Render content in-line only (can't passed from the content prop) don't
|
|
245
253
|
* fetch content from our API.
|
|
@@ -248,21 +256,25 @@ export interface BuilderComponentProps {
|
|
|
248
256
|
/**
|
|
249
257
|
* @package
|
|
250
258
|
* @deprecated
|
|
259
|
+
* @hidden
|
|
251
260
|
*/
|
|
252
261
|
builderBlock?: BuilderElement;
|
|
253
262
|
/**
|
|
254
263
|
* @package
|
|
255
264
|
* @deprecated
|
|
265
|
+
* @hidden
|
|
256
266
|
*/
|
|
257
267
|
dataOnly?: boolean;
|
|
258
268
|
/**
|
|
259
269
|
* @package
|
|
260
270
|
* @deprecated
|
|
271
|
+
* @hidden
|
|
261
272
|
*/
|
|
262
273
|
hydrate?: boolean;
|
|
263
274
|
/**
|
|
264
275
|
* @package
|
|
265
276
|
* @deprecated use {@link Builder.isStatic} instead
|
|
277
|
+
* @hidden
|
|
266
278
|
*/
|
|
267
279
|
isStatic?: boolean;
|
|
268
280
|
/**
|
|
@@ -273,9 +285,11 @@ export interface BuilderComponentProps {
|
|
|
273
285
|
context?: any;
|
|
274
286
|
/**
|
|
275
287
|
* @deprecated
|
|
288
|
+
* @hidden
|
|
276
289
|
*/
|
|
277
290
|
url?: string;
|
|
278
291
|
/**
|
|
292
|
+
* @hidden
|
|
279
293
|
* Set to true if this is not the root content component, for instance for symbols
|
|
280
294
|
*/
|
|
281
295
|
isChild?: boolean;
|
|
@@ -355,7 +369,7 @@ const tryEval = (str?: string, data: any = {}, errors?: Error[]): any => {
|
|
|
355
369
|
}).run(value.replace(/(^|;)return /, '$1'));
|
|
356
370
|
// tslint:enable:comment-format
|
|
357
371
|
}
|
|
358
|
-
} catch (error) {
|
|
372
|
+
} catch (error: any) {
|
|
359
373
|
if (errors) {
|
|
360
374
|
errors.push(error);
|
|
361
375
|
}
|
|
@@ -1213,7 +1227,7 @@ export class BuilderComponent extends React.Component<
|
|
|
1213
1227
|
try {
|
|
1214
1228
|
const result = await fetch(url);
|
|
1215
1229
|
json = await result.json();
|
|
1216
|
-
} catch (err) {
|
|
1230
|
+
} catch (err: any) {
|
|
1217
1231
|
if (this._errors) {
|
|
1218
1232
|
this._errors.push(err);
|
|
1219
1233
|
}
|
|
@@ -1403,7 +1417,7 @@ export class BuilderComponent extends React.Component<
|
|
|
1403
1417
|
|
|
1404
1418
|
// TODO: allow exports = { } syntax?
|
|
1405
1419
|
// TODO: do something with reuslt like view - methods, computed, actions, properties, template, etc etc
|
|
1406
|
-
} catch (error) {
|
|
1420
|
+
} catch (error: any) {
|
|
1407
1421
|
if (Builder.isBrowser) {
|
|
1408
1422
|
console.warn(
|
|
1409
1423
|
'Builder custom code error:',
|
|
@@ -89,7 +89,7 @@ export function stringToFunction(
|
|
|
89
89
|
`
|
|
90
90
|
);
|
|
91
91
|
}
|
|
92
|
-
} catch (error) {
|
|
92
|
+
} catch (error: any) {
|
|
93
93
|
if (errors) {
|
|
94
94
|
errors.push(error);
|
|
95
95
|
}
|
|
@@ -131,7 +131,7 @@ export function stringToFunction(
|
|
|
131
131
|
}).run(str.replace(/(^|;)return /, '$1'));
|
|
132
132
|
// tslint:enable:comment-format
|
|
133
133
|
}
|
|
134
|
-
} catch (error) {
|
|
134
|
+
} catch (error: any) {
|
|
135
135
|
if (Builder.isBrowser) {
|
|
136
136
|
console.warn(
|
|
137
137
|
'Builder custom code error:',
|