@edx/frontend-app-alacarte-checkout 1.59.0 → 1.60.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.
@@ -16,13 +16,13 @@ const CheckoutPage = () => {
16
16
  const disableComplianceCheck = config.DISABLE_COMPLIANCE_CHECK === true;
17
17
  const restrictCompliance = config.RESTRICT_COMPLIANCE === true;
18
18
  const skipSubscriptionCourseRuns = config.SKIP_SUBSCRIPTION_COURSE_RUNS === true;
19
- const edxSessionUrl = `${isDevelopment ? 'https://courses.stage.edx.org' : LMS_BASE_URL}/api/edx-session`;
20
- const geolocationUrl = `${isDevelopment ? 'https://courses.stage.edx.org' : LMS_BASE_URL}/api/geolocation/lookup`;
19
+ const edxSessionUrl = `${isDevelopment ? config.COURSES_BASE_URL : LMS_BASE_URL}/api/edx-session`;
20
+ const geolocationUrl = `${isDevelopment ? config.COURSES_BASE_URL : LMS_BASE_URL}/api/geolocation/lookup`;
21
21
  const complianceCheckUrl = disableComplianceCheck
22
22
  ? undefined
23
- : `${isDevelopment ? 'https://courses.stage.edx.org' : LMS_BASE_URL}/api/compliance-check`;
23
+ : `${isDevelopment ? config.COURSES_BASE_URL : LMS_BASE_URL}/api/compliance-check`;
24
24
  if (!stripePublishableKey || !apiUrl || !edxSessionUrl) {
25
- return (_jsx(PageWrapper, { children: _jsxs(Alert, { variant: "danger", children: ["We're having trouble loading the checkout. Please refresh the page or try again in a few moments. If the problem persists,", ' ', _jsx("a", { href: "https://courses.edx.org/support/contact_us", children: "contact support" }), "."] }) }));
25
+ return (_jsx(PageWrapper, { children: _jsxs(Alert, { variant: "danger", children: ["We're having trouble loading the checkout. Please refresh the page or try again in a few moments. If the problem persists,", ' ', _jsx("a", { href: `${getAppConfig(appId).CONTACT_US_URL}`, children: "contact support" }), "."] }) }));
26
26
  }
27
27
  return (_jsx(PageWrapper, { children: _jsx(CheckoutGate, { stripePublishableKey: stripePublishableKey, paypalClientId: paypalClientId, apiUrl: apiUrl, edxSessionUrl: edxSessionUrl, geolocationUrl: geolocationUrl, complianceCheckUrl: complianceCheckUrl, disableComplianceCheck: disableComplianceCheck, restrictCompliance: restrictCompliance, skipSubscriptionCourseRuns: skipSubscriptionCourseRuns, learnerDashboardUrl: `${LMS_BASE_URL}/dashboard`, homeUrl: LMS_BASE_URL || '/', onComplete: (_subscriptionBiId) => {
28
28
  console.log(_subscriptionBiId);
@@ -1 +1 @@
1
- {"version":3,"file":"CheckoutPage.js","sourceRoot":"","sources":["../../src/checkoutPage/CheckoutPage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,YAAY,MAAM,yCAAyC,CAAC;AAEnE,MAAM,WAAW,GAA4C,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC7E,KAAC,SAAS,cAAE,QAAQ,GAAa,CAClC,CAAC;AAEF,MAAM,YAAY,GAAa,GAAG,EAAE;IAClC,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,YAAY,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9D,MAAM,oBAAoB,GAAG,MAAM,CAAC,iBAA2B,CAAC;IAChE,kEAAkE;IAClE,MAAM,cAAc,GAAI,MAAM,CAAC,gBAAuC,IAAI,SAAS,CAAC;IACpF,MAAM,MAAM,GAAG,MAAM,CAAC,YAAsB,CAAC;IAC7C,MAAM,aAAa,GAAG,UAAU,CAAC,WAAW,KAAK,aAAa,CAAC;IAC/D,MAAM,sBAAsB,GAAG,MAAM,CAAC,wBAAwB,KAAK,IAAI,CAAC;IACxE,MA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ACf,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React from 'react';\nimport { Alert, Container } from '@openedx/paragon';\nimport { getAppConfig, getSiteConfig } from '@openedx/frontend-base';\nimport { appId } from '@src/constants';\nimport CheckoutGate from '../components/CheckoutGate/CheckoutGate';\n\nconst PageWrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => (\n <Container>{children}</Container>\n);\n\nconst CheckoutPage: React.FC = () => {\n const config = getAppConfig(appId);\n const siteConfig = getSiteConfig();\n const LMS_BASE_URL = siteConfig.lmsBaseUrl.replace(/\\/$/, '');\n const stripePublishableKey = config.STRIPE_PUBLIC_KEY as string;\n // Optional — the PayPal express button stays disabled without it.\n const paypalClientId = (config.PAYPAL_CLIENT_ID as string | undefined) || undefined;\n const apiUrl = config.VIAX_API_URL as string;\n const isDevelopment = siteConfig.environment === 'development';\n const disableComplianceCheck = config.DISABLE_COMPLIANCE_CHECK === true;\n const restrictCompliance = config.RESTRICT_COMPLIANCE === true;\n const skipSubscriptionCourseRuns = config.SKIP_SUBSCRIPTION_COURSE_RUNS === true;\n const edxSessionUrl = `${isDevelopment ? 'https://courses.stage.edx.org' : LMS_BASE_URL}/api/edx-session`;\n const geolocationUrl = `${isDevelopment ? 'https://courses.stage.edx.org' : LMS_BASE_URL}/api/geolocation/lookup`;\n const complianceCheckUrl = disableComplianceCheck\n ? undefined\n : `${isDevelopment ? 'https://courses.stage.edx.org' : LMS_BASE_URL}/api/compliance-check`;\n\n if (!stripePublishableKey || !apiUrl || !edxSessionUrl) {\n return (\n <PageWrapper>\n <Alert variant=\"danger\">\n We&apos;re having trouble loading the checkout. Please refresh the\n page or try again in a few moments. If the problem persists,{' '}\n <a href=\"https://courses.edx.org/support/contact_us\">\n contact support\n </a>\n .\n </Alert>\n </PageWrapper>\n );\n }\n\n return (\n <PageWrapper>\n <CheckoutGate\n stripePublishableKey={stripePublishableKey}\n paypalClientId={paypalClientId}\n apiUrl={apiUrl}\n edxSessionUrl={edxSessionUrl}\n geolocationUrl={geolocationUrl}\n complianceCheckUrl={complianceCheckUrl}\n disableComplianceCheck={disableComplianceCheck}\n restrictCompliance={restrictCompliance}\n skipSubscriptionCourseRuns={skipSubscriptionCourseRuns}\n learnerDashboardUrl={`${LMS_BASE_URL}/dashboard`}\n homeUrl={LMS_BASE_URL || '/'}\n onComplete={(_subscriptionBiId) => {\n console.log(_subscriptionBiId);\n // window.location.href = `/checkout/confirmation?sub=${_subscriptionBiId ?? ''}`;\n // Success screen.\n }}\n />\n </PageWrapper>\n );\n};\n\nexport default CheckoutPage;\n"]}
1
+ {"version":3,"file":"CheckoutPage.js","sourceRoot":"","sources":["../../src/checkoutPage/CheckoutPage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,YAAY,MAAM,yCAAyC,CAAC;AAEnE,MAAM,WAAW,GAA4C,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAC7E,KAAC,SAAS,cAAE,QAAQ,GAAa,CAClC,CAAC;AAEF,MAAM,YAAY,GAAa,GAAG,EAAE;IAClC,MAAM,MAAM,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;IACnC,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IACnC,MAAM,YAAY,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC9D,MAAM,oBAAoB,GAAG,MAAM,CAAC,iBAA2B,CAAC;IAChE,kEAAkE;IAClE,MAAM,cAAc,GAAI,MAAM,CAAC,gBAAuC,IAAI,SAAS,CAAC;IACpF,MAAM,MAAM,GAAG,MAAM,CAAC,YAAsB,CAAC;IAC7C,MAAM,aAAa,GAAG,UAAU,CAA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EAAE,YAAY,IAAI,GAAG,EAC5B,UAAU,EAAE,CAAC,iBAAiB,EAAE,EAAE;gBAChC,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;gBAC/B,kFAAkF;gBAClF,kBAAkB;YACpB,CAAC,GACD,GACU,CACf,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import React from 'react';\nimport { Alert, Container } from '@openedx/paragon';\nimport { getAppConfig, getSiteConfig } from '@openedx/frontend-base';\nimport { appId } from '@src/constants';\nimport CheckoutGate from '../components/CheckoutGate/CheckoutGate';\n\nconst PageWrapper: React.FC<{ children: React.ReactNode }> = ({ children }) => (\n <Container>{children}</Container>\n);\n\nconst CheckoutPage: React.FC = () => {\n const config = getAppConfig(appId);\n const siteConfig = getSiteConfig();\n const LMS_BASE_URL = siteConfig.lmsBaseUrl.replace(/\\/$/, '');\n const stripePublishableKey = config.STRIPE_PUBLIC_KEY as string;\n // Optional — the PayPal express button stays disabled without it.\n const paypalClientId = (config.PAYPAL_CLIENT_ID as string | undefined) || undefined;\n const apiUrl = config.VIAX_API_URL as string;\n const isDevelopment = siteConfig.environment === 'development';\n const disableComplianceCheck = config.DISABLE_COMPLIANCE_CHECK === true;\n const restrictCompliance = config.RESTRICT_COMPLIANCE === true;\n const skipSubscriptionCourseRuns = config.SKIP_SUBSCRIPTION_COURSE_RUNS === true;\n const edxSessionUrl = `${isDevelopment ? config.COURSES_BASE_URL : LMS_BASE_URL}/api/edx-session`;\n const geolocationUrl = `${isDevelopment ? config.COURSES_BASE_URL : LMS_BASE_URL}/api/geolocation/lookup`;\n const complianceCheckUrl = disableComplianceCheck\n ? undefined\n : `${isDevelopment ? config.COURSES_BASE_URL : LMS_BASE_URL}/api/compliance-check`;\n\n if (!stripePublishableKey || !apiUrl || !edxSessionUrl) {\n return (\n <PageWrapper>\n <Alert variant=\"danger\">\n We&apos;re having trouble loading the checkout. Please refresh the\n page or try again in a few moments. If the problem persists,{' '}\n <a href={`${getAppConfig(appId).CONTACT_US_URL as string}`}>\n contact support\n </a>\n .\n </Alert>\n </PageWrapper>\n );\n }\n\n return (\n <PageWrapper>\n <CheckoutGate\n stripePublishableKey={stripePublishableKey}\n paypalClientId={paypalClientId}\n apiUrl={apiUrl}\n edxSessionUrl={edxSessionUrl}\n geolocationUrl={geolocationUrl}\n complianceCheckUrl={complianceCheckUrl}\n disableComplianceCheck={disableComplianceCheck}\n restrictCompliance={restrictCompliance}\n skipSubscriptionCourseRuns={skipSubscriptionCourseRuns}\n learnerDashboardUrl={`${LMS_BASE_URL}/dashboard`}\n homeUrl={LMS_BASE_URL || '/'}\n onComplete={(_subscriptionBiId) => {\n console.log(_subscriptionBiId);\n // window.location.href = `/checkout/confirmation?sub=${_subscriptionBiId ?? ''}`;\n // Success screen.\n }}\n />\n </PageWrapper>\n );\n};\n\nexport default CheckoutPage;\n"]}
@@ -1,10 +1,10 @@
1
1
  import type { CSSProperties } from 'react';
2
2
  export declare const appId = "org.openedx.frontend.app.aca.checkout";
3
3
  export declare const acaCheckoutRole = "org.openedx.frontend.role.aca.checkout";
4
- export declare const LEARNER_HELP_CENTER_URL = "https://support.edx.org";
4
+ export declare const LEARNER_HELP_CENTER_URL: string;
5
5
  export declare const BILLING_SUPPORT_EMAIL = "billing@edx.org";
6
- export declare const REFUND_POLICY_URL = "https://www.edx.org/refund-policy";
7
- export declare const FAQ_URL = "https://support.edx.org/hc/en-us/categories/200357087-FAQ";
6
+ export declare const REFUND_POLICY_URL: string;
7
+ export declare const FAQ_URL: string;
8
8
  export declare const STATUS: {
9
9
  readonly IN_CART: "IN_CART";
10
10
  readonly CONFIRM: "CONFIRM";
package/dist/constants.js CHANGED
@@ -1,9 +1,11 @@
1
+ var _a, _b, _c, _d, _e, _f;
2
+ import { getAppConfig } from '@openedx/frontend-base';
1
3
  export const appId = 'org.openedx.frontend.app.aca.checkout';
2
4
  export const acaCheckoutRole = 'org.openedx.frontend.role.aca.checkout';
3
- export const LEARNER_HELP_CENTER_URL = 'https://support.edx.org';
5
+ export const LEARNER_HELP_CENTER_URL = `${(_b = (_a = getAppConfig(appId)) === null || _a === void 0 ? void 0 : _a.SUPPORT_URL) !== null && _b !== void 0 ? _b : ''}`;
4
6
  export const BILLING_SUPPORT_EMAIL = 'billing@edx.org';
5
- export const REFUND_POLICY_URL = 'https://www.edx.org/refund-policy';
6
- export const FAQ_URL = 'https://support.edx.org/hc/en-us/categories/200357087-FAQ';
7
+ export const REFUND_POLICY_URL = `${(_d = (_c = getAppConfig(appId)) === null || _c === void 0 ? void 0 : _c.REFUND_POLICY_URL) !== null && _d !== void 0 ? _d : ''}`;
8
+ export const FAQ_URL = `${(_f = (_e = getAppConfig(appId)) === null || _e === void 0 ? void 0 : _e.FAQ_URL) !== null && _f !== void 0 ? _f : ''}`;
7
9
  // --- Cart BI state machine ---------------------------------------------------
8
10
  export const STATUS = {
9
11
  IN_CART: 'IN_CART',
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAG,uCAAuC,CAAC;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,wCAAwC,CAAC;AAExE,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC;AACjE,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AACvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,mCAAmC,CAAC;AACrE,MAAM,CAAC,MAAM,OAAO,GAAG,2DAA2D,CAAC;AAEnF,gFAAgF;AAChF,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;IAClB,gBAAgB,EAAE,kBAAkB;IACpC,eAAe,EAAE,iBAAiB;IAClC,cAAc,EAAE,gBAAgB;IAChC,cAAc,EAAE,gBAAgB;IAChC,iBAAiB,EAAE,mBAAmB;IACtC,4BAA4B,EAAE,8BAA8B;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aca.checkout';\nexport const acaCheckoutRole = 'org.openedx.frontend.role.aca.checkout';\n\nexport const LEARNER_HELP_CENTER_URL = 'https://support.edx.org';\nexport const BILLING_SUPPORT_EMAIL = 'billing@edx.org';\nexport const REFUND_POLICY_URL = 'https://www.edx.org/refund-policy';\nexport const FAQ_URL = 'https://support.edx.org/hc/en-us/categories/200357087-FAQ';\n\n// --- Cart BI state machine ---------------------------------------------------\nexport const STATUS = {\n IN_CART: 'IN_CART',\n CONFIRM: 'CONFIRM',\n SANCTION_STARTED: 'SANCTION_STARTED',\n SANCTION_PASSED: 'SANCTION_PASSED',\n SANCTION_BLOCK: 'SANCTION_BLOCK',\n STRIPE_STARTED: 'STRIPE_STARTED',\n STRIPE_SUBSCRIBED: 'STRIPE_SUBSCRIBED',\n STRIPE_CONFIRMATION_REQUIRED: 'STRIPE_CONFIRMATION_REQUIRED',\n STRIPE_FAIL: 'STRIPE_FAIL',\n SUBSCRIPTION_CREATED: 'SUBSCRIPTION_CREATED',\n} as const;\n\nexport type Status = typeof STATUS[keyof typeof STATUS];\n\nexport type Phase = 'init' | 'ready' | 'processing' | 'threeds' | 'success' | 'blocked' | 'failed';\n\nexport const TERMINAL_STATES: Status[] = [\n STATUS.SUBSCRIPTION_CREATED,\n STATUS.SANCTION_BLOCK,\n STATUS.STRIPE_FAIL,\n];\n\nexport const STATUS_LABELS: Record<string, string> = {\n IN_CART: 'Cart created',\n CONFIRM: 'Order confirmed',\n SANCTION_STARTED: 'Checking sanctions…',\n SANCTION_PASSED: 'Sanctions passed — setting up your account…',\n SANCTION_BLOCK: 'Order blocked',\n STRIPE_STARTED: 'Setting up your subscription…',\n STRIPE_CONFIRMATION_REQUIRED: 'Card verification required',\n STRIPE_SUBSCRIBED: 'Card verified — finalizing…',\n STRIPE_FAIL: 'Payment failed',\n SUBSCRIPTION_CREATED: 'Subscription created',\n};\n\nexport const isTerminalStatus = (status: Status | null | undefined): boolean =>\n TERMINAL_STATES.includes(status as Status);\n\n/** UI phase derived from the raw bpStatus code + cart readiness. */\nexport function phaseFor(status: Status | null, ready: boolean): Phase {\n if (status === STATUS.SUBSCRIPTION_CREATED) return 'success';\n if (status === STATUS.SANCTION_BLOCK) return 'blocked';\n if (status === STATUS.STRIPE_FAIL) return 'failed';\n if (status && status !== STATUS.IN_CART) return 'processing';\n return ready ? 'ready' : 'init';\n}\n\n// --- Dev defaults (match the local test harness) -----------------------------\nexport const DEFAULTS = {\n apiUrl: '/api/graphql',\n confirmIntentUrl: '/api/stripe/confirm-pi',\n customerUid: '019d2bde-f769-743d-88f9-8bf0d1a7a002',\n salableUid: '019d2ce7-05bc-7dd6-b141-e32df9ac86c1',\n // Monthly Subscription template uid (not Annual)\n billingPlanUid: '019d2ce7-05bf-733c-ba56-0fcafafeb69b',\n};\n\nexport const LS_KEYS = { biId: 'twou.cartBiId', uid: 'twou.cartUid' };\n\n// ─── Checkout gate feature flags (dev controls) ───────────────────────────────\n// Set to false during development to bypass the country gate check.\n// Should be true in production. Subscriber access is enforced outside this app.\n\n/** When false, the country check is skipped — all countries can access checkout. */\nexport const GATE_CHECK_COUNTRY = true;\n\n/**\n * ISO 3166-1 alpha-2 country codes that are permitted to complete checkout.\n * Add or remove codes here to open or restrict access by country.\n */\nexport const ALLOWED_CHECKOUT_COUNTRIES: readonly string[] = ['GB', 'AU', 'CA', 'US', 'IN'];\n\n/**\n * ISO 3166-1 alpha-2 country codes that require the extra billing-consent checkbox.\n * Add or remove codes here to control which selected billing countries show it.\n */\nexport const COUNTRIES_REQUIRING_EXTRA_CONFIRM: readonly string[] = ['GB', 'CA'];\n\n/**\n * ISO 3166-1 alpha-2 codes (plus XK, Kosovo) offered in the billing country dropdown.\n * Display names are localized at runtime with Intl.DisplayNames (see utils/countries).\n * Sanctioned countries stay listed: the backend embargo check blocks them.\n */\nexport const BILLING_COUNTRY_CODES: readonly string[] = [\n 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT',\n 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI',\n 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY',\n 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN',\n 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM',\n 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK',\n 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL',\n 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM',\n 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR',\n 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN',\n 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS',\n 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK',\n 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW',\n 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP',\n 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM',\n 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW',\n 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM',\n 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF',\n 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW',\n 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI',\n 'VN', 'VU', 'WF', 'WS', 'XK', 'YE', 'YT', 'ZA', 'ZM', 'ZW',\n];\n\n/** Canadian provinces and territories (ISO 3166-2:CA codes without the CA- prefix). */\nexport const CA_PROVINCES: readonly (readonly [string, string])[] = [\n ['AB', 'Alberta'],\n ['BC', 'British Columbia'],\n ['MB', 'Manitoba'],\n ['NB', 'New Brunswick'],\n ['NL', 'Newfoundland and Labrador'],\n ['NT', 'Northwest Territories'],\n ['NS', 'Nova Scotia'],\n ['NU', 'Nunavut'],\n ['ON', 'Ontario'],\n ['PE', 'Prince Edward Island'],\n ['QC', 'Quebec'],\n ['SK', 'Saskatchewan'],\n ['YT', 'Yukon'],\n];\n\n/** Indian states and union territories (ISO 3166-2:IN codes without the IN- prefix). */\nexport const IN_STATES: readonly (readonly [string, string])[] = [\n ['AN', 'Andaman and Nicobar Islands'],\n ['AP', 'Andhra Pradesh'],\n ['AR', 'Arunachal Pradesh'],\n ['AS', 'Assam'],\n ['BR', 'Bihar'],\n ['CH', 'Chandigarh'],\n ['CG', 'Chhattisgarh'],\n ['DH', 'Dadra and Nagar Haveli and Daman and Diu'],\n ['DL', 'Delhi'],\n ['GA', 'Goa'],\n ['GJ', 'Gujarat'],\n ['HR', 'Haryana'],\n ['HP', 'Himachal Pradesh'],\n ['JK', 'Jammu and Kashmir'],\n ['JH', 'Jharkhand'],\n ['KA', 'Karnataka'],\n ['KL', 'Kerala'],\n ['LA', 'Ladakh'],\n ['LD', 'Lakshadweep'],\n ['MP', 'Madhya Pradesh'],\n ['MH', 'Maharashtra'],\n ['MN', 'Manipur'],\n ['ML', 'Meghalaya'],\n ['MZ', 'Mizoram'],\n ['NL', 'Nagaland'],\n ['OD', 'Odisha'],\n ['PY', 'Puducherry'],\n ['PB', 'Punjab'],\n ['RJ', 'Rajasthan'],\n ['SK', 'Sikkim'],\n ['TN', 'Tamil Nadu'],\n ['TS', 'Telangana'],\n ['TR', 'Tripura'],\n ['UP', 'Uttar Pradesh'],\n ['UK', 'Uttarakhand'],\n ['WB', 'West Bengal'],\n];\n\n// --- Stripe Element presentation ---------------------------------------------\n// A div that hosts a Stripe Element but reads like a Paragon input.\n// Vertical padding replaces Element `lineHeight` (discouraged by Stripe.js).\nexport const STRIPE_FIELD_STYLE: CSSProperties = {\n height: 'auto',\n minHeight: '2.875rem',\n display: 'flex',\n alignItems: 'center',\n paddingTop: '0.5rem',\n paddingBottom: '0.5rem',\n};\nexport const STRIPE_ELEMENT_OPTS = {\n style: {\n base: {\n fontFamily: 'Inter, system-ui, sans-serif',\n fontSize: '16px',\n fontWeight: '400',\n // Stripe's `lineHeight` requires a fixed unit (not a percentage) — 145% of 16px.\n lineHeight: '23px',\n color: '#1a1a1a',\n '::placeholder': { color: '#6e6e6e' },\n },\n },\n};\n/** cardNumber-only: disableLink is invalid on cardExpiry / cardCvc. */\nexport const STRIPE_CARD_NUMBER_OPTS = {\n ...STRIPE_ELEMENT_OPTS,\n disableLink: true,\n};\n"]}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGtD,MAAM,CAAC,MAAM,KAAK,GAAG,uCAAuC,CAAC;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,wCAAwC,CAAC;AAExE,MAAM,CAAC,MAAM,uBAAuB,GAAG,GAAG,MAAA,MAAA,YAAY,CAAC,KAAK,CAAC,0CAAE,WAAW,mCAAI,EAAE,EAAE,CAAC;AACnF,MAAM,CAAC,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AACvD,MAAM,CAAC,MAAM,iBAAiB,GAAG,GA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,EAAE,QAAQ;CACxB,CAAC;AACF,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,KAAK,EAAE;QACL,IAAI,EAAE;YACJ,UAAU,EAAE,8BAA8B;YAC1C,QAAQ,EAAE,MAAM;YAChB,UAAU,EAAE,KAAK;YACjB,iFAAiF;YACjF,UAAU,EAAE,MAAM;YAClB,KAAK,EAAE,SAAS;YAChB,eAAe,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE;SACtC;KACF;CACF,CAAC;AACF,uEAAuE;AACvE,MAAM,CAAC,MAAM,uBAAuB,mCAC/B,mBAAmB,KACtB,WAAW,EAAE,IAAI,GAClB,CAAC","sourcesContent":["import { getAppConfig } from '@openedx/frontend-base';\nimport type { CSSProperties } from 'react';\n\nexport const appId = 'org.openedx.frontend.app.aca.checkout';\nexport const acaCheckoutRole = 'org.openedx.frontend.role.aca.checkout';\n\nexport const LEARNER_HELP_CENTER_URL = `${getAppConfig(appId)?.SUPPORT_URL ?? ''}`;\nexport const BILLING_SUPPORT_EMAIL = 'billing@edx.org';\nexport const REFUND_POLICY_URL = `${getAppConfig(appId)?.REFUND_POLICY_URL ?? ''}`;\nexport const FAQ_URL = `${getAppConfig(appId)?.FAQ_URL ?? ''}`;\n\n// --- Cart BI state machine ---------------------------------------------------\nexport const STATUS = {\n IN_CART: 'IN_CART',\n CONFIRM: 'CONFIRM',\n SANCTION_STARTED: 'SANCTION_STARTED',\n SANCTION_PASSED: 'SANCTION_PASSED',\n SANCTION_BLOCK: 'SANCTION_BLOCK',\n STRIPE_STARTED: 'STRIPE_STARTED',\n STRIPE_SUBSCRIBED: 'STRIPE_SUBSCRIBED',\n STRIPE_CONFIRMATION_REQUIRED: 'STRIPE_CONFIRMATION_REQUIRED',\n STRIPE_FAIL: 'STRIPE_FAIL',\n SUBSCRIPTION_CREATED: 'SUBSCRIPTION_CREATED',\n} as const;\n\nexport type Status = typeof STATUS[keyof typeof STATUS];\n\nexport type Phase = 'init' | 'ready' | 'processing' | 'threeds' | 'success' | 'blocked' | 'failed';\n\nexport const TERMINAL_STATES: Status[] = [\n STATUS.SUBSCRIPTION_CREATED,\n STATUS.SANCTION_BLOCK,\n STATUS.STRIPE_FAIL,\n];\n\nexport const STATUS_LABELS: Record<string, string> = {\n IN_CART: 'Cart created',\n CONFIRM: 'Order confirmed',\n SANCTION_STARTED: 'Checking sanctions…',\n SANCTION_PASSED: 'Sanctions passed — setting up your account…',\n SANCTION_BLOCK: 'Order blocked',\n STRIPE_STARTED: 'Setting up your subscription…',\n STRIPE_CONFIRMATION_REQUIRED: 'Card verification required',\n STRIPE_SUBSCRIBED: 'Card verified — finalizing…',\n STRIPE_FAIL: 'Payment failed',\n SUBSCRIPTION_CREATED: 'Subscription created',\n};\n\nexport const isTerminalStatus = (status: Status | null | undefined): boolean =>\n TERMINAL_STATES.includes(status as Status);\n\n/** UI phase derived from the raw bpStatus code + cart readiness. */\nexport function phaseFor(status: Status | null, ready: boolean): Phase {\n if (status === STATUS.SUBSCRIPTION_CREATED) return 'success';\n if (status === STATUS.SANCTION_BLOCK) return 'blocked';\n if (status === STATUS.STRIPE_FAIL) return 'failed';\n if (status && status !== STATUS.IN_CART) return 'processing';\n return ready ? 'ready' : 'init';\n}\n\n// --- Dev defaults (match the local test harness) -----------------------------\nexport const DEFAULTS = {\n apiUrl: '/api/graphql',\n confirmIntentUrl: '/api/stripe/confirm-pi',\n customerUid: '019d2bde-f769-743d-88f9-8bf0d1a7a002',\n salableUid: '019d2ce7-05bc-7dd6-b141-e32df9ac86c1',\n // Monthly Subscription template uid (not Annual)\n billingPlanUid: '019d2ce7-05bf-733c-ba56-0fcafafeb69b',\n};\n\nexport const LS_KEYS = { biId: 'twou.cartBiId', uid: 'twou.cartUid' };\n\n// ─── Checkout gate feature flags (dev controls) ───────────────────────────────\n// Set to false during development to bypass the country gate check.\n// Should be true in production. Subscriber access is enforced outside this app.\n\n/** When false, the country check is skipped — all countries can access checkout. */\nexport const GATE_CHECK_COUNTRY = true;\n\n/**\n * ISO 3166-1 alpha-2 country codes that are permitted to complete checkout.\n * Add or remove codes here to open or restrict access by country.\n */\nexport const ALLOWED_CHECKOUT_COUNTRIES: readonly string[] = ['GB', 'AU', 'CA', 'US', 'IN'];\n\n/**\n * ISO 3166-1 alpha-2 country codes that require the extra billing-consent checkbox.\n * Add or remove codes here to control which selected billing countries show it.\n */\nexport const COUNTRIES_REQUIRING_EXTRA_CONFIRM: readonly string[] = ['GB', 'CA'];\n\n/**\n * ISO 3166-1 alpha-2 codes (plus XK, Kosovo) offered in the billing country dropdown.\n * Display names are localized at runtime with Intl.DisplayNames (see utils/countries).\n * Sanctioned countries stay listed: the backend embargo check blocks them.\n */\nexport const BILLING_COUNTRY_CODES: readonly string[] = [\n 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT',\n 'AU', 'AW', 'AX', 'AZ', 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI',\n 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY',\n 'BZ', 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN',\n 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ', 'DE', 'DJ', 'DK', 'DM',\n 'DO', 'DZ', 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET', 'FI', 'FJ', 'FK',\n 'FM', 'FO', 'FR', 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL',\n 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY', 'HK', 'HM',\n 'HN', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR',\n 'IS', 'IT', 'JE', 'JM', 'JO', 'JP', 'KE', 'KG', 'KH', 'KI', 'KM', 'KN',\n 'KP', 'KR', 'KW', 'KY', 'KZ', 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS',\n 'LT', 'LU', 'LV', 'LY', 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK',\n 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW',\n 'MX', 'MY', 'MZ', 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP',\n 'NR', 'NU', 'NZ', 'OM', 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM',\n 'PN', 'PR', 'PS', 'PT', 'PW', 'PY', 'QA', 'RE', 'RO', 'RS', 'RU', 'RW',\n 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM',\n 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ', 'TC', 'TD', 'TF',\n 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW',\n 'TZ', 'UA', 'UG', 'UM', 'US', 'UY', 'UZ', 'VA', 'VC', 'VE', 'VG', 'VI',\n 'VN', 'VU', 'WF', 'WS', 'XK', 'YE', 'YT', 'ZA', 'ZM', 'ZW',\n];\n\n/** Canadian provinces and territories (ISO 3166-2:CA codes without the CA- prefix). */\nexport const CA_PROVINCES: readonly (readonly [string, string])[] = [\n ['AB', 'Alberta'],\n ['BC', 'British Columbia'],\n ['MB', 'Manitoba'],\n ['NB', 'New Brunswick'],\n ['NL', 'Newfoundland and Labrador'],\n ['NT', 'Northwest Territories'],\n ['NS', 'Nova Scotia'],\n ['NU', 'Nunavut'],\n ['ON', 'Ontario'],\n ['PE', 'Prince Edward Island'],\n ['QC', 'Quebec'],\n ['SK', 'Saskatchewan'],\n ['YT', 'Yukon'],\n];\n\n/** Indian states and union territories (ISO 3166-2:IN codes without the IN- prefix). */\nexport const IN_STATES: readonly (readonly [string, string])[] = [\n ['AN', 'Andaman and Nicobar Islands'],\n ['AP', 'Andhra Pradesh'],\n ['AR', 'Arunachal Pradesh'],\n ['AS', 'Assam'],\n ['BR', 'Bihar'],\n ['CH', 'Chandigarh'],\n ['CG', 'Chhattisgarh'],\n ['DH', 'Dadra and Nagar Haveli and Daman and Diu'],\n ['DL', 'Delhi'],\n ['GA', 'Goa'],\n ['GJ', 'Gujarat'],\n ['HR', 'Haryana'],\n ['HP', 'Himachal Pradesh'],\n ['JK', 'Jammu and Kashmir'],\n ['JH', 'Jharkhand'],\n ['KA', 'Karnataka'],\n ['KL', 'Kerala'],\n ['LA', 'Ladakh'],\n ['LD', 'Lakshadweep'],\n ['MP', 'Madhya Pradesh'],\n ['MH', 'Maharashtra'],\n ['MN', 'Manipur'],\n ['ML', 'Meghalaya'],\n ['MZ', 'Mizoram'],\n ['NL', 'Nagaland'],\n ['OD', 'Odisha'],\n ['PY', 'Puducherry'],\n ['PB', 'Punjab'],\n ['RJ', 'Rajasthan'],\n ['SK', 'Sikkim'],\n ['TN', 'Tamil Nadu'],\n ['TS', 'Telangana'],\n ['TR', 'Tripura'],\n ['UP', 'Uttar Pradesh'],\n ['UK', 'Uttarakhand'],\n ['WB', 'West Bengal'],\n];\n\n// --- Stripe Element presentation ---------------------------------------------\n// A div that hosts a Stripe Element but reads like a Paragon input.\n// Vertical padding replaces Element `lineHeight` (discouraged by Stripe.js).\nexport const STRIPE_FIELD_STYLE: CSSProperties = {\n height: 'auto',\n minHeight: '2.875rem',\n display: 'flex',\n alignItems: 'center',\n paddingTop: '0.5rem',\n paddingBottom: '0.5rem',\n};\nexport const STRIPE_ELEMENT_OPTS = {\n style: {\n base: {\n fontFamily: 'Inter, system-ui, sans-serif',\n fontSize: '16px',\n fontWeight: '400',\n // Stripe's `lineHeight` requires a fixed unit (not a percentage) — 145% of 16px.\n lineHeight: '23px',\n color: '#1a1a1a',\n '::placeholder': { color: '#6e6e6e' },\n },\n },\n};\n/** cardNumber-only: disableLink is invalid on cardExpiry / cardCvc. */\nexport const STRIPE_CARD_NUMBER_OPTS = {\n ...STRIPE_ELEMENT_OPTS,\n disableLink: true,\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edx/frontend-app-alacarte-checkout",
3
- "version": "1.59.0",
3
+ "version": "1.60.0",
4
4
  "description": "alacarte Checkout Frontend application",
5
5
  "repository": {
6
6
  "type": "git",