@moneyto/components 0.0.13 → 0.0.14

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,85 +1,87 @@
1
- import { d as I, c as J, p as K, a as O, o as Q, t as v, i as k, s as p, b as o, S as R, e as i, f as W, g as X, h as t, j as D, r as s, k as w, l as Y, m as Z, n as $, q as L, u as j, v as F, w as tt, x as at, y as x } from "./Styles-Dmz3r-1B.js";
2
- import { A as et, f as st, e as rt, i as nt, c as ot, a as lt } from "./api-Aa0lPCOo.js";
3
- var it = v('<div class="h-250 w-full animate-pulse rounded-lg bg-gray-300"></div>'), ct = v('<a><span class="@2xl:text-4xl text-3xl leading-[.8]"> </span> <span class="max-w-40"> </span></a>'), ut = v('<button><span class="@2xl:text-4xl text-3xl leading-[.8]"> </span> <span class="max-w-40"> </span></button>'), dt = v('<div class="@xl:grid-cols-3 @2xl:grid-cols-4 @4xl:grid-cols-5 @6xl:grid-cols-6 grid grid-cols-2 gap-x-2 gap-y-4"></div>'), vt = v('<main class="@container"><!> <!> <!></main>');
4
- function pt(N, c) {
1
+ import { d as I, c as J, p as K, a as O, o as Q, f as v, i as w, s as p, b as o, S as R, e as i, g as W, h as X, j as t, k as L, r as s, l as C, m as Y, n as Z, q as j, t as F, u as $, v as N, w as tt, x as m } from "./Styles-CV5FG1EQ.js";
2
+ import { A as at, f as et, e as st, i as rt, c as nt, a as ot } from "./api-Ss7kA2Mb.js";
3
+ var lt = v('<div class="h-250 w-full animate-pulse rounded-lg bg-gray-300"></div>'), it = v('<a><span class="@2xl:text-4xl text-3xl leading-[.8]"> </span> <span class="max-w-40"> </span></a>'), ct = v('<button><span class="@2xl:text-4xl text-3xl leading-[.8]"> </span> <span class="max-w-40"> </span></button>'), ut = v('<div class="@xl:grid-cols-3 @2xl:grid-cols-4 @4xl:grid-cols-5 @6xl:grid-cols-6 grid grid-cols-2 gap-x-2 gap-y-4"></div>'), dt = v('<main class="@container"><!> <!> <!></main>');
4
+ function vt(P, c) {
5
5
  K(c, !0);
6
- let m = O(c, "countriesUrl", 23, () => "https://transfer.moneyto.co.uk/sf/country-list");
7
- const P = new et(c.apiVersion);
8
- let g = D(void 0), f = D(!1);
9
- const V = async () => {
10
- w(f, !0), w(g, Y(await P.loadData(m()))), w(f, !1);
11
- }, C = (a) => ot(lt[a.CountryAlpha3]);
6
+ let x = O(c, "countriesUrl", 23, () => "https://transfer.moneyto.co.uk/sf/country-list");
7
+ const V = new at(c.apiVersion);
8
+ let g = L(void 0), f = L(!1);
9
+ const q = async () => {
10
+ C(f, !0), C(g, await V.loadData(x()), !0), C(f, !1);
11
+ }, S = (a) => nt(ot[a.CountryAlpha3]);
12
12
  Q(() => {
13
- V(), st();
13
+ q(), et();
14
14
  });
15
- var _ = vt(), U = o(_);
15
+ var _ = dt(), U = o(_);
16
16
  {
17
- var q = (a) => {
18
- var u = it();
17
+ var M = (a) => {
18
+ var u = lt();
19
19
  i(a, u);
20
20
  };
21
- k(U, (a) => {
22
- t(f) && a(q);
21
+ w(U, (a) => {
22
+ t(f) && a(M);
23
23
  });
24
24
  }
25
- var E = p(U, 2);
25
+ var A = p(U, 2);
26
26
  {
27
- var M = (a) => {
28
- var u = dt();
29
- rt(u, 21, () => t(g).Country, nt, (z, r) => {
30
- var S = Z();
31
- const A = tt(() => "cursor-pointer flex items-center self-center gap-2 @2xl:gap-3 font-medium text-left text-base @sm:text-lg leading-normal text-pretty text-m2-text-input p-2 rounded-lg transition-colors hover:bg-m2-accent");
32
- var B = $(S);
27
+ var T = (a) => {
28
+ var u = ut();
29
+ st(u, 21, () => t(g).Country.filter((h) => h.CountryAlpha3), rt, (h, r) => {
30
+ var E = Y();
31
+ const D = $(() => "cursor-pointer flex items-center self-center gap-2 @2xl:gap-3 font-medium text-left text-base @sm:text-lg leading-normal text-pretty text-m2-text-input p-2 rounded-lg transition-colors hover:bg-m2-accent");
32
+ var B = Z(E);
33
33
  {
34
34
  var G = (l) => {
35
- var e = ct(), n = o(e), y = o(n, !0);
35
+ var e = it();
36
+ j(e, 1, F(t(D)));
37
+ var n = o(e), y = o(n, !0);
36
38
  s(n);
37
- var d = p(n, 2), h = o(d, !0);
38
- s(d), s(e), L(
39
- (b) => {
40
- j(e, F(t(A))), at(e, "href", t(r).PageLink), x(y, b), x(h, t(r).Name);
39
+ var d = p(n, 2), b = o(d, !0);
40
+ s(d), s(e), N(
41
+ (k) => {
42
+ tt(e, "href", t(r).PageLink), m(y, k), m(b, t(r).Name);
41
43
  },
42
- [() => C(t(r))]
44
+ [() => S(t(r))]
43
45
  ), i(l, e);
44
46
  }, H = (l) => {
45
- var e = ut();
46
- e.__click = () => {
47
+ var e = ct();
48
+ j(e, 1, F(t(D))), e.__click = () => {
47
49
  c.$$host.dispatchEvent(new CustomEvent("select", { detail: { country: t(r) } }));
48
50
  };
49
51
  var n = o(e), y = o(n, !0);
50
52
  s(n);
51
- var d = p(n, 2), h = o(d, !0);
52
- s(d), s(e), L(
53
- (b) => {
54
- j(e, F(t(A))), x(y, b), x(h, t(r).Name);
53
+ var d = p(n, 2), b = o(d, !0);
54
+ s(d), s(e), N(
55
+ (k) => {
56
+ m(y, k), m(b, t(r).Name);
55
57
  },
56
- [() => C(t(r))]
58
+ [() => S(t(r))]
57
59
  ), i(l, e);
58
60
  };
59
- k(B, (l) => {
61
+ w(B, (l) => {
60
62
  t(r).PageLink ? l(G) : l(H, !1);
61
63
  });
62
64
  }
63
- i(z, S);
65
+ i(h, E);
64
66
  }), s(u), i(a, u);
65
67
  };
66
- k(E, (a) => {
67
- t(g) && a(M);
68
+ w(A, (a) => {
69
+ t(g) && a(T);
68
70
  });
69
71
  }
70
- var T = p(E, 2);
71
- return R(T, { host: c.$$host }), s(_), i(N, _), W({
72
+ var z = p(A, 2);
73
+ return R(z, { host: c.$$host }), s(_), i(P, _), W({
72
74
  get countriesUrl() {
73
- return m();
75
+ return x();
74
76
  },
75
77
  set countriesUrl(a = "https://transfer.moneyto.co.uk/sf/country-list") {
76
- m(a), X();
78
+ x(a), X();
77
79
  }
78
80
  });
79
81
  }
80
82
  I(["click"]);
81
83
  customElements.define("moneyto-country-list", J(
82
- pt,
84
+ vt,
83
85
  {
84
86
  countriesUrl: { attribute: "countries-url", type: "String" },
85
87
  apiVersion: { attribute: "api-version", type: "String" }
@@ -89,5 +91,5 @@ customElements.define("moneyto-country-list", J(
89
91
  !0
90
92
  ));
91
93
  export {
92
- pt as default
94
+ vt as default
93
95
  };