@builder.io/sdk-qwik 0.16.7 → 0.16.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/blocks/slot/component-info.qwik.cjs +2 -1
- package/lib/browser/blocks/slot/component-info.qwik.mjs +2 -1
- package/lib/browser/blocks/slot/slot.qwik.cjs +7 -1
- package/lib/browser/blocks/slot/slot.qwik.mjs +7 -1
- package/lib/browser/components/block/block.helpers.qwik.cjs +2 -10
- package/lib/browser/components/block/block.helpers.qwik.mjs +2 -10
- package/lib/browser/components/block/block.qwik.cjs +51 -17
- package/lib/browser/components/block/block.qwik.mjs +53 -19
- package/lib/browser/components/block/components/block-styles.qwik.cjs +2 -17
- package/lib/browser/components/block/components/block-styles.qwik.mjs +2 -17
- package/lib/browser/constants/sdk-version.qwik.cjs +1 -1
- package/lib/browser/constants/sdk-version.qwik.mjs +1 -1
- package/lib/browser/functions/evaluate/evaluate.qwik.cjs +2 -1
- package/lib/browser/functions/evaluate/evaluate.qwik.mjs +2 -1
- package/lib/browser/functions/get-processed-block.qwik.cjs +52 -10
- package/lib/browser/functions/get-processed-block.qwik.mjs +52 -10
- package/lib/browser/helpers/omit.qwik.cjs +9 -0
- package/lib/browser/helpers/omit.qwik.mjs +9 -0
- package/lib/edge/blocks/slot/component-info.qwik.cjs +2 -1
- package/lib/edge/blocks/slot/component-info.qwik.mjs +2 -1
- package/lib/edge/blocks/slot/slot.qwik.cjs +7 -1
- package/lib/edge/blocks/slot/slot.qwik.mjs +7 -1
- package/lib/edge/components/block/block.helpers.qwik.cjs +2 -10
- package/lib/edge/components/block/block.helpers.qwik.mjs +2 -10
- package/lib/edge/components/block/block.qwik.cjs +51 -17
- package/lib/edge/components/block/block.qwik.mjs +53 -19
- package/lib/edge/components/block/components/block-styles.qwik.cjs +2 -17
- package/lib/edge/components/block/components/block-styles.qwik.mjs +2 -17
- package/lib/edge/constants/sdk-version.qwik.cjs +1 -1
- package/lib/edge/constants/sdk-version.qwik.mjs +1 -1
- package/lib/edge/functions/evaluate/evaluate.qwik.cjs +2 -1
- package/lib/edge/functions/evaluate/evaluate.qwik.mjs +2 -1
- package/lib/edge/functions/get-processed-block.qwik.cjs +52 -10
- package/lib/edge/functions/get-processed-block.qwik.mjs +52 -10
- package/lib/edge/helpers/omit.qwik.cjs +9 -0
- package/lib/edge/helpers/omit.qwik.mjs +9 -0
- package/lib/node/blocks/slot/component-info.qwik.cjs +2 -1
- package/lib/node/blocks/slot/component-info.qwik.mjs +2 -1
- package/lib/node/blocks/slot/slot.qwik.cjs +7 -1
- package/lib/node/blocks/slot/slot.qwik.mjs +7 -1
- package/lib/node/components/block/block.helpers.qwik.cjs +2 -10
- package/lib/node/components/block/block.helpers.qwik.mjs +2 -10
- package/lib/node/components/block/block.qwik.cjs +51 -17
- package/lib/node/components/block/block.qwik.mjs +53 -19
- package/lib/node/components/block/components/block-styles.qwik.cjs +2 -17
- package/lib/node/components/block/components/block-styles.qwik.mjs +2 -17
- package/lib/node/constants/sdk-version.qwik.cjs +1 -1
- package/lib/node/constants/sdk-version.qwik.mjs +1 -1
- package/lib/node/functions/evaluate/evaluate.qwik.cjs +2 -1
- package/lib/node/functions/evaluate/evaluate.qwik.mjs +2 -1
- package/lib/node/functions/get-processed-block.qwik.cjs +52 -10
- package/lib/node/functions/get-processed-block.qwik.mjs +52 -10
- package/lib/node/helpers/omit.qwik.cjs +9 -0
- package/lib/node/helpers/omit.qwik.mjs +9 -0
- package/package.json +3 -2
- package/types/src/blocks/slot/slot.d.ts +2 -2
- package/types/src/components/block/block.helpers.d.ts +1 -2
- package/types/src/constants/sdk-version.d.ts +1 -1
- package/types/src/functions/get-processed-block.d.ts +1 -0
|
@@ -20,6 +20,9 @@ const Slot = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
20
20
|
get context() {
|
|
21
21
|
return props.builderContext;
|
|
22
22
|
},
|
|
23
|
+
get registeredComponents() {
|
|
24
|
+
return props.builderComponents;
|
|
25
|
+
},
|
|
23
26
|
blocks: deopt.deoptSignal((_b = props.builderContext.rootState) == null ? void 0 : _b[props.name]),
|
|
24
27
|
[qwik._IMMUTABLE]: {
|
|
25
28
|
context: qwik._fnSignal((p0) => p0.builderContext, [
|
|
@@ -33,7 +36,10 @@ const Slot = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((
|
|
|
33
36
|
], "p0.builderContext.context?.symbolId"),
|
|
34
37
|
path: qwik._fnSignal((p0) => `symbol.data.${p0.name}`, [
|
|
35
38
|
props
|
|
36
|
-
], "`symbol.data.${p0.name}`")
|
|
39
|
+
], "`symbol.data.${p0.name}`"),
|
|
40
|
+
registeredComponents: qwik._fnSignal((p0) => p0.builderComponents, [
|
|
41
|
+
props
|
|
42
|
+
], "p0.builderComponents")
|
|
37
43
|
}
|
|
38
44
|
}, 3, "B1_0")
|
|
39
45
|
}, {
|
|
@@ -18,6 +18,9 @@ const Slot = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
18
18
|
get context() {
|
|
19
19
|
return props.builderContext;
|
|
20
20
|
},
|
|
21
|
+
get registeredComponents() {
|
|
22
|
+
return props.builderComponents;
|
|
23
|
+
},
|
|
21
24
|
blocks: deoptSignal((_b = props.builderContext.rootState) == null ? void 0 : _b[props.name]),
|
|
22
25
|
[_IMMUTABLE]: {
|
|
23
26
|
context: _fnSignal((p0) => p0.builderContext, [
|
|
@@ -31,7 +34,10 @@ const Slot = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
31
34
|
], "p0.builderContext.context?.symbolId"),
|
|
32
35
|
path: _fnSignal((p0) => `symbol.data.${p0.name}`, [
|
|
33
36
|
props
|
|
34
|
-
], "`symbol.data.${p0.name}`")
|
|
37
|
+
], "`symbol.data.${p0.name}`"),
|
|
38
|
+
registeredComponents: _fnSignal((p0) => p0.builderComponents, [
|
|
39
|
+
props
|
|
40
|
+
], "p0.builderComponents")
|
|
35
41
|
}
|
|
36
42
|
}, 3, "B1_0")
|
|
37
43
|
}, {
|
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const evaluate = require("../../functions/evaluate/evaluate.qwik.cjs");
|
|
4
|
-
const
|
|
5
|
-
const getComponent = ({ block, context, registeredComponents }) => {
|
|
4
|
+
const getComponent = ({ block, registeredComponents }) => {
|
|
6
5
|
var _a;
|
|
7
|
-
const componentName = (_a =
|
|
8
|
-
block,
|
|
9
|
-
localState: context.localState,
|
|
10
|
-
rootState: context.rootState,
|
|
11
|
-
rootSetState: context.rootSetState,
|
|
12
|
-
context: context.context,
|
|
13
|
-
shouldEvaluateBindings: false
|
|
14
|
-
}).component) == null ? void 0 : _a.name;
|
|
6
|
+
const componentName = (_a = block.component) == null ? void 0 : _a.name;
|
|
15
7
|
if (!componentName)
|
|
16
8
|
return null;
|
|
17
9
|
const ref = registeredComponents[componentName];
|
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
import { evaluate } from "../../functions/evaluate/evaluate.qwik.mjs";
|
|
2
|
-
|
|
3
|
-
const getComponent = ({ block, context, registeredComponents }) => {
|
|
2
|
+
const getComponent = ({ block, registeredComponents }) => {
|
|
4
3
|
var _a;
|
|
5
|
-
const componentName = (_a =
|
|
6
|
-
block,
|
|
7
|
-
localState: context.localState,
|
|
8
|
-
rootState: context.rootState,
|
|
9
|
-
rootSetState: context.rootSetState,
|
|
10
|
-
context: context.context,
|
|
11
|
-
shouldEvaluateBindings: false
|
|
12
|
-
}).component) == null ? void 0 : _a.name;
|
|
4
|
+
const componentName = (_a = block.component) == null ? void 0 : _a.name;
|
|
13
5
|
if (!componentName)
|
|
14
6
|
return null;
|
|
15
7
|
const ref = registeredComponents[componentName];
|
|
@@ -14,16 +14,12 @@ const repeatedBlock = require("./components/repeated-block.qwik.cjs");
|
|
|
14
14
|
const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl((props) => {
|
|
15
15
|
var _a;
|
|
16
16
|
qwik._jsxBranch();
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
});
|
|
24
|
-
}, "Block_component_blockComponent_useComputed_83sGy9Xlsi0", [
|
|
25
|
-
props
|
|
26
|
-
]));
|
|
17
|
+
qwik.useStore({
|
|
18
|
+
_processedBlock: {
|
|
19
|
+
value: null,
|
|
20
|
+
update: false
|
|
21
|
+
}
|
|
22
|
+
});
|
|
27
23
|
const repeatItem = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
28
24
|
const [props2] = qwik.useLexicalScope();
|
|
29
25
|
return block_helpers.getRepeatItemData({
|
|
@@ -36,7 +32,7 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
36
32
|
const processedBlock = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
37
33
|
var _a2;
|
|
38
34
|
const [props2] = qwik.useLexicalScope();
|
|
39
|
-
|
|
35
|
+
const blockToUse = ((_a2 = props2.block.repeat) == null ? void 0 : _a2.collection) ? props2.block : getProcessedBlock.getProcessedBlock({
|
|
40
36
|
block: props2.block,
|
|
41
37
|
localState: props2.context.localState,
|
|
42
38
|
rootState: props2.context.rootState,
|
|
@@ -44,9 +40,20 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
44
40
|
context: props2.context.context,
|
|
45
41
|
shouldEvaluateBindings: true
|
|
46
42
|
});
|
|
43
|
+
return blockToUse;
|
|
47
44
|
}, "Block_component_processedBlock_useComputed_ESKw0l5FcBc", [
|
|
48
45
|
props
|
|
49
46
|
]));
|
|
47
|
+
const blockComponent = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
48
|
+
const [processedBlock2, props2] = qwik.useLexicalScope();
|
|
49
|
+
return block_helpers.getComponent({
|
|
50
|
+
block: processedBlock2.value,
|
|
51
|
+
registeredComponents: props2.registeredComponents
|
|
52
|
+
});
|
|
53
|
+
}, "Block_component_blockComponent_useComputed_83sGy9Xlsi0", [
|
|
54
|
+
processedBlock,
|
|
55
|
+
props
|
|
56
|
+
]));
|
|
50
57
|
const Tag = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
51
58
|
var _a2;
|
|
52
59
|
const [processedBlock2, props2] = qwik.useLexicalScope();
|
|
@@ -121,20 +128,22 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
121
128
|
}, "Block_component_useVisibleTask_hrTYvqw0Tbs", [
|
|
122
129
|
processedBlock
|
|
123
130
|
]));
|
|
131
|
+
qwik.useTaskQrl(/* @__PURE__ */ qwik.inlinedQrl(({ track }) => {
|
|
132
|
+
}, "Block_component_useTask_Xb7FQvPjBMo"));
|
|
124
133
|
return /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
125
134
|
children: canShowBlock.value ? /* @__PURE__ */ qwik._jsxC(jsxRuntime.Fragment, {
|
|
126
135
|
children: [
|
|
127
136
|
/* @__PURE__ */ qwik._jsxC(blockStyles.BlockStyles, {
|
|
128
137
|
get block() {
|
|
129
|
-
return
|
|
138
|
+
return processedBlock.value;
|
|
130
139
|
},
|
|
131
140
|
get context() {
|
|
132
141
|
return props.context;
|
|
133
142
|
},
|
|
134
143
|
[qwik._IMMUTABLE]: {
|
|
135
|
-
block: qwik._fnSignal((p0) => p0.
|
|
136
|
-
|
|
137
|
-
], "p0.
|
|
144
|
+
block: qwik._fnSignal((p0) => p0.value, [
|
|
145
|
+
processedBlock
|
|
146
|
+
], "p0.value"),
|
|
138
147
|
context: qwik._fnSignal((p0) => p0.context, [
|
|
139
148
|
props
|
|
140
149
|
], "p0.context")
|
|
@@ -271,7 +280,7 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
271
280
|
repeatContext: qwik._wrapProp(data, "context")
|
|
272
281
|
}
|
|
273
282
|
}, 3, index);
|
|
274
|
-
}) : /* @__PURE__ */ qwik._jsxC(componentRef.ComponentRef, {
|
|
283
|
+
}) : !repeatItem.value ? /* @__PURE__ */ qwik._jsxC(componentRef.ComponentRef, {
|
|
275
284
|
get componentRef() {
|
|
276
285
|
return componentRefProps.value.componentRef;
|
|
277
286
|
},
|
|
@@ -328,7 +337,32 @@ const Block = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlinedQrl(
|
|
|
328
337
|
componentRefProps
|
|
329
338
|
], "p0.value.registeredComponents")
|
|
330
339
|
}
|
|
331
|
-
}, 3, "jN_3")
|
|
340
|
+
}, 3, "jN_3") : (repeatItem.value || []).map((data, index) => {
|
|
341
|
+
return /* @__PURE__ */ qwik._jsxC(repeatedBlock.RepeatedBlock, {
|
|
342
|
+
get repeatContext() {
|
|
343
|
+
return data.context;
|
|
344
|
+
},
|
|
345
|
+
get block() {
|
|
346
|
+
return data.block;
|
|
347
|
+
},
|
|
348
|
+
get registeredComponents() {
|
|
349
|
+
return props.registeredComponents;
|
|
350
|
+
},
|
|
351
|
+
get linkComponent() {
|
|
352
|
+
return props.linkComponent;
|
|
353
|
+
},
|
|
354
|
+
[qwik._IMMUTABLE]: {
|
|
355
|
+
block: qwik._wrapProp(data, "block"),
|
|
356
|
+
linkComponent: qwik._fnSignal((p0) => p0.linkComponent, [
|
|
357
|
+
props
|
|
358
|
+
], "p0.linkComponent"),
|
|
359
|
+
registeredComponents: qwik._fnSignal((p0) => p0.registeredComponents, [
|
|
360
|
+
props
|
|
361
|
+
], "p0.registeredComponents"),
|
|
362
|
+
repeatContext: qwik._wrapProp(data, "context")
|
|
363
|
+
}
|
|
364
|
+
}, 3, index);
|
|
365
|
+
})
|
|
332
366
|
]
|
|
333
367
|
}, 1, "jN_4") : null
|
|
334
368
|
}, 1, "jN_5");
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { componentQrl, inlinedQrl, _jsxBranch, useComputedQrl, useLexicalScope, useVisibleTaskQrl, _jsxC, _IMMUTABLE, _fnSignal, _wrapProp } from "@builder.io/qwik";
|
|
1
|
+
import { componentQrl, inlinedQrl, _jsxBranch, useStore, useComputedQrl, useLexicalScope, useVisibleTaskQrl, useTaskQrl, _jsxC, _IMMUTABLE, _fnSignal, _wrapProp } from "@builder.io/qwik";
|
|
2
2
|
import { Fragment } from "@builder.io/qwik/jsx-runtime";
|
|
3
3
|
import { TARGET } from "../../constants/target.qwik.mjs";
|
|
4
4
|
import { getBlockComponentOptions } from "../../functions/get-block-component-options.qwik.mjs";
|
|
5
5
|
import { getProcessedBlock } from "../../functions/get-processed-block.qwik.mjs";
|
|
6
6
|
import { bindAnimations } from "./animator.qwik.mjs";
|
|
7
|
-
import {
|
|
7
|
+
import { getRepeatItemData, getComponent, provideBuilderBlock, provideBuilderContext, provideLinkComponent, provideRegisteredComponents } from "./block.helpers.qwik.mjs";
|
|
8
8
|
import { BlockStyles } from "./components/block-styles.qwik.mjs";
|
|
9
9
|
import { BlockWrapper } from "./components/block-wrapper.qwik.mjs";
|
|
10
10
|
import { ComponentRef } from "./components/component-ref/component-ref.qwik.mjs";
|
|
@@ -12,16 +12,12 @@ import { RepeatedBlock } from "./components/repeated-block.qwik.mjs";
|
|
|
12
12
|
const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) => {
|
|
13
13
|
var _a;
|
|
14
14
|
_jsxBranch();
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
});
|
|
22
|
-
}, "Block_component_blockComponent_useComputed_83sGy9Xlsi0", [
|
|
23
|
-
props
|
|
24
|
-
]));
|
|
15
|
+
useStore({
|
|
16
|
+
_processedBlock: {
|
|
17
|
+
value: null,
|
|
18
|
+
update: false
|
|
19
|
+
}
|
|
20
|
+
});
|
|
25
21
|
const repeatItem = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
26
22
|
const [props2] = useLexicalScope();
|
|
27
23
|
return getRepeatItemData({
|
|
@@ -34,7 +30,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
34
30
|
const processedBlock = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
35
31
|
var _a2;
|
|
36
32
|
const [props2] = useLexicalScope();
|
|
37
|
-
|
|
33
|
+
const blockToUse = ((_a2 = props2.block.repeat) == null ? void 0 : _a2.collection) ? props2.block : getProcessedBlock({
|
|
38
34
|
block: props2.block,
|
|
39
35
|
localState: props2.context.localState,
|
|
40
36
|
rootState: props2.context.rootState,
|
|
@@ -42,9 +38,20 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
42
38
|
context: props2.context.context,
|
|
43
39
|
shouldEvaluateBindings: true
|
|
44
40
|
});
|
|
41
|
+
return blockToUse;
|
|
45
42
|
}, "Block_component_processedBlock_useComputed_ESKw0l5FcBc", [
|
|
46
43
|
props
|
|
47
44
|
]));
|
|
45
|
+
const blockComponent = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
46
|
+
const [processedBlock2, props2] = useLexicalScope();
|
|
47
|
+
return getComponent({
|
|
48
|
+
block: processedBlock2.value,
|
|
49
|
+
registeredComponents: props2.registeredComponents
|
|
50
|
+
});
|
|
51
|
+
}, "Block_component_blockComponent_useComputed_83sGy9Xlsi0", [
|
|
52
|
+
processedBlock,
|
|
53
|
+
props
|
|
54
|
+
]));
|
|
48
55
|
const Tag = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
49
56
|
var _a2;
|
|
50
57
|
const [processedBlock2, props2] = useLexicalScope();
|
|
@@ -119,20 +126,22 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
119
126
|
}, "Block_component_useVisibleTask_hrTYvqw0Tbs", [
|
|
120
127
|
processedBlock
|
|
121
128
|
]));
|
|
129
|
+
useTaskQrl(/* @__PURE__ */ inlinedQrl(({ track }) => {
|
|
130
|
+
}, "Block_component_useTask_Xb7FQvPjBMo"));
|
|
122
131
|
return /* @__PURE__ */ _jsxC(Fragment, {
|
|
123
132
|
children: canShowBlock.value ? /* @__PURE__ */ _jsxC(Fragment, {
|
|
124
133
|
children: [
|
|
125
134
|
/* @__PURE__ */ _jsxC(BlockStyles, {
|
|
126
135
|
get block() {
|
|
127
|
-
return
|
|
136
|
+
return processedBlock.value;
|
|
128
137
|
},
|
|
129
138
|
get context() {
|
|
130
139
|
return props.context;
|
|
131
140
|
},
|
|
132
141
|
[_IMMUTABLE]: {
|
|
133
|
-
block: _fnSignal((p0) => p0.
|
|
134
|
-
|
|
135
|
-
], "p0.
|
|
142
|
+
block: _fnSignal((p0) => p0.value, [
|
|
143
|
+
processedBlock
|
|
144
|
+
], "p0.value"),
|
|
136
145
|
context: _fnSignal((p0) => p0.context, [
|
|
137
146
|
props
|
|
138
147
|
], "p0.context")
|
|
@@ -269,7 +278,7 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
269
278
|
repeatContext: _wrapProp(data, "context")
|
|
270
279
|
}
|
|
271
280
|
}, 3, index);
|
|
272
|
-
}) : /* @__PURE__ */ _jsxC(ComponentRef, {
|
|
281
|
+
}) : !repeatItem.value ? /* @__PURE__ */ _jsxC(ComponentRef, {
|
|
273
282
|
get componentRef() {
|
|
274
283
|
return componentRefProps.value.componentRef;
|
|
275
284
|
},
|
|
@@ -326,7 +335,32 @@ const Block = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((props) =>
|
|
|
326
335
|
componentRefProps
|
|
327
336
|
], "p0.value.registeredComponents")
|
|
328
337
|
}
|
|
329
|
-
}, 3, "jN_3")
|
|
338
|
+
}, 3, "jN_3") : (repeatItem.value || []).map((data, index) => {
|
|
339
|
+
return /* @__PURE__ */ _jsxC(RepeatedBlock, {
|
|
340
|
+
get repeatContext() {
|
|
341
|
+
return data.context;
|
|
342
|
+
},
|
|
343
|
+
get block() {
|
|
344
|
+
return data.block;
|
|
345
|
+
},
|
|
346
|
+
get registeredComponents() {
|
|
347
|
+
return props.registeredComponents;
|
|
348
|
+
},
|
|
349
|
+
get linkComponent() {
|
|
350
|
+
return props.linkComponent;
|
|
351
|
+
},
|
|
352
|
+
[_IMMUTABLE]: {
|
|
353
|
+
block: _wrapProp(data, "block"),
|
|
354
|
+
linkComponent: _fnSignal((p0) => p0.linkComponent, [
|
|
355
|
+
props
|
|
356
|
+
], "p0.linkComponent"),
|
|
357
|
+
registeredComponents: _fnSignal((p0) => p0.registeredComponents, [
|
|
358
|
+
props
|
|
359
|
+
], "p0.registeredComponents"),
|
|
360
|
+
repeatContext: _wrapProp(data, "context")
|
|
361
|
+
}
|
|
362
|
+
}, 3, index);
|
|
363
|
+
})
|
|
330
364
|
]
|
|
331
365
|
}, 1, "jN_4") : null
|
|
332
366
|
}, 1, "jN_5");
|
|
@@ -4,7 +4,6 @@ const qwik = require("@builder.io/qwik");
|
|
|
4
4
|
const jsxRuntime = require("@builder.io/qwik/jsx-runtime");
|
|
5
5
|
const deviceSizes = require("../../../constants/device-sizes.qwik.cjs");
|
|
6
6
|
const camelToKebabCase = require("../../../functions/camel-to-kebab-case.qwik.cjs");
|
|
7
|
-
const getProcessedBlock = require("../../../functions/get-processed-block.qwik.cjs");
|
|
8
7
|
const css = require("../../../helpers/css.qwik.cjs");
|
|
9
8
|
const nullable = require("../../../helpers/nullable.qwik.cjs");
|
|
10
9
|
const inlinedStyles = require("../../inlined-styles.qwik.cjs");
|
|
@@ -12,14 +11,7 @@ const BlockStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
|
|
|
12
11
|
qwik._jsxBranch();
|
|
13
12
|
const canShowBlock = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
14
13
|
const [props2] = qwik.useLexicalScope();
|
|
15
|
-
const processedBlock =
|
|
16
|
-
block: props2.block,
|
|
17
|
-
localState: props2.context.localState,
|
|
18
|
-
rootState: props2.context.rootState,
|
|
19
|
-
rootSetState: props2.context.rootSetState,
|
|
20
|
-
context: props2.context.context,
|
|
21
|
-
shouldEvaluateBindings: true
|
|
22
|
-
});
|
|
14
|
+
const processedBlock = props2.block;
|
|
23
15
|
if (nullable.checkIsDefined(processedBlock.hide))
|
|
24
16
|
return !processedBlock.hide;
|
|
25
17
|
if (nullable.checkIsDefined(processedBlock.show))
|
|
@@ -31,14 +23,7 @@ const BlockStyles = /* @__PURE__ */ qwik.componentQrl(/* @__PURE__ */ qwik.inlin
|
|
|
31
23
|
const css$1 = qwik.useComputedQrl(/* @__PURE__ */ qwik.inlinedQrl(() => {
|
|
32
24
|
var _a, _b, _c;
|
|
33
25
|
const [props2] = qwik.useLexicalScope();
|
|
34
|
-
const processedBlock =
|
|
35
|
-
block: props2.block,
|
|
36
|
-
localState: props2.context.localState,
|
|
37
|
-
rootState: props2.context.rootState,
|
|
38
|
-
rootSetState: props2.context.rootSetState,
|
|
39
|
-
context: props2.context.context,
|
|
40
|
-
shouldEvaluateBindings: true
|
|
41
|
-
});
|
|
26
|
+
const processedBlock = props2.block;
|
|
42
27
|
const styles = processedBlock.responsiveStyles;
|
|
43
28
|
const content = props2.context.content;
|
|
44
29
|
const sizesWithUpdatedBreakpoints = deviceSizes.getSizesForBreakpoints(((_a = content == null ? void 0 : content.meta) == null ? void 0 : _a.breakpoints) || {});
|
|
@@ -2,7 +2,6 @@ import { componentQrl, inlinedQrl, _jsxBranch, useComputedQrl, useLexicalScope,
|
|
|
2
2
|
import { Fragment } from "@builder.io/qwik/jsx-runtime";
|
|
3
3
|
import { getSizesForBreakpoints, getMaxWidthQueryForSize } from "../../../constants/device-sizes.qwik.mjs";
|
|
4
4
|
import { camelToKebabCase } from "../../../functions/camel-to-kebab-case.qwik.mjs";
|
|
5
|
-
import { getProcessedBlock } from "../../../functions/get-processed-block.qwik.mjs";
|
|
6
5
|
import { createCssClass } from "../../../helpers/css.qwik.mjs";
|
|
7
6
|
import { checkIsDefined } from "../../../helpers/nullable.qwik.mjs";
|
|
8
7
|
import { InlinedStyles } from "../../inlined-styles.qwik.mjs";
|
|
@@ -10,14 +9,7 @@ const BlockStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
|
|
|
10
9
|
_jsxBranch();
|
|
11
10
|
const canShowBlock = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
12
11
|
const [props2] = useLexicalScope();
|
|
13
|
-
const processedBlock =
|
|
14
|
-
block: props2.block,
|
|
15
|
-
localState: props2.context.localState,
|
|
16
|
-
rootState: props2.context.rootState,
|
|
17
|
-
rootSetState: props2.context.rootSetState,
|
|
18
|
-
context: props2.context.context,
|
|
19
|
-
shouldEvaluateBindings: true
|
|
20
|
-
});
|
|
12
|
+
const processedBlock = props2.block;
|
|
21
13
|
if (checkIsDefined(processedBlock.hide))
|
|
22
14
|
return !processedBlock.hide;
|
|
23
15
|
if (checkIsDefined(processedBlock.show))
|
|
@@ -29,14 +21,7 @@ const BlockStyles = /* @__PURE__ */ componentQrl(/* @__PURE__ */ inlinedQrl((pro
|
|
|
29
21
|
const css = useComputedQrl(/* @__PURE__ */ inlinedQrl(() => {
|
|
30
22
|
var _a, _b, _c;
|
|
31
23
|
const [props2] = useLexicalScope();
|
|
32
|
-
const processedBlock =
|
|
33
|
-
block: props2.block,
|
|
34
|
-
localState: props2.context.localState,
|
|
35
|
-
rootState: props2.context.rootState,
|
|
36
|
-
rootSetState: props2.context.rootSetState,
|
|
37
|
-
context: props2.context.context,
|
|
38
|
-
shouldEvaluateBindings: true
|
|
39
|
-
});
|
|
24
|
+
const processedBlock = props2.block;
|
|
40
25
|
const styles = processedBlock.responsiveStyles;
|
|
41
26
|
const content = props2.context.content;
|
|
42
27
|
const sizesWithUpdatedBreakpoints = getSizesForBreakpoints(((_a = content == null ? void 0 : content.meta) == null ? void 0 : _a.breakpoints) || {});
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const logger = require("../../helpers/logger.qwik.cjs");
|
|
4
4
|
const chooseEval = require("./choose-eval.qwik.cjs");
|
|
5
5
|
const helpers = require("./helpers.qwik.cjs");
|
|
6
|
+
const DISABLE_CACHE = true;
|
|
6
7
|
const _EvalCache = class _EvalCache2 {
|
|
7
8
|
static getCacheKey(args) {
|
|
8
9
|
return JSON.stringify({
|
|
@@ -41,7 +42,7 @@ function evaluate({ code, context, localState, rootState, rootSetState, event, i
|
|
|
41
42
|
rootState,
|
|
42
43
|
localState
|
|
43
44
|
};
|
|
44
|
-
if (enableCache) {
|
|
45
|
+
if (enableCache && !DISABLE_CACHE) {
|
|
45
46
|
const cacheKey = EvalCache.getCacheKey(args);
|
|
46
47
|
const cachedValue = EvalCache.getCachedValue(cacheKey);
|
|
47
48
|
if (cachedValue)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { logger } from "../../helpers/logger.qwik.mjs";
|
|
2
2
|
import { chooseBrowserOrServerEval } from "./choose-eval.qwik.mjs";
|
|
3
3
|
import { parseCode, getBuilderGlobals } from "./helpers.qwik.mjs";
|
|
4
|
+
const DISABLE_CACHE = true;
|
|
4
5
|
const _EvalCache = class _EvalCache2 {
|
|
5
6
|
static getCacheKey(args) {
|
|
6
7
|
return JSON.stringify({
|
|
@@ -39,7 +40,7 @@ function evaluate({ code, context, localState, rootState, rootSetState, event, i
|
|
|
39
40
|
rootState,
|
|
40
41
|
localState
|
|
41
42
|
};
|
|
42
|
-
if (enableCache) {
|
|
43
|
+
if (enableCache && !DISABLE_CACHE) {
|
|
43
44
|
const cacheKey = EvalCache.getCacheKey(args);
|
|
44
45
|
const cachedValue = EvalCache.getCachedValue(cacheKey);
|
|
45
46
|
if (cachedValue)
|
|
@@ -1,22 +1,63 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const target = require("../constants/target.qwik.cjs");
|
|
4
|
+
const omit = require("../helpers/omit.qwik.cjs");
|
|
3
5
|
const evaluate = require("./evaluate/evaluate.qwik.cjs");
|
|
4
6
|
const fastClone = require("./fast-clone.qwik.cjs");
|
|
5
7
|
const set = require("./set.qwik.cjs");
|
|
6
8
|
const transformBlock = require("./transform-block.qwik.cjs");
|
|
9
|
+
function deepCloneWithConditions(obj) {
|
|
10
|
+
if (obj === null || typeof obj !== "object")
|
|
11
|
+
return obj;
|
|
12
|
+
if (Array.isArray(obj))
|
|
13
|
+
return obj.map((item) => deepCloneWithConditions(item));
|
|
14
|
+
if (obj["@type"] === "@builder.io/sdk:Element")
|
|
15
|
+
return obj;
|
|
16
|
+
const clonedObj = {};
|
|
17
|
+
for (const key in obj)
|
|
18
|
+
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key))
|
|
19
|
+
clonedObj[key] = deepCloneWithConditions(obj[key]);
|
|
20
|
+
return clonedObj;
|
|
21
|
+
}
|
|
22
|
+
const IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK = [
|
|
23
|
+
"svelte",
|
|
24
|
+
"vue",
|
|
25
|
+
"angular",
|
|
26
|
+
"qwik",
|
|
27
|
+
"solid"
|
|
28
|
+
].includes(target.TARGET);
|
|
29
|
+
const getCopy = (block) => {
|
|
30
|
+
if (IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK) {
|
|
31
|
+
const copy = fastClone.fastClone(block);
|
|
32
|
+
const copied = {
|
|
33
|
+
...copy,
|
|
34
|
+
properties: {
|
|
35
|
+
...copy.properties
|
|
36
|
+
},
|
|
37
|
+
actions: {
|
|
38
|
+
...copy.actions
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
return copied;
|
|
42
|
+
} else {
|
|
43
|
+
const copy = deepCloneWithConditions(omit.omit(block, "children", "meta"));
|
|
44
|
+
return {
|
|
45
|
+
...copy,
|
|
46
|
+
properties: {
|
|
47
|
+
...copy.properties
|
|
48
|
+
},
|
|
49
|
+
actions: {
|
|
50
|
+
...copy.actions
|
|
51
|
+
},
|
|
52
|
+
children: block.children,
|
|
53
|
+
meta: block.meta
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
};
|
|
7
57
|
const evaluateBindings = ({ block, context, localState, rootState, rootSetState }) => {
|
|
8
58
|
if (!block.bindings)
|
|
9
59
|
return block;
|
|
10
|
-
const
|
|
11
|
-
const copied = {
|
|
12
|
-
...copy,
|
|
13
|
-
properties: {
|
|
14
|
-
...copy.properties
|
|
15
|
-
},
|
|
16
|
-
actions: {
|
|
17
|
-
...copy.actions
|
|
18
|
-
}
|
|
19
|
-
};
|
|
60
|
+
const copied = getCopy(block);
|
|
20
61
|
for (const binding in block.bindings) {
|
|
21
62
|
const expression = block.bindings[binding];
|
|
22
63
|
const value = evaluate.evaluate({
|
|
@@ -44,4 +85,5 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
|
|
|
44
85
|
else
|
|
45
86
|
return transformedBlock;
|
|
46
87
|
}
|
|
88
|
+
exports.deepCloneWithConditions = deepCloneWithConditions;
|
|
47
89
|
exports.getProcessedBlock = getProcessedBlock;
|
|
@@ -1,20 +1,61 @@
|
|
|
1
|
+
import { TARGET } from "../constants/target.qwik.mjs";
|
|
2
|
+
import { omit } from "../helpers/omit.qwik.mjs";
|
|
1
3
|
import { evaluate } from "./evaluate/evaluate.qwik.mjs";
|
|
2
4
|
import { fastClone } from "./fast-clone.qwik.mjs";
|
|
3
5
|
import { set } from "./set.qwik.mjs";
|
|
4
6
|
import { transformBlock } from "./transform-block.qwik.mjs";
|
|
7
|
+
function deepCloneWithConditions(obj) {
|
|
8
|
+
if (obj === null || typeof obj !== "object")
|
|
9
|
+
return obj;
|
|
10
|
+
if (Array.isArray(obj))
|
|
11
|
+
return obj.map((item) => deepCloneWithConditions(item));
|
|
12
|
+
if (obj["@type"] === "@builder.io/sdk:Element")
|
|
13
|
+
return obj;
|
|
14
|
+
const clonedObj = {};
|
|
15
|
+
for (const key in obj)
|
|
16
|
+
if (key !== "meta" && Object.prototype.hasOwnProperty.call(obj, key))
|
|
17
|
+
clonedObj[key] = deepCloneWithConditions(obj[key]);
|
|
18
|
+
return clonedObj;
|
|
19
|
+
}
|
|
20
|
+
const IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK = [
|
|
21
|
+
"svelte",
|
|
22
|
+
"vue",
|
|
23
|
+
"angular",
|
|
24
|
+
"qwik",
|
|
25
|
+
"solid"
|
|
26
|
+
].includes(TARGET);
|
|
27
|
+
const getCopy = (block) => {
|
|
28
|
+
if (IS_SDK_WITHOUT_CACHED_PROCESSED_BLOCK) {
|
|
29
|
+
const copy = fastClone(block);
|
|
30
|
+
const copied = {
|
|
31
|
+
...copy,
|
|
32
|
+
properties: {
|
|
33
|
+
...copy.properties
|
|
34
|
+
},
|
|
35
|
+
actions: {
|
|
36
|
+
...copy.actions
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
return copied;
|
|
40
|
+
} else {
|
|
41
|
+
const copy = deepCloneWithConditions(omit(block, "children", "meta"));
|
|
42
|
+
return {
|
|
43
|
+
...copy,
|
|
44
|
+
properties: {
|
|
45
|
+
...copy.properties
|
|
46
|
+
},
|
|
47
|
+
actions: {
|
|
48
|
+
...copy.actions
|
|
49
|
+
},
|
|
50
|
+
children: block.children,
|
|
51
|
+
meta: block.meta
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
};
|
|
5
55
|
const evaluateBindings = ({ block, context, localState, rootState, rootSetState }) => {
|
|
6
56
|
if (!block.bindings)
|
|
7
57
|
return block;
|
|
8
|
-
const
|
|
9
|
-
const copied = {
|
|
10
|
-
...copy,
|
|
11
|
-
properties: {
|
|
12
|
-
...copy.properties
|
|
13
|
-
},
|
|
14
|
-
actions: {
|
|
15
|
-
...copy.actions
|
|
16
|
-
}
|
|
17
|
-
};
|
|
58
|
+
const copied = getCopy(block);
|
|
18
59
|
for (const binding in block.bindings) {
|
|
19
60
|
const expression = block.bindings[binding];
|
|
20
61
|
const value = evaluate({
|
|
@@ -43,5 +84,6 @@ function getProcessedBlock({ block, context, shouldEvaluateBindings, localState,
|
|
|
43
84
|
return transformedBlock;
|
|
44
85
|
}
|
|
45
86
|
export {
|
|
87
|
+
deepCloneWithConditions,
|
|
46
88
|
getProcessedBlock
|
|
47
89
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
function omit(obj, ...values) {
|
|
4
|
+
const newObject = Object.assign({}, obj);
|
|
5
|
+
for (const key of values)
|
|
6
|
+
delete newObject[key];
|
|
7
|
+
return newObject;
|
|
8
|
+
}
|
|
9
|
+
exports.omit = omit;
|