@builder.io/sdk-solid 0.7.4 → 0.7.5
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 +10 -9
- package/lib/browser/dev.jsx +10 -9
- package/lib/browser/index.js +10 -9
- package/lib/browser/index.jsx +10 -9
- package/lib/edge/dev.js +10 -9
- package/lib/edge/dev.jsx +10 -9
- package/lib/edge/index.js +10 -9
- package/lib/edge/index.jsx +10 -9
- package/lib/node/dev.js +10 -9
- package/lib/node/dev.jsx +10 -9
- package/lib/node/index.js +10 -9
- package/lib/node/index.jsx +10 -9
- 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,
|
|
@@ -962,6 +962,9 @@ function Block(props) {
|
|
|
962
962
|
if ("show" in processedBlock()) {
|
|
963
963
|
return processedBlock().show;
|
|
964
964
|
}
|
|
965
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
966
|
+
return false;
|
|
967
|
+
}
|
|
965
968
|
return true;
|
|
966
969
|
}
|
|
967
970
|
function childrenWithoutParentComponent() {
|
|
@@ -3366,7 +3369,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3366
3369
|
};
|
|
3367
3370
|
|
|
3368
3371
|
// src/constants/sdk-version.ts
|
|
3369
|
-
var SDK_VERSION = "0.7.
|
|
3372
|
+
var SDK_VERSION = "0.7.5";
|
|
3370
3373
|
|
|
3371
3374
|
// src/functions/register.ts
|
|
3372
3375
|
var registry = {};
|
|
@@ -3862,22 +3865,20 @@ var getContextStateInitialValue = ({
|
|
|
3862
3865
|
locale
|
|
3863
3866
|
}) => {
|
|
3864
3867
|
const defaultValues = {};
|
|
3868
|
+
const initialState = content?.data?.state || {};
|
|
3865
3869
|
content?.data?.inputs?.forEach((input) => {
|
|
3866
|
-
if (input.name && input.defaultValue !== void 0
|
|
3870
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3867
3871
|
defaultValues[input.name] = input.defaultValue;
|
|
3868
3872
|
}
|
|
3869
3873
|
});
|
|
3870
|
-
|
|
3871
|
-
...
|
|
3874
|
+
return {
|
|
3875
|
+
...defaultValues,
|
|
3876
|
+
...initialState,
|
|
3872
3877
|
...data,
|
|
3873
3878
|
...locale ? {
|
|
3874
3879
|
locale
|
|
3875
3880
|
} : {}
|
|
3876
3881
|
};
|
|
3877
|
-
return {
|
|
3878
|
-
...defaultValues,
|
|
3879
|
-
...stateToUse
|
|
3880
|
-
};
|
|
3881
3882
|
};
|
|
3882
3883
|
var getContentInitialValue = ({
|
|
3883
3884
|
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,
|
|
@@ -902,6 +902,9 @@ function Block(props) {
|
|
|
902
902
|
if ("show" in processedBlock()) {
|
|
903
903
|
return processedBlock().show;
|
|
904
904
|
}
|
|
905
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
906
|
+
return false;
|
|
907
|
+
}
|
|
905
908
|
return true;
|
|
906
909
|
}
|
|
907
910
|
function childrenWithoutParentComponent() {
|
|
@@ -3032,7 +3035,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3032
3035
|
};
|
|
3033
3036
|
|
|
3034
3037
|
// src/constants/sdk-version.ts
|
|
3035
|
-
var SDK_VERSION = "0.7.
|
|
3038
|
+
var SDK_VERSION = "0.7.5";
|
|
3036
3039
|
|
|
3037
3040
|
// src/functions/register.ts
|
|
3038
3041
|
var registry = {};
|
|
@@ -3526,22 +3529,20 @@ var getContextStateInitialValue = ({
|
|
|
3526
3529
|
locale
|
|
3527
3530
|
}) => {
|
|
3528
3531
|
const defaultValues = {};
|
|
3532
|
+
const initialState = content?.data?.state || {};
|
|
3529
3533
|
content?.data?.inputs?.forEach((input) => {
|
|
3530
|
-
if (input.name && input.defaultValue !== void 0
|
|
3534
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3531
3535
|
defaultValues[input.name] = input.defaultValue;
|
|
3532
3536
|
}
|
|
3533
3537
|
});
|
|
3534
|
-
|
|
3535
|
-
...
|
|
3538
|
+
return {
|
|
3539
|
+
...defaultValues,
|
|
3540
|
+
...initialState,
|
|
3536
3541
|
...data,
|
|
3537
3542
|
...locale ? {
|
|
3538
3543
|
locale
|
|
3539
3544
|
} : {}
|
|
3540
3545
|
};
|
|
3541
|
-
return {
|
|
3542
|
-
...defaultValues,
|
|
3543
|
-
...stateToUse
|
|
3544
|
-
};
|
|
3545
3546
|
};
|
|
3546
3547
|
var getContentInitialValue = ({
|
|
3547
3548
|
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,
|
|
@@ -950,6 +950,9 @@ function Block(props) {
|
|
|
950
950
|
if ("show" in processedBlock()) {
|
|
951
951
|
return processedBlock().show;
|
|
952
952
|
}
|
|
953
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
954
|
+
return false;
|
|
955
|
+
}
|
|
953
956
|
return true;
|
|
954
957
|
}
|
|
955
958
|
function childrenWithoutParentComponent() {
|
|
@@ -3345,7 +3348,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3345
3348
|
};
|
|
3346
3349
|
|
|
3347
3350
|
// src/constants/sdk-version.ts
|
|
3348
|
-
var SDK_VERSION = "0.7.
|
|
3351
|
+
var SDK_VERSION = "0.7.5";
|
|
3349
3352
|
|
|
3350
3353
|
// src/functions/register.ts
|
|
3351
3354
|
var registry = {};
|
|
@@ -3839,22 +3842,20 @@ var getContextStateInitialValue = ({
|
|
|
3839
3842
|
locale
|
|
3840
3843
|
}) => {
|
|
3841
3844
|
const defaultValues = {};
|
|
3845
|
+
const initialState = content?.data?.state || {};
|
|
3842
3846
|
content?.data?.inputs?.forEach((input) => {
|
|
3843
|
-
if (input.name && input.defaultValue !== void 0
|
|
3847
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3844
3848
|
defaultValues[input.name] = input.defaultValue;
|
|
3845
3849
|
}
|
|
3846
3850
|
});
|
|
3847
|
-
|
|
3848
|
-
...
|
|
3851
|
+
return {
|
|
3852
|
+
...defaultValues,
|
|
3853
|
+
...initialState,
|
|
3849
3854
|
...data,
|
|
3850
3855
|
...locale ? {
|
|
3851
3856
|
locale
|
|
3852
3857
|
} : {}
|
|
3853
3858
|
};
|
|
3854
|
-
return {
|
|
3855
|
-
...defaultValues,
|
|
3856
|
-
...stateToUse
|
|
3857
|
-
};
|
|
3858
3859
|
};
|
|
3859
3860
|
var getContentInitialValue = ({
|
|
3860
3861
|
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,
|
|
@@ -895,6 +895,9 @@ function Block(props) {
|
|
|
895
895
|
if ("show" in processedBlock()) {
|
|
896
896
|
return processedBlock().show;
|
|
897
897
|
}
|
|
898
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
899
|
+
return false;
|
|
900
|
+
}
|
|
898
901
|
return true;
|
|
899
902
|
}
|
|
900
903
|
function childrenWithoutParentComponent() {
|
|
@@ -3016,7 +3019,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3016
3019
|
};
|
|
3017
3020
|
|
|
3018
3021
|
// src/constants/sdk-version.ts
|
|
3019
|
-
var SDK_VERSION = "0.7.
|
|
3022
|
+
var SDK_VERSION = "0.7.5";
|
|
3020
3023
|
|
|
3021
3024
|
// src/functions/register.ts
|
|
3022
3025
|
var registry = {};
|
|
@@ -3508,22 +3511,20 @@ var getContextStateInitialValue = ({
|
|
|
3508
3511
|
locale
|
|
3509
3512
|
}) => {
|
|
3510
3513
|
const defaultValues = {};
|
|
3514
|
+
const initialState = content?.data?.state || {};
|
|
3511
3515
|
content?.data?.inputs?.forEach((input) => {
|
|
3512
|
-
if (input.name && input.defaultValue !== void 0
|
|
3516
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3513
3517
|
defaultValues[input.name] = input.defaultValue;
|
|
3514
3518
|
}
|
|
3515
3519
|
});
|
|
3516
|
-
|
|
3517
|
-
...
|
|
3520
|
+
return {
|
|
3521
|
+
...defaultValues,
|
|
3522
|
+
...initialState,
|
|
3518
3523
|
...data,
|
|
3519
3524
|
...locale ? {
|
|
3520
3525
|
locale
|
|
3521
3526
|
} : {}
|
|
3522
3527
|
};
|
|
3523
|
-
return {
|
|
3524
|
-
...defaultValues,
|
|
3525
|
-
...stateToUse
|
|
3526
|
-
};
|
|
3527
3528
|
};
|
|
3528
3529
|
var getContentInitialValue = ({
|
|
3529
3530
|
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,
|
|
@@ -4115,6 +4115,9 @@ function Block(props) {
|
|
|
4115
4115
|
if ("show" in processedBlock()) {
|
|
4116
4116
|
return processedBlock().show;
|
|
4117
4117
|
}
|
|
4118
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
4119
|
+
return false;
|
|
4120
|
+
}
|
|
4118
4121
|
return true;
|
|
4119
4122
|
}
|
|
4120
4123
|
function childrenWithoutParentComponent() {
|
|
@@ -6519,7 +6522,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6519
6522
|
};
|
|
6520
6523
|
|
|
6521
6524
|
// src/constants/sdk-version.ts
|
|
6522
|
-
var SDK_VERSION = "0.7.
|
|
6525
|
+
var SDK_VERSION = "0.7.5";
|
|
6523
6526
|
|
|
6524
6527
|
// src/functions/register.ts
|
|
6525
6528
|
var registry = {};
|
|
@@ -7015,22 +7018,20 @@ var getContextStateInitialValue = ({
|
|
|
7015
7018
|
locale
|
|
7016
7019
|
}) => {
|
|
7017
7020
|
const defaultValues = {};
|
|
7021
|
+
const initialState = content?.data?.state || {};
|
|
7018
7022
|
content?.data?.inputs?.forEach((input) => {
|
|
7019
|
-
if (input.name && input.defaultValue !== void 0
|
|
7023
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
7020
7024
|
defaultValues[input.name] = input.defaultValue;
|
|
7021
7025
|
}
|
|
7022
7026
|
});
|
|
7023
|
-
|
|
7024
|
-
...
|
|
7027
|
+
return {
|
|
7028
|
+
...defaultValues,
|
|
7029
|
+
...initialState,
|
|
7025
7030
|
...data,
|
|
7026
7031
|
...locale ? {
|
|
7027
7032
|
locale
|
|
7028
7033
|
} : {}
|
|
7029
7034
|
};
|
|
7030
|
-
return {
|
|
7031
|
-
...defaultValues,
|
|
7032
|
-
...stateToUse
|
|
7033
|
-
};
|
|
7034
7035
|
};
|
|
7035
7036
|
var getContentInitialValue = ({
|
|
7036
7037
|
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,
|
|
@@ -4057,6 +4057,9 @@ function Block(props) {
|
|
|
4057
4057
|
if ("show" in processedBlock()) {
|
|
4058
4058
|
return processedBlock().show;
|
|
4059
4059
|
}
|
|
4060
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
4061
|
+
return false;
|
|
4062
|
+
}
|
|
4060
4063
|
return true;
|
|
4061
4064
|
}
|
|
4062
4065
|
function childrenWithoutParentComponent() {
|
|
@@ -6187,7 +6190,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6187
6190
|
};
|
|
6188
6191
|
|
|
6189
6192
|
// src/constants/sdk-version.ts
|
|
6190
|
-
var SDK_VERSION = "0.7.
|
|
6193
|
+
var SDK_VERSION = "0.7.5";
|
|
6191
6194
|
|
|
6192
6195
|
// src/functions/register.ts
|
|
6193
6196
|
var registry = {};
|
|
@@ -6681,22 +6684,20 @@ var getContextStateInitialValue = ({
|
|
|
6681
6684
|
locale
|
|
6682
6685
|
}) => {
|
|
6683
6686
|
const defaultValues = {};
|
|
6687
|
+
const initialState = content?.data?.state || {};
|
|
6684
6688
|
content?.data?.inputs?.forEach((input) => {
|
|
6685
|
-
if (input.name && input.defaultValue !== void 0
|
|
6689
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
6686
6690
|
defaultValues[input.name] = input.defaultValue;
|
|
6687
6691
|
}
|
|
6688
6692
|
});
|
|
6689
|
-
|
|
6690
|
-
...
|
|
6693
|
+
return {
|
|
6694
|
+
...defaultValues,
|
|
6695
|
+
...initialState,
|
|
6691
6696
|
...data,
|
|
6692
6697
|
...locale ? {
|
|
6693
6698
|
locale
|
|
6694
6699
|
} : {}
|
|
6695
6700
|
};
|
|
6696
|
-
return {
|
|
6697
|
-
...defaultValues,
|
|
6698
|
-
...stateToUse
|
|
6699
|
-
};
|
|
6700
6701
|
};
|
|
6701
6702
|
var getContentInitialValue = ({
|
|
6702
6703
|
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,
|
|
@@ -4103,6 +4103,9 @@ function Block(props) {
|
|
|
4103
4103
|
if ("show" in processedBlock()) {
|
|
4104
4104
|
return processedBlock().show;
|
|
4105
4105
|
}
|
|
4106
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
4107
|
+
return false;
|
|
4108
|
+
}
|
|
4106
4109
|
return true;
|
|
4107
4110
|
}
|
|
4108
4111
|
function childrenWithoutParentComponent() {
|
|
@@ -6498,7 +6501,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6498
6501
|
};
|
|
6499
6502
|
|
|
6500
6503
|
// src/constants/sdk-version.ts
|
|
6501
|
-
var SDK_VERSION = "0.7.
|
|
6504
|
+
var SDK_VERSION = "0.7.5";
|
|
6502
6505
|
|
|
6503
6506
|
// src/functions/register.ts
|
|
6504
6507
|
var registry = {};
|
|
@@ -6992,22 +6995,20 @@ var getContextStateInitialValue = ({
|
|
|
6992
6995
|
locale
|
|
6993
6996
|
}) => {
|
|
6994
6997
|
const defaultValues = {};
|
|
6998
|
+
const initialState = content?.data?.state || {};
|
|
6995
6999
|
content?.data?.inputs?.forEach((input) => {
|
|
6996
|
-
if (input.name && input.defaultValue !== void 0
|
|
7000
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
6997
7001
|
defaultValues[input.name] = input.defaultValue;
|
|
6998
7002
|
}
|
|
6999
7003
|
});
|
|
7000
|
-
|
|
7001
|
-
...
|
|
7004
|
+
return {
|
|
7005
|
+
...defaultValues,
|
|
7006
|
+
...initialState,
|
|
7002
7007
|
...data,
|
|
7003
7008
|
...locale ? {
|
|
7004
7009
|
locale
|
|
7005
7010
|
} : {}
|
|
7006
7011
|
};
|
|
7007
|
-
return {
|
|
7008
|
-
...defaultValues,
|
|
7009
|
-
...stateToUse
|
|
7010
|
-
};
|
|
7011
7012
|
};
|
|
7012
7013
|
var getContentInitialValue = ({
|
|
7013
7014
|
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,
|
|
@@ -4050,6 +4050,9 @@ function Block(props) {
|
|
|
4050
4050
|
if ("show" in processedBlock()) {
|
|
4051
4051
|
return processedBlock().show;
|
|
4052
4052
|
}
|
|
4053
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
4054
|
+
return false;
|
|
4055
|
+
}
|
|
4053
4056
|
return true;
|
|
4054
4057
|
}
|
|
4055
4058
|
function childrenWithoutParentComponent() {
|
|
@@ -6171,7 +6174,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
6171
6174
|
};
|
|
6172
6175
|
|
|
6173
6176
|
// src/constants/sdk-version.ts
|
|
6174
|
-
var SDK_VERSION = "0.7.
|
|
6177
|
+
var SDK_VERSION = "0.7.5";
|
|
6175
6178
|
|
|
6176
6179
|
// src/functions/register.ts
|
|
6177
6180
|
var registry = {};
|
|
@@ -6663,22 +6666,20 @@ var getContextStateInitialValue = ({
|
|
|
6663
6666
|
locale
|
|
6664
6667
|
}) => {
|
|
6665
6668
|
const defaultValues = {};
|
|
6669
|
+
const initialState = content?.data?.state || {};
|
|
6666
6670
|
content?.data?.inputs?.forEach((input) => {
|
|
6667
|
-
if (input.name && input.defaultValue !== void 0
|
|
6671
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
6668
6672
|
defaultValues[input.name] = input.defaultValue;
|
|
6669
6673
|
}
|
|
6670
6674
|
});
|
|
6671
|
-
|
|
6672
|
-
...
|
|
6675
|
+
return {
|
|
6676
|
+
...defaultValues,
|
|
6677
|
+
...initialState,
|
|
6673
6678
|
...data,
|
|
6674
6679
|
...locale ? {
|
|
6675
6680
|
locale
|
|
6676
6681
|
} : {}
|
|
6677
6682
|
};
|
|
6678
|
-
return {
|
|
6679
|
-
...defaultValues,
|
|
6680
|
-
...stateToUse
|
|
6681
|
-
};
|
|
6682
6683
|
};
|
|
6683
6684
|
var getContentInitialValue = ({
|
|
6684
6685
|
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,
|
|
@@ -1081,6 +1081,9 @@ function Block(props) {
|
|
|
1081
1081
|
if ("show" in processedBlock()) {
|
|
1082
1082
|
return processedBlock().show;
|
|
1083
1083
|
}
|
|
1084
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
1085
|
+
return false;
|
|
1086
|
+
}
|
|
1084
1087
|
return true;
|
|
1085
1088
|
}
|
|
1086
1089
|
function childrenWithoutParentComponent() {
|
|
@@ -3485,7 +3488,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3485
3488
|
};
|
|
3486
3489
|
|
|
3487
3490
|
// src/constants/sdk-version.ts
|
|
3488
|
-
var SDK_VERSION = "0.7.
|
|
3491
|
+
var SDK_VERSION = "0.7.5";
|
|
3489
3492
|
|
|
3490
3493
|
// src/functions/register.ts
|
|
3491
3494
|
var registry = {};
|
|
@@ -3981,22 +3984,20 @@ var getContextStateInitialValue = ({
|
|
|
3981
3984
|
locale
|
|
3982
3985
|
}) => {
|
|
3983
3986
|
const defaultValues = {};
|
|
3987
|
+
const initialState = content?.data?.state || {};
|
|
3984
3988
|
content?.data?.inputs?.forEach((input) => {
|
|
3985
|
-
if (input.name && input.defaultValue !== void 0
|
|
3989
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3986
3990
|
defaultValues[input.name] = input.defaultValue;
|
|
3987
3991
|
}
|
|
3988
3992
|
});
|
|
3989
|
-
|
|
3990
|
-
...
|
|
3993
|
+
return {
|
|
3994
|
+
...defaultValues,
|
|
3995
|
+
...initialState,
|
|
3991
3996
|
...data,
|
|
3992
3997
|
...locale ? {
|
|
3993
3998
|
locale
|
|
3994
3999
|
} : {}
|
|
3995
4000
|
};
|
|
3996
|
-
return {
|
|
3997
|
-
...defaultValues,
|
|
3998
|
-
...stateToUse
|
|
3999
|
-
};
|
|
4000
4001
|
};
|
|
4001
4002
|
var getContentInitialValue = ({
|
|
4002
4003
|
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,
|
|
@@ -1023,6 +1023,9 @@ function Block(props) {
|
|
|
1023
1023
|
if ("show" in processedBlock()) {
|
|
1024
1024
|
return processedBlock().show;
|
|
1025
1025
|
}
|
|
1026
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
1027
|
+
return false;
|
|
1028
|
+
}
|
|
1026
1029
|
return true;
|
|
1027
1030
|
}
|
|
1028
1031
|
function childrenWithoutParentComponent() {
|
|
@@ -3153,7 +3156,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3153
3156
|
};
|
|
3154
3157
|
|
|
3155
3158
|
// src/constants/sdk-version.ts
|
|
3156
|
-
var SDK_VERSION = "0.7.
|
|
3159
|
+
var SDK_VERSION = "0.7.5";
|
|
3157
3160
|
|
|
3158
3161
|
// src/functions/register.ts
|
|
3159
3162
|
var registry = {};
|
|
@@ -3647,22 +3650,20 @@ var getContextStateInitialValue = ({
|
|
|
3647
3650
|
locale
|
|
3648
3651
|
}) => {
|
|
3649
3652
|
const defaultValues = {};
|
|
3653
|
+
const initialState = content?.data?.state || {};
|
|
3650
3654
|
content?.data?.inputs?.forEach((input) => {
|
|
3651
|
-
if (input.name && input.defaultValue !== void 0
|
|
3655
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3652
3656
|
defaultValues[input.name] = input.defaultValue;
|
|
3653
3657
|
}
|
|
3654
3658
|
});
|
|
3655
|
-
|
|
3656
|
-
...
|
|
3659
|
+
return {
|
|
3660
|
+
...defaultValues,
|
|
3661
|
+
...initialState,
|
|
3657
3662
|
...data,
|
|
3658
3663
|
...locale ? {
|
|
3659
3664
|
locale
|
|
3660
3665
|
} : {}
|
|
3661
3666
|
};
|
|
3662
|
-
return {
|
|
3663
|
-
...defaultValues,
|
|
3664
|
-
...stateToUse
|
|
3665
|
-
};
|
|
3666
3667
|
};
|
|
3667
3668
|
var getContentInitialValue = ({
|
|
3668
3669
|
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,
|
|
@@ -1068,6 +1068,9 @@ function Block(props) {
|
|
|
1068
1068
|
if ("show" in processedBlock()) {
|
|
1069
1069
|
return processedBlock().show;
|
|
1070
1070
|
}
|
|
1071
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
1072
|
+
return false;
|
|
1073
|
+
}
|
|
1071
1074
|
return true;
|
|
1072
1075
|
}
|
|
1073
1076
|
function childrenWithoutParentComponent() {
|
|
@@ -3463,7 +3466,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3463
3466
|
};
|
|
3464
3467
|
|
|
3465
3468
|
// src/constants/sdk-version.ts
|
|
3466
|
-
var SDK_VERSION = "0.7.
|
|
3469
|
+
var SDK_VERSION = "0.7.5";
|
|
3467
3470
|
|
|
3468
3471
|
// src/functions/register.ts
|
|
3469
3472
|
var registry = {};
|
|
@@ -3957,22 +3960,20 @@ var getContextStateInitialValue = ({
|
|
|
3957
3960
|
locale
|
|
3958
3961
|
}) => {
|
|
3959
3962
|
const defaultValues = {};
|
|
3963
|
+
const initialState = content?.data?.state || {};
|
|
3960
3964
|
content?.data?.inputs?.forEach((input) => {
|
|
3961
|
-
if (input.name && input.defaultValue !== void 0
|
|
3965
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3962
3966
|
defaultValues[input.name] = input.defaultValue;
|
|
3963
3967
|
}
|
|
3964
3968
|
});
|
|
3965
|
-
|
|
3966
|
-
...
|
|
3969
|
+
return {
|
|
3970
|
+
...defaultValues,
|
|
3971
|
+
...initialState,
|
|
3967
3972
|
...data,
|
|
3968
3973
|
...locale ? {
|
|
3969
3974
|
locale
|
|
3970
3975
|
} : {}
|
|
3971
3976
|
};
|
|
3972
|
-
return {
|
|
3973
|
-
...defaultValues,
|
|
3974
|
-
...stateToUse
|
|
3975
|
-
};
|
|
3976
3977
|
};
|
|
3977
3978
|
var getContentInitialValue = ({
|
|
3978
3979
|
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,
|
|
@@ -1015,6 +1015,9 @@ function Block(props) {
|
|
|
1015
1015
|
if ("show" in processedBlock()) {
|
|
1016
1016
|
return processedBlock().show;
|
|
1017
1017
|
}
|
|
1018
|
+
if (props.block.repeat?.collection && !repeatItem()?.length) {
|
|
1019
|
+
return false;
|
|
1020
|
+
}
|
|
1018
1021
|
return true;
|
|
1019
1022
|
}
|
|
1020
1023
|
function childrenWithoutParentComponent() {
|
|
@@ -3136,7 +3139,7 @@ var getInteractionPropertiesForEvent = (event) => {
|
|
|
3136
3139
|
};
|
|
3137
3140
|
|
|
3138
3141
|
// src/constants/sdk-version.ts
|
|
3139
|
-
var SDK_VERSION = "0.7.
|
|
3142
|
+
var SDK_VERSION = "0.7.5";
|
|
3140
3143
|
|
|
3141
3144
|
// src/functions/register.ts
|
|
3142
3145
|
var registry = {};
|
|
@@ -3628,22 +3631,20 @@ var getContextStateInitialValue = ({
|
|
|
3628
3631
|
locale
|
|
3629
3632
|
}) => {
|
|
3630
3633
|
const defaultValues = {};
|
|
3634
|
+
const initialState = content?.data?.state || {};
|
|
3631
3635
|
content?.data?.inputs?.forEach((input) => {
|
|
3632
|
-
if (input.name && input.defaultValue !== void 0
|
|
3636
|
+
if (input.name && input.defaultValue !== void 0) {
|
|
3633
3637
|
defaultValues[input.name] = input.defaultValue;
|
|
3634
3638
|
}
|
|
3635
3639
|
});
|
|
3636
|
-
|
|
3637
|
-
...
|
|
3640
|
+
return {
|
|
3641
|
+
...defaultValues,
|
|
3642
|
+
...initialState,
|
|
3638
3643
|
...data,
|
|
3639
3644
|
...locale ? {
|
|
3640
3645
|
locale
|
|
3641
3646
|
} : {}
|
|
3642
3647
|
};
|
|
3643
|
-
return {
|
|
3644
|
-
...defaultValues,
|
|
3645
|
-
...stateToUse
|
|
3646
|
-
};
|
|
3647
3648
|
};
|
|
3648
3649
|
var getContentInitialValue = ({
|
|
3649
3650
|
content,
|