@edx/frontend-app-subscription-learner-dashboard 1.43.1 → 1.43.2
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.
package/dist/constants.d.ts
CHANGED
|
@@ -13,3 +13,4 @@ export declare const subscriptionAccountRole = "org.openedx.frontend.role.accoun
|
|
|
13
13
|
export declare const subscriptionProfileRole = "org.openedx.frontend.role.profile";
|
|
14
14
|
export declare const subscriptionProgramProgressRole = "org.edx.frontend.subs.role.programProgress";
|
|
15
15
|
export declare const subscriptionDashboardUrlPath = "/subscription-learner-dashboard";
|
|
16
|
+
export declare const SUBSCRIPTION_ROUTE_PREFIXES: string[];
|
package/dist/constants.js
CHANGED
|
@@ -12,4 +12,9 @@ export const subscriptionAccountRole = 'org.openedx.frontend.role.account';
|
|
|
12
12
|
export const subscriptionProfileRole = 'org.openedx.frontend.role.profile';
|
|
13
13
|
export const subscriptionProgramProgressRole = 'org.edx.frontend.subs.role.programProgress';
|
|
14
14
|
export const subscriptionDashboardUrlPath = '/subscription-learner-dashboard';
|
|
15
|
+
export const SUBSCRIPTION_ROUTE_PREFIXES = [
|
|
16
|
+
'/subscription-',
|
|
17
|
+
'/checkout',
|
|
18
|
+
'/manage-subscription',
|
|
19
|
+
];
|
|
15
20
|
//# sourceMappingURL=constants.js.map
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAG,2CAA2C,CAAC;AAEjE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEvC,yFAAyF;AACzF,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAC5C,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,oBAAoB,GAAgB,SAAS,CAAC;AAC3D,MAAM,CAAC,MAAM,mBAAmB,GAAgB,QAAQ,CAAC;AAEzD,MAAM,CAAC,MAAM,yBAAyB,GAAG,sCAAsC,CAAC;AAEhF,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CAAC;AAE3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CAAC;AAE3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CAAC;AAE3E,MAAM,CAAC,MAAM,+BAA+B,GAAG,4CAA4C,CAAC;AAE5F,MAAM,CAAC,MAAM,4BAA4B,GAAG,iCAAiC,CAAC","sourcesContent":["import { ProductType } from './types/types';\n\nexport const appId = 'org.openedx.frontend.app.learnerDashboard';\n\nexport const HITS_PER_PAGE_PROGRAMS = 4;\nexport const HITS_PER_PAGE_COURSES = 4;\n\n/** Facet attribute names in ALGOLIA_PRODUCT_INDEX_NAME — update if your index differs */\nexport const FACET_PRODUCT_TYPE = 'product';\nexport const FACET_SUBJECTS = 'subjects';\n\nexport const PRODUCT_TYPE_PROGRAM: ProductType = 'program';\nexport const PRODUCT_TYPE_COURSE: ProductType = 'course';\n\nexport const subscriptionDashboardRole = 'org.edx.frontend.subs.role.dashboard';\n\nexport const subscriptionSignoutRole = 'org.openedx.frontend.role.signOut';\n\nexport const subscriptionAccountRole = 'org.openedx.frontend.role.account';\n\nexport const subscriptionProfileRole = 'org.openedx.frontend.role.profile';\n\nexport const subscriptionProgramProgressRole = 'org.edx.frontend.subs.role.programProgress';\n\nexport const subscriptionDashboardUrlPath = '/subscription-learner-dashboard';\n"]}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAG,2CAA2C,CAAC;AAEjE,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AACxC,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAEvC,yFAAyF;AACzF,MAAM,CAAC,MAAM,kBAAkB,GAAG,SAAS,CAAC;AAC5C,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;AAEzC,MAAM,CAAC,MAAM,oBAAoB,GAAgB,SAAS,CAAC;AAC3D,MAAM,CAAC,MAAM,mBAAmB,GAAgB,QAAQ,CAAC;AAEzD,MAAM,CAAC,MAAM,yBAAyB,GAAG,sCAAsC,CAAC;AAEhF,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CAAC;AAE3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CAAC;AAE3E,MAAM,CAAC,MAAM,uBAAuB,GAAG,mCAAmC,CAAC;AAE3E,MAAM,CAAC,MAAM,+BAA+B,GAAG,4CAA4C,CAAC;AAE5F,MAAM,CAAC,MAAM,4BAA4B,GAAG,iCAAiC,CAAC;AAE9E,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACzC,gBAAgB;IAChB,WAAW;IACX,sBAAsB;CACvB,CAAC","sourcesContent":["import { ProductType } from './types/types';\n\nexport const appId = 'org.openedx.frontend.app.learnerDashboard';\n\nexport const HITS_PER_PAGE_PROGRAMS = 4;\nexport const HITS_PER_PAGE_COURSES = 4;\n\n/** Facet attribute names in ALGOLIA_PRODUCT_INDEX_NAME — update if your index differs */\nexport const FACET_PRODUCT_TYPE = 'product';\nexport const FACET_SUBJECTS = 'subjects';\n\nexport const PRODUCT_TYPE_PROGRAM: ProductType = 'program';\nexport const PRODUCT_TYPE_COURSE: ProductType = 'course';\n\nexport const subscriptionDashboardRole = 'org.edx.frontend.subs.role.dashboard';\n\nexport const subscriptionSignoutRole = 'org.openedx.frontend.role.signOut';\n\nexport const subscriptionAccountRole = 'org.openedx.frontend.role.account';\n\nexport const subscriptionProfileRole = 'org.openedx.frontend.role.profile';\n\nexport const subscriptionProgramProgressRole = 'org.edx.frontend.subs.role.programProgress';\n\nexport const subscriptionDashboardUrlPath = '/subscription-learner-dashboard';\n\nexport const SUBSCRIPTION_ROUTE_PREFIXES = [\n '/subscription-',\n '/checkout',\n '/manage-subscription',\n];\n"]}
|
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { LinkMenuItem, WidgetOperationTypes, getAppConfig, } from '@openedx/frontend-base';
|
|
3
|
-
import { appId, subscriptionDashboardUrlPath, subscriptionSignoutRole, } from '../../constants';
|
|
3
|
+
import { appId, subscriptionDashboardUrlPath, subscriptionSignoutRole, SUBSCRIPTION_ROUTE_PREFIXES } from '../../constants';
|
|
4
4
|
import ConfirmEmailBanner from './ConfirmEmailBanner';
|
|
5
5
|
import ProgramsLinkMenuItem from './ProgramsLinkMenuItem';
|
|
6
6
|
import SupportLinkMenuItem from './SupportLinkMenuItem';
|
|
7
7
|
import OrderHistoryLinkMenuItem from './OrderHistoryLinkMenuItem';
|
|
8
8
|
import messages from '../../messages';
|
|
9
9
|
import CustomAvatarMenu from './CustomAvatarMenu';
|
|
10
|
+
const isSubscriptionContext = () => {
|
|
11
|
+
var _a;
|
|
12
|
+
if (typeof window === 'undefined') {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
const pathname = ((_a = window.location) === null || _a === void 0 ? void 0 : _a.pathname) || '';
|
|
16
|
+
// Add/remove prefixes based on your actual subscription routes
|
|
17
|
+
return SUBSCRIPTION_ROUTE_PREFIXES.some(prefix => pathname.startsWith(prefix));
|
|
18
|
+
};
|
|
10
19
|
const app = {
|
|
11
20
|
appId: 'org.openedx.frontend.app.learnerDashboard.header',
|
|
12
21
|
slots: [
|
|
@@ -15,6 +24,9 @@ const app = {
|
|
|
15
24
|
id: 'org.openedx.frontend.widget.learnerDashboard.headerConfirmEmail.v1',
|
|
16
25
|
op: WidgetOperationTypes.PREPEND,
|
|
17
26
|
component: ConfirmEmailBanner,
|
|
27
|
+
condition: {
|
|
28
|
+
callback: () => isSubscriptionContext(),
|
|
29
|
+
},
|
|
18
30
|
},
|
|
19
31
|
{
|
|
20
32
|
slotId: 'org.openedx.frontend.slot.header.primaryLinks.v1',
|
|
@@ -22,7 +34,7 @@ const app = {
|
|
|
22
34
|
op: WidgetOperationTypes.APPEND,
|
|
23
35
|
element: _jsx(ProgramsLinkMenuItem, { variant: "navLink" }),
|
|
24
36
|
condition: {
|
|
25
|
-
callback: () => getAppConfig(appId).ENABLE_PROGRAMS === true,
|
|
37
|
+
callback: () => getAppConfig(appId).ENABLE_PROGRAMS === true && isSubscriptionContext(),
|
|
26
38
|
},
|
|
27
39
|
},
|
|
28
40
|
{
|
|
@@ -31,7 +43,7 @@ const app = {
|
|
|
31
43
|
op: WidgetOperationTypes.APPEND,
|
|
32
44
|
element: _jsx(SupportLinkMenuItem, { variant: "dropdownItem" }),
|
|
33
45
|
condition: {
|
|
34
|
-
callback: () => (getAppConfig(appId).SUPPORT_URL
|
|
46
|
+
callback: () => Boolean(getAppConfig(appId).SUPPORT_URL) && isSubscriptionContext(),
|
|
35
47
|
},
|
|
36
48
|
},
|
|
37
49
|
{
|
|
@@ -41,7 +53,7 @@ const app = {
|
|
|
41
53
|
relatedId: 'org.openedx.frontend.widget.header.desktopAuthenticatedMenuLogout.v1',
|
|
42
54
|
element: _jsx(OrderHistoryLinkMenuItem, { variant: "navLink" }),
|
|
43
55
|
condition: {
|
|
44
|
-
callback: () => (getAppConfig(appId).ORDER_HISTORY_URL
|
|
56
|
+
callback: () => Boolean(getAppConfig(appId).ORDER_HISTORY_URL) && isSubscriptionContext(),
|
|
45
57
|
},
|
|
46
58
|
},
|
|
47
59
|
{
|
|
@@ -49,24 +61,36 @@ const app = {
|
|
|
49
61
|
id: 'org.edx.frontend.widget.learnerHome.headerLinkDashboard.v1',
|
|
50
62
|
op: WidgetOperationTypes.PREPEND,
|
|
51
63
|
element: (_jsx("div", { className: "px-3 dashboard-header-navlink", children: _jsx(LinkMenuItem, { label: messages['header.user.menu.dashboard'].defaultMessage, url: subscriptionDashboardUrlPath, variant: "hyperlink" }) })),
|
|
64
|
+
condition: {
|
|
65
|
+
callback: () => isSubscriptionContext(),
|
|
66
|
+
},
|
|
52
67
|
},
|
|
53
68
|
{
|
|
54
69
|
slotId: 'org.openedx.frontend.slot.header.authenticatedMenu.v1',
|
|
55
70
|
id: 'org.edx.frontend.widget.header.user.menu.manageSubscription.v1',
|
|
56
71
|
op: WidgetOperationTypes.APPEND,
|
|
57
72
|
element: (_jsx(LinkMenuItem, { label: messages['header.user.menu.manageSubscription'].defaultMessage, url: "/manage-subscription", variant: "dropdownItem" })),
|
|
73
|
+
condition: {
|
|
74
|
+
callback: () => isSubscriptionContext(),
|
|
75
|
+
},
|
|
58
76
|
},
|
|
59
77
|
{
|
|
60
78
|
slotId: 'org.openedx.frontend.slot.header.authenticatedMenu.v1',
|
|
61
79
|
id: 'org.edx.frontend.widget.learnerDashboard.headerAuthenticatedMenuSignOut.v1',
|
|
62
80
|
op: WidgetOperationTypes.APPEND,
|
|
63
81
|
element: (_jsx(LinkMenuItem, { label: messages['header.user.menu.signOut'].defaultMessage, role: subscriptionSignoutRole, variant: "dropdownItem" })),
|
|
82
|
+
condition: {
|
|
83
|
+
callback: () => isSubscriptionContext(),
|
|
84
|
+
},
|
|
64
85
|
},
|
|
65
86
|
{
|
|
66
87
|
slotId: 'org.openedx.frontend.slot.header.authenticatedMenu.v1',
|
|
67
88
|
id: 'org.edx.frontend.widget.learnerDashboard.dashboard.v1',
|
|
68
89
|
op: WidgetOperationTypes.PREPEND,
|
|
69
90
|
element: (_jsx(LinkMenuItem, { label: messages['header.user.menu.dashboard'].defaultMessage, url: subscriptionDashboardUrlPath, variant: "dropdownItem" })),
|
|
91
|
+
condition: {
|
|
92
|
+
callback: () => isSubscriptionContext(),
|
|
93
|
+
},
|
|
70
94
|
},
|
|
71
95
|
{
|
|
72
96
|
slotId: 'org.openedx.frontend.slot.header.desktopRight.v1',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/widgets/LearnerDashboardHeader/app.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,YAAY,EACZ,oBAAoB,EACpB,YAAY,GACb,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,KAAK,EACL,4BAA4B,EAC5B,uBAAuB,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/widgets/LearnerDashboardHeader/app.tsx"],"names":[],"mappings":";AAAA,OAAO,EAEL,YAAY,EACZ,oBAAoB,EACpB,YAAY,GACb,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,KAAK,EACL,4BAA4B,EAC5B,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,iBAAiB,CAAC;AAEzB,OAAO,kBAAkB,MAAM,sBAAsB,CAAC;AACtD,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAC1D,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,QAAQ,MAAM,eAAe,CAAC;AACrC,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,MAAM,qBAAqB,GAAG,GAAG,EAAE;;IACjC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,QAAQ,GAAG,CAAA,MAAA,MAAM,CAAC,QAAQ,0CAAE,QAAQ,KAAI,EAAE,CAAC;IAEjD,+DAA+D;IAC/D,OAAO,2BAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,KAAK,EAAE,kDAAkD;IACzD,KAAK,EAAE;QACL;YACE,MAAM,EAAE,0CAA0C;YAClD,EAAE,EAAE,oEAAoE;YACxE,EAAE,EAAE,oBAAoB,CAAC,OAAO;YAChC,SAAS,EAAE,kBAAkB;YAC7B,SAAS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,EACP,gEAAgE,EAAE,uBAAuB;YAC3F,OAAO,EAAE,KAAC,gBAAgB,KAAG;YAC7B,SAAS,EAAE;gBACT,aAAa,EAAE,IAAI;aACpB;SACF;QACD,IAAI;QACJ,8GAA8G;QAC9G,yDAAyD;QACzD,qEAAqE;QACrE,6FAA6F;QAC7F,sCAAsC;QACtC,eAAe;QACf,oBAAoB;QACpB,uEAAuE;QACvE,2BAA2B;QAC3B,+BAA+B;QAC/B,SAAS;QACT,MAAM;QACN,KAAK;KACN;CACF,CAAC;AAEF,eAAe,GAAG,CAAC","sourcesContent":["import {\n App,\n LinkMenuItem,\n WidgetOperationTypes,\n getAppConfig,\n} from '@openedx/frontend-base';\n\nimport {\n appId,\n subscriptionDashboardUrlPath,\n subscriptionSignoutRole,\n SUBSCRIPTION_ROUTE_PREFIXES\n} from '../../constants';\n\nimport ConfirmEmailBanner from './ConfirmEmailBanner';\nimport ProgramsLinkMenuItem from './ProgramsLinkMenuItem';\nimport SupportLinkMenuItem from './SupportLinkMenuItem';\nimport OrderHistoryLinkMenuItem from './OrderHistoryLinkMenuItem';\nimport messages from '@src/messages';\nimport CustomAvatarMenu from './CustomAvatarMenu';\n\nconst isSubscriptionContext = () => {\n if (typeof window === 'undefined') {\n return false;\n }\n const pathname = window.location?.pathname || '';\n\n // Add/remove prefixes based on your actual subscription routes\n return SUBSCRIPTION_ROUTE_PREFIXES.some(prefix => pathname.startsWith(prefix));\n};\n\nconst app: App = {\n appId: 'org.openedx.frontend.app.learnerDashboard.header',\n slots: [\n {\n slotId: 'org.openedx.frontend.slot.header.main.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerConfirmEmail.v1',\n op: WidgetOperationTypes.PREPEND,\n component: ConfirmEmailBanner,\n condition: {\n callback: () => isSubscriptionContext(),\n },\n },\n {\n slotId: 'org.openedx.frontend.slot.header.primaryLinks.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkPrograms.v1',\n op: WidgetOperationTypes.APPEND,\n element: <ProgramsLinkMenuItem variant=\"navLink\" />,\n condition: {\n callback: () => getAppConfig(appId).ENABLE_PROGRAMS === true && isSubscriptionContext(),\n },\n },\n {\n slotId: 'org.openedx.frontend.slot.header.authenticatedMenu.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkSupport.v1',\n op: WidgetOperationTypes.APPEND,\n element: <SupportLinkMenuItem variant=\"dropdownItem\" />,\n condition: {\n callback: () => Boolean(getAppConfig(appId).SUPPORT_URL) && isSubscriptionContext(),\n },\n },\n {\n slotId: 'org.openedx.frontend.slot.header.authenticatedMenu.v1',\n id: 'org.openedx.frontend.widget.learnerDashboard.headerLinkOrderHistory.v1',\n op: WidgetOperationTypes.INSERT_BEFORE,\n relatedId:\n 'org.openedx.frontend.widget.header.desktopAuthenticatedMenuLogout.v1',\n element: <OrderHistoryLinkMenuItem variant=\"navLink\" />,\n condition: {\n callback: () => Boolean(getAppConfig(appId).ORDER_HISTORY_URL) && isSubscriptionContext(),\n },\n },\n {\n slotId: 'org.openedx.frontend.slot.header.desktopRight.v1',\n id: 'org.edx.frontend.widget.learnerHome.headerLinkDashboard.v1',\n op: WidgetOperationTypes.PREPEND,\n element: (\n <div className=\"px-3 dashboard-header-navlink\">\n <LinkMenuItem\n label={messages['header.user.menu.dashboard'].defaultMessage}\n url={subscriptionDashboardUrlPath}\n variant=\"hyperlink\"\n />\n </div>\n ),\n condition: {\n callback: () => isSubscriptionContext(),\n },\n },\n {\n slotId: 'org.openedx.frontend.slot.header.authenticatedMenu.v1',\n id: 'org.edx.frontend.widget.header.user.menu.manageSubscription.v1',\n op: WidgetOperationTypes.APPEND,\n element: (\n <LinkMenuItem\n label={messages['header.user.menu.manageSubscription'].defaultMessage}\n url=\"/manage-subscription\"\n variant=\"dropdownItem\"\n />\n ),\n condition: {\n callback: () => isSubscriptionContext(),\n },\n },\n {\n slotId: 'org.openedx.frontend.slot.header.authenticatedMenu.v1',\n id: 'org.edx.frontend.widget.learnerDashboard.headerAuthenticatedMenuSignOut.v1',\n op: WidgetOperationTypes.APPEND,\n element: (\n <LinkMenuItem\n label={messages['header.user.menu.signOut'].defaultMessage}\n role={subscriptionSignoutRole}\n variant=\"dropdownItem\"\n />\n ),\n condition: {\n callback: () => isSubscriptionContext(),\n },\n },\n {\n slotId: 'org.openedx.frontend.slot.header.authenticatedMenu.v1',\n id: 'org.edx.frontend.widget.learnerDashboard.dashboard.v1',\n op: WidgetOperationTypes.PREPEND,\n element: (\n <LinkMenuItem\n label={messages['header.user.menu.dashboard'].defaultMessage}\n url={subscriptionDashboardUrlPath}\n variant=\"dropdownItem\"\n />\n ),\n condition: {\n callback: () => isSubscriptionContext(),\n },\n },\n {\n slotId: 'org.openedx.frontend.slot.header.desktopRight.v1',\n id: 'org.openedx.frontend.widget.header.desktopAuthenticatedMenu.v1',\n op: WidgetOperationTypes.REPLACE,\n relatedId:\n 'org.openedx.frontend.widget.header.desktopAuthenticatedMenu.v1', // Required for REPLACE\n element: <CustomAvatarMenu />,\n condition: {\n authenticated: true,\n },\n },\n // {\n // // TO-DO : Resume your last course will be implemented seprately in a different ticket.(Ticket: SUBS-818)\n // // https://2u-internal.atlassian.net/browse/SUBS-818\n // slotId: 'org.openedx.frontend.slot.header.authenticatedMenu.v1',\n // id: 'org.openedx.frontend.widget.learnerDashboard.headerAuthenticatedMenuLastCourse.v1',\n // op: WidgetOperationTypes.PREPEND,\n // element: (\n // <LinkMenuItem\n // label={messages['header.user.menu.lastCourse'].defaultMessage}\n // url=\"/last-course\"\n // variant=\"dropdownItem\"\n // />\n // )\n // },\n ],\n};\n\nexport default app;\n"]}
|