@edx/frontend-app-subscription-manage 1.24.0 → 1.24.1

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.
@@ -61,7 +61,7 @@ const OrderPurchases = () => {
61
61
  console.error('Unable to load payment receipt.', error);
62
62
  }
63
63
  });
64
- return (_jsxs("section", { className: "manage-section mt-5", "aria-labelledby": "order-purchases-title", "aria-live": "polite", "aria-busy": purchaseHistoryQuery.isLoading || purchaseHistoryQuery.isFetching, children: [_jsx("h2", { id: "order-purchases-title", className: "manage-section__title h3 font-weight-bold text-primary-500 mb-1", children: formatMessage(messages.otherPurchasesTitle) }), purchaseHistoryQuery.isError && (_jsx(Alert, { variant: "danger", children: formatMessage(messages.purchaseHistoryError) })), !purchaseHistoryQuery.isError && !purchaseHistoryQuery.isSuccess && (_jsx("div", { className: "d-flex justify-content-center py-4", children: _jsx(Spinner, { animation: "border", screenReaderText: formatMessage(messages.loadingOrders) }) })), purchaseHistoryQuery.isSuccess && orders.length === 0 && (_jsx("p", { className: "manage-section__subtitle text-gray-700 mb-3", children: formatMessage(messages.coursePurchasesEmptyMessage) })), purchaseHistoryQuery.isSuccess && orders.length > 0 && (_jsxs(_Fragment, { children: [_jsx(OrdersList, { orders: orders, onViewReceipt: handleViewReceipt }), _jsx(RefundNotice, {})] }))] }));
64
+ return (_jsxs("section", { className: "manage-section mt-5", "aria-labelledby": "order-purchases-title", "aria-live": "polite", "aria-busy": purchaseHistoryQuery.isLoading || purchaseHistoryQuery.isFetching, children: [_jsx("h2", { id: "order-purchases-title", className: "manage-section__title h3 font-weight-bold text-primary-500 mb-1", children: formatMessage(messages.otherPurchasesTitle) }), purchaseHistoryQuery.isError && (_jsx(Alert, { variant: "danger", children: formatMessage(messages.purchaseHistoryError) })), !purchaseHistoryQuery.isError && !purchaseHistoryQuery.isSuccess && (_jsx("div", { className: "d-flex justify-content-center py-4", children: _jsx(Spinner, { animation: "border", screenReaderText: formatMessage(messages.loadingOrders) }) })), purchaseHistoryQuery.isSuccess && orders.length === 0 && (_jsx("p", { className: "manage-section__subtitle text-gray-700 mb-3", children: formatMessage(messages.coursePurchasesMessage) })), purchaseHistoryQuery.isSuccess && orders.length > 0 && (_jsxs(_Fragment, { children: [_jsx("p", { className: "manage-section__subtitle text-gray-700 mb-3", children: formatMessage(messages.coursePurchasesMessage) }), _jsx(OrdersList, { orders: orders, onViewReceipt: handleViewReceipt }), _jsx(RefundNotice, {})] }))] }));
65
65
  };
66
66
  export default OrderPurchases;
67
67
  //# sourceMappingURL=OrderPurchases.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OrderPurchases.js","sourceRoot":"","sources":["../../../src/components/OrderHistory/OrderPurchases.tsx"],"names":[],"mappings":";;;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,mBAAmB,GAAG,GAAkB,EAAE;IAC9C,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAoC,CAAC;IACtE,MAAM,gBAAgB,GAAG,MAAM,CAAC,kBAAkB,CAAC;IAEnD,IAAI,OAAO,gBAAgB,KAAK,QAAQ,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,gBAAgB,CAAC,IAAI,EAAE,IAAI,IAAI,CAAC;AACzC,CAAC,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cAAc,CAAC","sourcesContent":["import React from 'react';\nimport { Alert, Spinner } from '@openedx/paragon';\nimport { getAppConfig, useIntl } from '@openedx/frontend-base';\n\nimport type { PurchaseHistoryItem } from '../../types';\nimport { appId } from '../../constants';\nimport { getStripePaymentReceipt } from '../../data/services/orderHistory/orderHistory';\nimport { usePurchaseHistoryQuery } from '../../data/hooks/useOrderHistoryQueries';\nimport { useViaxClient, useViaxSession } from '../../data/hooks/useManageQueries';\nimport OrdersList from './OrderList';\nimport RefundNotice from '../RefundNotice/RefundNotice';\nimport messages from './messages';\n\nconst getPaypalReceiptUrl = (): string | null => {\n const config = getAppConfig(appId) as { PAYPAL_RECEIPT_URL?: string };\n const paypalReceiptUrl = config.PAYPAL_RECEIPT_URL;\n\n if (typeof paypalReceiptUrl !== 'string') {\n return null;\n }\n\n return paypalReceiptUrl.trim() || null;\n};\n\n/** One-off course and program purchases, shown in the payment history tab. */\nconst OrderPurchases: React.FC = () => {\n const { formatMessage } = useIntl();\n const client = useViaxClient();\n const { sessionReady } = useViaxSession(client);\n const purchaseHistoryQuery = usePurchaseHistoryQuery(client, sessionReady);\n const orders = purchaseHistoryQuery.data ?? [];\n\n const handleViewReceipt = async (order: PurchaseHistoryItem) => {\n if (!client || !order.orderId) {\n return;\n }\n\n try {\n const paymentMethodType = (order.paymentMethod?.type ?? '').toLowerCase();\n const isNotAppleOrGooglePay = !order.paymentMethod?.wallet;\n\n if (paymentMethodType === 'paypal') {\n const paypalReceiptUrl = getPaypalReceiptUrl();\n if (!paypalReceiptUrl) {\n console.error('PayPal receipt URL is not configured.');\n return;\n }\n\n window.open(paypalReceiptUrl, '_blank', 'noopener,noreferrer');\n return;\n } else if (paymentMethodType === 'card' && isNotAppleOrGooglePay) {\n const receiptUrl = await getStripePaymentReceipt(client.gql, order.orderId);\n if (receiptUrl) {\n window.open(receiptUrl, '_blank', 'noopener,noreferrer');\n }\n }\n } catch (error) {\n console.error('Unable to load payment receipt.', error);\n }\n };\n\n return (\n <section\n className=\"manage-section mt-5\"\n aria-labelledby=\"order-purchases-title\"\n aria-live=\"polite\"\n aria-busy={purchaseHistoryQuery.isLoading || purchaseHistoryQuery.isFetching}\n >\n <h2 id=\"order-purchases-title\" className=\"manage-section__title h3 font-weight-bold text-primary-500 mb-1\">\n {formatMessage(messages.otherPurchasesTitle)}\n </h2>\n\n {purchaseHistoryQuery.isError && (\n <Alert variant=\"danger\">{formatMessage(messages.purchaseHistoryError)}</Alert>\n )}\n\n {!purchaseHistoryQuery.isError && !purchaseHistoryQuery.isSuccess && (\n <div className=\"d-flex justify-content-center py-4\">\n <Spinner animation=\"border\" screenReaderText={formatMessage(messages.loadingOrders)} />\n </div>\n )}\n\n {purchaseHistoryQuery.isSuccess && orders.length === 0 && (\n <p className=\"manage-section__subtitle text-gray-700 mb-3\">\n {formatMessage(messages.coursePurchasesEmptyMessage)}\n </p>\n )}\n\n {purchaseHistoryQuery.isSuccess && orders.length > 0 && (\n <>\n <OrdersList orders={orders} onViewReceipt={handleViewReceipt} />\n <RefundNotice />\n </>\n )}\n </section>\n );\n};\n\nexport default OrderPurchases;\n"]}
1
+ {"version":3,"file":"OrderPurchases.js","sourceRoot":"","sources":["../../../src/components/OrderHistory/OrderPurchases.tsx"],"names":[],"mappings":";;;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAG/D,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,YAAY,MAAM,8BAA8B,CAAC;AACxD,OAAO,QAAQ,MAAM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ACxD,YAAG,SAAS,EAAC,6CAA6C,YACvD,aAAa,CAAC,QAAQ,CAAC,sBAAsB,CAAC,GAC7C,CACL,EAEA,oBAAoB,CAAC,SAAS,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,CACtD,8BACE,YAAG,SAAS,EAAC,6CAA6C,YACvD,aAAa,CAAC,QAAQ,CAAC,sBAAsB,CAAC,GAC7C,EACJ,KAAC,UAAU,IAAC,MAAM,EAAE,MAAM,EAAE,aAAa,EAAE,iBAAiB,GAAI,EAChE,KAAC,YAAY,KAAG,IACf,CACJ,IACO,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React from 'react';\nimport { Alert, Spinner } from '@openedx/paragon';\nimport { getAppConfig, useIntl } from '@openedx/frontend-base';\n\nimport type { PurchaseHistoryItem } from '../../types';\nimport { appId } from '../../constants';\nimport { getStripePaymentReceipt } from '../../data/services/orderHistory/orderHistory';\nimport { usePurchaseHistoryQuery } from '../../data/hooks/useOrderHistoryQueries';\nimport { useViaxClient, useViaxSession } from '../../data/hooks/useManageQueries';\nimport OrdersList from './OrderList';\nimport RefundNotice from '../RefundNotice/RefundNotice';\nimport messages from './messages';\n\nconst getPaypalReceiptUrl = (): string | null => {\n const config = getAppConfig(appId) as { PAYPAL_RECEIPT_URL?: string };\n const paypalReceiptUrl = config.PAYPAL_RECEIPT_URL;\n\n if (typeof paypalReceiptUrl !== 'string') {\n return null;\n }\n\n return paypalReceiptUrl.trim() || null;\n};\n\n/** One-off course and program purchases, shown in the payment history tab. */\nconst OrderPurchases: React.FC = () => {\n const { formatMessage } = useIntl();\n const client = useViaxClient();\n const { sessionReady } = useViaxSession(client);\n const purchaseHistoryQuery = usePurchaseHistoryQuery(client, sessionReady);\n const orders = purchaseHistoryQuery.data ?? [];\n\n const handleViewReceipt = async (order: PurchaseHistoryItem) => {\n if (!client || !order.orderId) {\n return;\n }\n\n try {\n const paymentMethodType = (order.paymentMethod?.type ?? '').toLowerCase();\n const isNotAppleOrGooglePay = !order.paymentMethod?.wallet;\n\n if (paymentMethodType === 'paypal') {\n const paypalReceiptUrl = getPaypalReceiptUrl();\n if (!paypalReceiptUrl) {\n console.error('PayPal receipt URL is not configured.');\n return;\n }\n\n window.open(paypalReceiptUrl, '_blank', 'noopener,noreferrer');\n return;\n } else if (paymentMethodType === 'card' && isNotAppleOrGooglePay) {\n const receiptUrl = await getStripePaymentReceipt(client.gql, order.orderId);\n if (receiptUrl) {\n window.open(receiptUrl, '_blank', 'noopener,noreferrer');\n }\n }\n } catch (error) {\n console.error('Unable to load payment receipt.', error);\n }\n };\n\n return (\n <section\n className=\"manage-section mt-5\"\n aria-labelledby=\"order-purchases-title\"\n aria-live=\"polite\"\n aria-busy={purchaseHistoryQuery.isLoading || purchaseHistoryQuery.isFetching}\n >\n <h2 id=\"order-purchases-title\" className=\"manage-section__title h3 font-weight-bold text-primary-500 mb-1\">\n {formatMessage(messages.otherPurchasesTitle)}\n </h2>\n\n {purchaseHistoryQuery.isError && (\n <Alert variant=\"danger\">{formatMessage(messages.purchaseHistoryError)}</Alert>\n )}\n\n {!purchaseHistoryQuery.isError && !purchaseHistoryQuery.isSuccess && (\n <div className=\"d-flex justify-content-center py-4\">\n <Spinner animation=\"border\" screenReaderText={formatMessage(messages.loadingOrders)} />\n </div>\n )}\n\n {purchaseHistoryQuery.isSuccess && orders.length === 0 && (\n <p className=\"manage-section__subtitle text-gray-700 mb-3\">\n {formatMessage(messages.coursePurchasesMessage)}\n </p>\n )}\n\n {purchaseHistoryQuery.isSuccess && orders.length > 0 && (\n <>\n <p className=\"manage-section__subtitle text-gray-700 mb-3\">\n {formatMessage(messages.coursePurchasesMessage)}\n </p>\n <OrdersList orders={orders} onViewReceipt={handleViewReceipt} />\n <RefundNotice />\n </>\n )}\n </section>\n );\n};\n\nexport default OrderPurchases;\n"]}
@@ -9,7 +9,7 @@ declare const messages: {
9
9
  defaultMessage: string;
10
10
  description: string;
11
11
  };
12
- coursePurchasesEmptyMessage: {
12
+ coursePurchasesMessage: {
13
13
  id: string;
14
14
  defaultMessage: string;
15
15
  description: string;
@@ -10,7 +10,7 @@ const messages = defineMessages({
10
10
  defaultMessage: 'Other purchases',
11
11
  description: 'Heading above the list of course and program purchases.',
12
12
  },
13
- coursePurchasesEmptyMessage: {
13
+ coursePurchasesMessage: {
14
14
  id: 'orderHistory.coursePayments.emptyMessage',
15
15
  defaultMessage: 'Courses you purchased in the last 180 days will appear here. If possible, please retain receipts for your records.',
16
16
  description: 'Message shown when there are no course purchases to display.',
@@ -1 +1 @@
1
- {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/components/OrderHistory/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,iBAAiB,EAAE;QACjB,EAAE,EAAE,mBAAmB;QACvB,cAAc,EAAE,eAAe;QAC/B,WAAW,EAAE,2BAA2B;KACzC;IACD,mBAAmB,EAAE;QACnB,EAAE,EAAE,iDAAiD;QACrD,cAAc,EAAE,iBAAiB;QACjC,WAAW,EAAE,yDAAyD;KACvE;IACD,2BAA2B,EAAE;QAC3B,EAAE,EAAE,0CAA0C;QAC9C,cAAc,EAAE,oHAAoH;QACpI,WAAW,EAAE,8DAA8D;KAC5E;IACD,aAAa,EAAE;QACb,EAAE,EAAE,4BAA4B;QAChC,cAAc,EAAE,iBAAiB;QACjC,WAAW,EAAE,kDAAkD;KAChE;IACD,oBAAoB,EAAE;QACpB,EAAE,EAAE,mCAAmC;QACvC,cAAc,EAAE,wDAAwD;QACxE,WAAW,EAAE,kDAAkD;KAChE;IACD,aAAa,EAAE;QACb,EAAE,EAAE,4BAA4B;QAChC,cAAc,EAAE,+BAA+B;QAC/C,WAAW,EAAE,+DAA+D;KAC7E;IACD,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;QACpB,cAAc,EAAE,YAAY;QAC5B,WAAW,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;QACzB,WAAW,EAAE,sCAAsC;KACpD;IACD,wBAAwB,EAAE;QACxB,EAAE,EAAE,0BAA0B;QAC9B,cAAc,EAAE,QAAQ;QACxB,WAAW,EAAE,6DAA6D;KAC3E;IACD,uBAAuB,EAAE;QACvB,EAAE,EAAE,yBAAyB;QAC7B,cAAc,EAAE,OAAO;QACvB,WAAW,EAAE,8DAA8D;KAC5E;IACD,gCAAgC,EAAE;QAChC,EAAE,EAAE,kCAAkC;QACtC,cAAc,EAAE,iBAAiB;QACjC,WAAW,EAAE,iEAAiE;KAC/E;IACD,oCAAoC,EAAE;QACpC,EAAE,EAAE,sCAAsC;QAC1C,cAAc,EAAE,sBAAsB;QACtC,WAAW,EAAE,sEAAsE;KACpF;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,mBAAmB;QACvB,cAAc,EAAE,cAAc;QAC9B,WAAW,EAAE,2CAA2C;KACzD;IACD,sBAAsB,EAAE;QACtB,EAAE,EAAE,wBAAwB;QAC5B,cAAc,EAAE,oBAAoB;QACpC,WAAW,EAAE,uCAAuC;KACrD;IACD,mBAAmB,EAAE;QACnB,EAAE,EAAE,qBAAqB;QACzB,cAAc,EAAE,kBAAkB;QAClC,WAAW,EAAE,0DAA0D;KACxE;IACD,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;QACpB,cAAc,EAAE,YAAY;QAC5B,WAAW,EAAE,oDAAoD;KAClE;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,kBAAkB;QACtB,cAAc,EAAE,cAAc;QAC9B,WAAW,EAAE,sDAAsD;KACpE;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n orderHistoryTitle: {\n id: 'orderHistoryTitle',\n defaultMessage: 'Order History',\n description: 'Heading for order history',\n },\n otherPurchasesTitle: {\n id: 'orderHistory.coursePayments.otherPurchasesTitle',\n defaultMessage: 'Other purchases',\n description: 'Heading above the list of course and program purchases.',\n },\n coursePurchasesEmptyMessage: {\n id: 'orderHistory.coursePayments.emptyMessage',\n defaultMessage: 'Courses you purchased in the last 180 days will appear here. If possible, please retain receipts for your records.',\n description: 'Message shown when there are no course purchases to display.',\n },\n loadingOrders: {\n id: 'orderHistory.loadingOrders',\n defaultMessage: 'Loading orders…',\n description: 'Loading state while the order history is fetched',\n },\n purchaseHistoryError: {\n id: 'orderHistory.purchaseHistoryError',\n defaultMessage: 'We could not load your orders. Please try again later.',\n description: 'Error alert when the order history fails to load',\n },\n orderNotFound: {\n id: 'orderHistory.orderNotFound',\n defaultMessage: 'We could not find this order.',\n description: 'Shown on the order details page when no matching order exists',\n },\n orderDateTitle: {\n id: 'orderDateTitle',\n defaultMessage: 'Order date',\n description: 'Label for order date',\n },\n orderSummaryTitle: {\n id: 'orderSummaryTitle',\n defaultMessage: 'Order summary',\n description: 'Heading for order summary section',\n },\n orderItemsTitle: {\n id: 'orderItemsTitle',\n defaultMessage: 'Order items',\n description: 'Heading for order items section',\n },\n paymentTitle: {\n id: 'paymentTitle',\n defaultMessage: 'Payment',\n description: 'Heading for payment section',\n },\n receiptOrderNumberLabel: {\n id: 'receiptOrderNumberLabel',\n defaultMessage: 'Order number:',\n description: 'Receipt label for the order number',\n },\n receiptOrderDateLabel: {\n id: 'receiptOrderDateLabel',\n defaultMessage: 'Order date:',\n description: 'Receipt label for the order date',\n },\n receiptSubtotalLabel: {\n id: 'receiptSubtotalLabel',\n defaultMessage: 'Subtotal:',\n description: 'Receipt label for the subtotal amount',\n },\n receiptDiscountCodeLabel: {\n id: 'receiptDiscountCodeLabel',\n defaultMessage: 'Discount code:',\n description: 'Receipt label for the discount code',\n },\n receiptDiscountAmountLabel: {\n id: 'receiptDiscountAmountLabel',\n defaultMessage: 'Discount amount:',\n description: 'Receipt label for the discount amount',\n },\n receiptTotalAfterDiscountLabel: {\n id: 'receiptTotalAfterDiscountLabel',\n defaultMessage: 'Total after discount:',\n description: 'Receipt label for the total after discount',\n },\n receiptNameLabel: {\n id: 'receiptNameLabel',\n defaultMessage: 'Name:',\n description: 'Receipt label for the item name',\n },\n receiptPriceLabel: {\n id: 'receiptPriceLabel',\n defaultMessage: 'Price:',\n description: 'Receipt label for the item price',\n },\n receiptAmountLabel: {\n id: 'receiptAmountLabel',\n defaultMessage: 'Amount:',\n description: 'Receipt label for the payment amount',\n },\n receiptTableCourseHeader: {\n id: 'receiptTableCourseHeader',\n defaultMessage: 'Course',\n description: 'Program order items table header for the course name column',\n },\n receiptTablePriceHeader: {\n id: 'receiptTablePriceHeader',\n defaultMessage: 'Price',\n description: 'Program order items table header for the course price column',\n },\n receiptTableDiscountAmountHeader: {\n id: 'receiptTableDiscountAmountHeader',\n defaultMessage: 'Discount amount',\n description: 'Program order items table header for the discount amount column',\n },\n receiptTableTotalAfterDiscountHeader: {\n id: 'receiptTableTotalAfterDiscountHeader',\n defaultMessage: 'Total after discount',\n description: 'Program order items table header for the total after discount column',\n },\n viewReceiptButton: {\n id: 'viewReceiptButton',\n defaultMessage: 'View receipt',\n description: 'Button text for viewing a payment receipt',\n },\n viewOrderDetailsButton: {\n id: 'viewOrderDetailsButton',\n defaultMessage: 'View order details',\n description: 'Button text for viewing order details',\n },\n dateOfPurchaseLabel: {\n id: 'dateOfPurchaseLabel',\n defaultMessage: 'Date of purchase',\n description: 'Label for the date of purchase in the order history card',\n },\n totalCostLabel: {\n id: 'totalCostLabel',\n defaultMessage: 'Total cost',\n description: 'Label for the total cost in the order history card',\n },\n orderNumberLabel: {\n id: 'orderNumberLabel',\n defaultMessage: 'Order number',\n description: 'Label for the order number in the order history card',\n },\n});\n\nexport default messages;\n"]}
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../src/components/OrderHistory/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,iBAAiB,EAAE;QACjB,EAAE,EAAE,mBAAmB;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AAE;QACtB,EAAE,EAAE,wBAAwB;QAC5B,cAAc,EAAE,oBAAoB;QACpC,WAAW,EAAE,uCAAuC;KACrD;IACD,mBAAmB,EAAE;QACnB,EAAE,EAAE,qBAAqB;QACzB,cAAc,EAAE,kBAAkB;QAClC,WAAW,EAAE,0DAA0D;KACxE;IACD,cAAc,EAAE;QACd,EAAE,EAAE,gBAAgB;QACpB,cAAc,EAAE,YAAY;QAC5B,WAAW,EAAE,oDAAoD;KAClE;IACD,gBAAgB,EAAE;QAChB,EAAE,EAAE,kBAAkB;QACtB,cAAc,EAAE,cAAc;QAC9B,WAAW,EAAE,sDAAsD;KACpE;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n orderHistoryTitle: {\n id: 'orderHistoryTitle',\n defaultMessage: 'Order History',\n description: 'Heading for order history',\n },\n otherPurchasesTitle: {\n id: 'orderHistory.coursePayments.otherPurchasesTitle',\n defaultMessage: 'Other purchases',\n description: 'Heading above the list of course and program purchases.',\n },\n coursePurchasesMessage: {\n id: 'orderHistory.coursePayments.emptyMessage',\n defaultMessage: 'Courses you purchased in the last 180 days will appear here. If possible, please retain receipts for your records.',\n description: 'Message shown when there are no course purchases to display.',\n },\n loadingOrders: {\n id: 'orderHistory.loadingOrders',\n defaultMessage: 'Loading orders…',\n description: 'Loading state while the order history is fetched',\n },\n purchaseHistoryError: {\n id: 'orderHistory.purchaseHistoryError',\n defaultMessage: 'We could not load your orders. Please try again later.',\n description: 'Error alert when the order history fails to load',\n },\n orderNotFound: {\n id: 'orderHistory.orderNotFound',\n defaultMessage: 'We could not find this order.',\n description: 'Shown on the order details page when no matching order exists',\n },\n orderDateTitle: {\n id: 'orderDateTitle',\n defaultMessage: 'Order date',\n description: 'Label for order date',\n },\n orderSummaryTitle: {\n id: 'orderSummaryTitle',\n defaultMessage: 'Order summary',\n description: 'Heading for order summary section',\n },\n orderItemsTitle: {\n id: 'orderItemsTitle',\n defaultMessage: 'Order items',\n description: 'Heading for order items section',\n },\n paymentTitle: {\n id: 'paymentTitle',\n defaultMessage: 'Payment',\n description: 'Heading for payment section',\n },\n receiptOrderNumberLabel: {\n id: 'receiptOrderNumberLabel',\n defaultMessage: 'Order number:',\n description: 'Receipt label for the order number',\n },\n receiptOrderDateLabel: {\n id: 'receiptOrderDateLabel',\n defaultMessage: 'Order date:',\n description: 'Receipt label for the order date',\n },\n receiptSubtotalLabel: {\n id: 'receiptSubtotalLabel',\n defaultMessage: 'Subtotal:',\n description: 'Receipt label for the subtotal amount',\n },\n receiptDiscountCodeLabel: {\n id: 'receiptDiscountCodeLabel',\n defaultMessage: 'Discount code:',\n description: 'Receipt label for the discount code',\n },\n receiptDiscountAmountLabel: {\n id: 'receiptDiscountAmountLabel',\n defaultMessage: 'Discount amount:',\n description: 'Receipt label for the discount amount',\n },\n receiptTotalAfterDiscountLabel: {\n id: 'receiptTotalAfterDiscountLabel',\n defaultMessage: 'Total after discount:',\n description: 'Receipt label for the total after discount',\n },\n receiptNameLabel: {\n id: 'receiptNameLabel',\n defaultMessage: 'Name:',\n description: 'Receipt label for the item name',\n },\n receiptPriceLabel: {\n id: 'receiptPriceLabel',\n defaultMessage: 'Price:',\n description: 'Receipt label for the item price',\n },\n receiptAmountLabel: {\n id: 'receiptAmountLabel',\n defaultMessage: 'Amount:',\n description: 'Receipt label for the payment amount',\n },\n receiptTableCourseHeader: {\n id: 'receiptTableCourseHeader',\n defaultMessage: 'Course',\n description: 'Program order items table header for the course name column',\n },\n receiptTablePriceHeader: {\n id: 'receiptTablePriceHeader',\n defaultMessage: 'Price',\n description: 'Program order items table header for the course price column',\n },\n receiptTableDiscountAmountHeader: {\n id: 'receiptTableDiscountAmountHeader',\n defaultMessage: 'Discount amount',\n description: 'Program order items table header for the discount amount column',\n },\n receiptTableTotalAfterDiscountHeader: {\n id: 'receiptTableTotalAfterDiscountHeader',\n defaultMessage: 'Total after discount',\n description: 'Program order items table header for the total after discount column',\n },\n viewReceiptButton: {\n id: 'viewReceiptButton',\n defaultMessage: 'View receipt',\n description: 'Button text for viewing a payment receipt',\n },\n viewOrderDetailsButton: {\n id: 'viewOrderDetailsButton',\n defaultMessage: 'View order details',\n description: 'Button text for viewing order details',\n },\n dateOfPurchaseLabel: {\n id: 'dateOfPurchaseLabel',\n defaultMessage: 'Date of purchase',\n description: 'Label for the date of purchase in the order history card',\n },\n totalCostLabel: {\n id: 'totalCostLabel',\n defaultMessage: 'Total cost',\n description: 'Label for the total cost in the order history card',\n },\n orderNumberLabel: {\n id: 'orderNumberLabel',\n defaultMessage: 'Order number',\n description: 'Label for the order number in the order history card',\n },\n});\n\nexport default messages;\n"]}
@@ -1,6 +1,9 @@
1
- const getFormattedCurrency = ({ amount, currency }) => new Intl.NumberFormat('en-US', {
2
- style: 'currency',
3
- currency,
4
- }).format(amount);
1
+ const getFormattedCurrency = ({ amount, currency }) => {
2
+ const formattedAmount = new Intl.NumberFormat('en-US', {
3
+ style: 'currency',
4
+ currency,
5
+ }).format(amount);
6
+ return `${formattedAmount} ${currency}`;
7
+ };
5
8
  export default getFormattedCurrency;
6
9
  //# sourceMappingURL=currency.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"currency.js","sourceRoot":"","sources":["../../src/utils/currency.ts"],"names":[],"mappings":"AAKA,MAAM,oBAAoB,GAAG,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAc,EAAU,EAAE,CACxE,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;IAC7B,KAAK,EAAE,UAAU;IACjB,QAAQ;CACT,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAEpB,eAAe,oBAAoB,CAAC","sourcesContent":["interface OrderTotal {\n amount: number,\n currency: string,\n}\n\nconst getFormattedCurrency = ({ amount, currency }: OrderTotal): string =>\n new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency,\n }).format(amount);\n\nexport default getFormattedCurrency;\n"]}
1
+ {"version":3,"file":"currency.js","sourceRoot":"","sources":["../../src/utils/currency.ts"],"names":[],"mappings":"AAKA,MAAM,oBAAoB,GAAG,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAc,EAAU,EAAE;IACxE,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE;QACrD,KAAK,EAAE,UAAU;QACjB,QAAQ;KACT,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAElB,OAAO,GAAG,eAAe,IAAI,QAAQ,EAAE,CAAC;AAC1C,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["interface OrderTotal {\n amount: number,\n currency: string,\n}\n\nconst getFormattedCurrency = ({ amount, currency }: OrderTotal): string => {\n const formattedAmount = new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency,\n }).format(amount);\n\n return `${formattedAmount} ${currency}`;\n};\n\nexport default getFormattedCurrency;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edx/frontend-app-subscription-manage",
3
- "version": "1.24.0",
3
+ "version": "1.24.1",
4
4
  "description": "Subscription Manage Frontend application",
5
5
  "repository": {
6
6
  "type": "git",