@builder.io/sdk-solid 0.7.4 → 0.7.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/dev.js +14 -15
- package/lib/browser/dev.jsx +14 -15
- package/lib/browser/index.js +14 -15
- package/lib/browser/index.jsx +14 -15
- package/lib/edge/dev.js +14 -15
- package/lib/edge/dev.jsx +14 -15
- package/lib/edge/index.js +14 -15
- package/lib/edge/index.jsx +14 -15
- package/lib/node/dev.js +14 -15
- package/lib/node/dev.jsx +14 -15
- package/lib/node/index.js +14 -15
- package/lib/node/index.jsx +14 -15
- package/package.json +1 -1
package/lib/browser/dev.js
CHANGED
|
@@ -943,7 +943,7 @@ function Block(props) {
|
|
|
943
943
|
});
|
|
944
944
|
}
|
|
945
945
|
function processedBlock() {
|
|
946
|
-
return
|
|
946
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
947
947
|
block: props.block,
|
|
948
948
|
localState: props.context.localState,
|
|
949
949
|
rootState: props.context.rootState,
|
|
@@ -956,13 +956,14 @@ function Block(props) {
|
|
|
956
956
|
return props.block.tagName || "div";
|
|
957
957
|
}
|
|
958
958
|
function canShowBlock() {
|
|
959
|
-
if (
|
|
960
|
-
|
|
959
|
+
if (props.block.repeat?.collection) {
|
|
960
|
+
if (repeatItem()?.length)
|
|
961
|
+
return true;
|
|
962
|
+
return false;
|
|
961
963
|
}
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
return true;
|
|
964
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
965
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
966
|
+
return shouldShow && !shouldHide;
|
|
966
967
|
}
|
|
967
968
|
function childrenWithoutParentComponent() {
|
|
968
969
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -3366,7 +3367,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3366
3367
|
};
|
|
3367
3368
|
|
|
3368
3369
|
// src/constants/sdk-version.ts
|
|
3369
|
-
var SDK_VERSION = "0.7.
|
|
3370
|
+
var SDK_VERSION = "0.7.6";
|
|
3370
3371
|
|
|
3371
3372
|
// src/functions/register.ts
|
|
3372
3373
|
var registry = {};
|
|
@@ -3862,22 +3863,20 @@ var getContextStateInitialValue = ({
|
|
|
3862
3863
|
locale
|
|
3863
3864
|
}) => {
|
|
3864
3865
|
const defaultValues = {};
|
|
3866
|
+
const initialState = content?.data?.state || {};
|
|
3865
3867
|
content?.data?.inputs?.forEach((input) => {
|
|
3866
|
-
if (input.name && input.defaultValue !== void 0
|
|
3868
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3867
3869
|
defaultValues[input.name] = input.defaultValue;
|
|
3868
3870
|
}
|
|
3869
3871
|
});
|
|
3870
|
-
|
|
3871
|
-
...
|
|
3872
|
+
return {
|
|
3873
|
+
...defaultValues,
|
|
3874
|
+
...initialState,
|
|
3872
3875
|
...data,
|
|
3873
3876
|
...locale ? {
|
|
3874
3877
|
locale
|
|
3875
3878
|
} : {}
|
|
3876
3879
|
};
|
|
3877
|
-
return {
|
|
3878
|
-
...defaultValues,
|
|
3879
|
-
...stateToUse
|
|
3880
|
-
};
|
|
3881
3880
|
};
|
|
3882
3881
|
var getContentInitialValue = ({
|
|
3883
3882
|
content,
|
package/lib/browser/dev.jsx
CHANGED
|
@@ -883,7 +883,7 @@ function Block(props) {
|
|
|
883
883
|
});
|
|
884
884
|
}
|
|
885
885
|
function processedBlock() {
|
|
886
|
-
return
|
|
886
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
887
887
|
block: props.block,
|
|
888
888
|
localState: props.context.localState,
|
|
889
889
|
rootState: props.context.rootState,
|
|
@@ -896,13 +896,14 @@ function Block(props) {
|
|
|
896
896
|
return props.block.tagName || "div";
|
|
897
897
|
}
|
|
898
898
|
function canShowBlock() {
|
|
899
|
-
if (
|
|
900
|
-
|
|
899
|
+
if (props.block.repeat?.collection) {
|
|
900
|
+
if (repeatItem()?.length)
|
|
901
|
+
return true;
|
|
902
|
+
return false;
|
|
901
903
|
}
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
return true;
|
|
904
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
905
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
906
|
+
return shouldShow && !shouldHide;
|
|
906
907
|
}
|
|
907
908
|
function childrenWithoutParentComponent() {
|
|
908
909
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -3032,7 +3033,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3032
3033
|
};
|
|
3033
3034
|
|
|
3034
3035
|
// src/constants/sdk-version.ts
|
|
3035
|
-
var SDK_VERSION = "0.7.
|
|
3036
|
+
var SDK_VERSION = "0.7.6";
|
|
3036
3037
|
|
|
3037
3038
|
// src/functions/register.ts
|
|
3038
3039
|
var registry = {};
|
|
@@ -3526,22 +3527,20 @@ var getContextStateInitialValue = ({
|
|
|
3526
3527
|
locale
|
|
3527
3528
|
}) => {
|
|
3528
3529
|
const defaultValues = {};
|
|
3530
|
+
const initialState = content?.data?.state || {};
|
|
3529
3531
|
content?.data?.inputs?.forEach((input) => {
|
|
3530
|
-
if (input.name && input.defaultValue !== void 0
|
|
3532
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3531
3533
|
defaultValues[input.name] = input.defaultValue;
|
|
3532
3534
|
}
|
|
3533
3535
|
});
|
|
3534
|
-
|
|
3535
|
-
...
|
|
3536
|
+
return {
|
|
3537
|
+
...defaultValues,
|
|
3538
|
+
...initialState,
|
|
3536
3539
|
...data,
|
|
3537
3540
|
...locale ? {
|
|
3538
3541
|
locale
|
|
3539
3542
|
} : {}
|
|
3540
3543
|
};
|
|
3541
|
-
return {
|
|
3542
|
-
...defaultValues,
|
|
3543
|
-
...stateToUse
|
|
3544
|
-
};
|
|
3545
3544
|
};
|
|
3546
3545
|
var getContentInitialValue = ({
|
|
3547
3546
|
content,
|
package/lib/browser/index.js
CHANGED
|
@@ -931,7 +931,7 @@ function Block(props) {
|
|
|
931
931
|
});
|
|
932
932
|
}
|
|
933
933
|
function processedBlock() {
|
|
934
|
-
return
|
|
934
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
935
935
|
block: props.block,
|
|
936
936
|
localState: props.context.localState,
|
|
937
937
|
rootState: props.context.rootState,
|
|
@@ -944,13 +944,14 @@ function Block(props) {
|
|
|
944
944
|
return props.block.tagName || "div";
|
|
945
945
|
}
|
|
946
946
|
function canShowBlock() {
|
|
947
|
-
if (
|
|
948
|
-
|
|
947
|
+
if (props.block.repeat?.collection) {
|
|
948
|
+
if (repeatItem()?.length)
|
|
949
|
+
return true;
|
|
950
|
+
return false;
|
|
949
951
|
}
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
return true;
|
|
952
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
953
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
954
|
+
return shouldShow && !shouldHide;
|
|
954
955
|
}
|
|
955
956
|
function childrenWithoutParentComponent() {
|
|
956
957
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -3345,7 +3346,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3345
3346
|
};
|
|
3346
3347
|
|
|
3347
3348
|
// src/constants/sdk-version.ts
|
|
3348
|
-
var SDK_VERSION = "0.7.
|
|
3349
|
+
var SDK_VERSION = "0.7.6";
|
|
3349
3350
|
|
|
3350
3351
|
// src/functions/register.ts
|
|
3351
3352
|
var registry = {};
|
|
@@ -3839,22 +3840,20 @@ var getContextStateInitialValue = ({
|
|
|
3839
3840
|
locale
|
|
3840
3841
|
}) => {
|
|
3841
3842
|
const defaultValues = {};
|
|
3843
|
+
const initialState = content?.data?.state || {};
|
|
3842
3844
|
content?.data?.inputs?.forEach((input) => {
|
|
3843
|
-
if (input.name && input.defaultValue !== void 0
|
|
3845
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3844
3846
|
defaultValues[input.name] = input.defaultValue;
|
|
3845
3847
|
}
|
|
3846
3848
|
});
|
|
3847
|
-
|
|
3848
|
-
...
|
|
3849
|
+
return {
|
|
3850
|
+
...defaultValues,
|
|
3851
|
+
...initialState,
|
|
3849
3852
|
...data,
|
|
3850
3853
|
...locale ? {
|
|
3851
3854
|
locale
|
|
3852
3855
|
} : {}
|
|
3853
3856
|
};
|
|
3854
|
-
return {
|
|
3855
|
-
...defaultValues,
|
|
3856
|
-
...stateToUse
|
|
3857
|
-
};
|
|
3858
3857
|
};
|
|
3859
3858
|
var getContentInitialValue = ({
|
|
3860
3859
|
content,
|
package/lib/browser/index.jsx
CHANGED
|
@@ -876,7 +876,7 @@ function Block(props) {
|
|
|
876
876
|
});
|
|
877
877
|
}
|
|
878
878
|
function processedBlock() {
|
|
879
|
-
return
|
|
879
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
880
880
|
block: props.block,
|
|
881
881
|
localState: props.context.localState,
|
|
882
882
|
rootState: props.context.rootState,
|
|
@@ -889,13 +889,14 @@ function Block(props) {
|
|
|
889
889
|
return props.block.tagName || "div";
|
|
890
890
|
}
|
|
891
891
|
function canShowBlock() {
|
|
892
|
-
if (
|
|
893
|
-
|
|
892
|
+
if (props.block.repeat?.collection) {
|
|
893
|
+
if (repeatItem()?.length)
|
|
894
|
+
return true;
|
|
895
|
+
return false;
|
|
894
896
|
}
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
return true;
|
|
897
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
898
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
899
|
+
return shouldShow && !shouldHide;
|
|
899
900
|
}
|
|
900
901
|
function childrenWithoutParentComponent() {
|
|
901
902
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -3016,7 +3017,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3016
3017
|
};
|
|
3017
3018
|
|
|
3018
3019
|
// src/constants/sdk-version.ts
|
|
3019
|
-
var SDK_VERSION = "0.7.
|
|
3020
|
+
var SDK_VERSION = "0.7.6";
|
|
3020
3021
|
|
|
3021
3022
|
// src/functions/register.ts
|
|
3022
3023
|
var registry = {};
|
|
@@ -3508,22 +3509,20 @@ var getContextStateInitialValue = ({
|
|
|
3508
3509
|
locale
|
|
3509
3510
|
}) => {
|
|
3510
3511
|
const defaultValues = {};
|
|
3512
|
+
const initialState = content?.data?.state || {};
|
|
3511
3513
|
content?.data?.inputs?.forEach((input) => {
|
|
3512
|
-
if (input.name && input.defaultValue !== void 0
|
|
3514
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3513
3515
|
defaultValues[input.name] = input.defaultValue;
|
|
3514
3516
|
}
|
|
3515
3517
|
});
|
|
3516
|
-
|
|
3517
|
-
...
|
|
3518
|
+
return {
|
|
3519
|
+
...defaultValues,
|
|
3520
|
+
...initialState,
|
|
3518
3521
|
...data,
|
|
3519
3522
|
...locale ? {
|
|
3520
3523
|
locale
|
|
3521
3524
|
} : {}
|
|
3522
3525
|
};
|
|
3523
|
-
return {
|
|
3524
|
-
...defaultValues,
|
|
3525
|
-
...stateToUse
|
|
3526
|
-
};
|
|
3527
3526
|
};
|
|
3528
3527
|
var getContentInitialValue = ({
|
|
3529
3528
|
content,
|
package/lib/edge/dev.js
CHANGED
|
@@ -4096,7 +4096,7 @@ function Block(props) {
|
|
|
4096
4096
|
});
|
|
4097
4097
|
}
|
|
4098
4098
|
function processedBlock() {
|
|
4099
|
-
return
|
|
4099
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
4100
4100
|
block: props.block,
|
|
4101
4101
|
localState: props.context.localState,
|
|
4102
4102
|
rootState: props.context.rootState,
|
|
@@ -4109,13 +4109,14 @@ function Block(props) {
|
|
|
4109
4109
|
return props.block.tagName || "div";
|
|
4110
4110
|
}
|
|
4111
4111
|
function canShowBlock() {
|
|
4112
|
-
if (
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
return processedBlock().show;
|
|
4112
|
+
if (props.block.repeat?.collection) {
|
|
4113
|
+
if (repeatItem()?.length)
|
|
4114
|
+
return true;
|
|
4115
|
+
return false;
|
|
4117
4116
|
}
|
|
4118
|
-
|
|
4117
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
4118
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
4119
|
+
return shouldShow && !shouldHide;
|
|
4119
4120
|
}
|
|
4120
4121
|
function childrenWithoutParentComponent() {
|
|
4121
4122
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -6519,7 +6520,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6519
6520
|
};
|
|
6520
6521
|
|
|
6521
6522
|
// src/constants/sdk-version.ts
|
|
6522
|
-
var SDK_VERSION = "0.7.
|
|
6523
|
+
var SDK_VERSION = "0.7.6";
|
|
6523
6524
|
|
|
6524
6525
|
// src/functions/register.ts
|
|
6525
6526
|
var registry = {};
|
|
@@ -7015,22 +7016,20 @@ var getContextStateInitialValue = ({
|
|
|
7015
7016
|
locale
|
|
7016
7017
|
}) => {
|
|
7017
7018
|
const defaultValues = {};
|
|
7019
|
+
const initialState = content?.data?.state || {};
|
|
7018
7020
|
content?.data?.inputs?.forEach((input) => {
|
|
7019
|
-
if (input.name && input.defaultValue !== void 0
|
|
7021
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
7020
7022
|
defaultValues[input.name] = input.defaultValue;
|
|
7021
7023
|
}
|
|
7022
7024
|
});
|
|
7023
|
-
|
|
7024
|
-
...
|
|
7025
|
+
return {
|
|
7026
|
+
...defaultValues,
|
|
7027
|
+
...initialState,
|
|
7025
7028
|
...data,
|
|
7026
7029
|
...locale ? {
|
|
7027
7030
|
locale
|
|
7028
7031
|
} : {}
|
|
7029
7032
|
};
|
|
7030
|
-
return {
|
|
7031
|
-
...defaultValues,
|
|
7032
|
-
...stateToUse
|
|
7033
|
-
};
|
|
7034
7033
|
};
|
|
7035
7034
|
var getContentInitialValue = ({
|
|
7036
7035
|
content,
|
package/lib/edge/dev.jsx
CHANGED
|
@@ -4038,7 +4038,7 @@ function Block(props) {
|
|
|
4038
4038
|
});
|
|
4039
4039
|
}
|
|
4040
4040
|
function processedBlock() {
|
|
4041
|
-
return
|
|
4041
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
4042
4042
|
block: props.block,
|
|
4043
4043
|
localState: props.context.localState,
|
|
4044
4044
|
rootState: props.context.rootState,
|
|
@@ -4051,13 +4051,14 @@ function Block(props) {
|
|
|
4051
4051
|
return props.block.tagName || "div";
|
|
4052
4052
|
}
|
|
4053
4053
|
function canShowBlock() {
|
|
4054
|
-
if (
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
return processedBlock().show;
|
|
4054
|
+
if (props.block.repeat?.collection) {
|
|
4055
|
+
if (repeatItem()?.length)
|
|
4056
|
+
return true;
|
|
4057
|
+
return false;
|
|
4059
4058
|
}
|
|
4060
|
-
|
|
4059
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
4060
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
4061
|
+
return shouldShow && !shouldHide;
|
|
4061
4062
|
}
|
|
4062
4063
|
function childrenWithoutParentComponent() {
|
|
4063
4064
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -6187,7 +6188,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6187
6188
|
};
|
|
6188
6189
|
|
|
6189
6190
|
// src/constants/sdk-version.ts
|
|
6190
|
-
var SDK_VERSION = "0.7.
|
|
6191
|
+
var SDK_VERSION = "0.7.6";
|
|
6191
6192
|
|
|
6192
6193
|
// src/functions/register.ts
|
|
6193
6194
|
var registry = {};
|
|
@@ -6681,22 +6682,20 @@ var getContextStateInitialValue = ({
|
|
|
6681
6682
|
locale
|
|
6682
6683
|
}) => {
|
|
6683
6684
|
const defaultValues = {};
|
|
6685
|
+
const initialState = content?.data?.state || {};
|
|
6684
6686
|
content?.data?.inputs?.forEach((input) => {
|
|
6685
|
-
if (input.name && input.defaultValue !== void 0
|
|
6687
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
6686
6688
|
defaultValues[input.name] = input.defaultValue;
|
|
6687
6689
|
}
|
|
6688
6690
|
});
|
|
6689
|
-
|
|
6690
|
-
...
|
|
6691
|
+
return {
|
|
6692
|
+
...defaultValues,
|
|
6693
|
+
...initialState,
|
|
6691
6694
|
...data,
|
|
6692
6695
|
...locale ? {
|
|
6693
6696
|
locale
|
|
6694
6697
|
} : {}
|
|
6695
6698
|
};
|
|
6696
|
-
return {
|
|
6697
|
-
...defaultValues,
|
|
6698
|
-
...stateToUse
|
|
6699
|
-
};
|
|
6700
6699
|
};
|
|
6701
6700
|
var getContentInitialValue = ({
|
|
6702
6701
|
content,
|
package/lib/edge/index.js
CHANGED
|
@@ -4084,7 +4084,7 @@ function Block(props) {
|
|
|
4084
4084
|
});
|
|
4085
4085
|
}
|
|
4086
4086
|
function processedBlock() {
|
|
4087
|
-
return
|
|
4087
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
4088
4088
|
block: props.block,
|
|
4089
4089
|
localState: props.context.localState,
|
|
4090
4090
|
rootState: props.context.rootState,
|
|
@@ -4097,13 +4097,14 @@ function Block(props) {
|
|
|
4097
4097
|
return props.block.tagName || "div";
|
|
4098
4098
|
}
|
|
4099
4099
|
function canShowBlock() {
|
|
4100
|
-
if (
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
return processedBlock().show;
|
|
4100
|
+
if (props.block.repeat?.collection) {
|
|
4101
|
+
if (repeatItem()?.length)
|
|
4102
|
+
return true;
|
|
4103
|
+
return false;
|
|
4105
4104
|
}
|
|
4106
|
-
|
|
4105
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
4106
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
4107
|
+
return shouldShow && !shouldHide;
|
|
4107
4108
|
}
|
|
4108
4109
|
function childrenWithoutParentComponent() {
|
|
4109
4110
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -6498,7 +6499,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6498
6499
|
};
|
|
6499
6500
|
|
|
6500
6501
|
// src/constants/sdk-version.ts
|
|
6501
|
-
var SDK_VERSION = "0.7.
|
|
6502
|
+
var SDK_VERSION = "0.7.6";
|
|
6502
6503
|
|
|
6503
6504
|
// src/functions/register.ts
|
|
6504
6505
|
var registry = {};
|
|
@@ -6992,22 +6993,20 @@ var getContextStateInitialValue = ({
|
|
|
6992
6993
|
locale
|
|
6993
6994
|
}) => {
|
|
6994
6995
|
const defaultValues = {};
|
|
6996
|
+
const initialState = content?.data?.state || {};
|
|
6995
6997
|
content?.data?.inputs?.forEach((input) => {
|
|
6996
|
-
if (input.name && input.defaultValue !== void 0
|
|
6998
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
6997
6999
|
defaultValues[input.name] = input.defaultValue;
|
|
6998
7000
|
}
|
|
6999
7001
|
});
|
|
7000
|
-
|
|
7001
|
-
...
|
|
7002
|
+
return {
|
|
7003
|
+
...defaultValues,
|
|
7004
|
+
...initialState,
|
|
7002
7005
|
...data,
|
|
7003
7006
|
...locale ? {
|
|
7004
7007
|
locale
|
|
7005
7008
|
} : {}
|
|
7006
7009
|
};
|
|
7007
|
-
return {
|
|
7008
|
-
...defaultValues,
|
|
7009
|
-
...stateToUse
|
|
7010
|
-
};
|
|
7011
7010
|
};
|
|
7012
7011
|
var getContentInitialValue = ({
|
|
7013
7012
|
content,
|
package/lib/edge/index.jsx
CHANGED
|
@@ -4031,7 +4031,7 @@ function Block(props) {
|
|
|
4031
4031
|
});
|
|
4032
4032
|
}
|
|
4033
4033
|
function processedBlock() {
|
|
4034
|
-
return
|
|
4034
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
4035
4035
|
block: props.block,
|
|
4036
4036
|
localState: props.context.localState,
|
|
4037
4037
|
rootState: props.context.rootState,
|
|
@@ -4044,13 +4044,14 @@ function Block(props) {
|
|
|
4044
4044
|
return props.block.tagName || "div";
|
|
4045
4045
|
}
|
|
4046
4046
|
function canShowBlock() {
|
|
4047
|
-
if (
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
return processedBlock().show;
|
|
4047
|
+
if (props.block.repeat?.collection) {
|
|
4048
|
+
if (repeatItem()?.length)
|
|
4049
|
+
return true;
|
|
4050
|
+
return false;
|
|
4052
4051
|
}
|
|
4053
|
-
|
|
4052
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
4053
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
4054
|
+
return shouldShow && !shouldHide;
|
|
4054
4055
|
}
|
|
4055
4056
|
function childrenWithoutParentComponent() {
|
|
4056
4057
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -6171,7 +6172,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6171
6172
|
};
|
|
6172
6173
|
|
|
6173
6174
|
// src/constants/sdk-version.ts
|
|
6174
|
-
var SDK_VERSION = "0.7.
|
|
6175
|
+
var SDK_VERSION = "0.7.6";
|
|
6175
6176
|
|
|
6176
6177
|
// src/functions/register.ts
|
|
6177
6178
|
var registry = {};
|
|
@@ -6663,22 +6664,20 @@ var getContextStateInitialValue = ({
|
|
|
6663
6664
|
locale
|
|
6664
6665
|
}) => {
|
|
6665
6666
|
const defaultValues = {};
|
|
6667
|
+
const initialState = content?.data?.state || {};
|
|
6666
6668
|
content?.data?.inputs?.forEach((input) => {
|
|
6667
|
-
if (input.name && input.defaultValue !== void 0
|
|
6669
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
6668
6670
|
defaultValues[input.name] = input.defaultValue;
|
|
6669
6671
|
}
|
|
6670
6672
|
});
|
|
6671
|
-
|
|
6672
|
-
...
|
|
6673
|
+
return {
|
|
6674
|
+
...defaultValues,
|
|
6675
|
+
...initialState,
|
|
6673
6676
|
...data,
|
|
6674
6677
|
...locale ? {
|
|
6675
6678
|
locale
|
|
6676
6679
|
} : {}
|
|
6677
6680
|
};
|
|
6678
|
-
return {
|
|
6679
|
-
...defaultValues,
|
|
6680
|
-
...stateToUse
|
|
6681
|
-
};
|
|
6682
6681
|
};
|
|
6683
6682
|
var getContentInitialValue = ({
|
|
6684
6683
|
content,
|
package/lib/node/dev.js
CHANGED
|
@@ -1062,7 +1062,7 @@ function Block(props) {
|
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
1064
1064
|
function processedBlock() {
|
|
1065
|
-
return
|
|
1065
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
1066
1066
|
block: props.block,
|
|
1067
1067
|
localState: props.context.localState,
|
|
1068
1068
|
rootState: props.context.rootState,
|
|
@@ -1075,13 +1075,14 @@ function Block(props) {
|
|
|
1075
1075
|
return props.block.tagName || "div";
|
|
1076
1076
|
}
|
|
1077
1077
|
function canShowBlock() {
|
|
1078
|
-
if (
|
|
1079
|
-
|
|
1078
|
+
if (props.block.repeat?.collection) {
|
|
1079
|
+
if (repeatItem()?.length)
|
|
1080
|
+
return true;
|
|
1081
|
+
return false;
|
|
1080
1082
|
}
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
return true;
|
|
1083
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
1084
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
1085
|
+
return shouldShow && !shouldHide;
|
|
1085
1086
|
}
|
|
1086
1087
|
function childrenWithoutParentComponent() {
|
|
1087
1088
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -3485,7 +3486,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3485
3486
|
};
|
|
3486
3487
|
|
|
3487
3488
|
// src/constants/sdk-version.ts
|
|
3488
|
-
var SDK_VERSION = "0.7.
|
|
3489
|
+
var SDK_VERSION = "0.7.6";
|
|
3489
3490
|
|
|
3490
3491
|
// src/functions/register.ts
|
|
3491
3492
|
var registry = {};
|
|
@@ -3981,22 +3982,20 @@ var getContextStateInitialValue = ({
|
|
|
3981
3982
|
locale
|
|
3982
3983
|
}) => {
|
|
3983
3984
|
const defaultValues = {};
|
|
3985
|
+
const initialState = content?.data?.state || {};
|
|
3984
3986
|
content?.data?.inputs?.forEach((input) => {
|
|
3985
|
-
if (input.name && input.defaultValue !== void 0
|
|
3987
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3986
3988
|
defaultValues[input.name] = input.defaultValue;
|
|
3987
3989
|
}
|
|
3988
3990
|
});
|
|
3989
|
-
|
|
3990
|
-
...
|
|
3991
|
+
return {
|
|
3992
|
+
...defaultValues,
|
|
3993
|
+
...initialState,
|
|
3991
3994
|
...data,
|
|
3992
3995
|
...locale ? {
|
|
3993
3996
|
locale
|
|
3994
3997
|
} : {}
|
|
3995
3998
|
};
|
|
3996
|
-
return {
|
|
3997
|
-
...defaultValues,
|
|
3998
|
-
...stateToUse
|
|
3999
|
-
};
|
|
4000
3999
|
};
|
|
4001
4000
|
var getContentInitialValue = ({
|
|
4002
4001
|
content,
|
package/lib/node/dev.jsx
CHANGED
|
@@ -1004,7 +1004,7 @@ function Block(props) {
|
|
|
1004
1004
|
});
|
|
1005
1005
|
}
|
|
1006
1006
|
function processedBlock() {
|
|
1007
|
-
return
|
|
1007
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
1008
1008
|
block: props.block,
|
|
1009
1009
|
localState: props.context.localState,
|
|
1010
1010
|
rootState: props.context.rootState,
|
|
@@ -1017,13 +1017,14 @@ function Block(props) {
|
|
|
1017
1017
|
return props.block.tagName || "div";
|
|
1018
1018
|
}
|
|
1019
1019
|
function canShowBlock() {
|
|
1020
|
-
if (
|
|
1021
|
-
|
|
1020
|
+
if (props.block.repeat?.collection) {
|
|
1021
|
+
if (repeatItem()?.length)
|
|
1022
|
+
return true;
|
|
1023
|
+
return false;
|
|
1022
1024
|
}
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
return true;
|
|
1025
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
1026
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
1027
|
+
return shouldShow && !shouldHide;
|
|
1027
1028
|
}
|
|
1028
1029
|
function childrenWithoutParentComponent() {
|
|
1029
1030
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -3153,7 +3154,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3153
3154
|
};
|
|
3154
3155
|
|
|
3155
3156
|
// src/constants/sdk-version.ts
|
|
3156
|
-
var SDK_VERSION = "0.7.
|
|
3157
|
+
var SDK_VERSION = "0.7.6";
|
|
3157
3158
|
|
|
3158
3159
|
// src/functions/register.ts
|
|
3159
3160
|
var registry = {};
|
|
@@ -3647,22 +3648,20 @@ var getContextStateInitialValue = ({
|
|
|
3647
3648
|
locale
|
|
3648
3649
|
}) => {
|
|
3649
3650
|
const defaultValues = {};
|
|
3651
|
+
const initialState = content?.data?.state || {};
|
|
3650
3652
|
content?.data?.inputs?.forEach((input) => {
|
|
3651
|
-
if (input.name && input.defaultValue !== void 0
|
|
3653
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3652
3654
|
defaultValues[input.name] = input.defaultValue;
|
|
3653
3655
|
}
|
|
3654
3656
|
});
|
|
3655
|
-
|
|
3656
|
-
...
|
|
3657
|
+
return {
|
|
3658
|
+
...defaultValues,
|
|
3659
|
+
...initialState,
|
|
3657
3660
|
...data,
|
|
3658
3661
|
...locale ? {
|
|
3659
3662
|
locale
|
|
3660
3663
|
} : {}
|
|
3661
3664
|
};
|
|
3662
|
-
return {
|
|
3663
|
-
...defaultValues,
|
|
3664
|
-
...stateToUse
|
|
3665
|
-
};
|
|
3666
3665
|
};
|
|
3667
3666
|
var getContentInitialValue = ({
|
|
3668
3667
|
content,
|
package/lib/node/index.js
CHANGED
|
@@ -1049,7 +1049,7 @@ function Block(props) {
|
|
|
1049
1049
|
});
|
|
1050
1050
|
}
|
|
1051
1051
|
function processedBlock() {
|
|
1052
|
-
return
|
|
1052
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
1053
1053
|
block: props.block,
|
|
1054
1054
|
localState: props.context.localState,
|
|
1055
1055
|
rootState: props.context.rootState,
|
|
@@ -1062,13 +1062,14 @@ function Block(props) {
|
|
|
1062
1062
|
return props.block.tagName || "div";
|
|
1063
1063
|
}
|
|
1064
1064
|
function canShowBlock() {
|
|
1065
|
-
if (
|
|
1066
|
-
|
|
1065
|
+
if (props.block.repeat?.collection) {
|
|
1066
|
+
if (repeatItem()?.length)
|
|
1067
|
+
return true;
|
|
1068
|
+
return false;
|
|
1067
1069
|
}
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
return true;
|
|
1070
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
1071
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
1072
|
+
return shouldShow && !shouldHide;
|
|
1072
1073
|
}
|
|
1073
1074
|
function childrenWithoutParentComponent() {
|
|
1074
1075
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -3463,7 +3464,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3463
3464
|
};
|
|
3464
3465
|
|
|
3465
3466
|
// src/constants/sdk-version.ts
|
|
3466
|
-
var SDK_VERSION = "0.7.
|
|
3467
|
+
var SDK_VERSION = "0.7.6";
|
|
3467
3468
|
|
|
3468
3469
|
// src/functions/register.ts
|
|
3469
3470
|
var registry = {};
|
|
@@ -3957,22 +3958,20 @@ var getContextStateInitialValue = ({
|
|
|
3957
3958
|
locale
|
|
3958
3959
|
}) => {
|
|
3959
3960
|
const defaultValues = {};
|
|
3961
|
+
const initialState = content?.data?.state || {};
|
|
3960
3962
|
content?.data?.inputs?.forEach((input) => {
|
|
3961
|
-
if (input.name && input.defaultValue !== void 0
|
|
3963
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3962
3964
|
defaultValues[input.name] = input.defaultValue;
|
|
3963
3965
|
}
|
|
3964
3966
|
});
|
|
3965
|
-
|
|
3966
|
-
...
|
|
3967
|
+
return {
|
|
3968
|
+
...defaultValues,
|
|
3969
|
+
...initialState,
|
|
3967
3970
|
...data,
|
|
3968
3971
|
...locale ? {
|
|
3969
3972
|
locale
|
|
3970
3973
|
} : {}
|
|
3971
3974
|
};
|
|
3972
|
-
return {
|
|
3973
|
-
...defaultValues,
|
|
3974
|
-
...stateToUse
|
|
3975
|
-
};
|
|
3976
3975
|
};
|
|
3977
3976
|
var getContentInitialValue = ({
|
|
3978
3977
|
content,
|
package/lib/node/index.jsx
CHANGED
|
@@ -996,7 +996,7 @@ function Block(props) {
|
|
|
996
996
|
});
|
|
997
997
|
}
|
|
998
998
|
function processedBlock() {
|
|
999
|
-
return
|
|
999
|
+
return props.block.repeat?.collection ? props.block : getProcessedBlock({
|
|
1000
1000
|
block: props.block,
|
|
1001
1001
|
localState: props.context.localState,
|
|
1002
1002
|
rootState: props.context.rootState,
|
|
@@ -1009,13 +1009,14 @@ function Block(props) {
|
|
|
1009
1009
|
return props.block.tagName || "div";
|
|
1010
1010
|
}
|
|
1011
1011
|
function canShowBlock() {
|
|
1012
|
-
if (
|
|
1013
|
-
|
|
1012
|
+
if (props.block.repeat?.collection) {
|
|
1013
|
+
if (repeatItem()?.length)
|
|
1014
|
+
return true;
|
|
1015
|
+
return false;
|
|
1014
1016
|
}
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
return true;
|
|
1017
|
+
const shouldHide = "hide" in processedBlock() ? processedBlock().hide : false;
|
|
1018
|
+
const shouldShow = "show" in processedBlock() ? processedBlock().show : true;
|
|
1019
|
+
return shouldShow && !shouldHide;
|
|
1019
1020
|
}
|
|
1020
1021
|
function childrenWithoutParentComponent() {
|
|
1021
1022
|
const shouldRenderChildrenOutsideRef = !blockComponent()?.component && !repeatItem();
|
|
@@ -3136,7 +3137,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3136
3137
|
};
|
|
3137
3138
|
|
|
3138
3139
|
// src/constants/sdk-version.ts
|
|
3139
|
-
var SDK_VERSION = "0.7.
|
|
3140
|
+
var SDK_VERSION = "0.7.6";
|
|
3140
3141
|
|
|
3141
3142
|
// src/functions/register.ts
|
|
3142
3143
|
var registry = {};
|
|
@@ -3628,22 +3629,20 @@ var getContextStateInitialValue = ({
|
|
|
3628
3629
|
locale
|
|
3629
3630
|
}) => {
|
|
3630
3631
|
const defaultValues = {};
|
|
3632
|
+
const initialState = content?.data?.state || {};
|
|
3631
3633
|
content?.data?.inputs?.forEach((input) => {
|
|
3632
|
-
if (input.name && input.defaultValue !== void 0
|
|
3634
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3633
3635
|
defaultValues[input.name] = input.defaultValue;
|
|
3634
3636
|
}
|
|
3635
3637
|
});
|
|
3636
|
-
|
|
3637
|
-
...
|
|
3638
|
+
return {
|
|
3639
|
+
...defaultValues,
|
|
3640
|
+
...initialState,
|
|
3638
3641
|
...data,
|
|
3639
3642
|
...locale ? {
|
|
3640
3643
|
locale
|
|
3641
3644
|
} : {}
|
|
3642
3645
|
};
|
|
3643
|
-
return {
|
|
3644
|
-
...defaultValues,
|
|
3645
|
-
...stateToUse
|
|
3646
|
-
};
|
|
3647
3646
|
};
|
|
3648
3647
|
var getContentInitialValue = ({
|
|
3649
3648
|
content,
|