@edx/frontend-app-subscription-learner-dashboard 1.22.0 → 1.24.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.
Files changed (87) hide show
  1. package/dist/containers/Dashboard/index.js +2 -1
  2. package/dist/containers/Dashboard/index.js.map +1 -1
  3. package/dist/containers/PopularCoursePanel/index.js +3 -2
  4. package/dist/containers/PopularCoursePanel/index.js.map +1 -1
  5. package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/index.d.ts +3 -0
  6. package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/index.js +9 -0
  7. package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/index.js.map +1 -0
  8. package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/messages.d.ts +8 -0
  9. package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/messages.js +10 -0
  10. package/dist/containers/PopularProgramsPanel/NoPopularProgramItems/messages.js.map +1 -0
  11. package/dist/containers/PopularProgramsPanel/PopularPrograms/index.d.ts +4 -0
  12. package/dist/containers/PopularProgramsPanel/PopularPrograms/index.js +7 -0
  13. package/dist/containers/PopularProgramsPanel/PopularPrograms/index.js.map +1 -0
  14. package/dist/containers/PopularProgramsPanel/index.d.ts +3 -0
  15. package/dist/containers/PopularProgramsPanel/index.js +22 -0
  16. package/dist/containers/PopularProgramsPanel/index.js.map +1 -0
  17. package/dist/containers/PopularProgramsPanel/messages.d.ts +13 -0
  18. package/dist/containers/PopularProgramsPanel/messages.js +15 -0
  19. package/dist/containers/PopularProgramsPanel/messages.js.map +1 -0
  20. package/dist/containers/ProductCard/index.js +1 -1
  21. package/dist/containers/ProductCard/index.js.map +1 -1
  22. package/dist/containers/SubscriptionInformation/components/SubscriptionInformation.js +56 -9
  23. package/dist/containers/SubscriptionInformation/components/SubscriptionInformation.js.map +1 -1
  24. package/dist/containers/SubscriptionInformation/index.scss +24 -3
  25. package/dist/containers/SubscriptionInformation/messages.d.ts +30 -0
  26. package/dist/containers/SubscriptionInformation/messages.js +30 -0
  27. package/dist/containers/SubscriptionInformation/messages.js.map +1 -1
  28. package/dist/hooks/{usePopularCourses.d.ts → usePopularCoursesAndPrograms.d.ts} +1 -1
  29. package/dist/hooks/{usePopularCourses.js → usePopularCoursesAndPrograms.js} +6 -6
  30. package/dist/hooks/usePopularCoursesAndPrograms.js.map +1 -0
  31. package/dist/slots.js +2 -0
  32. package/dist/slots.js.map +1 -1
  33. package/dist/widgets/LearnerDashboardHeader/app.js +0 -14
  34. package/dist/widgets/LearnerDashboardHeader/app.js.map +1 -1
  35. package/dist/widgets/ProgressiveProfilingQuiz/app.js +10 -0
  36. package/dist/widgets/ProgressiveProfilingQuiz/app.js.map +1 -1
  37. package/dist/widgets/ProgressiveProfilingQuiz/data/constants.d.ts +7 -0
  38. package/dist/widgets/ProgressiveProfilingQuiz/data/constants.js +7 -0
  39. package/dist/widgets/ProgressiveProfilingQuiz/data/constants.js.map +1 -0
  40. package/dist/widgets/ProgressiveProfilingQuiz/data/index.d.ts +1 -0
  41. package/dist/widgets/ProgressiveProfilingQuiz/data/index.js +1 -0
  42. package/dist/widgets/ProgressiveProfilingQuiz/data/index.js.map +1 -1
  43. package/dist/widgets/ProgressiveProfilingQuiz/modal/index.d.ts +4 -0
  44. package/dist/widgets/ProgressiveProfilingQuiz/modal/index.js +14 -0
  45. package/dist/widgets/ProgressiveProfilingQuiz/modal/index.js.map +1 -0
  46. package/dist/widgets/ProgressiveProfilingQuiz/modal/index.scss +3 -0
  47. package/dist/widgets/ProgressiveProfilingQuiz/modal/messages.d.ts +8 -0
  48. package/dist/widgets/ProgressiveProfilingQuiz/modal/messages.js +10 -0
  49. package/dist/widgets/ProgressiveProfilingQuiz/modal/messages.js.map +1 -0
  50. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/index.d.ts +3 -0
  51. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/index.js +22 -0
  52. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/index.js.map +1 -0
  53. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/BaseStep.d.ts +10 -0
  54. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/BaseStep.js +24 -0
  55. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/BaseStep.js.map +1 -0
  56. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/messages.d.ts +18 -0
  57. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/messages.js +20 -0
  58. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/messages.js.map +1 -0
  59. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.d.ts +3 -0
  60. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.js +15 -0
  61. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/index.js.map +1 -0
  62. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/messages.d.ts +13 -0
  63. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/messages.js +15 -0
  64. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-interests-declared/messages.js.map +1 -0
  65. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/index.d.ts +3 -0
  66. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/index.js +14 -0
  67. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/index.js.map +1 -0
  68. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/messages.d.ts +23 -0
  69. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/messages.js +25 -0
  70. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-goal/messages.js.map +1 -0
  71. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/index.d.ts +3 -0
  72. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/index.js +15 -0
  73. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/index.js.map +1 -0
  74. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/messages.d.ts +13 -0
  75. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/messages.js +15 -0
  76. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-learning-motivation/messages.js.map +1 -0
  77. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/index.d.ts +3 -0
  78. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/index.js +15 -0
  79. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/index.js.map +1 -0
  80. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.d.ts +18 -0
  81. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.js +20 -0
  82. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.js.map +1 -0
  83. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/test.utils.d.ts +2 -0
  84. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/test.utils.js +7 -0
  85. package/dist/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/test.utils.js.map +1 -0
  86. package/package.json +1 -1
  87. package/dist/hooks/usePopularCourses.js.map +0 -1
@@ -0,0 +1,18 @@
1
+ declare const messages: {
2
+ title: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ question: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ viewResultsButton: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ };
18
+ export default messages;
@@ -0,0 +1,20 @@
1
+ import { defineMessages } from '@openedx/frontend-base';
2
+ const messages = defineMessages({
3
+ title: {
4
+ id: 'progressiveProfilingQuiz.stepper.workStatus.title',
5
+ defaultMessage: 'Work Status',
6
+ description: 'Title for the work status step of the progressive profiling quiz',
7
+ },
8
+ question: {
9
+ id: 'progressiveProfilingQuiz.stepper.workStatus.question',
10
+ defaultMessage: 'What is your current role?',
11
+ description: 'Question asked in the work status step of the progressive profiling quiz',
12
+ },
13
+ viewResultsButton: {
14
+ id: 'progressiveProfilingQuiz.stepper.workStatus.viewResultsButton',
15
+ defaultMessage: 'View Results',
16
+ description: 'Label for the button to complete the quiz and view results from the work status step',
17
+ },
18
+ });
19
+ export default messages;
20
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../../../../../../src/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/step-work-status/messages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,QAAQ,GAAG,cAAc,CAAC;IAC9B,KAAK,EAAE;QACL,EAAE,EAAE,mDAAmD;QACvD,cAAc,EAAE,aAAa;QAC7B,WAAW,EAAE,kEAAkE;KAChF;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,sDAAsD;QAC1D,cAAc,EAAE,4BAA4B;QAC5C,WAAW,EAAE,0EAA0E;KACxF;IACD,iBAAiB,EAAE;QACjB,EAAE,EAAE,+DAA+D;QACnE,cAAc,EAAE,cAAc;QAC9B,WAAW,EAAE,sFAAsF;KACpG;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC","sourcesContent":["import { defineMessages } from '@openedx/frontend-base';\n\nconst messages = defineMessages({\n title: {\n id: 'progressiveProfilingQuiz.stepper.workStatus.title',\n defaultMessage: 'Work Status',\n description: 'Title for the work status step of the progressive profiling quiz',\n },\n question: {\n id: 'progressiveProfilingQuiz.stepper.workStatus.question',\n defaultMessage: 'What is your current role?',\n description: 'Question asked in the work status step of the progressive profiling quiz',\n },\n viewResultsButton: {\n id: 'progressiveProfilingQuiz.stepper.workStatus.viewResultsButton',\n defaultMessage: 'View Results',\n description: 'Label for the button to complete the quiz and view results from the work status step',\n },\n});\n\nexport default messages;\n"]}
@@ -0,0 +1,2 @@
1
+ import { ReactElement } from 'react';
2
+ export declare const renderStep: (step: ReactElement, activeKey: string, intlMessages?: Record<string, string>) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { render } from '@testing-library/react';
3
+ import { IntlProvider } from '@openedx/frontend-base';
4
+ import { Stepper } from '@openedx/paragon';
5
+ import { ProgressiveProfilingQuizProvider } from '../../../../../widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider';
6
+ export const renderStep = (step, activeKey, intlMessages = {}) => render(_jsx(IntlProvider, { locale: "en", messages: intlMessages, children: _jsx(ProgressiveProfilingQuizProvider, { children: _jsx(Stepper, { activeKey: activeKey, children: step }) }) }));
7
+ //# sourceMappingURL=test.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test.utils.js","sourceRoot":"","sources":["../../../../../../src/widgets/ProgressiveProfilingQuiz/modal/stepper/steps/test.utils.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,wEAAwE,CAAC;AAE1H,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,IAAkB,EAClB,SAAiB,EACjB,eAAuC,EAAE,EACzC,EAAE,CAAC,MAAM,CACT,KAAC,YAAY,IAAC,MAAM,EAAC,IAAI,EAAC,QAAQ,EAAE,YAAY,YAC9C,KAAC,gCAAgC,cAC/B,KAAC,OAAO,IAAC,SAAS,EAAE,SAAS,YAC1B,IAAI,GACG,GACuB,GACtB,CAChB,CAAC","sourcesContent":["import { ReactElement } from 'react';\nimport { render } from '@testing-library/react';\nimport { IntlProvider } from '@openedx/frontend-base';\nimport { Stepper } from '@openedx/paragon';\n\nimport { ProgressiveProfilingQuizProvider } from '@src/widgets/ProgressiveProfilingQuiz/ProgressiveProfilingQuizProvider';\n\nexport const renderStep = (\n step: ReactElement,\n activeKey: string,\n intlMessages: Record<string, string> = {},\n) => render(\n <IntlProvider locale=\"en\" messages={intlMessages}>\n <ProgressiveProfilingQuizProvider>\n <Stepper activeKey={activeKey}>\n {step}\n </Stepper>\n </ProgressiveProfilingQuizProvider>\n </IntlProvider>,\n);\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edx/frontend-app-subscription-learner-dashboard",
3
- "version": "1.22.0",
3
+ "version": "1.24.0",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1 +0,0 @@
1
- {"version":3,"file":"usePopularCourses.js","sourceRoot":"","sources":["../../src/hooks/usePopularCourses.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,QAAQ,EAAkB,MAAM,uBAAuB,CAAC;AAGjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAG/D,iFAAiF;AACjF,oDAAoD;AAEpD,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,GAAG,EAAE,CAAC,QAAQ,CAAU;IACxB,QAAQ,EAAE,CAAC,KAAa,EAAE,IAAc,EAAE,EAAE,CAC1C,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,CAAU;IACvD,OAAO,EAAE,CAAC,KAAa,EAAE,IAAc,EAAE,IAAY,EAAE,EAAE,CACvD,CAAC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C,iBAAiB,EAAE,MAAA,UAAU,CAAC,iBAAiB,mCAAI,SAAS;gBAC5D,KAAK,EAAE,MAAA,UAAU,CAAC,KAAK,mCAAI,SAAS;aACrC,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAA;IACD,OAAO,EAAE,CAAC,CAAC,YAAY,IAAI,OAAO;IAClC,SAAS,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE;CAC1B,CAAC,CAAC","sourcesContent":["import { useQuery, UseQueryResult } from '@tanstack/react-query';\nimport { SearchClient } from 'algoliasearch';\nimport { ProductType } from '@src/types/types';\nimport { PRODUCT_TYPE_COURSE } from '@src/constants';\nimport { fetchPopularProducts } from '@src/utils/algoliaUtils';\nimport { ProductCardItem } from '@src/containers/ProductCard/data/types';\n\n// ─── Query key factories ──────────────────────────────────────────────────────\n// Centralised so cache invalidation is never a typo\n\nexport const searchKeys = {\n all: ['search'] as const,\n programs: (query: string, tags: string[]) =>\n [...searchKeys.all, 'programs', query, tags] as const,\n courses: (query: string, tags: string[], page: number) =>\n [...searchKeys.all, 'courses', query, tags, page] as const,\n popular: (productType: ProductType, limit: number) =>\n [...searchKeys.all, 'popular', productType, limit] as const,\n};\n\nexport const usePopularCoursesData = (\n searchClient: SearchClient | null,\n enabled: boolean,\n): UseQueryResult<ProductCardItem[]> =>\n useQuery({\n queryKey: searchKeys.popular(PRODUCT_TYPE_COURSE, 4),\n queryFn: async () => {\n const hits = await fetchPopularProducts(searchClient!, PRODUCT_TYPE_COURSE, 4);\n return hits.map((hit): ProductCardItem => {\n const hitDetails = hit as {\n short_description?: string,\n primary_description?: string,\n description?: string,\n marketing_url?: string,\n image_url?: string,\n card_image_url?: string,\n organization_logo_override?: string,\n content_type?: string,\n type?: string,\n partner?: string,\n weeks_to_complete?: number,\n level?: string,\n };\n\n return {\n objectID: hit.objectID,\n title: hit.title ?? hit.name ?? 'Untitled',\n primary_description: hitDetails.primary_description ?? hitDetails.short_description ?? hitDetails.description ?? '',\n url: hitDetails.card_image_url ?? hitDetails.image_url ?? hitDetails.marketing_url ?? '',\n thumbnail: hitDetails.organization_logo_override ?? '',\n content_type: hitDetails.content_type ?? hitDetails.type ?? 'Course',\n product: 'Course',\n partner: hitDetails.partner ?? '',\n weeks_to_complete: hitDetails.weeks_to_complete ?? undefined,\n level: hitDetails.level ?? undefined,\n };\n });\n },\n enabled: !!searchClient && enabled,\n staleTime: 1000 * 60 * 10,\n });\n"]}