toku-form-extensions 0.0.4 → 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.
@@ -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, Organization } from '../../types/entities';
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,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOzD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8Y5C,wBAAkD"}
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"}
package/dist/index.es.js CHANGED
@@ -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(u) {
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", { staticClass: "fields" }, [n(i.SignupFields, { attrs: { fields: i.customerFields, "fields-type": "customer", title: t.customerFieldsTitle, autocomplete: i.isAutocompleteEnabled, accounts: t.accounts }, on: { input: (u) => i.handleInput(i.customerFields, u), search: i.handleSearch } }), n(i.SignupFields, { attrs: { fields: i.invoiceFields, "fields-type": "invoice", title: t.invoiceFieldsTitle, accounts: t.accounts }, on: { input: (u) => i.handleInput(i.invoiceFields, u) } })], 1), n("div", [(s = t.organization) != null && s.subscription_payment_methods ? t._e() : n("b-checkbox", { attrs: { id: "send_email" }, model: { value: i.sendEmail, callback: function(u) {
20323
- i.sendEmail = u;
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
- "535a7b36",
20329
+ "f98c5b78",
20332
20330
  null,
20333
20331
  null
20334
20332
  );