toku-form-extensions 0.0.3 → 0.0.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/dist/components/CustomForm/CustomForm.d.ts +18 -9
- package/dist/components/CustomForm/CustomForm.d.ts.map +1 -1
- package/dist/components/CustomForm/SignupFields.d.ts.map +1 -1
- package/dist/index.es.js +12 -14
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/entities.d.ts +0 -57
- package/dist/types/entities.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentOptionsMixin } from 'vue/types/v3-component-options';
|
|
2
2
|
import { DefineComponent, PropType, ExtractPropTypes } from 'vue';
|
|
3
|
-
import { Account
|
|
3
|
+
import { Account } from '../../types/entities';
|
|
4
4
|
interface SignupRequestData {
|
|
5
5
|
additional_data: Record<string, string | number | Date>;
|
|
6
6
|
customer_metadata: Record<string, string | number | Date>;
|
|
@@ -31,10 +31,6 @@ declare const _default: DefineComponent<{
|
|
|
31
31
|
type: PropType<string>;
|
|
32
32
|
default: string;
|
|
33
33
|
};
|
|
34
|
-
organization: {
|
|
35
|
-
type: PropType<Organization>;
|
|
36
|
-
required: true;
|
|
37
|
-
};
|
|
38
34
|
customerFields: {
|
|
39
35
|
type: PropType<SignupField[]>;
|
|
40
36
|
required: true;
|
|
@@ -43,6 +39,10 @@ declare const _default: DefineComponent<{
|
|
|
43
39
|
type: PropType<SignupField[]>;
|
|
44
40
|
required: true;
|
|
45
41
|
};
|
|
42
|
+
showSendByEmail: {
|
|
43
|
+
type: PropType<boolean>;
|
|
44
|
+
required: true;
|
|
45
|
+
};
|
|
46
46
|
countryIso: {
|
|
47
47
|
type: PropType<string | null>;
|
|
48
48
|
required: true;
|
|
@@ -83,6 +83,10 @@ declare const _default: DefineComponent<{
|
|
|
83
83
|
type: PropType<string>;
|
|
84
84
|
default: string;
|
|
85
85
|
};
|
|
86
|
+
isPaymentPortal: {
|
|
87
|
+
type: PropType<boolean>;
|
|
88
|
+
default: boolean;
|
|
89
|
+
};
|
|
86
90
|
}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
87
91
|
"submit-form-data": (values: SignupRequestData) => void;
|
|
88
92
|
reset: () => void;
|
|
@@ -109,10 +113,6 @@ declare const _default: DefineComponent<{
|
|
|
109
113
|
type: PropType<string>;
|
|
110
114
|
default: string;
|
|
111
115
|
};
|
|
112
|
-
organization: {
|
|
113
|
-
type: PropType<Organization>;
|
|
114
|
-
required: true;
|
|
115
|
-
};
|
|
116
116
|
customerFields: {
|
|
117
117
|
type: PropType<SignupField[]>;
|
|
118
118
|
required: true;
|
|
@@ -121,6 +121,10 @@ declare const _default: DefineComponent<{
|
|
|
121
121
|
type: PropType<SignupField[]>;
|
|
122
122
|
required: true;
|
|
123
123
|
};
|
|
124
|
+
showSendByEmail: {
|
|
125
|
+
type: PropType<boolean>;
|
|
126
|
+
required: true;
|
|
127
|
+
};
|
|
124
128
|
countryIso: {
|
|
125
129
|
type: PropType<string | null>;
|
|
126
130
|
required: true;
|
|
@@ -161,6 +165,10 @@ declare const _default: DefineComponent<{
|
|
|
161
165
|
type: PropType<string>;
|
|
162
166
|
default: string;
|
|
163
167
|
};
|
|
168
|
+
isPaymentPortal: {
|
|
169
|
+
type: PropType<boolean>;
|
|
170
|
+
default: boolean;
|
|
171
|
+
};
|
|
164
172
|
}>>, {
|
|
165
173
|
errorMessage: string;
|
|
166
174
|
errorButtonLabel: string;
|
|
@@ -170,6 +178,7 @@ declare const _default: DefineComponent<{
|
|
|
170
178
|
customerFieldsTitle: string;
|
|
171
179
|
buttonLabel: string;
|
|
172
180
|
sendByEmailText: string;
|
|
181
|
+
isPaymentPortal: boolean;
|
|
173
182
|
}>;
|
|
174
183
|
export default _default;
|
|
175
184
|
//# sourceMappingURL=CustomForm.vue.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CustomForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CustomForm/CustomForm"],"names":[],"mappings":"AAsDA;AAOA,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"CustomForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CustomForm/CustomForm"],"names":[],"mappings":"AAsDA;AAOA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAO3C,OAAO,sBAAsB,CAAC;AAI9B,UAAU,iBAAiB;IACzB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;IACxD,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;IAC1D,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;IAC9D,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;IACzD,SAAS,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GACR,MAAM,GACN,MAAM,GACN,OAAO,GACP,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAAC;CAC5C;AAED,KAAK,gBAAgB,GAAG,SAAS,GAAG,OAAO,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkZ5C,wBAAkD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignupFields.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CustomForm/SignupFields"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignupFields.vue.d.ts","sourceRoot":"","sources":["../../../src/components/CustomForm/SignupFields"],"names":[],"mappings":"AAmEA;AAIA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqP3C,wBAAkD"}
|
package/dist/index.es.js
CHANGED
|
@@ -20178,9 +20178,9 @@ var yB = function() {
|
|
|
20178
20178
|
var t = this, n = t._self._c, i = t._self._setupProxy;
|
|
20179
20179
|
return n("div", { staticClass: "form" }, [n(i.TTypography, { attrs: { variant: "s2", "font-weight": "medium" } }, [t._v(" " + t._s(t.title) + " ")]), n("div", { staticClass: "form__base" }, [t._l(i.fieldsToShow, function(s) {
|
|
20180
20180
|
var u, c;
|
|
20181
|
-
return [t.fieldsType === "invoice" && s.isAccount ? n(i.TSelect, { key: s.id || s.name, attrs: { placeholder: s.placeholder, label: s.label, value: (u = s.value) == null ? void 0 : u.toString(), "helper-text": s.helperText }, on: { input: (f) => i.handleInput(s.id || s.id || s.name, f) } }, t._l(t.accounts, function({ id: f, name: p }) {
|
|
20181
|
+
return [t.fieldsType === "invoice" && s.isAccount ? n(i.TSelect, { key: s.id || s.name, staticClass: "t-select", attrs: { placeholder: s.placeholder, label: s.label, value: (u = s.value) == null ? void 0 : u.toString(), "helper-text": s.helperText }, on: { input: (f) => i.handleInput(s.id || s.id || s.name, f) } }, t._l(t.accounts, function({ id: f, name: p }) {
|
|
20182
20182
|
return n("option", { key: f, domProps: { value: f } }, [t._v(" " + t._s(p) + " ")]);
|
|
20183
|
-
}), 0) : s.defaultOptions !== void 0 ? n(i.TSelect, { key: s.id || s.name, attrs: { placeholder: s.placeholder, label: s.label, value: (c = s.value) == null ? void 0 : c.toString(), "helper-text": s.helperText }, on: { input: (f) => i.handleInput(s.id || s.name, f) } }, t._l(s.defaultOptions, function(f) {
|
|
20183
|
+
}), 0) : s.defaultOptions !== void 0 ? n(i.TSelect, { key: s.id || s.name, staticClass: "t-select", attrs: { placeholder: s.placeholder, label: s.label, value: (c = s.value) == null ? void 0 : c.toString(), "helper-text": s.helperText }, on: { input: (f) => i.handleInput(s.id || s.name, f) } }, t._l(s.defaultOptions, function(f) {
|
|
20184
20184
|
return n("option", { key: f.toString(), domProps: { value: f.toString() } }, [t._v(" " + t._s(f) + " ")]);
|
|
20185
20185
|
}), 0) : n(i.SignupFieldComponent, { key: s.name, attrs: { id: s.id || s.name, value: i.getFieldValue(s), type: s.type, label: s.label, placeholder: s.placeholder, decimals: s.decimals, "helper-text": s.helperText, "left-icon": i.retrocompatibleIcon(s.leftIcon), required: s.required, regex: s.regex, "display-info": s.displayInfo, "right-icon": i.isFieldSearchable(s) ? "ph:magnifying-glass" : void 0 }, on: { input: (f) => i.handleInput(s.id || s.name, f), "right-icon-click": function(f) {
|
|
20186
20186
|
i.isFieldSearchable(s) && i.handleRightIconClick();
|
|
@@ -20192,7 +20192,7 @@ var yB = function() {
|
|
|
20192
20192
|
wB,
|
|
20193
20193
|
!1,
|
|
20194
20194
|
null,
|
|
20195
|
-
"
|
|
20195
|
+
"78b11c27",
|
|
20196
20196
|
null,
|
|
20197
20197
|
null
|
|
20198
20198
|
);
|
|
@@ -20233,9 +20233,9 @@ var CB = function() {
|
|
|
20233
20233
|
const PB = DB.exports, AB = /* @__PURE__ */ St({
|
|
20234
20234
|
__name: "CustomForm",
|
|
20235
20235
|
props: {
|
|
20236
|
-
organization: null,
|
|
20237
20236
|
customerFields: null,
|
|
20238
20237
|
invoiceFields: null,
|
|
20238
|
+
showSendByEmail: { type: Boolean },
|
|
20239
20239
|
countryIso: null,
|
|
20240
20240
|
disableSubmit: { type: Boolean },
|
|
20241
20241
|
isLoading: { type: Boolean },
|
|
@@ -20250,15 +20250,14 @@ const PB = DB.exports, AB = /* @__PURE__ */ St({
|
|
|
20250
20250
|
errorMessage: { default: "Error en la creación" },
|
|
20251
20251
|
errorButtonLabel: { default: "Intentar nuevamente" },
|
|
20252
20252
|
successMessage: { default: "Inscripción exitosa" },
|
|
20253
|
-
successButtonLabel: { default: "Registrar nuevo cliente" }
|
|
20253
|
+
successButtonLabel: { default: "Registrar nuevo cliente" },
|
|
20254
|
+
isPaymentPortal: { type: Boolean, default: !1 }
|
|
20254
20255
|
},
|
|
20255
20256
|
emits: ["submit-form-data", "reset", "autocomplete-subscription", "autocomplete-external-id"],
|
|
20256
20257
|
setup(e, { emit: t }) {
|
|
20257
20258
|
const n = e;
|
|
20258
20259
|
Oo.use(Hf);
|
|
20259
|
-
const i = It(n.customerFields), s = It(n.invoiceFields), u = It(n.isLoading), c = It(n.submitFormStatus), f = It(n.signupCompleted), p = It(n.errorMessage), m = It(n.isAutocompleteEnabled), _ = It(
|
|
20260
|
-
!n.organization.subscription_payment_methods
|
|
20261
|
-
), y = pe(() => [
|
|
20260
|
+
const i = It(n.customerFields), s = It(n.invoiceFields), u = It(n.isLoading), c = It(n.submitFormStatus), f = It(n.signupCompleted), p = It(n.errorMessage), m = It(n.isAutocompleteEnabled), _ = It(!n.showSendByEmail), y = pe(() => [
|
|
20262
20261
|
...i.value,
|
|
20263
20262
|
...s.value
|
|
20264
20263
|
]), { shouldShowField: P } = yh(y), { cleanGovernmentId: H } = cB();
|
|
@@ -20315,20 +20314,19 @@ const PB = DB.exports, AB = /* @__PURE__ */ St({
|
|
|
20315
20314
|
}
|
|
20316
20315
|
});
|
|
20317
20316
|
var FB = function() {
|
|
20318
|
-
var s;
|
|
20319
20317
|
var t = this, n = t._self._c, i = t._self._setupProxy;
|
|
20320
|
-
return n("main", [n("transition", { attrs: { name: "slide-fade", mode: "out-in" } }, [i.signupCompleted ? n(i.SignupCompleted, { attrs: { type: i.submitFormStatus, "error-message": i.errorMessage, "error-button-label": t.errorButtonLabel, "success-message": t.successMessage, "success-button-label": t.successButtonLabel }, on: { reset: function(
|
|
20318
|
+
return n("main", [n("transition", { attrs: { name: "slide-fade", mode: "out-in" } }, [i.signupCompleted ? n(i.SignupCompleted, { attrs: { type: i.submitFormStatus, "error-message": i.errorMessage, "error-button-label": t.errorButtonLabel, "success-message": t.successMessage, "success-button-label": t.successButtonLabel }, on: { reset: function(s) {
|
|
20321
20319
|
return i.emit("reset");
|
|
20322
|
-
} } }) : n("div", [n("div", {
|
|
20323
|
-
i.sendEmail =
|
|
20324
|
-
}, expression: "sendEmail" } }, [t._v(" " + t._s(t.sendByEmailText) + " ")])], 1), n("div", [n(i.TButton, { attrs: { disabled: t.disableSubmit, size: "medium", loading: i.isLoading }, on: { click: i.submitForm } }, [t._v(" " + t._s(t.buttonLabel) + " ")])], 1)])], 1)], 1);
|
|
20320
|
+
} } }) : n("div", { staticClass: "custom-form" }, [n("div", { class: [t.isPaymentPortal ? "portal-payment" : "backoffice"] }, [n(i.SignupFields, { attrs: { fields: i.customerFields, "fields-type": "customer", title: t.customerFieldsTitle, autocomplete: i.isAutocompleteEnabled, accounts: t.accounts }, on: { input: (s) => i.handleInput(i.customerFields, s), search: i.handleSearch } }), n(i.SignupFields, { attrs: { fields: i.invoiceFields, "fields-type": "invoice", title: t.invoiceFieldsTitle, accounts: t.accounts }, on: { input: (s) => i.handleInput(i.invoiceFields, s) } })], 1), n("div", [t.showSendByEmail ? n("b-checkbox", { attrs: { id: "send_email" }, model: { value: i.sendEmail, callback: function(s) {
|
|
20321
|
+
i.sendEmail = s;
|
|
20322
|
+
}, expression: "sendEmail" } }, [t._v(" " + t._s(t.sendByEmailText) + " ")]) : t._e()], 1), n("div", [n(i.TButton, { attrs: { disabled: t.disableSubmit, size: "medium", loading: i.isLoading }, on: { click: i.submitForm } }, [t._v(" " + t._s(t.buttonLabel) + " ")])], 1)])], 1)], 1);
|
|
20325
20323
|
}, MB = [], TB = /* @__PURE__ */ Ta(
|
|
20326
20324
|
AB,
|
|
20327
20325
|
FB,
|
|
20328
20326
|
MB,
|
|
20329
20327
|
!1,
|
|
20330
20328
|
null,
|
|
20331
|
-
"
|
|
20329
|
+
"f98c5b78",
|
|
20332
20330
|
null,
|
|
20333
20331
|
null
|
|
20334
20332
|
);
|