@builder.io/sdk-vue 5.0.1 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/{awaiter-ltuXxa1H.js → awaiter-NbFI2CU_.js} +1 -1
- package/lib/browser/{awaiter-EvoLkoA-.cjs → awaiter-YRNWppS-.cjs} +1 -1
- package/lib/browser/block-wrapper-7ZGQAl5W.cjs +1 -0
- package/lib/browser/block-wrapper-_4lEInw9.js +51 -0
- package/lib/browser/blocks/form/form/form.vue.d.ts +3 -3
- package/lib/browser/blocks/form/input/input.vue.d.ts +3 -3
- package/lib/browser/component-ref-A2Q0eDCA.cjs +1 -0
- package/lib/browser/component-ref-S2rn5_QV.js +185 -0
- package/lib/browser/components/content/components/enable-editor.vue.d.ts +9 -9
- package/lib/browser/components/content/components/styles.vue.d.ts +3 -3
- package/lib/browser/components/content/content.vue.d.ts +9 -9
- package/lib/browser/components/content-variants/content-variants.vue.d.ts +9 -9
- package/lib/browser/components/inlined-script.vue.d.ts +3 -3
- package/lib/browser/components/inlined-styles.vue.d.ts +3 -3
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/functions/evaluate/evaluate.d.ts +1 -1
- package/lib/browser/functions/evaluate/helpers.d.ts +9 -1
- package/lib/browser/functions/get-block-actions-handler.d.ts +2 -0
- package/lib/browser/functions/get-block-actions.d.ts +2 -0
- package/lib/browser/get-block-properties-PbwnoRP4.cjs +1 -0
- package/lib/{edge/get-block-properties-oCaILy-t.js → browser/get-block-properties-Y9GlYFTe.js} +9 -7
- package/lib/browser/{index-ePDYAZ6K.js → index-HPQgrUEC.js} +427 -411
- package/lib/browser/index-OpNLmfCu.cjs +334 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +1 -1
- package/lib/browser/{live-edit-chiC8ikS.js → live-edit-8F1riCsR.js} +1 -1
- package/lib/browser/{live-edit-DW8AQ7OF.cjs → live-edit-tMAUVH2B.cjs} +1 -1
- package/lib/browser/{repeated-block-xZMeXElb.js → repeated-block-C21nYjNB.js} +2 -2
- package/lib/browser/{repeated-block-2KQQbmA4.cjs → repeated-block-YesIuQQG.cjs} +1 -1
- package/lib/browser/{style-wrapper-WGd4Chxy.js → style-wrapper-6gB537kz.js} +1 -1
- package/lib/browser/{style-wrapper-qFjrPlxq.cjs → style-wrapper-toT_b35_.cjs} +1 -1
- package/lib/browser/style.css +1 -1
- package/lib/edge/{awaiter-oif9kJRe.cjs → awaiter-GbCbMdxs.cjs} +1 -1
- package/lib/edge/{awaiter-C9m9dHFI.js → awaiter-Z1Aho-Tf.js} +1 -1
- package/lib/edge/block-wrapper-SGs68mW-.cjs +1 -0
- package/lib/edge/block-wrapper-sP32aCJj.js +50 -0
- package/lib/edge/blocks/form/form/form.vue.d.ts +3 -3
- package/lib/edge/blocks/form/input/input.vue.d.ts +3 -3
- package/lib/edge/component-ref-1HNLmjNP.cjs +1 -0
- package/lib/edge/component-ref-v3RKtvga.js +184 -0
- package/lib/edge/components/content/components/enable-editor.vue.d.ts +9 -9
- package/lib/edge/components/content/components/styles.vue.d.ts +3 -3
- package/lib/edge/components/content/content.vue.d.ts +9 -9
- package/lib/edge/components/content-variants/content-variants.vue.d.ts +9 -9
- package/lib/edge/components/inlined-script.vue.d.ts +3 -3
- package/lib/edge/components/inlined-styles.vue.d.ts +3 -3
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/functions/evaluate/evaluate.d.ts +1 -1
- package/lib/edge/functions/evaluate/helpers.d.ts +9 -1
- package/lib/edge/functions/get-block-actions-handler.d.ts +2 -0
- package/lib/edge/functions/get-block-actions.d.ts +2 -0
- package/lib/{browser/get-block-properties-iI7YmUch.js → edge/get-block-properties-O8BCJSao.js} +17 -17
- package/lib/edge/get-block-properties-ju6Fj919.cjs +1 -0
- package/lib/edge/{index-HFOGs4Hj.cjs → index-FjhQsct4.cjs} +16 -16
- package/lib/edge/{index-1frz5lkv.js → index-x6Hu33ce.js} +784 -768
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +1 -1
- package/lib/{node/live-edit-aXbmFIfP.cjs → edge/live-edit-VsbDXDK9.cjs} +1 -1
- package/lib/edge/{live-edit-zALqI-9F.js → live-edit-v7-_17wH.js} +1 -1
- package/lib/{node/repeated-block-mSU_Cjr_.js → edge/repeated-block-gmtzy89x.js} +2 -2
- package/lib/edge/{repeated-block-Ee9Tm3uw.cjs → repeated-block-ic1FaN4o.cjs} +1 -1
- package/lib/edge/{style-wrapper-c3dw8riH.js → style-wrapper-DFS-znzq.js} +1 -1
- package/lib/edge/{style-wrapper-4MZw2Z4C.cjs → style-wrapper-Xaty5j6j.cjs} +1 -1
- package/lib/edge/style.css +1 -1
- package/lib/node/{awaiter-zW9jRrYG.cjs → awaiter-7GQ8utUb.cjs} +1 -1
- package/lib/node/{awaiter-excNZ5hj.js → awaiter-MB_eWqp9.js} +1 -1
- package/lib/node/block-wrapper--M33E0VG.cjs +1 -0
- package/lib/node/block-wrapper-P5y87ZAx.js +50 -0
- package/lib/node/blocks/form/form/form.vue.d.ts +3 -3
- package/lib/node/blocks/form/input/input.vue.d.ts +3 -3
- package/lib/node/component-ref-KETj2JRL.cjs +1 -0
- package/lib/node/component-ref-RUGITshe.js +185 -0
- package/lib/node/components/content/components/enable-editor.vue.d.ts +9 -9
- package/lib/node/components/content/components/styles.vue.d.ts +3 -3
- package/lib/node/components/content/content.vue.d.ts +9 -9
- package/lib/node/components/content-variants/content-variants.vue.d.ts +9 -9
- package/lib/node/components/inlined-script.vue.d.ts +3 -3
- package/lib/node/components/inlined-styles.vue.d.ts +3 -3
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/functions/evaluate/evaluate.d.ts +1 -1
- package/lib/node/functions/evaluate/helpers.d.ts +9 -1
- package/lib/node/functions/get-block-actions-handler.d.ts +2 -0
- package/lib/node/functions/get-block-actions.d.ts +2 -0
- package/lib/node/{get-block-properties-Mb4zG5TJ.js → get-block-properties-Ec9Kj4p7.js} +18 -17
- package/lib/node/get-block-properties-Z9QEqFjm.cjs +1 -0
- package/lib/node/{index-eR1W_62s.js → index-TvY2gce_.js} +696 -894
- package/lib/node/{index-tfY1dYSa.cjs → index-WS6d-d4F.cjs} +30 -30
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +11 -11
- package/lib/node/init.cjs +1 -1
- package/lib/node/init.mjs +1 -1
- package/lib/node/{live-edit-o65mqvJD.js → live-edit-61Hzovyk.js} +1 -1
- package/lib/{edge/live-edit-Iys2OcAx.cjs → node/live-edit-Jp1PzpUr.cjs} +1 -1
- package/lib/node/{repeated-block-37s5osdr.cjs → repeated-block-9JRCsGOV.cjs} +1 -1
- package/lib/{edge/repeated-block-7Kc2eLpq.js → node/repeated-block-Nh0O2sxg.js} +2 -2
- package/lib/node/should-force-browser-runtime-in-node-ghF-DZhu.js +503 -0
- package/lib/node/should-force-browser-runtime-in-node-xByMtVKh.cjs +48 -0
- package/lib/node/{style-wrapper-3JIrc4dO.cjs → style-wrapper-rXB6kp1P.cjs} +1 -1
- package/lib/node/{style-wrapper-5KYeK0ik.js → style-wrapper-y344qWFp.js} +10 -10
- package/lib/node/style.css +1 -1
- package/package.json +1 -1
- package/lib/browser/block-wrapper-7_N4V3w6.js +0 -44
- package/lib/browser/block-wrapper-RtyEgmfY.cjs +0 -1
- package/lib/browser/component-ref-TD-MkgTS.cjs +0 -1
- package/lib/browser/component-ref-br7lvgH4.js +0 -178
- package/lib/browser/get-block-properties-p2HBwDQ1.cjs +0 -1
- package/lib/browser/index-s0tL4FL7.cjs +0 -334
- package/lib/edge/block-wrapper-WxMXMCAh.js +0 -43
- package/lib/edge/block-wrapper-cR5tGys5.cjs +0 -1
- package/lib/edge/component-ref-m5Kyhqf9.cjs +0 -1
- package/lib/edge/component-ref-v_a0xkUh.js +0 -177
- package/lib/edge/get-block-properties-8MeUldw3.cjs +0 -1
- package/lib/node/block-wrapper-bkv_QgId.js +0 -43
- package/lib/node/block-wrapper-ywFGBqs7.cjs +0 -1
- package/lib/node/component-ref-RVkeY7E2.cjs +0 -1
- package/lib/node/component-ref-nfCUEPmF.js +0 -178
- package/lib/node/get-block-properties-o8p6cp5S.cjs +0 -1
- package/lib/node/should-force-browser-runtime-in-node-1vTKsoso.cjs +0 -48
- package/lib/node/should-force-browser-runtime-in-node-ikxWrCvn.js +0 -277
|
@@ -1 +1 @@
|
|
|
1
|
-
var p=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-
|
|
1
|
+
var p=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-OpNLmfCu.cjs"),n=e.defineComponent({name:"awaiter",props:[],mounted(){}});function o(t,a,i,c,u,d){return e.renderSlot(t.$slots,"default")}const s=r._export_sfc(n,[["render",o]]);exports.default=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var b=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./get-block-properties-PbwnoRP4.cjs"),a=require("./index-OpNLmfCu.cjs"),i=()=>Promise.resolve().then(()=>require("./index-OpNLmfCu.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}),s=t.defineComponent({name:"block-wrapper",components:{DynamicRenderer:t.defineAsyncComponent(i)},props:["Wrapper","block","context"],data(){return{getBlockActions:r.getBlockActions,getBlockProperties:r.getBlockProperties}}});function l(e,d,m,u,k,y){var o,n;const c=t.resolveComponent("DynamicRenderer");return t.openBlock(),t.createBlock(c,{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,trackingContext:{apiKey:e.context.apiKey,canTrack:e.context.canTrack??!0,contentId:(o=e.context.content)==null?void 0:o.id,variationId:(n=e.context.content)==null?void 0:n.testVariationId}})},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["TagName","attributes","actionAttributes"])}const p=a._export_sfc(s,[["render",l]]);exports.default=p;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { defineComponent as r, defineAsyncComponent as a, resolveComponent as c, openBlock as i, createBlock as p, withCtx as s, renderSlot as l } from "vue";
|
|
3
|
+
import { g as m, a as d } from "./get-block-properties-Y9GlYFTe.js";
|
|
4
|
+
import { _ as k } from "./index-HPQgrUEC.js";
|
|
5
|
+
const u = () => import("./index-HPQgrUEC.js").then((t) => t.J).then((t) => t.default).catch((t) => {
|
|
6
|
+
throw console.error(
|
|
7
|
+
"Error while attempting to dynamically import component DynamicRenderer at ../../dynamic-renderer/dynamic-renderer.vue",
|
|
8
|
+
t
|
|
9
|
+
), t;
|
|
10
|
+
}), f = r({
|
|
11
|
+
name: "block-wrapper",
|
|
12
|
+
components: { DynamicRenderer: a(u) },
|
|
13
|
+
props: ["Wrapper", "block", "context"],
|
|
14
|
+
data() {
|
|
15
|
+
return { getBlockActions: m, getBlockProperties: d };
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
function y(t, b, g, S, h, B) {
|
|
19
|
+
var e, o;
|
|
20
|
+
const n = c("DynamicRenderer");
|
|
21
|
+
return i(), p(n, {
|
|
22
|
+
TagName: t.Wrapper,
|
|
23
|
+
attributes: t.getBlockProperties({
|
|
24
|
+
block: t.block,
|
|
25
|
+
context: t.context
|
|
26
|
+
}),
|
|
27
|
+
actionAttributes: t.getBlockActions({
|
|
28
|
+
block: t.block,
|
|
29
|
+
rootState: t.context.rootState,
|
|
30
|
+
rootSetState: t.context.rootSetState,
|
|
31
|
+
localState: t.context.localState,
|
|
32
|
+
context: t.context.context,
|
|
33
|
+
stripPrefix: !0,
|
|
34
|
+
trackingContext: {
|
|
35
|
+
apiKey: t.context.apiKey,
|
|
36
|
+
canTrack: t.context.canTrack ?? !0,
|
|
37
|
+
contentId: (e = t.context.content) == null ? void 0 : e.id,
|
|
38
|
+
variationId: (o = t.context.content) == null ? void 0 : o.testVariationId
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
}, {
|
|
42
|
+
default: s(() => [
|
|
43
|
+
l(t.$slots, "default")
|
|
44
|
+
]),
|
|
45
|
+
_: 3
|
|
46
|
+
}, 8, ["TagName", "attributes", "actionAttributes"]);
|
|
47
|
+
}
|
|
48
|
+
const $ = /* @__PURE__ */ k(f, [["render", y]]);
|
|
49
|
+
export {
|
|
50
|
+
$ as default
|
|
51
|
+
};
|
|
@@ -34,9 +34,9 @@ export type FormState = "unsubmitted" | "sending" | "success" | "error";
|
|
|
34
34
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
35
35
|
name?: any;
|
|
36
36
|
builderContext?: any;
|
|
37
|
+
method?: any;
|
|
37
38
|
attributes?: any;
|
|
38
39
|
action?: any;
|
|
39
|
-
method?: any;
|
|
40
40
|
previewState?: any;
|
|
41
41
|
sendWithJs?: any;
|
|
42
42
|
sendSubmissionsTo?: any;
|
|
@@ -63,9 +63,9 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
63
63
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
64
64
|
name?: any;
|
|
65
65
|
builderContext?: any;
|
|
66
|
+
method?: any;
|
|
66
67
|
attributes?: any;
|
|
67
68
|
action?: any;
|
|
68
|
-
method?: any;
|
|
69
69
|
previewState?: any;
|
|
70
70
|
sendWithJs?: any;
|
|
71
71
|
sendSubmissionsTo?: any;
|
|
@@ -82,9 +82,9 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
82
82
|
}>>>, {
|
|
83
83
|
readonly name?: any;
|
|
84
84
|
readonly builderContext?: any;
|
|
85
|
+
readonly method?: any;
|
|
85
86
|
readonly attributes?: any;
|
|
86
87
|
readonly action?: any;
|
|
87
|
-
readonly method?: any;
|
|
88
88
|
readonly previewState?: any;
|
|
89
89
|
readonly sendWithJs?: any;
|
|
90
90
|
readonly sendSubmissionsTo?: any;
|
|
@@ -15,8 +15,8 @@ export interface FormInputProps {
|
|
|
15
15
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
16
16
|
name?: any;
|
|
17
17
|
value?: any;
|
|
18
|
-
attributes?: any;
|
|
19
18
|
type?: any;
|
|
19
|
+
attributes?: any;
|
|
20
20
|
defaultValue?: any;
|
|
21
21
|
placeholder?: any;
|
|
22
22
|
required?: any;
|
|
@@ -26,16 +26,16 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
26
26
|
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
27
27
|
name?: any;
|
|
28
28
|
value?: any;
|
|
29
|
-
attributes?: any;
|
|
30
29
|
type?: any;
|
|
30
|
+
attributes?: any;
|
|
31
31
|
defaultValue?: any;
|
|
32
32
|
placeholder?: any;
|
|
33
33
|
required?: any;
|
|
34
34
|
}>>>, {
|
|
35
35
|
readonly name?: any;
|
|
36
36
|
readonly value?: any;
|
|
37
|
-
readonly attributes?: any;
|
|
38
37
|
readonly type?: any;
|
|
38
|
+
readonly attributes?: any;
|
|
39
39
|
readonly defaultValue?: any;
|
|
40
40
|
readonly placeholder?: any;
|
|
41
41
|
readonly required?: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var g=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),r=require("./index-OpNLmfCu.cjs"),l=require("./get-block-properties-PbwnoRP4.cjs"),u=()=>Promise.resolve().then(()=>require("./awaiter-YRNWppS-.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",e),e}),k=()=>Promise.resolve().then(()=>require("./live-edit-tMAUVH2B.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",e),e}),h=t.defineComponent({name:"interactive-element",components:{LiveEdit:t.defineAsyncComponent(k),Awaiter:t.defineAsyncComponent(u)},props:["wrapperProps","block","includeBlockProps","context","Wrapper"],data(){return{forceRenderCount:0,TARGET:r.TARGET,isEditing:r.isEditing}},watch:{onUpdateHook0:{handler(){},immediate:!0}},computed:{attributes(){var e,o;return this.includeBlockProps?{...l.getBlockProperties({block:this.block,context:this.context}),...l.getBlockActions({block:this.block,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context,trackingContext:{apiKey:this.context.apiKey,canTrack:this.context.canTrack??!0,contentId:(e=this.context.content)==null?void 0:e.id,variationId:(o=this.context.content)==null?void 0:o.testVariationId}})}:{}},targetWrapperProps(){return{...this.wrapperProps,...Object.keys(this.attributes).length>0?{attributes:this.attributes}:{}}},onUpdateHook0(){var e,o;return{0:this.wrapperProps,1:(o=(e=this.block)==null?void 0:e.component)==null?void 0:o.options}}}});function f(e,o,a,s,p,c){const i=t.resolveComponent("Awaiter"),n=t.resolveComponent("LiveEdit");return e.Wrapper.load?(t.openBlock(),t.createBlock(i,{key:0,load:e.Wrapper.load,fallback:e.Wrapper.fallback,props:e.wrapperProps,attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["load","fallback","props","attributes"])):(t.openBlock(),t.createElementBlock(t.Fragment,{key:1},[e.TARGET==="rsc"&&e.isEditing()?(t.openBlock(),t.createBlock(n,{key:0,Wrapper:e.Wrapper,id:e.block.id||"",attributes:e.attributes},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["Wrapper","id","attributes"])):(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:1,attributes:e.attributes},e.targetWrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"]))],64))}const d=r._export_sfc(h,[["render",f]]),b=({componentOptions:e,builderBlock:o,context:a,componentRef:s,includeBlockProps:p,isInteractive:c,contextValue:i})=>{const n={...e,...p?{attributes:l.getBlockProperties({block:o,context:i})}:{}};return c?{Wrapper:s,block:o,context:a,wrapperProps:e,includeBlockProps:p}:n},C=t.defineComponent({name:"component-ref",components:{Block:r.Block,InteractiveElement:d},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{shouldUpdate:!1,Wrapper:this.isInteractive?r.wrapComponentRef(d):this.componentRef,getWrapperProps:b}}});function B(e,o,a,s,p,c){const i=t.resolveComponent("Block");return e.componentRef?(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.Wrapper),t.normalizeProps(t.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:t.withCtx(()=>[e.componentRef?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(e.blockChildren,(n,m)=>(t.openBlock(),t.createBlock(i,{key:n.id,block:n,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128)):t.createCommentVNode("",!0)]),_:1},16)):t.createCommentVNode("",!0)}const v=r._export_sfc(C,[["render",B]]);exports.default=v;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import "./style.css";
|
|
2
|
+
import { defineComponent as h, defineAsyncComponent as u, resolveComponent as d, openBlock as o, createBlock as a, withCtx as p, renderSlot as m, createElementBlock as b, Fragment as C, resolveDynamicComponent as w, mergeProps as g, normalizeProps as W, renderList as B, createCommentVNode as k } from "vue";
|
|
3
|
+
import { T as E, i as $, _ as v, B as R, w as A } from "./index-HPQgrUEC.js";
|
|
4
|
+
import { a as P, g as S } from "./get-block-properties-Y9GlYFTe.js";
|
|
5
|
+
const I = () => import("./awaiter-NbFI2CU_.js").then((t) => t.default).catch((t) => {
|
|
6
|
+
throw console.error(
|
|
7
|
+
"Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",
|
|
8
|
+
t
|
|
9
|
+
), t;
|
|
10
|
+
}), T = () => import("./live-edit-8F1riCsR.js").then((t) => t.default).catch((t) => {
|
|
11
|
+
throw console.error(
|
|
12
|
+
"Error while attempting to dynamically import component LiveEdit at ../../live-edit.vue",
|
|
13
|
+
t
|
|
14
|
+
), t;
|
|
15
|
+
}), L = h({
|
|
16
|
+
name: "interactive-element",
|
|
17
|
+
components: {
|
|
18
|
+
LiveEdit: u(T),
|
|
19
|
+
Awaiter: u(I)
|
|
20
|
+
},
|
|
21
|
+
props: ["wrapperProps", "block", "includeBlockProps", "context", "Wrapper"],
|
|
22
|
+
data() {
|
|
23
|
+
return { forceRenderCount: 0, TARGET: E, isEditing: $ };
|
|
24
|
+
},
|
|
25
|
+
watch: {
|
|
26
|
+
onUpdateHook0: { handler() {
|
|
27
|
+
}, immediate: !0 }
|
|
28
|
+
},
|
|
29
|
+
computed: {
|
|
30
|
+
attributes() {
|
|
31
|
+
var t, e;
|
|
32
|
+
return this.includeBlockProps ? {
|
|
33
|
+
...P({
|
|
34
|
+
block: this.block,
|
|
35
|
+
context: this.context
|
|
36
|
+
}),
|
|
37
|
+
...S({
|
|
38
|
+
block: this.block,
|
|
39
|
+
rootState: this.context.rootState,
|
|
40
|
+
rootSetState: this.context.rootSetState,
|
|
41
|
+
localState: this.context.localState,
|
|
42
|
+
context: this.context.context,
|
|
43
|
+
trackingContext: {
|
|
44
|
+
apiKey: this.context.apiKey,
|
|
45
|
+
canTrack: this.context.canTrack ?? !0,
|
|
46
|
+
contentId: (t = this.context.content) == null ? void 0 : t.id,
|
|
47
|
+
variationId: (e = this.context.content) == null ? void 0 : e.testVariationId
|
|
48
|
+
}
|
|
49
|
+
})
|
|
50
|
+
} : {};
|
|
51
|
+
},
|
|
52
|
+
targetWrapperProps() {
|
|
53
|
+
return {
|
|
54
|
+
...this.wrapperProps,
|
|
55
|
+
...Object.keys(this.attributes).length > 0 ? {
|
|
56
|
+
attributes: this.attributes
|
|
57
|
+
} : {}
|
|
58
|
+
};
|
|
59
|
+
},
|
|
60
|
+
onUpdateHook0() {
|
|
61
|
+
var t, e;
|
|
62
|
+
return {
|
|
63
|
+
0: this.wrapperProps,
|
|
64
|
+
1: (e = (t = this.block) == null ? void 0 : t.component) == null ? void 0 : e.options
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
function O(t, e, s, c, i, l) {
|
|
70
|
+
const r = d("Awaiter"), n = d("LiveEdit");
|
|
71
|
+
return t.Wrapper.load ? (o(), a(r, {
|
|
72
|
+
key: 0,
|
|
73
|
+
load: t.Wrapper.load,
|
|
74
|
+
fallback: t.Wrapper.fallback,
|
|
75
|
+
props: t.wrapperProps,
|
|
76
|
+
attributes: t.attributes
|
|
77
|
+
}, {
|
|
78
|
+
default: p(() => [
|
|
79
|
+
m(t.$slots, "default")
|
|
80
|
+
]),
|
|
81
|
+
_: 3
|
|
82
|
+
}, 8, ["load", "fallback", "props", "attributes"])) : (o(), b(C, { key: 1 }, [
|
|
83
|
+
t.TARGET === "rsc" && t.isEditing() ? (o(), a(n, {
|
|
84
|
+
key: 0,
|
|
85
|
+
Wrapper: t.Wrapper,
|
|
86
|
+
id: t.block.id || "",
|
|
87
|
+
attributes: t.attributes
|
|
88
|
+
}, {
|
|
89
|
+
default: p(() => [
|
|
90
|
+
m(t.$slots, "default")
|
|
91
|
+
]),
|
|
92
|
+
_: 3
|
|
93
|
+
}, 8, ["Wrapper", "id", "attributes"])) : (o(), a(w(t.Wrapper), g({
|
|
94
|
+
key: 1,
|
|
95
|
+
attributes: t.attributes
|
|
96
|
+
}, t.targetWrapperProps), {
|
|
97
|
+
default: p(() => [
|
|
98
|
+
m(t.$slots, "default")
|
|
99
|
+
]),
|
|
100
|
+
_: 3
|
|
101
|
+
}, 16, ["attributes"]))
|
|
102
|
+
], 64));
|
|
103
|
+
}
|
|
104
|
+
const f = /* @__PURE__ */ v(L, [["render", O]]), U = ({
|
|
105
|
+
componentOptions: t,
|
|
106
|
+
builderBlock: e,
|
|
107
|
+
context: s,
|
|
108
|
+
componentRef: c,
|
|
109
|
+
includeBlockProps: i,
|
|
110
|
+
isInteractive: l,
|
|
111
|
+
contextValue: r
|
|
112
|
+
}) => {
|
|
113
|
+
const n = {
|
|
114
|
+
...t,
|
|
115
|
+
/**
|
|
116
|
+
* If `noWrap` is set to `true`, then the block's props/attributes are provided to the
|
|
117
|
+
* component itself directly. Otherwise, they are provided to the wrapper element.
|
|
118
|
+
*/
|
|
119
|
+
...i ? {
|
|
120
|
+
attributes: P({
|
|
121
|
+
block: e,
|
|
122
|
+
context: r
|
|
123
|
+
})
|
|
124
|
+
} : {}
|
|
125
|
+
};
|
|
126
|
+
return l ? {
|
|
127
|
+
Wrapper: c,
|
|
128
|
+
block: e,
|
|
129
|
+
context: s,
|
|
130
|
+
wrapperProps: t,
|
|
131
|
+
includeBlockProps: i
|
|
132
|
+
} : n;
|
|
133
|
+
}, V = h({
|
|
134
|
+
name: "component-ref",
|
|
135
|
+
components: { Block: R, InteractiveElement: f },
|
|
136
|
+
props: [
|
|
137
|
+
"isInteractive",
|
|
138
|
+
"componentRef",
|
|
139
|
+
"componentOptions",
|
|
140
|
+
"builderBlock",
|
|
141
|
+
"context",
|
|
142
|
+
"linkComponent",
|
|
143
|
+
"includeBlockProps",
|
|
144
|
+
"blockChildren",
|
|
145
|
+
"registeredComponents"
|
|
146
|
+
],
|
|
147
|
+
data() {
|
|
148
|
+
return {
|
|
149
|
+
shouldUpdate: !1,
|
|
150
|
+
Wrapper: this.isInteractive ? A(f) : this.componentRef,
|
|
151
|
+
getWrapperProps: U
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
function G(t, e, s, c, i, l) {
|
|
156
|
+
const r = d("Block");
|
|
157
|
+
return t.componentRef ? (o(), a(w(t.Wrapper), W(g(
|
|
158
|
+
{ key: 0 },
|
|
159
|
+
t.getWrapperProps({
|
|
160
|
+
componentOptions: t.componentOptions,
|
|
161
|
+
builderBlock: t.builderBlock,
|
|
162
|
+
context: t.context,
|
|
163
|
+
componentRef: t.componentRef,
|
|
164
|
+
linkComponent: t.linkComponent,
|
|
165
|
+
includeBlockProps: t.includeBlockProps,
|
|
166
|
+
isInteractive: t.isInteractive,
|
|
167
|
+
contextValue: t.context
|
|
168
|
+
})
|
|
169
|
+
)), {
|
|
170
|
+
default: p(() => [
|
|
171
|
+
t.componentRef ? (o(!0), b(C, { key: 0 }, B(t.blockChildren, (n, y) => (o(), a(r, {
|
|
172
|
+
key: n.id,
|
|
173
|
+
block: n,
|
|
174
|
+
context: t.context,
|
|
175
|
+
registeredComponents: t.registeredComponents,
|
|
176
|
+
linkComponent: t.linkComponent
|
|
177
|
+
}, null, 8, ["block", "context", "registeredComponents", "linkComponent"]))), 128)) : k("", !0)
|
|
178
|
+
]),
|
|
179
|
+
_: 1
|
|
180
|
+
}, 16)) : k("", !0);
|
|
181
|
+
}
|
|
182
|
+
const D = /* @__PURE__ */ v(V, [["render", G]]);
|
|
183
|
+
export {
|
|
184
|
+
D as default
|
|
185
|
+
};
|
|
@@ -3,13 +3,13 @@ import type { BuilderContent } from "../../../types/builder-content";
|
|
|
3
3
|
import type { Dictionary } from "../../../types/typescript";
|
|
4
4
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
5
5
|
data?: any;
|
|
6
|
+
canTrack?: any;
|
|
7
|
+
apiKey?: any;
|
|
8
|
+
apiHost?: any;
|
|
6
9
|
context?: any;
|
|
7
10
|
content?: any;
|
|
8
|
-
apiKey?: any;
|
|
9
11
|
model?: any;
|
|
10
|
-
canTrack?: any;
|
|
11
12
|
locale?: any;
|
|
12
|
-
apiHost?: any;
|
|
13
13
|
trustedHosts?: any;
|
|
14
14
|
showContent?: any;
|
|
15
15
|
enrich?: any;
|
|
@@ -77,13 +77,13 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
77
77
|
elementRef_onInitpreviewingbldr(event: any): void;
|
|
78
78
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
79
79
|
data?: any;
|
|
80
|
+
canTrack?: any;
|
|
81
|
+
apiKey?: any;
|
|
82
|
+
apiHost?: any;
|
|
80
83
|
context?: any;
|
|
81
84
|
content?: any;
|
|
82
|
-
apiKey?: any;
|
|
83
85
|
model?: any;
|
|
84
|
-
canTrack?: any;
|
|
85
86
|
locale?: any;
|
|
86
|
-
apiHost?: any;
|
|
87
87
|
trustedHosts?: any;
|
|
88
88
|
showContent?: any;
|
|
89
89
|
enrich?: any;
|
|
@@ -93,13 +93,13 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
93
93
|
builderContextSignal?: any;
|
|
94
94
|
}>>>, {
|
|
95
95
|
readonly data?: any;
|
|
96
|
+
readonly canTrack?: any;
|
|
97
|
+
readonly apiKey?: any;
|
|
98
|
+
readonly apiHost?: any;
|
|
96
99
|
readonly context?: any;
|
|
97
100
|
readonly content?: any;
|
|
98
|
-
readonly apiKey?: any;
|
|
99
101
|
readonly model?: any;
|
|
100
|
-
readonly canTrack?: any;
|
|
101
102
|
readonly locale?: any;
|
|
102
|
-
readonly apiHost?: any;
|
|
103
103
|
readonly trustedHosts?: any;
|
|
104
104
|
readonly showContent?: any;
|
|
105
105
|
readonly enrich?: any;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
2
|
-
nonce?: any;
|
|
3
2
|
contentId?: any;
|
|
3
|
+
nonce?: any;
|
|
4
4
|
isNestedRender?: any;
|
|
5
5
|
cssCode?: any;
|
|
6
6
|
customFonts?: any;
|
|
7
7
|
}>, unknown, {
|
|
8
8
|
injectedStyles: string;
|
|
9
9
|
}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
10
|
-
nonce?: any;
|
|
11
10
|
contentId?: any;
|
|
11
|
+
nonce?: any;
|
|
12
12
|
isNestedRender?: any;
|
|
13
13
|
cssCode?: any;
|
|
14
14
|
customFonts?: any;
|
|
15
15
|
}>>>, {
|
|
16
|
-
readonly nonce?: any;
|
|
17
16
|
readonly contentId?: any;
|
|
17
|
+
readonly nonce?: any;
|
|
18
18
|
readonly isNestedRender?: any;
|
|
19
19
|
readonly cssCode?: any;
|
|
20
20
|
readonly customFonts?: any;
|
|
@@ -3,15 +3,15 @@ import type { ComponentInfo } from "../../types/components";
|
|
|
3
3
|
import type { Dictionary } from "../../types/typescript";
|
|
4
4
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
5
5
|
data?: any;
|
|
6
|
+
canTrack?: any;
|
|
7
|
+
apiKey?: any;
|
|
8
|
+
apiHost?: any;
|
|
6
9
|
context?: any;
|
|
7
10
|
content?: any;
|
|
8
|
-
apiKey?: any;
|
|
9
11
|
apiVersion?: any;
|
|
10
12
|
nonce?: any;
|
|
11
13
|
model?: any;
|
|
12
|
-
canTrack?: any;
|
|
13
14
|
locale?: any;
|
|
14
|
-
apiHost?: any;
|
|
15
15
|
trustedHosts?: any;
|
|
16
16
|
showContent?: any;
|
|
17
17
|
isSsrAbTest?: any;
|
|
@@ -55,15 +55,15 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
55
55
|
contentSetState(newRootState: BuilderRenderState): void;
|
|
56
56
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
57
57
|
data?: any;
|
|
58
|
+
canTrack?: any;
|
|
59
|
+
apiKey?: any;
|
|
60
|
+
apiHost?: any;
|
|
58
61
|
context?: any;
|
|
59
62
|
content?: any;
|
|
60
|
-
apiKey?: any;
|
|
61
63
|
apiVersion?: any;
|
|
62
64
|
nonce?: any;
|
|
63
65
|
model?: any;
|
|
64
|
-
canTrack?: any;
|
|
65
66
|
locale?: any;
|
|
66
|
-
apiHost?: any;
|
|
67
67
|
trustedHosts?: any;
|
|
68
68
|
showContent?: any;
|
|
69
69
|
isSsrAbTest?: any;
|
|
@@ -77,15 +77,15 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
77
77
|
isNestedRender?: any;
|
|
78
78
|
}>>>, {
|
|
79
79
|
readonly data?: any;
|
|
80
|
+
readonly canTrack?: any;
|
|
81
|
+
readonly apiKey?: any;
|
|
82
|
+
readonly apiHost?: any;
|
|
80
83
|
readonly context?: any;
|
|
81
84
|
readonly content?: any;
|
|
82
|
-
readonly apiKey?: any;
|
|
83
85
|
readonly apiVersion?: any;
|
|
84
86
|
readonly nonce?: any;
|
|
85
87
|
readonly model?: any;
|
|
86
|
-
readonly canTrack?: any;
|
|
87
88
|
readonly locale?: any;
|
|
88
|
-
readonly apiHost?: any;
|
|
89
89
|
readonly trustedHosts?: any;
|
|
90
90
|
readonly showContent?: any;
|
|
91
91
|
readonly isSsrAbTest?: any;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
2
2
|
data?: any;
|
|
3
|
+
canTrack?: any;
|
|
4
|
+
apiKey?: any;
|
|
5
|
+
apiHost?: any;
|
|
3
6
|
context?: any;
|
|
4
7
|
content?: any;
|
|
5
|
-
apiKey?: any;
|
|
6
8
|
apiVersion?: any;
|
|
7
9
|
nonce?: any;
|
|
8
10
|
model?: any;
|
|
9
|
-
canTrack?: any;
|
|
10
11
|
locale?: any;
|
|
11
|
-
apiHost?: any;
|
|
12
12
|
trustedHosts?: any;
|
|
13
13
|
customComponents?: any;
|
|
14
14
|
linkComponent?: any;
|
|
@@ -54,15 +54,15 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
54
54
|
defaultContent(): any;
|
|
55
55
|
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
56
56
|
data?: any;
|
|
57
|
+
canTrack?: any;
|
|
58
|
+
apiKey?: any;
|
|
59
|
+
apiHost?: any;
|
|
57
60
|
context?: any;
|
|
58
61
|
content?: any;
|
|
59
|
-
apiKey?: any;
|
|
60
62
|
apiVersion?: any;
|
|
61
63
|
nonce?: any;
|
|
62
64
|
model?: any;
|
|
63
|
-
canTrack?: any;
|
|
64
65
|
locale?: any;
|
|
65
|
-
apiHost?: any;
|
|
66
66
|
trustedHosts?: any;
|
|
67
67
|
customComponents?: any;
|
|
68
68
|
linkComponent?: any;
|
|
@@ -74,15 +74,15 @@ declare const _default: import("vue").DefineComponent<Readonly<{
|
|
|
74
74
|
isNestedRender?: any;
|
|
75
75
|
}>>>, {
|
|
76
76
|
readonly data?: any;
|
|
77
|
+
readonly canTrack?: any;
|
|
78
|
+
readonly apiKey?: any;
|
|
79
|
+
readonly apiHost?: any;
|
|
77
80
|
readonly context?: any;
|
|
78
81
|
readonly content?: any;
|
|
79
|
-
readonly apiKey?: any;
|
|
80
82
|
readonly apiVersion?: any;
|
|
81
83
|
readonly nonce?: any;
|
|
82
84
|
readonly model?: any;
|
|
83
|
-
readonly canTrack?: any;
|
|
84
85
|
readonly locale?: any;
|
|
85
|
-
readonly apiHost?: any;
|
|
86
86
|
readonly trustedHosts?: any;
|
|
87
87
|
readonly customComponents?: any;
|
|
88
88
|
readonly linkComponent?: any;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
2
|
-
nonce?: any;
|
|
3
2
|
id?: any;
|
|
3
|
+
nonce?: any;
|
|
4
4
|
scriptStr?: any;
|
|
5
5
|
}>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
6
|
-
nonce?: any;
|
|
7
6
|
id?: any;
|
|
7
|
+
nonce?: any;
|
|
8
8
|
scriptStr?: any;
|
|
9
9
|
}>>>, {
|
|
10
|
-
readonly nonce?: any;
|
|
11
10
|
readonly id?: any;
|
|
11
|
+
readonly nonce?: any;
|
|
12
12
|
readonly scriptStr?: any;
|
|
13
13
|
}, {}>;
|
|
14
14
|
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
2
|
-
nonce?: any;
|
|
3
2
|
id?: any;
|
|
3
|
+
nonce?: any;
|
|
4
4
|
styles?: any;
|
|
5
5
|
}>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
6
|
-
nonce?: any;
|
|
7
6
|
id?: any;
|
|
7
|
+
nonce?: any;
|
|
8
8
|
styles?: any;
|
|
9
9
|
}>>>, {
|
|
10
|
-
readonly nonce?: any;
|
|
11
10
|
readonly id?: any;
|
|
11
|
+
readonly nonce?: any;
|
|
12
12
|
readonly styles?: any;
|
|
13
13
|
}, {}>;
|
|
14
14
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "5.
|
|
1
|
+
export declare const SDK_VERSION = "5.1.1";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EvaluatorArgs } from './helpers';
|
|
2
2
|
type EvalValue = unknown;
|
|
3
3
|
export declare const getSimpleExpressionGetPath: (code: string) => any;
|
|
4
|
-
export declare function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression }: EvaluatorArgs): EvalValue;
|
|
4
|
+
export declare function evaluate({ code, context, localState, rootState, rootSetState, event, isExpression, trackingContext }: EvaluatorArgs): EvalValue;
|
|
5
5
|
export {};
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
import type { BuilderContextInterface, BuilderRenderState } from '../../context/types';
|
|
2
2
|
import { getUserAttributes } from '../track/helpers';
|
|
3
|
+
export type TrackingContext = {
|
|
4
|
+
apiKey: string | null;
|
|
5
|
+
canTrack?: boolean;
|
|
6
|
+
contentId?: string;
|
|
7
|
+
variationId?: string;
|
|
8
|
+
};
|
|
3
9
|
export type EvaluatorArgs = Omit<ExecutorArgs, 'builder' | 'event'> & {
|
|
4
10
|
event?: Event;
|
|
5
11
|
isExpression?: boolean;
|
|
12
|
+
trackingContext?: TrackingContext;
|
|
6
13
|
};
|
|
7
14
|
export type BuilderGlobals = {
|
|
8
15
|
isEditing: boolean | undefined;
|
|
9
16
|
isBrowser: boolean | undefined;
|
|
10
17
|
isServer: boolean | undefined;
|
|
11
18
|
getUserAttributes: typeof getUserAttributes;
|
|
19
|
+
trackConversion: (amount?: number, customProperties?: Record<string, any>) => void;
|
|
12
20
|
};
|
|
13
21
|
export type ExecutorArgs = Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'> & {
|
|
14
22
|
code: string;
|
|
@@ -20,7 +28,7 @@ export type FunctionArguments = ReturnType<typeof getFunctionArguments>;
|
|
|
20
28
|
export declare const getFunctionArguments: ({ builder, context, event, state }: Pick<ExecutorArgs, "context" | "builder" | "event"> & {
|
|
21
29
|
state: BuilderRenderState;
|
|
22
30
|
}) => [string, Event | BuilderRenderState | import("../../context/types").BuilderRenderContext | BuilderGlobals | undefined][];
|
|
23
|
-
export declare const getBuilderGlobals: () => BuilderGlobals;
|
|
31
|
+
export declare const getBuilderGlobals: (trackingContext?: TrackingContext) => BuilderGlobals;
|
|
24
32
|
export declare const parseCode: (code: string, { isExpression }: Pick<EvaluatorArgs, 'isExpression'>) => string;
|
|
25
33
|
export declare function flattenState({ rootState, localState, rootSetState }: {
|
|
26
34
|
rootState: Record<string | symbol, any>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { BuilderContextInterface } from '../context/types';
|
|
2
2
|
import type { BuilderBlock } from '../types/builder-block';
|
|
3
|
+
import type { TrackingContext } from './evaluate/helpers';
|
|
3
4
|
type Options = {
|
|
4
5
|
block: BuilderBlock;
|
|
6
|
+
trackingContext?: TrackingContext;
|
|
5
7
|
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>;
|
|
6
8
|
type EventHandler = (event: Event) => any;
|
|
7
9
|
export declare const createEventHandler: (value: string, options: Options) => EventHandler;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { BuilderContextInterface } from '../context/types';
|
|
2
2
|
import type { BuilderBlock } from '../types/builder-block';
|
|
3
|
+
import type { TrackingContext } from './evaluate/helpers';
|
|
3
4
|
type Actions = {
|
|
4
5
|
[index: string]: (event: Event) => any;
|
|
5
6
|
};
|
|
6
7
|
export declare function getBlockActions(options: {
|
|
7
8
|
block: BuilderBlock;
|
|
8
9
|
stripPrefix?: boolean;
|
|
10
|
+
trackingContext?: TrackingContext;
|
|
9
11
|
} & Pick<BuilderContextInterface, 'localState' | 'context' | 'rootState' | 'rootSetState'>): Actions;
|
|
10
12
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var d=require("./style.css");const a=require("./index-OpNLmfCu.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,trackingContext:t.trackingContext});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 f=e=>({href:e.href});function p({block:e,context:t}){var o;const r={...f(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=p;
|