@builder.io/react 8.0.6-0 → 8.0.6-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.
Files changed (226) hide show
  1. package/package.json +1 -1
  2. package/src/components/builder-block.component.tsx +1 -0
  3. package/src/constants/device-sizes.constant.ts +22 -15
  4. package/dist/builder-react-lite.cjs.js +0 -2
  5. package/dist/builder-react-lite.cjs.js.map +0 -1
  6. package/dist/builder-react-lite.esm.js +0 -2
  7. package/dist/builder-react-lite.esm.js.map +0 -1
  8. package/dist/builder-react.browser.js +0 -11
  9. package/dist/builder-react.browser.js.map +0 -1
  10. package/dist/builder-react.cjs.js +0 -2
  11. package/dist/builder-react.cjs.js.map +0 -1
  12. package/dist/builder-react.es5.js +0 -2
  13. package/dist/builder-react.es5.js.map +0 -1
  14. package/dist/builder-react.unpkg.js +0 -11
  15. package/dist/builder-react.unpkg.js.map +0 -1
  16. package/dist/lib/lib/on-change.js +0 -228
  17. package/dist/lib/lib/on-change.js.map +0 -1
  18. package/dist/lib/package.json +0 -109
  19. package/dist/lib/rollup.config.js +0 -131
  20. package/dist/lib/rollup.config.js.map +0 -1
  21. package/dist/lib/src/blocks/Button.js +0 -86
  22. package/dist/lib/src/blocks/Button.js.map +0 -1
  23. package/dist/lib/src/blocks/Columns.js +0 -243
  24. package/dist/lib/src/blocks/Columns.js.map +0 -1
  25. package/dist/lib/src/blocks/CustomCode.js +0 -227
  26. package/dist/lib/src/blocks/CustomCode.js.map +0 -1
  27. package/dist/lib/src/blocks/Embed.js +0 -114
  28. package/dist/lib/src/blocks/Embed.js.map +0 -1
  29. package/dist/lib/src/blocks/Fragment.js +0 -45
  30. package/dist/lib/src/blocks/Fragment.js.map +0 -1
  31. package/dist/lib/src/blocks/Image.js +0 -532
  32. package/dist/lib/src/blocks/Image.js.map +0 -1
  33. package/dist/lib/src/blocks/Mutation.js +0 -93
  34. package/dist/lib/src/blocks/Mutation.js.map +0 -1
  35. package/dist/lib/src/blocks/PersonalizationContainer.js +0 -174
  36. package/dist/lib/src/blocks/PersonalizationContainer.js.map +0 -1
  37. package/dist/lib/src/blocks/Router.js +0 -354
  38. package/dist/lib/src/blocks/Router.js.map +0 -1
  39. package/dist/lib/src/blocks/Section.js +0 -150
  40. package/dist/lib/src/blocks/Section.js.map +0 -1
  41. package/dist/lib/src/blocks/Slot.js +0 -41
  42. package/dist/lib/src/blocks/Slot.js.map +0 -1
  43. package/dist/lib/src/blocks/StateProvider.js +0 -61
  44. package/dist/lib/src/blocks/StateProvider.js.map +0 -1
  45. package/dist/lib/src/blocks/Symbol.js +0 -192
  46. package/dist/lib/src/blocks/Symbol.js.map +0 -1
  47. package/dist/lib/src/blocks/Text.js +0 -132
  48. package/dist/lib/src/blocks/Text.js.map +0 -1
  49. package/dist/lib/src/blocks/Video.js +0 -261
  50. package/dist/lib/src/blocks/Video.js.map +0 -1
  51. package/dist/lib/src/blocks/forms/Button.js +0 -74
  52. package/dist/lib/src/blocks/forms/Button.js.map +0 -1
  53. package/dist/lib/src/blocks/forms/Form.js +0 -590
  54. package/dist/lib/src/blocks/forms/Form.js.map +0 -1
  55. package/dist/lib/src/blocks/forms/Input.js +0 -133
  56. package/dist/lib/src/blocks/forms/Input.js.map +0 -1
  57. package/dist/lib/src/blocks/forms/Label.js +0 -81
  58. package/dist/lib/src/blocks/forms/Label.js.map +0 -1
  59. package/dist/lib/src/blocks/forms/Select.js +0 -104
  60. package/dist/lib/src/blocks/forms/Select.js.map +0 -1
  61. package/dist/lib/src/blocks/forms/TextArea.js +0 -89
  62. package/dist/lib/src/blocks/forms/TextArea.js.map +0 -1
  63. package/dist/lib/src/blocks/raw/Img.js +0 -66
  64. package/dist/lib/src/blocks/raw/Img.js.map +0 -1
  65. package/dist/lib/src/blocks/raw/RawText.js +0 -47
  66. package/dist/lib/src/blocks/raw/RawText.js.map +0 -1
  67. package/dist/lib/src/builder-react-lite.js +0 -31
  68. package/dist/lib/src/builder-react-lite.js.map +0 -1
  69. package/dist/lib/src/builder-react.js +0 -106
  70. package/dist/lib/src/builder-react.js.map +0 -1
  71. package/dist/lib/src/components/Link.js +0 -35
  72. package/dist/lib/src/components/Link.js.map +0 -1
  73. package/dist/lib/src/components/builder-block.component.js +0 -555
  74. package/dist/lib/src/components/builder-block.component.js.map +0 -1
  75. package/dist/lib/src/components/builder-blocks.component.js +0 -167
  76. package/dist/lib/src/components/builder-blocks.component.js.map +0 -1
  77. package/dist/lib/src/components/builder-component.component.js +0 -1126
  78. package/dist/lib/src/components/builder-component.component.js.map +0 -1
  79. package/dist/lib/src/components/builder-content.component.js +0 -321
  80. package/dist/lib/src/components/builder-content.component.js.map +0 -1
  81. package/dist/lib/src/components/insert-spacer.component.js +0 -106
  82. package/dist/lib/src/components/insert-spacer.component.js.map +0 -1
  83. package/dist/lib/src/components/no-wrap.js +0 -7
  84. package/dist/lib/src/components/no-wrap.js.map +0 -1
  85. package/dist/lib/src/components/variants-provider.component.js +0 -108
  86. package/dist/lib/src/components/variants-provider.component.js.map +0 -1
  87. package/dist/lib/src/constants/device-sizes.constant.js +0 -86
  88. package/dist/lib/src/constants/device-sizes.constant.js.map +0 -1
  89. package/dist/lib/src/constants/file-types.constant.js +0 -72
  90. package/dist/lib/src/constants/file-types.constant.js.map +0 -1
  91. package/dist/lib/src/decorators/builder-block.decorator.js +0 -10
  92. package/dist/lib/src/decorators/builder-block.decorator.js.map +0 -1
  93. package/dist/lib/src/functions/apply-patch-with-mutation.js +0 -80
  94. package/dist/lib/src/functions/apply-patch-with-mutation.js.map +0 -1
  95. package/dist/lib/src/functions/apply-patch-with-mutation.test.js +0 -54
  96. package/dist/lib/src/functions/apply-patch-with-mutation.test.js.map +0 -1
  97. package/dist/lib/src/functions/block-to-html-string.js +0 -21
  98. package/dist/lib/src/functions/block-to-html-string.js.map +0 -1
  99. package/dist/lib/src/functions/debonce-next-tick.js +0 -43
  100. package/dist/lib/src/functions/debonce-next-tick.js.map +0 -1
  101. package/dist/lib/src/functions/extract-localized-values.js +0 -35
  102. package/dist/lib/src/functions/extract-localized-values.js.map +0 -1
  103. package/dist/lib/src/functions/filter-with-custom-targeting.js +0 -88
  104. package/dist/lib/src/functions/filter-with-custom-targeting.js.map +0 -1
  105. package/dist/lib/src/functions/get-builder-pixel.js +0 -27
  106. package/dist/lib/src/functions/get-builder-pixel.js.map +0 -1
  107. package/dist/lib/src/functions/get.js +0 -12
  108. package/dist/lib/src/functions/get.js.map +0 -1
  109. package/dist/lib/src/functions/is-debug.js +0 -8
  110. package/dist/lib/src/functions/is-debug.js.map +0 -1
  111. package/dist/lib/src/functions/no-wrap.js +0 -60
  112. package/dist/lib/src/functions/no-wrap.js.map +0 -1
  113. package/dist/lib/src/functions/safe-dynamic-require.js +0 -51
  114. package/dist/lib/src/functions/safe-dynamic-require.js.map +0 -1
  115. package/dist/lib/src/functions/set.js +0 -21
  116. package/dist/lib/src/functions/set.js.map +0 -1
  117. package/dist/lib/src/functions/should-force-browser-runtime-in-node.js +0 -22
  118. package/dist/lib/src/functions/should-force-browser-runtime-in-node.js.map +0 -1
  119. package/dist/lib/src/functions/string-to-function.js +0 -166
  120. package/dist/lib/src/functions/string-to-function.js.map +0 -1
  121. package/dist/lib/src/functions/throttle.js +0 -42
  122. package/dist/lib/src/functions/throttle.js.map +0 -1
  123. package/dist/lib/src/functions/traverse.js +0 -72
  124. package/dist/lib/src/functions/traverse.js.map +0 -1
  125. package/dist/lib/src/functions/try-eval.js +0 -75
  126. package/dist/lib/src/functions/try-eval.js.map +0 -1
  127. package/dist/lib/src/functions/update-metadata.js +0 -42
  128. package/dist/lib/src/functions/update-metadata.js.map +0 -1
  129. package/dist/lib/src/functions/utils.js +0 -20
  130. package/dist/lib/src/functions/utils.js.map +0 -1
  131. package/dist/lib/src/functions/with-builder.js +0 -10
  132. package/dist/lib/src/functions/with-builder.js.map +0 -1
  133. package/dist/lib/src/functions/with-children.js +0 -77
  134. package/dist/lib/src/functions/with-children.js.map +0 -1
  135. package/dist/lib/src/hooks/useIsPreviewing.js +0 -16
  136. package/dist/lib/src/hooks/useIsPreviewing.js.map +0 -1
  137. package/dist/lib/src/scripts/init-editing.js +0 -18
  138. package/dist/lib/src/scripts/init-editing.js.map +0 -1
  139. package/dist/lib/src/sdk-version.js +0 -5
  140. package/dist/lib/src/sdk-version.js.map +0 -1
  141. package/dist/lib/src/store/builder-async-requests.js +0 -19
  142. package/dist/lib/src/store/builder-async-requests.js.map +0 -1
  143. package/dist/lib/src/store/builder-meta.js +0 -13
  144. package/dist/lib/src/store/builder-meta.js.map +0 -1
  145. package/dist/lib/src/store/builder-store.js +0 -15
  146. package/dist/lib/src/store/builder-store.js.map +0 -1
  147. package/dist/lib/src/to-error.js +0 -22
  148. package/dist/lib/src/to-error.js.map +0 -1
  149. package/dist/lib/test/basic.test.js +0 -212
  150. package/dist/lib/test/basic.test.js.map +0 -1
  151. package/dist/lib/test/functions/render-block.js +0 -24
  152. package/dist/lib/test/functions/render-block.js.map +0 -1
  153. package/dist/lib/test/image.test.js +0 -107
  154. package/dist/lib/test/image.test.js.map +0 -1
  155. package/dist/lib/test/setupTests.js +0 -8
  156. package/dist/lib/test/setupTests.js.map +0 -1
  157. package/dist/types/lib/on-change.d.ts +0 -8
  158. package/dist/types/rollup.config.d.ts +0 -44
  159. package/dist/types/src/blocks/Button.d.ts +0 -7
  160. package/dist/types/src/blocks/Columns.d.ts +0 -1
  161. package/dist/types/src/blocks/CustomCode.d.ts +0 -1
  162. package/dist/types/src/blocks/Embed.d.ts +0 -1
  163. package/dist/types/src/blocks/Fragment.d.ts +0 -5
  164. package/dist/types/src/blocks/Image.d.ts +0 -6
  165. package/dist/types/src/blocks/Mutation.d.ts +0 -8
  166. package/dist/types/src/blocks/PersonalizationContainer.d.ts +0 -19
  167. package/dist/types/src/blocks/Router.d.ts +0 -32
  168. package/dist/types/src/blocks/Section.d.ts +0 -1
  169. package/dist/types/src/blocks/Slot.d.ts +0 -5
  170. package/dist/types/src/blocks/StateProvider.d.ts +0 -1
  171. package/dist/types/src/blocks/Symbol.d.ts +0 -19
  172. package/dist/types/src/blocks/Text.d.ts +0 -6
  173. package/dist/types/src/blocks/Video.d.ts +0 -1
  174. package/dist/types/src/blocks/forms/Button.d.ts +0 -5
  175. package/dist/types/src/blocks/forms/Form.d.ts +0 -24
  176. package/dist/types/src/blocks/forms/Input.d.ts +0 -10
  177. package/dist/types/src/blocks/forms/Label.d.ts +0 -8
  178. package/dist/types/src/blocks/forms/Select.d.ts +0 -12
  179. package/dist/types/src/blocks/forms/TextArea.d.ts +0 -9
  180. package/dist/types/src/blocks/raw/Img.d.ts +0 -7
  181. package/dist/types/src/blocks/raw/RawText.d.ts +0 -8
  182. package/dist/types/src/builder-react-lite.d.ts +0 -17
  183. package/dist/types/src/builder-react.d.ts +0 -45
  184. package/dist/types/src/components/Link.d.ts +0 -9
  185. package/dist/types/src/components/builder-block.component.d.ts +0 -50
  186. package/dist/types/src/components/builder-blocks.component.d.ts +0 -29
  187. package/dist/types/src/components/builder-component.component.d.ts +0 -324
  188. package/dist/types/src/components/builder-content.component.d.ts +0 -271
  189. package/dist/types/src/components/insert-spacer.component.d.ts +0 -13
  190. package/dist/types/src/components/no-wrap.d.ts +0 -2
  191. package/dist/types/src/components/variants-provider.component.d.ts +0 -8
  192. package/dist/types/src/constants/device-sizes.constant.d.ts +0 -57
  193. package/dist/types/src/constants/file-types.constant.d.ts +0 -2
  194. package/dist/types/src/decorators/builder-block.decorator.d.ts +0 -5
  195. package/dist/types/src/functions/apply-patch-with-mutation.d.ts +0 -5
  196. package/dist/types/src/functions/apply-patch-with-mutation.test.d.ts +0 -1
  197. package/dist/types/src/functions/block-to-html-string.d.ts +0 -3
  198. package/dist/types/src/functions/debonce-next-tick.d.ts +0 -2
  199. package/dist/types/src/functions/extract-localized-values.d.ts +0 -2
  200. package/dist/types/src/functions/filter-with-custom-targeting.d.ts +0 -15
  201. package/dist/types/src/functions/get-builder-pixel.d.ts +0 -2
  202. package/dist/types/src/functions/get.d.ts +0 -1
  203. package/dist/types/src/functions/is-debug.d.ts +0 -1
  204. package/dist/types/src/functions/no-wrap.d.ts +0 -33
  205. package/dist/types/src/functions/safe-dynamic-require.d.ts +0 -3
  206. package/dist/types/src/functions/set.d.ts +0 -1
  207. package/dist/types/src/functions/should-force-browser-runtime-in-node.d.ts +0 -1
  208. package/dist/types/src/functions/string-to-function.d.ts +0 -7
  209. package/dist/types/src/functions/throttle.d.ts +0 -1
  210. package/dist/types/src/functions/traverse.d.ts +0 -34
  211. package/dist/types/src/functions/try-eval.d.ts +0 -1
  212. package/dist/types/src/functions/update-metadata.d.ts +0 -17
  213. package/dist/types/src/functions/utils.d.ts +0 -2
  214. package/dist/types/src/functions/with-builder.d.ts +0 -2
  215. package/dist/types/src/functions/with-children.d.ts +0 -29
  216. package/dist/types/src/hooks/useIsPreviewing.d.ts +0 -1
  217. package/dist/types/src/scripts/init-editing.d.ts +0 -1
  218. package/dist/types/src/sdk-version.d.ts +0 -1
  219. package/dist/types/src/store/builder-async-requests.d.ts +0 -13
  220. package/dist/types/src/store/builder-meta.d.ts +0 -6
  221. package/dist/types/src/store/builder-store.d.ts +0 -10
  222. package/dist/types/src/to-error.d.ts +0 -13
  223. package/dist/types/test/basic.test.d.ts +0 -4
  224. package/dist/types/test/functions/render-block.d.ts +0 -3
  225. package/dist/types/test/image.test.d.ts +0 -1
  226. package/dist/types/test/setupTests.d.ts +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"render-block.js","sourceRoot":"","sources":["../../../../test/functions/render-block.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEO,IAAM,EAAE,GAAG,UAAC,OAAiC,EAAE,KAAc,IAAqB,OAAA,YACvF,OAAO,EAAE,yBAAyB,EAClC,EAAE,EAAE,kBAAW,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAE,IACpE,OAAO,EACV,EAJuF,CAIvF,CAAC;AAJU,QAAA,EAAE,MAIZ;AAEI,IAAM,KAAK,GAAG,UACnB,IAAY,EACZ,OAAa,EACb,SAAmC,EACnC,KAAc;IAEd,OAAA,IAAA,UAAE,wBAEK,SAAS,KACZ,SAAS,EAAE;YACT,IAAI,MAAA;YACJ,OAAO,SAAA;SACR,KAEH,KAAK,CACN;AATD,CASC,CAAC;AAfS,QAAA,KAAK,SAed"}
@@ -1,107 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- var React = __importStar(require("react"));
27
- var Image_1 = require("../src/blocks/Image");
28
- var reactTestRenderer = __importStar(require("react-test-renderer"));
29
- var render_block_1 = require("./functions/render-block");
30
- var builder_react_1 = require("../src/builder-react");
31
- describe('Image', function () {
32
- it('Builder image url', function () {
33
- var tree = reactTestRenderer
34
- .create(React.createElement(Image_1.Image, { image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F755c131471fb49ab91dc0bdc45bc85b5?width=1003" }))
35
- .toJSON();
36
- expect(tree).toMatchSnapshot();
37
- });
38
- it('Builder image url with width', function () {
39
- var tree = reactTestRenderer
40
- .create(React.createElement(Image_1.Image, { image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F755c131471fb49ab91dc0bdc45bc85b5?width=1003" }))
41
- .toJSON();
42
- expect(tree).toMatchSnapshot();
43
- });
44
- it('Shopify image url', function () {
45
- var tree = reactTestRenderer
46
- .create(React.createElement(Image_1.Image, { image: "https://cdn.shopify.com/s/files/1/0374/6457/2041/products/valerie-elash-o1Ic6JdypmA-unsplash.jpg?v=1592506853" }))
47
- .toJSON();
48
- expect(tree).toMatchSnapshot();
49
- });
50
- it('Amp image', function () {
51
- var imageBlock = (0, render_block_1.block)('Image', {
52
- image: 'https://cdn.shopify.com/s/files/1/0374/6457/2041/products/valerie-elash-o1Ic6JdypmA-unsplash.jpg?v=1592506853',
53
- }, {
54
- responsiveStyles: {
55
- large: {
56
- width: '345px',
57
- },
58
- medium: {
59
- width: '100%',
60
- },
61
- },
62
- }, 1234);
63
- var renderedBlock = reactTestRenderer
64
- .create(React.createElement(builder_react_1.BuilderPage, { model: "page", ampMode: true, content: {
65
- data: {
66
- blocks: [imageBlock],
67
- },
68
- } }))
69
- .toJSON();
70
- expect(renderedBlock).toMatchSnapshot();
71
- });
72
- it('Lazy load', function () {
73
- var tree = reactTestRenderer
74
- .create(React.createElement(Image_1.Image, { image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F755c131471fb49ab91dc0bdc45bc85b5?width=1003", lazy: true }))
75
- .toJSON();
76
- expect(tree).toMatchSnapshot();
77
- });
78
- it('with sizes, srcset, and alt', function () {
79
- var tree = reactTestRenderer
80
- .create(React.createElement(Image_1.Image, { sizes: "(max-width: 600px) 67vw, 92vw", srcset: "nosrcset", altText: "this great image", image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F755c131471fb49ab91dc0bdc45bc85b5?width=1003", amp: "true" }))
81
- .toJSON();
82
- expect(tree).toMatchSnapshot();
83
- });
84
- it('with responsive styles', function () {
85
- var imageBlock = (0, render_block_1.block)('Image', {
86
- image: 'https://cdn.shopify.com/s/files/1/0374/6457/2041/products/valerie-elash-o1Ic6JdypmA-unsplash.jpg?v=1592506853',
87
- }, {
88
- responsiveStyles: {
89
- large: {
90
- width: '345px',
91
- },
92
- medium: {
93
- width: '100%',
94
- },
95
- },
96
- }, 1234);
97
- var renderedBlock = reactTestRenderer
98
- .create(React.createElement(builder_react_1.BuilderPage, { model: "page", content: {
99
- data: {
100
- blocks: [imageBlock],
101
- },
102
- } }))
103
- .toJSON();
104
- expect(renderedBlock).toMatchSnapshot();
105
- });
106
- });
107
- //# sourceMappingURL=image.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"image.test.js","sourceRoot":"","sources":["../../../test/image.test.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAC/B,6CAA4C;AAC5C,qEAAyD;AACzD,yDAAiD;AACjD,sDAAmD;AAEnD,QAAQ,CAAC,OAAO,EAAE;IAChB,EAAE,CAAC,mBAAmB,EAAE;QACtB,IAAM,IAAI,GAAG,iBAAiB;aAC3B,MAAM,CACL,oBAAC,aAAK,IAAC,KAAK,EAAC,iHAAiH,GAAG,CAClI;aACA,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,8BAA8B,EAAE;QACjC,IAAM,IAAI,GAAG,iBAAiB;aAC3B,MAAM,CACL,oBAAC,aAAK,IAAC,KAAK,EAAC,iHAAiH,GAAG,CAClI;aACA,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mBAAmB,EAAE;QACtB,IAAM,IAAI,GAAG,iBAAiB;aAC3B,MAAM,CACL,oBAAC,aAAK,IAAC,KAAK,EAAC,+GAA+G,GAAG,CAChI;aACA,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,WAAW,EAAE;QACd,IAAM,UAAU,GAAG,IAAA,oBAAK,EACtB,OAAO,EACP;YACE,KAAK,EACH,+GAA+G;SAClH,EACD;YACE,gBAAgB,EAAE;gBAChB,KAAK,EAAE;oBACL,KAAK,EAAE,OAAO;iBACf;gBACD,MAAM,EAAE;oBACN,KAAK,EAAE,MAAM;iBACd;aACF;SACF,EACD,IAAI,CACL,CAAC;QAEF,IAAM,aAAa,GAAG,iBAAiB;aACpC,MAAM,CACL,oBAAC,2BAAW,IACV,KAAK,EAAC,MAAM,EACZ,OAAO,QACP,OAAO,EAAE;gBACP,IAAI,EAAE;oBACJ,MAAM,EAAE,CAAC,UAAU,CAAC;iBACrB;aACF,GACD,CACH;aACA,MAAM,EAAE,CAAC;QAEZ,MAAM,CAAC,aAAa,CAAC,CAAC,eAAe,EAAE,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,WAAW,EAAE;QACd,IAAM,IAAI,GAAG,iBAAiB;aAC3B,MAAM,CACL,oBAAC,aAAK,IACJ,KAAK,EAAC,iHAAiH,EACvH,IAAI,SACJ,CACH;aACA,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6BAA6B,EAAE;QAChC,IAAM,IAAI,GAAG,iBAAiB;aAC3B,MAAM,CACL,oBAAC,aAAK,IACJ,KAAK,EAAC,+BAA+B,EACrC,MAAM,EAAC,UAAU,EACjB,OAAO,EAAC,kBAAkB,EAC1B,KAAK,EAAC,iHAAiH,EACvH,GAAG,EAAC,MAAM,GACV,CACH;aACA,MAAM,EAAE,CAAC;QACZ,MAAM,CAAC,IAAI,CAAC,CAAC,eAAe,EAAE,CAAC;IACjC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wBAAwB,EAAE;QAC3B,IAAM,UAAU,GAAG,IAAA,oBAAK,EACtB,OAAO,EACP;YACE,KAAK,EACH,+GAA+G;SAClH,EACD;YACE,gBAAgB,EAAE;gBAChB,KAAK,EAAE;oBACL,KAAK,EAAE,OAAO;iBACf;gBACD,MAAM,EAAE;oBACN,KAAK,EAAE,MAAM;iBACd;aACF;SACF,EACD,IAAI,CACL,CAAC;QAEF,IAAM,aAAa,GAAG,iBAAiB;aACpC,MAAM,CACL,oBAAC,2BAAW,IACV,KAAK,EAAC,MAAM,EACZ,OAAO,EAAE;gBACP,IAAI,EAAE;oBACJ,MAAM,EAAE,CAAC,UAAU,CAAC;iBACrB;aACF,GACD,CACH;aACA,MAAM,EAAE,CAAC;QAEZ,MAAM,CAAC,aAAa,CAAC,CAAC,eAAe,EAAE,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- "use strict";
2
- beforeEach(function () {
3
- jest.spyOn(global.Math, 'random').mockReturnValue(0.123456789);
4
- });
5
- afterEach(function () {
6
- jest.spyOn(global.Math, 'random').mockRestore();
7
- });
8
- //# sourceMappingURL=setupTests.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"setupTests.js","sourceRoot":"","sources":["../../../test/setupTests.ts"],"names":[],"mappings":";AAAA,UAAU,CAAC;IACT,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC;AACjE,CAAC,CAAC,CAAC;AACH,SAAS,CAAC;IACR,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;AAClD,CAAC,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- export = onChange;
2
- declare function onChange(object: any, onChange: any, options: any): any;
3
- declare namespace onChange {
4
- export { target, unsubscribe, __esModule, onChange as default };
5
- }
6
- declare function target(proxy: any): any;
7
- declare function unsubscribe(proxy: any): any;
8
- declare const __esModule: boolean;
@@ -1,44 +0,0 @@
1
- declare const _default: ({
2
- output: {
3
- file: string;
4
- name: string;
5
- format: string;
6
- sourcemap: boolean;
7
- amd: {
8
- id: string;
9
- };
10
- };
11
- input: string;
12
- external: string[];
13
- watch: {
14
- include: string;
15
- };
16
- plugins: any[];
17
- } | {
18
- output: {
19
- file: string;
20
- format: string;
21
- sourcemap: boolean;
22
- }[];
23
- external: string[];
24
- plugins: any[];
25
- input: string;
26
- watch: {
27
- include: string;
28
- };
29
- } | {
30
- output: {
31
- file: string;
32
- format: string;
33
- name: string;
34
- sourcemap: boolean;
35
- amd?: undefined;
36
- };
37
- input: string;
38
- external: string[];
39
- watch: {
40
- include: string;
41
- };
42
- plugins: any[];
43
- })[];
44
- export default _default;
@@ -1,7 +0,0 @@
1
- export interface ButtonProps {
2
- attributes?: any;
3
- text?: string;
4
- link?: string;
5
- openLinkInNewTab?: boolean;
6
- }
7
- export declare const Button: Function;
@@ -1 +0,0 @@
1
- export declare const Columns: Function;
@@ -1 +0,0 @@
1
- export declare const CustomCode: Function;
@@ -1 +0,0 @@
1
- export declare const Embed: Function;
@@ -1,5 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface FragmentProps {
3
- builderBlock?: BuilderElement;
4
- }
5
- export declare const Fragment: Function;
@@ -1,6 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- import { Breakpoints } from '../constants/device-sizes.constant';
3
- export declare function updateQueryParam(uri: string | undefined, key: string, value: string | number | boolean): string;
4
- export declare function getSrcSet(url: string): string;
5
- export declare const getSizes: (sizes: string, block: BuilderElement, contentBreakpoints?: Breakpoints) => string;
6
- export declare const Image: Function;
@@ -1,8 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- type MutationProps = {
3
- selector: string;
4
- builderBlock?: BuilderElement;
5
- type?: 'replace' | 'afterEnd';
6
- };
7
- export declare function Mutation(props: MutationProps): JSX.Element;
8
- export {};
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- import { BuilderElement } from '@builder.io/sdk';
3
- import { Query } from '../functions/filter-with-custom-targeting';
4
- export type PersonalizationContainerProps = {
5
- children: React.ReactNode;
6
- previewingIndex: number | null;
7
- builderBlock?: BuilderElement;
8
- builderState: any;
9
- variants?: [
10
- {
11
- query: Query[];
12
- startDate?: string;
13
- endDate?: string;
14
- blocks: BuilderElement[];
15
- }
16
- ];
17
- attributes: any;
18
- };
19
- export declare function PersonalizationContainer(props: PersonalizationContainerProps): React.JSX.Element;
@@ -1,32 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface RouterProps {
3
- model?: string;
4
- data?: string;
5
- content?: any;
6
- handleRouting?: boolean;
7
- builderBlock?: BuilderElement;
8
- preloadOnHover?: boolean;
9
- onRoute?: (routeEvent: RouteEvent) => void;
10
- }
11
- export interface RouteEvent {
12
- /**
13
- * Url being routed to
14
- */
15
- url: string;
16
- /**
17
- * Html anchor element the href is on that
18
- * caused the route
19
- */
20
- anchorNode: HTMLAnchorElement;
21
- /**
22
- * Has preventDefault() been called preventing
23
- * builder from routing to the clicked URL
24
- */
25
- defaultPrevented: boolean;
26
- /**
27
- * Prevents builder from handling routing for you to handle
28
- * yourself
29
- */
30
- preventDefault(): void;
31
- }
32
- export declare const Router: Function;
@@ -1 +0,0 @@
1
- export declare const Section: Function;
@@ -1,5 +0,0 @@
1
- type DropzoneProps = {
2
- name: string;
3
- };
4
- export declare function Slot(props: DropzoneProps): JSX.Element;
5
- export {};
@@ -1 +0,0 @@
1
- export declare const StateProvider: Function;
@@ -1,19 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface SymbolInfo {
3
- model?: string;
4
- entry?: string;
5
- data?: any;
6
- content?: any;
7
- inline?: boolean;
8
- dynamic?: boolean;
9
- ownerId?: string;
10
- }
11
- export interface SymbolProps {
12
- symbol?: SymbolInfo;
13
- dataOnly?: boolean;
14
- dynamic?: boolean;
15
- builderBlock?: BuilderElement;
16
- attributes?: any;
17
- inheritState?: boolean;
18
- }
19
- export declare const Symbol: Function;
@@ -1,6 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface TextProps {
3
- text: string;
4
- builderBlock?: BuilderElement;
5
- }
6
- export declare const Text: Function;
@@ -1 +0,0 @@
1
- export declare const Video: void;
@@ -1,5 +0,0 @@
1
- export interface ButtonProps {
2
- attributes?: any;
3
- text?: string;
4
- }
5
- export declare const FormSubmitButton: Function;
@@ -1,24 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface FormProps {
3
- attributes?: any;
4
- name?: string;
5
- action?: string;
6
- validate?: boolean;
7
- method?: string;
8
- builderBlock?: BuilderElement;
9
- sendSubmissionsTo?: string;
10
- sendSubmissionsToEmail?: string;
11
- sendWithJs?: boolean;
12
- contentType?: string;
13
- customHeaders?: {
14
- [key: string]: string;
15
- };
16
- successUrl?: string;
17
- previewState?: string;
18
- successMessage?: BuilderElement[];
19
- errorMessage?: BuilderElement[];
20
- sendingMessage?: BuilderElement[];
21
- resetFormOnSubmit?: boolean;
22
- errorMessagePath?: string;
23
- }
24
- export declare const Form: Function;
@@ -1,10 +0,0 @@
1
- export interface FormInputProps {
2
- type?: string;
3
- attributes?: any;
4
- name?: string;
5
- value?: string;
6
- placeholder?: string;
7
- defaultValue?: string;
8
- required?: boolean;
9
- }
10
- export declare const FormInput: Function;
@@ -1,8 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface LabelProps {
3
- attributes?: any;
4
- text?: string;
5
- for?: string;
6
- builderBlock?: BuilderElement;
7
- }
8
- export declare const Label: Function;
@@ -1,12 +0,0 @@
1
- export interface FormSelectProps {
2
- options?: {
3
- name?: string;
4
- value: string;
5
- }[];
6
- attributes?: any;
7
- name?: string;
8
- value?: string;
9
- defaultValue?: string;
10
- required?: boolean;
11
- }
12
- export declare const FormSelect: Function;
@@ -1,9 +0,0 @@
1
- export interface FormTextAreaProps {
2
- attributes?: any;
3
- name?: string;
4
- value?: string;
5
- defaultValue?: string;
6
- placeholder?: string;
7
- required?: boolean;
8
- }
9
- export declare const TextArea: Function;
@@ -1,7 +0,0 @@
1
- import { BuilderElement } from '@builder.io/sdk';
2
- export interface ImgProps {
3
- attributes?: any;
4
- image?: string;
5
- builderBlock?: BuilderElement;
6
- }
7
- export declare const Img: Function;
@@ -1,8 +0,0 @@
1
- import * as React from 'react';
2
- import { BuilderElement } from '@builder.io/sdk';
3
- export interface RawTextProps {
4
- attributes?: any;
5
- text?: string;
6
- builderBlock?: BuilderElement;
7
- }
8
- export declare const RawText: (props: RawTextProps) => React.JSX.Element;
@@ -1,17 +0,0 @@
1
- import './scripts/init-editing';
2
- import { builder, Builder } from '@builder.io/sdk';
3
- export { BuilderElement } from '@builder.io/sdk';
4
- export { BuilderBlocks } from './components/builder-blocks.component';
5
- export { BuilderBlock as BuilderBlockComponent } from './components/builder-block.component';
6
- export { BuilderContent } from './components/builder-content.component';
7
- import { BuilderComponent } from './components/builder-component.component';
8
- export { BuilderStoreContext } from './store/builder-store';
9
- export { BuilderMetaContext } from './store/builder-meta';
10
- export { BuilderAsyncRequestsContext } from './store/builder-async-requests';
11
- export { withChildren } from './functions/with-children';
12
- export { BuilderComponent as BuilderPage };
13
- export { BuilderComponent };
14
- export { stringToFunction } from './functions/string-to-function';
15
- export { useIsPreviewing } from './hooks/useIsPreviewing';
16
- export { builder, Builder };
17
- export default builder;
@@ -1,45 +0,0 @@
1
- import './scripts/init-editing';
2
- import { builder, Builder } from '@builder.io/sdk';
3
- export { BuilderElement } from '@builder.io/sdk';
4
- export { BuilderBlocks } from './components/builder-blocks.component';
5
- export { BuilderBlock as BuilderBlockComponent } from './components/builder-block.component';
6
- export { BuilderContent } from './components/builder-content.component';
7
- import { BuilderComponent, onChange, RegisteredComponent } from './components/builder-component.component';
8
- export { BuilderStoreContext, BuilderStore } from './store/builder-store';
9
- export { BuilderMetaContext } from './store/builder-meta';
10
- export { BuilderAsyncRequestsContext } from './store/builder-async-requests';
11
- export { BuilderBlock } from './decorators/builder-block.decorator';
12
- export * from './functions/update-metadata';
13
- export { withBuilder } from './functions/with-builder';
14
- export { withChildren } from './functions/with-children';
15
- export { noWrap } from './functions/no-wrap';
16
- export { BuilderComponent as BuilderPage, onChange, RegisteredComponent };
17
- export { BuilderComponent };
18
- export { BuilderComponent as Content };
19
- export { Text } from './blocks/Text';
20
- export { Slot as Dropzone } from './blocks/Slot';
21
- export { Fragment } from './blocks/Fragment';
22
- export { Columns } from './blocks/Columns';
23
- export { Embed } from './blocks/Embed';
24
- export { CustomCode } from './blocks/CustomCode';
25
- export { Image, getSrcSet } from './blocks/Image';
26
- export { Video } from './blocks/Video';
27
- export { Symbol } from './blocks/Symbol';
28
- export { Button } from './blocks/Button';
29
- export { Section } from './blocks/Section';
30
- export { StateProvider } from './blocks/StateProvider';
31
- export { Router } from './blocks/Router';
32
- export { Mutation } from './blocks/Mutation';
33
- export { Form } from './blocks/forms/Form';
34
- export { FormInput } from './blocks/forms/Input';
35
- export { FormSubmitButton } from './blocks/forms/Button';
36
- export { Label } from './blocks/forms/Label';
37
- export { FormSelect } from './blocks/forms/Select';
38
- export { TextArea } from './blocks/forms/TextArea';
39
- export { Img } from './blocks/raw/Img';
40
- export { RawText } from './blocks/raw/RawText';
41
- export { PersonalizationContainer } from './blocks/PersonalizationContainer';
42
- export { stringToFunction } from './functions/string-to-function';
43
- export { useIsPreviewing } from './hooks/useIsPreviewing';
44
- export { builder, Builder };
45
- export default builder;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * Link component should be used instead of an anchor tag in our components,
4
- * this is to allow our users to override anchor tags in
5
- * case they're using a routing Lib that requires using their
6
- * custom Link component (e.g Next, Gatsby, React Router)
7
- * <BuilderComponent renderLink=(props) => <myCustomLink {...props} /> />
8
- */
9
- export declare const Link: (props: React.AnchorHTMLAttributes<HTMLAnchorElement>) => React.JSX.Element;
@@ -1,50 +0,0 @@
1
- /** @jsx jsx */
2
- import { Builder, BuilderElement } from '@builder.io/sdk';
3
- import React from 'react';
4
- import { Size } from '../constants/device-sizes.constant';
5
- export declare function deepCloneWithConditions<T = any>(obj: T): T;
6
- export interface BuilderBlockProps {
7
- fieldName?: string;
8
- block: BuilderElement;
9
- child?: boolean;
10
- index?: number;
11
- size?: Size;
12
- emailMode?: boolean;
13
- }
14
- interface BuilderBlockState {
15
- state: any;
16
- rootState: any;
17
- context: any;
18
- update: Function;
19
- }
20
- export declare class BuilderBlock extends React.Component<BuilderBlockProps, {
21
- hasError: boolean;
22
- updates: number;
23
- }> {
24
- private _asyncRequests?;
25
- private _errors?;
26
- private _logs?;
27
- hydrated: boolean;
28
- state: {
29
- hasError: boolean;
30
- updates: number;
31
- };
32
- private privateState;
33
- get store(): BuilderBlockState;
34
- static getDerivedStateFromError(error: any): {
35
- hasError: boolean;
36
- };
37
- componentDidCatch(error: any, errorInfo: any): void;
38
- stringToFunction(str: string, expression?: boolean): (state: object, event?: Event | null | undefined, block?: any, builder?: Builder | undefined, Device?: any, update?: Function | null | undefined, _Builder?: typeof Builder | undefined, context?: object | undefined) => any;
39
- get block(): BuilderElement;
40
- emotionCss(responsiveStyles: BuilderElement['responsiveStyles']): any;
41
- eval(str: string): any;
42
- componentWillUnmount(): void;
43
- onWindowMessage: (event: MessageEvent) => void;
44
- componentDidMount(): void;
45
- getElement(index?: number, state?: any): React.ReactNode;
46
- get id(): string;
47
- contents(state: BuilderBlockState): string | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | JSX.Element[] | null | undefined;
48
- render(): JSX.Element;
49
- }
50
- export {};
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- import { Size } from '../constants/device-sizes.constant';
3
- export interface BuilderBlocksProps {
4
- fieldName?: string;
5
- blocks?: any[] | React.ReactNode;
6
- child?: boolean;
7
- size?: Size;
8
- style?: React.CSSProperties;
9
- parentElementId?: string;
10
- parent?: any;
11
- dataPath?: string;
12
- className?: string;
13
- emailMode?: boolean;
14
- }
15
- interface BuilderBlocksState {
16
- }
17
- export declare class BuilderBlocks extends React.Component<BuilderBlocksProps, BuilderBlocksState> {
18
- hydrated: boolean;
19
- get isRoot(): boolean;
20
- get noBlocks(): boolean;
21
- get path(): string;
22
- get parentId(): any;
23
- componentDidMount(): void;
24
- onClickEmptyBlocks: () => void;
25
- onHoverEmptyBlocks: () => void;
26
- render(): JSX.Element;
27
- static renderInto(elementOrSelector: string | HTMLElement, props: BuilderBlocksProps | undefined, builderState: any): void;
28
- }
29
- export {};