@builder.io/sdk-qwik 0.14.8 → 0.14.10
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/index.qwik.cjs +85 -50
- package/lib/browser/index.qwik.mjs +85 -50
- package/lib/edge/index.qwik.cjs +85 -50
- package/lib/edge/index.qwik.mjs +85 -50
- package/lib/node/index.qwik.cjs +85 -50
- package/lib/node/index.qwik.mjs +85 -50
- package/package.json +2 -2
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/get-content/types.d.ts +8 -0
package/lib/edge/index.qwik.cjs
CHANGED
|
@@ -5033,7 +5033,7 @@ const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
5033
5033
|
children: [
|
|
5034
5034
|
/* @__PURE__ */ qwik._jsxQ("picture", null, null, [
|
|
5035
5035
|
webpSrcSet.value ? /* @__PURE__ */ qwik._jsxQ("source", null, {
|
|
5036
|
-
|
|
5036
|
+
srcset: qwik._fnSignal((p0) => p0.value, [
|
|
5037
5037
|
webpSrcSet
|
|
5038
5038
|
], "p0.value"),
|
|
5039
5039
|
type: "image/webp"
|
|
@@ -5055,7 +5055,7 @@ const Image = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
5055
5055
|
src: qwik._fnSignal((p0) => p0.image, [
|
|
5056
5056
|
props
|
|
5057
5057
|
], "p0.image"),
|
|
5058
|
-
|
|
5058
|
+
srcset: qwik._fnSignal((p0) => p0.value, [
|
|
5059
5059
|
srcSetToUse
|
|
5060
5060
|
], "p0.value"),
|
|
5061
5061
|
style: qwik._fnSignal((p0, p1) => ({
|
|
@@ -7372,7 +7372,8 @@ async function fetchOneEntry(options) {
|
|
|
7372
7372
|
}
|
|
7373
7373
|
const _fetchContent = async (options) => {
|
|
7374
7374
|
const url = generateContentUrl(options);
|
|
7375
|
-
const
|
|
7375
|
+
const _fetch = options.fetch ?? fetch$1;
|
|
7376
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
7376
7377
|
const content = await res.json();
|
|
7377
7378
|
return content;
|
|
7378
7379
|
};
|
|
@@ -7625,7 +7626,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7625
7626
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
7626
7627
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
7627
7628
|
}
|
|
7628
|
-
const SDK_VERSION = "0.14.
|
|
7629
|
+
const SDK_VERSION = "0.14.10";
|
|
7629
7630
|
const registry = {};
|
|
7630
7631
|
function register(type, info) {
|
|
7631
7632
|
let typeList = registry[type];
|
|
@@ -7846,21 +7847,18 @@ const processMessage = function processMessage2(props, state, elementRef, event)
|
|
|
7846
7847
|
const { breakpoints, contentId } = messageContent;
|
|
7847
7848
|
if (!contentId || contentId !== ((_a = props.builderContextSignal.content) == null ? void 0 : _a.id))
|
|
7848
7849
|
return;
|
|
7849
|
-
if (breakpoints)
|
|
7850
|
+
if (breakpoints)
|
|
7850
7851
|
mergeNewContent(props, state, elementRef, {
|
|
7851
7852
|
meta: {
|
|
7852
7853
|
breakpoints
|
|
7853
7854
|
}
|
|
7854
7855
|
});
|
|
7855
|
-
state.forceReRenderCount = state.forceReRenderCount + 1;
|
|
7856
|
-
}
|
|
7857
7856
|
},
|
|
7858
7857
|
animation: (animation) => {
|
|
7859
7858
|
triggerAnimation(animation);
|
|
7860
7859
|
},
|
|
7861
7860
|
contentUpdate: (newContent) => {
|
|
7862
7861
|
mergeNewContent(props, state, elementRef, newContent);
|
|
7863
|
-
state.forceReRenderCount = state.forceReRenderCount + 1;
|
|
7864
7862
|
}
|
|
7865
7863
|
}
|
|
7866
7864
|
})(event);
|
|
@@ -7947,23 +7945,17 @@ const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
|
|
|
7947
7945
|
}));
|
|
7948
7946
|
};
|
|
7949
7947
|
const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
7950
|
-
var _a, _b, _c, _d, _e;
|
|
7951
7948
|
qwik._jsxBranch();
|
|
7952
7949
|
const elementRef = qwik.useSignal();
|
|
7953
7950
|
const state = qwik.useStore({
|
|
7954
7951
|
ContentWrapper: props.contentWrapper || "div",
|
|
7955
7952
|
clicked: false,
|
|
7956
|
-
|
|
7957
|
-
forceReRenderCount: 0,
|
|
7958
|
-
httpReqsData: {},
|
|
7959
|
-
lastUpdated: 0,
|
|
7960
|
-
shouldSendResetCookie: false
|
|
7953
|
+
httpReqsData: {}
|
|
7961
7954
|
}, {
|
|
7962
7955
|
deep: true
|
|
7963
7956
|
});
|
|
7964
7957
|
qwik.useOn("initeditingbldr", /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
|
|
7965
7958
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
7966
|
-
state2.forceReRenderCount = state2.forceReRenderCount + 1;
|
|
7967
7959
|
window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
|
|
7968
7960
|
registerInsertMenu();
|
|
7969
7961
|
setupBrowserForEditing({
|
|
@@ -7978,9 +7970,9 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
7978
7970
|
} : {}
|
|
7979
7971
|
});
|
|
7980
7972
|
Object.values(props2.builderContextSignal.componentInfos).forEach((registeredComponent) => {
|
|
7981
|
-
var
|
|
7973
|
+
var _a;
|
|
7982
7974
|
const message = createRegisterComponentMessage(registeredComponent);
|
|
7983
|
-
(
|
|
7975
|
+
(_a = window.parent) == null ? void 0 : _a.postMessage(message, "*");
|
|
7984
7976
|
});
|
|
7985
7977
|
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
|
|
7986
7978
|
}, "EnableEditor_component_useOn_Qs8c0yql2i0", [
|
|
@@ -8009,17 +8001,17 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
8009
8001
|
state
|
|
8010
8002
|
]));
|
|
8011
8003
|
qwik.useOn("qvisible", /* @__PURE__ */ qwik.inlinedQrl((event, element) => {
|
|
8012
|
-
var
|
|
8004
|
+
var _a, _b, _c, _d;
|
|
8013
8005
|
if (isBrowser()) {
|
|
8014
8006
|
if (isEditing()) {
|
|
8015
8007
|
if (element)
|
|
8016
8008
|
element.dispatchEvent(new CustomEvent("initeditingbldr"));
|
|
8017
8009
|
}
|
|
8018
|
-
const shouldTrackImpression = ((
|
|
8010
|
+
const shouldTrackImpression = ((_a = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a.value) === "true";
|
|
8019
8011
|
if (shouldTrackImpression) {
|
|
8020
|
-
const variationId = (
|
|
8021
|
-
const contentId = (
|
|
8022
|
-
const apiKeyProp = (
|
|
8012
|
+
const variationId = (_b = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b.value;
|
|
8013
|
+
const contentId = (_c = element.attributes.getNamedItem("contentId")) == null ? void 0 : _c.value;
|
|
8014
|
+
const apiKeyProp = (_d = element.attributes.getNamedItem("apiKey")) == null ? void 0 : _d.value;
|
|
8023
8015
|
_track({
|
|
8024
8016
|
type: "impression",
|
|
8025
8017
|
canTrack: true,
|
|
@@ -8057,20 +8049,14 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
8057
8049
|
props,
|
|
8058
8050
|
state
|
|
8059
8051
|
]));
|
|
8060
|
-
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
8061
|
-
const [state2] = qwik.useLexicalScope();
|
|
8062
|
-
track2(() => state2.shouldSendResetCookie);
|
|
8063
|
-
}, "EnableEditor_component_useTask_2_xVyv0tDqZLs", [
|
|
8064
|
-
state
|
|
8065
|
-
]));
|
|
8066
8052
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
8067
8053
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8068
8054
|
track2(() => {
|
|
8069
|
-
var
|
|
8070
|
-
return (
|
|
8055
|
+
var _a, _b;
|
|
8056
|
+
return (_b = (_a = props2.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.jsCode;
|
|
8071
8057
|
});
|
|
8072
8058
|
evaluateJsCode(props2);
|
|
8073
|
-
}, "
|
|
8059
|
+
}, "EnableEditor_component_useTask_2_xVyv0tDqZLs", [
|
|
8074
8060
|
elementRef,
|
|
8075
8061
|
props,
|
|
8076
8062
|
state
|
|
@@ -8078,11 +8064,11 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
8078
8064
|
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track: track2 }) => {
|
|
8079
8065
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8080
8066
|
track2(() => {
|
|
8081
|
-
var
|
|
8082
|
-
return (
|
|
8067
|
+
var _a, _b;
|
|
8068
|
+
return (_b = (_a = props2.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.httpRequests;
|
|
8083
8069
|
});
|
|
8084
8070
|
runHttpRequests(props2, state2, elementRef2);
|
|
8085
|
-
}, "
|
|
8071
|
+
}, "EnableEditor_component_useTask_3_bQ0e5LHZwWE", [
|
|
8086
8072
|
elementRef,
|
|
8087
8073
|
props,
|
|
8088
8074
|
state
|
|
@@ -8091,7 +8077,7 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
8091
8077
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8092
8078
|
track2(() => props2.builderContextSignal.rootState);
|
|
8093
8079
|
emitStateUpdate(props2);
|
|
8094
|
-
}, "
|
|
8080
|
+
}, "EnableEditor_component_useTask_4_moHYZG8uNVU", [
|
|
8095
8081
|
elementRef,
|
|
8096
8082
|
props,
|
|
8097
8083
|
state
|
|
@@ -8101,7 +8087,7 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
8101
8087
|
track2(() => props2.data);
|
|
8102
8088
|
if (props2.data)
|
|
8103
8089
|
mergeNewRootState(props2, state2, elementRef2, props2.data);
|
|
8104
|
-
}, "
|
|
8090
|
+
}, "EnableEditor_component_useTask_5_24QxS0r0KF8", [
|
|
8105
8091
|
elementRef,
|
|
8106
8092
|
props,
|
|
8107
8093
|
state
|
|
@@ -8113,37 +8099,86 @@ const EnableEditor = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inli
|
|
|
8113
8099
|
mergeNewRootState(props2, state2, elementRef2, {
|
|
8114
8100
|
locale: props2.locale
|
|
8115
8101
|
});
|
|
8116
|
-
}, "
|
|
8102
|
+
}, "EnableEditor_component_useTask_6_0CaFTUOgv08", [
|
|
8117
8103
|
elementRef,
|
|
8118
8104
|
props,
|
|
8119
8105
|
state
|
|
8120
8106
|
]));
|
|
8121
8107
|
return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
8122
|
-
children: props.builderContextSignal.content ? /* @__PURE__ */ qwik.
|
|
8123
|
-
apiKey
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8108
|
+
children: props.builderContextSignal.content ? /* @__PURE__ */ qwik._jsxC(state.ContentWrapper, {
|
|
8109
|
+
get apiKey() {
|
|
8110
|
+
return props.apiKey;
|
|
8111
|
+
},
|
|
8112
|
+
get contentId() {
|
|
8113
|
+
var _a;
|
|
8114
|
+
return (_a = props.builderContextSignal.content) == null ? void 0 : _a.id;
|
|
8115
|
+
},
|
|
8116
|
+
get variationId() {
|
|
8117
|
+
var _a;
|
|
8118
|
+
return (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
|
|
8119
|
+
},
|
|
8129
8120
|
onClick$: /* @__PURE__ */ qwik.inlinedQrl((event) => {
|
|
8130
8121
|
const [elementRef2, props2, state2] = qwik.useLexicalScope();
|
|
8131
8122
|
return onClick(props2, state2, elementRef2, event);
|
|
8132
|
-
}, "
|
|
8123
|
+
}, "EnableEditor_component__Fragment_onClick_b4nYT3DrjEk", [
|
|
8133
8124
|
elementRef,
|
|
8134
8125
|
props,
|
|
8135
8126
|
state
|
|
8136
8127
|
]),
|
|
8137
|
-
|
|
8138
|
-
|
|
8128
|
+
ref: elementRef,
|
|
8129
|
+
shouldTrack: String(props.builderContextSignal.content && getDefaultCanTrack(props.canTrack)),
|
|
8130
|
+
get "builder-content-id"() {
|
|
8131
|
+
var _a;
|
|
8132
|
+
return (_a = props.builderContextSignal.content) == null ? void 0 : _a.id;
|
|
8133
|
+
},
|
|
8134
|
+
get "builder-model"() {
|
|
8135
|
+
return props.model;
|
|
8136
|
+
},
|
|
8139
8137
|
...props.showContent ? {} : {
|
|
8140
8138
|
hidden: true,
|
|
8141
8139
|
"aria-hidden": true
|
|
8142
8140
|
},
|
|
8143
8141
|
...props.contentWrapperProps,
|
|
8144
|
-
class
|
|
8145
|
-
|
|
8146
|
-
|
|
8142
|
+
get class() {
|
|
8143
|
+
var _a, _b;
|
|
8144
|
+
return `variant-${((_a = props.content) == null ? void 0 : _a.testVariationId) || ((_b = props.content) == null ? void 0 : _b.id)}`;
|
|
8145
|
+
},
|
|
8146
|
+
children: /* @__PURE__ */ qwik._jsxC(qwik.Slot, null, 3, "06_0"),
|
|
8147
|
+
[qwik._IMMUTABLE]: {
|
|
8148
|
+
apiKey: qwik._fnSignal((p0) => p0.apiKey, [
|
|
8149
|
+
props
|
|
8150
|
+
], "p0.apiKey"),
|
|
8151
|
+
"builder-content-id": qwik._fnSignal((p0) => {
|
|
8152
|
+
var _a;
|
|
8153
|
+
return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.id;
|
|
8154
|
+
}, [
|
|
8155
|
+
props
|
|
8156
|
+
], "p0.builderContextSignal.content?.id"),
|
|
8157
|
+
"builder-model": qwik._fnSignal((p0) => p0.model, [
|
|
8158
|
+
props
|
|
8159
|
+
], "p0.model"),
|
|
8160
|
+
class: qwik._fnSignal((p0) => {
|
|
8161
|
+
var _a, _b;
|
|
8162
|
+
return `variant-${((_a = p0.content) == null ? void 0 : _a.testVariationId) || ((_b = p0.content) == null ? void 0 : _b.id)}`;
|
|
8163
|
+
}, [
|
|
8164
|
+
props
|
|
8165
|
+
], "`variant-${p0.content?.testVariationId||p0.content?.id}`"),
|
|
8166
|
+
contentId: qwik._fnSignal((p0) => {
|
|
8167
|
+
var _a;
|
|
8168
|
+
return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.id;
|
|
8169
|
+
}, [
|
|
8170
|
+
props
|
|
8171
|
+
], "p0.builderContextSignal.content?.id"),
|
|
8172
|
+
ref: qwik._IMMUTABLE,
|
|
8173
|
+
variationId: qwik._fnSignal((p0) => {
|
|
8174
|
+
var _a;
|
|
8175
|
+
return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
|
|
8176
|
+
}, [
|
|
8177
|
+
props
|
|
8178
|
+
], "p0.builderContextSignal.content?.testVariationId")
|
|
8179
|
+
}
|
|
8180
|
+
}, 0, "06_1") : null
|
|
8181
|
+
}, 1, "06_2");
|
|
8147
8182
|
}, "EnableEditor_component_ko1mO8oaj8k"));
|
|
8148
8183
|
const getCssFromFont = (font) => {
|
|
8149
8184
|
var _a;
|
package/lib/edge/index.qwik.mjs
CHANGED
|
@@ -5031,7 +5031,7 @@ const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
5031
5031
|
children: [
|
|
5032
5032
|
/* @__PURE__ */ _jsxQ("picture", null, null, [
|
|
5033
5033
|
webpSrcSet.value ? /* @__PURE__ */ _jsxQ("source", null, {
|
|
5034
|
-
|
|
5034
|
+
srcset: _fnSignal((p0) => p0.value, [
|
|
5035
5035
|
webpSrcSet
|
|
5036
5036
|
], "p0.value"),
|
|
5037
5037
|
type: "image/webp"
|
|
@@ -5053,7 +5053,7 @@ const Image = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
5053
5053
|
src: _fnSignal((p0) => p0.image, [
|
|
5054
5054
|
props
|
|
5055
5055
|
], "p0.image"),
|
|
5056
|
-
|
|
5056
|
+
srcset: _fnSignal((p0) => p0.value, [
|
|
5057
5057
|
srcSetToUse
|
|
5058
5058
|
], "p0.value"),
|
|
5059
5059
|
style: _fnSignal((p0, p1) => ({
|
|
@@ -7370,7 +7370,8 @@ async function fetchOneEntry(options) {
|
|
|
7370
7370
|
}
|
|
7371
7371
|
const _fetchContent = async (options) => {
|
|
7372
7372
|
const url = generateContentUrl(options);
|
|
7373
|
-
const
|
|
7373
|
+
const _fetch = options.fetch ?? fetch$1;
|
|
7374
|
+
const res = await _fetch(url.href, options.fetchOptions);
|
|
7374
7375
|
const content = await res.json();
|
|
7375
7376
|
return content;
|
|
7376
7377
|
};
|
|
@@ -7623,7 +7624,7 @@ function isFromTrustedHost(trustedHosts, e) {
|
|
|
7623
7624
|
const url = new URL(e.origin), hostname = url.hostname;
|
|
7624
7625
|
return (trustedHosts || DEFAULT_TRUSTED_HOSTS).findIndex((trustedHost) => trustedHost.startsWith("*.") ? hostname.endsWith(trustedHost.slice(1)) : trustedHost === hostname) > -1;
|
|
7625
7626
|
}
|
|
7626
|
-
const SDK_VERSION = "0.14.
|
|
7627
|
+
const SDK_VERSION = "0.14.10";
|
|
7627
7628
|
const registry = {};
|
|
7628
7629
|
function register(type, info) {
|
|
7629
7630
|
let typeList = registry[type];
|
|
@@ -7844,21 +7845,18 @@ const processMessage = function processMessage2(props, state, elementRef, event)
|
|
|
7844
7845
|
const { breakpoints, contentId } = messageContent;
|
|
7845
7846
|
if (!contentId || contentId !== ((_a = props.builderContextSignal.content) == null ? void 0 : _a.id))
|
|
7846
7847
|
return;
|
|
7847
|
-
if (breakpoints)
|
|
7848
|
+
if (breakpoints)
|
|
7848
7849
|
mergeNewContent(props, state, elementRef, {
|
|
7849
7850
|
meta: {
|
|
7850
7851
|
breakpoints
|
|
7851
7852
|
}
|
|
7852
7853
|
});
|
|
7853
|
-
state.forceReRenderCount = state.forceReRenderCount + 1;
|
|
7854
|
-
}
|
|
7855
7854
|
},
|
|
7856
7855
|
animation: (animation) => {
|
|
7857
7856
|
triggerAnimation(animation);
|
|
7858
7857
|
},
|
|
7859
7858
|
contentUpdate: (newContent) => {
|
|
7860
7859
|
mergeNewContent(props, state, elementRef, newContent);
|
|
7861
|
-
state.forceReRenderCount = state.forceReRenderCount + 1;
|
|
7862
7860
|
}
|
|
7863
7861
|
}
|
|
7864
7862
|
})(event);
|
|
@@ -7945,23 +7943,17 @@ const emitStateUpdate = function emitStateUpdate2(props, state, elementRef) {
|
|
|
7945
7943
|
}));
|
|
7946
7944
|
};
|
|
7947
7945
|
const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
7948
|
-
var _a, _b, _c, _d, _e;
|
|
7949
7946
|
_jsxBranch();
|
|
7950
7947
|
const elementRef = useSignal();
|
|
7951
7948
|
const state = useStore({
|
|
7952
7949
|
ContentWrapper: props.contentWrapper || "div",
|
|
7953
7950
|
clicked: false,
|
|
7954
|
-
|
|
7955
|
-
forceReRenderCount: 0,
|
|
7956
|
-
httpReqsData: {},
|
|
7957
|
-
lastUpdated: 0,
|
|
7958
|
-
shouldSendResetCookie: false
|
|
7951
|
+
httpReqsData: {}
|
|
7959
7952
|
}, {
|
|
7960
7953
|
deep: true
|
|
7961
7954
|
});
|
|
7962
7955
|
useOn("initeditingbldr", /* @__PURE__ */ inlinedQrl((event, element) => {
|
|
7963
7956
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
7964
|
-
state2.forceReRenderCount = state2.forceReRenderCount + 1;
|
|
7965
7957
|
window.addEventListener("message", processMessage.bind(null, props2, state2, elementRef2));
|
|
7966
7958
|
registerInsertMenu();
|
|
7967
7959
|
setupBrowserForEditing({
|
|
@@ -7976,9 +7968,9 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
7976
7968
|
} : {}
|
|
7977
7969
|
});
|
|
7978
7970
|
Object.values(props2.builderContextSignal.componentInfos).forEach((registeredComponent) => {
|
|
7979
|
-
var
|
|
7971
|
+
var _a;
|
|
7980
7972
|
const message = createRegisterComponentMessage(registeredComponent);
|
|
7981
|
-
(
|
|
7973
|
+
(_a = window.parent) == null ? void 0 : _a.postMessage(message, "*");
|
|
7982
7974
|
});
|
|
7983
7975
|
window.addEventListener("builder:component:stateChangeListenerActivated", emitStateUpdate.bind(null, props2, state2, elementRef2));
|
|
7984
7976
|
}, "EnableEditor_component_useOn_Qs8c0yql2i0", [
|
|
@@ -8007,17 +7999,17 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
8007
7999
|
state
|
|
8008
8000
|
]));
|
|
8009
8001
|
useOn("qvisible", /* @__PURE__ */ inlinedQrl((event, element) => {
|
|
8010
|
-
var
|
|
8002
|
+
var _a, _b, _c, _d;
|
|
8011
8003
|
if (isBrowser()) {
|
|
8012
8004
|
if (isEditing()) {
|
|
8013
8005
|
if (element)
|
|
8014
8006
|
element.dispatchEvent(new CustomEvent("initeditingbldr"));
|
|
8015
8007
|
}
|
|
8016
|
-
const shouldTrackImpression = ((
|
|
8008
|
+
const shouldTrackImpression = ((_a = element.attributes.getNamedItem("shouldTrack")) == null ? void 0 : _a.value) === "true";
|
|
8017
8009
|
if (shouldTrackImpression) {
|
|
8018
|
-
const variationId = (
|
|
8019
|
-
const contentId = (
|
|
8020
|
-
const apiKeyProp = (
|
|
8010
|
+
const variationId = (_b = element.attributes.getNamedItem("variationId")) == null ? void 0 : _b.value;
|
|
8011
|
+
const contentId = (_c = element.attributes.getNamedItem("contentId")) == null ? void 0 : _c.value;
|
|
8012
|
+
const apiKeyProp = (_d = element.attributes.getNamedItem("apiKey")) == null ? void 0 : _d.value;
|
|
8021
8013
|
_track({
|
|
8022
8014
|
type: "impression",
|
|
8023
8015
|
canTrack: true,
|
|
@@ -8055,20 +8047,14 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
8055
8047
|
props,
|
|
8056
8048
|
state
|
|
8057
8049
|
]));
|
|
8058
|
-
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
|
|
8059
|
-
const [state2] = useLexicalScope();
|
|
8060
|
-
track2(() => state2.shouldSendResetCookie);
|
|
8061
|
-
}, "EnableEditor_component_useTask_2_xVyv0tDqZLs", [
|
|
8062
|
-
state
|
|
8063
|
-
]));
|
|
8064
8050
|
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
|
|
8065
8051
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
8066
8052
|
track2(() => {
|
|
8067
|
-
var
|
|
8068
|
-
return (
|
|
8053
|
+
var _a, _b;
|
|
8054
|
+
return (_b = (_a = props2.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.jsCode;
|
|
8069
8055
|
});
|
|
8070
8056
|
evaluateJsCode(props2);
|
|
8071
|
-
}, "
|
|
8057
|
+
}, "EnableEditor_component_useTask_2_xVyv0tDqZLs", [
|
|
8072
8058
|
elementRef,
|
|
8073
8059
|
props,
|
|
8074
8060
|
state
|
|
@@ -8076,11 +8062,11 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
8076
8062
|
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track: track2 }) => {
|
|
8077
8063
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
8078
8064
|
track2(() => {
|
|
8079
|
-
var
|
|
8080
|
-
return (
|
|
8065
|
+
var _a, _b;
|
|
8066
|
+
return (_b = (_a = props2.builderContextSignal.content) == null ? void 0 : _a.data) == null ? void 0 : _b.httpRequests;
|
|
8081
8067
|
});
|
|
8082
8068
|
runHttpRequests(props2, state2, elementRef2);
|
|
8083
|
-
}, "
|
|
8069
|
+
}, "EnableEditor_component_useTask_3_bQ0e5LHZwWE", [
|
|
8084
8070
|
elementRef,
|
|
8085
8071
|
props,
|
|
8086
8072
|
state
|
|
@@ -8089,7 +8075,7 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
8089
8075
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
8090
8076
|
track2(() => props2.builderContextSignal.rootState);
|
|
8091
8077
|
emitStateUpdate(props2);
|
|
8092
|
-
}, "
|
|
8078
|
+
}, "EnableEditor_component_useTask_4_moHYZG8uNVU", [
|
|
8093
8079
|
elementRef,
|
|
8094
8080
|
props,
|
|
8095
8081
|
state
|
|
@@ -8099,7 +8085,7 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
8099
8085
|
track2(() => props2.data);
|
|
8100
8086
|
if (props2.data)
|
|
8101
8087
|
mergeNewRootState(props2, state2, elementRef2, props2.data);
|
|
8102
|
-
}, "
|
|
8088
|
+
}, "EnableEditor_component_useTask_5_24QxS0r0KF8", [
|
|
8103
8089
|
elementRef,
|
|
8104
8090
|
props,
|
|
8105
8091
|
state
|
|
@@ -8111,37 +8097,86 @@ const EnableEditor = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pr
|
|
|
8111
8097
|
mergeNewRootState(props2, state2, elementRef2, {
|
|
8112
8098
|
locale: props2.locale
|
|
8113
8099
|
});
|
|
8114
|
-
}, "
|
|
8100
|
+
}, "EnableEditor_component_useTask_6_0CaFTUOgv08", [
|
|
8115
8101
|
elementRef,
|
|
8116
8102
|
props,
|
|
8117
8103
|
state
|
|
8118
8104
|
]));
|
|
8119
8105
|
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
8120
|
-
children: props.builderContextSignal.content ? /* @__PURE__ */
|
|
8121
|
-
apiKey
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
|
|
8126
|
-
|
|
8106
|
+
children: props.builderContextSignal.content ? /* @__PURE__ */ _jsxC(state.ContentWrapper, {
|
|
8107
|
+
get apiKey() {
|
|
8108
|
+
return props.apiKey;
|
|
8109
|
+
},
|
|
8110
|
+
get contentId() {
|
|
8111
|
+
var _a;
|
|
8112
|
+
return (_a = props.builderContextSignal.content) == null ? void 0 : _a.id;
|
|
8113
|
+
},
|
|
8114
|
+
get variationId() {
|
|
8115
|
+
var _a;
|
|
8116
|
+
return (_a = props.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
|
|
8117
|
+
},
|
|
8127
8118
|
onClick$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
8128
8119
|
const [elementRef2, props2, state2] = useLexicalScope();
|
|
8129
8120
|
return onClick(props2, state2, elementRef2, event);
|
|
8130
|
-
}, "
|
|
8121
|
+
}, "EnableEditor_component__Fragment_onClick_b4nYT3DrjEk", [
|
|
8131
8122
|
elementRef,
|
|
8132
8123
|
props,
|
|
8133
8124
|
state
|
|
8134
8125
|
]),
|
|
8135
|
-
|
|
8136
|
-
|
|
8126
|
+
ref: elementRef,
|
|
8127
|
+
shouldTrack: String(props.builderContextSignal.content && getDefaultCanTrack(props.canTrack)),
|
|
8128
|
+
get "builder-content-id"() {
|
|
8129
|
+
var _a;
|
|
8130
|
+
return (_a = props.builderContextSignal.content) == null ? void 0 : _a.id;
|
|
8131
|
+
},
|
|
8132
|
+
get "builder-model"() {
|
|
8133
|
+
return props.model;
|
|
8134
|
+
},
|
|
8137
8135
|
...props.showContent ? {} : {
|
|
8138
8136
|
hidden: true,
|
|
8139
8137
|
"aria-hidden": true
|
|
8140
8138
|
},
|
|
8141
8139
|
...props.contentWrapperProps,
|
|
8142
|
-
class
|
|
8143
|
-
|
|
8144
|
-
|
|
8140
|
+
get class() {
|
|
8141
|
+
var _a, _b;
|
|
8142
|
+
return `variant-${((_a = props.content) == null ? void 0 : _a.testVariationId) || ((_b = props.content) == null ? void 0 : _b.id)}`;
|
|
8143
|
+
},
|
|
8144
|
+
children: /* @__PURE__ */ _jsxC(Slot$1, null, 3, "06_0"),
|
|
8145
|
+
[_IMMUTABLE]: {
|
|
8146
|
+
apiKey: _fnSignal((p0) => p0.apiKey, [
|
|
8147
|
+
props
|
|
8148
|
+
], "p0.apiKey"),
|
|
8149
|
+
"builder-content-id": _fnSignal((p0) => {
|
|
8150
|
+
var _a;
|
|
8151
|
+
return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.id;
|
|
8152
|
+
}, [
|
|
8153
|
+
props
|
|
8154
|
+
], "p0.builderContextSignal.content?.id"),
|
|
8155
|
+
"builder-model": _fnSignal((p0) => p0.model, [
|
|
8156
|
+
props
|
|
8157
|
+
], "p0.model"),
|
|
8158
|
+
class: _fnSignal((p0) => {
|
|
8159
|
+
var _a, _b;
|
|
8160
|
+
return `variant-${((_a = p0.content) == null ? void 0 : _a.testVariationId) || ((_b = p0.content) == null ? void 0 : _b.id)}`;
|
|
8161
|
+
}, [
|
|
8162
|
+
props
|
|
8163
|
+
], "`variant-${p0.content?.testVariationId||p0.content?.id}`"),
|
|
8164
|
+
contentId: _fnSignal((p0) => {
|
|
8165
|
+
var _a;
|
|
8166
|
+
return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.id;
|
|
8167
|
+
}, [
|
|
8168
|
+
props
|
|
8169
|
+
], "p0.builderContextSignal.content?.id"),
|
|
8170
|
+
ref: _IMMUTABLE,
|
|
8171
|
+
variationId: _fnSignal((p0) => {
|
|
8172
|
+
var _a;
|
|
8173
|
+
return (_a = p0.builderContextSignal.content) == null ? void 0 : _a.testVariationId;
|
|
8174
|
+
}, [
|
|
8175
|
+
props
|
|
8176
|
+
], "p0.builderContextSignal.content?.testVariationId")
|
|
8177
|
+
}
|
|
8178
|
+
}, 0, "06_1") : null
|
|
8179
|
+
}, 1, "06_2");
|
|
8145
8180
|
}, "EnableEditor_component_ko1mO8oaj8k"));
|
|
8146
8181
|
const getCssFromFont = (font) => {
|
|
8147
8182
|
var _a;
|