@edx/frontend-app-subscription-learner-dashboard 1.65.2 → 1.65.4

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.
Binary file
@@ -11,6 +11,7 @@ export interface CommonTrackingProps {
11
11
  subscription_end_date?: string | null;
12
12
  current_period_end?: string | null;
13
13
  trial_end_date?: string | null;
14
+ isSubscriber?: boolean;
14
15
  }
15
16
  export declare const setCommonTrackingProps: (props: CommonTrackingProps) => void;
16
17
  export declare const getCommonTrackingProps: () => CommonTrackingProps;
@@ -6,7 +6,7 @@ export const setCommonTrackingProps = (props) => {
6
6
  export const getCommonTrackingProps = () => commonProps;
7
7
  // Single place that maps the subs/init API response -> tracking props
8
8
  export const mapSubsInitToTrackingProps = (data) => {
9
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
9
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
10
10
  return ({
11
11
  free_trial_status: (_a = data === null || data === void 0 ? void 0 : data.userSubscription) === null || _a === void 0 ? void 0 : _a.trialActive,
12
12
  subscription_status: (_b = data === null || data === void 0 ? void 0 : data.userSubscription) === null || _b === void 0 ? void 0 : _b.status,
@@ -20,6 +20,7 @@ export const mapSubsInitToTrackingProps = (data) => {
20
20
  session_id: '',
21
21
  experimentation: '',
22
22
  device_type: '',
23
+ isSubscriber: (_k = data === null || data === void 0 ? void 0 : data.userSubscription) === null || _k === void 0 ? void 0 : _k.isSubscriber,
23
24
  });
24
25
  };
25
26
  //# sourceMappingURL=trackingContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"trackingContext.js","sourceRoot":"","sources":["../../src/tracking/trackingContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAiB9D,IAAI,WAAW,GAAwB,EAAE,CAAC;AAE1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAA0B,EAAE,EAAE;IACnE,WAAW,mCAAQ,WAAW,GAAK,KAAK,CAAE,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAwB,EAAE,CAAC,WAAW,CAAC;AAE7E,sEAAsE;AACtE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,IAAS,EAAuB,EAAE;;IAAC,OAAA,CAAC;QAC7E,iBAAiB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,WAAW;QACtD,mBAAmB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,MAAM;QACnD,iBAAiB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,gBAAgB;QAC3D,uBAAuB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,qBAAqB;QACtE,qBAAqB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,mBAAmB;QAClE,kBAAkB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,gBAAgB;QAC5D,cAAc,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,YAAY;QACpD,UAAU,EAAE,MAAA,oBAAoB,EAAE,0CAAE,KAAK;QACzC,cAAc,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,aAAa;QACrD,UAAU,EAAE,EAAE;QACd,eAAe,EAAE,EAAE;QACnB,WAAW,EAAE,EAAE;KAChB,CAAC,CAAA;CAAA,CAAC","sourcesContent":["import { getAuthenticatedUser } from '@openedx/frontend-base';\n\nexport interface CommonTrackingProps {\n free_trial_status?: string,\n subscription_status?: string,\n subscription_tier?: string,\n payment_method?: string | null,\n user_email?: string | null,\n session_id?: string | null,\n experimentation?: string | null,\n device_type?: string | null,\n subscription_start_date?: string | null,\n subscription_end_date?: string | null,\n current_period_end?: string | null,\n trial_end_date?: string | null,\n}\n\nlet commonProps: CommonTrackingProps = {};\n\nexport const setCommonTrackingProps = (props: CommonTrackingProps) => {\n commonProps = { ...commonProps, ...props };\n};\n\nexport const getCommonTrackingProps = (): CommonTrackingProps => commonProps;\n\n// Single place that maps the subs/init API response -> tracking props\nexport const mapSubsInitToTrackingProps = (data: any): CommonTrackingProps => ({\n free_trial_status: data?.userSubscription?.trialActive,\n subscription_status: data?.userSubscription?.status,\n subscription_tier: data?.userSubscription?.billingFrequency,\n subscription_start_date: data?.userSubscription?.subscriptionStartDate,\n subscription_end_date: data?.userSubscription?.subscriptionEndDate,\n current_period_end: data?.userSubscription?.currentPeriodEnd,\n trial_end_date: data?.userSubscription?.trialEndDate,\n user_email: getAuthenticatedUser()?.email,\n payment_method: data?.userSubscription?.paymentMethod,\n session_id: '',\n experimentation: '',\n device_type: '',\n});\n"]}
1
+ {"version":3,"file":"trackingContext.js","sourceRoot":"","sources":["../../src/tracking/trackingContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAkB9D,IAAI,WAAW,GAAwB,EAAE,CAAC;AAE1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAA0B,EAAE,EAAE;IACnE,WAAW,mCAAQ,WAAW,GAAK,KAAK,CAAE,CAAC;AAC7C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAwB,EAAE,CAAC,WAAW,CAAC;AAE7E,sEAAsE;AACtE,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,IAAS,EAAuB,EAAE;;IAAC,OAAA,CAAC;QAC7E,iBAAiB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,WAAW;QACtD,mBAAmB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,MAAM;QACnD,iBAAiB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,gBAAgB;QAC3D,uBAAuB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,qBAAqB;QACtE,qBAAqB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,mBAAmB;QAClE,kBAAkB,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,gBAAgB;QAC5D,cAAc,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,YAAY;QACpD,UAAU,EAAE,MAAA,oBAAoB,EAAE,0CAAE,KAAK;QACzC,cAAc,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,aAAa;QACrD,UAAU,EAAE,EAAE;QACd,eAAe,EAAE,EAAE;QACnB,WAAW,EAAE,EAAE;QACf,YAAY,EAAE,MAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,gBAAgB,0CAAE,YAAY;KACnD,CAAC,CAAA;CAAA,CAAC","sourcesContent":["import { getAuthenticatedUser } from '@openedx/frontend-base';\n\nexport interface CommonTrackingProps {\n free_trial_status?: string,\n subscription_status?: string,\n subscription_tier?: string,\n payment_method?: string | null,\n user_email?: string | null,\n session_id?: string | null,\n experimentation?: string | null,\n device_type?: string | null,\n subscription_start_date?: string | null,\n subscription_end_date?: string | null,\n current_period_end?: string | null,\n trial_end_date?: string | null,\n isSubscriber?: boolean,\n}\n\nlet commonProps: CommonTrackingProps = {};\n\nexport const setCommonTrackingProps = (props: CommonTrackingProps) => {\n commonProps = { ...commonProps, ...props };\n};\n\nexport const getCommonTrackingProps = (): CommonTrackingProps => commonProps;\n\n// Single place that maps the subs/init API response -> tracking props\nexport const mapSubsInitToTrackingProps = (data: any): CommonTrackingProps => ({\n free_trial_status: data?.userSubscription?.trialActive,\n subscription_status: data?.userSubscription?.status,\n subscription_tier: data?.userSubscription?.billingFrequency,\n subscription_start_date: data?.userSubscription?.subscriptionStartDate,\n subscription_end_date: data?.userSubscription?.subscriptionEndDate,\n current_period_end: data?.userSubscription?.currentPeriodEnd,\n trial_end_date: data?.userSubscription?.trialEndDate,\n user_email: getAuthenticatedUser()?.email,\n payment_method: data?.userSubscription?.paymentMethod,\n session_id: '',\n experimentation: '',\n device_type: '',\n isSubscriber: data?.userSubscription?.isSubscriber,\n});\n"]}
@@ -1,5 +1,3 @@
1
- interface SiteLogoProps {
2
- destinationUrl?: string;
3
- }
4
- export default function SiteLogo({ destinationUrl }: SiteLogoProps): import("react/jsx-runtime").JSX.Element;
5
- export {};
1
+ import { FC } from 'react';
2
+ declare const SiteLogo: FC;
3
+ export default SiteLogo;
@@ -1,18 +1,34 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState, useCallback } from 'react';
2
3
  import { Hyperlink, Image } from '@openedx/paragon';
3
- import { getSiteConfig } from '@openedx/frontend-base';
4
+ import { getSiteConfig, useSiteEvent } from '@openedx/frontend-base';
5
+ import { useLocation } from 'react-router-dom';
4
6
  import EdxDesktop from '../../assets/Unlimited-desktop.svg';
5
7
  import EdxTablet from '../../assets/Unlimited-tablet.svg';
6
8
  import EdxMobile from '../../assets/Unlimited-mobile.svg';
7
9
  import { createEventTracker } from '../../data/services/segment/utils';
8
10
  import eventNames, { categories } from '../../tracking/constants';
9
- export default function SiteLogo({ destinationUrl }) {
10
- var _a;
11
+ import { getCommonTrackingProps } from '../../tracking';
12
+ import edXLogo from '../../assets/edXLogo.png';
13
+ const CHECKOUT_PAYMENT_STATE_CHANGED = 'org.openedx.frontend.event.subscriptionCheckout.paymentStateChanged.v1';
14
+ const SiteLogo = () => {
11
15
  const siteConfig = getSiteConfig();
12
- const dest = (_a = destinationUrl !== null && destinationUrl !== void 0 ? destinationUrl : siteConfig === null || siteConfig === void 0 ? void 0 : siteConfig.baseUrl) !== null && _a !== void 0 ? _a : '/';
16
+ const { pathname } = useLocation();
17
+ const [isPaid, setIsPaid] = useState(false);
18
+ const handlePaymentStateChanged = useCallback((_topic, data) => {
19
+ setIsPaid((data === null || data === void 0 ? void 0 : data.isPaid) === true);
20
+ }, []);
21
+ useSiteEvent(CHECKOUT_PAYMENT_STATE_CHANGED, handlePaymentStateChanged);
22
+ const { isSubscriber } = getCommonTrackingProps();
23
+ const dest = isSubscriber ? `${siteConfig === null || siteConfig === void 0 ? void 0 : siteConfig.baseUrl}/subscription-learner-dashboard` : `${siteConfig === null || siteConfig === void 0 ? void 0 : siteConfig.baseUrl}/learner-dashboard`;
13
24
  const handleLogoClick = () => {
14
25
  createEventTracker(eventNames.headerLogoClicked, { category: categories.header, label: dest })();
15
26
  };
16
- return (_jsx(Hyperlink, { destination: dest, className: "p-0", onClick: handleLogoClick, children: _jsxs("picture", { className: "site-logo", children: [_jsx("source", { media: "(min-width: 1024px)", srcSet: EdxDesktop }), _jsx("source", { media: "(min-width: 768px)", srcSet: EdxTablet }), _jsx(Image, { src: EdxMobile, style: { maxHeight: '2rem' } })] }) }));
17
- }
27
+ const isCheckout = pathname.startsWith('/checkout');
28
+ const showEdxLogo = !isSubscriber
29
+ && !(isCheckout && isPaid)
30
+ && (isCheckout || pathname.startsWith('/learner-dashboard'));
31
+ return (_jsx(Hyperlink, { destination: dest, className: "p-0", onClick: handleLogoClick, children: _jsxs("picture", { className: "site-logo", children: [_jsx("source", { media: "(min-width: 1024px)", srcSet: showEdxLogo ? edXLogo : EdxDesktop }), _jsx("source", { media: "(min-width: 768px)", srcSet: showEdxLogo ? edXLogo : EdxTablet }), _jsx(Image, { src: showEdxLogo ? edXLogo : EdxMobile, style: { maxHeight: '2rem' } })] }) }));
32
+ };
33
+ export default SiteLogo;
18
34
  //# sourceMappingURL=SiteLogo.js.map
@@ -1 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AAI,IAC/C,GACA,CACb,CAAC;AACJ,CAAC","sourcesContent":["import { Hyperlink, Image } from '@openedx/paragon';\nimport { getSiteConfig } from '@openedx/frontend-base';\nimport EdxDesktop from '../../assets/Unlimited-desktop.svg';\nimport EdxTablet from '../../assets/Unlimited-tablet.svg';\nimport EdxMobile from '../../assets/Unlimited-mobile.svg';\nimport { createEventTracker } from '@src/data/services/segment/utils';\nimport eventNames, { categories } from '@src/tracking/constants';\n\ninterface SiteLogoProps {\n destinationUrl?: string,\n}\n\nexport default function SiteLogo({ destinationUrl }: SiteLogoProps) {\n const siteConfig = getSiteConfig();\n const dest = destinationUrl ?? siteConfig?.baseUrl ?? '/';\n\n const handleLogoClick = () => {\n createEventTracker(\n eventNames.headerLogoClicked,\n { category: categories.header, label: dest }\n )();\n };\n\n return (\n <Hyperlink destination={dest} className=\"p-0\" onClick={handleLogoClick}>\n <picture className=\"site-logo\">\n {/* Desktop: adjust min-width values to your breakpoints */}\n <source media=\"(min-width: 1024px)\" srcSet={EdxDesktop} />\n <source media=\"(min-width: 768px)\" srcSet={EdxTablet} />\n {/* fallback/mobile */}\n <Image src={EdxMobile} style={{ maxHeight: '2rem' }} />\n </picture>\n </Hyperlink>\n );\n}\n"]}
1
+ {"version":3,"file":"SiteLogo.js","sourceRoot":"","sources":["../../../src/widgets/LearnerDashboardHeader/SiteLogo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAC5D,OAAO,SAAS,MAAM,mCAAmC,CAAC;AAC1D,OAAO,SAAS,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EA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b,CAAC,YAAY;WACV,CAAC,CAAC,UAAU,IAAI,MAAM,CAAC;WACvB,CAAC,UAAU,IAAI,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAEjE,OAAO,CACL,KAAC,SAAS,IAAC,WAAW,EAAE,IAAI,EAAE,SAAS,EAAC,KAAK,EAAC,OAAO,EAAE,eAAe,YACpE,mBAAS,SAAS,EAAC,WAAW,aAE5B,iBAAQ,KAAK,EAAC,qBAAqB,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,UAAU,GAAI,EAClF,iBAAQ,KAAK,EAAC,oBAAoB,EAAC,MAAM,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,GAAI,EAEhF,KAAC,KAAK,IAAC,GAAG,EAAE,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAAI,IACvE,GACA,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC","sourcesContent":["import { FC, useState, useCallback } from 'react';\nimport { Hyperlink, Image } from '@openedx/paragon';\nimport { getSiteConfig, useSiteEvent } from '@openedx/frontend-base';\nimport { useLocation } from 'react-router-dom';\n\nimport EdxDesktop from '../../assets/Unlimited-desktop.svg';\nimport EdxTablet from '../../assets/Unlimited-tablet.svg';\nimport EdxMobile from '../../assets/Unlimited-mobile.svg';\nimport { createEventTracker } from '@src/data/services/segment/utils';\nimport eventNames, { categories } from '@src/tracking/constants';\nimport { getCommonTrackingProps } from '@src/tracking';\nimport edXLogo from '../../assets/edXLogo.png';\n\nconst CHECKOUT_PAYMENT_STATE_CHANGED = 'org.openedx.frontend.event.subscriptionCheckout.paymentStateChanged.v1';\n\nconst SiteLogo: FC = () => {\n const siteConfig = getSiteConfig();\n\n const { pathname } = useLocation();\n const [isPaid, setIsPaid] = useState(false);\n\n const handlePaymentStateChanged = useCallback(\n (_topic: string, data?: { isPaid: boolean }) => {\n setIsPaid(data?.isPaid === true);\n }, []);\n\n useSiteEvent(CHECKOUT_PAYMENT_STATE_CHANGED, handlePaymentStateChanged);\n\n const { isSubscriber } = getCommonTrackingProps();\n const dest = isSubscriber ? `${siteConfig?.baseUrl}/subscription-learner-dashboard` : `${siteConfig?.baseUrl}/learner-dashboard`;\n\n const handleLogoClick = () => {\n createEventTracker(\n eventNames.headerLogoClicked,\n { category: categories.header, label: dest }\n )();\n };\n\n const isCheckout = pathname.startsWith('/checkout');\n const showEdxLogo\n = !isSubscriber\n && !(isCheckout && isPaid)\n && (isCheckout || pathname.startsWith('/learner-dashboard'));\n\n return (\n <Hyperlink destination={dest} className=\"p-0\" onClick={handleLogoClick}>\n <picture className=\"site-logo\">\n {/* Desktop: adjust min-width values to your breakpoints */}\n <source media=\"(min-width: 1024px)\" srcSet={showEdxLogo ? edXLogo : EdxDesktop} />\n <source media=\"(min-width: 768px)\" srcSet={showEdxLogo ? edXLogo : EdxTablet} />\n {/* fallback/mobile */}\n <Image src={showEdxLogo ? edXLogo : EdxMobile} style={{ maxHeight: '2rem' }} />\n </picture>\n </Hyperlink>\n );\n};\n\nexport default SiteLogo;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edx/frontend-app-subscription-learner-dashboard",
3
- "version": "1.65.2",
3
+ "version": "1.65.4",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",