@edx/frontend-app-alacarte-checkout 1.32.0 → 1.33.0

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.
@@ -0,0 +1,3 @@
1
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M15.8333 15.8333H4.16667V4.16667H10V2.5H2.5V17.5H17.5V10H15.8333V15.8333ZM11.6667 2.5V4.16667H14.6583L6.46667 12.3583L7.64167 13.5333L15.8333 5.34167V8.33333H17.5V2.5H11.6667Z" fill="#00262B"/>
3
+ </svg>
@@ -0,0 +1,10 @@
1
+ interface OrderCardProps {
2
+ title: string;
3
+ purchaseDate: string;
4
+ totalCost: string;
5
+ orderNumber: string;
6
+ onViewReceipt: () => void;
7
+ onViewOrderDetails: () => void;
8
+ }
9
+ declare const OrderHistoryCard: ({ title, purchaseDate, totalCost, orderNumber, onViewReceipt, onViewOrderDetails, }: OrderCardProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default OrderHistoryCard;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Card, Button } from '@openedx/paragon';
3
+ import after from '../../assets/after.svg';
4
+ const OrderHistoryCard = ({ title, purchaseDate, totalCost, orderNumber, onViewReceipt, onViewOrderDetails, }) => (_jsx(Card, { className: "order-card", children: _jsx(Card.Body, { className: "p-3", children: _jsxs("div", { className: "d-flex justify-content-between align-items-start flex-wrap", children: [_jsxs("div", { children: [_jsx("h6", { className: "mb-2", children: title }), _jsxs("div", { className: "small", children: [_jsxs("div", { className: "d-flex mb-1", children: [_jsx("span", { className: "text-muted orderHistoryCard__details mr-3", children: "Date of purchase:" }), _jsx("span", { children: purchaseDate })] }), _jsxs("div", { className: "d-flex mb-1", children: [_jsx("span", { className: "text-muted mr-3 orderHistoryCard__details", children: "Total cost:" }), _jsx("span", { children: totalCost })] }), _jsxs("div", { className: "d-flex", children: [_jsx("span", { className: "text-muted mr-3 orderHistoryCard__details", children: "Order number:" }), _jsx("span", { children: orderNumber })] })] })] }), _jsxs("div", { className: "d-flex align-items-center gap-3 mt-auto", children: [_jsxs(Button, { variant: "link", size: "sm", onClick: onViewReceipt, className: "d-flex gap-1 p-0 orderHistoryCard__link", children: ["View receipt ", _jsx("img", { src: after, alt: "link" })] }), _jsx(Button, { variant: "link", size: "sm", onClick: onViewOrderDetails, className: "p-0 orderHistoryCard__link", children: "View order details" })] })] }) }) }));
5
+ export default OrderHistoryCard;
6
+ //# sourceMappingURL=OrderHistoryCard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderHistoryCard.js","sourceRoot":"","sources":["../../../src/components/OrderHistory/OrderHistoryCard.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAW3C,MAAM,gBAAgB,GAAG,CAAC,EACxB,KAAK,EACL,YAAY,EACZ,SAAS,EACT,WAAW,EACX,aAAa,EACb,kBAAkB,GACH,EAAE,EAAE,CAAC,CACpB,KAAC,IAAI,IAAC,SAAS,EAAC,YAAY,YAC1B,KAAC,IAAI,CAAC,IAAI,IAAC,SAAS,EAAC,KAAK,YACxB,eAAK,SAAS,EAAC,4DAA4D,aACzE,0BACE,aAAI,SAAS,EAAC,MAAM,YAAE,KAAK,GAAM,EAEjC,eAAK,SAAS,EAAC,OAAO,aACpB,eAAK,SAAS,EAAC,aAAa,aAC1B,eAAM,SAAS,EAAC,2CAA2C,kCAAyB,EACpF,yBAAO,YAAY,GAAQ,IACvB,EAEN,eAAK,SAAS,EAAC,aAAa,aAC1B,eAAM,SAAS,EAAC,2CAA2C,4BAAmB,EAC9E,yBAAO,SAAS,GAAQ,IACpB,EAEN,eAAK,SAAS,EAAC,QAAQ,aACrB,eAAM,SAAS,EAAC,2CAA2C,8BAAqB,EAChF,yBAAO,WAAW,GAAQ,IACtB,IACF,IACF,EAEN,eAAK,SAAS,EAAC,yCAAyC,aACtD,MAAC,MAAM,IACL,OAAO,EAAC,MAAM,EACd,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,aAAa,EACtB,SAAS,EAAC,yCAAyC,8BAEtC,cAAK,GAAG,EAAE,KAAK,EAAE,GAAG,EAAC,MAAM,GAAG,IACpC,EAET,KAAC,MAAM,IACL,OAAO,EAAC,MAAM,EACd,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAC,4BAA4B,mCAG/B,IACL,IACF,GACI,GACP,CACR,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import { Card, Button } from '@openedx/paragon';\nimport after from '../../assets/after.svg';\n\ninterface OrderCardProps {\n title: string,\n purchaseDate: string,\n totalCost: string,\n orderNumber: string,\n onViewReceipt: () => void,\n onViewOrderDetails: () => void,\n}\n\nconst OrderHistoryCard = ({\n title,\n purchaseDate,\n totalCost,\n orderNumber,\n onViewReceipt,\n onViewOrderDetails,\n}: OrderCardProps) => (\n <Card className=\"order-card\">\n <Card.Body className=\"p-3\">\n <div className=\"d-flex justify-content-between align-items-start flex-wrap\">\n <div>\n <h6 className=\"mb-2\">{title}</h6>\n\n <div className=\"small\">\n <div className=\"d-flex mb-1\">\n <span className=\"text-muted orderHistoryCard__details mr-3\">Date of purchase:</span>\n <span>{purchaseDate}</span>\n </div>\n\n <div className=\"d-flex mb-1\">\n <span className=\"text-muted mr-3 orderHistoryCard__details\">Total cost:</span>\n <span>{totalCost}</span>\n </div>\n\n <div className=\"d-flex\">\n <span className=\"text-muted mr-3 orderHistoryCard__details\">Order number:</span>\n <span>{orderNumber}</span>\n </div>\n </div>\n </div>\n\n <div className=\"d-flex align-items-center gap-3 mt-auto\">\n <Button\n variant=\"link\"\n size=\"sm\"\n onClick={onViewReceipt}\n className=\"d-flex gap-1 p-0 orderHistoryCard__link\"\n >\n View receipt <img src={after} alt=\"link\" />\n </Button>\n\n <Button\n variant=\"link\"\n size=\"sm\"\n onClick={onViewOrderDetails}\n className=\"p-0 orderHistoryCard__link\"\n >\n View order details\n </Button>\n </div>\n </div>\n </Card.Body>\n </Card>\n);\n\nexport default OrderHistoryCard;\n"]}
@@ -1,9 +1,10 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useIntl } from '@openedx/frontend-base';
3
3
  import messages from './messages';
4
+ import OrdersList from '../OrderList';
4
5
  const CoursePayments = () => {
5
6
  const { formatMessage } = useIntl();
6
- return (_jsxs("section", { className: "pt-4", "aria-labelledby": "course-payments-empty-heading", children: [_jsx("h2", { id: "course-payments-empty-heading", className: "h5 font-weight-bold text-primary-700 mb-1", children: formatMessage(messages.otherPurchasesTitle) }), _jsx("p", { className: "medium text-gray-700 mb-0", children: formatMessage(messages.coursePurchasesEmptyMessage) })] }));
7
+ return (_jsxs("section", { className: "pt-4", "aria-labelledby": "course-payments-empty-heading", children: [_jsxs("div", { className: "my-2 px-4", children: [_jsx("h2", { id: "course-payments-empty-heading", className: "h5 font-weight-bold text-primary-700 mb-1", children: formatMessage(messages.otherPurchasesTitle) }), _jsx("p", { className: "medium text-gray-700 mb-0", children: formatMessage(messages.coursePurchasesEmptyMessage) })] }), _jsx("div", { className: "mt-2", children: _jsx(OrdersList, {}) })] }));
7
8
  };
8
9
  export default CoursePayments;
9
10
  //# sourceMappingURL=CoursePayments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CoursePayments.js","sourceRoot":"","sources":["../../../../src/components/OrderHistory/OrderHistoryTabDetails/CoursePayments.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,cAAc,GAAa,GAAG,EAAE;IACpC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IAEpC,OAAO,CACL,mBAAS,SAAS,EAAC,MAAM,qBAAiB,+BAA+B,aACvE,aAAI,EAAE,EAAC,+BAA+B,EAAC,SAAS,EAAC,2CAA2C,YACzF,aAAa,CAAC,QAAQ,CAAC,mBAAmB,CAAC,GACzC,EACL,YAAG,SAAS,EAAC,2BAA2B,YACrC,aAAa,CAAC,QAAQ,CAAC,2BAA2B,CAAC,GAClD,IACI,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React from 'react';\nimport { useIntl } from '@openedx/frontend-base';\nimport messages from './messages';\n\nconst CoursePayments: React.FC = () => {\n const { formatMessage } = useIntl();\n\n return (\n <section className=\"pt-4\" aria-labelledby=\"course-payments-empty-heading\">\n <h2 id=\"course-payments-empty-heading\" className=\"h5 font-weight-bold text-primary-700 mb-1\">\n {formatMessage(messages.otherPurchasesTitle)}\n </h2>\n <p className=\"medium text-gray-700 mb-0\">\n {formatMessage(messages.coursePurchasesEmptyMessage)}\n </p>\n </section>\n );\n};\n\nexport default CoursePayments;\n"]}
1
+ {"version":3,"file":"CoursePayments.js","sourceRoot":"","sources":["../../../../src/components/OrderHistory/OrderHistoryTabDetails/CoursePayments.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,MAAM,cAAc,GAAa,GAAG,EAAE;IACpC,MAAM,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IAEpC,OAAO,CACL,mBAAS,SAAS,EAAC,MAAM,qBAAiB,+BAA+B,aACvE,eAAK,SAAS,EAAC,WAAW,aACxB,aAAI,EAAE,EAAC,+BAA+B,EAAC,SAAS,EAAC,2CAA2C,YACzF,aAAa,CAAC,QAAQ,CAAC,mBAAmB,CAAC,GACzC,EACL,YAAG,SAAS,EAAC,2BAA2B,YACrC,aAAa,CAAC,QAAQ,CAAC,2BAA2B,CAAC,GAClD,IACA,EACN,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,UAAU,KAAG,GACV,IACE,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC","sourcesContent":["import React from 'react';\nimport { useIntl } from '@openedx/frontend-base';\nimport messages from './messages';\nimport OrdersList from '../OrderList';\n\nconst CoursePayments: React.FC = () => {\n const { formatMessage } = useIntl();\n\n return (\n <section className=\"pt-4\" aria-labelledby=\"course-payments-empty-heading\">\n <div className=\"my-2 px-4\">\n <h2 id=\"course-payments-empty-heading\" className=\"h5 font-weight-bold text-primary-700 mb-1\">\n {formatMessage(messages.otherPurchasesTitle)}\n </h2>\n <p className=\"medium text-gray-700 mb-0\">\n {formatMessage(messages.coursePurchasesEmptyMessage)}\n </p>\n </div>\n <div className=\"mt-2\">\n <OrdersList />\n </div>\n </section>\n );\n};\n\nexport default CoursePayments;\n"]}
@@ -0,0 +1,2 @@
1
+ declare const OrdersList: () => import("react/jsx-runtime").JSX.Element;
2
+ export default OrdersList;
@@ -0,0 +1,44 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import OrderHistoryCard from './OrderHistoryCard';
3
+ const orders = [
4
+ {
5
+ orderId: 'BI0QZ4UAFLTYBCXC',
6
+ orderNumber: '2U-ORD-62638121',
7
+ purchasedAt: '2026-10-26T14:37:56.721Z',
8
+ paymentIntentId: 'pi_3UUp24EUxB2SCTmQ1LBPdo4n',
9
+ name: 'A Verified and Audi course or b2c testing 001',
10
+ total: {
11
+ amount: 90,
12
+ currency: 'USD',
13
+ },
14
+ },
15
+ {
16
+ orderId: 'BI1RX5VBGMUZCDYD',
17
+ orderNumber: '2U-ORD-62638122',
18
+ purchasedAt: '2026-10-24T10:15:30.000Z',
19
+ paymentIntentId: 'pi_3UUp25EUxB2SCTmQ2LBPdo5p',
20
+ name: 'Harvard University CS50 Introduction to Computer Science',
21
+ total: {
22
+ amount: 219,
23
+ currency: 'USD',
24
+ },
25
+ },
26
+ {
27
+ orderId: 'BI2SY6WCHNVAEZE',
28
+ orderNumber: '2U-ORD-62638123',
29
+ purchasedAt: '2026-10-20T08:45:12.000Z',
30
+ paymentIntentId: 'pi_3UUp26EUxB2SCTmQ3LBPdo6q',
31
+ name: 'Introduction to Python Programming',
32
+ total: {
33
+ amount: 49,
34
+ currency: 'USD',
35
+ },
36
+ },
37
+ ];
38
+ const OrdersList = () => (_jsx("div", { className: "px-4", children: orders.map((order) => (_jsx("div", { className: "mb-3", children: _jsx(OrderHistoryCard, { title: order.name, purchaseDate: new Date(order.purchasedAt).toLocaleDateString('en-US'), totalCost: `${order.total.currency === 'USD' ? '$' : ''}${order.total.amount.toFixed(2)} ${order.total.currency}`, orderNumber: order.orderNumber, onViewReceipt: () => {
39
+ console.log('View receipt:', order.paymentIntentId);
40
+ }, onViewOrderDetails: () => {
41
+ console.log('View order details:', order.orderId);
42
+ } }) }, order.orderId))) }));
43
+ export default OrdersList;
44
+ //# sourceMappingURL=OrderList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderList.js","sourceRoot":"","sources":["../../../src/components/OrderHistory/OrderList.tsx"],"names":[],"mappings":";AAAA,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,MAAM,MAAM,GAAG;IACb;QACE,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE,0BAA0B;QACvC,eAAe,EAAE,6BAA6B;QAC9C,IAAI,EAAE,+CAA+C;QACrD,KAAK,EAAE;YACL,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,KAAK;SAChB;KACF;IACD;QACE,OAAO,EAAE,kBAAkB;QAC3B,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE,0BAA0B;QACvC,eAAe,EAAE,6BAA6B;QAC9C,IAAI,EAAE,0DAA0D;QAChE,KAAK,EAAE;YACL,MAAM,EAAE,GAAG;YACX,QAAQ,EAAE,KAAK;SAChB;KACF;IACD;QACE,OAAO,EAAE,iBAAiB;QAC1B,WAAW,EAAE,iBAAiB;QAC9B,WAAW,EAAE,0BAA0B;QACvC,eAAe,EAAE,6BAA6B;QAC9C,IAAI,EAAE,oCAAoC;QAC1C,KAAK,EAAE;YACL,MAAM,EAAE,EAAE;YACV,QAAQ,EAAE,KAAK;SAChB;KACF;CACF,CAAC;AAEF,MAAM,UAAU,GAAG,GAAG,EAAE,CAAC,CACvB,cAAK,SAAS,EAAC,MAAM,YAClB,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CACrB,cAAyB,SAAS,EAAC,MAAM,YACvC,KAAC,gBAAgB,IACf,KAAK,EAAE,KAAK,CAAC,IAAI,EACjB,YAAY,EAAE,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,kBAAkB,CAAC,OAAO,CAAC,EACrE,SAAS,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,EACjH,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,aAAa,EAAE,GAAG,EAAE;gBAClB,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,KAAK,CAAC,eAAe,CAAC,CAAC;YACtD,CAAC,EACD,kBAAkB,EAAE,GAAG,EAAE;gBACvB,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YACpD,CAAC,GACD,IAZM,KAAK,CAAC,OAAO,CAajB,CACP,CAAC,GACE,CACP,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import OrderHistoryCard from './OrderHistoryCard';\n\nconst orders = [\n {\n orderId: 'BI0QZ4UAFLTYBCXC',\n orderNumber: '2U-ORD-62638121',\n purchasedAt: '2026-10-26T14:37:56.721Z',\n paymentIntentId: 'pi_3UUp24EUxB2SCTmQ1LBPdo4n',\n name: 'A Verified and Audi course or b2c testing 001',\n total: {\n amount: 90,\n currency: 'USD',\n },\n },\n {\n orderId: 'BI1RX5VBGMUZCDYD',\n orderNumber: '2U-ORD-62638122',\n purchasedAt: '2026-10-24T10:15:30.000Z',\n paymentIntentId: 'pi_3UUp25EUxB2SCTmQ2LBPdo5p',\n name: 'Harvard University CS50 Introduction to Computer Science',\n total: {\n amount: 219,\n currency: 'USD',\n },\n },\n {\n orderId: 'BI2SY6WCHNVAEZE',\n orderNumber: '2U-ORD-62638123',\n purchasedAt: '2026-10-20T08:45:12.000Z',\n paymentIntentId: 'pi_3UUp26EUxB2SCTmQ3LBPdo6q',\n name: 'Introduction to Python Programming',\n total: {\n amount: 49,\n currency: 'USD',\n },\n },\n];\n\nconst OrdersList = () => (\n <div className=\"px-4\">\n {orders.map((order) => (\n <div key={order.orderId} className=\"mb-3\">\n <OrderHistoryCard\n title={order.name}\n purchaseDate={new Date(order.purchasedAt).toLocaleDateString('en-US')}\n totalCost={`${order.total.currency === 'USD' ? '$' : ''}${order.total.amount.toFixed(2)} ${order.total.currency}`}\n orderNumber={order.orderNumber}\n onViewReceipt={() => {\n console.log('View receipt:', order.paymentIntentId);\n }}\n onViewOrderDetails={() => {\n console.log('View order details:', order.orderId);\n }}\n />\n </div>\n ))}\n </div>\n);\n\nexport default OrdersList;\n"]}
@@ -1,3 +1,14 @@
1
1
  .orderHistoryTitle {
2
2
  font-weight: 800;
3
3
  }
4
+
5
+ .orderHistoryCard {
6
+
7
+ &__details {
8
+ font-weight: 700;
9
+ }
10
+
11
+ &__link {
12
+ color: #002B2B;
13
+ }
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edx/frontend-app-alacarte-checkout",
3
- "version": "1.32.0",
3
+ "version": "1.33.0",
4
4
  "description": "alacarte Checkout Frontend application",
5
5
  "repository": {
6
6
  "type": "git",