@wix/form-public 0.202.0 → 0.204.0
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/dist/index.cjs +39 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +39 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -19537,9 +19537,29 @@ function buildObjectArrayValidation(target, objectArrayOptions, validationMode)
|
|
|
19537
19537
|
...objectArrayOptions.minItems && validationMode !== ValidationMode.UNRESTRICTED_UPDATE && {
|
|
19538
19538
|
minItems: objectArrayOptions.minItems
|
|
19539
19539
|
},
|
|
19540
|
-
items: {
|
|
19541
|
-
|
|
19540
|
+
items: objectArrayOptions.itemProperties ? buildItemPropertiesSchema(objectArrayOptions.itemProperties) : { $ref: target }
|
|
19541
|
+
};
|
|
19542
|
+
}
|
|
19543
|
+
function buildItemPropertiesSchema(itemProperties) {
|
|
19544
|
+
const typeMap = {
|
|
19545
|
+
STRING: "string",
|
|
19546
|
+
NUMBER: "number",
|
|
19547
|
+
BOOLEAN: "boolean"
|
|
19548
|
+
};
|
|
19549
|
+
const properties = {};
|
|
19550
|
+
const required = [];
|
|
19551
|
+
for (const [key, value] of Object.entries(itemProperties)) {
|
|
19552
|
+
const jsonType = value.propertiesType && typeMap[value.propertiesType];
|
|
19553
|
+
if (jsonType) {
|
|
19554
|
+
properties[key] = { type: jsonType };
|
|
19555
|
+
required.push(key);
|
|
19542
19556
|
}
|
|
19557
|
+
}
|
|
19558
|
+
return {
|
|
19559
|
+
type: "object",
|
|
19560
|
+
properties,
|
|
19561
|
+
required,
|
|
19562
|
+
additionalProperties: false
|
|
19543
19563
|
};
|
|
19544
19564
|
}
|
|
19545
19565
|
function buildPaymentValidation(paymentOptions, validationMode) {
|
|
@@ -30051,6 +30071,8 @@ function resolveObjectArrayComponent(objectArrayComponent) {
|
|
|
30051
30071
|
switch (objectArrayComponent.componentType) {
|
|
30052
30072
|
case ObjectArrayComponentType3.REPEATER:
|
|
30053
30073
|
return takeRepeaterViewProperties(objectArrayComponent.repeaterOptions);
|
|
30074
|
+
case ObjectArrayComponentType3.PIKACHU:
|
|
30075
|
+
return takePikachuViewProperties(objectArrayComponent.pikachuOptions);
|
|
30054
30076
|
default:
|
|
30055
30077
|
throw new Error(`Unknown object array component type: ${objectArrayComponent.componentType}`);
|
|
30056
30078
|
}
|
|
@@ -30067,6 +30089,21 @@ function takeRepeaterViewProperties(repeater) {
|
|
|
30067
30089
|
}
|
|
30068
30090
|
};
|
|
30069
30091
|
}
|
|
30092
|
+
var ProviderNameKey = "providerName";
|
|
30093
|
+
var FilterKey = "filter";
|
|
30094
|
+
function takePikachuViewProperties(pikachu) {
|
|
30095
|
+
return {
|
|
30096
|
+
[LabelKey]: pikachu.label,
|
|
30097
|
+
[HideLabelKey]: !pikachu.showLabel,
|
|
30098
|
+
[ProviderNameKey]: pikachu.providerName,
|
|
30099
|
+
...pikachu.description && {
|
|
30100
|
+
[DescriptionKey]: pikachu.description
|
|
30101
|
+
},
|
|
30102
|
+
...pikachu.filter && {
|
|
30103
|
+
[FilterKey]: pikachu.filter
|
|
30104
|
+
}
|
|
30105
|
+
};
|
|
30106
|
+
}
|
|
30070
30107
|
function resolveQuizFieldSettings(quizFieldSettings) {
|
|
30071
30108
|
var _quizFieldSettings$co;
|
|
30072
30109
|
const correctAnswers = quizFieldSettings == null || (_quizFieldSettings$co = quizFieldSettings.correctAnswersList) == null ? void 0 : _quizFieldSettings$co.correctAnswers;
|