eddev 0.3.32 → 0.3.34
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/gravityforms/types.d.ts +1 -0
- package/gravityforms/useGravityForm.js +15 -15
- package/package.json +1 -1
- package/package-lock.json +0 -13535
package/gravityforms/types.d.ts
CHANGED
|
@@ -185,7 +185,7 @@ function useGravityForm(opts) {
|
|
|
185
185
|
}
|
|
186
186
|
exports.useGravityForm = useGravityForm;
|
|
187
187
|
function prepareValuesPayload(form, state, data) {
|
|
188
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
188
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
189
189
|
var _loop_1 = function (field) {
|
|
190
190
|
var value = state.values[field.id];
|
|
191
191
|
var key = "input_" + field.id;
|
|
@@ -198,22 +198,22 @@ function prepareValuesPayload(form, state, data) {
|
|
|
198
198
|
data.append("".concat(key, "_1"), value ? "1" : "");
|
|
199
199
|
data.append("".concat(key, ".1"), value ? "1" : "");
|
|
200
200
|
data.append("".concat(key, ".2"), (_b = (_a = field === null || field === void 0 ? void 0 : field.consentText) !== null && _a !== void 0 ? _a : field === null || field === void 0 ? void 0 : field.checkboxLabel) !== null && _b !== void 0 ? _b : "");
|
|
201
|
-
data.append("".concat(key, ".3"),
|
|
201
|
+
data.append("".concat(key, ".3"), String((_c = form.revisionId) !== null && _c !== void 0 ? _c : 1));
|
|
202
202
|
}
|
|
203
203
|
else if (field.type === "name") {
|
|
204
|
-
data.append("".concat(key, "_2"), (
|
|
205
|
-
data.append("".concat(key, "_3"), (
|
|
206
|
-
data.append("".concat(key, "_4"), (
|
|
207
|
-
data.append("".concat(key, "_6"), (
|
|
208
|
-
data.append("".concat(key, "_8"), (
|
|
204
|
+
data.append("".concat(key, "_2"), (_d = value === null || value === void 0 ? void 0 : value.prefix) !== null && _d !== void 0 ? _d : "");
|
|
205
|
+
data.append("".concat(key, "_3"), (_e = value === null || value === void 0 ? void 0 : value.first) !== null && _e !== void 0 ? _e : "");
|
|
206
|
+
data.append("".concat(key, "_4"), (_f = value === null || value === void 0 ? void 0 : value.middle) !== null && _f !== void 0 ? _f : "");
|
|
207
|
+
data.append("".concat(key, "_6"), (_g = value === null || value === void 0 ? void 0 : value.last) !== null && _g !== void 0 ? _g : "");
|
|
208
|
+
data.append("".concat(key, "_8"), (_h = value === null || value === void 0 ? void 0 : value.suffix) !== null && _h !== void 0 ? _h : "");
|
|
209
209
|
}
|
|
210
210
|
else if (field.type === "address") {
|
|
211
|
-
data.append("".concat(key, "_1"), (
|
|
212
|
-
data.append("".concat(key, "_2"), (
|
|
213
|
-
data.append("".concat(key, "_3"), (
|
|
214
|
-
data.append("".concat(key, "_4"), (
|
|
215
|
-
data.append("".concat(key, "_5"), (
|
|
216
|
-
data.append("".concat(key, "_6"), (
|
|
211
|
+
data.append("".concat(key, "_1"), (_j = value === null || value === void 0 ? void 0 : value.address1) !== null && _j !== void 0 ? _j : "");
|
|
212
|
+
data.append("".concat(key, "_2"), (_k = value === null || value === void 0 ? void 0 : value.address2) !== null && _k !== void 0 ? _k : "");
|
|
213
|
+
data.append("".concat(key, "_3"), (_l = value === null || value === void 0 ? void 0 : value.city) !== null && _l !== void 0 ? _l : "");
|
|
214
|
+
data.append("".concat(key, "_4"), (_m = value === null || value === void 0 ? void 0 : value.state) !== null && _m !== void 0 ? _m : "");
|
|
215
|
+
data.append("".concat(key, "_5"), (_o = value === null || value === void 0 ? void 0 : value.zip) !== null && _o !== void 0 ? _o : "");
|
|
216
|
+
data.append("".concat(key, "_6"), (_p = value === null || value === void 0 ? void 0 : value.country) !== null && _p !== void 0 ? _p : "");
|
|
217
217
|
}
|
|
218
218
|
else if (field.type === "captcha") {
|
|
219
219
|
data.append("g-recaptcha-response", value);
|
|
@@ -238,8 +238,8 @@ function prepareValuesPayload(form, state, data) {
|
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
};
|
|
241
|
-
for (var _i = 0,
|
|
242
|
-
var field =
|
|
241
|
+
for (var _i = 0, _q = form.fields; _i < _q.length; _i++) {
|
|
242
|
+
var field = _q[_i];
|
|
243
243
|
_loop_1(field);
|
|
244
244
|
}
|
|
245
245
|
}
|