@builder.io/sdk-vue 3.0.5 → 3.0.6
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-xWDd6I0t.cjs → awaiter-B_2yazFf.cjs} +1 -1
- package/lib/browser/{awaiter-HIb4sYti.js → awaiter-sU4SDpX0.js} +1 -1
- package/lib/browser/{block-styles-lsb_KdIv.js → block-styles-K1JPlueX.js} +1 -1
- package/lib/browser/{block-styles-a3Qov2aa.cjs → block-styles-rosksv3P.cjs} +1 -1
- package/lib/browser/{block-wrapper-AGYEnT9b.cjs → block-wrapper-cNFnfUiY.cjs} +1 -1
- package/lib/browser/{block-wrapper-wgruUtvA.js → block-wrapper-sJoVtUVt.js} +3 -3
- package/lib/browser/blocks/personalization-container/component-info.d.ts +2 -0
- package/lib/browser/blocks/personalization-container/helpers/inlined-fns.d.ts +8 -0
- package/lib/browser/blocks/personalization-container/helpers.d.ts +27 -0
- package/lib/browser/blocks/personalization-container/index.d.ts +1 -0
- package/lib/browser/blocks/personalization-container/personalization-container.types.d.ts +14 -0
- package/lib/browser/blocks/personalization-container/personalization-container.vue.d.ts +33 -0
- package/lib/browser/{component-ref-vtmUy--R.js → component-ref-InYIqrKn.js} +3 -3
- package/lib/browser/{component-ref-L4m5v5Wy.cjs → component-ref-Lo1xYT1R.cjs} +1 -1
- package/lib/browser/constants/sdk-version.d.ts +1 -1
- package/lib/browser/{get-block-properties-w5SNmgYD.cjs → get-block-properties-CKOWhK-0.cjs} +1 -1
- package/lib/browser/{get-block-properties-8WqRWNVK.js → get-block-properties-aoErppFn.js} +1 -1
- package/lib/browser/helpers/user-attributes.d.ts +17 -0
- package/lib/browser/{index-E3hEz780.js → index-B6NDWuX_.js} +657 -616
- package/lib/browser/index-helpers/blocks-exports.d.ts +1 -0
- package/lib/browser/index-kfabrDm6.cjs +166 -0
- package/lib/browser/index.cjs +1 -1
- package/lib/browser/index.mjs +17 -16
- package/lib/browser/{repeated-block-YYmu12kh.cjs → repeated-block-KGwyg5jh.cjs} +1 -1
- package/lib/browser/{repeated-block-vu-vd9Qj.js → repeated-block-P2xyBE88.js} +2 -2
- package/lib/browser/style.css +1 -1
- package/lib/browser/types/input.d.ts +1 -0
- package/lib/edge/{awaiter-CUt_5Lvh.cjs → awaiter-EmQONKEI.cjs} +1 -1
- package/lib/edge/{awaiter-ViNwDb7Z.js → awaiter-fXaD_JAB.js} +1 -1
- package/lib/edge/{block-styles-EM6CqjQV.cjs → block-styles-ET_8Qv_h.cjs} +1 -1
- package/lib/edge/{block-styles-UWqIwj6d.js → block-styles-V2TEosdx.js} +1 -1
- package/lib/edge/{block-wrapper-UDhPsV2i.js → block-wrapper-0SD0oCxs.js} +3 -3
- package/lib/edge/{block-wrapper-RT3WZdPP.cjs → block-wrapper-eADCpP6y.cjs} +1 -1
- package/lib/edge/blocks/personalization-container/component-info.d.ts +2 -0
- package/lib/edge/blocks/personalization-container/helpers/inlined-fns.d.ts +8 -0
- package/lib/edge/blocks/personalization-container/helpers.d.ts +27 -0
- package/lib/edge/blocks/personalization-container/index.d.ts +1 -0
- package/lib/edge/blocks/personalization-container/personalization-container.types.d.ts +14 -0
- package/lib/edge/blocks/personalization-container/personalization-container.vue.d.ts +33 -0
- package/lib/edge/{component-ref-wjx7VJFz.cjs → component-ref-gyS-V1Pb.cjs} +1 -1
- package/lib/edge/{component-ref-8TcFZYaz.js → component-ref-jFmm1Yr5.js} +3 -3
- package/lib/edge/constants/sdk-version.d.ts +1 -1
- package/lib/edge/{get-block-properties-N5o1BfSo.js → get-block-properties-rOVHCadT.js} +1 -1
- package/lib/edge/{get-block-properties-VI0RpGQw.cjs → get-block-properties-uNDsnJ_q.cjs} +1 -1
- package/lib/edge/helpers/user-attributes.d.ts +17 -0
- package/lib/edge/{index-aOfrtP4-.cjs → index-L-qMWRJU.cjs} +31 -31
- package/lib/edge/{index-taUiLCrC.js → index-NtpyQKYV.js} +957 -916
- package/lib/edge/index-helpers/blocks-exports.d.ts +1 -0
- package/lib/edge/index.cjs +1 -1
- package/lib/edge/index.mjs +18 -17
- package/lib/{node/repeated-block-t1xK6Eml.cjs → edge/repeated-block-LZ0_ayRt.cjs} +1 -1
- package/lib/edge/{repeated-block-6gIkzT9B.js → repeated-block-sEp_7OeP.js} +2 -2
- package/lib/edge/style.css +1 -1
- package/lib/edge/types/input.d.ts +1 -0
- package/lib/node/{awaiter-iLczFafd.cjs → awaiter-2QzOhSsm.cjs} +1 -1
- package/lib/node/{awaiter-YFLE2xNK.js → awaiter-vuOYJM0Z.js} +1 -1
- package/lib/node/{block-styles-puDhatJi.js → block-styles-ZraAZYMV.js} +1 -1
- package/lib/node/{block-styles-X0Yal7gl.cjs → block-styles-oEhFbcHe.cjs} +1 -1
- package/lib/node/{block-wrapper-T3bTZ7up.js → block-wrapper-QmVhjKN-.js} +3 -3
- package/lib/node/{block-wrapper-pNzy0_tb.cjs → block-wrapper-lX2JGnCZ.cjs} +1 -1
- package/lib/node/blocks/personalization-container/component-info.d.ts +2 -0
- package/lib/node/blocks/personalization-container/helpers/inlined-fns.d.ts +8 -0
- package/lib/node/blocks/personalization-container/helpers.d.ts +27 -0
- package/lib/node/blocks/personalization-container/index.d.ts +1 -0
- package/lib/node/blocks/personalization-container/personalization-container.types.d.ts +14 -0
- package/lib/node/blocks/personalization-container/personalization-container.vue.d.ts +33 -0
- package/lib/node/{component-ref-oTG7sOLn.cjs → component-ref-I3kUaCp3.cjs} +1 -1
- package/lib/node/{component-ref-_L8PY6Zh.js → component-ref-KxI6DtDP.js} +3 -3
- package/lib/node/constants/sdk-version.d.ts +1 -1
- package/lib/node/{get-block-properties-3rEDCEQD.js → get-block-properties-767HBW90.js} +1 -1
- package/lib/node/{get-block-properties-P-xnWokf.cjs → get-block-properties-DkXAWgRI.cjs} +1 -1
- package/lib/node/helpers/user-attributes.d.ts +17 -0
- package/lib/node/index-2pJd7fhw.cjs +166 -0
- package/lib/node/index-helpers/blocks-exports.d.ts +1 -0
- package/lib/node/{index-wtum4hyc.js → index-n5uLpvet.js} +624 -583
- package/lib/node/index.cjs +1 -1
- package/lib/node/index.mjs +13 -12
- package/lib/node/{repeated-block-jEy76re4.js → repeated-block-ldoaTwur.js} +2 -2
- package/lib/{edge/repeated-block-qe-61pYU.cjs → node/repeated-block-vtexff4h.cjs} +1 -1
- package/lib/node/style.css +1 -1
- package/lib/node/types/input.d.ts +1 -0
- package/package.json +1 -1
- package/lib/browser/index-kRaZYwBL.cjs +0 -166
- package/lib/node/index-4h5AimzW.cjs +0 -166
|
@@ -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-kfabrDm6.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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as C, resolveComponent as g, openBlock as $, createBlock as v, createCommentVNode as B } from "vue";
|
|
3
|
-
import { _, T, c as h, g as w, a as l, b as k, d as I, e as N } from "./index-
|
|
3
|
+
import { _, T, c as h, g as w, a as l, b as k, d as I, e as N } from "./index-B6NDWuX_.js";
|
|
4
4
|
const z = C({
|
|
5
5
|
name: "block-styles",
|
|
6
6
|
components: { InlinedStyles: _ },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var v=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),s=require("./index-
|
|
1
|
+
var v=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue"),s=require("./index-kfabrDm6.cjs"),f=l.defineComponent({name:"block-styles",components:{InlinedStyles:s._sfc_main},props:["block","context"],data(){return{TARGET:s.TARGET}},computed:{canShowBlock(){const e=this.block;return s.checkIsDefined(e.hide)?!e.hide:s.checkIsDefined(e.show)?e.show:!0},css(){var y,p,h;const e=this.block,t=e.responsiveStyles,r=this.context.content,a=s.getSizesForBreakpoints(((y=r==null?void 0:r.meta)==null?void 0:y.breakpoints)||{}),i=t==null?void 0:t.large,d=t==null?void 0:t.medium,c=t==null?void 0:t.small,n=e.id;if(!n)return"";const S=i?s.createCssClass({className:n,styles:i}):"",k=d?s.createCssClass({className:n,styles:d,mediaQuery:s.getMaxWidthQueryForSize("medium",a)}):"",C=c?s.createCssClass({className:n,styles:c,mediaQuery:s.getMaxWidthQueryForSize("small",a)}):"",o=e.animations&&e.animations.find(m=>m.trigger==="hover");let u="";if(o){const m=((h=(p=o.steps)==null?void 0:p[1])==null?void 0:h.styles)||{};u=s.createCssClass({className:`${n}:hover`,styles:{...m,transition:`all ${o.duration}s ${s.camelToKebabCase(o.easing)}`,transitionDelay:o.delay?`${o.delay}s`:"0s"}})||""}return[S,k,C,u].join(" ")}}});function b(e,t,r,a,i,d){const c=l.resolveComponent("InlinedStyles");return e.TARGET!=="reactNative"&&e.css&&e.canShowBlock?(l.openBlock(),l.createBlock(c,{key:0,id:"builderio-block",styles:e.css,nonce:e.context.nonce},null,8,["styles","nonce"])):l.createCommentVNode("",!0)}const g=s._export_sfc(f,[["render",b]]);exports.default=g;
|
|
@@ -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-CKOWhK-0.cjs"),n=require("./index-kfabrDm6.cjs"),c=()=>Promise.resolve().then(()=>require("./index-kfabrDm6.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("DynamicRenderer");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-aoErppFn.js";
|
|
4
|
+
import { e as m } from "./index-B6NDWuX_.js";
|
|
5
|
+
const d = () => import("./index-B6NDWuX_.js").then((e) => e.G).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
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WARNING: This file contains functions that get stringified and inlined into the HTML at build-time.
|
|
3
|
+
* They cannot import anything.
|
|
4
|
+
*/
|
|
5
|
+
import type { Query, UserAttributes } from '../helpers';
|
|
6
|
+
export declare function filterWithCustomTargeting(userAttributes: UserAttributes, query: Query[], startDate?: string, endDate?: string): boolean;
|
|
7
|
+
export declare const PERSONALIZATION_SCRIPT = "function getPersonalizedVariant(variants, blockId, locale) {\n if (!navigator.cookieEnabled) {\n return;\n }\n function getCookie(name) {\n const nameEQ = name + '=';\n const ca = document.cookie.split(';');\n for (let i = 0; i < ca.length; i++) {\n let c = ca[i];\n while (c.charAt(0) == ' ') c = c.substring(1, c.length);\n if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);\n }\n return null;\n }\n function removeVariants() {\n variants?.forEach(function (_, index) {\n document.querySelector('template[data-variant-id=\"' + blockId + '-' + index + '\"]')?.remove();\n });\n document.querySelector('script[data-id=\"variants-script-' + blockId + '\"]')?.remove();\n document.querySelector('style[data-id=\"variants-styles-' + blockId + '\"]')?.remove();\n }\n const attributes = JSON.parse(getCookie('builder.userAttributes') || '{}');\n if (locale) {\n attributes.locale = locale;\n }\n const winningVariantIndex = variants?.findIndex(function (variant) {\n return filterWithCustomTargeting(attributes, variant.query, variant.startDate, variant.endDate);\n });\n const isDebug = location.href.includes('builder.debug=true');\n if (isDebug) {\n console.debug('PersonalizationContainer', {\n attributes,\n variants,\n winningVariantIndex\n });\n }\n if (winningVariantIndex !== -1) {\n const winningVariant = document.querySelector('template[data-variant-id=\"' + blockId + '-' + winningVariantIndex + '\"]');\n if (winningVariant) {\n const parentNode = winningVariant.parentNode;\n if (parentNode) {\n const newParent = parentNode.cloneNode(false);\n newParent.appendChild(winningVariant.content.firstChild);\n newParent.appendChild(winningVariant.content.lastChild);\n parentNode.parentNode?.replaceChild(newParent, parentNode);\n }\n if (isDebug) {\n console.debug('PersonalizationContainer', 'Winning variant Replaced:', winningVariant);\n }\n }\n } else if (variants && variants.length > 0) {\n removeVariants();\n }\n}";
|
|
8
|
+
export declare const FILTER_WITH_CUSTOM_TARGETING_SCRIPT = "function filterWithCustomTargeting(userAttributes, query, startDate, endDate) {\n function isString(val) {\n return typeof val === 'string';\n }\n function isNumber(val) {\n return typeof val === 'number';\n }\n function objectMatchesQuery(userattr, query) {\n const result = (() => {\n const property = query.property;\n const operator = query.operator;\n let testValue = query.value;\n if (query && query.property === 'urlPath' && query.value && typeof query.value === 'string' && query.value !== '/' && query.value.endsWith('/')) {\n testValue = query.value.slice(0, -1);\n }\n if (!(property && operator)) {\n return true;\n }\n if (Array.isArray(testValue)) {\n if (operator === 'isNot') {\n return testValue.every(val => objectMatchesQuery(userattr, {\n property,\n operator,\n value: val\n }));\n }\n return !!testValue.find(val => objectMatchesQuery(userattr, {\n property,\n operator,\n value: val\n }));\n }\n const value = userattr[property];\n if (Array.isArray(value)) {\n return value.includes(testValue);\n }\n switch (operator) {\n case 'is':\n return value === testValue;\n case 'isNot':\n return value !== testValue;\n case 'contains':\n return (isString(value) || Array.isArray(value)) && value.includes(String(testValue));\n case 'startsWith':\n return isString(value) && value.startsWith(String(testValue));\n case 'endsWith':\n return isString(value) && value.endsWith(String(testValue));\n case 'greaterThan':\n return isNumber(value) && isNumber(testValue) && value > testValue;\n case 'lessThan':\n return isNumber(value) && isNumber(testValue) && value < testValue;\n case 'greaterThanOrEqualTo':\n return isNumber(value) && isNumber(testValue) && value >= testValue;\n case 'lessThanOrEqualTo':\n return isNumber(value) && isNumber(testValue) && value <= testValue;\n default:\n return false;\n }\n })();\n return result;\n }\n const item = {\n query,\n startDate,\n endDate\n };\n const now = userAttributes.date && new Date(userAttributes.date) || new Date();\n if (item.startDate && new Date(item.startDate) > now) {\n return false;\n } else if (item.endDate && new Date(item.endDate) < now) {\n return false;\n }\n if (!item.query || !item.query.length) {\n return true;\n }\n return item.query.every(filter => {\n return objectMatchesQuery(userAttributes, filter);\n });\n}";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../../types/builder-block';
|
|
2
|
+
import type { PersonalizationContainerProps } from './personalization-container.types';
|
|
3
|
+
export type UserAttributes = {
|
|
4
|
+
date?: string | Date;
|
|
5
|
+
urlPath?: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
};
|
|
8
|
+
type QueryOperator = 'is' | 'isNot' | 'contains' | 'startsWith' | 'endsWith' | 'greaterThan' | 'lessThan' | 'greaterThanOrEqualTo' | 'lessThanOrEqualTo';
|
|
9
|
+
type QueryValue = string | number | boolean | Array<string | number | boolean>;
|
|
10
|
+
export type Query = {
|
|
11
|
+
property: string;
|
|
12
|
+
operator: QueryOperator;
|
|
13
|
+
value: QueryValue;
|
|
14
|
+
};
|
|
15
|
+
export declare function checkShouldRenderVariants(variants: PersonalizationContainerProps['variants'], canTrack: boolean): boolean;
|
|
16
|
+
export declare function getBlocksToRender({ variants, previewingIndex, isHydrated, filteredVariants, fallbackBlocks }: {
|
|
17
|
+
variants: PersonalizationContainerProps['variants'];
|
|
18
|
+
previewingIndex?: number | null;
|
|
19
|
+
isHydrated: boolean;
|
|
20
|
+
filteredVariants: PersonalizationContainerProps['variants'];
|
|
21
|
+
fallbackBlocks?: BuilderBlock[];
|
|
22
|
+
}): {
|
|
23
|
+
blocks: BuilderBlock[];
|
|
24
|
+
path: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
export declare const getPersonalizationScript: (variants: PersonalizationContainerProps['variants'], blockId: string, locale?: string) => string;
|
|
27
|
+
export { filterWithCustomTargeting } from './helpers/inlined-fns';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './personalization-container.vue';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BuilderBlock } from '../../types/builder-block';
|
|
2
|
+
import type { BuilderDataProps } from '../../types/builder-props';
|
|
3
|
+
import type { Query } from './helpers';
|
|
4
|
+
export type PersonalizationContainerProps = {
|
|
5
|
+
children?: any;
|
|
6
|
+
attributes?: any;
|
|
7
|
+
previewingIndex?: number | null;
|
|
8
|
+
variants?: Array<{
|
|
9
|
+
blocks: BuilderBlock[];
|
|
10
|
+
query: Query[];
|
|
11
|
+
startDate?: string;
|
|
12
|
+
endDate?: string;
|
|
13
|
+
}>;
|
|
14
|
+
} & BuilderDataProps;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<Readonly<{
|
|
2
|
+
builderContext?: any;
|
|
3
|
+
attributes?: any;
|
|
4
|
+
builderBlock?: any;
|
|
5
|
+
variants?: any;
|
|
6
|
+
previewingIndex?: any;
|
|
7
|
+
}>, unknown, {
|
|
8
|
+
userAttributes: any;
|
|
9
|
+
scriptStr: string;
|
|
10
|
+
unsubscribers: never[];
|
|
11
|
+
shouldRenderVariants: boolean;
|
|
12
|
+
isHydrated: boolean;
|
|
13
|
+
}, {
|
|
14
|
+
filteredVariants(): any;
|
|
15
|
+
blocksToRender(): {
|
|
16
|
+
blocks: import("../..").BuilderBlock[];
|
|
17
|
+
path: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
hideVariantsStyleString(): any;
|
|
20
|
+
}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<Readonly<{
|
|
21
|
+
builderContext?: any;
|
|
22
|
+
attributes?: any;
|
|
23
|
+
builderBlock?: any;
|
|
24
|
+
variants?: any;
|
|
25
|
+
previewingIndex?: any;
|
|
26
|
+
}>>>, {
|
|
27
|
+
readonly builderContext?: any;
|
|
28
|
+
readonly attributes?: any;
|
|
29
|
+
readonly builderBlock?: any;
|
|
30
|
+
readonly variants?: any;
|
|
31
|
+
readonly previewingIndex?: any;
|
|
32
|
+
}, {}>;
|
|
33
|
+
export default _default;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./style.css";
|
|
2
2
|
import { defineComponent as d, defineAsyncComponent as P, resolveComponent as k, openBlock as o, createBlock as a, withCtx as l, renderSlot as m, resolveDynamicComponent as f, mergeProps as b, normalizeProps as B, createElementBlock as g, Fragment as $, renderList as v, createCommentVNode as W } from "vue";
|
|
3
|
-
import { e as h, B as S, w as y } from "./index-
|
|
4
|
-
import { a as C, g as A } from "./get-block-properties-
|
|
5
|
-
const R = () => import("./awaiter-
|
|
3
|
+
import { e as h, B as S, w as y } from "./index-B6NDWuX_.js";
|
|
4
|
+
import { a as C, g as A } from "./get-block-properties-aoErppFn.js";
|
|
5
|
+
const R = () => import("./awaiter-sU4SDpX0.js").then((e) => e.default).catch((e) => {
|
|
6
6
|
throw console.error(
|
|
7
7
|
"Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",
|
|
8
8
|
e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-
|
|
1
|
+
var P=require("./style.css");Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),c=require("./index-kfabrDm6.cjs"),a=require("./get-block-properties-CKOWhK-0.cjs"),u=()=>Promise.resolve().then(()=>require("./awaiter-B_2yazFf.cjs")).then(e=>e.default).catch(e=>{throw console.error("Error while attempting to dynamically import component Awaiter at ../../awaiter.vue",e),e}),d=t.defineComponent({name:"interactive-element",components:{Awaiter:t.defineAsyncComponent(u)},props:["includeBlockProps","block","context","Wrapper","wrapperProps"],computed:{attributes(){return this.includeBlockProps?{...a.getBlockProperties({block:this.block,context:this.context}),...a.getBlockActions({block:this.block,rootState:this.context.rootState,rootSetState:this.context.rootSetState,localState:this.context.localState,context:this.context.context})}:{}}}});function f(e,n,s,i,r,l){const o=t.resolveComponent("Awaiter");return e.Wrapper.load?(t.openBlock(),t.createBlock(o,{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.createBlock(t.resolveDynamicComponent(e.Wrapper),t.mergeProps({key:1,attributes:e.attributes},e.wrapperProps),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["attributes"]))}const m=c._export_sfc(d,[["render",f]]),b=({componentOptions:e,builderBlock:n,context:s,componentRef:i,includeBlockProps:r,isInteractive:l,contextValue:o})=>{const p={...e,...r?{attributes:a.getBlockProperties({block:n,context:o})}:{}};return l?{Wrapper:i,block:n,context:s,wrapperProps:e,includeBlockProps:r}:p},B=t.defineComponent({name:"component-ref",components:{Block:c.Block,InteractiveElement:m},props:["isInteractive","componentRef","componentOptions","builderBlock","context","linkComponent","includeBlockProps","blockChildren","registeredComponents"],data(){return{Wrapper:this.isInteractive?c.wrapComponentRef(m):this.componentRef,getWrapperProps:b}}});function C(e,n,s,i,r,l){const o=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(()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.blockChildren,(p,k)=>(t.openBlock(),t.createBlock(o,{key:p.id,block:p,context:e.context,registeredComponents:e.registeredComponents,linkComponent:e.linkComponent},null,8,["block","context","registeredComponents","linkComponent"]))),128))]),_:1},16)):t.createCommentVNode("",!0)}const h=c._export_sfc(B,[["render",C]]);exports.default=h;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "3.0.
|
|
1
|
+
export declare const SDK_VERSION = "3.0.6";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var d=require("./style.css");const s=require("./index-
|
|
1
|
+
var d=require("./style.css");const s=require("./index-kfabrDm6.cjs"),c=e=>`v-on:${e.toLowerCase()}`,i=(e,t)=>r=>s.evaluate({code:e,context:t.context,localState:t.localState,rootState:t.rootState,rootSetState:t.rootSetState,event:r,isExpression:!1});function l(e){const t={},r=e.block.actions??{};for(const o in r){if(!r.hasOwnProperty(o))continue;const a=r[o];let n=c(o);if(e.stripPrefix)switch(s.TARGET){case"vue":n=n.replace("v-on:","");break;case"svelte":n=n.replace("on:","");break}t[n]=i(a,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:s.getStyle({block:e,context:t}),[s.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;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface UserAttributes {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export declare const USER_ATTRIBUTES_COOKIE_NAME = "builder.userAttributes";
|
|
5
|
+
export declare function createUserAttributesService(): {
|
|
6
|
+
setUserAttributes(newAttrs: UserAttributes): void;
|
|
7
|
+
getUserAttributes(): any;
|
|
8
|
+
subscribeOnUserAttributesChange(callback: (attrs: UserAttributes) => void): () => void;
|
|
9
|
+
setCanTrack(value: boolean): void;
|
|
10
|
+
};
|
|
11
|
+
export declare const userAttributesService: {
|
|
12
|
+
setUserAttributes(newAttrs: UserAttributes): void;
|
|
13
|
+
getUserAttributes(): any;
|
|
14
|
+
subscribeOnUserAttributesChange(callback: (attrs: UserAttributes) => void): () => void;
|
|
15
|
+
setCanTrack(value: boolean): void;
|
|
16
|
+
};
|
|
17
|
+
export declare const setClientUserAttributes: (attributes: UserAttributes) => void;
|