@builder.io/sdk-vue 1.0.16 → 1.0.18
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/{block-styles-Ms1wQqgK.cjs → block-styles-dSRlBHsQ.cjs} +1 -1
- package/lib/browser/{block-styles-6TCYHFhw.js → block-styles-fJo9CiqB.js} +1 -1
- package/lib/browser/{block-wrapper-8w1ok_04.cjs → block-wrapper-2Ja2NgLM.cjs} +1 -1
- package/lib/browser/{block-wrapper-TDrSjeun.js → block-wrapper-TYDGuoBJ.js} +3 -3
- package/lib/browser/{component-ref-piWtyJuS.cjs → component-ref-9l-f7ipv.cjs} +1 -1
- package/lib/browser/{component-ref-3TnMqFsh.js → component-ref-tWv3TZak.js} +2 -2
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +1 -5
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/{get-block-properties-swAAqr5Q.js → get-block-properties-NPUl-rAr.js} +1 -1
- package/lib/browser/{get-block-properties-znBNJG9m.cjs → get-block-properties-vtLi2Zhc.cjs} +1 -1
- package/lib/browser/{index-JoCrt5Mj.js → index-GOfZINve.js} +61 -70
- package/lib/browser/{index-ZID1XPKY.cjs → index-zVH2QN_v.cjs} +7 -7
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.js +1 -1
- package/lib/browser/{repeated-block-0mjIhErN.js → repeated-block-3qyPcdcj.js} +2 -2
- package/lib/browser/{repeated-block-Aag6lq7R.cjs → repeated-block-gC_MAUrO.cjs} +1 -1
- package/lib/edge/{block-styles-gsIg0xFp.cjs → block-styles-4NeOtw6K.cjs} +1 -1
- package/lib/{node/block-styles-_FqGGl6q.js → edge/block-styles-dab9n7mL.js} +1 -1
- package/lib/edge/{block-wrapper-CHWNqOBk.js → block-wrapper-xkq_6xxs.js} +3 -3
- package/lib/{node/block-wrapper-7jTb1ywg.cjs → edge/block-wrapper-zQIwXaMm.cjs} +1 -1
- package/lib/{node/component-ref-KGHZuMWD.js → edge/component-ref-VjUBxhFv.js} +2 -2
- package/lib/{node/component-ref-abZqErrZ.cjs → edge/component-ref-Zp4SPs6B.cjs} +1 -1
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +1 -5
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/{get-block-properties-nuJvnYlI.cjs → get-block-properties-F8byoMtM.cjs} +1 -1
- package/lib/{node/get-block-properties-VsjMrc1l.js → edge/get-block-properties-vJFIg9Es.js} +1 -1
- package/lib/edge/{index-jlM1T4Q0.cjs → index-N_wStyKc.cjs} +3 -3
- package/lib/edge/{index-cQ_3UsPy.js → index-v81cmSjf.js} +31 -40
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.js +1 -1
- package/lib/{node/repeated-block-xPkQgRw-.js → edge/repeated-block-CHpFMFiE.js} +2 -2
- package/lib/edge/{repeated-block-CRyZSIkn.cjs → repeated-block-tan85m2W.cjs} +1 -1
- package/lib/node/{block-styles-VEtxLEov.cjs → block-styles-0AA5PHvZ.cjs} +1 -1
- package/lib/{edge/block-styles-wHtoAtTy.js → node/block-styles-5xUN_3hO.js} +1 -1
- package/lib/node/{block-wrapper-L7vUm63u.js → block-wrapper-IM-TSIt6.js} +3 -3
- package/lib/{edge/block-wrapper-y134R03K.cjs → node/block-wrapper-pI7CoC0x.cjs} +1 -1
- package/lib/{edge/component-ref-dz-_8Rct.cjs → node/component-ref-WQ2k_1xe.cjs} +1 -1
- package/lib/{edge/component-ref-Jjo_mmFM.js → node/component-ref-diCRDwdJ.js} +2 -2
- package/lib/node/components/content/components/enable-editor.vue.d.ts +1 -5
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/{get-block-properties-xYp_r32a.cjs → get-block-properties-NyydBcSq.cjs} +1 -1
- package/lib/{edge/get-block-properties-pA4T7Rp3.js → node/get-block-properties-OFlqA_Wo.js} +1 -1
- package/lib/node/{index-vItLZEt6.cjs → index-XtnKsble.cjs} +4 -4
- package/lib/node/{index-t3tNER21.js → index-lfhwfjtP.js} +34 -43
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.js +1 -1
- package/lib/node/{repeated-block-v33kirpq.cjs → repeated-block-CeDPX9gz.cjs} +1 -1
- package/lib/{edge/repeated-block-rzrX2Oxi.js → node/repeated-block-aokfTJm0.js} +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var y=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),t=require("./index-
|
|
1
|
+
var y=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),t=require("./index-zVH2QN_v.cjs"),h=s.defineComponent({name:"block-styles",components:{InlinedStyles:t._sfc_main},props:["block","context"],data(){return{TARGET:t.TARGET}},computed:{canShowBlock(){const e=t.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0});return t.checkIsDefined(e.hide)?!e.hide:t.checkIsDefined(e.show)?e.show:!0},css(){var d;const e=t.getProcessedBlock({block:this.block,localState:this.context.localState,rootState:this.context.rootState,rootSetState:this.context.rootSetState,context:this.context.context,shouldEvaluateBindings:!0}),o=e.responsiveStyles,c=this.context.content,r=t.getSizesForBreakpoints(((d=c==null?void 0:c.meta)==null?void 0:d.breakpoints)||{}),a=o==null?void 0:o.large,i=o==null?void 0:o.medium,n=o==null?void 0:o.small,l=e.id;if(!l)return"";const u=a?t.createCssClass({className:l,styles:a}):"",S=i?t.createCssClass({className:l,styles:i,mediaQuery:t.getMaxWidthQueryForSize("medium",r)}):"",m=n?t.createCssClass({className:l,styles:n,mediaQuery:t.getMaxWidthQueryForSize("small",r)}):"";return[u,S,m].join(" ")}}});function k(e,o,c,r,a,i){const n=s.resolveComponent("inlined-styles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(s.openBlock(),s.createBlock(n,{key:0,id:"builderio-block",styles:e.css},null,8,["styles"])):s.createCommentVNode("",!0)}const p=t._export_sfc(h,[["render",k]]);exports.default=p;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as k, resolveComponent as y, openBlock as x, createBlock as f, createCommentVNode as b } from "vue";
|
|
3
|
-
import { _ as B, T as _, g as d, c as m, a as g, b as r, d as S, e as C } from "./index-
|
|
3
|
+
import { _ as B, T as _, g as d, c as m, a as g, b as r, d as S, e as C } from "./index-GOfZINve.js";
|
|
4
4
|
const v = k({
|
|
5
5
|
name: "block-styles",
|
|
6
6
|
components: { InlinedStyles: B },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-
|
|
1
|
+
var k=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),o=require("./get-block-properties-vtLi2Zhc.cjs"),n=require("./index-zVH2QN_v.cjs"),c=()=>Promise.resolve().then(()=>require("./index-zVH2QN_v.cjs")).then(e=>e.dynamicRenderer).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",e),e}),a=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(c)},props:["Wrapper","block","context"],data(){return{getBlockActions:o.getBlockActions,getBlockProperties:o.getBlockProperties}}});function i(e,l,p,d,m,u){const r=t.resolveComponent("dynamic-renderer");return t.openBlock(),t.createBlock(r,{TagName:e.Wrapper,attributes:e.getBlockProperties({block:e.block,context:e.context}),actionAttributes:e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context,stripPrefix:!0})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["TagName","attributes","actionAttributes"])}const s=n._export_sfc(a,[["render",i]]);exports.default=s;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as o, defineAsyncComponent as r, resolveComponent as n, openBlock as a, createBlock as c, withCtx as i, renderSlot as p } from "vue";
|
|
3
|
-
import { g as s, a as l } from "./get-block-properties-
|
|
4
|
-
import { e as m } from "./index-
|
|
5
|
-
const d = () => import("./index-
|
|
3
|
+
import { g as s, a as l } from "./get-block-properties-NPUl-rAr.js";
|
|
4
|
+
import { e as m } from "./index-GOfZINve.js";
|
|
5
|
+
const d = () => import("./index-GOfZINve.js").then((e) => e.E).then((e) => e.default).catch((e) => {
|
|
6
6
|
throw console.error(
|
|
7
7
|
"Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
|
|
8
8
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),p=require("./index-
|
|
1
|
+
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),p=require("./index-zVH2QN_v.cjs"),a=require("./get-block-properties-vtLi2Zhc.cjs"),u=o.defineComponent({name:"interactive-element",props:["wrapperProps","includeBlockProps","block","context","Wrapper"],data(){return{getBlockActions:a.getBlockActions,getBlockProperties:a.getBlockProperties}}});function d(e,t,c,l,n,s){return o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.Wrapper),o.mergeProps({attributes:e.includeBlockProps?{...e.getBlockProperties({block:e.block,context:e.context}),...e.getBlockActions({block:e.block,rootState:e.context.rootState,rootSetState:e.context.rootSetState,localState:e.context.localState,context:e.context.context})}:{}},e.wrapperProps),{default:o.withCtx(()=>[o.renderSlot(e.$slots,"default")]),_:3},16,["attributes"])}const m=p._export_sfc(u,[["render",d]]),B=({componentOptions:e,builderBlock:t,context:c,componentRef:l,includeBlockProps:n,isInteractive:s,contextValue:i})=>{const r={...e,...n?{attributes:a.getBlockProperties({block:t,context:i})}:{}};return s?{Wrapper:l,block:t,context:c,wrapperProps:e,includeBlockProps:n}:r},f=o.defineComponent({name:"component-ref",components:{Block:p.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?p.wrapComponentRef(m):this.componentRef,getWrapperProps:B}}});function b(e,t,c,l,n,s){const i=o.resolveComponent("block");return e.componentRef?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(e.Wrapper),o.normalizeProps(o.mergeProps({key:0},e.getWrapperProps({componentOptions:e.componentOptions,builderBlock:e.builderBlock,context:e.context,componentRef:e.componentRef,linkComponent:e.linkComponent,includeBlockProps:e.includeBlockProps,isInteractive:e.isInteractive,contextValue:e.context}))),{default:o.withCtx(()=>[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.blockChildren,(r,k)=>(o.openBlock(),o.createBlock(i,{key:r.id,block:r,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):o.createCommentVNode("",!0)}const C=p._export_sfc(f,[["render",b]]);exports.default=C;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as m, openBlock as r, createBlock as l, resolveDynamicComponent as k, mergeProps as d, withCtx as u, renderSlot as P, resolveComponent as B, normalizeProps as g, createElementBlock as $, Fragment as v, renderList as S, createCommentVNode as W } from "vue";
|
|
3
|
-
import { e as f, B as h, w } from "./index-
|
|
4
|
-
import { g as R, a as b } from "./get-block-properties-
|
|
3
|
+
import { e as f, B as h, w } from "./index-GOfZINve.js";
|
|
4
|
+
import { g as R, a as b } from "./get-block-properties-NPUl-rAr.js";
|
|
5
5
|
const I = m({
|
|
6
6
|
name: "interactive-element",
|
|
7
7
|
props: ["wrapperProps", "includeBlockProps", "block", "context", "Wrapper"],
|
|
@@ -17,6 +17,7 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
17
17
|
}>, unknown, {
|
|
18
18
|
ContentWrapper: any;
|
|
19
19
|
httpReqsData: {};
|
|
20
|
+
httpReqsPending: {};
|
|
20
21
|
clicked: boolean;
|
|
21
22
|
builderContext: {
|
|
22
23
|
Builder: {
|
|
@@ -59,11 +60,6 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
59
60
|
processMessage(event: MessageEvent): void;
|
|
60
61
|
evaluateJsCode(): void;
|
|
61
62
|
onClick(event: any): void;
|
|
62
|
-
evalExpression(expression: string): string;
|
|
63
|
-
handleRequest({ url, key }: {
|
|
64
|
-
key: string;
|
|
65
|
-
url: string;
|
|
66
|
-
}): void;
|
|
67
63
|
runHttpRequests(): void;
|
|
68
64
|
emitStateUpdate(): void;
|
|
69
65
|
elementRef_onIniteditingbldr(event: any): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.0.
|
|
1
|
+
export declare const SDK_VERSION = "1.0.18";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var d=require("./style.css");const a=require("./index-
|
|
1
|
+
var d=require("./style.css");const a=require("./index-zVH2QN_v.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>r=>a.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1,enableCache:!0});function l(e){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const s=r[o];let n=c(o);if(e.stripPrefix)switch(a.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=i(s,e)}return t}function u({properties:e}){return e}const p=e=>({href:e.href});function f({block:e,context:t}){var o;const r={...p(e),...e.properties,"builder-id":e.id,style:a.getStyle({block:e,context:t}),[a.getClassPropName()]:[e.id,"builder-block",e.class,(o=e.properties)==null?void 0:o.class].filter(Boolean).join(" ")};return u({properties:r,context:t,block:e})}exports.getBlockActions=l;exports.getBlockProperties=f;
|
|
@@ -2,7 +2,7 @@ var it = Object.defineProperty;
|
|
|
2
2
|
var at = (e, t, n) => t in e ? it(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var _ = (e, t, n) => (at(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import "./style.css";
|
|
5
|
-
import { defineComponent as f, openBlock as u, createElementBlock as h, Fragment as $, createBlock as g, resolveDynamicComponent as j, mergeProps as w, toHandlers as E, withCtx as B, renderSlot as P, resolveComponent as k, createTextVNode as lt, toDisplayString as X, defineAsyncComponent as
|
|
5
|
+
import { defineComponent as f, openBlock as u, createElementBlock as h, Fragment as $, createBlock as g, resolveDynamicComponent as j, mergeProps as w, toHandlers as E, withCtx as B, renderSlot as P, resolveComponent as k, createTextVNode as lt, toDisplayString as X, defineAsyncComponent as z, createVNode as x, renderList as L, createCommentVNode as v, h as Re, createElementVNode as te, normalizeStyle as ne, normalizeClass as Ee, markRaw as ct } from "vue";
|
|
6
6
|
const dt = /* @__PURE__ */ new Set(["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]), ut = (e) => typeof e == "string" && dt.has(e.toLowerCase());
|
|
7
7
|
function O(e = {}, t, n) {
|
|
8
8
|
const o = {};
|
|
@@ -591,33 +591,33 @@ const Lt = ({
|
|
|
591
591
|
},
|
|
592
592
|
block: o
|
|
593
593
|
}));
|
|
594
|
-
}, Dt = () => import("./block-styles-
|
|
594
|
+
}, Dt = () => import("./block-styles-fJo9CiqB.js").then((e) => e.default).catch((e) => {
|
|
595
595
|
throw console.error(
|
|
596
596
|
"Error while attempting to dynamically import component BlockStyles at ./components/block-styles.vue",
|
|
597
597
|
e
|
|
598
598
|
), e;
|
|
599
|
-
}), jt = () => import("./block-wrapper-
|
|
599
|
+
}), jt = () => import("./block-wrapper-TYDGuoBJ.js").then((e) => e.default).catch((e) => {
|
|
600
600
|
throw console.error(
|
|
601
601
|
"Error while attempting to dynamically import component BlockWrapper at ./components/block-wrapper.vue",
|
|
602
602
|
e
|
|
603
603
|
), e;
|
|
604
|
-
}), Ht = () => import("./component-ref-
|
|
604
|
+
}), Ht = () => import("./component-ref-tWv3TZak.js").then((e) => e.default).catch((e) => {
|
|
605
605
|
throw console.error(
|
|
606
606
|
"Error while attempting to dynamically import component ComponentRef at ./components/component-ref/component-ref.vue",
|
|
607
607
|
e
|
|
608
608
|
), e;
|
|
609
|
-
}), Kt = () => import("./repeated-block-
|
|
609
|
+
}), Kt = () => import("./repeated-block-3qyPcdcj.js").then((e) => e.default).catch((e) => {
|
|
610
610
|
throw console.error(
|
|
611
611
|
"Error while attempting to dynamically import component RepeatedBlock at ./components/repeated-block.vue",
|
|
612
612
|
e
|
|
613
613
|
), e;
|
|
614
|
-
}),
|
|
614
|
+
}), qt = f({
|
|
615
615
|
name: "block",
|
|
616
616
|
components: {
|
|
617
|
-
BlockStyles:
|
|
618
|
-
ComponentRef:
|
|
619
|
-
RepeatedBlock:
|
|
620
|
-
BlockWrapper:
|
|
617
|
+
BlockStyles: z(Dt),
|
|
618
|
+
ComponentRef: z(Ht),
|
|
619
|
+
RepeatedBlock: z(Kt),
|
|
620
|
+
BlockWrapper: z(jt)
|
|
621
621
|
},
|
|
622
622
|
props: ["block", "context", "registeredComponents", "linkComponent"],
|
|
623
623
|
mounted() {
|
|
@@ -694,7 +694,7 @@ const Lt = ({
|
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
696
|
});
|
|
697
|
-
function
|
|
697
|
+
function zt(e, t, n, o, s, r) {
|
|
698
698
|
var d;
|
|
699
699
|
const i = k("block-styles"), a = k("component-ref"), l = k("block", !0), c = k("block-wrapper"), m = k("repeated-block");
|
|
700
700
|
return e.canShowBlock ? (u(), h($, { key: 0 }, [
|
|
@@ -752,7 +752,7 @@ function qt(e, t, n, o, s, r) {
|
|
|
752
752
|
], 64))
|
|
753
753
|
], 64)) : v("", !0);
|
|
754
754
|
}
|
|
755
|
-
const ue = /* @__PURE__ */ y(
|
|
755
|
+
const ue = /* @__PURE__ */ y(qt, [["render", zt]]), tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
756
756
|
__proto__: null,
|
|
757
757
|
default: ue
|
|
758
758
|
}, Symbol.toStringTag, { value: "Module" })), Jt = f({
|
|
@@ -1303,7 +1303,7 @@ const bn = /* @__PURE__ */ y(hn, [["render", fn]]), gn = (e) => {
|
|
|
1303
1303
|
}).catch((n) => {
|
|
1304
1304
|
T.error("could not store A/B test variation: ", n);
|
|
1305
1305
|
}), t;
|
|
1306
|
-
},
|
|
1306
|
+
}, qe = ({
|
|
1307
1307
|
item: e,
|
|
1308
1308
|
testGroupId: t
|
|
1309
1309
|
}) => {
|
|
@@ -1332,7 +1332,7 @@ const bn = /* @__PURE__ */ y(hn, [["render", fn]]), gn = (e) => {
|
|
|
1332
1332
|
}) || Ke({
|
|
1333
1333
|
variations: e.variations,
|
|
1334
1334
|
id: e.id
|
|
1335
|
-
}), o =
|
|
1335
|
+
}), o = qe({
|
|
1336
1336
|
item: e,
|
|
1337
1337
|
testGroupId: n
|
|
1338
1338
|
});
|
|
@@ -1351,7 +1351,7 @@ const bn = /* @__PURE__ */ y(hn, [["render", fn]]), gn = (e) => {
|
|
|
1351
1351
|
}) || Ke({
|
|
1352
1352
|
variations: e.variations,
|
|
1353
1353
|
id: e.id
|
|
1354
|
-
}), s =
|
|
1354
|
+
}), s = qe({
|
|
1355
1355
|
item: e,
|
|
1356
1356
|
testGroupId: o
|
|
1357
1357
|
});
|
|
@@ -1896,15 +1896,15 @@ const jn = /* @__PURE__ */ y(Ln, [["render", Dn]]), Hn = {
|
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
1898
1898
|
}
|
|
1899
|
-
}),
|
|
1900
|
-
function
|
|
1899
|
+
}), qn = ["innerHTML"];
|
|
1900
|
+
function zn(e, t, n, o, s, r) {
|
|
1901
1901
|
return u(), h("div", {
|
|
1902
1902
|
ref: "elementRef",
|
|
1903
1903
|
class: Ee("builder-custom-code" + (e.replaceNodes ? " replace-nodes" : "")),
|
|
1904
1904
|
innerHTML: e.code
|
|
1905
|
-
}, null, 10,
|
|
1905
|
+
}, null, 10, qn);
|
|
1906
1906
|
}
|
|
1907
|
-
const Jn = /* @__PURE__ */ y(Kn, [["render",
|
|
1907
|
+
const Jn = /* @__PURE__ */ y(Kn, [["render", zn]]), Gn = {
|
|
1908
1908
|
name: "Embed",
|
|
1909
1909
|
static: !0,
|
|
1910
1910
|
inputs: [{
|
|
@@ -2948,7 +2948,7 @@ const Lo = /* @__PURE__ */ y(xo, [["render", Uo]]), Mo = () => [{
|
|
|
2948
2948
|
}).join('');
|
|
2949
2949
|
styleEl.innerHTML = newStyleStr;
|
|
2950
2950
|
}
|
|
2951
|
-
}`,
|
|
2951
|
+
}`, qo = `function updateVariantVisibility(variantContentId, defaultContentId, isHydrationTarget) {
|
|
2952
2952
|
if (!navigator.cookieEnabled) {
|
|
2953
2953
|
return;
|
|
2954
2954
|
}
|
|
@@ -2982,18 +2982,18 @@ const Lo = /* @__PURE__ */ y(xo, [["render", Uo]]), Mo = () => [{
|
|
|
2982
2982
|
thisScriptEl?.remove();
|
|
2983
2983
|
}
|
|
2984
2984
|
return;
|
|
2985
|
-
}`,
|
|
2985
|
+
}`, ze = "builderIoAbTest", Je = "builderIoRenderContent", G = (e) => Object.values((e == null ? void 0 : e.variations) || {}).map((t) => ({
|
|
2986
2986
|
...t,
|
|
2987
2987
|
testVariationId: t.id,
|
|
2988
2988
|
id: e == null ? void 0 : e.id
|
|
2989
|
-
})),
|
|
2989
|
+
})), zo = ({
|
|
2990
2990
|
canTrack: e,
|
|
2991
2991
|
content: t
|
|
2992
2992
|
}) => !(!(G(t).length > 0) || !e), Jo = (e) => e === "react" || e === "reactNative", Ge = Jo(V), Go = () => `
|
|
2993
|
-
window.${
|
|
2994
|
-
window.${Je} = ${
|
|
2993
|
+
window.${ze} = ${Ko}
|
|
2994
|
+
window.${Je} = ${qo}
|
|
2995
2995
|
`, Yo = (e, t) => `
|
|
2996
|
-
window.${
|
|
2996
|
+
window.${ze}(
|
|
2997
2997
|
"${t}",${JSON.stringify(e)}, ${Ge}
|
|
2998
2998
|
)`, Qo = ({
|
|
2999
2999
|
contentId: e,
|
|
@@ -3070,8 +3070,8 @@ const _o = "v3", Se = "builder.", es = "options.", Xe = (e) => {
|
|
|
3070
3070
|
throw new Error("Missing API key");
|
|
3071
3071
|
if (!["v3"].includes(l))
|
|
3072
3072
|
throw new Error(`Invalid apiVersion: expected 'v3', received '${l}'`);
|
|
3073
|
-
const
|
|
3074
|
-
if (C.searchParams.set("apiKey", r), C.searchParams.set("limit", String(t)), C.searchParams.set("noTraverse", String(
|
|
3073
|
+
const q = t !== 1, C = new URL(`https://cdn.builder.io/api/${l}/content/${s}`);
|
|
3074
|
+
if (C.searchParams.set("apiKey", r), C.searchParams.set("limit", String(t)), C.searchParams.set("noTraverse", String(q)), C.searchParams.set("includeRefs", String(!0)), a && C.searchParams.set("locale", a), i && C.searchParams.set("enrich", String(i)), C.searchParams.set("omit", m || "meta.componentsUsed"), c && C.searchParams.set("fields", c), Number.isFinite(d) && d > -1 && C.searchParams.set("offset", String(Math.floor(d))), typeof W == "boolean" && C.searchParams.set("includeUnpublished", String(W)), p && ve(p) && C.searchParams.set("cacheSeconds", String(p)), S && ve(S) && C.searchParams.set("staleCacheSeconds", String(S)), b) {
|
|
3075
3075
|
const N = Y({
|
|
3076
3076
|
sort: b
|
|
3077
3077
|
});
|
|
@@ -3327,7 +3327,7 @@ function nt(e, t) {
|
|
|
3327
3327
|
const n = new URL(t.origin), o = n.hostname;
|
|
3328
3328
|
return (e || vs).findIndex((s) => s.startsWith("*.") ? o.endsWith(s.slice(1)) : s === o) > -1;
|
|
3329
3329
|
}
|
|
3330
|
-
const Cs = "1.0.
|
|
3330
|
+
const Cs = "1.0.18", Ie = {};
|
|
3331
3331
|
function ws(e, t) {
|
|
3332
3332
|
let n = Ie[e];
|
|
3333
3333
|
if (n || (n = Ie[e] = []), n.push(t), I()) {
|
|
@@ -3496,6 +3496,7 @@ const ot = (e = {}) => {
|
|
|
3496
3496
|
return {
|
|
3497
3497
|
ContentWrapper: this.contentWrapper || "div",
|
|
3498
3498
|
httpReqsData: {},
|
|
3499
|
+
httpReqsPending: {},
|
|
3499
3500
|
clicked: !1,
|
|
3500
3501
|
builderContext: oe
|
|
3501
3502
|
};
|
|
@@ -3692,44 +3693,35 @@ const ot = (e = {}) => {
|
|
|
3692
3693
|
}
|
|
3693
3694
|
this.clicked || (this.clicked = !0);
|
|
3694
3695
|
},
|
|
3695
|
-
evalExpression(e) {
|
|
3696
|
-
return e.replace(
|
|
3697
|
-
/{{([^}]+)}}/g,
|
|
3698
|
-
(t, n) => String(
|
|
3699
|
-
Q({
|
|
3700
|
-
code: n,
|
|
3701
|
-
context: this.context || {},
|
|
3702
|
-
localState: void 0,
|
|
3703
|
-
rootState: this.builderContextSignal.rootState,
|
|
3704
|
-
rootSetState: this.builderContextSignal.rootSetState,
|
|
3705
|
-
enableCache: !0
|
|
3706
|
-
})
|
|
3707
|
-
)
|
|
3708
|
-
);
|
|
3709
|
-
},
|
|
3710
|
-
handleRequest({ url: e, key: t }) {
|
|
3711
|
-
Qe(e).then((n) => n.json()).then((n) => {
|
|
3712
|
-
var s, r;
|
|
3713
|
-
const o = {
|
|
3714
|
-
...this.builderContextSignal.rootState,
|
|
3715
|
-
[t]: n
|
|
3716
|
-
};
|
|
3717
|
-
(r = (s = this.builderContextSignal).rootSetState) == null || r.call(s, o), this.httpReqsData[t] = !0;
|
|
3718
|
-
}).catch((n) => {
|
|
3719
|
-
console.error("error fetching dynamic data", e, n);
|
|
3720
|
-
});
|
|
3721
|
-
},
|
|
3722
3696
|
runHttpRequests() {
|
|
3723
3697
|
var t, n;
|
|
3724
3698
|
const e = ((n = (t = this.builderContextSignal.content) == null ? void 0 : t.data) == null ? void 0 : n.httpRequests) ?? {};
|
|
3725
3699
|
Object.entries(e).forEach(([o, s]) => {
|
|
3726
|
-
if (s
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3700
|
+
if (!s || this.httpReqsPending[o] || this.httpReqsData[o] && !R())
|
|
3701
|
+
return;
|
|
3702
|
+
this.httpReqsPending[o] = !0;
|
|
3703
|
+
const r = s.replace(
|
|
3704
|
+
/{{([^}]+)}}/g,
|
|
3705
|
+
(i, a) => String(
|
|
3706
|
+
Q({
|
|
3707
|
+
code: a,
|
|
3708
|
+
context: this.context || {},
|
|
3709
|
+
localState: void 0,
|
|
3710
|
+
rootState: this.builderContextSignal.rootState,
|
|
3711
|
+
rootSetState: this.builderContextSignal.rootSetState,
|
|
3712
|
+
enableCache: !0
|
|
3713
|
+
})
|
|
3714
|
+
)
|
|
3715
|
+
);
|
|
3716
|
+
Qe(r).then((i) => i.json()).then((i) => {
|
|
3717
|
+
this.mergeNewRootState({
|
|
3718
|
+
[o]: i
|
|
3719
|
+
}), this.httpReqsData[o] = !0;
|
|
3720
|
+
}).catch((i) => {
|
|
3721
|
+
console.error("error fetching dynamic data", s, i);
|
|
3722
|
+
}).finally(() => {
|
|
3723
|
+
this.httpReqsPending[o] = !1;
|
|
3724
|
+
});
|
|
3733
3725
|
});
|
|
3734
3726
|
},
|
|
3735
3727
|
emitStateUpdate() {
|
|
@@ -4027,7 +4019,7 @@ function Ms(e, t, n, o, s, r) {
|
|
|
4027
4019
|
trustedHosts: e.trustedHosts
|
|
4028
4020
|
}, {}), {
|
|
4029
4021
|
default: B(() => {
|
|
4030
|
-
var m, d, p, S, b, W,
|
|
4022
|
+
var m, d, p, S, b, W, q;
|
|
4031
4023
|
return [
|
|
4032
4024
|
e.isSsrAbTest ? (u(), g(i, {
|
|
4033
4025
|
key: 0,
|
|
@@ -4042,7 +4034,7 @@ function Ms(e, t, n, o, s, r) {
|
|
|
4042
4034
|
customFonts: (b = (S = e.builderContextSignal.content) == null ? void 0 : S.data) == null ? void 0 : b.customFonts
|
|
4043
4035
|
}, null, 8, ["isNestedRender", "contentId", "cssCode", "customFonts"])) : v("", !0),
|
|
4044
4036
|
x(l, {
|
|
4045
|
-
blocks: (
|
|
4037
|
+
blocks: (q = (W = e.builderContextSignal.content) == null ? void 0 : W.data) == null ? void 0 : q.blocks,
|
|
4046
4038
|
context: e.builderContextSignal,
|
|
4047
4039
|
registeredComponents: e.registeredComponents,
|
|
4048
4040
|
linkComponent: e.linkComponent
|
|
@@ -4080,7 +4072,7 @@ const Ds = /* @__PURE__ */ y(Ls, [["render", Ms]]), js = f({
|
|
|
4080
4072
|
],
|
|
4081
4073
|
data() {
|
|
4082
4074
|
return {
|
|
4083
|
-
shouldRenderVariants:
|
|
4075
|
+
shouldRenderVariants: zo({
|
|
4084
4076
|
canTrack: H(this.canTrack),
|
|
4085
4077
|
content: this.content
|
|
4086
4078
|
}),
|
|
@@ -4090,7 +4082,6 @@ const Ds = /* @__PURE__ */ y(Ls, [["render", Ms]]), js = f({
|
|
|
4090
4082
|
};
|
|
4091
4083
|
},
|
|
4092
4084
|
mounted() {
|
|
4093
|
-
this.shouldRenderVariants = !1;
|
|
4094
4085
|
},
|
|
4095
4086
|
computed: {
|
|
4096
4087
|
updateCookieAndStylesScriptStr() {
|
|
@@ -4183,7 +4174,7 @@ function Hs(e, t, n, o, s, r) {
|
|
|
4183
4174
|
}), null, 16, ["isNestedRender", "content", "model", "data", "context", "apiKey", "apiVersion", "customComponents", "linkComponent", "canTrack", "locale", "enrich", "isSsrAbTest", "blocksWrapper", "blocksWrapperProps", "contentWrapper", "contentWrapperProps", "trustedHosts"])
|
|
4184
4175
|
], 64);
|
|
4185
4176
|
}
|
|
4186
|
-
const Ks = /* @__PURE__ */ y(js, [["render", Hs]]),
|
|
4177
|
+
const Ks = /* @__PURE__ */ y(js, [["render", Hs]]), qs = async ({
|
|
4187
4178
|
builderContextValue: e,
|
|
4188
4179
|
symbol: t
|
|
4189
4180
|
}) => {
|
|
@@ -4201,7 +4192,7 @@ const Ks = /* @__PURE__ */ y(js, [["render", Hs]]), zs = async ({
|
|
|
4201
4192
|
}).catch((n) => {
|
|
4202
4193
|
T.error("Could not fetch symbol content: ", n);
|
|
4203
4194
|
});
|
|
4204
|
-
},
|
|
4195
|
+
}, zs = f({
|
|
4205
4196
|
name: "builder-symbol",
|
|
4206
4197
|
components: { ContentVariants: Ks },
|
|
4207
4198
|
props: [
|
|
@@ -4246,7 +4237,7 @@ const Ks = /* @__PURE__ */ y(js, [["render", Hs]]), zs = async ({
|
|
|
4246
4237
|
},
|
|
4247
4238
|
methods: {
|
|
4248
4239
|
setContent() {
|
|
4249
|
-
this.contentToUse ||
|
|
4240
|
+
this.contentToUse || qs({
|
|
4250
4241
|
symbol: this.symbol,
|
|
4251
4242
|
builderContextValue: this.builderContext
|
|
4252
4243
|
}).then((e) => {
|
|
@@ -4281,7 +4272,7 @@ function Js(e, t, n, o, s, r) {
|
|
|
4281
4272
|
}, null, 8, ["apiVersion", "apiKey", "context", "customComponents", "data", "model", "content", "linkComponent"])
|
|
4282
4273
|
], 16);
|
|
4283
4274
|
}
|
|
4284
|
-
const Gs = /* @__PURE__ */ y(
|
|
4275
|
+
const Gs = /* @__PURE__ */ y(zs, [["render", Js]]), Te = {};
|
|
4285
4276
|
function rr(e) {
|
|
4286
4277
|
if (I()) {
|
|
4287
4278
|
Object.assign(Te, e);
|