@kiva/kv-shop 3.8.31 → 3.8.33

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,7 +1,7 @@
1
1
  import o from "graphql-tag";
2
2
  import "numeral";
3
- import { LOAN_CALLOUTS_FRAGMENT as a, LOAN_GEOCODE_FRAGMENT as r, LOAN_PROGRESS_FRAGMENT as i } from "../utils/loanCard.js";
4
- import { KV_LOAN_USE_FRAGMENT as m } from "./KvLoanUse2.js";
3
+ import { LOAN_CALLOUTS_FRAGMENT as r, LOAN_GEOCODE_FRAGMENT as a, LOAN_PROGRESS_FRAGMENT as m } from "../utils/loanCard.js";
4
+ import { KV_LOAN_USE_FRAGMENT as i } from "./KvLoanUse2.js";
5
5
  import "vue";
6
6
  /* empty css */
7
7
  /* empty css */
@@ -41,10 +41,10 @@ o`
41
41
  ${n}
42
42
  ${L}
43
43
  ${s}
44
- ${m}
45
- ${a}
46
- ${r}
47
44
  ${i}
45
+ ${r}
46
+ ${a}
47
+ ${m}
48
48
  `;
49
49
  o`
50
50
  fragment KvClassicLoanCardUser on LoanBasic {
@@ -1 +1 @@
1
- .loan-card-use[data-v-02aa45c6]:hover,.loan-card-use[data-v-02aa45c6]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-02aa45c6]{text-decoration-line:underline}.loan-card-progress[data-v-02aa45c6]:hover,.loan-card-progress[data-v-02aa45c6]:focus{text-decoration-line:none}.loan-card-use-text[data-v-02aa45c6] p{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;overflow:hidden;text-overflow:ellipsis}.loan-card-cta[data-v-02aa45c6] form,.loan-card-cta[data-v-02aa45c6] fieldset,.loan-card-cta[data-v-02aa45c6] .tw-w-full,.loan-card-cta[data-v-02aa45c6] button{height:40px!important;max-height:40px!important;display:flex!important;align-items:center!important;justify-content:center!important}.loan-card-cta[data-v-02aa45c6] .tw-inline-flex{height:40px!important;max-height:40px!important;min-height:40px!important}[data-v-02aa45c6] .amount-dropdown select{height:2.25rem;--tw-border-opacity: 1;border-color:rgb(245 245 245 / var(--tw-border-opacity, 1));padding-left:.5rem}[data-v-02aa45c6] .goal-variant-callouts span{font-weight:500}.goal-variant-progress-group[data-v-02aa45c6] div[role=progressbar]{background-color:#d9d9d9}
1
+ .loan-card-use[data-v-330ff302]:hover,.loan-card-use[data-v-330ff302]:focus{--tw-text-opacity: 1;color:rgba(var(--text-primary),var(--tw-text-opacity, 1))}.loan-card-active-hover:hover .loan-card-use[data-v-330ff302]{text-decoration-line:underline}.loan-card-progress[data-v-330ff302]:hover,.loan-card-progress[data-v-330ff302]:focus{text-decoration-line:none}.loan-card-use-text-light-detailed[data-v-330ff302] p{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3}.loan-card-cta[data-v-330ff302] form,.loan-card-cta[data-v-330ff302] fieldset,.loan-card-cta[data-v-330ff302] .tw-w-full,.loan-card-cta[data-v-330ff302] button{display:flex!important;height:2.5rem!important;max-height:2.5rem!important;align-items:center!important;justify-content:center!important}.loan-card-cta[data-v-330ff302] .tw-inline-flex{height:2.5rem!important;max-height:2.5rem!important;min-height:2.5rem!important}[data-v-330ff302] .amount-dropdown select{height:2.25rem;--tw-border-opacity: 1;border-color:rgb(245 245 245 / var(--tw-border-opacity, 1));padding-left:.5rem}[data-v-330ff302] .goal-variant-callouts span{font-weight:500}.goal-variant-progress-group[data-v-330ff302] div[role=progressbar]{background-color:#d9d9d9}.light-detailed-progress-group[data-v-330ff302] p:first-of-type{margin-bottom:.5rem}
@@ -1,7 +1,7 @@
1
1
  import o from "graphql-tag";
2
2
  import "@mdi/js";
3
3
  import "vue";
4
- const t = o`
4
+ const a = o`
5
5
  fragment KvLoanBookmark on LoanBasic {
6
6
  id
7
7
  userProperties {
@@ -10,5 +10,5 @@ const t = o`
10
10
  }
11
11
  `;
12
12
  export {
13
- t as KV_LOAN_BOOKMARK_FRAGMENT
13
+ a as KV_LOAN_BOOKMARK_FRAGMENT
14
14
  };
@@ -1,6 +1,6 @@
1
1
  import o from "graphql-tag";
2
2
  import { LOAN_GEOCODE_FRAGMENT as r } from "../utils/loanCard.js";
3
- import { KV_LOAN_USE_FRAGMENT as a } from "./KvLoanUse2.js";
3
+ import { KV_LOAN_USE_FRAGMENT as m } from "./KvLoanUse2.js";
4
4
  import "vue";
5
5
  /* empty css */
6
6
  import "@kiva/kv-tokens";
@@ -18,6 +18,6 @@ o`
18
18
  ...KvLoanUse
19
19
  ...LoanGeocode
20
20
  }
21
- ${a}
21
+ ${m}
22
22
  ${r}
23
23
  `;
@@ -1,6 +1,6 @@
1
1
  import o from "graphql-tag";
2
2
  import "numeral";
3
- const t = o`
3
+ const a = o`
4
4
  fragment KvLoanUse on LoanBasic {
5
5
  id
6
6
  anonymizationLevel
@@ -14,5 +14,5 @@ const t = o`
14
14
  }
15
15
  `;
16
16
  export {
17
- t as KV_LOAN_USE_FRAGMENT
17
+ a as KV_LOAN_USE_FRAGMENT
18
18
  };
package/dist/shopError.js CHANGED
@@ -1,41 +1,44 @@
1
1
  class a extends Error {
2
- constructor({ code: n, original: i }, ...t) {
3
- super(...t), Error.captureStackTrace && Error.captureStackTrace(this, a), this.name = "ShopError", this.code = n, this.original = i;
2
+ constructor({ code: n, original: t }, ...i) {
3
+ super(...i), Error.captureStackTrace && Error.captureStackTrace(this, a), this.name = "ShopError", this.code = n, this.original = t;
4
4
  }
5
5
  aggregateErrors(n) {
6
6
  this.errors = n;
7
7
  }
8
8
  }
9
9
  function u(e) {
10
- var t;
10
+ var i;
11
11
  if (e instanceof a)
12
12
  return e;
13
- const n = (e == null ? void 0 : e.code) ?? ((t = e == null ? void 0 : e.extensions) == null ? void 0 : t.code) ?? (e == null ? void 0 : e.name) ?? "", i = typeof e == "string" ? e : (e == null ? void 0 : e.message) ?? "";
14
- if (n === "invalidMethodParameter" && i.includes("paymentMethod.create"))
13
+ const n = (e == null ? void 0 : e.code) ?? ((i = e == null ? void 0 : e.extensions) == null ? void 0 : i.code) ?? (e == null ? void 0 : e.name) ?? "", t = typeof e == "string" ? e : (e == null ? void 0 : e.message) ?? "";
14
+ if (n === "invalidMethodParameter" && t.includes("paymentMethod.create"))
15
15
  return new a({
16
16
  code: "paymentMethod.create.invalidMethodParameter",
17
17
  original: e
18
18
  }, "There was a problem validating your payment information. Please double-check the details and try again.");
19
- if (i.includes("Invalid request: ")) {
20
- const s = i.split("Invalid request: ")[1].split("., ").map((c) => c.matchAll(/[A-Z_]+: (.*)/g))[0], o = s[1], d = s[2];
19
+ if (t.includes("Invalid request: ")) {
20
+ const s = t.split("Invalid request: ")[1].split("., ").map((d) => d.matchAll(/[A-Z_]+: (.*)/g))[0], o = s[1], c = s[2];
21
21
  return new a({
22
22
  code: `paymentMethod.${o}`,
23
23
  original: e
24
- }, d);
24
+ }, c);
25
25
  }
26
- return n === "insufficientFunds" || i.includes("There is not enough credit") ? new a({
26
+ return n === "insufficientFunds" || t.includes("There is not enough credit") ? new a({
27
27
  code: "shop.insufficientFunds",
28
28
  original: e
29
- }, "There is not enough money to complete the checkout. Please double-check the details and try again.") : i.includes("already has a Giving Fund with category") ? new a({
29
+ }, "There is not enough money to complete the checkout. Please double-check the details and try again.") : t.includes("already has a Giving Fund with category") ? new a({
30
30
  code: "shop.givingfunds.duplicateFundCreation",
31
31
  original: e
32
32
  }, "You already have a giving fund supporting this group of people.") : n === "shop.invalidBasketId" || n === "shop.basketRequired" || n === "shop.alreadyCheckedOut" ? new a({
33
33
  code: n,
34
34
  original: e
35
- }, "There was a problem with your basket. Please, refresh the page and try again.") : n === "donationAmountTooLarge" ? new a({
35
+ }, "There was a problem with your basket. Please, refresh the page and try again.") : n === "checkout_in_progress" || n === "shop.checkoutInProgress" ? new a({
36
36
  code: n,
37
37
  original: e
38
- }, i) : new a({
38
+ }, "Your checkout is being processed, so your basket can’t be changed right now. Please wait a moment and refresh the page.") : n === "donationAmountTooLarge" ? new a({
39
+ code: n,
40
+ original: e
41
+ }, t) : new a({
39
42
  code: "shop.unknown",
40
43
  original: e
41
44
  }, "An unknown error occurred.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kiva/kv-shop",
3
- "version": "3.8.31",
3
+ "version": "3.8.33",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -34,7 +34,7 @@
34
34
  "devDependencies": {
35
35
  "@apollo/client": "^3.13.1",
36
36
  "@kiva/kv-analytics": "^1.4.0",
37
- "@kiva/kv-components": "^10.4.1",
37
+ "@kiva/kv-components": "^10.5.0",
38
38
  "@kiva/vite-plugin-vue-lib-css": "^2.0.0",
39
39
  "@types/braintree-web-drop-in": "^1.39.3",
40
40
  "braintree-web-drop-in": "^1.44.1",
@@ -49,5 +49,5 @@
49
49
  "numeral": "2.x",
50
50
  "vue": "3.x"
51
51
  },
52
- "gitHead": "b4b0ee68cc95def097ca00ae4bdb56861437087d"
52
+ "gitHead": "007bb466335bd646f36fb385eec7bd0dea54988c"
53
53
  }