@builder.io/sdk-react-nextjs 0.18.10 → 0.18.13
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/lib/browser/blocks/image/image.cjs +4 -4
- package/lib/browser/blocks/image/image.mjs +19 -17
- package/lib/browser/blocks/personalization-container/component-info.cjs +1 -0
- package/lib/browser/blocks/personalization-container/component-info.mjs +40 -0
- package/lib/browser/blocks/personalization-container/helpers/inlined-fns.cjs +162 -0
- package/lib/browser/blocks/personalization-container/helpers/inlined-fns.mjs +225 -0
- package/lib/browser/blocks/personalization-container/helpers.cjs +5 -0
- package/lib/browser/blocks/personalization-container/helpers.mjs +64 -0
- package/lib/browser/blocks/personalization-container/personalization-container.cjs +1 -0
- package/lib/browser/blocks/personalization-container/personalization-container.mjs +211 -0
- package/lib/browser/blocks/symbol/symbol.cjs +1 -1
- package/lib/browser/blocks/symbol/symbol.mjs +23 -23
- package/lib/browser/blocks/text/component-info.cjs +1 -1
- package/lib/browser/blocks/text/component-info.mjs +1 -4
- package/lib/browser/components/block/block.cjs +1 -1
- package/lib/browser/components/block/block.helpers.cjs +2 -2
- package/lib/browser/components/block/block.helpers.mjs +19 -18
- package/lib/browser/components/block/block.mjs +34 -34
- package/lib/browser/components/block/components/interactive-element.cjs +1 -1
- package/lib/browser/components/block/components/interactive-element.mjs +18 -11
- package/lib/browser/components/blocks/blocks-wrapper.cjs +1 -1
- package/lib/browser/components/blocks/blocks-wrapper.mjs +2 -2
- package/lib/browser/components/blocks/blocks.cjs +1 -1
- package/lib/browser/components/blocks/blocks.mjs +21 -18
- package/lib/browser/components/content-variants/content-variants.cjs +1 -1
- package/lib/browser/components/content-variants/content-variants.mjs +51 -40
- package/lib/browser/constants/builder-registered-components.cjs +1 -1
- package/lib/browser/constants/builder-registered-components.mjs +43 -36
- package/lib/browser/constants/sdk-version.cjs +1 -1
- package/lib/browser/constants/sdk-version.mjs +1 -1
- package/lib/edge/blocks/image/image.cjs +4 -4
- package/lib/edge/blocks/image/image.mjs +19 -17
- package/lib/edge/blocks/personalization-container/component-info.cjs +1 -0
- package/lib/edge/blocks/personalization-container/component-info.mjs +40 -0
- package/lib/edge/blocks/personalization-container/helpers/inlined-fns.cjs +162 -0
- package/lib/edge/blocks/personalization-container/helpers/inlined-fns.mjs +225 -0
- package/lib/edge/blocks/personalization-container/helpers.cjs +5 -0
- package/lib/edge/blocks/personalization-container/helpers.mjs +64 -0
- package/lib/edge/blocks/personalization-container/personalization-container.cjs +1 -0
- package/lib/edge/blocks/personalization-container/personalization-container.mjs +211 -0
- package/lib/edge/blocks/symbol/symbol.cjs +1 -1
- package/lib/edge/blocks/symbol/symbol.mjs +23 -23
- package/lib/edge/blocks/text/component-info.cjs +1 -1
- package/lib/edge/blocks/text/component-info.mjs +1 -4
- package/lib/edge/components/block/block.cjs +1 -1
- package/lib/edge/components/block/block.helpers.cjs +2 -2
- package/lib/edge/components/block/block.helpers.mjs +19 -18
- package/lib/edge/components/block/block.mjs +34 -34
- package/lib/edge/components/block/components/interactive-element.cjs +1 -1
- package/lib/edge/components/block/components/interactive-element.mjs +18 -11
- package/lib/edge/components/blocks/blocks-wrapper.cjs +1 -1
- package/lib/edge/components/blocks/blocks-wrapper.mjs +2 -2
- package/lib/edge/components/blocks/blocks.cjs +1 -1
- package/lib/edge/components/blocks/blocks.mjs +21 -18
- package/lib/edge/components/content-variants/content-variants.cjs +1 -1
- package/lib/edge/components/content-variants/content-variants.mjs +51 -40
- package/lib/edge/constants/builder-registered-components.cjs +1 -1
- package/lib/edge/constants/builder-registered-components.mjs +41 -34
- package/lib/edge/constants/sdk-version.cjs +1 -1
- package/lib/edge/constants/sdk-version.mjs +1 -1
- package/lib/node/blocks/image/image.cjs +4 -4
- package/lib/node/blocks/image/image.mjs +19 -17
- package/lib/node/blocks/personalization-container/component-info.cjs +1 -0
- package/lib/node/blocks/personalization-container/component-info.mjs +40 -0
- package/lib/node/blocks/personalization-container/helpers/inlined-fns.cjs +162 -0
- package/lib/node/blocks/personalization-container/helpers/inlined-fns.mjs +225 -0
- package/lib/node/blocks/personalization-container/helpers.cjs +5 -0
- package/lib/node/blocks/personalization-container/helpers.mjs +64 -0
- package/lib/node/blocks/personalization-container/personalization-container.cjs +1 -0
- package/lib/node/blocks/personalization-container/personalization-container.mjs +211 -0
- package/lib/node/blocks/symbol/symbol.cjs +1 -1
- package/lib/node/blocks/symbol/symbol.mjs +23 -23
- package/lib/node/blocks/text/component-info.cjs +1 -1
- package/lib/node/blocks/text/component-info.mjs +1 -4
- package/lib/node/components/block/block.cjs +1 -1
- package/lib/node/components/block/block.helpers.cjs +2 -2
- package/lib/node/components/block/block.helpers.mjs +19 -18
- package/lib/node/components/block/block.mjs +34 -34
- package/lib/node/components/block/components/interactive-element.cjs +1 -1
- package/lib/node/components/block/components/interactive-element.mjs +18 -11
- package/lib/node/components/blocks/blocks-wrapper.cjs +1 -1
- package/lib/node/components/blocks/blocks-wrapper.mjs +2 -2
- package/lib/node/components/blocks/blocks.cjs +1 -1
- package/lib/node/components/blocks/blocks.mjs +21 -18
- package/lib/node/components/content-variants/content-variants.cjs +1 -1
- package/lib/node/components/content-variants/content-variants.mjs +51 -40
- package/lib/node/constants/builder-registered-components.cjs +1 -1
- package/lib/node/constants/builder-registered-components.mjs +41 -34
- package/lib/node/constants/sdk-version.cjs +1 -1
- package/lib/node/constants/sdk-version.mjs +1 -1
- package/package.json +2 -2
- package/types/cjs/blocks/personalization-container/helpers/inlined-fns.d.ts +4 -1
- package/types/cjs/blocks/personalization-container/helpers.d.ts +24 -4
- package/types/cjs/blocks/personalization-container/personalization-container.types.d.ts +2 -2
- package/types/cjs/components/block/block.helpers.d.ts +1 -0
- package/types/cjs/components/blocks/blocks-wrapper.d.ts +13 -1
- package/types/cjs/components/blocks/blocks.types.d.ts +1 -1
- package/types/cjs/constants/sdk-version.d.ts +1 -1
- package/types/esm/blocks/personalization-container/helpers/inlined-fns.d.ts +4 -1
- package/types/esm/blocks/personalization-container/helpers.d.ts +24 -4
- package/types/esm/blocks/personalization-container/personalization-container.types.d.ts +2 -2
- package/types/esm/components/block/block.helpers.d.ts +1 -0
- package/types/esm/components/blocks/blocks-wrapper.d.ts +13 -1
- package/types/esm/components/blocks/blocks.types.d.ts +1 -1
- package/types/esm/constants/sdk-version.d.ts +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use client";"use strict";const a=require("react/jsx-runtime"),i=require("react"),r=require("../../functions/is-editing.cjs");function d(e){const c=i.useRef(null);i.useState(()=>!1);function o(){var t;return["builder-blocks",(t=e.blocks)!=null&&t.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function s(){if(!e.path)return;const t="this.",n="component.options.";return e.path.startsWith(t)?e.path.replace(t,""):e.path.startsWith(n)?e.path:`${n}${e.path||""}`}function l(){var t,n;r.isEditing()&&!((t=e.blocks)!=null&&t.length)&&((n=window.parent)==null||n.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:s()}},"*"))}function u(){var t,n;r.isEditing()&&!((t=e.blocks)!=null&&t.length)&&((n=window.parent)==null||n.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:s()}},"*"))}return i.useEffect(()=>{},[]),i.useEffect(()=>{},[e.blocks]),a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{ref:c,className:o()+" props-blocks-wrapper-
|
|
1
|
+
"use client";"use strict";const a=require("react/jsx-runtime"),i=require("react"),r=require("../../functions/is-editing.cjs");function d(e){const c=i.useRef(null);i.useState(()=>!1);function o(){var t;return["builder-blocks",(t=e.blocks)!=null&&t.length?"":"no-blocks",e.classNameProp].filter(Boolean).join(" ")}function s(){if(!e.path)return;const t="this.",n="component.options.";return e.path.startsWith(t)?e.path.replace(t,""):e.path.startsWith(n)?e.path:`${n}${e.path||""}`}function l(){var t,n;r.isEditing()&&!((t=e.blocks)!=null&&t.length)&&((n=window.parent)==null||n.postMessage({type:"builder.clickEmptyBlocks",data:{parentElementId:e.parent,dataPath:s()}},"*"))}function u(){var t,n;r.isEditing()&&!((t=e.blocks)!=null&&t.length)&&((n=window.parent)==null||n.postMessage({type:"builder.hoverEmptyBlocks",data:{parentElementId:e.parent,dataPath:s()}},"*"))}return i.useEffect(()=>{},[]),i.useEffect(()=>{},[e.blocks]),a.jsxs(a.Fragment,{children:[a.jsx(e.BlocksWrapper,{ref:c,className:o()+" props-blocks-wrapper-7d1e7a14","builder-path":s(),"builder-parent-id":e.parent,style:e.styleProp,onClick:t=>l(),onMouseEnter:t=>u(),onKeyPress:t=>l(),...e.BlocksWrapperProps,children:e.children}),a.jsx("style",{children:`.props-blocks-wrapper-7d1e7a14 {
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
align-items: stretch;
|
|
@@ -52,7 +52,7 @@ function y(e) {
|
|
|
52
52
|
e.BlocksWrapper,
|
|
53
53
|
{
|
|
54
54
|
ref: c,
|
|
55
|
-
className: o() + " props-blocks-wrapper-
|
|
55
|
+
className: o() + " props-blocks-wrapper-7d1e7a14",
|
|
56
56
|
"builder-path": a(),
|
|
57
57
|
"builder-parent-id": e.parent,
|
|
58
58
|
style: e.styleProp,
|
|
@@ -63,7 +63,7 @@ function y(e) {
|
|
|
63
63
|
children: e.children
|
|
64
64
|
}
|
|
65
65
|
),
|
|
66
|
-
/* @__PURE__ */ r("style", { children: `.props-blocks-wrapper-
|
|
66
|
+
/* @__PURE__ */ r("style", { children: `.props-blocks-wrapper-7d1e7a14 {
|
|
67
67
|
display: flex;
|
|
68
68
|
flex-direction: column;
|
|
69
69
|
align-items: stretch;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const t=require("react/jsx-runtime"),o=require("../block/block.cjs"),s=require("./blocks-wrapper.cjs");function a(e){var n,c,r;return t.jsxs(s,{blocks:e.blocks,parent:e.parent,path:e.path,styleProp:e.styleProp,BlocksWrapperProps:e.BlocksWrapperProps||((n=e.context)==null?void 0:n.BlocksWrapperProps),classNameProp:e.className,BlocksWrapper:(c=e.context)==null?void 0:c.BlocksWrapper,children:[e.children,e.blocks?t.jsx(t.Fragment,{children:(r=e.blocks)==null?void 0:r.map(l=>t.jsx(o,{block:l,linkComponent:e.linkComponent,context:e.context,registeredComponents:e.registeredComponents},l.id))}):null]})}module.exports=a;
|
|
@@ -1,31 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as c, jsx as l, Fragment as a } from "react/jsx-runtime";
|
|
2
|
+
import s from "../block/block.mjs";
|
|
3
3
|
import m from "./blocks-wrapper.mjs";
|
|
4
|
-
function
|
|
5
|
-
var
|
|
6
|
-
return /* @__PURE__ */
|
|
4
|
+
function d(e) {
|
|
5
|
+
var t, n, o;
|
|
6
|
+
return /* @__PURE__ */ c(
|
|
7
7
|
m,
|
|
8
8
|
{
|
|
9
9
|
blocks: e.blocks,
|
|
10
10
|
parent: e.parent,
|
|
11
11
|
path: e.path,
|
|
12
12
|
styleProp: e.styleProp,
|
|
13
|
+
BlocksWrapperProps: e.BlocksWrapperProps || ((t = e.context) == null ? void 0 : t.BlocksWrapperProps),
|
|
13
14
|
classNameProp: e.className,
|
|
14
|
-
BlocksWrapper: (
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
a,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
15
|
+
BlocksWrapper: (n = e.context) == null ? void 0 : n.BlocksWrapper,
|
|
16
|
+
children: [
|
|
17
|
+
e.children,
|
|
18
|
+
e.blocks ? /* @__PURE__ */ l(a, { children: (o = e.blocks) == null ? void 0 : o.map((r) => /* @__PURE__ */ l(
|
|
19
|
+
s,
|
|
20
|
+
{
|
|
21
|
+
block: r,
|
|
22
|
+
linkComponent: e.linkComponent,
|
|
23
|
+
context: e.context,
|
|
24
|
+
registeredComponents: e.registeredComponents
|
|
25
|
+
},
|
|
26
|
+
r.id
|
|
27
|
+
)) }) : null
|
|
28
|
+
]
|
|
26
29
|
}
|
|
27
30
|
);
|
|
28
31
|
}
|
|
29
32
|
export {
|
|
30
|
-
|
|
33
|
+
d as default
|
|
31
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const n=require("react/jsx-runtime"),l=require("../../blocks/personalization-container/helpers.cjs"),d=require("../../constants/target.cjs"),C=require("../../helpers/ab-tests.cjs"),u=require("../../helpers/canTrack.cjs"),S=require("../content/content.cjs"),r=require("../inlined-script.cjs"),V=require("../inlined-styles.cjs"),i=require("./helpers.cjs");function g(t){var o;const c=i.checkShouldRenderVariants({canTrack:u.getDefaultCanTrack(t.canTrack),content:t.content}),k=function(){var e;return i.getUpdateCookieAndStylesScript(i.getVariants(t.content).map(s=>({id:s.testVariationId,testRatio:s.testRatio})),((e=t.content)==null?void 0:e.id)||"")},m=function(){return i.getVariants(t.content).map(e=>`.variant-${e.testVariationId} { display: none; } `).join("")},T=function(){var e;return c?{...t.content,testVariationId:(e=t.content)==null?void 0:e.id}:C.handleABTestingSync({item:t.content,canTrack:u.getDefaultCanTrack(t.canTrack)})};return n.jsxs(n.Fragment,{children:[!t.isNestedRender&&d.TARGET!=="reactNative"?n.jsxs(n.Fragment,{children:[n.jsx(r,{id:"builderio-init-variants-fns",scriptStr:i.getInitVariantsFnsScriptString(),nonce:t.nonce||""}),l.SDKS_SUPPORTING_PERSONALIZATION.includes(d.TARGET)?n.jsx(r,{id:"builderio-init-personalization-variants-fns",nonce:t.nonce||"",scriptStr:l.getInitPersonalizationVariantsFnsScriptString()}):null]}):null,c?n.jsxs(n.Fragment,{children:[n.jsx(V,{id:"builderio-variants",styles:m(),nonce:t.nonce||""}),n.jsx(r,{id:"builderio-variants-visibility",scriptStr:k(),nonce:t.nonce||""}),(o=i.getVariants(t.content))==null?void 0:o.map(a=>n.jsx(S,{apiHost:t.apiHost,isNestedRender:t.isNestedRender,nonce:t.nonce,content:a,showContent:!1,model:t.model,data:t.data,context:t.context,apiKey:t.apiKey,apiVersion:t.apiVersion,customComponents:t.customComponents,linkComponent:t.linkComponent,canTrack:t.canTrack,locale:t.locale,enrich:t.enrich,isSsrAbTest:c,blocksWrapper:t.blocksWrapper,blocksWrapperProps:t.blocksWrapperProps,contentWrapper:t.contentWrapper,contentWrapperProps:t.contentWrapperProps,trustedHosts:t.trustedHosts},a.testVariationId))]}):null,n.jsx(S,{apiHost:t.apiHost,nonce:t.nonce,isNestedRender:t.isNestedRender,content:T(),showContent:!0,model:t.model,data:t.data,context:t.context,apiKey:t.apiKey,apiVersion:t.apiVersion,customComponents:t.customComponents,linkComponent:t.linkComponent,canTrack:t.canTrack,locale:t.locale,enrich:t.enrich,isSsrAbTest:c,blocksWrapper:t.blocksWrapper,blocksWrapperProps:t.blocksWrapperProps,contentWrapper:t.contentWrapper,contentWrapperProps:t.contentWrapperProps,trustedHosts:t.trustedHosts})]})}module.exports=g;
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsxs as o, Fragment as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { SDKS_SUPPORTING_PERSONALIZATION as T, getInitPersonalizationVariantsFnsScriptString as V } from "../../blocks/personalization-container/helpers.mjs";
|
|
3
|
+
import { TARGET as m } from "../../constants/target.mjs";
|
|
3
4
|
import { handleABTestingSync as W } from "../../helpers/ab-tests.mjs";
|
|
4
|
-
import { getDefaultCanTrack as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { checkShouldRenderVariants as
|
|
9
|
-
function
|
|
10
|
-
var
|
|
11
|
-
const a =
|
|
12
|
-
canTrack:
|
|
5
|
+
import { getDefaultCanTrack as u } from "../../helpers/canTrack.mjs";
|
|
6
|
+
import S from "../content/content.mjs";
|
|
7
|
+
import r from "../inlined-script.mjs";
|
|
8
|
+
import b from "../inlined-styles.mjs";
|
|
9
|
+
import { checkShouldRenderVariants as h, getInitVariantsFnsScriptString as y, getVariants as d, getUpdateCookieAndStylesScript as P } from "./helpers.mjs";
|
|
10
|
+
function j(t) {
|
|
11
|
+
var s;
|
|
12
|
+
const a = h({
|
|
13
|
+
canTrack: u(t.canTrack),
|
|
13
14
|
content: t.content
|
|
14
15
|
}), k = function() {
|
|
15
16
|
var n;
|
|
16
|
-
return
|
|
17
|
-
|
|
18
|
-
id:
|
|
19
|
-
testRatio:
|
|
17
|
+
return P(
|
|
18
|
+
d(t.content).map((l) => ({
|
|
19
|
+
id: l.testVariationId,
|
|
20
|
+
testRatio: l.testRatio
|
|
20
21
|
})),
|
|
21
22
|
((n = t.content) == null ? void 0 : n.id) || ""
|
|
22
23
|
);
|
|
23
|
-
},
|
|
24
|
-
return
|
|
24
|
+
}, f = function() {
|
|
25
|
+
return d(t.content).map((n) => `.variant-${n.testVariationId} { display: none; } `).join("");
|
|
25
26
|
}, C = function() {
|
|
26
27
|
var n;
|
|
27
28
|
return a ? {
|
|
@@ -29,42 +30,52 @@ function N(t) {
|
|
|
29
30
|
testVariationId: (n = t.content) == null ? void 0 : n.id
|
|
30
31
|
} : W({
|
|
31
32
|
item: t.content,
|
|
32
|
-
canTrack:
|
|
33
|
+
canTrack: u(t.canTrack)
|
|
33
34
|
});
|
|
34
35
|
};
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
!t.isNestedRender &&
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
|
|
36
|
+
return /* @__PURE__ */ o(c, { children: [
|
|
37
|
+
!t.isNestedRender && m !== "reactNative" ? /* @__PURE__ */ o(c, { children: [
|
|
38
|
+
/* @__PURE__ */ e(
|
|
39
|
+
r,
|
|
40
|
+
{
|
|
41
|
+
id: "builderio-init-variants-fns",
|
|
42
|
+
scriptStr: y(),
|
|
43
|
+
nonce: t.nonce || ""
|
|
44
|
+
}
|
|
45
|
+
),
|
|
46
|
+
T.includes(m) ? /* @__PURE__ */ e(
|
|
47
|
+
r,
|
|
48
|
+
{
|
|
49
|
+
id: "builderio-init-personalization-variants-fns",
|
|
50
|
+
nonce: t.nonce || "",
|
|
51
|
+
scriptStr: V()
|
|
52
|
+
}
|
|
53
|
+
) : null
|
|
54
|
+
] }) : null,
|
|
55
|
+
a ? /* @__PURE__ */ o(c, { children: [
|
|
56
|
+
/* @__PURE__ */ e(
|
|
57
|
+
b,
|
|
47
58
|
{
|
|
48
59
|
id: "builderio-variants",
|
|
49
|
-
styles:
|
|
60
|
+
styles: f(),
|
|
50
61
|
nonce: t.nonce || ""
|
|
51
62
|
}
|
|
52
63
|
),
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
|
|
64
|
+
/* @__PURE__ */ e(
|
|
65
|
+
r,
|
|
55
66
|
{
|
|
56
67
|
id: "builderio-variants-visibility",
|
|
57
68
|
scriptStr: k(),
|
|
58
69
|
nonce: t.nonce || ""
|
|
59
70
|
}
|
|
60
71
|
),
|
|
61
|
-
(
|
|
62
|
-
|
|
72
|
+
(s = d(t.content)) == null ? void 0 : s.map((i) => /* @__PURE__ */ e(
|
|
73
|
+
S,
|
|
63
74
|
{
|
|
64
75
|
apiHost: t.apiHost,
|
|
65
76
|
isNestedRender: t.isNestedRender,
|
|
66
77
|
nonce: t.nonce,
|
|
67
|
-
content:
|
|
78
|
+
content: i,
|
|
68
79
|
showContent: !1,
|
|
69
80
|
model: t.model,
|
|
70
81
|
data: t.data,
|
|
@@ -83,11 +94,11 @@ function N(t) {
|
|
|
83
94
|
contentWrapperProps: t.contentWrapperProps,
|
|
84
95
|
trustedHosts: t.trustedHosts
|
|
85
96
|
},
|
|
86
|
-
|
|
97
|
+
i.testVariationId
|
|
87
98
|
))
|
|
88
99
|
] }) : null,
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
|
|
100
|
+
/* @__PURE__ */ e(
|
|
101
|
+
S,
|
|
91
102
|
{
|
|
92
103
|
apiHost: t.apiHost,
|
|
93
104
|
nonce: t.nonce,
|
|
@@ -115,5 +126,5 @@ function N(t) {
|
|
|
115
126
|
] });
|
|
116
127
|
}
|
|
117
128
|
export {
|
|
118
|
-
|
|
129
|
+
j as default
|
|
119
130
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");require("../functions/get-fetch.cjs");const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const o=require("./target.cjs");require("../functions/get-fetch.cjs");const n=require("../blocks/button/component-info.cjs"),e=require("../blocks/button/button.cjs"),t=require("../blocks/columns/component-info.cjs"),r=require("../blocks/columns/columns.cjs"),c=require("../blocks/fragment/component-info.cjs"),s=require("../blocks/fragment/fragment.cjs"),m=require("../blocks/image/component-info.cjs"),i=require("../blocks/image/image.cjs"),p=require("../blocks/personalization-container/component-info.cjs"),u=require("../blocks/personalization-container/helpers.cjs"),q=require("../blocks/personalization-container/personalization-container.cjs"),f=require("../blocks/section/component-info.cjs"),I=require("../blocks/section/section.cjs"),a=require("../blocks/slot/component-info.cjs"),l=require("../blocks/slot/slot.cjs"),g=require("../blocks/symbol/component-info.cjs"),$=require("../blocks/symbol/symbol.cjs"),S=require("../blocks/text/component-info.cjs"),d=require("../blocks/text/text.cjs"),C=require("./extra-components.cjs"),R=()=>[{component:e,...n.componentInfo},{component:r,...t.componentInfo},{component:s,...c.componentInfo},{component:i,...m.componentInfo},{component:I,...f.componentInfo},{component:l,...a.componentInfo},{component:$,...g.componentInfo},{component:d,...S.componentInfo},...u.SDKS_SUPPORTING_PERSONALIZATION.includes(o.TARGET)?[{component:q,...p.componentInfo}]:[],...C.getExtraComponents()];exports.getDefaultRegisteredComponents=R;
|
|
@@ -1,48 +1,55 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
+
import { TARGET as o } from "./target.mjs";
|
|
3
4
|
import "../functions/get-fetch.mjs";
|
|
4
|
-
import { componentInfo as
|
|
5
|
-
import
|
|
6
|
-
import { componentInfo as
|
|
7
|
-
import
|
|
8
|
-
import { componentInfo as
|
|
9
|
-
import
|
|
10
|
-
import { componentInfo as
|
|
11
|
-
import
|
|
12
|
-
import { componentInfo as c } from "../blocks/
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import s from "../blocks/
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import C from "../blocks/
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
5
|
+
import { componentInfo as n } from "../blocks/button/component-info.mjs";
|
|
6
|
+
import m from "../blocks/button/button.mjs";
|
|
7
|
+
import { componentInfo as t } from "../blocks/columns/component-info.mjs";
|
|
8
|
+
import p from "../blocks/columns/columns.mjs";
|
|
9
|
+
import { componentInfo as r } from "../blocks/fragment/component-info.mjs";
|
|
10
|
+
import e from "../blocks/fragment/fragment.mjs";
|
|
11
|
+
import { componentInfo as f } from "../blocks/image/component-info.mjs";
|
|
12
|
+
import i from "../blocks/image/image.mjs";
|
|
13
|
+
import { componentInfo as c } from "../blocks/personalization-container/component-info.mjs";
|
|
14
|
+
import { SDKS_SUPPORTING_PERSONALIZATION as I } from "../blocks/personalization-container/helpers.mjs";
|
|
15
|
+
import a from "../blocks/personalization-container/personalization-container.mjs";
|
|
16
|
+
import { componentInfo as s } from "../blocks/section/component-info.mjs";
|
|
17
|
+
import $ from "../blocks/section/section.mjs";
|
|
18
|
+
import { componentInfo as S } from "../blocks/slot/component-info.mjs";
|
|
19
|
+
import l from "../blocks/slot/slot.mjs";
|
|
20
|
+
import { componentInfo as C } from "../blocks/symbol/component-info.mjs";
|
|
21
|
+
import g from "../blocks/symbol/symbol.mjs";
|
|
22
|
+
import { componentInfo as T } from "../blocks/text/component-info.mjs";
|
|
23
|
+
import u from "../blocks/text/text.mjs";
|
|
24
|
+
import { getExtraComponents as P } from "./extra-components.mjs";
|
|
25
|
+
const w = () => [{
|
|
26
|
+
component: m,
|
|
27
|
+
...n
|
|
24
28
|
}, {
|
|
25
|
-
component:
|
|
26
|
-
...
|
|
29
|
+
component: p,
|
|
30
|
+
...t
|
|
27
31
|
}, {
|
|
28
|
-
component:
|
|
29
|
-
...
|
|
30
|
-
}, {
|
|
31
|
-
component: f,
|
|
32
|
-
...e
|
|
32
|
+
component: e,
|
|
33
|
+
...r
|
|
33
34
|
}, {
|
|
34
35
|
component: i,
|
|
35
|
-
...
|
|
36
|
-
}, {
|
|
37
|
-
component: s,
|
|
38
|
-
...I
|
|
36
|
+
...f
|
|
39
37
|
}, {
|
|
40
38
|
component: $,
|
|
41
|
-
...
|
|
39
|
+
...s
|
|
42
40
|
}, {
|
|
43
|
-
component:
|
|
44
|
-
...
|
|
45
|
-
},
|
|
41
|
+
component: l,
|
|
42
|
+
...S
|
|
43
|
+
}, {
|
|
44
|
+
component: g,
|
|
45
|
+
...C
|
|
46
|
+
}, {
|
|
47
|
+
component: u,
|
|
48
|
+
...T
|
|
49
|
+
}, ...I.includes(o) ? [{
|
|
50
|
+
component: a,
|
|
51
|
+
...c
|
|
52
|
+
}] : [], ...P()];
|
|
46
53
|
export {
|
|
47
|
-
|
|
54
|
+
w as getDefaultRegisteredComponents
|
|
48
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.18.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="0.18.13";exports.SDK_VERSION=e;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
"use client";"use strict";const t=require("react/jsx-runtime"),
|
|
1
|
+
"use client";"use strict";const t=require("react/jsx-runtime"),f=require("react"),c=require("./image.helpers.cjs");function b(e){var s,r,u,o,d,g;function n(){var h;const i=e.image||e.src;if(!i||!(typeof i=="string"&&(i.match(/builder\.io/)||i.match(/cdn\.shopify\.com/))))return e.srcset;if(!e.noWebp){if(e.srcset&&((h=e.image)!=null&&h.includes("builder.io/api/v1/image"))){if(!e.srcset.includes(e.image.split("?")[0]))return console.debug("Removed given srcset"),c.getSrcSet(i)}else if(e.image&&!e.srcset)return c.getSrcSet(i);return c.getSrcSet(i)}}function l(){var a;return(a=n==null?void 0:n())!=null&&a.match(/builder\.io/)&&!e.noWebp?n().replace(/\?/g,"?format=webp&"):""}function m(){const a={position:"absolute",height:"100%",width:"100%",left:"0px",top:"0px"};return e.aspectRatio?a:void 0}return f.useEffect(()=>{},[]),t.jsxs(t.Fragment,{children:[t.jsxs(t.Fragment,{children:[t.jsxs("picture",{children:[l()?t.jsx("source",{type:"image/webp",srcSet:l()}):null,t.jsx("img",{loading:e.highPriority?"eager":"lazy",fetchPriority:e.highPriority?"high":"auto",alt:e.altText,title:e.title,role:e.altText?void 0:"presentation",style:{objectPosition:e.backgroundPosition||"center",objectFit:e.backgroundSize||"cover",...m()},className:"builder-image"+(e.className?" "+e.className:"")+" img-0aa95e74",src:e.image,srcSet:n(),sizes:e.sizes})]}),e.aspectRatio&&!((r=(s=e.builderBlock)==null?void 0:s.children)!=null&&r.length&&e.fitContent)?t.jsx("div",{className:"builder-image-sizer div-0aa95e74",style:{paddingTop:e.aspectRatio*100+"%"}}):null,(o=(u=e.builderBlock)==null?void 0:u.children)!=null&&o.length&&e.fitContent?t.jsx(t.Fragment,{children:e.children}):null,!e.fitContent&&((g=(d=e.builderBlock)==null?void 0:d.children)!=null&&g.length)?t.jsx("div",{className:"div-0aa95e74-2",children:e.children}):null]}),t.jsx("style",{children:`.img-0aa95e74 {
|
|
2
2
|
opacity: 1;
|
|
3
3
|
transition: opacity 0.2s ease-in-out;
|
|
4
|
-
}.div-
|
|
4
|
+
}.div-0aa95e74 {
|
|
5
5
|
width: 100%;
|
|
6
6
|
pointer-events: none;
|
|
7
7
|
font-size: 0;
|
|
8
|
-
}.div-
|
|
8
|
+
}.div-0aa95e74-2 {
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
align-items: stretch;
|
|
@@ -14,4 +14,4 @@
|
|
|
14
14
|
left: 0;
|
|
15
15
|
width: 100%;
|
|
16
16
|
height: 100%;
|
|
17
|
-
}`})]})}module.exports=
|
|
17
|
+
}`})]})}module.exports=b;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as l, Fragment as c, jsx as t } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect as v } from "react";
|
|
3
4
|
import { getSrcSet as o } from "./image.helpers.mjs";
|
|
4
|
-
function
|
|
5
|
-
var d, u, s, g,
|
|
5
|
+
function w(e) {
|
|
6
|
+
var d, u, s, g, m, h;
|
|
6
7
|
function n() {
|
|
7
8
|
var f;
|
|
8
9
|
const i = e.image || e.src;
|
|
@@ -20,22 +21,23 @@ function x(e) {
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
function r() {
|
|
23
|
-
var
|
|
24
|
-
return (
|
|
24
|
+
var a;
|
|
25
|
+
return (a = n == null ? void 0 : n()) != null && a.match(/builder\.io/) && !e.noWebp ? n().replace(/\?/g, "?format=webp&") : "";
|
|
25
26
|
}
|
|
26
27
|
function b() {
|
|
27
|
-
const
|
|
28
|
+
const a = {
|
|
28
29
|
position: "absolute",
|
|
29
30
|
height: "100%",
|
|
30
31
|
width: "100%",
|
|
31
32
|
left: "0px",
|
|
32
33
|
top: "0px"
|
|
33
34
|
};
|
|
34
|
-
return e.aspectRatio ?
|
|
35
|
+
return e.aspectRatio ? a : void 0;
|
|
35
36
|
}
|
|
36
|
-
return
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
return v(() => {
|
|
38
|
+
}, []), /* @__PURE__ */ l(c, { children: [
|
|
39
|
+
/* @__PURE__ */ l(c, { children: [
|
|
40
|
+
/* @__PURE__ */ l("picture", { children: [
|
|
39
41
|
r() ? /* @__PURE__ */ t("source", { type: "image/webp", srcSet: r() }) : null,
|
|
40
42
|
/* @__PURE__ */ t(
|
|
41
43
|
"img",
|
|
@@ -50,7 +52,7 @@ function x(e) {
|
|
|
50
52
|
objectFit: e.backgroundSize || "cover",
|
|
51
53
|
...b()
|
|
52
54
|
},
|
|
53
|
-
className: "builder-image" + (e.className ? " " + e.className : "") + " img-
|
|
55
|
+
className: "builder-image" + (e.className ? " " + e.className : "") + " img-0aa95e74",
|
|
54
56
|
src: e.image,
|
|
55
57
|
srcSet: n(),
|
|
56
58
|
sizes: e.sizes
|
|
@@ -60,23 +62,23 @@ function x(e) {
|
|
|
60
62
|
e.aspectRatio && !((u = (d = e.builderBlock) == null ? void 0 : d.children) != null && u.length && e.fitContent) ? /* @__PURE__ */ t(
|
|
61
63
|
"div",
|
|
62
64
|
{
|
|
63
|
-
className: "builder-image-sizer div-
|
|
65
|
+
className: "builder-image-sizer div-0aa95e74",
|
|
64
66
|
style: {
|
|
65
67
|
paddingTop: e.aspectRatio * 100 + "%"
|
|
66
68
|
}
|
|
67
69
|
}
|
|
68
70
|
) : null,
|
|
69
71
|
(g = (s = e.builderBlock) == null ? void 0 : s.children) != null && g.length && e.fitContent ? /* @__PURE__ */ t(c, { children: e.children }) : null,
|
|
70
|
-
!e.fitContent && ((
|
|
72
|
+
!e.fitContent && ((h = (m = e.builderBlock) == null ? void 0 : m.children) != null && h.length) ? /* @__PURE__ */ t("div", { className: "div-0aa95e74-2", children: e.children }) : null
|
|
71
73
|
] }),
|
|
72
|
-
/* @__PURE__ */ t("style", { children: `.img-
|
|
74
|
+
/* @__PURE__ */ t("style", { children: `.img-0aa95e74 {
|
|
73
75
|
opacity: 1;
|
|
74
76
|
transition: opacity 0.2s ease-in-out;
|
|
75
|
-
}.div-
|
|
77
|
+
}.div-0aa95e74 {
|
|
76
78
|
width: 100%;
|
|
77
79
|
pointer-events: none;
|
|
78
80
|
font-size: 0;
|
|
79
|
-
}.div-
|
|
81
|
+
}.div-0aa95e74-2 {
|
|
80
82
|
display: flex;
|
|
81
83
|
flex-direction: column;
|
|
82
84
|
align-items: stretch;
|
|
@@ -89,5 +91,5 @@ function x(e) {
|
|
|
89
91
|
] });
|
|
90
92
|
}
|
|
91
93
|
export {
|
|
92
|
-
|
|
94
|
+
w as default
|
|
93
95
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={name:"PersonalizationContainer",shouldReceiveBuilderProps:{builderBlock:!0,builderContext:!0,builderComponents:!0},noWrap:!0,image:"https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",canHaveChildren:!0,inputs:[{name:"variants",defaultValue:[],behavior:"personalizationVariantList",type:"list",subFields:[{name:"name",type:"text"},{name:"query",friendlyName:"Targeting rules",type:"BuilderQuery",defaultValue:[]},{name:"startDate",type:"date"},{name:"endDate",type:"date"},{name:"blocks",type:"uiBlocks",hideFromUI:!0,defaultValue:[]}]}]};exports.componentInfo=e;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
name: "PersonalizationContainer",
|
|
3
|
+
shouldReceiveBuilderProps: {
|
|
4
|
+
builderBlock: !0,
|
|
5
|
+
builderContext: !0,
|
|
6
|
+
builderComponents: !0
|
|
7
|
+
},
|
|
8
|
+
noWrap: !0,
|
|
9
|
+
image: "https://cdn.builder.io/api/v1/image/assets%2FYJIGb4i01jvw0SRdL5Bt%2F37229ed30d8c41dfb10b8cca1992053a",
|
|
10
|
+
canHaveChildren: !0,
|
|
11
|
+
inputs: [{
|
|
12
|
+
name: "variants",
|
|
13
|
+
defaultValue: [],
|
|
14
|
+
behavior: "personalizationVariantList",
|
|
15
|
+
type: "list",
|
|
16
|
+
subFields: [{
|
|
17
|
+
name: "name",
|
|
18
|
+
type: "text"
|
|
19
|
+
}, {
|
|
20
|
+
name: "query",
|
|
21
|
+
friendlyName: "Targeting rules",
|
|
22
|
+
type: "BuilderQuery",
|
|
23
|
+
defaultValue: []
|
|
24
|
+
}, {
|
|
25
|
+
name: "startDate",
|
|
26
|
+
type: "date"
|
|
27
|
+
}, {
|
|
28
|
+
name: "endDate",
|
|
29
|
+
type: "date"
|
|
30
|
+
}, {
|
|
31
|
+
name: "blocks",
|
|
32
|
+
type: "uiBlocks",
|
|
33
|
+
hideFromUI: !0,
|
|
34
|
+
defaultValue: []
|
|
35
|
+
}]
|
|
36
|
+
}]
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
e as componentInfo
|
|
40
|
+
};
|