@ancon/wildcat-utils 1.30.4 → 1.30.6

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,2 +1,2 @@
1
- import { CheckoutDetails } from '@ancon/wildcat-types';
2
- export default function getCheckoutGrandTotalAmount(checkout: CheckoutDetails): string;
1
+ import { Amount, CheckoutDetails } from '@ancon/wildcat-types';
2
+ export default function getCheckoutGrandTotalAmount(checkout: CheckoutDetails): Amount;
@@ -1 +1 @@
1
- "use strict";const c=require("../currency/getFormattedCurrency.js");require("../currency/getFormattedCurrencyPostfix.js");function a(t){var e,o,u;const n=((e=t.minimumOrderDifferenceAmount)==null?void 0:e.amount)??0,r=((o=t.totalAmount)==null?void 0:o.amount)??0,m=n>0?r+n:r;return c(m,(u=t.totalAmount)==null?void 0:u.currency)}module.exports=a;
1
+ "use strict";function m(t){var u,r,e;const n=((u=t.minimumOrderDifferenceAmount)==null?void 0:u.amount)??0,o=((r=t.totalAmount)==null?void 0:r.amount)??0;return{amount:n>0?o+n:o,currency:(e=t.totalAmount)==null?void 0:e.currency}}module.exports=m;
@@ -1,10 +1,11 @@
1
- import a from "../currency/getFormattedCurrency.mjs";
2
- import "../currency/getFormattedCurrencyPostfix.mjs";
3
- function c(t) {
4
- var r, m, e;
5
- const n = ((r = t.minimumOrderDifferenceAmount) == null ? void 0 : r.amount) ?? 0, o = ((m = t.totalAmount) == null ? void 0 : m.amount) ?? 0, u = n > 0 ? o + n : o;
6
- return a(u, (e = t.totalAmount) == null ? void 0 : e.currency);
1
+ function a(t) {
2
+ var u, e, m;
3
+ const n = ((u = t.minimumOrderDifferenceAmount) == null ? void 0 : u.amount) ?? 0, o = ((e = t.totalAmount) == null ? void 0 : e.amount) ?? 0;
4
+ return {
5
+ amount: n > 0 ? o + n : o,
6
+ currency: (m = t.totalAmount) == null ? void 0 : m.currency
7
+ };
7
8
  }
8
9
  export {
9
- c as default
10
+ a as default
10
11
  };
@@ -20,7 +20,7 @@ declare type Options = {
20
20
  checkoutStatus?: never;
21
21
  ticketStatus: TicketStatus;
22
22
  });
23
- declare type Translation = {
23
+ export declare type Translation = {
24
24
  title: string;
25
25
  message?: string;
26
26
  };
@@ -58,7 +58,7 @@ declare type TranslationsWithMeta = {
58
58
  };
59
59
  }) => Translation;
60
60
  };
61
- declare type TranslatedTexts = Record<Exclude<TranslationKey, keyof TranslationsWithMeta>, ({ key }: {
61
+ export declare type TranslatedTexts = Record<Exclude<TranslationKey, keyof TranslationsWithMeta>, ({ key }: {
62
62
  key: TranslationKey;
63
63
  }) => Translation> & TranslationsWithMeta;
64
64
  declare function getOrderStatusTexts(checkout: CheckoutSummary | null | undefined, options: Options, texts?: TranslatedTexts): [Translation, TranslationKey];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ancon/wildcat-utils",
3
- "version": "1.30.4",
3
+ "version": "1.30.6",
4
4
  "private": false,
5
5
  "main": "index.js",
6
6
  "module": "index.mjs",