@craterapp/vue-sdk 0.0.2-alpha.4 → 0.0.2-alpha.41

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.
Files changed (75) hide show
  1. package/README.md +39 -1
  2. package/dist/{AddressType-8PU0QNGJ.js → AddressType-p464QTMJ.js} +93 -66
  3. package/dist/AmountType-rDKjqCi3.js +72 -0
  4. package/dist/BusinessType-uWSTq2OD.js +72 -0
  5. package/dist/{CheckboxType-C5lpH21J.js → CheckboxType-_ObNUiwW.js} +19 -19
  6. package/dist/DOBType-CRxx0XUD.js +129 -0
  7. package/dist/{DocumentType-GO5DTq0Z.js → DocumentType-CByDTkN8.js} +26 -26
  8. package/dist/{DropdownType-4jsWtYZp.js → DropdownType-ES6dnnh8.js} +1 -1
  9. package/dist/{EmailType-eEkcNiZo.js → EmailType-5R1vVctz.js} +4 -4
  10. package/dist/{ExternalAccountType-IAgoVvRA.js → ExternalAccountType-dzHvc0EK.js} +145 -111
  11. package/dist/{IdentityNumberType-eqbpWGqv.js → IdentityNumberType-Iym1d0fw.js} +5 -5
  12. package/dist/{InputType-sOejaH9_.js → InputType-LLnsMIae.js} +20 -19
  13. package/dist/{MCCType-G9pgwc9A.js → MCCType-q1-iWzd6.js} +1 -1
  14. package/dist/PercentageType-w0OlbA7l.js +75 -0
  15. package/dist/PhoneType-35hXi784.js +67 -0
  16. package/dist/{SSNType-BEvc-Buf.js → SSNType-e7EkHAE-.js} +4 -4
  17. package/dist/TaxType-MWMRrP-A.js +71 -0
  18. package/dist/{TextAreaType--obAg2K-.js → TextAreaType-Woc00ded.js} +6 -6
  19. package/dist/UrlType-J-0TFpJa.js +120 -0
  20. package/dist/crater-vue-sdk.es.js +45 -23
  21. package/dist/crater-vue-sdk.umd.js +88 -92
  22. package/dist/index-OQm7r3Dg.js +111548 -0
  23. package/dist/stripe.esm-Bik5J_JE.js +65 -0
  24. package/dist/style.css +2 -2
  25. package/dist/types/interfaces.d.ts +2 -1
  26. package/dist/views/BillCreate.vue.d.ts +32 -0
  27. package/dist/views/BillDetails.vue.d.ts +146 -0
  28. package/dist/views/BillEdit.vue.d.ts +41 -0
  29. package/dist/views/BillTable.vue.d.ts +175 -0
  30. package/dist/views/{SalesChartYearlyWidget.vue.d.ts → Breadcrumb.vue.d.ts} +3 -1
  31. package/dist/views/BreadcrumbItem.vue.d.ts +29 -0
  32. package/dist/views/BusinessOverviewLineChartWidget.vue.d.ts +75 -0
  33. package/dist/views/BusinessOverviewVerticalBarChartWidget.vue.d.ts +90 -0
  34. package/dist/views/BusinessPaymentStatus.vue.d.ts +9 -0
  35. package/dist/views/{CustomerEdit.vue.d.ts → BusinessStat.vue.d.ts} +12 -10
  36. package/dist/views/{PlatformSalesChartMonthlyWidget.vue.d.ts → BusinessStatItem.vue.d.ts} +15 -19
  37. package/dist/views/CreditNoteDetails.vue.d.ts +68 -0
  38. package/dist/views/CreditNoteTable.vue.d.ts +79 -0
  39. package/dist/views/CustomerCreate.vue.d.ts +35 -5
  40. package/dist/views/CustomerDetails.vue.d.ts +53 -12
  41. package/dist/views/CustomerTable.vue.d.ts +58 -11
  42. package/dist/views/EstimateCreate.vue.d.ts +26 -5
  43. package/dist/views/EstimateDetails.vue.d.ts +53 -6
  44. package/dist/views/EstimateEdit.vue.d.ts +20 -2
  45. package/dist/views/EstimateTable.vue.d.ts +88 -16
  46. package/dist/views/InvoiceCreate.vue.d.ts +26 -5
  47. package/dist/views/InvoiceDetails.vue.d.ts +80 -13
  48. package/dist/views/InvoiceEdit.vue.d.ts +20 -2
  49. package/dist/views/InvoiceTable.vue.d.ts +104 -23
  50. package/dist/views/ItemCreate.vue.d.ts +32 -0
  51. package/dist/views/ItemDetails.vue.d.ts +50 -0
  52. package/dist/views/ItemEdit.vue.d.ts +41 -0
  53. package/dist/views/ItemTable.vue.d.ts +110 -0
  54. package/dist/views/Payment.vue.d.ts +11 -2
  55. package/dist/views/PaymentDetails.vue.d.ts +68 -0
  56. package/dist/views/PaymentMethodCreate.vue.d.ts +50 -0
  57. package/dist/views/PaymentMethodTable.vue.d.ts +86 -0
  58. package/dist/views/PaymentTable.vue.d.ts +97 -0
  59. package/dist/views/{PlatformSalesChartYearlyWidget.vue.d.ts → PlatformOverviewChartWidget.vue.d.ts} +11 -0
  60. package/dist/views/RecurringInvoiceCreate.vue.d.ts +32 -0
  61. package/dist/views/RecurringInvoiceDetails.vue.d.ts +135 -0
  62. package/dist/views/RecurringInvoiceEdit.vue.d.ts +45 -0
  63. package/dist/views/RecurringInvoiceTable.vue.d.ts +119 -0
  64. package/dist/views/VendorCreate.vue.d.ts +32 -0
  65. package/dist/views/VendorDetails.vue.d.ts +73 -0
  66. package/dist/views/VendorTable.vue.d.ts +101 -0
  67. package/dist/views/index.d.ts +28 -6
  68. package/package.json +19 -18
  69. package/dist/DOBType-pINw7W9N.js +0 -129
  70. package/dist/PhoneType-anUg_IHm.js +0 -69
  71. package/dist/TaxType-v4merd3R.js +0 -68
  72. package/dist/UrlType-_XIXbmVm.js +0 -114
  73. package/dist/index-Pe5A-Fvf.js +0 -86463
  74. package/dist/views/HelloWorld.vue.d.ts +0 -6
  75. package/dist/views/SalesChartMonthlyWidget.vue.d.ts +0 -28
@@ -0,0 +1,67 @@
1
+ import { c as t, t as i, r as m, z as c, A as p, u as f, g as v, B as g, a as h } from "./index-OQm7r3Dg.js";
2
+ import { defineComponent as q, computed as y, openBlock as _, createBlock as $, unref as l, withCtx as S, createVNode as V } from "vue";
3
+ const w = /* @__PURE__ */ q({
4
+ __name: "PhoneType",
5
+ props: {
6
+ modelValue: {
7
+ type: String,
8
+ default: null
9
+ },
10
+ requirements: {
11
+ type: Array,
12
+ default: () => []
13
+ },
14
+ field: {
15
+ type: Object,
16
+ required: !0
17
+ },
18
+ placeholder: {
19
+ type: String,
20
+ default: ""
21
+ },
22
+ validationScope: {
23
+ type: String,
24
+ required: !0
25
+ },
26
+ step: {
27
+ type: Object,
28
+ required: !0
29
+ }
30
+ },
31
+ setup(e) {
32
+ const a = e, o = {
33
+ value: {
34
+ required: t.withMessage(
35
+ i("validation.required"),
36
+ m(a.field.is_required)
37
+ ),
38
+ minLength: t.withMessage(i("validation.invalid_phone"), c(10)),
39
+ maxLength: t.withMessage(i("validation.invalid_phone"), p(10))
40
+ }
41
+ }, r = f(
42
+ o,
43
+ y(() => a.field),
44
+ { $scope: a.validationScope }
45
+ );
46
+ return v(), (b, n) => {
47
+ const u = g, d = h;
48
+ return _(), $(d, {
49
+ label: e.field.label,
50
+ required: !!e.field.is_required,
51
+ error: l(r).value.$error && l(r).value.$errors[0].$message
52
+ }, {
53
+ default: S(() => [
54
+ V(u, {
55
+ modelValue: e.field.value,
56
+ "onUpdate:modelValue": n[0] || (n[0] = (s) => e.field.value = s),
57
+ invalid: l(r).value.$error
58
+ }, null, 8, ["modelValue", "invalid"])
59
+ ]),
60
+ _: 1
61
+ }, 8, ["label", "required", "error"]);
62
+ };
63
+ }
64
+ });
65
+ export {
66
+ w as default
67
+ };
@@ -1,5 +1,5 @@
1
- import { c as s, t as c, r as p, a as f, u as m, d as v, b as q } from "./index-Pe5A-Fvf.js";
2
- import { defineComponent as y, computed as S, resolveDirective as $, openBlock as _, createBlock as b, unref as a, withCtx as h, withDirectives as V, createVNode as g } from "vue";
1
+ import { c as s, t as c, r as p, u as f, g as m, b as v, a as q } from "./index-OQm7r3Dg.js";
2
+ import { defineComponent as y, computed as S, resolveDirective as $, openBlock as _, createBlock as b, unref as a, withCtx as g, withDirectives as h, createVNode as V } from "vue";
3
3
  const B = /* @__PURE__ */ y({
4
4
  __name: "SSNType",
5
5
  props: {
@@ -48,8 +48,8 @@ const B = /* @__PURE__ */ y({
48
48
  required: !!e.field.is_required,
49
49
  error: a(t).value.$error && a(t).value.$errors[0].$message
50
50
  }, {
51
- default: h(() => [
52
- V(g(o, {
51
+ default: g(() => [
52
+ h(V(o, {
53
53
  modelValue: e.field.value,
54
54
  "onUpdate:modelValue": l[0] || (l[0] = (n) => e.field.value = n),
55
55
  type: "text",
@@ -0,0 +1,71 @@
1
+ import { c, t as m, r as f, u as p, g as v, b as q, a as y } from "./index-OQm7r3Dg.js";
2
+ import { defineComponent as $, computed as _, resolveDirective as b, openBlock as g, createBlock as S, unref as a, withCtx as V, withDirectives as k, createVNode as x } from "vue";
3
+ const I = /* @__PURE__ */ $({
4
+ __name: "TaxType",
5
+ props: {
6
+ modelValue: {
7
+ type: String,
8
+ default: null
9
+ },
10
+ requirements: {
11
+ type: Array,
12
+ default: () => []
13
+ },
14
+ field: {
15
+ type: Object,
16
+ required: !0
17
+ },
18
+ placeholder: {
19
+ type: String,
20
+ default: ""
21
+ },
22
+ validationScope: {
23
+ type: String,
24
+ required: !0
25
+ },
26
+ step: {
27
+ type: Object,
28
+ required: !0
29
+ }
30
+ },
31
+ setup(e) {
32
+ const r = e, u = {
33
+ value: {
34
+ required: c.withMessage(
35
+ m("validation.required"),
36
+ f(r.field.is_required)
37
+ )
38
+ }
39
+ }, t = p(
40
+ u,
41
+ _(() => r.field),
42
+ { $scope: r.validationScope }
43
+ );
44
+ return v(), (B, i) => {
45
+ const o = q, d = y, n = b("maska");
46
+ return g(), S(d, {
47
+ label: e.field.label,
48
+ required: !!e.field.is_required,
49
+ error: a(t).value.$error && a(t).value.$errors[0].$message
50
+ }, {
51
+ default: V(() => {
52
+ var l;
53
+ return [
54
+ k(x(o, {
55
+ modelValue: e.field.value,
56
+ "onUpdate:modelValue": i[0] || (i[0] = (s) => e.field.value = s),
57
+ type: "text",
58
+ invalid: a(t).value.$error
59
+ }, null, 8, ["modelValue", "invalid"]), [
60
+ [n, ((l = e.field) == null ? void 0 : l.maska) ?? "##-#######"]
61
+ ])
62
+ ];
63
+ }),
64
+ _: 1
65
+ }, 8, ["label", "required", "error"]);
66
+ };
67
+ }
68
+ });
69
+ export {
70
+ I as default
71
+ };
@@ -1,5 +1,5 @@
1
- import { c as n, t as s, r as c, a as f, u as m, _ as p, b as v } from "./index-Pe5A-Fvf.js";
2
- import { defineComponent as q, computed as y, openBlock as $, createBlock as S, unref as a, withCtx as b, createVNode as g } from "vue";
1
+ import { c as n, t as s, r as c, u as f, g as m, _ as p, a as v } from "./index-OQm7r3Dg.js";
2
+ import { defineComponent as q, computed as y, openBlock as $, createBlock as g, unref as a, withCtx as S, createVNode as w } from "vue";
3
3
  const x = /* @__PURE__ */ q({
4
4
  __name: "TextAreaType",
5
5
  props: {
@@ -45,15 +45,15 @@ const x = /* @__PURE__ */ q({
45
45
  y(() => r.field),
46
46
  { $scope: r.validationScope }
47
47
  );
48
- return m(), (w, l) => {
48
+ return m(), (V, l) => {
49
49
  const o = p, i = v;
50
- return $(), S(i, {
50
+ return $(), g(i, {
51
51
  label: e.field.label,
52
52
  required: !!e.field.is_required,
53
53
  error: a(t).value.$error && a(t).value.$errors[0].$message
54
54
  }, {
55
- default: b(() => [
56
- g(o, {
55
+ default: S(() => [
56
+ w(o, {
57
57
  modelValue: e.field.value,
58
58
  "onUpdate:modelValue": l[0] || (l[0] = (d) => e.field.value = d),
59
59
  type: "url",
@@ -0,0 +1,120 @@
1
+ import { c as p, t as f, r as m, u as q, g as x, b as S, a as h } from "./index-OQm7r3Dg.js";
2
+ import { defineComponent as D, ref as k, computed as A, openBlock as B, createElementBlock as C, Fragment as I, withDirectives as v, createVNode as s, unref as r, withCtx as y, createElementVNode as c, createTextVNode as V, vShow as $, watch as N } from "vue";
3
+ const U = { class: "text-sm mt-1 text-gray-600" }, P = { class: "text-sm mt-1 text-gray-600" }, K = /* @__PURE__ */ D({
4
+ inheritAttrs: !1,
5
+ __name: "UrlType",
6
+ props: {
7
+ modelValue: {
8
+ type: String,
9
+ default: null
10
+ },
11
+ requirements: {
12
+ type: Array,
13
+ default: () => []
14
+ },
15
+ field: {
16
+ type: Object,
17
+ required: !0
18
+ },
19
+ placeholder: {
20
+ type: String,
21
+ default: ""
22
+ },
23
+ validationScope: {
24
+ type: String,
25
+ required: !0
26
+ },
27
+ step: {
28
+ type: Object,
29
+ required: !0
30
+ }
31
+ },
32
+ setup(i) {
33
+ const l = i, t = k(!1), b = {
34
+ value: {
35
+ required: p.withMessage(
36
+ f("validation.required"),
37
+ m((o) => t.value == !1)
38
+ )
39
+ },
40
+ alternateValue: {
41
+ required: p.withMessage(
42
+ f("validation.required"),
43
+ m((o) => t.value == !0)
44
+ )
45
+ }
46
+ }, u = q(
47
+ b,
48
+ A(() => l.field),
49
+ { $scope: l.validationScope }
50
+ );
51
+ function g() {
52
+ var n, d, a;
53
+ const o = w.getDraftPayoutFormData(), e = (a = o == null ? void 0 : o[(n = l.step) == null ? void 0 : n.stepKey]) == null ? void 0 : a[(d = l.field) == null ? void 0 : d.alternateKey];
54
+ e && (t.value = !0, l.field.alternateValue = e), N(t, () => {
55
+ l.field.value = null, l.field.alternateValue = null;
56
+ });
57
+ }
58
+ const w = x();
59
+ return g(), (o, e) => {
60
+ const n = S, d = h;
61
+ return B(), C(I, null, [
62
+ v(s(d, {
63
+ label: i.field.label,
64
+ required: "",
65
+ error: r(u).value.$error && r(u).value.$errors[0].$message,
66
+ "data-cy": "website-url"
67
+ }, {
68
+ default: y(() => [
69
+ s(n, {
70
+ modelValue: i.field.value,
71
+ "onUpdate:modelValue": e[0] || (e[0] = (a) => i.field.value = a),
72
+ invalid: r(u).value.$error
73
+ }, null, 8, ["modelValue", "invalid"]),
74
+ c("p", U, [
75
+ V(" No website? "),
76
+ c("a", {
77
+ href: "#",
78
+ class: "text-primary-500",
79
+ "data-cy": "add-product-description",
80
+ onClick: e[1] || (e[1] = (a) => t.value = !0)
81
+ }, " Add a product description instead ")
82
+ ])
83
+ ]),
84
+ _: 1
85
+ }, 8, ["label", "error"]), [
86
+ [$, !r(t)]
87
+ ]),
88
+ v(s(d, {
89
+ label: "Product Description",
90
+ required: "",
91
+ "data-cy": "product-description",
92
+ error: r(u).alternateValue.$error && r(u).alternateValue.$errors[0].$message
93
+ }, {
94
+ default: y(() => [
95
+ s(n, {
96
+ modelValue: i.field.alternateValue,
97
+ "onUpdate:modelValue": e[2] || (e[2] = (a) => i.field.alternateValue = a),
98
+ invalid: r(u).alternateValue.$error
99
+ }, null, 8, ["modelValue", "invalid"]),
100
+ c("p", P, [
101
+ V(" Have a website? "),
102
+ c("a", {
103
+ href: "#",
104
+ class: "text-primary-500",
105
+ "data-cy": "add-website-url",
106
+ onClick: e[3] || (e[3] = (a) => t.value = !1)
107
+ }, " Add a website URL ")
108
+ ])
109
+ ]),
110
+ _: 1
111
+ }, 8, ["error"]), [
112
+ [$, r(t)]
113
+ ])
114
+ ], 64);
115
+ };
116
+ }
117
+ });
118
+ export {
119
+ K as default
120
+ };
@@ -1,26 +1,48 @@
1
- import { C as t, L as r, O as i, M as l, N as o, D as m, G as C, E as n, F as E, B as d, H as u, K as c, I as g, J as h, A as y, S, R as P, Q as v, P as I, y as W, x as D, z as M } from "./index-Pe5A-Fvf.js";
1
+ import { V as t, Y as i, W as r, X as l, H as n, I as m, ae as o, ad as c, G as d, ab as C, ai as u, ah as I, a2 as v, a4 as b, a3 as g, N as B, Q as E, O as T, P as D, aa as P, R as h, U as y, S as R, T as S, J as V, M, K as O, L as W, a9 as f, F as w, ag as L, af as N, a8 as p, ac as x, Z as F, a1 as G, $ as H, a0 as J, a5 as K, a7 as Q, a6 as U, D as X, C as Y, E as Z } from "./index-OQm7r3Dg.js";
2
2
  import "vue";
3
3
  export {
4
- t as BusinessPaymentStatus,
5
- r as CustomerCreate,
6
- i as CustomerDetails,
7
- l as CustomerEdit,
8
- o as CustomerTable,
9
- m as EstimateCreate,
10
- C as EstimateDetails,
11
- n as EstimateEdit,
12
- E as EstimateTable,
13
- d as HelloWorld,
14
- u as InvoiceCreate,
15
- c as InvoiceDetails,
16
- g as InvoiceEdit,
17
- h as InvoiceTable,
18
- y as PaymentElement,
19
- S as PlatformSalesChartMonthlyWidget,
20
- P as PlatformSalesChartYearlyWidget,
21
- v as SalesChartMonthlyWidget,
22
- I as SalesChartYearlyWidget,
23
- W as authService,
24
- D as craterPlugin,
25
- M as mergeLocaleMessages
4
+ t as BillCreate,
5
+ i as BillDetails,
6
+ r as BillEdit,
7
+ l as BillTable,
8
+ n as Breadcrumb,
9
+ m as BreadcrumbItem,
10
+ o as BusinessOverviewLineChartWidget,
11
+ c as BusinessOverviewVerticalBarChartWidget,
12
+ d as BusinessPaymentStatus,
13
+ C as BusinessStatItem,
14
+ u as CreditNoteDetails,
15
+ I as CreditNoteTable,
16
+ v as CustomerCreate,
17
+ b as CustomerDetails,
18
+ g as CustomerTable,
19
+ B as EstimateCreate,
20
+ E as EstimateDetails,
21
+ T as EstimateEdit,
22
+ D as EstimateTable,
23
+ P as IntegrationSettings,
24
+ h as InvoiceCreate,
25
+ y as InvoiceDetails,
26
+ R as InvoiceEdit,
27
+ S as InvoiceTable,
28
+ V as ItemCreate,
29
+ M as ItemDetails,
30
+ O as ItemEdit,
31
+ W as ItemTable,
32
+ f as PaymentDetails,
33
+ w as PaymentElement,
34
+ L as PaymentMethodCreate,
35
+ N as PaymentMethodTable,
36
+ p as PaymentTable,
37
+ x as PlatformOverviewChartWidget,
38
+ F as RecurringInvoiceCreate,
39
+ G as RecurringInvoiceDetails,
40
+ H as RecurringInvoiceEdit,
41
+ J as RecurringInvoiceTable,
42
+ K as VendorCreate,
43
+ Q as VendorDetails,
44
+ U as VendorTable,
45
+ X as authService,
46
+ Y as craterPlugin,
47
+ Z as mergeLocaleMessages
26
48
  };