@builder.io/sdk-qwik 0.16.21 → 0.16.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/browser/blocks/accordion/accordion.qwik.cjs +4 -2
- package/lib/browser/blocks/accordion/accordion.qwik.mjs +4 -2
- package/lib/browser/blocks/columns/columns.qwik.cjs +1 -1
- package/lib/browser/blocks/columns/columns.qwik.mjs +1 -1
- package/lib/browser/blocks/form/form/form.qwik.cjs +4 -1
- package/lib/browser/blocks/form/form/form.qwik.mjs +4 -1
- package/lib/browser/blocks/tabs/tabs.qwik.cjs +4 -4
- package/lib/browser/blocks/tabs/tabs.qwik.mjs +4 -4
- package/lib/browser/components/blocks/blocks-wrapper.qwik.cjs +26 -14
- package/lib/browser/components/blocks/blocks-wrapper.qwik.mjs +26 -14
- package/lib/browser/components/content/components/enable-editor.qwik.cjs +2 -0
- package/lib/browser/components/content/components/enable-editor.qwik.mjs +2 -0
- package/lib/browser/constants/sdk-version.qwik.cjs +1 -1
- package/lib/browser/constants/sdk-version.qwik.mjs +1 -1
- package/lib/browser/functions/log-fetch.qwik.cjs +11 -0
- package/lib/browser/functions/log-fetch.qwik.mjs +11 -0
- package/lib/browser/functions/track/index.qwik.cjs +4 -1
- package/lib/browser/functions/track/index.qwik.mjs +4 -1
- package/lib/edge/blocks/accordion/accordion.qwik.cjs +4 -2
- package/lib/edge/blocks/accordion/accordion.qwik.mjs +4 -2
- package/lib/edge/blocks/columns/columns.qwik.cjs +1 -1
- package/lib/edge/blocks/columns/columns.qwik.mjs +1 -1
- package/lib/edge/blocks/form/form/form.qwik.cjs +4 -1
- package/lib/edge/blocks/form/form/form.qwik.mjs +4 -1
- package/lib/edge/blocks/tabs/tabs.qwik.cjs +4 -4
- package/lib/edge/blocks/tabs/tabs.qwik.mjs +4 -4
- package/lib/edge/components/blocks/blocks-wrapper.qwik.cjs +26 -14
- package/lib/edge/components/blocks/blocks-wrapper.qwik.mjs +26 -14
- package/lib/edge/components/content/components/enable-editor.qwik.cjs +2 -0
- package/lib/edge/components/content/components/enable-editor.qwik.mjs +2 -0
- package/lib/edge/constants/sdk-version.qwik.cjs +1 -1
- package/lib/edge/constants/sdk-version.qwik.mjs +1 -1
- package/lib/edge/functions/log-fetch.qwik.cjs +11 -0
- package/lib/edge/functions/log-fetch.qwik.mjs +11 -0
- package/lib/edge/functions/track/index.qwik.cjs +4 -1
- package/lib/edge/functions/track/index.qwik.mjs +4 -1
- package/lib/node/blocks/accordion/accordion.qwik.cjs +4 -2
- package/lib/node/blocks/accordion/accordion.qwik.mjs +4 -2
- package/lib/node/blocks/columns/columns.qwik.cjs +1 -1
- package/lib/node/blocks/columns/columns.qwik.mjs +1 -1
- package/lib/node/blocks/form/form/form.qwik.cjs +4 -1
- package/lib/node/blocks/form/form/form.qwik.mjs +4 -1
- package/lib/node/blocks/tabs/tabs.qwik.cjs +4 -4
- package/lib/node/blocks/tabs/tabs.qwik.mjs +4 -4
- package/lib/node/components/blocks/blocks-wrapper.qwik.cjs +26 -14
- package/lib/node/components/blocks/blocks-wrapper.qwik.mjs +26 -14
- package/lib/node/components/content/components/enable-editor.qwik.cjs +2 -0
- package/lib/node/components/content/components/enable-editor.qwik.mjs +2 -0
- package/lib/node/constants/sdk-version.qwik.cjs +1 -1
- package/lib/node/constants/sdk-version.qwik.mjs +1 -1
- package/lib/node/functions/log-fetch.qwik.cjs +11 -0
- package/lib/node/functions/log-fetch.qwik.mjs +11 -0
- package/lib/node/functions/track/index.qwik.cjs +4 -1
- package/lib/node/functions/track/index.qwik.mjs +4 -1
- package/package.json +1 -1
- package/types/src/components/blocks/blocks-wrapper.d.ts +2 -2
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/log-fetch.d.ts +1 -0
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { componentQrl, inlinedQrl, useStylesScopedQrl, useComputedQrl, useLexicalScope, useSignal, useVisibleTaskQrl, _jsxC, Slot, _IMMUTABLE, _fnSignal } from "@builder.io/qwik";
|
|
2
2
|
import { isEditing } from "../../functions/is-editing.qwik.mjs";
|
|
3
|
-
const onClick = function onClick2(props, state, className, blocksWrapperRef) {
|
|
3
|
+
const onClick = function onClick2(props, state, className, dataPath, blocksWrapperRef) {
|
|
4
4
|
var _a, _b;
|
|
5
5
|
if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
|
|
6
6
|
(_b = window.parent) == null ? void 0 : _b.postMessage({
|
|
7
7
|
type: "builder.clickEmptyBlocks",
|
|
8
8
|
data: {
|
|
9
9
|
parentElementId: props.parent,
|
|
10
|
-
dataPath:
|
|
10
|
+
dataPath: dataPath.value
|
|
11
11
|
}
|
|
12
12
|
}, "*");
|
|
13
13
|
};
|
|
14
|
-
const onMouseEnter = function onMouseEnter2(props, state, className, blocksWrapperRef) {
|
|
14
|
+
const onMouseEnter = function onMouseEnter2(props, state, className, dataPath, blocksWrapperRef) {
|
|
15
15
|
var _a, _b;
|
|
16
16
|
if (isEditing() && !((_a = props.blocks) == null ? void 0 : _a.length))
|
|
17
17
|
(_b = window.parent) == null ? void 0 : _b.postMessage({
|
|
18
18
|
type: "builder.hoverEmptyBlocks",
|
|
19
19
|
data: {
|
|
20
20
|
parentElementId: props.parent,
|
|
21
|
-
dataPath:
|
|
21
|
+
dataPath: dataPath.value
|
|
22
22
|
}
|
|
23
23
|
}, "*");
|
|
24
24
|
};
|
|
@@ -35,6 +35,15 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
35
35
|
}, "BlocksWrapper_component_className_useComputed_J5SSSH2Xf08", [
|
|
36
36
|
props
|
|
37
37
|
]));
|
|
38
|
+
const dataPath = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
39
|
+
const [props2] = useLexicalScope();
|
|
40
|
+
if (!props2.path)
|
|
41
|
+
return void 0;
|
|
42
|
+
const pathPrefix = "component.options.";
|
|
43
|
+
return props2.path.startsWith(pathPrefix) ? props2.path : `${pathPrefix}${props2.path || ""}`;
|
|
44
|
+
}, "BlocksWrapper_component_dataPath_useComputed_csBNeJbWH7k", [
|
|
45
|
+
props
|
|
46
|
+
]));
|
|
38
47
|
const blocksWrapperRef = useSignal();
|
|
39
48
|
const state = {};
|
|
40
49
|
useVisibleTaskQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
@@ -45,7 +54,7 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
45
54
|
return className.value + " props-blocks-wrapper-BlocksWrapper";
|
|
46
55
|
},
|
|
47
56
|
get "builder-path"() {
|
|
48
|
-
return
|
|
57
|
+
return dataPath.value;
|
|
49
58
|
},
|
|
50
59
|
get "builder-parent-id"() {
|
|
51
60
|
return props.parent;
|
|
@@ -54,29 +63,32 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
54
63
|
return props.styleProp;
|
|
55
64
|
},
|
|
56
65
|
onClick$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
57
|
-
const [blocksWrapperRef2, className2, props2, state2] = useLexicalScope();
|
|
58
|
-
return onClick(props2);
|
|
66
|
+
const [blocksWrapperRef2, className2, dataPath2, props2, state2] = useLexicalScope();
|
|
67
|
+
return onClick(props2, state2, className2, dataPath2);
|
|
59
68
|
}, "BlocksWrapper_component_onClick_ufezvOupQrM", [
|
|
60
69
|
blocksWrapperRef,
|
|
61
70
|
className,
|
|
71
|
+
dataPath,
|
|
62
72
|
props,
|
|
63
73
|
state
|
|
64
74
|
]),
|
|
65
75
|
onKeyPress$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
66
|
-
const [blocksWrapperRef2, className2, props2, state2] = useLexicalScope();
|
|
67
|
-
return onClick(props2);
|
|
76
|
+
const [blocksWrapperRef2, className2, dataPath2, props2, state2] = useLexicalScope();
|
|
77
|
+
return onClick(props2, state2, className2, dataPath2);
|
|
68
78
|
}, "BlocksWrapper_component_onKeyPress_9bz8vCQc3kg", [
|
|
69
79
|
blocksWrapperRef,
|
|
70
80
|
className,
|
|
81
|
+
dataPath,
|
|
71
82
|
props,
|
|
72
83
|
state
|
|
73
84
|
]),
|
|
74
85
|
onMouseEnter$: /* @__PURE__ */ inlinedQrl((event) => {
|
|
75
|
-
const [blocksWrapperRef2, className2, props2, state2] = useLexicalScope();
|
|
76
|
-
return onMouseEnter(props2);
|
|
86
|
+
const [blocksWrapperRef2, className2, dataPath2, props2, state2] = useLexicalScope();
|
|
87
|
+
return onMouseEnter(props2, state2, className2, dataPath2);
|
|
77
88
|
}, "BlocksWrapper_component_onMouseEnter_j4FJjnLtraQ", [
|
|
78
89
|
blocksWrapperRef,
|
|
79
90
|
className,
|
|
91
|
+
dataPath,
|
|
80
92
|
props,
|
|
81
93
|
state
|
|
82
94
|
]),
|
|
@@ -86,9 +98,9 @@ const BlocksWrapper = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((p
|
|
|
86
98
|
"builder-parent-id": _fnSignal((p0) => p0.parent, [
|
|
87
99
|
props
|
|
88
100
|
], "p0.parent"),
|
|
89
|
-
"builder-path": _fnSignal((p0) => p0.
|
|
90
|
-
|
|
91
|
-
], "p0.
|
|
101
|
+
"builder-path": _fnSignal((p0) => p0.value, [
|
|
102
|
+
dataPath
|
|
103
|
+
], "p0.value"),
|
|
92
104
|
class: _fnSignal((p0) => p0.value + " props-blocks-wrapper-BlocksWrapper", [
|
|
93
105
|
className
|
|
94
106
|
], 'p0.value+" props-blocks-wrapper-BlocksWrapper"'),
|
|
@@ -9,6 +9,7 @@ const index = require("../../../functions/get-content/index.qwik.cjs");
|
|
|
9
9
|
const isBrowser = require("../../../functions/is-browser.qwik.cjs");
|
|
10
10
|
const isEditing = require("../../../functions/is-editing.qwik.cjs");
|
|
11
11
|
const isPreviewing = require("../../../functions/is-previewing.qwik.cjs");
|
|
12
|
+
const logFetch = require("../../../functions/log-fetch.qwik.cjs");
|
|
12
13
|
const registerComponent = require("../../../functions/register-component.qwik.cjs");
|
|
13
14
|
const index$1 = require("../../../functions/track/index.qwik.cjs");
|
|
14
15
|
const interaction = require("../../../functions/track/interaction.qwik.cjs");
|
|
@@ -108,6 +109,7 @@ const runHttpRequests = function runHttpRequests2(props, state, showContentProps
|
|
|
108
109
|
rootState: props.builderContextSignal.rootState,
|
|
109
110
|
rootSetState: props.builderContextSignal.rootSetState
|
|
110
111
|
})));
|
|
112
|
+
logFetch.logFetch(evaluatedUrl);
|
|
111
113
|
fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
|
|
112
114
|
mergeNewRootState(props, state, showContentProps, elementRef, {
|
|
113
115
|
[key]: json
|
|
@@ -7,6 +7,7 @@ import { fetchOneEntry } from "../../../functions/get-content/index.qwik.mjs";
|
|
|
7
7
|
import { isBrowser } from "../../../functions/is-browser.qwik.mjs";
|
|
8
8
|
import { isEditing } from "../../../functions/is-editing.qwik.mjs";
|
|
9
9
|
import { isPreviewing } from "../../../functions/is-previewing.qwik.mjs";
|
|
10
|
+
import { logFetch } from "../../../functions/log-fetch.qwik.mjs";
|
|
10
11
|
import { createRegisterComponentMessage } from "../../../functions/register-component.qwik.mjs";
|
|
11
12
|
import { _track } from "../../../functions/track/index.qwik.mjs";
|
|
12
13
|
import { getInteractionPropertiesForEvent } from "../../../functions/track/interaction.qwik.mjs";
|
|
@@ -106,6 +107,7 @@ const runHttpRequests = function runHttpRequests2(props, state, showContentProps
|
|
|
106
107
|
rootState: props.builderContextSignal.rootState,
|
|
107
108
|
rootSetState: props.builderContextSignal.rootSetState
|
|
108
109
|
})));
|
|
110
|
+
logFetch(evaluatedUrl);
|
|
109
111
|
fetch(evaluatedUrl).then((response) => response.json()).then((json) => {
|
|
110
112
|
mergeNewRootState(props, state, showContentProps, elementRef, {
|
|
111
113
|
[key]: json
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const logger = require("../helpers/logger.qwik.cjs");
|
|
4
|
+
function logFetch(url) {
|
|
5
|
+
var _a;
|
|
6
|
+
if (typeof process !== "undefined" && ((_a = process.env) == null ? void 0 : _a.DEBUG)) {
|
|
7
|
+
if (String(process.env.DEBUG) == "true")
|
|
8
|
+
logger.logger.log(url);
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
exports.logFetch = logFetch;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { logger } from "../helpers/logger.qwik.mjs";
|
|
2
|
+
function logFetch(url) {
|
|
3
|
+
var _a;
|
|
4
|
+
if (typeof process !== "undefined" && ((_a = process.env) == null ? void 0 : _a.DEBUG)) {
|
|
5
|
+
if (String(process.env.DEBUG) == "true")
|
|
6
|
+
logger.log(url);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
logFetch
|
|
11
|
+
};
|
|
@@ -7,6 +7,7 @@ const sessionId = require("../../helpers/sessionId.qwik.cjs");
|
|
|
7
7
|
const visitorId = require("../../helpers/visitorId.qwik.cjs");
|
|
8
8
|
const isBrowser = require("../is-browser.qwik.cjs");
|
|
9
9
|
const isEditing = require("../is-editing.qwik.cjs");
|
|
10
|
+
const logFetch = require("../log-fetch.qwik.cjs");
|
|
10
11
|
const helpers = require("./helpers.qwik.cjs");
|
|
11
12
|
const getTrackingEventData = async ({ canTrack }) => {
|
|
12
13
|
if (!canTrack)
|
|
@@ -52,7 +53,9 @@ async function _track({ apiHost, ...eventProps }) {
|
|
|
52
53
|
if (!(isBrowser.isBrowser() || target.TARGET === "reactNative"))
|
|
53
54
|
return;
|
|
54
55
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
55
|
-
|
|
56
|
+
const url = `${baseUrl}/api/v1/track`;
|
|
57
|
+
logFetch.logFetch(url);
|
|
58
|
+
return fetch(url, {
|
|
56
59
|
method: "POST",
|
|
57
60
|
body: JSON.stringify({
|
|
58
61
|
events: [
|
|
@@ -5,6 +5,7 @@ import { getSessionId } from "../../helpers/sessionId.qwik.mjs";
|
|
|
5
5
|
import { getVisitorId } from "../../helpers/visitorId.qwik.mjs";
|
|
6
6
|
import { isBrowser } from "../is-browser.qwik.mjs";
|
|
7
7
|
import { isEditing } from "../is-editing.qwik.mjs";
|
|
8
|
+
import { logFetch } from "../log-fetch.qwik.mjs";
|
|
8
9
|
import { getUserAttributes } from "./helpers.qwik.mjs";
|
|
9
10
|
const getTrackingEventData = async ({ canTrack }) => {
|
|
10
11
|
if (!canTrack)
|
|
@@ -50,7 +51,9 @@ async function _track({ apiHost, ...eventProps }) {
|
|
|
50
51
|
if (!(isBrowser() || TARGET === "reactNative"))
|
|
51
52
|
return;
|
|
52
53
|
const baseUrl = apiHost || "https://cdn.builder.io";
|
|
53
|
-
|
|
54
|
+
const url = `${baseUrl}/api/v1/track`;
|
|
55
|
+
logFetch(url);
|
|
56
|
+
return fetch(url, {
|
|
54
57
|
method: "POST",
|
|
55
58
|
body: JSON.stringify({
|
|
56
59
|
events: [
|
package/package.json
CHANGED
|
@@ -15,8 +15,8 @@ export type BlocksWrapperProps = {
|
|
|
15
15
|
children?: any;
|
|
16
16
|
classNameProp?: string;
|
|
17
17
|
};
|
|
18
|
-
export declare const onClick: (props: any, state: any, className: any, blocksWrapperRef: any) => void;
|
|
19
|
-
export declare const onMouseEnter: (props: any, state: any, className: any, blocksWrapperRef: any) => void;
|
|
18
|
+
export declare const onClick: (props: any, state: any, className: any, dataPath: any, blocksWrapperRef: any) => void;
|
|
19
|
+
export declare const onMouseEnter: (props: any, state: any, className: any, dataPath: any, blocksWrapperRef: any) => void;
|
|
20
20
|
export declare const BlocksWrapper: import("@builder.io/qwik").Component<BlocksWrapperProps>;
|
|
21
21
|
export default BlocksWrapper;
|
|
22
22
|
export declare const STYLES = "\n.props-blocks-wrapper-BlocksWrapper {\n display: flex;\n flex-direction: column;\n align-items: stretch;\n}\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.16.
|
|
1
|
+
export declare const SDK_VERSION = "0.16.23";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function logFetch(url: string): void;
|