@openedx/frontend-app-catalog 1.0.0-alpha.1 → 1.0.0-alpha.3

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 (66) hide show
  1. package/README.rst +11 -3
  2. package/dist/app.js +3 -11
  3. package/dist/app.js.map +1 -1
  4. package/dist/catalog/CatalogPage.js +3 -3
  5. package/dist/catalog/CatalogPage.js.map +1 -1
  6. package/dist/catalog/hooks/types.js.map +1 -1
  7. package/dist/catalog/types.js.map +1 -1
  8. package/dist/config.d.ts +10 -0
  9. package/dist/config.js +23 -0
  10. package/dist/config.js.map +1 -0
  11. package/dist/course-about/CourseAboutPage.js +3 -3
  12. package/dist/course-about/CourseAboutPage.js.map +1 -1
  13. package/dist/course-about/course-intro/components/EnrolledStatus.js +2 -1
  14. package/dist/course-about/course-intro/components/EnrolledStatus.js.map +1 -1
  15. package/dist/course-about/course-intro/components/types.js.map +1 -1
  16. package/dist/course-about/course-intro/course-media/types.js.map +1 -1
  17. package/dist/course-about/course-intro/hooks/types.js.map +1 -1
  18. package/dist/course-about/course-intro/hooks/useEnrollmentStatus.js +3 -2
  19. package/dist/course-about/course-intro/hooks/useEnrollmentStatus.js.map +1 -1
  20. package/dist/course-about/course-intro/utils.d.ts +3 -2
  21. package/dist/course-about/course-intro/utils.js +7 -4
  22. package/dist/course-about/course-intro/utils.js.map +1 -1
  23. package/dist/course-about/course-overview/types.js.map +1 -1
  24. package/dist/course-about/course-sidebar/sidebar-details/types.js.map +1 -1
  25. package/dist/course-about/course-sidebar/sidebar-social/types.js.map +1 -1
  26. package/dist/course-about/course-sidebar/sidebar-social/utils.js +3 -3
  27. package/dist/course-about/course-sidebar/sidebar-social/utils.js.map +1 -1
  28. package/dist/course-about/data/types.js.map +1 -1
  29. package/dist/course-about/types.js.map +1 -1
  30. package/dist/data/course-list-search/api.js +12 -1
  31. package/dist/data/course-list-search/api.js.map +1 -1
  32. package/dist/data/course-list-search/hooks.js +7 -6
  33. package/dist/data/course-list-search/hooks.js.map +1 -1
  34. package/dist/data/course-list-search/types.js.map +1 -1
  35. package/dist/generic/alert-notification/types.js.map +1 -1
  36. package/dist/generic/course-card/types.js.map +1 -1
  37. package/dist/generic/loading-spinner/types.js.map +1 -1
  38. package/dist/generic/sub-header/types.js.map +1 -1
  39. package/dist/generic/video-modal/types.js.map +1 -1
  40. package/dist/home/components/courses-list/CoursesList.js +3 -2
  41. package/dist/home/components/courses-list/CoursesList.js.map +1 -1
  42. package/dist/home/components/home-banner/HomeBanner.js +2 -1
  43. package/dist/home/components/home-banner/HomeBanner.js.map +1 -1
  44. package/dist/home/components/home-banner/types.js.map +1 -1
  45. package/dist/slots/CourseAboutCourseImageSlot/index.js.map +1 -1
  46. package/dist/slots/CourseAboutCourseMediaSlot/index.js.map +1 -1
  47. package/dist/slots/CourseAboutEnrollmentButtonSlot/index.js.map +1 -1
  48. package/dist/slots/CourseAboutIntroSlot/index.js.map +1 -1
  49. package/dist/slots/CourseAboutIntroVideoSlots/CourseAboutIntroVideoButtonSlot/index.js.map +1 -1
  50. package/dist/slots/CourseAboutIntroVideoSlots/CourseAboutIntroVideoModalContentSlot/index.js.map +1 -1
  51. package/dist/slots/CourseAboutIntroVideoSlots/CourseAboutIntroVideoModalSlot/index.js.map +1 -1
  52. package/dist/slots/CourseAboutOverviewSlot/index.js.map +1 -1
  53. package/dist/slots/CourseAboutSidebarCoursePriceSlot/index.js.map +1 -1
  54. package/dist/slots/CourseAboutSidebarSlot/index.js.map +1 -1
  55. package/dist/slots/CourseAboutSidebarSocialSlot/index.js.map +1 -1
  56. package/dist/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableCardViewSlot/CourseCatalogDataTableCourseCardSlot/index.js.map +1 -1
  57. package/dist/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableCardViewSlot/index.js.map +1 -1
  58. package/dist/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableControlBarSlot/index.js.map +1 -1
  59. package/dist/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableSlot/index.js.map +1 -1
  60. package/dist/slots/CourseCatalogIntroSlot/index.js.map +1 -1
  61. package/dist/slots/CourseCatalogSearchFieldSlot/index.js.map +1 -1
  62. package/dist/slots/HomeCourseCardSlot/index.js.map +1 -1
  63. package/dist/slots/HomePromoVideoSlots/HomePromoVideoButtonSlot/index.js.map +1 -1
  64. package/dist/slots/HomePromoVideoSlots/HomePromoVideoModalContentSlot/index.js.map +1 -1
  65. package/dist/slots/HomePromoVideoSlots/HomePromoVideoModalSlot/index.js.map +1 -1
  66. package/package.json +2 -2
package/README.rst CHANGED
@@ -120,9 +120,15 @@ resolution. When you are done, unmount with
120
120
  Configuration
121
121
  =============
122
122
 
123
- The catalog app declares the following ``AppConfig`` fields (defaults
124
- live in ``src/app.ts``). Sites can override any of them by spreading
125
- over ``catalogApp.config`` in ``site.config.*.tsx``:
123
+ ``getAppConfig`` resolves three sources, in order of increasing
124
+ precedence: the app's bundled ``defaultConfig``, the site's
125
+ ``commonAppConfig``, and the app's ``config``. The first is the app
126
+ author's, at build time; the other two are the operator's, the second
127
+ applying to every app on the site and the third to this app alone.
128
+
129
+ Catalog bundles exactly one default, ``HOMEPAGE_COURSE_MAX: 9``.
130
+
131
+ These are the all the fields the app reads:
126
132
 
127
133
  .. list-table::
128
134
  :header-rows: 1
@@ -149,6 +155,8 @@ over ``catalogApp.config`` in ``site.config.*.tsx``:
149
155
  - URL of the support / help page linked from the catalog.
150
156
  * - ``LEARNING_BASE_URL``
151
157
  - Base URL for course-outline links from the course-about page.
158
+ Required by the course-about "View course" button, which is not
159
+ rendered when this is unset.
152
160
  * - ``COURSE_ABOUT_TWITTER_ACCOUNT``
153
161
  - Twitter handle used by the course-about sidebar's share widget.
154
162
 
package/dist/app.js CHANGED
@@ -1,21 +1,13 @@
1
1
  import { appId } from './constants';
2
2
  import routes from './routes';
3
3
  import slots from './slots';
4
+ import { DEFAULT_COURSES_COUNT } from './home/constants';
4
5
  const app = {
5
6
  appId,
6
7
  routes,
7
8
  slots,
8
- config: {
9
- ENABLE_COURSE_DISCOVERY: false,
10
- ENABLE_PROGRAMS: false,
11
- HOMEPAGE_PROMO_VIDEO_YOUTUBE_ID: '',
12
- HOMEPAGE_COURSE_MAX: 9,
13
- ENABLE_COURSE_SORTING_BY_START_DATE: false,
14
- NON_BROWSABLE_COURSES: '',
15
- INFO_EMAIL: '',
16
- SUPPORT_URL: '',
17
- LEARNING_BASE_URL: '',
18
- COURSE_ABOUT_TWITTER_ACCOUNT: '',
9
+ defaultConfig: {
10
+ HOMEPAGE_COURSE_MAX: DEFAULT_COURSES_COUNT,
19
11
  },
20
12
  };
21
13
  export default app;
package/dist/app.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,MAAM,YAAY,CAAC;AAE/B,MAAM,GAAG,GAAQ;IACf,KAAK;IACL,MAAM;IACN,KAAK;IACL,MAAM,EAAE;QACN,uBAAuB,EAAE,KAAK;QAC9B,eAAe,EAAE,KAAK;QACtB,+BAA+B,EAAE,EAAE;QACnC,mBAAmB,EAAE,CAAC;QACtB,mCAAmC,EAAE,KAAK;QAC1C,qBAAqB,EAAE,EAAE;QACzB,UAAU,EAAE,EAAE;QACd,WAAW,EAAE,EAAE;QACf,iBAAiB,EAAE,EAAE;QACrB,4BAA4B,EAAE,EAAE;KACjC;CACF,CAAC;AAEF,eAAe,GAAG,CAAC","sourcesContent":["import { App } from '@openedx/frontend-base';\nimport { appId } from '@src/constants';\nimport routes from '@src/routes';\nimport slots from '@src/slots';\n\nconst app: App = {\n appId,\n routes,\n slots,\n config: {\n ENABLE_COURSE_DISCOVERY: false,\n ENABLE_PROGRAMS: false,\n HOMEPAGE_PROMO_VIDEO_YOUTUBE_ID: '',\n HOMEPAGE_COURSE_MAX: 9,\n ENABLE_COURSE_SORTING_BY_START_DATE: false,\n NON_BROWSABLE_COURSES: '',\n INFO_EMAIL: '',\n SUPPORT_URL: '',\n LEARNING_BASE_URL: '',\n COURSE_ABOUT_TWITTER_ACCOUNT: '',\n },\n};\n\nexport default app;\n"]}
1
+ {"version":3,"file":"app.js","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,MAAM,GAAG,GAAQ;IACf,KAAK;IACL,MAAM;IACN,KAAK;IACL,aAAa,EAAE;QACb,mBAAmB,EAAE,qBAAqB;KAC3C;CACF,CAAC;AAEF,eAAe,GAAG,CAAC","sourcesContent":["import { App } from '@openedx/frontend-base';\nimport { appId } from '@src/constants';\nimport routes from '@src/routes';\nimport slots from '@src/slots';\nimport { DEFAULT_COURSES_COUNT } from '@src/home/constants';\n\nconst app: App = {\n appId,\n routes,\n slots,\n defaultConfig: {\n HOMEPAGE_COURSE_MAX: DEFAULT_COURSES_COUNT,\n },\n};\n\nexport default app;\n"]}
@@ -2,9 +2,9 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import { useEffect, useMemo } from 'react';
3
3
  import { Helmet } from 'react-helmet';
4
4
  import { Container, Alert } from '@openedx/paragon';
5
- import { ErrorPage, getAppConfig, getSiteConfig, useIntl, } from '@openedx/frontend-base';
5
+ import { ErrorPage, getSiteConfig, useIntl, } from '@openedx/frontend-base';
6
6
  import { useSearchParams } from 'react-router-dom';
7
- import { appId } from '../constants';
7
+ import { getStringConfig } from '../config';
8
8
  import { DEFAULT_PAGE_SIZE } from '../data/course-list-search/constants';
9
9
  import { useCourseListSearch } from '../data/course-list-search/hooks';
10
10
  import CourseCatalogIntroSlot from '../slots/CourseCatalogIntroSlot';
@@ -50,7 +50,7 @@ const CatalogPage = () => {
50
50
  , {
51
51
  // @ts-expect-error frontend-base ErrorPage declares message?: null but renders the prop as text. Remove when typing is fixed upstream.
52
52
  message: intl.formatMessage(messages.errorMessage, {
53
- supportEmail: getAppConfig(appId).INFO_EMAIL,
53
+ supportEmail: getStringConfig('INFO_EMAIL'),
54
54
  }) }) }) }));
55
55
  }
56
56
  const totalCourses = (_b = (_a = displayData === null || displayData === void 0 ? void 0 : displayData.results) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
@@ -1 +1 @@
1
- {"version":3,"file":"CatalogPage.js","sourceRoot":"","sources":["../../src/catalog/CatalogPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,OAAO,GAChD,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,sBAAsB,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,4BAA4B,MAAM,yCAAyC,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE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AAM,UAAU,GAAG,YAAY,GAAG,CAAC,IAAI,CAAC,MAAA,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,KAAK,mCAAI,CAAC,CAAC,GAAG,CAAC,CAAC;IAE5E,OAAO,CACL,8BACE,KAAC,MAAM,cACL,0BACG,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,SAAS,EAAE;wBACtC,QAAQ,EAAE,aAAa,EAAE,CAAC,QAAQ;qBACnC,CAAC,GACI,GACD,EACT,MAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,aAAa,aACxD,KAAC,sBAAsB,IAAC,YAAY,EAAE,YAAY,EAAE,uBAAuB,EAAE,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,0CAAE,MAAM,GAAI,EAC3G,UAAU,CAAC,CAAC,CAAC,CACZ,8BACE,KAAC,4BAA4B,IAC3B,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,YAAY,GAChC,EACF,KAAC,0BAA0B,IACzB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,GAChC,IACD,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,iBAAiB,IAChB,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EACtD,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,yBAAyB,CAAC,GAC/D,CACH,IACS,IACX,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { useEffect, useMemo } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { Container, Alert } from '@openedx/paragon';\nimport {\n ErrorPage, getAppConfig, getSiteConfig, useIntl,\n} from '@openedx/frontend-base';\nimport { useSearchParams } from 'react-router-dom';\n\nimport { appId } from '@src/constants';\nimport { DEFAULT_PAGE_SIZE } from '@src/data/course-list-search/constants';\nimport { useCourseListSearch } from '@src/data/course-list-search/hooks';\nimport CourseCatalogIntroSlot from '@src/slots/CourseCatalogIntroSlot';\nimport { CourseCatalogDataTableSlot } from '@src/slots/CourseCatalogDataTableSlots';\nimport CourseCatalogSearchFieldSlot from '@src/slots/CourseCatalogSearchFieldSlot';\nimport { useDebouncedSearchInput } from './hooks/useDebouncedSearchInput';\nimport { AlertNotification, Loading } from '../generic';\nimport { useCatalog } from './hooks/useCatalog';\nimport messages from './messages';\nimport { transformAggregationsToFilterChoices } from './utils';\n\nconst CatalogPage = () => {\n const intl = useIntl();\n const [searchParams, setSearchParams] = useSearchParams();\n const searchQuery = searchParams.get('search_query') || '';\n const {\n data: courseData,\n isLoading,\n isError,\n fetchData,\n isFetching,\n } = useCourseListSearch({ searchString: searchQuery });\n\n const {\n pageIndex,\n filterState,\n searchString,\n hasInitializedFromUrl,\n urlSearchQuery,\n previousCourseData,\n handleSearch,\n handleFetchData,\n resetFilterProgress,\n } = useCatalog({\n fetchData, courseData, isFetching, searchParams, setSearchParams,\n });\n\n const { setSearchInput } = useDebouncedSearchInput({\n searchString,\n handleSearch,\n });\n\n const displayData = useMemo(() => {\n const hasSearchResults = (courseData?.results?.length ?? 0) > 0;\n const hasActiveSearch = Boolean(searchString);\n\n const shouldShowPreviousData = hasActiveSearch && !hasSearchResults && previousCourseData;\n\n return shouldShowPreviousData ? previousCourseData : courseData;\n }, [courseData, searchString, previousCourseData]);\n\n useEffect(() => {\n if (!isFetching && filterState.isFilterChangeInProgress) {\n resetFilterProgress();\n }\n }, [isFetching, filterState.isFilterChangeInProgress, resetFilterProgress]);\n\n const tableColumns = useMemo(\n () => transformAggregationsToFilterChoices(displayData?.aggs, intl),\n [displayData?.aggs, intl],\n );\n\n if (isLoading || (!hasInitializedFromUrl && urlSearchQuery)) {\n return (\n <Loading />\n );\n }\n\n if (isError) {\n return (\n <Container className=\"py-5.5\">\n <Alert variant=\"danger\">\n <ErrorPage\n // @ts-expect-error frontend-base ErrorPage declares message?: null but renders the prop as text. Remove when typing is fixed upstream.\n message={intl.formatMessage(messages.errorMessage, {\n supportEmail: getAppConfig(appId).INFO_EMAIL as string,\n })}\n />\n </Alert>\n </Container>\n );\n }\n\n const totalCourses = displayData?.results?.length ?? 0;\n const pageCount = Math.ceil((displayData?.total || totalCourses) / DEFAULT_PAGE_SIZE);\n const hasCourses = totalCourses > 0 || (previousCourseData?.total ?? 0) > 0;\n\n return (\n <>\n <Helmet>\n <title>\n {intl.formatMessage(messages.pageTitle, {\n siteName: getSiteConfig().siteName,\n })}\n </title>\n </Helmet>\n <Container fluid={false} size=\"xl\" className=\"pt-5.5 mb-6\">\n <CourseCatalogIntroSlot searchString={searchString} courseDataResultsLength={courseData?.results?.length} />\n {hasCourses ? (\n <>\n <CourseCatalogSearchFieldSlot\n setSearchInput={setSearchInput}\n handleSearch={handleSearch}\n initialSearchValue={searchString}\n />\n <CourseCatalogDataTableSlot\n displayData={displayData}\n totalCourses={totalCourses}\n pageCount={pageCount}\n pageIndex={pageIndex}\n tableColumns={tableColumns}\n handleFetchData={handleFetchData}\n />\n </>\n ) : (\n <AlertNotification\n title={intl.formatMessage(messages.noCoursesAvailable)}\n message={intl.formatMessage(messages.noCoursesAvailableMessage)}\n />\n )}\n </Container>\n </>\n );\n};\n\nexport default CatalogPage;\n"]}
1
+ {"version":3,"file":"CatalogPage.js","sourceRoot":"","sources":["../../src/catalog/CatalogPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EACL,SAAS,EAAE,aAAa,EAAE,OAAO,GACl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,YAAY,EAC1B,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,eAAe,EAAE,eAAe,GAChC,IACD,CACJ,CAAC,CAAC,CAAC,CACF,KAAC,iBAAiB,IAChB,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EACtD,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,yBAAyB,CAAC,GAC/D,CACH,IACS,IACX,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { useEffect, useMemo } from 'react';\nimport { Helmet } from 'react-helmet';\nimport { Container, Alert } from '@openedx/paragon';\nimport {\n ErrorPage, getSiteConfig, useIntl,\n} from '@openedx/frontend-base';\nimport { useSearchParams } from 'react-router-dom';\n\nimport { getStringConfig } from '@src/config';\nimport { DEFAULT_PAGE_SIZE } from '@src/data/course-list-search/constants';\nimport { useCourseListSearch } from '@src/data/course-list-search/hooks';\nimport CourseCatalogIntroSlot from '@src/slots/CourseCatalogIntroSlot';\nimport { CourseCatalogDataTableSlot } from '@src/slots/CourseCatalogDataTableSlots';\nimport CourseCatalogSearchFieldSlot from '@src/slots/CourseCatalogSearchFieldSlot';\nimport { useDebouncedSearchInput } from './hooks/useDebouncedSearchInput';\nimport { AlertNotification, Loading } from '../generic';\nimport { useCatalog } from './hooks/useCatalog';\nimport messages from './messages';\nimport { transformAggregationsToFilterChoices } from './utils';\n\nconst CatalogPage = () => {\n const intl = useIntl();\n const [searchParams, setSearchParams] = useSearchParams();\n const searchQuery = searchParams.get('search_query') || '';\n const {\n data: courseData,\n isLoading,\n isError,\n fetchData,\n isFetching,\n } = useCourseListSearch({ searchString: searchQuery });\n\n const {\n pageIndex,\n filterState,\n searchString,\n hasInitializedFromUrl,\n urlSearchQuery,\n previousCourseData,\n handleSearch,\n handleFetchData,\n resetFilterProgress,\n } = useCatalog({\n fetchData, courseData, isFetching, searchParams, setSearchParams,\n });\n\n const { setSearchInput } = useDebouncedSearchInput({\n searchString,\n handleSearch,\n });\n\n const displayData = useMemo(() => {\n const hasSearchResults = (courseData?.results?.length ?? 0) > 0;\n const hasActiveSearch = Boolean(searchString);\n\n const shouldShowPreviousData = hasActiveSearch && !hasSearchResults && previousCourseData;\n\n return shouldShowPreviousData ? previousCourseData : courseData;\n }, [courseData, searchString, previousCourseData]);\n\n useEffect(() => {\n if (!isFetching && filterState.isFilterChangeInProgress) {\n resetFilterProgress();\n }\n }, [isFetching, filterState.isFilterChangeInProgress, resetFilterProgress]);\n\n const tableColumns = useMemo(\n () => transformAggregationsToFilterChoices(displayData?.aggs, intl),\n [displayData?.aggs, intl],\n );\n\n if (isLoading || (!hasInitializedFromUrl && urlSearchQuery)) {\n return (\n <Loading />\n );\n }\n\n if (isError) {\n return (\n <Container className=\"py-5.5\">\n <Alert variant=\"danger\">\n <ErrorPage\n // @ts-expect-error frontend-base ErrorPage declares message?: null but renders the prop as text. Remove when typing is fixed upstream.\n message={intl.formatMessage(messages.errorMessage, {\n supportEmail: getStringConfig('INFO_EMAIL'),\n })}\n />\n </Alert>\n </Container>\n );\n }\n\n const totalCourses = displayData?.results?.length ?? 0;\n const pageCount = Math.ceil((displayData?.total || totalCourses) / DEFAULT_PAGE_SIZE);\n const hasCourses = totalCourses > 0 || (previousCourseData?.total ?? 0) > 0;\n\n return (\n <>\n <Helmet>\n <title>\n {intl.formatMessage(messages.pageTitle, {\n siteName: getSiteConfig().siteName,\n })}\n </title>\n </Helmet>\n <Container fluid={false} size=\"xl\" className=\"pt-5.5 mb-6\">\n <CourseCatalogIntroSlot searchString={searchString} courseDataResultsLength={courseData?.results?.length} />\n {hasCourses ? (\n <>\n <CourseCatalogSearchFieldSlot\n setSearchInput={setSearchInput}\n handleSearch={handleSearch}\n initialSearchValue={searchString}\n />\n <CourseCatalogDataTableSlot\n displayData={displayData}\n totalCourses={totalCourses}\n pageCount={pageCount}\n pageIndex={pageIndex}\n tableColumns={tableColumns}\n handleFetchData={handleFetchData}\n />\n </>\n ) : (\n <AlertNotification\n title={intl.formatMessage(messages.noCoursesAvailable)}\n message={intl.formatMessage(messages.noCoursesAvailableMessage)}\n />\n )}\n </Container>\n </>\n );\n};\n\nexport default CatalogPage;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/catalog/hooks/types.ts"],"names":[],"mappings":"","sourcesContent":["import { useSearchParams } from 'react-router-dom';\n\nimport type { CourseListSearchResponse, DataTableParams } from '@src/data/course-list-search/types';\n\nexport interface UseCatalogProps {\n fetchData: (params: DataTableParams) => void,\n courseData: CourseListSearchResponse | undefined,\n isFetching: boolean,\n searchParams: ReturnType<typeof useSearchParams>[0],\n setSearchParams: ReturnType<typeof useSearchParams>[1],\n}\n\nexport interface UseCourseDataProps {\n courseData: CourseListSearchResponse | undefined,\n searchString: string,\n}\n\nexport interface UseSearchProps {\n fetchData: (params: DataTableParams) => void,\n isFetching: boolean,\n searchParams: ReturnType<typeof useSearchParams>[0],\n setSearchParams: ReturnType<typeof useSearchParams>[1],\n}\n\nexport interface UseDebouncedSearchInputProps {\n searchString: string | null | undefined,\n handleSearch: (value: string) => void,\n debounceDelay?: number,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/catalog/hooks/types.ts"],"names":[],"mappings":"","sourcesContent":["import { useSearchParams } from 'react-router-dom';\n\nimport type { CourseListSearchResponse, DataTableParams } from '@src/data/course-list-search/types';\n\nexport interface UseCatalogProps {\n fetchData: (params: DataTableParams) => void;\n courseData: CourseListSearchResponse | undefined;\n isFetching: boolean;\n searchParams: ReturnType<typeof useSearchParams>[0];\n setSearchParams: ReturnType<typeof useSearchParams>[1];\n}\n\nexport interface UseCourseDataProps {\n courseData: CourseListSearchResponse | undefined;\n searchString: string;\n}\n\nexport interface UseSearchProps {\n fetchData: (params: DataTableParams) => void;\n isFetching: boolean;\n searchParams: ReturnType<typeof useSearchParams>[0];\n setSearchParams: ReturnType<typeof useSearchParams>[1];\n}\n\nexport interface UseDebouncedSearchInputProps {\n searchString: string | null | undefined;\n handleSearch: (value: string) => void;\n debounceDelay?: number;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/catalog/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { IntlShape } from '@src/utils';\n\nexport interface GetPageTitleProps {\n intl: IntlShape,\n searchString: string,\n courseDataResultsLength?: number,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/catalog/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { IntlShape } from '@src/utils';\n\nexport interface GetPageTitleProps {\n intl: IntlShape;\n searchString: string;\n courseDataResultsLength?: number;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Reads a string setting out of the app config, falling back when the key is
3
+ * absent or holds a non-string value.
4
+ */
5
+ export declare const getStringConfig: (key: string, fallback?: string) => string;
6
+ /**
7
+ * Reads a count setting out of the app config, falling back when the key is
8
+ * absent or holds anything that does not read as a whole number.
9
+ */
10
+ export declare const getCountConfig: (key: string, fallback: number) => number;
package/dist/config.js ADDED
@@ -0,0 +1,23 @@
1
+ import { getAppConfig } from '@openedx/frontend-base';
2
+ import { appId } from './constants';
3
+ /**
4
+ * Reads a string setting out of the app config, falling back when the key is
5
+ * absent or holds a non-string value.
6
+ */
7
+ export const getStringConfig = (key, fallback = '') => {
8
+ const value = getAppConfig(appId)[key];
9
+ return typeof value === 'string' ? value : fallback;
10
+ };
11
+ /**
12
+ * Reads a count setting out of the app config, falling back when the key is
13
+ * absent or holds anything that does not read as a whole number.
14
+ */
15
+ export const getCountConfig = (key, fallback) => {
16
+ const value = getAppConfig(appId)[key];
17
+ const count = typeof value === 'string' ? Number(value) : value;
18
+ if (typeof count === 'number' && Number.isInteger(count) && count >= 1) {
19
+ return count;
20
+ }
21
+ return fallback;
22
+ };
23
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEpC;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAW,EAAE,QAAQ,GAAG,EAAE,EAAU,EAAE;IACpE,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;IACvC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC;AACtD,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAE,QAAgB,EAAU,EAAE;IACtE,MAAM,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC;IACvC,MAAM,KAAK,GAAG,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IAEhE,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;QACvE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC","sourcesContent":["import { getAppConfig } from '@openedx/frontend-base';\n\nimport { appId } from './constants';\n\n/**\n * Reads a string setting out of the app config, falling back when the key is\n * absent or holds a non-string value.\n */\nexport const getStringConfig = (key: string, fallback = ''): string => {\n const value = getAppConfig(appId)[key];\n return typeof value === 'string' ? value : fallback;\n};\n\n/**\n * Reads a count setting out of the app config, falling back when the key is\n * absent or holds anything that does not read as a whole number.\n */\nexport const getCountConfig = (key: string, fallback: number): number => {\n const value = getAppConfig(appId)[key];\n const count = typeof value === 'string' ? Number(value) : value;\n\n if (typeof count === 'number' && Number.isInteger(count) && count >= 1) {\n return count;\n }\n\n return fallback;\n};\n"]}
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
2
2
  import { useParams } from 'react-router';
3
3
  import { Helmet } from 'react-helmet';
4
4
  import { Container, Layout, Alert, useMediaQuery, breakpoints, Stack, } from '@openedx/paragon';
5
- import { ErrorPage, getAppConfig, getSiteConfig, useIntl, } from '@openedx/frontend-base';
5
+ import { ErrorPage, getSiteConfig, useIntl, } from '@openedx/frontend-base';
6
6
  import { Loading } from '../generic';
7
- import { appId } from '../constants';
7
+ import { getStringConfig } from '../config';
8
8
  import CourseAboutIntroSlot from '../slots/CourseAboutIntroSlot';
9
9
  import CourseAboutCourseMediaSlot from '../slots/CourseAboutCourseMediaSlot';
10
10
  import CourseAboutOverviewSlot from '../slots/CourseAboutOverviewSlot';
@@ -27,7 +27,7 @@ const CourseAboutPage = () => {
27
27
  , {
28
28
  // @ts-expect-error frontend-base ErrorPage declares message?: null but renders the prop as text. Remove when typing is fixed upstream.
29
29
  message: intl.formatMessage(messages.errorMessage, {
30
- supportEmail: getAppConfig(appId).INFO_EMAIL,
30
+ supportEmail: getStringConfig('INFO_EMAIL'),
31
31
  }) }) }) }));
32
32
  }
33
33
  return (_jsxs(_Fragment, { children: [_jsx(Helmet, { children: _jsx("title", { children: intl.formatMessage(messages.pageTitle, {
@@ -1 +1 @@
1
- {"version":3,"file":"CourseAboutPage.js","sourceRoot":"","sources":["../../src/course-about/CourseAboutPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,GAC5D,MAAM,kBAAkB,CAAC;AA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,eAAe,GAAI,GACjD,EACjB,KAAC,sBAAsB,IAAC,eAAe,EAAE,eAAe,GAAI,IACtD,CACT,GACc,KACV,GACC,IACX,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { useParams } from 'react-router';\nimport { Helmet } from 'react-helmet';\nimport {\n Container, Layout, Alert, useMediaQuery, breakpoints, Stack,\n} from '@openedx/paragon';\nimport {\n ErrorPage, getAppConfig, getSiteConfig, useIntl,\n} from '@openedx/frontend-base';\n\nimport { Loading } from '@src/generic';\nimport { appId } from '@src/constants';\nimport CourseAboutIntroSlot from '@src/slots/CourseAboutIntroSlot';\nimport CourseAboutCourseMediaSlot from '@src/slots/CourseAboutCourseMediaSlot';\nimport CourseAboutOverviewSlot from '@src/slots/CourseAboutOverviewSlot';\nimport CourseAboutSidebarSlot from '@src/slots/CourseAboutSidebarSlot';\nimport { useCourseAboutData } from './data/hooks';\nimport messages from './messages';\nimport { GRID_LAYOUT } from './layout';\n\nconst CourseAboutPage = () => {\n const intl = useIntl();\n const { courseId = '' } = useParams<{ courseId: string }>();\n const isSmallScreen = useMediaQuery({ maxWidth: breakpoints.large.maxWidth });\n const {\n data: courseAboutData,\n isLoading,\n isError,\n } = useCourseAboutData(courseId);\n\n if (isLoading) {\n return <Loading />;\n }\n\n if (isError) {\n return (\n <Container className=\"py-5.5\">\n <Alert variant=\"danger\">\n <ErrorPage\n // @ts-expect-error frontend-base ErrorPage declares message?: null but renders the prop as text. Remove when typing is fixed upstream.\n message={intl.formatMessage(messages.errorMessage, {\n supportEmail: getAppConfig(appId).INFO_EMAIL as string,\n })}\n />\n </Alert>\n </Container>\n );\n }\n\n return (\n <>\n <Helmet>\n <title>\n {intl.formatMessage(messages.pageTitle, {\n courseName: courseAboutData?.name ?? '',\n siteName: getSiteConfig().siteName,\n })}\n </title>\n </Helmet>\n <Container fluid={false} size=\"xl\" className=\"py-5.5\">\n <Layout {...GRID_LAYOUT}>\n <Layout.Element>\n {isSmallScreen ? (\n <Stack gap={4}>\n <Layout.Element className=\"course-media-wrapper text-center\">\n <CourseAboutCourseMediaSlot courseAboutData={courseAboutData} />\n </Layout.Element>\n <CourseAboutIntroSlot courseAboutData={courseAboutData} />\n <CourseAboutOverviewSlot\n overviewData={courseAboutData.overview}\n courseId={courseId}\n />\n <CourseAboutSidebarSlot courseAboutData={courseAboutData} />\n </Stack>\n ) : (\n <Stack gap={4}>\n <CourseAboutIntroSlot courseAboutData={courseAboutData} />\n <CourseAboutOverviewSlot\n overviewData={courseAboutData.overview}\n courseId={courseId}\n />\n </Stack>\n )}\n </Layout.Element>\n <Layout.Element>\n {!isSmallScreen && (\n <Stack gap={4}>\n <Layout.Element className=\"course-media-wrapper\">\n <CourseAboutCourseMediaSlot courseAboutData={courseAboutData} />\n </Layout.Element>\n <CourseAboutSidebarSlot courseAboutData={courseAboutData} />\n </Stack>\n )}\n </Layout.Element>\n </Layout>\n </Container>\n </>\n );\n};\n\nexport default CourseAboutPage;\n"]}
1
+ {"version":3,"file":"CourseAboutPage.js","sourceRoot":"","sources":["../../src/course-about/CourseAboutPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EACL,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,KAAK,GAC5D,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,SAAS,EAAE,aAAa,EAAE,OAAO,GAClC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,oBAAoB,MAAM,iCAAiC,CAAC;AACnE,OAAO,0BAA0B,MAAM,uCAAuC,CAAC;AAC/E,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,sBAAs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AAI,EAAC,IAAI,EAAC,SAAS,EAAC,QAAQ,YACnD,MAAC,MAAM,oBAAK,WAAW,eACrB,KAAC,MAAM,CAAC,OAAO,cACZ,aAAa,CAAC,CAAC,CAAC,CACf,MAAC,KAAK,IAAC,GAAG,EAAE,CAAC,aACX,KAAC,MAAM,CAAC,OAAO,IAAC,SAAS,EAAC,kCAAkC,YAC1D,KAAC,0BAA0B,IAAC,eAAe,EAAE,eAAe,GAAI,GACjD,EACjB,KAAC,oBAAoB,IAAC,eAAe,EAAE,eAAe,GAAI,EAC1D,KAAC,uBAAuB,IACtB,YAAY,EAAE,eAAe,CAAC,QAAQ,EACtC,QAAQ,EAAE,QAAQ,GAClB,EACF,KAAC,sBAAsB,IAAC,eAAe,EAAE,eAAe,GAAI,IACtD,CACT,CAAC,CAAC,CAAC,CACF,MAAC,KAAK,IAAC,GAAG,EAAE,CAAC,aACX,KAAC,oBAAoB,IAAC,eAAe,EAAE,eAAe,GAAI,EAC1D,KAAC,uBAAuB,IACtB,YAAY,EAAE,eAAe,CAAC,QAAQ,EACtC,QAAQ,EAAE,QAAQ,GAClB,IACI,CACT,GACc,EACjB,KAAC,MAAM,CAAC,OAAO,cACZ,CAAC,aAAa,IAAI,CACjB,MAAC,KAAK,IAAC,GAAG,EAAE,CAAC,aACX,KAAC,MAAM,CAAC,OAAO,IAAC,SAAS,EAAC,sBAAsB,YAC9C,KAAC,0BAA0B,IAAC,eAAe,EAAE,eAAe,GAAI,GACjD,EACjB,KAAC,sBAAsB,IAAC,eAAe,EAAE,eAAe,GAAI,IACtD,CACT,GACc,KACV,GACC,IACX,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { useParams } from 'react-router';\nimport { Helmet } from 'react-helmet';\nimport {\n Container, Layout, Alert, useMediaQuery, breakpoints, Stack,\n} from '@openedx/paragon';\nimport {\n ErrorPage, getSiteConfig, useIntl,\n} from '@openedx/frontend-base';\n\nimport { Loading } from '@src/generic';\nimport { getStringConfig } from '@src/config';\nimport CourseAboutIntroSlot from '@src/slots/CourseAboutIntroSlot';\nimport CourseAboutCourseMediaSlot from '@src/slots/CourseAboutCourseMediaSlot';\nimport CourseAboutOverviewSlot from '@src/slots/CourseAboutOverviewSlot';\nimport CourseAboutSidebarSlot from '@src/slots/CourseAboutSidebarSlot';\nimport { useCourseAboutData } from './data/hooks';\nimport messages from './messages';\nimport { GRID_LAYOUT } from './layout';\n\nconst CourseAboutPage = () => {\n const intl = useIntl();\n const { courseId = '' } = useParams<{ courseId: string }>();\n const isSmallScreen = useMediaQuery({ maxWidth: breakpoints.large.maxWidth });\n const {\n data: courseAboutData,\n isLoading,\n isError,\n } = useCourseAboutData(courseId);\n\n if (isLoading) {\n return <Loading />;\n }\n\n if (isError) {\n return (\n <Container className=\"py-5.5\">\n <Alert variant=\"danger\">\n <ErrorPage\n // @ts-expect-error frontend-base ErrorPage declares message?: null but renders the prop as text. Remove when typing is fixed upstream.\n message={intl.formatMessage(messages.errorMessage, {\n supportEmail: getStringConfig('INFO_EMAIL'),\n })}\n />\n </Alert>\n </Container>\n );\n }\n\n return (\n <>\n <Helmet>\n <title>\n {intl.formatMessage(messages.pageTitle, {\n courseName: courseAboutData?.name ?? '',\n siteName: getSiteConfig().siteName,\n })}\n </title>\n </Helmet>\n <Container fluid={false} size=\"xl\" className=\"py-5.5\">\n <Layout {...GRID_LAYOUT}>\n <Layout.Element>\n {isSmallScreen ? (\n <Stack gap={4}>\n <Layout.Element className=\"course-media-wrapper text-center\">\n <CourseAboutCourseMediaSlot courseAboutData={courseAboutData} />\n </Layout.Element>\n <CourseAboutIntroSlot courseAboutData={courseAboutData} />\n <CourseAboutOverviewSlot\n overviewData={courseAboutData.overview}\n courseId={courseId}\n />\n <CourseAboutSidebarSlot courseAboutData={courseAboutData} />\n </Stack>\n ) : (\n <Stack gap={4}>\n <CourseAboutIntroSlot courseAboutData={courseAboutData} />\n <CourseAboutOverviewSlot\n overviewData={courseAboutData.overview}\n courseId={courseId}\n />\n </Stack>\n )}\n </Layout.Element>\n <Layout.Element>\n {!isSmallScreen && (\n <Stack gap={4}>\n <Layout.Element className=\"course-media-wrapper\">\n <CourseAboutCourseMediaSlot courseAboutData={courseAboutData} />\n </Layout.Element>\n <CourseAboutSidebarSlot courseAboutData={courseAboutData} />\n </Stack>\n )}\n </Layout.Element>\n </Layout>\n </Container>\n </>\n );\n};\n\nexport default CourseAboutPage;\n"]}
@@ -8,6 +8,7 @@ import { StatusMessage } from './StatusMessage';
8
8
  export const EnrolledStatus = ({ showCoursewareLink, courseId }) => {
9
9
  const intl = useIntl();
10
10
  const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.small.maxWidth });
11
- return (_jsxs(Stack, { direction: isExtraSmall ? 'vertical' : 'horizontal', gap: isExtraSmall ? 2 : 5, children: [_jsx(StatusMessage, { variant: STATUS_MESSAGE_VARIANTS.SUCCESS, messageKey: "statusMessageEnrolled" }), showCoursewareLink && (_jsx(Button, { as: "a", href: getLearningHomePageUrl(courseId), children: intl.formatMessage(messages.viewCourseBtn) }))] }));
11
+ const learningHomePageUrl = getLearningHomePageUrl(courseId);
12
+ return (_jsxs(Stack, { direction: isExtraSmall ? 'vertical' : 'horizontal', gap: isExtraSmall ? 2 : 5, children: [_jsx(StatusMessage, { variant: STATUS_MESSAGE_VARIANTS.SUCCESS, messageKey: "statusMessageEnrolled" }), showCoursewareLink && learningHomePageUrl && (_jsx(Button, { as: "a", href: learningHomePageUrl, children: intl.formatMessage(messages.viewCourseBtn) }))] }));
12
13
  };
13
14
  //# sourceMappingURL=EnrolledStatus.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EnrolledStatus.js","sourceRoot":"","sources":["../../../../src/course-about/course-intro/components/EnrolledStatus.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAC1C,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,kBAAkB,EAAE,QAAQ,EAAuB,EAAE,EAAE;IACtF,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,YAAY,GAAG,aAAa,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE7E,OAAO,CACL,MAAC,KAAK,IAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aACnF,KAAC,aAAa,IACZ,OAAO,EAAE,uBAAuB,CAAC,OAAO,EACxC,UAAU,EAAC,uBAAuB,GAClC,EACD,kBAAkB,IAAI,CACrB,KAAC,MAAM,IAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAE,sBAAsB,CAAC,QAAQ,CAAC,YAClD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,GACpC,CACV,IACK,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n breakpoints, Button, Stack, useMediaQuery,\n} from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport { getLearningHomePageUrl } from '../utils';\nimport messages from '../messages';\nimport { STATUS_MESSAGE_VARIANTS } from '../constants';\nimport type { EnrolledStatusTypes } from './types';\nimport { StatusMessage } from './StatusMessage';\n\nexport const EnrolledStatus = ({ showCoursewareLink, courseId }: EnrolledStatusTypes) => {\n const intl = useIntl();\n const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.small.maxWidth });\n\n return (\n <Stack direction={isExtraSmall ? 'vertical' : 'horizontal'} gap={isExtraSmall ? 2 : 5}>\n <StatusMessage\n variant={STATUS_MESSAGE_VARIANTS.SUCCESS}\n messageKey=\"statusMessageEnrolled\"\n />\n {showCoursewareLink && (\n <Button as=\"a\" href={getLearningHomePageUrl(courseId)}>\n {intl.formatMessage(messages.viewCourseBtn)}\n </Button>\n )}\n </Stack>\n );\n};\n"]}
1
+ {"version":3,"file":"EnrolledStatus.js","sourceRoot":"","sources":["../../../../src/course-about/course-intro/components/EnrolledStatus.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAC1C,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,kBAAkB,EAAE,QAAQ,EAAuB,EAAE,EAAE;IACtF,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,YAAY,GAAG,aAAa,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC7E,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IAE7D,OAAO,CACL,MAAC,KAAK,IAAC,SAAS,EAAE,YAAY,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,YAAY,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,aACnF,KAAC,aAAa,IACZ,OAAO,EAAE,uBAAuB,CAAC,OAAO,EACxC,UAAU,EAAC,uBAAuB,GAClC,EACD,kBAAkB,IAAI,mBAAmB,IAAI,CAC5C,KAAC,MAAM,IAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAE,mBAAmB,YACrC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,GACpC,CACV,IACK,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import {\n breakpoints, Button, Stack, useMediaQuery,\n} from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport { getLearningHomePageUrl } from '../utils';\nimport messages from '../messages';\nimport { STATUS_MESSAGE_VARIANTS } from '../constants';\nimport type { EnrolledStatusTypes } from './types';\nimport { StatusMessage } from './StatusMessage';\n\nexport const EnrolledStatus = ({ showCoursewareLink, courseId }: EnrolledStatusTypes) => {\n const intl = useIntl();\n const isExtraSmall = useMediaQuery({ maxWidth: breakpoints.small.maxWidth });\n const learningHomePageUrl = getLearningHomePageUrl(courseId);\n\n return (\n <Stack direction={isExtraSmall ? 'vertical' : 'horizontal'} gap={isExtraSmall ? 2 : 5}>\n <StatusMessage\n variant={STATUS_MESSAGE_VARIANTS.SUCCESS}\n messageKey=\"statusMessageEnrolled\"\n />\n {showCoursewareLink && learningHomePageUrl && (\n <Button as=\"a\" href={learningHomePageUrl}>\n {intl.formatMessage(messages.viewCourseBtn)}\n </Button>\n )}\n </Stack>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/course-about/course-intro/components/types.ts"],"names":[],"mappings":"","sourcesContent":["import { STATUS_MESSAGE_VARIANTS } from '../constants';\nimport type { SinglePaidMode } from '../../types';\n\nexport type StatusMessageVariant = typeof STATUS_MESSAGE_VARIANTS[keyof typeof STATUS_MESSAGE_VARIANTS];\n\nexport interface EnrollmentButtonTypes {\n singlePaidMode: SinglePaidMode,\n ecommerceCheckout: boolean,\n isEnrollmentPending: boolean,\n onEnroll: () => void,\n onEcommerceCheckout: () => void,\n}\n\nexport interface EnrolledStatusTypes {\n showCoursewareLink: boolean,\n courseId: string,\n}\n\nexport interface StatusMessageTypes {\n variant: StatusMessageVariant,\n messageKey: string,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/course-about/course-intro/components/types.ts"],"names":[],"mappings":"","sourcesContent":["import { STATUS_MESSAGE_VARIANTS } from '../constants';\nimport type { SinglePaidMode } from '../../types';\n\nexport type StatusMessageVariant = typeof STATUS_MESSAGE_VARIANTS[keyof typeof STATUS_MESSAGE_VARIANTS];\n\nexport interface EnrollmentButtonTypes {\n singlePaidMode: SinglePaidMode;\n ecommerceCheckout: boolean;\n isEnrollmentPending: boolean;\n onEnroll: () => void;\n onEcommerceCheckout: () => void;\n}\n\nexport interface EnrolledStatusTypes {\n showCoursewareLink: boolean;\n courseId: string;\n}\n\nexport interface StatusMessageTypes {\n variant: StatusMessageVariant;\n messageKey: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/course-about/course-intro/course-media/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CourseMediaPartial } from '../../types';\n\nexport interface CourseMediaTypes {\n courseAboutData: {\n name: string,\n media: CourseMediaPartial,\n },\n}\n\nexport type ExtractYouTubeVideoIdTypes = (url: string) => string | null;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/course-about/course-intro/course-media/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CourseMediaPartial } from '../../types';\n\nexport interface CourseMediaTypes {\n courseAboutData: {\n name: string;\n media: CourseMediaPartial;\n };\n}\n\nexport type ExtractYouTubeVideoIdTypes = (url: string) => string | null;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/course-about/course-intro/hooks/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CourseAboutDataPartial } from '../../types';\n\nexport interface UseEnrollmentActionsTypes {\n courseId: string,\n ecommerceCheckoutLink?: string | null,\n}\n\nexport interface AuthenticatedUser {\n username: string,\n}\n\nexport interface UseEnrollmentStatusTypes {\n courseAboutData: CourseAboutDataPartial,\n authenticatedUser: AuthenticatedUser | null,\n enrollmentError: string | null,\n isEnrollmentPending: boolean,\n handleChangeEnrollment: () => void,\n handleEcommerceCheckout: () => void,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/course-about/course-intro/hooks/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { CourseAboutDataPartial } from '../../types';\n\nexport interface UseEnrollmentActionsTypes {\n courseId: string;\n ecommerceCheckoutLink?: string | null;\n}\n\nexport interface AuthenticatedUser {\n username: string;\n}\n\nexport interface UseEnrollmentStatusTypes {\n courseAboutData: CourseAboutDataPartial;\n authenticatedUser: AuthenticatedUser | null;\n enrollmentError: string | null;\n isEnrollmentPending: boolean;\n handleChangeEnrollment: () => void;\n handleEcommerceCheckout: () => void;\n}\n"]}
@@ -25,8 +25,9 @@ export const useEnrollmentStatus = ({ courseAboutData, enrollmentError, authenti
25
25
  if (!isShibCourse && !canEnroll) {
26
26
  return _jsx(StatusMessage, { variant: STATUS_MESSAGE_VARIANTS.INFO, messageKey: "statusMessageEnrollmentClosed" });
27
27
  }
28
- if (allowAnonymous && showCoursewareLink) {
29
- return (_jsx(Button, { as: "a", href: getLearningHomePageUrl(courseId), children: intl.formatMessage(messages.viewCourseBtn) }));
28
+ const learningHomePageUrl = getLearningHomePageUrl(courseId);
29
+ if (allowAnonymous && showCoursewareLink && learningHomePageUrl) {
30
+ return (_jsx(Button, { as: "a", href: learningHomePageUrl, children: intl.formatMessage(messages.viewCourseBtn) }));
30
31
  }
31
32
  return (_jsx(CourseAboutEnrollmentButtonSlot, { singlePaidMode: singlePaidMode, ecommerceCheckout: ecommerceCheckout, isEnrollmentPending: isEnrollmentPending, onEnroll: handleChangeEnrollment, onEcommerceCheckout: handleEcommerceCheckout }));
32
33
  };
@@ -1 +1 @@
1
- {"version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AAE,UAAU,EAAC,mBAAmB,GAAG,CAAC;QACjG,CAAC;QAED,IAAI,cAAc,IAAI,CAAC,SAAS,EAAE,CAAC;YACjC,OAAO,KAAC,aAAa,IAAC,OAAO,EAAE,uBAAuB,CAAC,IAAI,EAAE,UAAU,EAAC,uCAAuC,GAAG,CAAC;QACrH,CAAC;QAED,IAAI,CAAC,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;YAChC,OAAO,KAAC,aAAa,IAAC,OAAO,EAAE,uBAAuB,CAAC,IAAI,EAAE,UAAU,EAAC,+BAA+B,GAAG,CAAC;QAC7G,CAAC;QAED,IAAI,cAAc,IAAI,kBAAkB,EAAE,CAAC;YACzC,OAAO,CACL,KAAC,MAAM,IAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAE,sBAAsB,CAAC,QAAQ,CAAC,YAClD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,GACpC,CACV,CAAC;QACJ,CAAC;QAED,OAAO,CACL,KAAC,+BAA+B,IAC9B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,EACxC,QAAQ,EAAE,sBAAsB,EAChC,mBAAmB,EAAE,uBAAuB,GAC5C,CACH,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC;AACjC,CAAC,CAAC","sourcesContent":["import { Button } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport CourseAboutEnrollmentButtonSlot from '@src/slots/CourseAboutEnrollmentButtonSlot';\nimport { StatusMessage, EnrolledStatus } from '../components';\nimport { getLearningHomePageUrl } from '../utils';\nimport messages from '../messages';\nimport { STATUS_MESSAGE_VARIANTS } from '../constants';\nimport type { UseEnrollmentStatusTypes } from './types';\n\nexport const useEnrollmentStatus = ({\n courseAboutData,\n enrollmentError,\n authenticatedUser,\n isEnrollmentPending,\n handleChangeEnrollment,\n handleEcommerceCheckout,\n}: UseEnrollmentStatusTypes) => {\n const intl = useIntl();\n const {\n id: courseId,\n canEnroll,\n enrollment,\n isShibCourse,\n isCourseFull,\n allowAnonymous,\n singlePaidMode,\n invitationOnly,\n ecommerceCheckout,\n showCoursewareLink,\n } = courseAboutData;\n\n const renderStatusContent = () => {\n if (enrollmentError) {\n return <StatusMessage variant={STATUS_MESSAGE_VARIANTS.DANGER} messageKey=\"statusMessageEnrollmentError\" />;\n }\n\n if (authenticatedUser && enrollment.isActive) {\n return <EnrolledStatus showCoursewareLink={showCoursewareLink} courseId={courseId} />;\n }\n\n if (isCourseFull) {\n return <StatusMessage variant={STATUS_MESSAGE_VARIANTS.INFO} messageKey=\"statusMessageFull\" />;\n }\n\n if (invitationOnly && !canEnroll) {\n return <StatusMessage variant={STATUS_MESSAGE_VARIANTS.INFO} messageKey=\"statusMessageEnrollmentInvitationOnly\" />;\n }\n\n if (!isShibCourse && !canEnroll) {\n return <StatusMessage variant={STATUS_MESSAGE_VARIANTS.INFO} messageKey=\"statusMessageEnrollmentClosed\" />;\n }\n\n if (allowAnonymous && showCoursewareLink) {\n return (\n <Button as=\"a\" href={getLearningHomePageUrl(courseId)}>\n {intl.formatMessage(messages.viewCourseBtn)}\n </Button>\n );\n }\n\n return (\n <CourseAboutEnrollmentButtonSlot\n singlePaidMode={singlePaidMode}\n ecommerceCheckout={ecommerceCheckout}\n isEnrollmentPending={isEnrollmentPending}\n onEnroll={handleChangeEnrollment}\n onEcommerceCheckout={handleEcommerceCheckout}\n />\n );\n };\n\n return { renderStatusContent };\n};\n"]}
1
+ {"version":3,"file":"useEnrollmentStatus.js","sourceRoot":"","sources":["../../../../src/course-about/course-intro/hooks/useEnrollmentStatus.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEjD,OAAO,+BAA+B,MAAM,4CAA4C,CAAC;AACzF,OAAO,EAAE,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AAC;YAChC,OAAO,KAAC,aAAa,IAAC,OAAO,EAAE,uBAAuB,CAAC,IAAI,EAAE,UAAU,EAAC,+BAA+B,GAAG,CAAC;QAC7G,CAAC;QAED,MAAM,mBAAmB,GAAG,sBAAsB,CAAC,QAAQ,CAAC,CAAC;QAC7D,IAAI,cAAc,IAAI,kBAAkB,IAAI,mBAAmB,EAAE,CAAC;YAChE,OAAO,CACL,KAAC,MAAM,IAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAE,mBAAmB,YACrC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,aAAa,CAAC,GACpC,CACV,CAAC;QACJ,CAAC;QAED,OAAO,CACL,KAAC,+BAA+B,IAC9B,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,EACxC,QAAQ,EAAE,sBAAsB,EAChC,mBAAmB,EAAE,uBAAuB,GAC5C,CACH,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,EAAE,mBAAmB,EAAE,CAAC;AACjC,CAAC,CAAC","sourcesContent":["import { Button } from '@openedx/paragon';\nimport { useIntl } from '@openedx/frontend-base';\n\nimport CourseAboutEnrollmentButtonSlot from '@src/slots/CourseAboutEnrollmentButtonSlot';\nimport { StatusMessage, EnrolledStatus } from '../components';\nimport { getLearningHomePageUrl } from '../utils';\nimport messages from '../messages';\nimport { STATUS_MESSAGE_VARIANTS } from '../constants';\nimport type { UseEnrollmentStatusTypes } from './types';\n\nexport const useEnrollmentStatus = ({\n courseAboutData,\n enrollmentError,\n authenticatedUser,\n isEnrollmentPending,\n handleChangeEnrollment,\n handleEcommerceCheckout,\n}: UseEnrollmentStatusTypes) => {\n const intl = useIntl();\n const {\n id: courseId,\n canEnroll,\n enrollment,\n isShibCourse,\n isCourseFull,\n allowAnonymous,\n singlePaidMode,\n invitationOnly,\n ecommerceCheckout,\n showCoursewareLink,\n } = courseAboutData;\n\n const renderStatusContent = () => {\n if (enrollmentError) {\n return <StatusMessage variant={STATUS_MESSAGE_VARIANTS.DANGER} messageKey=\"statusMessageEnrollmentError\" />;\n }\n\n if (authenticatedUser && enrollment.isActive) {\n return <EnrolledStatus showCoursewareLink={showCoursewareLink} courseId={courseId} />;\n }\n\n if (isCourseFull) {\n return <StatusMessage variant={STATUS_MESSAGE_VARIANTS.INFO} messageKey=\"statusMessageFull\" />;\n }\n\n if (invitationOnly && !canEnroll) {\n return <StatusMessage variant={STATUS_MESSAGE_VARIANTS.INFO} messageKey=\"statusMessageEnrollmentInvitationOnly\" />;\n }\n\n if (!isShibCourse && !canEnroll) {\n return <StatusMessage variant={STATUS_MESSAGE_VARIANTS.INFO} messageKey=\"statusMessageEnrollmentClosed\" />;\n }\n\n const learningHomePageUrl = getLearningHomePageUrl(courseId);\n if (allowAnonymous && showCoursewareLink && learningHomePageUrl) {\n return (\n <Button as=\"a\" href={learningHomePageUrl}>\n {intl.formatMessage(messages.viewCourseBtn)}\n </Button>\n );\n }\n\n return (\n <CourseAboutEnrollmentButtonSlot\n singlePaidMode={singlePaidMode}\n ecommerceCheckout={ecommerceCheckout}\n isEnrollmentPending={isEnrollmentPending}\n onEnroll={handleChangeEnrollment}\n onEcommerceCheckout={handleEcommerceCheckout}\n />\n );\n };\n\n return { renderStatusContent };\n};\n"]}
@@ -1,4 +1,5 @@
1
1
  /**
2
- * Returns the absolute URL to the learning home page for a given course.
2
+ * Returns the absolute URL to the learning home page for a given course, or
3
+ * `null` when the site has no `LEARNING_BASE_URL` configured.
3
4
  */
4
- export declare const getLearningHomePageUrl: (courseId: string) => string;
5
+ export declare const getLearningHomePageUrl: (courseId: string) => string | null;
@@ -1,7 +1,10 @@
1
- import { getAppConfig } from '@openedx/frontend-base';
2
- import { appId } from '../../constants';
1
+ import { getStringConfig } from '../../config';
3
2
  /**
4
- * Returns the absolute URL to the learning home page for a given course.
3
+ * Returns the absolute URL to the learning home page for a given course, or
4
+ * `null` when the site has no `LEARNING_BASE_URL` configured.
5
5
  */
6
- export const getLearningHomePageUrl = (courseId) => `${getAppConfig(appId).LEARNING_BASE_URL}/course/${courseId}/home`;
6
+ export const getLearningHomePageUrl = (courseId) => {
7
+ const learningBaseUrl = getStringConfig('LEARNING_BASE_URL');
8
+ return learningBaseUrl ? `${learningBaseUrl}/course/${courseId}/home` : null;
9
+ };
7
10
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/course-about/course-intro/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,iBAA2B,WAAW,QAAQ,OAAO,CAAC","sourcesContent":["import { getAppConfig } from '@openedx/frontend-base';\n\nimport { appId } from '@src/constants';\n\n/**\n * Returns the absolute URL to the learning home page for a given course.\n */\nexport const getLearningHomePageUrl = (courseId: string) => `${getAppConfig(appId).LEARNING_BASE_URL as string}/course/${courseId}/home`;\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/course-about/course-intro/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,QAAgB,EAAE,EAAE;IACzD,MAAM,eAAe,GAAG,eAAe,CAAC,mBAAmB,CAAC,CAAC;IAC7D,OAAO,eAAe,CAAC,CAAC,CAAC,GAAG,eAAe,WAAW,QAAQ,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAC/E,CAAC,CAAC","sourcesContent":["import { getStringConfig } from '@src/config';\n\n/**\n * Returns the absolute URL to the learning home page for a given course, or\n * `null` when the site has no `LEARNING_BASE_URL` configured.\n */\nexport const getLearningHomePageUrl = (courseId: string) => {\n const learningBaseUrl = getStringConfig('LEARNING_BASE_URL');\n return learningBaseUrl ? `${learningBaseUrl}/course/${courseId}/home` : null;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/course-about/course-overview/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface CourseOverviewProps {\n overviewData: string,\n courseId: string,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/course-about/course-overview/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface CourseOverviewProps {\n overviewData: string;\n courseId: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/course-about/course-sidebar/sidebar-details/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode, ComponentType } from 'react';\n\nexport interface SidebarDetailsItemProps {\n icon: ComponentType<{ className?: string }>,\n label: string,\n value?: string | ReactNode,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/course-about/course-sidebar/sidebar-details/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode, ComponentType } from 'react';\n\nexport interface SidebarDetailsItemProps {\n icon: ComponentType<{ className?: string }>;\n label: string;\n value?: string | ReactNode;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/course-about/course-sidebar/sidebar-social/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Icon } from '@openedx/paragon';\n\nexport interface SocialLink {\n id: string,\n destination: string,\n icon: typeof Icon,\n screenReaderText: string,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/course-about/course-sidebar/sidebar-social/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { Icon } from '@openedx/paragon';\n\nexport interface SocialLink {\n id: string;\n destination: string;\n icon: typeof Icon;\n screenReaderText: string;\n}\n"]}
@@ -1,6 +1,6 @@
1
- import { getAppConfig, getSiteConfig } from '@openedx/frontend-base';
1
+ import { getSiteConfig } from '@openedx/frontend-base';
2
2
  import { BsFacebook as BsFacebookIcon, BsTwitterX as BsTwitterXIcon, Email as EmailIcon, } from '@openedx/paragon/icons';
3
- import { appId } from '../../../constants';
3
+ import { getStringConfig } from '../../../config';
4
4
  import messages from './messages';
5
5
  /**
6
6
  * Gets the formatted share text for different social sharing platforms
@@ -18,7 +18,7 @@ const getShareText = (intl, courseData) => ({
18
18
  TWEET: intl.formatMessage(messages.socialSharingTwitterText, {
19
19
  courseNumber: courseData.displayNumberWithDefault,
20
20
  courseName: courseData.name,
21
- platformTwitter: getAppConfig(appId).COURSE_ABOUT_TWITTER_ACCOUNT,
21
+ platformTwitter: getStringConfig('COURSE_ABOUT_TWITTER_ACCOUNT'),
22
22
  url: window.location.href,
23
23
  }),
24
24
  });
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/course-about/course-sidebar/sidebar-social/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EACL,UAAU,IAAI,cAAc,EAC5B,UAAU,IAAI,cAAc,EAC5B,KAAK,IAAI,SAAS,GACnB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;GAEG;AACH,MAAM,YAAY,GAAG,CAAC,IAAe,EAAE,UAA2B,EAAE,EAAE,CAAC,CAAC;IACtE,aAAa,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,yBAAyB,EAAE;QACpE,QAAQ,EAAE,aAAa,EAAE,CAAC,QAAQ;KACnC,CAAC;IACF,UAAU,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,sBAAsB,EAAE;QAC9D,YAAY,EAAE,UAAU,CAAC,wBAAw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AEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAe,EAAE,EAAE,CAAC;IACjD;QACE,EAAE,EAAE,SAAS;QACb,WAAW,EAAE,CAAC,eAAgC,EAAE,EAAE,CAAC,kBAAkB,CAAC,eAAe,EAAE,IAAI,CAAC;QAC5F,IAAI,EAAE,cAAc;QACpB,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,oBAAoB,CAAC;KACpE;IACD;QACE,EAAE,EAAE,UAAU;QACd,WAAW,EAAE,GAAG,EAAE,CAAC,mBAAmB,EAAE;QACxC,IAAI,EAAE,cAAc;QACpB,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,qBAAqB,CAAC;KACrE;IACD;QACE,EAAE,EAAE,OAAO;QACX,WAAW,EAAE,CAAC,UAA2B,EAAE,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC;QAChF,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,kBAAkB,CAAC;KAClE;CACF,CAAC","sourcesContent":["import { getAppConfig, getSiteConfig } from '@openedx/frontend-base';\nimport {\n BsFacebook as BsFacebookIcon,\n BsTwitterX as BsTwitterXIcon,\n Email as EmailIcon,\n} from '@openedx/paragon/icons';\n\nimport type { IntlShape } from '@src/utils';\nimport { appId } from '@src/constants';\nimport type { CourseAboutData } from '../../types';\nimport messages from './messages';\n\n/**\n * Gets the formatted share text for different social sharing platforms\n */\nconst getShareText = (intl: IntlShape, courseData: CourseAboutData) => ({\n EMAIL_SUBJECT: intl.formatMessage(messages.socialSharingEmailSubject, {\n siteName: getSiteConfig().siteName,\n }),\n EMAIL_BODY: intl.formatMessage(messages.socialSharingEmailBody, {\n courseNumber: courseData.displayNumberWithDefault,\n courseName: courseData.name,\n siteName: getSiteConfig().siteName,\n url: window.location.href,\n }),\n TWEET: intl.formatMessage(messages.socialSharingTwitterText, {\n courseNumber: courseData.displayNumberWithDefault,\n courseName: courseData.name,\n platformTwitter: getAppConfig(appId).COURSE_ABOUT_TWITTER_ACCOUNT as string,\n url: window.location.href,\n }),\n});\n\n/**\n * Generates a Twitter share URL with formatted tweet text\n */\nexport const getTwitterShareUrl = (data: CourseAboutData, intl: IntlShape) => {\n const tweetText = getShareText(intl, data).TWEET;\n return `https://twitter.com/intent/tweet?text=${encodeURIComponent(tweetText)}`;\n};\n\n/**\n * Generates a mailto URL for sharing course via email\n */\nexport const getEmailShareUrl = (courseData: CourseAboutData, intl: IntlShape) => {\n const { EMAIL_SUBJECT, EMAIL_BODY } = getShareText(intl, courseData);\n return `mailto:?subject=${encodeURIComponent(EMAIL_SUBJECT)}&body=${encodeURIComponent(EMAIL_BODY)}`;\n};\n\n/**\n * Generates a Facebook share URL for the current page\n */\nexport const getFacebookShareUrl = () => {\n if (!window.location.href) {\n return '#';\n }\n return `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(window.location.href)}`;\n};\n\n/**\n * Returns an array of social sharing link configurations\n */\nexport const getSocialLinks = (intl: IntlShape) => [\n {\n id: 'twitter',\n destination: (courseAboutData: CourseAboutData) => getTwitterShareUrl(courseAboutData, intl),\n icon: BsTwitterXIcon,\n screenReaderText: intl.formatMessage(messages.socialSharingTwitter),\n },\n {\n id: 'facebook',\n destination: () => getFacebookShareUrl(),\n icon: BsFacebookIcon,\n screenReaderText: intl.formatMessage(messages.socialSharingFacebook),\n },\n {\n id: 'email',\n destination: (courseData: CourseAboutData) => getEmailShareUrl(courseData, intl),\n icon: EmailIcon,\n screenReaderText: intl.formatMessage(messages.socialSharingEmail),\n },\n];\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/course-about/course-sidebar/sidebar-social/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EACL,UAAU,IAAI,cAAc,EAC5B,UAAU,IAAI,cAAc,EAC5B,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AU,EAAE,GAAG,YAAY,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACrE,OAAO,mBAAmB,kBAAkB,CAAC,aAAa,CAAC,SAAS,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;AACvG,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACtC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC1B,OAAO,GAAG,CAAC;IACb,CAAC;IACD,OAAO,gDAAgD,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;AACpG,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,IAAe,EAAE,EAAE,CAAC;IACjD;QACE,EAAE,EAAE,SAAS;QACb,WAAW,EAAE,CAAC,eAAgC,EAAE,EAAE,CAAC,kBAAkB,CAAC,eAAe,EAAE,IAAI,CAAC;QAC5F,IAAI,EAAE,cAAc;QACpB,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,oBAAoB,CAAC;KACpE;IACD;QACE,EAAE,EAAE,UAAU;QACd,WAAW,EAAE,GAAG,EAAE,CAAC,mBAAmB,EAAE;QACxC,IAAI,EAAE,cAAc;QACpB,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,qBAAqB,CAAC;KACrE;IACD;QACE,EAAE,EAAE,OAAO;QACX,WAAW,EAAE,CAAC,UAA2B,EAAE,EAAE,CAAC,gBAAgB,CAAC,UAAU,EAAE,IAAI,CAAC;QAChF,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,kBAAkB,CAAC;KAClE;CACF,CAAC","sourcesContent":["import { getSiteConfig } from '@openedx/frontend-base';\nimport {\n BsFacebook as BsFacebookIcon,\n BsTwitterX as BsTwitterXIcon,\n Email as EmailIcon,\n} from '@openedx/paragon/icons';\n\nimport type { IntlShape } from '@src/utils';\nimport { getStringConfig } from '@src/config';\nimport type { CourseAboutData } from '../../types';\nimport messages from './messages';\n\n/**\n * Gets the formatted share text for different social sharing platforms\n */\nconst getShareText = (intl: IntlShape, courseData: CourseAboutData) => ({\n EMAIL_SUBJECT: intl.formatMessage(messages.socialSharingEmailSubject, {\n siteName: getSiteConfig().siteName,\n }),\n EMAIL_BODY: intl.formatMessage(messages.socialSharingEmailBody, {\n courseNumber: courseData.displayNumberWithDefault,\n courseName: courseData.name,\n siteName: getSiteConfig().siteName,\n url: window.location.href,\n }),\n TWEET: intl.formatMessage(messages.socialSharingTwitterText, {\n courseNumber: courseData.displayNumberWithDefault,\n courseName: courseData.name,\n platformTwitter: getStringConfig('COURSE_ABOUT_TWITTER_ACCOUNT'),\n url: window.location.href,\n }),\n});\n\n/**\n * Generates a Twitter share URL with formatted tweet text\n */\nexport const getTwitterShareUrl = (data: CourseAboutData, intl: IntlShape) => {\n const tweetText = getShareText(intl, data).TWEET;\n return `https://twitter.com/intent/tweet?text=${encodeURIComponent(tweetText)}`;\n};\n\n/**\n * Generates a mailto URL for sharing course via email\n */\nexport const getEmailShareUrl = (courseData: CourseAboutData, intl: IntlShape) => {\n const { EMAIL_SUBJECT, EMAIL_BODY } = getShareText(intl, courseData);\n return `mailto:?subject=${encodeURIComponent(EMAIL_SUBJECT)}&body=${encodeURIComponent(EMAIL_BODY)}`;\n};\n\n/**\n * Generates a Facebook share URL for the current page\n */\nexport const getFacebookShareUrl = () => {\n if (!window.location.href) {\n return '#';\n }\n return `https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(window.location.href)}`;\n};\n\n/**\n * Returns an array of social sharing link configurations\n */\nexport const getSocialLinks = (intl: IntlShape) => [\n {\n id: 'twitter',\n destination: (courseAboutData: CourseAboutData) => getTwitterShareUrl(courseAboutData, intl),\n icon: BsTwitterXIcon,\n screenReaderText: intl.formatMessage(messages.socialSharingTwitter),\n },\n {\n id: 'facebook',\n destination: () => getFacebookShareUrl(),\n icon: BsFacebookIcon,\n screenReaderText: intl.formatMessage(messages.socialSharingFacebook),\n },\n {\n id: 'email',\n destination: (courseData: CourseAboutData) => getEmailShareUrl(courseData, intl),\n icon: EmailIcon,\n screenReaderText: intl.formatMessage(messages.socialSharingEmail),\n },\n];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/course-about/data/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface UseEnrollmentParamsTypes {\n onError: (msg: string) => void,\n errorMessage: string,\n}\n\nexport type EnrollmentFunctionTypes = (courseId: string, redirectUrl: string) => Promise<void>;\n\nexport interface HttpError {\n customAttributes?: {\n httpErrorStatus?: number,\n },\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/course-about/data/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface UseEnrollmentParamsTypes {\n onError: (msg: string) => void;\n errorMessage: string;\n}\n\nexport type EnrollmentFunctionTypes = (courseId: string, redirectUrl: string) => Promise<void>;\n\nexport interface HttpError {\n customAttributes?: {\n httpErrorStatus?: number;\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/course-about/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface CourseGoals {\n selectedGoal: string | null,\n weeklyLearningGoalEnabled: boolean,\n}\n\nexport interface Enrollment {\n mode: string | null,\n isActive: boolean,\n}\n\nexport interface EntranceExamData {\n entranceExamCurrentScore: number,\n entranceExamEnabled: boolean,\n entranceExamId: string,\n entranceExamMinimumScorePct: number,\n entranceExamPassed: boolean,\n}\n\nexport interface CourseImage {\n uri: string | null,\n}\n\nexport interface CourseVideo {\n uri: string | null,\n}\n\nexport interface CourseImageUrls {\n raw: string,\n small: string,\n large: string,\n}\n\nexport interface CourseMedia {\n courseImage: CourseImage,\n courseVideo: CourseVideo,\n image: CourseImageUrls,\n}\n\nexport interface CertificateData {\n certStatus: string,\n certWebViewUrl: string | null,\n downloadUrl: string | null,\n certificateAvailableDate: string | null,\n}\n\nexport interface Celebrations {\n firstSection: boolean,\n streakLengthToCelebrate: number | null,\n streakDiscountEnabled: boolean,\n weeklyGoal: boolean,\n}\n\nexport interface Notes {\n enabled: boolean,\n visible: boolean,\n}\n\nexport type SinglePaidMode = Record<string, any>;\n\nexport interface PrerequisiteCourse {\n key: string,\n display: string,\n shortDescription?: string,\n}\n\nexport interface OCWLink {\n title: string,\n url: string,\n description?: string,\n}\n\nexport interface CourseAboutData {\n accessExpiration: string | null,\n contentTypeGatingEnabled: boolean,\n courseGoals: CourseGoals,\n effort: string | null,\n end: string | null,\n enrollment: Enrollment,\n enrollmentStart: string | null,\n enrollmentEnd: string | null,\n entranceExamData: EntranceExamData,\n id: string,\n license: string | null,\n language: string,\n media: CourseMedia,\n name: string,\n offer: any | null,\n relatedPrograms: any[] | null,\n shortDescription: string,\n start: string,\n startDisplay: string | null,\n startType: string,\n pacing: string,\n userTimezone: string | null,\n showCalculator: boolean,\n canAccessProctoredExams: boolean,\n notes: Notes,\n marketingUrl: string | null,\n celebrations: Celebrations,\n userHasPassingGrade: boolean,\n courseExitPageIsActive: boolean,\n certificateData: CertificateData,\n verifyIdentityUrl: string | null,\n verificationStatus: string,\n linkedinAddToProfileUrl: string | null,\n isIntegritySignatureEnabled: boolean,\n userNeedsIntegritySignature: boolean,\n learningAssistantEnabled: boolean,\n showCoursewareLink: boolean,\n isCourseFull: boolean,\n canEnroll: boolean,\n invitationOnly: boolean,\n isShibCourse: boolean,\n allowAnonymous: boolean,\n ecommerceCheckout: boolean,\n singlePaidMode: SinglePaidMode,\n ecommerceCheckoutLink: string | null,\n courseImageUrls: string[],\n startDateIsStillDefault: boolean,\n advertisedStart: string | null,\n coursePrice: string,\n preRequisiteCourses: PrerequisiteCourse[],\n aboutSidebarHtml: string | null,\n displayNumberWithDefault: string,\n displayOrgWithDefault: string,\n overview: string,\n ocwLinks: OCWLink[],\n prerequisites: string[],\n requirements: string,\n}\n\nexport type CourseAboutDataPartial = Omit<Pick<CourseAboutData,\n | 'id'\n | 'name'\n | 'displayOrgWithDefault'\n | 'shortDescription'\n | 'enrollment'\n | 'isCourseFull'\n | 'invitationOnly'\n | 'canEnroll'\n | 'isShibCourse'\n | 'allowAnonymous'\n | 'showCoursewareLink'\n | 'singlePaidMode'\n | 'ecommerceCheckout'\n | 'ecommerceCheckoutLink'\n>, 'enrollment'> & {\n enrollment: EnrollmentPartial,\n};\n\nexport interface CourseMediaPartial {\n courseImage: CourseImage,\n courseVideo?: CourseVideo,\n}\n\nexport type EnrollmentPartial = Pick<Enrollment, 'isActive'>;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/course-about/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface CourseGoals {\n selectedGoal: string | null;\n weeklyLearningGoalEnabled: boolean;\n}\n\nexport interface Enrollment {\n mode: string | null;\n isActive: boolean;\n}\n\nexport interface EntranceExamData {\n entranceExamCurrentScore: number;\n entranceExamEnabled: boolean;\n entranceExamId: string;\n entranceExamMinimumScorePct: number;\n entranceExamPassed: boolean;\n}\n\nexport interface CourseImage {\n uri: string | null;\n}\n\nexport interface CourseVideo {\n uri: string | null;\n}\n\nexport interface CourseImageUrls {\n raw: string;\n small: string;\n large: string;\n}\n\nexport interface CourseMedia {\n courseImage: CourseImage;\n courseVideo: CourseVideo;\n image: CourseImageUrls;\n}\n\nexport interface CertificateData {\n certStatus: string;\n certWebViewUrl: string | null;\n downloadUrl: string | null;\n certificateAvailableDate: string | null;\n}\n\nexport interface Celebrations {\n firstSection: boolean;\n streakLengthToCelebrate: number | null;\n streakDiscountEnabled: boolean;\n weeklyGoal: boolean;\n}\n\nexport interface Notes {\n enabled: boolean;\n visible: boolean;\n}\n\nexport type SinglePaidMode = Record<string, any>;\n\nexport interface PrerequisiteCourse {\n key: string;\n display: string;\n shortDescription?: string;\n}\n\nexport interface OCWLink {\n title: string;\n url: string;\n description?: string;\n}\n\nexport interface CourseAboutData {\n accessExpiration: string | null;\n contentTypeGatingEnabled: boolean;\n courseGoals: CourseGoals;\n effort: string | null;\n end: string | null;\n enrollment: Enrollment;\n enrollmentStart: string | null;\n enrollmentEnd: string | null;\n entranceExamData: EntranceExamData;\n id: string;\n license: string | null;\n language: string;\n media: CourseMedia;\n name: string;\n offer: any | null;\n relatedPrograms: any[] | null;\n shortDescription: string;\n start: string;\n startDisplay: string | null;\n startType: string;\n pacing: string;\n userTimezone: string | null;\n showCalculator: boolean;\n canAccessProctoredExams: boolean;\n notes: Notes;\n marketingUrl: string | null;\n celebrations: Celebrations;\n userHasPassingGrade: boolean;\n courseExitPageIsActive: boolean;\n certificateData: CertificateData;\n verifyIdentityUrl: string | null;\n verificationStatus: string;\n linkedinAddToProfileUrl: string | null;\n isIntegritySignatureEnabled: boolean;\n userNeedsIntegritySignature: boolean;\n learningAssistantEnabled: boolean;\n showCoursewareLink: boolean;\n isCourseFull: boolean;\n canEnroll: boolean;\n invitationOnly: boolean;\n isShibCourse: boolean;\n allowAnonymous: boolean;\n ecommerceCheckout: boolean;\n singlePaidMode: SinglePaidMode;\n ecommerceCheckoutLink: string | null;\n courseImageUrls: string[];\n startDateIsStillDefault: boolean;\n advertisedStart: string | null;\n coursePrice: string;\n preRequisiteCourses: PrerequisiteCourse[];\n aboutSidebarHtml: string | null;\n displayNumberWithDefault: string;\n displayOrgWithDefault: string;\n overview: string;\n ocwLinks: OCWLink[];\n prerequisites: string[];\n requirements: string;\n}\n\nexport type CourseAboutDataPartial = Omit<Pick<CourseAboutData,\n | 'id'\n | 'name'\n | 'displayOrgWithDefault'\n | 'shortDescription'\n | 'enrollment'\n | 'isCourseFull'\n | 'invitationOnly'\n | 'canEnroll'\n | 'isShibCourse'\n | 'allowAnonymous'\n | 'showCoursewareLink'\n | 'singlePaidMode'\n | 'ecommerceCheckout'\n | 'ecommerceCheckoutLink'\n>, 'enrollment'> & {\n enrollment: EnrollmentPartial;\n};\n\nexport interface CourseMediaPartial {\n courseImage: CourseImage;\n courseVideo?: CourseVideo;\n}\n\nexport type EnrollmentPartial = Pick<Enrollment, 'isActive'>;\n"]}
@@ -12,12 +12,23 @@ import { getAuthenticatedHttpClient } from '@openedx/frontend-base';
12
12
  import { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from './constants';
13
13
  import { getCourseListSearchUrl } from './urls';
14
14
  import { addFiltersToFormData } from './utils';
15
+ /**
16
+ * Coerces a pagination value into an integer the search API can parse.
17
+ */
18
+ const toPaginationValue = (value, fallback, minimum) => {
19
+ if (typeof value === 'number' && Number.isInteger(value) && value >= minimum) {
20
+ return value;
21
+ }
22
+ return fallback;
23
+ };
15
24
  /**
16
25
  * Fetches course list search data from the API.
17
26
  * @async
18
27
  */
19
28
  export const fetchCourseListSearch = (params) => __awaiter(void 0, void 0, void 0, function* () {
20
- const { pageSize = DEFAULT_PAGE_SIZE, pageIndex = DEFAULT_PAGE_INDEX, enableCourseSortingByStartDate = false, filters = {}, searchString = '', } = params;
29
+ const { enableCourseSortingByStartDate = false, filters = {}, searchString = '', } = params;
30
+ const pageSize = toPaginationValue(params.pageSize, DEFAULT_PAGE_SIZE, 1);
31
+ const pageIndex = toPaginationValue(params.pageIndex, DEFAULT_PAGE_INDEX, 0);
21
32
  const formData = new FormData();
22
33
  formData.append('page_size', String(pageSize));
23
34
  formData.append('page_index', String(pageIndex));
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/data/course-list-search/api.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAO,MAAM,EAAqC,EAAE;IACvF,MAAM,EACJ,QAAQ,GAAG,iBAAiB,EAC5B,SAAS,GAAG,kBAAkB,EAC9B,8BAA8B,GAAG,KAAK,EACtC,OAAO,GAAG,EAAE,EACZ,YAAY,GAAG,EAAE,GAClB,GAAG,MAAM,CAAC;IAEX,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;IAEhC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACjD,QAAQ,CAAC,MAAM,CAAC,qCAAqC,EAAE,MAAM,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAE/F,IAAI,YAAY,EAAE,CAAC;QACjB,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;IACjD,CAAC;IAED,oBAAoB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAExC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,0BAA0B,EAAE;SAChD,IAAI,CAAC,sBAAsB,EAAE,EAAE,QAAQ,CAAC,CAAC;IAE5C,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC,CAAA,CAAC","sourcesContent":["import { camelCaseObject } from '@openedx/frontend-base';\nimport { getAuthenticatedHttpClient } from '@openedx/frontend-base';\n\nimport { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from './constants';\nimport { getCourseListSearchUrl } from './urls';\nimport { addFiltersToFormData } from './utils';\n\nimport type { CourseListSearchResponse } from './types';\n\n/**\n * Fetches course list search data from the API.\n * @async\n */\nexport const fetchCourseListSearch = async (params): Promise<CourseListSearchResponse> => {\n const {\n pageSize = DEFAULT_PAGE_SIZE,\n pageIndex = DEFAULT_PAGE_INDEX,\n enableCourseSortingByStartDate = false,\n filters = {},\n searchString = '',\n } = params;\n\n const formData = new FormData();\n\n formData.append('page_size', String(pageSize));\n formData.append('page_index', String(pageIndex));\n formData.append('enable_course_sorting_by_start_date', String(enableCourseSortingByStartDate));\n\n if (searchString) {\n formData.append('search_string', searchString);\n }\n\n addFiltersToFormData(formData, filters);\n\n const { data } = await getAuthenticatedHttpClient()\n .post(getCourseListSearchUrl(), formData);\n\n return camelCaseObject(data);\n};\n"]}
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/data/course-list-search/api.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAI/C;;GAEG;AACH,MAAM,iBAAiB,GAAG,CAAC,KAAc,EAAE,QAAgB,EAAE,OAAe,EAAU,EAAE;IACtF,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,OAAO,EAAE,CAAC;QAC7E,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAO,MAAM,EAAqC,EAAE;IACvF,MAAM,EACJ,8BAA8B,GAAG,KAAK,EACtC,OAAO,GAAG,EAAE,EACZ,YAAY,GAAG,EAAE,GAClB,GAAG,MAAM,CAAC;IAEX,MAAM,QAAQ,GAAG,iBAAiB,CAAC,MAAM,CAAC,QAAQ,EAAE,iBAAiB,EAAE,CAAC,CAAC,CAAC;IAC1E,MAAM,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,SAAS,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC;IAE7E,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;IAEhC,QAAQ,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC/C,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC;IACjD,QAAQ,CAAC,MAAM,CAAC,qCAAqC,EAAE,MAAM,CAAC,8BAA8B,CAAC,CAAC,CAAC;IAE/F,IAAI,YAAY,EAAE,CAAC;QACjB,QAAQ,CAAC,MAAM,CAAC,eAAe,EAAE,YAAY,CAAC,CAAC;IACjD,CAAC;IAED,oBAAoB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAExC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,0BAA0B,EAAE;SAChD,IAAI,CAAC,sBAAsB,EAAE,EAAE,QAAQ,CAAC,CAAC;IAE5C,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC;AAC/B,CAAC,CAAA,CAAC","sourcesContent":["import { camelCaseObject } from '@openedx/frontend-base';\nimport { getAuthenticatedHttpClient } from '@openedx/frontend-base';\n\nimport { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from './constants';\nimport { getCourseListSearchUrl } from './urls';\nimport { addFiltersToFormData } from './utils';\n\nimport type { CourseListSearchResponse } from './types';\n\n/**\n * Coerces a pagination value into an integer the search API can parse.\n */\nconst toPaginationValue = (value: unknown, fallback: number, minimum: number): number => {\n if (typeof value === 'number' && Number.isInteger(value) && value >= minimum) {\n return value;\n }\n\n return fallback;\n};\n\n/**\n * Fetches course list search data from the API.\n * @async\n */\nexport const fetchCourseListSearch = async (params): Promise<CourseListSearchResponse> => {\n const {\n enableCourseSortingByStartDate = false,\n filters = {},\n searchString = '',\n } = params;\n\n const pageSize = toPaginationValue(params.pageSize, DEFAULT_PAGE_SIZE, 1);\n const pageIndex = toPaginationValue(params.pageIndex, DEFAULT_PAGE_INDEX, 0);\n\n const formData = new FormData();\n\n formData.append('page_size', String(pageSize));\n formData.append('page_index', String(pageIndex));\n formData.append('enable_course_sorting_by_start_date', String(enableCourseSortingByStartDate));\n\n if (searchString) {\n formData.append('search_string', searchString);\n }\n\n addFiltersToFormData(formData, filters);\n\n const { data } = await getAuthenticatedHttpClient()\n .post(getCourseListSearchUrl(), formData);\n\n return camelCaseObject(data);\n};\n"]}
@@ -24,13 +24,14 @@ export const useCourseListSearch = ({ pageSize = DEFAULT_PAGE_SIZE, pageIndex =
24
24
  */
25
25
  const fetchData = useCallback((newParams) => {
26
26
  const transformedFilters = transformDataTableFilters(newParams.filters);
27
- const transformedParams = {
28
- pageSize: newParams.pageSize,
29
- pageIndex: newParams.pageIndex,
30
- filters: transformedFilters,
31
- searchString: newParams.searchString || '',
32
- };
33
27
  setParams(prevParams => {
28
+ const transformedParams = {
29
+ pageSize: newParams.pageSize,
30
+ pageIndex: newParams.pageIndex,
31
+ enableCourseSortingByStartDate: prevParams.enableCourseSortingByStartDate,
32
+ filters: transformedFilters,
33
+ searchString: newParams.searchString || '',
34
+ };
34
35
  const hasChanged = JSON.stringify(prevParams) !== JSON.stringify(transformedParams);
35
36
  return hasChanged ? transformedParams : prevParams;
36
37
  });
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/course-list-search/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAIpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC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ACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,IAAI;QACJ,SAAS;QACT,OAAO;QACP,KAAK;QACL,SAAS;QACT,UAAU;KACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useQuery } from '@tanstack/react-query';\nimport { useState, useCallback } from 'react';\n\nimport { fetchCourseListSearch } from './api';\nimport { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from './constants';\nimport type {\n CourseListSearchResponse, CourseListSearchParams, CourseListSearchHook, DataTableParams,\n} from './types';\nimport { transformDataTableFilters } from './utils';\n\n/**\n * A React Query hook that fetches course list search data.\n */\nexport const useCourseListSearch = ({\n pageSize = DEFAULT_PAGE_SIZE,\n pageIndex = DEFAULT_PAGE_INDEX,\n enableCourseSortingByStartDate = false,\n filters = {},\n searchString = '',\n}: Partial<CourseListSearchParams> = {}): CourseListSearchHook => {\n const [params, setParams] = useState<CourseListSearchParams>({\n pageSize,\n pageIndex,\n enableCourseSortingByStartDate,\n filters,\n searchString,\n });\n\n const {\n data, isLoading, isError, error, isFetching,\n } = useQuery<CourseListSearchResponse, Error>({\n queryKey: ['courseListSearch', params],\n queryFn: () => fetchCourseListSearch(params),\n placeholderData: (previousData) => previousData,\n });\n\n /**\n * Updates query params and triggers data refetch if params have changed.\n */\n const fetchData = useCallback((newParams: DataTableParams & { searchString?: string }) => {\n const transformedFilters = transformDataTableFilters(newParams.filters);\n\n const transformedParams: CourseListSearchParams = {\n pageSize: newParams.pageSize,\n pageIndex: newParams.pageIndex,\n filters: transformedFilters,\n searchString: newParams.searchString || '',\n };\n\n setParams(prevParams => {\n const hasChanged = JSON.stringify(prevParams) !== JSON.stringify(transformedParams);\n return hasChanged ? transformedParams : prevParams;\n });\n }, []);\n\n return {\n data,\n isLoading,\n isError,\n error,\n fetchData,\n isFetching,\n };\n};\n"]}
1
+ {"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../../src/data/course-list-search/hooks.ts"],"names":[],"mappings":"AAAA,O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AAU,CAAC,8BAA8B;gBACzE,OAAO,EAAE,kBAAkB;gBAC3B,YAAY,EAAE,SAAS,CAAC,YAAY,IAAI,EAAE;aAC3C,CAAC;YAEF,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;YACpF,OAAO,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,UAAU,CAAC;QACrD,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO;QACL,IAAI;QACJ,SAAS;QACT,OAAO;QACP,KAAK;QACL,SAAS;QACT,UAAU;KACX,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { useQuery } from '@tanstack/react-query';\nimport { useState, useCallback } from 'react';\n\nimport { fetchCourseListSearch } from './api';\nimport { DEFAULT_PAGE_SIZE, DEFAULT_PAGE_INDEX } from './constants';\nimport type {\n CourseListSearchResponse, CourseListSearchParams, CourseListSearchHook, DataTableParams,\n} from './types';\nimport { transformDataTableFilters } from './utils';\n\n/**\n * A React Query hook that fetches course list search data.\n */\nexport const useCourseListSearch = ({\n pageSize = DEFAULT_PAGE_SIZE,\n pageIndex = DEFAULT_PAGE_INDEX,\n enableCourseSortingByStartDate = false,\n filters = {},\n searchString = '',\n}: Partial<CourseListSearchParams> = {}): CourseListSearchHook => {\n const [params, setParams] = useState<CourseListSearchParams>({\n pageSize,\n pageIndex,\n enableCourseSortingByStartDate,\n filters,\n searchString,\n });\n\n const {\n data, isLoading, isError, error, isFetching,\n } = useQuery<CourseListSearchResponse, Error>({\n queryKey: ['courseListSearch', params],\n queryFn: () => fetchCourseListSearch(params),\n placeholderData: (previousData) => previousData,\n });\n\n /**\n * Updates query params and triggers data refetch if params have changed.\n */\n const fetchData = useCallback((newParams: DataTableParams & { searchString?: string }) => {\n const transformedFilters = transformDataTableFilters(newParams.filters);\n\n setParams(prevParams => {\n const transformedParams: CourseListSearchParams = {\n pageSize: newParams.pageSize,\n pageIndex: newParams.pageIndex,\n enableCourseSortingByStartDate: prevParams.enableCourseSortingByStartDate,\n filters: transformedFilters,\n searchString: newParams.searchString || '',\n };\n\n const hasChanged = JSON.stringify(prevParams) !== JSON.stringify(transformedParams);\n return hasChanged ? transformedParams : prevParams;\n });\n }, []);\n\n return {\n data,\n isLoading,\n isError,\n error,\n fetchData,\n isFetching,\n };\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/data/course-list-search/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface CourseListSearchResponse {\n took: number,\n total: number,\n results: {\n id: string,\n index: string,\n type: string,\n title: string,\n data: {\n id: string,\n course: string,\n start: string,\n imageUrl: string,\n org: string,\n orgImageUrl?: string,\n advertisedStart?: string,\n content: {\n displayName: string,\n overview?: string,\n number?: string,\n },\n number: string,\n modes: string[],\n language: string,\n catalogVisibility: string,\n },\n }[],\n aggs: Record<string, {\n terms: Record<string, number>,\n total: number,\n other: number,\n }>,\n maxScore: number,\n}\n\nexport type Aggregations = Record<string, {\n terms: Record<string, number>,\n}>;\n\nexport interface CourseListSearchParams {\n pageSize?: number,\n pageIndex?: number,\n filters?: Record<string, string[]>,\n enableCourseSortingByStartDate?: boolean,\n searchString?: string,\n}\n\nexport interface DataTableParams {\n pageSize?: number,\n pageIndex?: number,\n filters?: {\n id: string,\n value: string | string[],\n }[],\n searchString?: string,\n}\n\nexport interface CourseListSearchHook {\n data: CourseListSearchResponse | undefined,\n isLoading: boolean,\n isFetching: boolean,\n isError: boolean,\n error: Error | null,\n fetchData: (params: DataTableParams) => void,\n}\n\nexport interface DataTableFilter {\n id: string,\n value: string | string[],\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/data/course-list-search/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface CourseListSearchResponse {\n took: number;\n total: number;\n results: {\n id: string;\n index: string;\n type: string;\n title: string;\n data: {\n id: string;\n course: string;\n start: string;\n imageUrl: string;\n org: string;\n orgImageUrl?: string;\n advertisedStart?: string;\n content: {\n displayName: string;\n overview?: string;\n number?: string;\n };\n number: string;\n modes: string[];\n language: string;\n catalogVisibility: string;\n };\n }[];\n aggs: Record<string, {\n terms: Record<string, number>;\n total: number;\n other: number;\n }>;\n maxScore: number;\n}\n\nexport type Aggregations = Record<string, {\n terms: Record<string, number>;\n}>;\n\nexport interface CourseListSearchParams {\n pageSize?: number;\n pageIndex?: number;\n filters?: Record<string, string[]>;\n enableCourseSortingByStartDate?: boolean;\n searchString?: string;\n}\n\nexport interface DataTableParams {\n pageSize?: number;\n pageIndex?: number;\n filters?: {\n id: string;\n value: string | string[];\n }[];\n searchString?: string;\n}\n\nexport interface CourseListSearchHook {\n data: CourseListSearchResponse | undefined;\n isLoading: boolean;\n isFetching: boolean;\n isError: boolean;\n error: Error | null;\n fetchData: (params: DataTableParams) => void;\n}\n\nexport interface DataTableFilter {\n id: string;\n value: string | string[];\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/generic/alert-notification/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface AlertNotificationProps {\n variant?: 'info' | 'warning',\n title: string,\n message: string,\n className?: string,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/generic/alert-notification/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface AlertNotificationProps {\n variant?: 'info' | 'warning';\n title: string;\n message: string;\n className?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/generic/course-card/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface CourseContent {\n displayName: string,\n overview?: string,\n number?: string,\n}\n\nexport interface CourseData {\n id: string,\n course: string,\n start: string,\n imageUrl: string,\n org: string,\n orgImageUrl?: string,\n advertisedStart?: string,\n content: CourseContent,\n number: string,\n modes: string[],\n language: string,\n catalogVisibility: string,\n}\n\nexport interface Course {\n id: string,\n index?: string,\n type?: string,\n data: CourseData,\n}\n\nexport interface CourseCardProps {\n isLoading?: boolean,\n courseId?: string,\n courseOrg?: string,\n courseName?: string,\n courseNumber?: string,\n courseImageUrl?: string,\n courseStartDate?: string,\n courseAdvertisedStart?: string,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/generic/course-card/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface CourseContent {\n displayName: string;\n overview?: string;\n number?: string;\n}\n\nexport interface CourseData {\n id: string;\n course: string;\n start: string;\n imageUrl: string;\n org: string;\n orgImageUrl?: string;\n advertisedStart?: string;\n content: CourseContent;\n number: string;\n modes: string[];\n language: string;\n catalogVisibility: string;\n}\n\nexport interface Course {\n id: string;\n index?: string;\n type?: string;\n data: CourseData;\n}\n\nexport interface CourseCardProps {\n isLoading?: boolean;\n courseId?: string;\n courseOrg?: string;\n courseName?: string;\n courseNumber?: string;\n courseImageUrl?: string;\n courseStartDate?: string;\n courseAdvertisedStart?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/generic/loading-spinner/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface LoadingSpinnerProps {\n size?: 'sm' | undefined,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/generic/loading-spinner/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface LoadingSpinnerProps {\n size?: 'sm' | undefined;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/generic/sub-header/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface SubHeaderProps {\n title: string,\n className?: string,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/generic/sub-header/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface SubHeaderProps {\n title: string;\n className?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/generic/video-modal/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface VideoModalProps {\n children: React.ReactNode,\n isOpen: boolean,\n close: () => void,\n size?: 'sm' | 'md' | 'lg',\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/generic/video-modal/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface VideoModalProps {\n children: React.ReactNode;\n isOpen: boolean;\n close: () => void;\n size?: 'sm' | 'md' | 'lg';\n}\n"]}
@@ -8,6 +8,7 @@ import { DEFAULT_PAGE_INDEX } from '../../../data/course-list-search/constants';
8
8
  import HomeCourseCardSlot from '../../../slots/HomeCourseCardSlot';
9
9
  import { LoaderSlot } from '../../../slots/LoaderSlot';
10
10
  import { appId, coursesRole } from '../../../constants';
11
+ import { getCountConfig, getStringConfig } from '../../../config';
11
12
  import { DEFAULT_COURSES_COUNT } from '../../../home/constants';
12
13
  import messages from './messages';
13
14
  const CARD_GRID_LAYOUT = {
@@ -17,7 +18,7 @@ const CoursesList = () => {
17
18
  var _a, _b;
18
19
  const intl = useIntl();
19
20
  const navigate = useNavigate();
20
- const maxCourses = getAppConfig(appId).HOMEPAGE_COURSE_MAX || DEFAULT_COURSES_COUNT;
21
+ const maxCourses = getCountConfig('HOMEPAGE_COURSE_MAX', DEFAULT_COURSES_COUNT);
21
22
  const { data: courseData, isLoading: isCoursesLoading, isError: isCoursesError, } = useCourseListSearch({
22
23
  pageSize: maxCourses,
23
24
  pageIndex: DEFAULT_PAGE_INDEX,
@@ -38,7 +39,7 @@ const CoursesList = () => {
38
39
  , {
39
40
  // @ts-expect-error frontend-base ErrorPage declares message?: null but renders the prop as text. Remove when typing is fixed upstream.
40
41
  message: intl.formatMessage(messages.errorMessage, {
41
- supportEmail: getAppConfig(appId).INFO_EMAIL,
42
+ supportEmail: getStringConfig('INFO_EMAIL'),
42
43
  }) }) }) }));
43
44
  }
44
45
  if (getAppConfig(appId).NON_BROWSABLE_COURSES) {
@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S,EAAC,MAAM,EAChB,IAAI,EAAC,IAAI,iBACG,cAAc,YAEzB,CAAC,CAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,0CAAE,MAAM,CAAA,CAAC,CAAC,CAAC,CAC9B,KAAC,iBAAiB,IAChB,SAAS,EAAC,MAAM,EAChB,OAAO,EAAC,MAAM,EACd,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EACtD,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,yBAAyB,CAAC,GAC/D,CACH,CAAC,CAAC,CAAC,CACF,MAAC,SAAS,IAAC,SAAS,EAAC,aAAa,aAChC,KAAC,QAAQ,IAAC,WAAW,EAAE,gBAAgB,YACpC,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,0CAAE,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAClC,KAAC,kBAAkB,IAAiB,QAAQ,EAAE,MAAM,IAA3B,MAAM,CAAC,EAAE,CAAsB,CACzD,CAAC,GACO,EACV,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,IAAG,UAAU,IAAI,CACjC,KAAC,MAAM,IACL,SAAS,EAAC,MAAM,EAChB,OAAO,EAAC,OAAO,EACf,OAAO,EAAE,2BAA2B,YAEnC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAC3C,CACV,IACS,CACb,GACS,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import {\n ErrorPage, getAppConfig, getUrlByRouteRole, useIntl,\n} from '@openedx/frontend-base';\nimport {\n Alert, Button, CardGrid, Container,\n} from '@openedx/paragon';\nimport { useNavigate } from 'react-router';\n\nimport { useCourseListSearch } from '@src/data/course-list-search/hooks';\nimport { AlertNotification } from '@src/generic';\nimport { DEFAULT_PAGE_INDEX } from '@src/data/course-list-search/constants';\nimport HomeCourseCardSlot from '@src/slots/HomeCourseCardSlot';\nimport { LoaderSlot } from '@src/slots/LoaderSlot';\nimport { appId, coursesRole } from '@src/constants';\nimport { DEFAULT_COURSES_COUNT } from '@src/home/constants';\n\nimport messages from './messages';\n\nconst CARD_GRID_LAYOUT = {\n xs: 12, md: 6, lg: 4, xl: 3,\n};\n\nconst CoursesList = () => {\n const intl = useIntl();\n const navigate = useNavigate();\n\n const maxCourses = (getAppConfig(appId).HOMEPAGE_COURSE_MAX as number | undefined) || DEFAULT_COURSES_COUNT;\n\n const {\n data: courseData,\n isLoading: isCoursesLoading,\n isError: isCoursesError,\n } = useCourseListSearch({\n pageSize: maxCourses,\n pageIndex: DEFAULT_PAGE_INDEX,\n enableCourseSortingByStartDate: getAppConfig(appId).ENABLE_COURSE_SORTING_BY_START_DATE === true,\n });\n\n const handleNavigateToCoursesPage = () => {\n const coursesUrl = getUrlByRouteRole(coursesRole);\n if (coursesUrl) {\n navigate(coursesUrl);\n }\n };\n\n if (isCoursesLoading) {\n return (\n <Container className=\"py-6\" size=\"xl\" data-testid=\"courses-list-loading\">\n <LoaderSlot>\n <CardGrid columnSizes={CARD_GRID_LAYOUT}>\n {Array.from({ length: maxCourses }, (_, index) => (\n <HomeCourseCardSlot key={`courses-list-loading-skeleton-card-${index}`} isLoading />\n ))}\n </CardGrid>\n </LoaderSlot>\n </Container>\n );\n }\n\n if (isCoursesError) {\n return (\n <Container className=\"py-6\" size=\"xl\">\n <Alert className=\"my-0\" variant=\"danger\">\n <ErrorPage\n // @ts-expect-error frontend-base ErrorPage declares message?: null but renders the prop as text. Remove when typing is fixed upstream.\n message={intl.formatMessage(messages.errorMessage, {\n supportEmail: getAppConfig(appId).INFO_EMAIL as string,\n })}\n />\n </Alert>\n </Container>\n );\n }\n\n if (getAppConfig(appId).NON_BROWSABLE_COURSES) {\n return null;\n }\n\n return (\n <Container\n className=\"py-6\"\n size=\"xl\"\n data-testid=\"courses-list\"\n >\n {!courseData?.results?.length ? (\n <AlertNotification\n className=\"my-0\"\n variant=\"info\"\n title={intl.formatMessage(messages.noCoursesAvailable)}\n message={intl.formatMessage(messages.noCoursesAvailableMessage)}\n />\n ) : (\n <Container className=\"text-center\">\n <CardGrid columnSizes={CARD_GRID_LAYOUT}>\n {courseData?.results?.map(course => (\n <HomeCourseCardSlot key={course.id} original={course} />\n ))}\n </CardGrid>\n {courseData?.total > maxCourses && (\n <Button\n className=\"mt-3\"\n variant=\"brand\"\n onClick={handleNavigateToCoursesPage}\n >\n {intl.formatMessage(messages.viewAllCoursesButton)}\n </Button>\n )}\n </Container>\n )}\n </Container>\n );\n};\n\nexport default CoursesList;\n"]}
1
+ {"version":3,"file":"CoursesList.js","sourceRoot":"","sources":["../../../../src/home/components/courses-list/CoursesList.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,SAAS,EAAE,YAAY,EAAE,iBAAiB,EAAE,OAAO,GACpD,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,GACnC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE5D,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,gBAAgB,GAAG;IACvB,EAAE,EAAE,EAAE,E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AC,OAAO,EACf,OAAO,EAAE,2BAA2B,YAEnC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,oBAAoB,CAAC,GAC3C,CACV,IACS,CACb,GACS,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import {\n ErrorPage, getAppConfig, getUrlByRouteRole, useIntl,\n} from '@openedx/frontend-base';\nimport {\n Alert, Button, CardGrid, Container,\n} from '@openedx/paragon';\nimport { useNavigate } from 'react-router';\n\nimport { useCourseListSearch } from '@src/data/course-list-search/hooks';\nimport { AlertNotification } from '@src/generic';\nimport { DEFAULT_PAGE_INDEX } from '@src/data/course-list-search/constants';\nimport HomeCourseCardSlot from '@src/slots/HomeCourseCardSlot';\nimport { LoaderSlot } from '@src/slots/LoaderSlot';\nimport { appId, coursesRole } from '@src/constants';\nimport { getCountConfig, getStringConfig } from '@src/config';\nimport { DEFAULT_COURSES_COUNT } from '@src/home/constants';\n\nimport messages from './messages';\n\nconst CARD_GRID_LAYOUT = {\n xs: 12, md: 6, lg: 4, xl: 3,\n};\n\nconst CoursesList = () => {\n const intl = useIntl();\n const navigate = useNavigate();\n\n const maxCourses = getCountConfig('HOMEPAGE_COURSE_MAX', DEFAULT_COURSES_COUNT);\n\n const {\n data: courseData,\n isLoading: isCoursesLoading,\n isError: isCoursesError,\n } = useCourseListSearch({\n pageSize: maxCourses,\n pageIndex: DEFAULT_PAGE_INDEX,\n enableCourseSortingByStartDate: getAppConfig(appId).ENABLE_COURSE_SORTING_BY_START_DATE === true,\n });\n\n const handleNavigateToCoursesPage = () => {\n const coursesUrl = getUrlByRouteRole(coursesRole);\n if (coursesUrl) {\n navigate(coursesUrl);\n }\n };\n\n if (isCoursesLoading) {\n return (\n <Container className=\"py-6\" size=\"xl\" data-testid=\"courses-list-loading\">\n <LoaderSlot>\n <CardGrid columnSizes={CARD_GRID_LAYOUT}>\n {Array.from({ length: maxCourses }, (_, index) => (\n <HomeCourseCardSlot key={`courses-list-loading-skeleton-card-${index}`} isLoading />\n ))}\n </CardGrid>\n </LoaderSlot>\n </Container>\n );\n }\n\n if (isCoursesError) {\n return (\n <Container className=\"py-6\" size=\"xl\">\n <Alert className=\"my-0\" variant=\"danger\">\n <ErrorPage\n // @ts-expect-error frontend-base ErrorPage declares message?: null but renders the prop as text. Remove when typing is fixed upstream.\n message={intl.formatMessage(messages.errorMessage, {\n supportEmail: getStringConfig('INFO_EMAIL'),\n })}\n />\n </Alert>\n </Container>\n );\n }\n\n if (getAppConfig(appId).NON_BROWSABLE_COURSES) {\n return null;\n }\n\n return (\n <Container\n className=\"py-6\"\n size=\"xl\"\n data-testid=\"courses-list\"\n >\n {!courseData?.results?.length ? (\n <AlertNotification\n className=\"my-0\"\n variant=\"info\"\n title={intl.formatMessage(messages.noCoursesAvailable)}\n message={intl.formatMessage(messages.noCoursesAvailableMessage)}\n />\n ) : (\n <Container className=\"text-center\">\n <CardGrid columnSizes={CARD_GRID_LAYOUT}>\n {courseData?.results?.map(course => (\n <HomeCourseCardSlot key={course.id} original={course} />\n ))}\n </CardGrid>\n {courseData?.total > maxCourses && (\n <Button\n className=\"mt-3\"\n variant=\"brand\"\n onClick={handleNavigateToCoursesPage}\n >\n {intl.formatMessage(messages.viewAllCoursesButton)}\n </Button>\n )}\n </Container>\n )}\n </Container>\n );\n};\n\nexport default CoursesList;\n"]}
@@ -3,6 +3,7 @@ import { useState } from 'react';
3
3
  import { useNavigate } from 'react-router';
4
4
  import { getAppConfig, getUrlByRouteRole, useIntl } from '@openedx/frontend-base';
5
5
  import { Form, useToggle, SearchField, Container, } from '@openedx/paragon';
6
+ import { getStringConfig } from '../../../config';
6
7
  import { appId, coursesRole } from '../../../constants';
7
8
  import HomeOverlayHtmlSlot from '../../../slots/HomeOverlayHtmlSlot';
8
9
  import { HomePromoVideoButtonSlot, HomePromoVideoModalSlot } from '../../../slots/HomePromoVideoSlots';
@@ -19,7 +20,7 @@ const HomeBanner = () => {
19
20
  }
20
21
  };
21
22
  const searchField = getAppConfig(appId).ENABLE_COURSE_DISCOVERY === true && (_jsx(Form.Group, { className: "mt-4.5", children: _jsx(SearchField, { placeholder: intl.formatMessage(messages.searchPlaceholder), value: searchValue, submitButtonLocation: "external", onChange: (value) => setSearchValue(value), onSubmit: handleSearch }) }));
22
- return (_jsxs("section", { className: "home-banner d-flex justify-content-center align-items-center position-relative overflow-hidden", "data-testid": "home-banner", children: [_jsxs("div", { className: "animation-wrapper d-flex justify-content-center align-items-center flex-column p-4 my-5", children: [_jsx(HomeOverlayHtmlSlot, {}), _jsx(HomePromoVideoButtonSlot, { onClick: open }), _jsx(Container, { size: "sm", children: searchField })] }), _jsx(HomePromoVideoModalSlot, { isOpen: isOpen, close: close, videoId: getAppConfig(appId).HOMEPAGE_PROMO_VIDEO_YOUTUBE_ID || '' })] }));
23
+ return (_jsxs("section", { className: "home-banner d-flex justify-content-center align-items-center position-relative overflow-hidden", "data-testid": "home-banner", children: [_jsxs("div", { className: "animation-wrapper d-flex justify-content-center align-items-center flex-column p-4 my-5", children: [_jsx(HomeOverlayHtmlSlot, {}), _jsx(HomePromoVideoButtonSlot, { onClick: open }), _jsx(Container, { size: "sm", children: searchField })] }), _jsx(HomePromoVideoModalSlot, { isOpen: isOpen, close: close, videoId: getStringConfig('HOMEPAGE_PROMO_VIDEO_YOUTUBE_ID') })] }));
23
24
  };
24
25
  export default HomeBanner;
25
26
  //# sourceMappingURL=HomeBanner.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HomeBanner.js","sourceRoot":"","sources":["../../../../src/home/components/home-banner/HomeBanner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EACL,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,GACx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ACtG,KAAC,mBAAmB,KAAG,EACvB,KAAC,wBAAwB,IAAC,OAAO,EAAE,IAAI,GAAI,EAC3C,KAAC,SAAS,IAAC,IAAI,EAAC,IAAI,YACjB,WAAW,GACF,IACR,EACN,KAAC,uBAAuB,IACtB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,OAAO,EAAG,YAAY,CAAC,KAAK,CAAC,CAAC,+BAAsD,IAAI,EAAE,GAC1F,IACM,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { useState } from 'react';\nimport { useNavigate } from 'react-router';\nimport { getAppConfig, getUrlByRouteRole, useIntl } from '@openedx/frontend-base';\nimport {\n Form, useToggle, SearchField, Container,\n} from '@openedx/paragon';\n\nimport { appId, coursesRole } from '@src/constants';\nimport HomeOverlayHtmlSlot from '@src/slots/HomeOverlayHtmlSlot';\nimport { HomePromoVideoButtonSlot, HomePromoVideoModalSlot } from '@src/slots/HomePromoVideoSlots';\n\nimport messages from './messages';\n\nconst HomeBanner = () => {\n const intl = useIntl();\n const navigate = useNavigate();\n const [searchValue, setSearchValue] = useState('');\n const [isOpen, open, close] = useToggle(false);\n\n const handleSearch = () => {\n const coursesUrl = getUrlByRouteRole(coursesRole);\n if (coursesUrl) {\n navigate(`${coursesUrl}?search_query=${searchValue}`);\n }\n };\n\n const searchField = getAppConfig(appId).ENABLE_COURSE_DISCOVERY === true && (\n <Form.Group className=\"mt-4.5\">\n <SearchField\n placeholder={intl.formatMessage(messages.searchPlaceholder)}\n value={searchValue}\n submitButtonLocation=\"external\"\n onChange={(value: string) => setSearchValue(value)}\n onSubmit={handleSearch}\n />\n </Form.Group>\n );\n\n return (\n <section\n className=\"home-banner d-flex justify-content-center align-items-center position-relative overflow-hidden\"\n data-testid=\"home-banner\"\n >\n <div className=\"animation-wrapper d-flex justify-content-center align-items-center flex-column p-4 my-5\">\n <HomeOverlayHtmlSlot />\n <HomePromoVideoButtonSlot onClick={open} />\n <Container size=\"sm\">\n {searchField}\n </Container>\n </div>\n <HomePromoVideoModalSlot\n isOpen={isOpen}\n close={close}\n videoId={(getAppConfig(appId).HOMEPAGE_PROMO_VIDEO_YOUTUBE_ID as string | undefined) || ''}\n />\n </section>\n );\n};\n\nexport default HomeBanner;\n"]}
1
+ {"version":3,"file":"HomeBanner.js","sourceRoot":"","sources":["../../../../src/home/components/home-banner/HomeBanner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAClF,OAAO,EACL,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,GACxC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAEnG,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,MAAM,UAAU,GAAG,GAAG,EAAE;IACtB,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IACnD,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAE/C,MAAM,YAAY,GAAG,GAAG,EAAE;QACxB,MAAM,UAAU,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;QAClD,IAAI,UAAU,EAAE,CAAC;YACf,QAAQ,CAAC,GAAG,UAAU,iBAAiB,WAAW,EAAE,CAAC,CAAC;QACxD,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,WAAW,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,uBAAuB,KAAK,IAAI,IAAI,CAC1E,KAAC,IAAI,CAAC,KAAK,IAAC,SAAS,EAAC,QAAQ,YAC5B,KAAC,WAAW,IACV,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAC3D,KAAK,EAAE,WAAW,EAClB,oBAAoB,EAAC,UAAU,EAC/B,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,cAAc,CAAC,KAAK,CAAC,EAClD,QAAQ,EAAE,YAAY,GACtB,GACS,CACd,CAAC;IAEF,OAAO,CACL,mBACE,SAAS,EAAC,gGAAgG,iBAC9F,aAAa,aAEzB,eAAK,SAAS,EAAC,yFAAyF,aACtG,KAAC,mBAAmB,KAAG,EACvB,KAAC,wBAAwB,IAAC,OAAO,EAAE,IAAI,GAAI,EAC3C,KAAC,SAAS,IAAC,IAAI,EAAC,IAAI,YACjB,WAAW,GACF,IACR,EACN,KAAC,uBAAuB,IACtB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,eAAe,CAAC,iCAAiC,CAAC,GAC3D,IACM,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { useState } from 'react';\nimport { useNavigate } from 'react-router';\nimport { getAppConfig, getUrlByRouteRole, useIntl } from '@openedx/frontend-base';\nimport {\n Form, useToggle, SearchField, Container,\n} from '@openedx/paragon';\n\nimport { getStringConfig } from '@src/config';\nimport { appId, coursesRole } from '@src/constants';\nimport HomeOverlayHtmlSlot from '@src/slots/HomeOverlayHtmlSlot';\nimport { HomePromoVideoButtonSlot, HomePromoVideoModalSlot } from '@src/slots/HomePromoVideoSlots';\n\nimport messages from './messages';\n\nconst HomeBanner = () => {\n const intl = useIntl();\n const navigate = useNavigate();\n const [searchValue, setSearchValue] = useState('');\n const [isOpen, open, close] = useToggle(false);\n\n const handleSearch = () => {\n const coursesUrl = getUrlByRouteRole(coursesRole);\n if (coursesUrl) {\n navigate(`${coursesUrl}?search_query=${searchValue}`);\n }\n };\n\n const searchField = getAppConfig(appId).ENABLE_COURSE_DISCOVERY === true && (\n <Form.Group className=\"mt-4.5\">\n <SearchField\n placeholder={intl.formatMessage(messages.searchPlaceholder)}\n value={searchValue}\n submitButtonLocation=\"external\"\n onChange={(value: string) => setSearchValue(value)}\n onSubmit={handleSearch}\n />\n </Form.Group>\n );\n\n return (\n <section\n className=\"home-banner d-flex justify-content-center align-items-center position-relative overflow-hidden\"\n data-testid=\"home-banner\"\n >\n <div className=\"animation-wrapper d-flex justify-content-center align-items-center flex-column p-4 my-5\">\n <HomeOverlayHtmlSlot />\n <HomePromoVideoButtonSlot onClick={open} />\n <Container size=\"sm\">\n {searchField}\n </Container>\n </div>\n <HomePromoVideoModalSlot\n isOpen={isOpen}\n close={close}\n videoId={getStringConfig('HOMEPAGE_PROMO_VIDEO_YOUTUBE_ID')}\n />\n </section>\n );\n};\n\nexport default HomeBanner;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/home/components/home-banner/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface HomePromoVideoBtnProps {\n onClick: () => void,\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/home/components/home-banner/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface HomePromoVideoBtnProps {\n onClick: () => void;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutCourseImageSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,WAAW,MAAM,wCAAwC,CAAC;AAOjE,MAAM,0BAA0B,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAmC,EAAE,EAAE,CAAC,CAC3F,KAAC,IAAI,IACH,EAAE,EAAC,6DAA6D,EAChE,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,YAEhB,KAAC,KAAK,IACJ,SAAS,EAAC,iCAAiC,EAC3C,GAAG,EAAE,MAAM,EACX,OAAO,QACP,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,CAAC,CAAyC,EAAE,EAAE;YACrD,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,WAAW,CAAC;QACpC,CAAC,GACD,GACG,CACR,CAAC;AAEF,eAAe,0BAA0B,CAAC","sourcesContent":["import { Image } from '@openedx/paragon';\nimport { Slot } from '@openedx/frontend-base';\n\nimport noCourseImg from '@src/assets/images/no-course-image.svg';\n\nexport interface CourseAboutCourseImageSlotProps {\n imgSrc: string,\n altText: string,\n}\n\nconst CourseAboutCourseImageSlot = ({ imgSrc, altText }: CourseAboutCourseImageSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutCourseImage.v1\"\n imgSrc={imgSrc}\n altText={altText}\n >\n <Image\n className=\"course-media-image shadow w-100\"\n src={imgSrc}\n rounded\n alt={altText}\n onError={(e: React.SyntheticEvent<HTMLImageElement>) => {\n e.currentTarget.src = noCourseImg;\n }}\n />\n </Slot>\n);\n\nexport default CourseAboutCourseImageSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutCourseImageSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,WAAW,MAAM,wCAAwC,CAAC;AAOjE,MAAM,0BAA0B,GAAG,CAAC,EAAE,MAAM,EAAE,OAAO,EAAmC,EAAE,EAAE,CAAC,CAC3F,KAAC,IAAI,IACH,EAAE,EAAC,6DAA6D,EAChE,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,OAAO,YAEhB,KAAC,KAAK,IACJ,SAAS,EAAC,iCAAiC,EAC3C,GAAG,EAAE,MAAM,EACX,OAAO,QACP,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,CAAC,CAAyC,EAAE,EAAE;YACrD,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,WAAW,CAAC;QACpC,CAAC,GACD,GACG,CACR,CAAC;AAEF,eAAe,0BAA0B,CAAC","sourcesContent":["import { Image } from '@openedx/paragon';\nimport { Slot } from '@openedx/frontend-base';\n\nimport noCourseImg from '@src/assets/images/no-course-image.svg';\n\nexport interface CourseAboutCourseImageSlotProps {\n imgSrc: string;\n altText: string;\n}\n\nconst CourseAboutCourseImageSlot = ({ imgSrc, altText }: CourseAboutCourseImageSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutCourseImage.v1\"\n imgSrc={imgSrc}\n altText={altText}\n >\n <Image\n className=\"course-media-image shadow w-100\"\n src={imgSrc}\n rounded\n alt={altText}\n onError={(e: React.SyntheticEvent<HTMLImageElement>) => {\n e.currentTarget.src = noCourseImg;\n }}\n />\n </Slot>\n);\n\nexport default CourseAboutCourseImageSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutCourseMediaSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,WAAW,MAAM,yDAAyD,CAAC;AAUlF,MAAM,0BAA0B,GAAG,CAAC,EAAE,eAAe,EAAmC,EAAE,EAAE,CAAC,CAC3F,KAAC,IAAI,IACH,EAAE,EAAC,6DAA6D,EAChE,eAAe,EAAE,eAAe,YAEhC,KAAC,WAAW,IAAC,eAAe,EAAE,eAAe,GAAI,GAC5C,CACR,CAAC;AAEF,eAAe,0BAA0B,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport CourseMedia from '@src/course-about/course-intro/course-media/CourseMedia';\nimport type { CourseMediaPartial } from '@src/course-about/types';\n\nexport interface CourseAboutCourseMediaSlotProps {\n courseAboutData: {\n name: string,\n media: CourseMediaPartial,\n },\n}\n\nconst CourseAboutCourseMediaSlot = ({ courseAboutData }: CourseAboutCourseMediaSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutCourseMedia.v1\"\n courseAboutData={courseAboutData}\n >\n <CourseMedia courseAboutData={courseAboutData} />\n </Slot>\n);\n\nexport default CourseAboutCourseMediaSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutCourseMediaSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,WAAW,MAAM,yDAAyD,CAAC;AAUlF,MAAM,0BAA0B,GAAG,CAAC,EAAE,eAAe,EAAmC,EAAE,EAAE,CAAC,CAC3F,KAAC,IAAI,IACH,EAAE,EAAC,6DAA6D,EAChE,eAAe,EAAE,eAAe,YAEhC,KAAC,WAAW,IAAC,eAAe,EAAE,eAAe,GAAI,GAC5C,CACR,CAAC;AAEF,eAAe,0BAA0B,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport CourseMedia from '@src/course-about/course-intro/course-media/CourseMedia';\nimport type { CourseMediaPartial } from '@src/course-about/types';\n\nexport interface CourseAboutCourseMediaSlotProps {\n courseAboutData: {\n name: string;\n media: CourseMediaPartial;\n };\n}\n\nconst CourseAboutCourseMediaSlot = ({ courseAboutData }: CourseAboutCourseMediaSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutCourseMedia.v1\"\n courseAboutData={courseAboutData}\n >\n <CourseMedia courseAboutData={courseAboutData} />\n </Slot>\n);\n\nexport default CourseAboutCourseMediaSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutEnrollmentButtonSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAW7E,MAAM,+BAA+B,GAAG,CAAC,EACvC,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,mBAAmB,GACkB,EAAE,EAAE,CAAC,CAC1C,KAAC,IAAI,IACH,EAAE,EAAC,kEAAkE,EACrE,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,EACxC,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,YAExC,KAAC,gBAAgB,IACf,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,EACxC,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,GACxC,GACG,CACR,CAAC;AAEF,eAAe,+BAA+B,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { EnrollmentButton } from '@src/course-about/course-intro/components';\nimport type { SinglePaidMode } from '@src/course-about/types';\n\nexport interface CourseAboutEnrollmentButtonSlotProps {\n singlePaidMode: SinglePaidMode,\n ecommerceCheckout: boolean,\n isEnrollmentPending: boolean,\n onEnroll: () => void,\n onEcommerceCheckout: () => void,\n}\n\nconst CourseAboutEnrollmentButtonSlot = ({\n singlePaidMode,\n ecommerceCheckout,\n isEnrollmentPending,\n onEnroll,\n onEcommerceCheckout,\n}: CourseAboutEnrollmentButtonSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutEnrollmentButton.v1\"\n singlePaidMode={singlePaidMode}\n ecommerceCheckout={ecommerceCheckout}\n isEnrollmentPending={isEnrollmentPending}\n onEnroll={onEnroll}\n onEcommerceCheckout={onEcommerceCheckout}\n >\n <EnrollmentButton\n singlePaidMode={singlePaidMode}\n ecommerceCheckout={ecommerceCheckout}\n isEnrollmentPending={isEnrollmentPending}\n onEnroll={onEnroll}\n onEcommerceCheckout={onEcommerceCheckout}\n />\n </Slot>\n);\n\nexport default CourseAboutEnrollmentButtonSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutEnrollmentButtonSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAW7E,MAAM,+BAA+B,GAAG,CAAC,EACvC,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,mBAAmB,GACkB,EAAE,EAAE,CAAC,CAC1C,KAAC,IAAI,IACH,EAAE,EAAC,kEAAkE,EACrE,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,EACxC,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,YAExC,KAAC,gBAAgB,IACf,cAAc,EAAE,cAAc,EAC9B,iBAAiB,EAAE,iBAAiB,EACpC,mBAAmB,EAAE,mBAAmB,EACxC,QAAQ,EAAE,QAAQ,EAClB,mBAAmB,EAAE,mBAAmB,GACxC,GACG,CACR,CAAC;AAEF,eAAe,+BAA+B,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { EnrollmentButton } from '@src/course-about/course-intro/components';\nimport type { SinglePaidMode } from '@src/course-about/types';\n\nexport interface CourseAboutEnrollmentButtonSlotProps {\n singlePaidMode: SinglePaidMode;\n ecommerceCheckout: boolean;\n isEnrollmentPending: boolean;\n onEnroll: () => void;\n onEcommerceCheckout: () => void;\n}\n\nconst CourseAboutEnrollmentButtonSlot = ({\n singlePaidMode,\n ecommerceCheckout,\n isEnrollmentPending,\n onEnroll,\n onEcommerceCheckout,\n}: CourseAboutEnrollmentButtonSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutEnrollmentButton.v1\"\n singlePaidMode={singlePaidMode}\n ecommerceCheckout={ecommerceCheckout}\n isEnrollmentPending={isEnrollmentPending}\n onEnroll={onEnroll}\n onEcommerceCheckout={onEcommerceCheckout}\n >\n <EnrollmentButton\n singlePaidMode={singlePaidMode}\n ecommerceCheckout={ecommerceCheckout}\n isEnrollmentPending={isEnrollmentPending}\n onEnroll={onEnroll}\n onEcommerceCheckout={onEcommerceCheckout}\n />\n </Slot>\n);\n\nexport default CourseAboutEnrollmentButtonSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutIntroSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG9C,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAMzE,MAAM,oBAAoB,GAAG,CAAC,EAAE,eAAe,EAA6B,EAAE,EAAE,CAAC,CAC/E,KAAC,IAAI,IACH,EAAE,EAAC,uDAAuD,EAC1D,eAAe,EAAE,eAAe,YAEhC,KAAC,WAAW,IAAC,eAAe,EAAE,eAAe,GAAI,GAC5C,CACR,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport type { CourseAboutDataPartial } from '@src/course-about/types';\nimport { CourseIntro } from '@src/course-about/course-intro/CourseIntro';\n\nexport interface CourseAboutIntroSlotProps {\n courseAboutData: CourseAboutDataPartial,\n}\n\nconst CourseAboutIntroSlot = ({ courseAboutData }: CourseAboutIntroSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutIntro.v1\"\n courseAboutData={courseAboutData}\n >\n <CourseIntro courseAboutData={courseAboutData} />\n </Slot>\n);\n\nexport default CourseAboutIntroSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutIntroSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAG9C,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAMzE,MAAM,oBAAoB,GAAG,CAAC,EAAE,eAAe,EAA6B,EAAE,EAAE,CAAC,CAC/E,KAAC,IAAI,IACH,EAAE,EAAC,uDAAuD,EAC1D,eAAe,EAAE,eAAe,YAEhC,KAAC,WAAW,IAAC,eAAe,EAAE,eAAe,GAAI,GAC5C,CACR,CAAC;AAEF,eAAe,oBAAoB,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport type { CourseAboutDataPartial } from '@src/course-about/types';\nimport { CourseIntro } from '@src/course-about/course-intro/CourseIntro';\n\nexport interface CourseAboutIntroSlotProps {\n courseAboutData: CourseAboutDataPartial;\n}\n\nconst CourseAboutIntroSlot = ({ courseAboutData }: CourseAboutIntroSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutIntro.v1\"\n courseAboutData={courseAboutData}\n >\n <CourseIntro courseAboutData={courseAboutData} />\n </Slot>\n);\n\nexport default CourseAboutIntroSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseAboutIntroVideoSlots/CourseAboutIntroVideoButtonSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,IAAI,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAE5F,OAAO,QAAQ,MAAM,sDAAsD,CAAC;AAC5E,OAAO,0BAA0B,MAAM,uCAAuC,CAAC;AAQ/E,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAC9C,cAAc,EAAE,kBAAkB,EAAE,cAAc,GACb,EAAE,EAAE;IACzC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,kEAAkE,EACrE,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,cAAc,YAE9B,MAAC,MAAM,IACL,SAAS,EAAC,+CAA+C,EACzD,OAAO,EAAE,cAAc,gBACX,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,2BAA2B,CAAC,aAEpE,KAAC,0BAA0B,IAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,kBAAkB,GAAI,EACnF,KAAC,IAAI,IACH,SAAS,EAAC,6CAA6C,EACvD,GAAG,EAAE,yBAAyB,EAC9B,IAAI,EAAC,IAAI,GACT,IACK,GACJ,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Button, Icon } from '@openedx/paragon';\nimport { Slot, useIntl } from '@openedx/frontend-base';\nimport { PlayCircleFilledWhite as PlayCircleFilledWhiteIcon } from '@openedx/paragon/icons';\n\nimport messages from '@src/course-about/course-intro/course-media/messages';\nimport CourseAboutCourseImageSlot from '@src/slots/CourseAboutCourseImageSlot';\n\nexport interface CourseAboutIntroVideoButtonSlotProps {\n courseImageSrc: string,\n courseImageAltText: string,\n openVideoModal: () => void,\n}\n\nexport const CourseAboutIntroVideoButtonSlot = ({\n courseImageSrc, courseImageAltText, openVideoModal,\n}: CourseAboutIntroVideoButtonSlotProps) => {\n const intl = useIntl();\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutIntroVideoButton.v1\"\n courseImageSrc={courseImageSrc}\n courseImageAltText={courseImageAltText}\n openVideoModal={openVideoModal}\n >\n <Button\n className=\"border-0 p-0 position-relative bg-transparent\"\n onClick={openVideoModal}\n aria-label={intl.formatMessage(messages.playCourseIntroductionVideo)}\n >\n <CourseAboutCourseImageSlot imgSrc={courseImageSrc} altText={courseImageAltText} />\n <Icon\n className=\"position-absolute bg-primary rounded-circle\"\n src={PlayCircleFilledWhiteIcon}\n size=\"lg\"\n />\n </Button>\n </Slot>\n );\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseAboutIntroVideoSlots/CourseAboutIntroVideoButtonSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,IAAI,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAE5F,OAAO,QAAQ,MAAM,sDAAsD,CAAC;AAC5E,OAAO,0BAA0B,MAAM,uCAAuC,CAAC;AAQ/E,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,EAC9C,cAAc,EAAE,kBAAkB,EAAE,cAAc,GACb,EAAE,EAAE;IACzC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,kEAAkE,EACrE,cAAc,EAAE,cAAc,EAC9B,kBAAkB,EAAE,kBAAkB,EACtC,cAAc,EAAE,cAAc,YAE9B,MAAC,MAAM,IACL,SAAS,EAAC,+CAA+C,EACzD,OAAO,EAAE,cAAc,gBACX,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,2BAA2B,CAAC,aAEpE,KAAC,0BAA0B,IAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,kBAAkB,GAAI,EACnF,KAAC,IAAI,IACH,SAAS,EAAC,6CAA6C,EACvD,GAAG,EAAE,yBAAyB,EAC9B,IAAI,EAAC,IAAI,GACT,IACK,GACJ,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Button, Icon } from '@openedx/paragon';\nimport { Slot, useIntl } from '@openedx/frontend-base';\nimport { PlayCircleFilledWhite as PlayCircleFilledWhiteIcon } from '@openedx/paragon/icons';\n\nimport messages from '@src/course-about/course-intro/course-media/messages';\nimport CourseAboutCourseImageSlot from '@src/slots/CourseAboutCourseImageSlot';\n\nexport interface CourseAboutIntroVideoButtonSlotProps {\n courseImageSrc: string;\n courseImageAltText: string;\n openVideoModal: () => void;\n}\n\nexport const CourseAboutIntroVideoButtonSlot = ({\n courseImageSrc, courseImageAltText, openVideoModal,\n}: CourseAboutIntroVideoButtonSlotProps) => {\n const intl = useIntl();\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutIntroVideoButton.v1\"\n courseImageSrc={courseImageSrc}\n courseImageAltText={courseImageAltText}\n openVideoModal={openVideoModal}\n >\n <Button\n className=\"border-0 p-0 position-relative bg-transparent\"\n onClick={openVideoModal}\n aria-label={intl.formatMessage(messages.playCourseIntroductionVideo)}\n >\n <CourseAboutCourseImageSlot imgSrc={courseImageSrc} altText={courseImageAltText} />\n <Icon\n className=\"position-absolute bg-primary rounded-circle\"\n src={PlayCircleFilledWhiteIcon}\n size=\"lg\"\n />\n </Button>\n </Slot>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseAboutIntroVideoSlots/CourseAboutIntroVideoModalContentSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC9G,OAAO,QAAQ,MAAM,mCAAmC,CAAC;AAQzD,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,EACpD,OAAO,EACP,KAAK,GAAG,yBAAyB,EACjC,MAAM,GAAG,0BAA0B,GACQ,EAAE,EAAE;IAC/C,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,wEAAwE,EAC3E,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,YAEd,iBACE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACpD,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,2BAA2B,OAAO,aAAa,EACpD,WAAW,EAAC,GAAG,EACf,eAAe,QACf,KAAK,EAAE,qBAAqB,GAC5B,GACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Slot, useIntl } from '@openedx/frontend-base';\n\nimport { DEFAULT_VIDEO_MODAL_HEIGHT, DEFAULT_VIDEO_MODAL_WIDTH, IFRAME_FEATURE_POLICY } from '@src/constants';\nimport messages from '@src/generic/video-modal/messages';\n\nexport interface CourseAboutIntroVideoModalContentSlotProps {\n videoId: string,\n width?: string,\n height?: number,\n}\n\nexport const CourseAboutIntroVideoModalContentSlot = ({\n videoId,\n width = DEFAULT_VIDEO_MODAL_WIDTH,\n height = DEFAULT_VIDEO_MODAL_HEIGHT,\n}: CourseAboutIntroVideoModalContentSlotProps) => {\n const intl = useIntl();\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutIntroVideoModalContent.v1\"\n videoId={videoId}\n width={width}\n height={height}\n >\n <iframe\n title={intl.formatMessage(messages.videoIframeTitle)}\n width={width}\n height={height}\n src={`//www.youtube.com/embed/${videoId}?showinfo=0`}\n frameBorder=\"0\"\n allowFullScreen\n allow={IFRAME_FEATURE_POLICY}\n />\n </Slot>\n );\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseAboutIntroVideoSlots/CourseAboutIntroVideoModalContentSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC9G,OAAO,QAAQ,MAAM,mCAAmC,CAAC;AAQzD,MAAM,CAAC,MAAM,qCAAqC,GAAG,CAAC,EACpD,OAAO,EACP,KAAK,GAAG,yBAAyB,EACjC,MAAM,GAAG,0BAA0B,GACQ,EAAE,EAAE;IAC/C,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,wEAAwE,EAC3E,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,YAEd,iBACE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACpD,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,2BAA2B,OAAO,aAAa,EACpD,WAAW,EAAC,GAAG,EACf,eAAe,QACf,KAAK,EAAE,qBAAqB,GAC5B,GACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Slot, useIntl } from '@openedx/frontend-base';\n\nimport { DEFAULT_VIDEO_MODAL_HEIGHT, DEFAULT_VIDEO_MODAL_WIDTH, IFRAME_FEATURE_POLICY } from '@src/constants';\nimport messages from '@src/generic/video-modal/messages';\n\nexport interface CourseAboutIntroVideoModalContentSlotProps {\n videoId: string;\n width?: string;\n height?: number;\n}\n\nexport const CourseAboutIntroVideoModalContentSlot = ({\n videoId,\n width = DEFAULT_VIDEO_MODAL_WIDTH,\n height = DEFAULT_VIDEO_MODAL_HEIGHT,\n}: CourseAboutIntroVideoModalContentSlotProps) => {\n const intl = useIntl();\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutIntroVideoModalContent.v1\"\n videoId={videoId}\n width={width}\n height={height}\n >\n <iframe\n title={intl.formatMessage(messages.videoIframeTitle)}\n width={width}\n height={height}\n src={`//www.youtube.com/embed/${videoId}?showinfo=0`}\n frameBorder=\"0\"\n allowFullScreen\n allow={IFRAME_FEATURE_POLICY}\n />\n </Slot>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseAboutIntroVideoSlots/CourseAboutIntroVideoModalSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qCAAqC,EAAE,MAAM,0CAA0C,CAAC;AAQjG,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAuC,EAAE,EAAE,CAAC,CACjH,KAAC,IAAI,IACH,EAAE,EAAC,iEAAiE,EACpE,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,YAEhB,KAAC,UAAU,IAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,YACtC,KAAC,qCAAqC,IAAC,OAAO,EAAE,OAAO,GAAI,GAChD,GACR,CACR,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { VideoModal } from '@src/generic';\nimport { CourseAboutIntroVideoModalContentSlot } from '../CourseAboutIntroVideoModalContentSlot';\n\nexport interface CourseAboutIntroVideoModalSlotProps {\n isOpen: boolean,\n close: () => void,\n videoId: string,\n}\n\nexport const CourseAboutIntroVideoModalSlot = ({ isOpen, close, videoId }: CourseAboutIntroVideoModalSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutIntroVideoModal.v1\"\n isOpen={isOpen}\n close={close}\n videoId={videoId}\n >\n <VideoModal isOpen={isOpen} close={close}>\n <CourseAboutIntroVideoModalContentSlot videoId={videoId} />\n </VideoModal>\n </Slot>\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseAboutIntroVideoSlots/CourseAboutIntroVideoModalSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,qCAAqC,EAAE,MAAM,0CAA0C,CAAC;AAQjG,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAuC,EAAE,EAAE,CAAC,CACjH,KAAC,IAAI,IACH,EAAE,EAAC,iEAAiE,EACpE,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,YAEhB,KAAC,UAAU,IAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,YACtC,KAAC,qCAAqC,IAAC,OAAO,EAAE,OAAO,GAAI,GAChD,GACR,CACR,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { VideoModal } from '@src/generic';\nimport { CourseAboutIntroVideoModalContentSlot } from '../CourseAboutIntroVideoModalContentSlot';\n\nexport interface CourseAboutIntroVideoModalSlotProps {\n isOpen: boolean;\n close: () => void;\n videoId: string;\n}\n\nexport const CourseAboutIntroVideoModalSlot = ({ isOpen, close, videoId }: CourseAboutIntroVideoModalSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutIntroVideoModal.v1\"\n isOpen={isOpen}\n close={close}\n videoId={videoId}\n >\n <VideoModal isOpen={isOpen} close={close}>\n <CourseAboutIntroVideoModalContentSlot videoId={videoId} />\n </VideoModal>\n </Slot>\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutOverviewSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAOnE,MAAM,uBAAuB,GAAG,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAgC,EAAE,EAAE,CAAC,CAC5F,KAAC,IAAI,IACH,EAAE,EAAC,0DAA0D,EAC7D,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,YAElB,KAAC,cAAc,IAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,GAAI,GAC7D,CACR,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { CourseOverview } from '@src/course-about/course-overview';\n\nexport interface CourseAboutOverviewSlotProps {\n overviewData: string,\n courseId: string,\n}\n\nconst CourseAboutOverviewSlot = ({ overviewData, courseId }: CourseAboutOverviewSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutOverview.v1\"\n overviewData={overviewData}\n courseId={courseId}\n >\n <CourseOverview overviewData={overviewData} courseId={courseId} />\n </Slot>\n);\n\nexport default CourseAboutOverviewSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutOverviewSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAOnE,MAAM,uBAAuB,GAAG,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAgC,EAAE,EAAE,CAAC,CAC5F,KAAC,IAAI,IACH,EAAE,EAAC,0DAA0D,EAC7D,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,QAAQ,YAElB,KAAC,cAAc,IAAC,YAAY,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,GAAI,GAC7D,CACR,CAAC;AAEF,eAAe,uBAAuB,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { CourseOverview } from '@src/course-about/course-overview';\n\nexport interface CourseAboutOverviewSlotProps {\n overviewData: string;\n courseId: string;\n}\n\nconst CourseAboutOverviewSlot = ({ overviewData, courseId }: CourseAboutOverviewSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutOverview.v1\"\n overviewData={overviewData}\n courseId={courseId}\n >\n <CourseOverview overviewData={overviewData} courseId={courseId} />\n </Slot>\n);\n\nexport default CourseAboutOverviewSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutSidebarCoursePriceSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,kBAAkB,MAAM,qEAAqE,CAAC;AACrG,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AAMjF,MAAM,iCAAiC,GAAG,CAAC,EAAE,WAAW,EAA0C,EAAE,EAAE;IACpG,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,oEAAoE,EACvE,WAAW,EAAE,WAAW,YAExB,KAAC,kBAAkB,IAEjB,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EACzC,KAAK,EAAE,WAAW,IAHd,OAAO,CAIX,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iCAAiC,CAAC","sourcesContent":["import { MoneyFilled as MoneyFilledIcon } from '@openedx/paragon/icons';\nimport { Slot, useIntl } from '@openedx/frontend-base';\n\nimport type { CourseAboutData } from '@src/course-about/types';\nimport SidebarDetailsItem from '@src/course-about/course-sidebar/sidebar-details/SidebarDetailsItem';\nimport messages from '@src/course-about/course-sidebar/sidebar-details/messages';\n\nexport interface CourseAboutSidebarCoursePriceSlotProps {\n coursePrice: CourseAboutData['coursePrice'],\n}\n\nconst CourseAboutSidebarCoursePriceSlot = ({ coursePrice }: CourseAboutSidebarCoursePriceSlotProps) => {\n const intl = useIntl();\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutSidebarCoursePrice.v1\"\n coursePrice={coursePrice}\n >\n <SidebarDetailsItem\n key=\"price\"\n icon={MoneyFilledIcon}\n label={intl.formatMessage(messages.price)}\n value={coursePrice}\n />\n </Slot>\n );\n};\n\nexport default CourseAboutSidebarCoursePriceSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutSidebarCoursePriceSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,IAAI,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGvD,OAAO,kBAAkB,MAAM,qEAAqE,CAAC;AACrG,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AAMjF,MAAM,iCAAiC,GAAG,CAAC,EAAE,WAAW,EAA0C,EAAE,EAAE;IACpG,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,oEAAoE,EACvE,WAAW,EAAE,WAAW,YAExB,KAAC,kBAAkB,IAEjB,IAAI,EAAE,eAAe,EACrB,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,EACzC,KAAK,EAAE,WAAW,IAHd,OAAO,CAIX,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,iCAAiC,CAAC","sourcesContent":["import { MoneyFilled as MoneyFilledIcon } from '@openedx/paragon/icons';\nimport { Slot, useIntl } from '@openedx/frontend-base';\n\nimport type { CourseAboutData } from '@src/course-about/types';\nimport SidebarDetailsItem from '@src/course-about/course-sidebar/sidebar-details/SidebarDetailsItem';\nimport messages from '@src/course-about/course-sidebar/sidebar-details/messages';\n\nexport interface CourseAboutSidebarCoursePriceSlotProps {\n coursePrice: CourseAboutData['coursePrice'];\n}\n\nconst CourseAboutSidebarCoursePriceSlot = ({ coursePrice }: CourseAboutSidebarCoursePriceSlotProps) => {\n const intl = useIntl();\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutSidebarCoursePrice.v1\"\n coursePrice={coursePrice}\n >\n <SidebarDetailsItem\n key=\"price\"\n icon={MoneyFilledIcon}\n label={intl.formatMessage(messages.price)}\n value={coursePrice}\n />\n </Slot>\n );\n};\n\nexport default CourseAboutSidebarCoursePriceSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutSidebarSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,aAAa,MAAM,gDAAgD,CAAC;AAO3E,MAAM,sBAAsB,GAAG,CAAC,EAAE,eAAe,EAA+B,EAAE,EAAE,CAAC,CACnF,KAAC,IAAI,IACH,EAAE,EAAC,yDAAyD,EAC5D,eAAe,EAAE,eAAe,YAEhC,0BACE,KAAC,aAAa,IAAC,eAAe,EAAE,eAAe,GAAI,GAC7C,GACH,CACR,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport CourseSidebar from '@src/course-about/course-sidebar/CourseSidebar';\nimport type { CourseAboutData } from '@src/course-about/types';\n\nexport interface CourseAboutSidebarSlotProps {\n courseAboutData: CourseAboutData,\n}\n\nconst CourseAboutSidebarSlot = ({ courseAboutData }: CourseAboutSidebarSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutSidebar.v1\"\n courseAboutData={courseAboutData}\n >\n <aside>\n <CourseSidebar courseAboutData={courseAboutData} />\n </aside>\n </Slot>\n);\n\nexport default CourseAboutSidebarSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutSidebarSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,aAAa,MAAM,gDAAgD,CAAC;AAO3E,MAAM,sBAAsB,GAAG,CAAC,EAAE,eAAe,EAA+B,EAAE,EAAE,CAAC,CACnF,KAAC,IAAI,IACH,EAAE,EAAC,yDAAyD,EAC5D,eAAe,EAAE,eAAe,YAEhC,0BACE,KAAC,aAAa,IAAC,eAAe,EAAE,eAAe,GAAI,GAC7C,GACH,CACR,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport CourseSidebar from '@src/course-about/course-sidebar/CourseSidebar';\nimport type { CourseAboutData } from '@src/course-about/types';\n\nexport interface CourseAboutSidebarSlotProps {\n courseAboutData: CourseAboutData;\n}\n\nconst CourseAboutSidebarSlot = ({ courseAboutData }: CourseAboutSidebarSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutSidebar.v1\"\n courseAboutData={courseAboutData}\n >\n <aside>\n <CourseSidebar courseAboutData={courseAboutData} />\n </aside>\n </Slot>\n);\n\nexport default CourseAboutSidebarSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutSidebarSocialSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EACL,IAAI,EACJ,OAAO,EACP,cAAc,EACd,UAAU,EACV,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,WAAW,MAAM,6DAA6D,CAAC;AACtF,OAAO,QAAQ,MAAM,0DAA0D,CAAC;AAOhF,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC7B,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,OAAO,CACL,KAAC,KAAK,IACJ,SAAS,EAAC,6BAA6B,EACvC,SAAS,EAAC,YAAY,EACtB,GAAG,EAAE,CAAC,gBACM,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,6BAA6B,CAAC,YAErE,OAAO,GACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,GAAG,EAAE;;IACpC,MAAM,EAAE,WAAW,EAAE,GAAG,cAAc,EAAkD,CAAC;IACzF,MAAM,OAAO,GAAG,gBAAgB,EAE/B,CAAC;IACF,MAAM,QAAQ,GAAG,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU;QACxD,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC;QAClC,CAAC,CAAC,MAAA,OAAO,CAAC,WAAW,mCAAI,WAAW,CAAC;IACvC,OAAO,KAAC,WAAW,IAAC,WAAW,EAAE,QAAQ,GAAI,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,4BAA4B,GAAG,CAAC,EAAE,WAAW,EAAqC,EAAE,EAAE,CAAC,CAC3F,KAAC,IAAI,IACH,EAAE,EAAC,+DAA+D,EAClE,MAAM,EAAE,iBAAiB,EACzB,WAAW,EAAE,WAAW,YAExB,KAAC,wBAAwB,KAAG,GACvB,CACR,CAAC;AAEF,eAAe,4BAA4B,CAAC","sourcesContent":["import { Stack } from '@openedx/paragon';\nimport {\n Slot,\n useIntl,\n useSlotContext,\n useWidgets,\n useWidgetOptions,\n} from '@openedx/frontend-base';\n\nimport SocialLinks from '@src/course-about/course-sidebar/sidebar-social/SocialLinks';\nimport messages from '@src/course-about/course-sidebar/sidebar-social/messages';\nimport type { SocialLink } from '@src/course-about/course-sidebar/sidebar-social/types';\n\nexport interface CourseAboutSidebarSocialSlotProps {\n socialLinks: SocialLink[],\n}\n\nconst SocialStackLayout = () => {\n const intl = useIntl();\n const widgets = useWidgets();\n return (\n <Stack\n className=\"justify-content-center my-3\"\n direction=\"horizontal\"\n gap={4}\n aria-label={intl.formatMessage(messages.socialSharingOptionsAriaLabel)}\n >\n {widgets}\n </Stack>\n );\n};\n\nconst DefaultSocialLinksWidget = () => {\n const { socialLinks } = useSlotContext() as unknown as CourseAboutSidebarSocialSlotProps;\n const options = useWidgetOptions() as {\n socialLinks?: SocialLink[] | ((current: SocialLink[]) => SocialLink[]),\n };\n const resolved = typeof options.socialLinks === 'function'\n ? options.socialLinks(socialLinks)\n : options.socialLinks ?? socialLinks;\n return <SocialLinks socialLinks={resolved} />;\n};\n\nconst CourseAboutSidebarSocialSlot = ({ socialLinks }: CourseAboutSidebarSocialSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutSidebarSocial.v1\"\n layout={SocialStackLayout}\n socialLinks={socialLinks}\n >\n <DefaultSocialLinksWidget />\n </Slot>\n);\n\nexport default CourseAboutSidebarSocialSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseAboutSidebarSocialSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EACL,IAAI,EACJ,OAAO,EACP,cAAc,EACd,UAAU,EACV,gBAAgB,GACjB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,WAAW,MAAM,6DAA6D,CAAC;AACtF,OAAO,QAAQ,MAAM,0DAA0D,CAAC;AAOhF,MAAM,iBAAiB,GAAG,GAAG,EAAE;IAC7B,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,OAAO,CACL,KAAC,KAAK,IACJ,SAAS,EAAC,6BAA6B,EACvC,SAAS,EAAC,YAAY,EACtB,GAAG,EAAE,CAAC,gBACM,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,6BAA6B,CAAC,YAErE,OAAO,GACF,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,wBAAwB,GAAG,GAAG,EAAE;;IACpC,MAAM,EAAE,WAAW,EAAE,GAAG,cAAc,EAAkD,CAAC;IACzF,MAAM,OAAO,GAAG,gBAAgB,EAE/B,CAAC;IACF,MAAM,QAAQ,GAAG,OAAO,OAAO,CAAC,WAAW,KAAK,UAAU;QACxD,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,WAAW,CAAC;QAClC,CAAC,CAAC,MAAA,OAAO,CAAC,WAAW,mCAAI,WAAW,CAAC;IACvC,OAAO,KAAC,WAAW,IAAC,WAAW,EAAE,QAAQ,GAAI,CAAC;AAChD,CAAC,CAAC;AAEF,MAAM,4BAA4B,GAAG,CAAC,EAAE,WAAW,EAAqC,EAAE,EAAE,CAAC,CAC3F,KAAC,IAAI,IACH,EAAE,EAAC,+DAA+D,EAClE,MAAM,EAAE,iBAAiB,EACzB,WAAW,EAAE,WAAW,YAExB,KAAC,wBAAwB,KAAG,GACvB,CACR,CAAC;AAEF,eAAe,4BAA4B,CAAC","sourcesContent":["import { Stack } from '@openedx/paragon';\nimport {\n Slot,\n useIntl,\n useSlotContext,\n useWidgets,\n useWidgetOptions,\n} from '@openedx/frontend-base';\n\nimport SocialLinks from '@src/course-about/course-sidebar/sidebar-social/SocialLinks';\nimport messages from '@src/course-about/course-sidebar/sidebar-social/messages';\nimport type { SocialLink } from '@src/course-about/course-sidebar/sidebar-social/types';\n\nexport interface CourseAboutSidebarSocialSlotProps {\n socialLinks: SocialLink[];\n}\n\nconst SocialStackLayout = () => {\n const intl = useIntl();\n const widgets = useWidgets();\n return (\n <Stack\n className=\"justify-content-center my-3\"\n direction=\"horizontal\"\n gap={4}\n aria-label={intl.formatMessage(messages.socialSharingOptionsAriaLabel)}\n >\n {widgets}\n </Stack>\n );\n};\n\nconst DefaultSocialLinksWidget = () => {\n const { socialLinks } = useSlotContext() as unknown as CourseAboutSidebarSocialSlotProps;\n const options = useWidgetOptions() as {\n socialLinks?: SocialLink[] | ((current: SocialLink[]) => SocialLink[]);\n };\n const resolved = typeof options.socialLinks === 'function'\n ? options.socialLinks(socialLinks)\n : options.socialLinks ?? socialLinks;\n return <SocialLinks socialLinks={resolved} />;\n};\n\nconst CourseAboutSidebarSocialSlot = ({ socialLinks }: CourseAboutSidebarSocialSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseAboutSidebarSocial.v1\"\n layout={SocialStackLayout}\n socialLinks={socialLinks}\n >\n <DefaultSocialLinksWidget />\n </Slot>\n);\n\nexport default CourseAboutSidebarSocialSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableCardViewSlot/CourseCatalogDataTableCourseCardSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1C,MAAM,oCAAoC,GAAG,CAAC,EAC5C,QAAQ,EAAE,UAAU,EACpB,SAAS,GAIV,EAAE,EAAE;IACH,MAAM,SAAS,GAA8C;QAC3D,SAAS;QACT,QAAQ,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAE;QACxB,SAAS,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,GAAG;QAC/B,UAAU,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,OAAO,CAAC,WAAW;QAChD,YAAY,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,MAAM;QACrC,cAAc,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,QAAQ;QACzC,eAAe,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,KAAK;QACvC,qBAAqB,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,eAAe;KACxD,CAAC;IAEF,OAAO,CACL,KAAC,IAAI,kBACH,EAAE,EAAC,uEAAuE,IACtE,SAAS,cAEb,KAAC,UAAU,oBAAK,SAAS,EAAI,IACxB,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oCAAoC,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { CourseCard } from '@src/generic';\nimport type { Course } from '@src/generic/course-card/types';\n\nexport interface CourseCatalogDataTableCourseCardSlotProps {\n isLoading?: boolean,\n courseId?: string,\n courseOrg?: string,\n courseName?: string,\n courseNumber?: string,\n courseImageUrl?: string,\n courseStartDate?: string,\n courseAdvertisedStart?: string,\n}\n\nconst CourseCatalogDataTableCourseCardSlot = ({\n original: courseData,\n isLoading,\n}: {\n original?: Course,\n isLoading?: boolean,\n}) => {\n const slotProps: CourseCatalogDataTableCourseCardSlotProps = {\n isLoading,\n courseId: courseData?.id,\n courseOrg: courseData?.data.org,\n courseName: courseData?.data.content.displayName,\n courseNumber: courseData?.data.number,\n courseImageUrl: courseData?.data.imageUrl,\n courseStartDate: courseData?.data.start,\n courseAdvertisedStart: courseData?.data.advertisedStart,\n };\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogDataTableCourseCard.v1\"\n {...slotProps}\n >\n <CourseCard {...slotProps} />\n </Slot>\n );\n};\n\nexport default CourseCatalogDataTableCourseCardSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableCardViewSlot/CourseCatalogDataTableCourseCardSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1C,MAAM,oCAAoC,GAAG,CAAC,EAC5C,QAAQ,EAAE,UAAU,EACpB,SAAS,GAIV,EAAE,EAAE;IACH,MAAM,SAAS,GAA8C;QAC3D,SAAS;QACT,QAAQ,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAE;QACxB,SAAS,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,GAAG;QAC/B,UAAU,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,OAAO,CAAC,WAAW;QAChD,YAAY,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,MAAM;QACrC,cAAc,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,QAAQ;QACzC,eAAe,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,KAAK;QACvC,qBAAqB,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,eAAe;KACxD,CAAC;IAEF,OAAO,CACL,KAAC,IAAI,kBACH,EAAE,EAAC,uEAAuE,IACtE,SAAS,cAEb,KAAC,UAAU,oBAAK,SAAS,EAAI,IACxB,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oCAAoC,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { CourseCard } from '@src/generic';\nimport type { Course } from '@src/generic/course-card/types';\n\nexport interface CourseCatalogDataTableCourseCardSlotProps {\n isLoading?: boolean;\n courseId?: string;\n courseOrg?: string;\n courseName?: string;\n courseNumber?: string;\n courseImageUrl?: string;\n courseStartDate?: string;\n courseAdvertisedStart?: string;\n}\n\nconst CourseCatalogDataTableCourseCardSlot = ({\n original: courseData,\n isLoading,\n}: {\n original?: Course;\n isLoading?: boolean;\n}) => {\n const slotProps: CourseCatalogDataTableCourseCardSlotProps = {\n isLoading,\n courseId: courseData?.id,\n courseOrg: courseData?.data.org,\n courseName: courseData?.data.content.displayName,\n courseNumber: courseData?.data.number,\n courseImageUrl: courseData?.data.imageUrl,\n courseStartDate: courseData?.data.start,\n courseAdvertisedStart: courseData?.data.advertisedStart,\n };\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogDataTableCourseCard.v1\"\n {...slotProps}\n >\n <CourseCard {...slotProps} />\n </Slot>\n );\n};\n\nexport default CourseCatalogDataTableCourseCardSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableCardViewSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAE3E,OAAO,oCAAoC,MAAM,wCAAwC,CAAC;AAM1F,MAAM,kCAAkC,GAAG,CAAC,EAAE,WAAW,EAA2C,EAAE,EAAE;;IAAC,OAAA,CACvG,KAAC,IAAI,IACH,EAAE,EAAC,qEAAqE,EACxE,WAAW,EAAE,WAAW,YAExB,KAAC,QAAQ,IACP,aAAa,EAAE,oCAAoC,EACnD,iBAAiB,EAAE,IAAI,CAAC,GAAG,CAAC,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,mCAAI,iBAAiB,EAAE,iBAAiB,CAAC,GACvF,GACG,CACR,CAAA;CAAA,CAAC;AAEF,eAAe,kCAAkC,CAAC","sourcesContent":["import { CardView } from '@openedx/paragon';\nimport { Slot } from '@openedx/frontend-base';\n\nimport { DEFAULT_PAGE_SIZE } from '@src/data/course-list-search/constants';\nimport type { CourseListSearchResponse } from '@src/data/course-list-search/types';\nimport CourseCatalogDataTableCourseCardSlot from './CourseCatalogDataTableCourseCardSlot';\n\nexport interface CourseCatalogDataTableCardViewSlotProps {\n displayData?: CourseListSearchResponse,\n}\n\nconst CourseCatalogDataTableCardViewSlot = ({ displayData }: CourseCatalogDataTableCardViewSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogDataTableCardView.v1\"\n displayData={displayData}\n >\n <CardView\n CardComponent={CourseCatalogDataTableCourseCardSlot}\n skeletonCardCount={Math.min(displayData?.total ?? DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE)}\n />\n </Slot>\n);\n\nexport default CourseCatalogDataTableCardViewSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableCardViewSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAE3E,OAAO,oCAAoC,MAAM,wCAAwC,CAAC;AAM1F,MAAM,kCAAkC,GAAG,CAAC,EAAE,WAAW,EAA2C,EAAE,EAAE;;IAAC,OAAA,CACvG,KAAC,IAAI,IACH,EAAE,EAAC,qEAAqE,EACxE,WAAW,EAAE,WAAW,YAExB,KAAC,QAAQ,IACP,aAAa,EAAE,oCAAoC,EACnD,iBAAiB,EAAE,IAAI,CAAC,GAAG,CAAC,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,mCAAI,iBAAiB,EAAE,iBAAiB,CAAC,GACvF,GACG,CACR,CAAA;CAAA,CAAC;AAEF,eAAe,kCAAkC,CAAC","sourcesContent":["import { CardView } from '@openedx/paragon';\nimport { Slot } from '@openedx/frontend-base';\n\nimport { DEFAULT_PAGE_SIZE } from '@src/data/course-list-search/constants';\nimport type { CourseListSearchResponse } from '@src/data/course-list-search/types';\nimport CourseCatalogDataTableCourseCardSlot from './CourseCatalogDataTableCourseCardSlot';\n\nexport interface CourseCatalogDataTableCardViewSlotProps {\n displayData?: CourseListSearchResponse;\n}\n\nconst CourseCatalogDataTableCardViewSlot = ({ displayData }: CourseCatalogDataTableCardViewSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogDataTableCardView.v1\"\n displayData={displayData}\n >\n <CardView\n CardComponent={CourseCatalogDataTableCourseCardSlot}\n skeletonCardCount={Math.min(displayData?.total ?? DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE)}\n />\n </Slot>\n);\n\nexport default CourseCatalogDataTableCardViewSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableControlBarSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAO9C,MAAM,oCAAoC,GAAG,CAAC,EAC5C,uBAAuB,EACvB,iBAAiB,GACyB,EAAE,EAAE,CAAC,CAC/C,KAAC,IAAI,IACH,EAAE,EAAC,uEAAuE,EAC1E,uBAAuB,EAAE,uBAAuB,EAChD,iBAAiB,EAAE,iBAAiB,YAEpC,KAAC,SAAS,CAAC,eAAe,KAAG,GACxB,CACR,CAAC;AAEF,eAAe,oCAAoC,CAAC","sourcesContent":["import { DataTable } from '@openedx/paragon';\nimport { Slot } from '@openedx/frontend-base';\n\nexport interface CourseCatalogDataTableControlBarSlotProps {\n currentPageResultsCount: number,\n totalResultsCount: number,\n}\n\nconst CourseCatalogDataTableControlBarSlot = ({\n currentPageResultsCount,\n totalResultsCount,\n}: CourseCatalogDataTableControlBarSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogDataTableControlBar.v1\"\n currentPageResultsCount={currentPageResultsCount}\n totalResultsCount={totalResultsCount}\n >\n <DataTable.TableControlBar />\n </Slot>\n);\n\nexport default CourseCatalogDataTableControlBarSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableControlBarSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAO9C,MAAM,oCAAoC,GAAG,CAAC,EAC5C,uBAAuB,EACvB,iBAAiB,GACyB,EAAE,EAAE,CAAC,CAC/C,KAAC,IAAI,IACH,EAAE,EAAC,uEAAuE,EAC1E,uBAAuB,EAAE,uBAAuB,EAChD,iBAAiB,EAAE,iBAAiB,YAEpC,KAAC,SAAS,CAAC,eAAe,KAAG,GACxB,CACR,CAAC;AAEF,eAAe,oCAAoC,CAAC","sourcesContent":["import { DataTable } from '@openedx/paragon';\nimport { Slot } from '@openedx/frontend-base';\n\nexport interface CourseCatalogDataTableControlBarSlotProps {\n currentPageResultsCount: number;\n totalResultsCount: number;\n}\n\nconst CourseCatalogDataTableControlBarSlot = ({\n currentPageResultsCount,\n totalResultsCount,\n}: CourseCatalogDataTableControlBarSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogDataTableControlBar.v1\"\n currentPageResultsCount={currentPageResultsCount}\n totalResultsCount={totalResultsCount}\n >\n <DataTable.TableControlBar />\n </Slot>\n);\n\nexport default CourseCatalogDataTableControlBarSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,GAClD,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAG7C,OAAO,oCAAoC,MAAM,yCAAyC,CAAC;AAC3F,OAAO,kCAAkC,MAAM,uCAAuC,CAAC;AACvF,OAAO,qCAAqC,MAAM,0CAA0C,CAAC;AAyB7F,MAAM,0BAA0B,GAAG,C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AAE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,mCAAI,CAAC,GAC1C,EACF,KAAC,kCAAkC,IAAC,WAAW,EAAE,WAAW,GAAI,EAChE,KAAC,SAAS,CAAC,UAAU,IAAC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAI,EAC9E,KAAC,qCAAqC,KAAG,IAC/B,GACP,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,0BAA0B,CAAC","sourcesContent":["import {\n breakpoints, DataTable, useMediaQuery, TextFilter,\n} from '@openedx/paragon';\nimport { getAppConfig, Slot, useIntl } from '@openedx/frontend-base';\n\nimport { appId } from '@src/constants';\nimport { DEFAULT_PAGE_SIZE } from '@src/data/course-list-search/constants';\nimport messages from '@src/catalog/messages';\nimport type { CourseListSearchResponse, DataTableParams } from '@src/data/course-list-search/types';\n\nimport CourseCatalogDataTableControlBarSlot from '../CourseCatalogDataTableControlBarSlot';\nimport CourseCatalogDataTableCardViewSlot from '../CourseCatalogDataTableCardViewSlot';\nimport CourseCatalogDataTableTableFooterSlot from '../CourseCatalogDataTableTableFooterSlot';\n\nexport interface TableColumnFilterChoice {\n name: string,\n number: number,\n value: string,\n}\n\nexport interface TableColumn {\n Header: string,\n accessor: string,\n Filter: React.ComponentType<any>,\n filter: string,\n filterChoices: TableColumnFilterChoice[],\n}\n\nexport interface CourseCatalogDataTableSlotProps {\n displayData?: CourseListSearchResponse,\n totalCourses: number,\n pageCount: number,\n pageIndex: number,\n tableColumns: TableColumn[],\n handleFetchData: (params: DataTableParams) => void,\n}\n\nconst CourseCatalogDataTableSlot = ({\n displayData,\n totalCourses,\n pageCount,\n pageIndex,\n tableColumns,\n handleFetchData,\n}: CourseCatalogDataTableSlotProps) => {\n const intl = useIntl();\n const isMedium = useMediaQuery({ maxWidth: breakpoints.large.maxWidth });\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogDataTable.v1\"\n displayData={displayData}\n totalCourses={totalCourses}\n pageCount={pageCount}\n pageIndex={pageIndex}\n tableColumns={tableColumns}\n handleFetchData={handleFetchData}\n >\n <DataTable\n showFiltersInSidebar={!isMedium}\n numBreakoutFilters={0}\n isFilterable={getAppConfig(appId).ENABLE_COURSE_DISCOVERY === true}\n isSortable\n isPaginated\n manualFilters\n manualPagination\n defaultColumnValues={{ Filter: TextFilter }}\n itemCount={displayData?.total || totalCourses}\n pageSize={DEFAULT_PAGE_SIZE}\n pageCount={pageCount}\n initialState={{ pageSize: DEFAULT_PAGE_SIZE, pageIndex }}\n data={displayData?.results}\n columns={tableColumns}\n fetchData={handleFetchData}\n initialTableOptions={{ getRowId: (row) => row.id }}\n >\n <CourseCatalogDataTableControlBarSlot\n currentPageResultsCount={displayData?.results?.length ?? 0}\n totalResultsCount={displayData?.total ?? 0}\n />\n <CourseCatalogDataTableCardViewSlot displayData={displayData} />\n <DataTable.EmptyTable content={intl.formatMessage(messages.noResultsFound)} />\n <CourseCatalogDataTableTableFooterSlot />\n </DataTable>\n </Slot>\n );\n};\n\nexport default CourseCatalogDataTableSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/CourseCatalogDataTableSlots/CourseCatalogDataTableSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,UAAU,GAClD,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAC3E,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAG7C,OAAO,oCAAoC,MAAM,yCAAyC,CAAC;AAC3F,OAAO,kCAAkC,MAAM,uCAAuC,CAAC;AACvF,OAAO,qCAAqC,MAAM,0CAA0C,CA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AM,mCAAI,CAAC,EAC1D,iBAAiB,EAAE,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,KAAK,mCAAI,CAAC,GAC1C,EACF,KAAC,kCAAkC,IAAC,WAAW,EAAE,WAAW,GAAI,EAChE,KAAC,SAAS,CAAC,UAAU,IAAC,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,cAAc,CAAC,GAAI,EAC9E,KAAC,qCAAqC,KAAG,IAC/B,GACP,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,0BAA0B,CAAC","sourcesContent":["import {\n breakpoints, DataTable, useMediaQuery, TextFilter,\n} from '@openedx/paragon';\nimport { getAppConfig, Slot, useIntl } from '@openedx/frontend-base';\n\nimport { appId } from '@src/constants';\nimport { DEFAULT_PAGE_SIZE } from '@src/data/course-list-search/constants';\nimport messages from '@src/catalog/messages';\nimport type { CourseListSearchResponse, DataTableParams } from '@src/data/course-list-search/types';\n\nimport CourseCatalogDataTableControlBarSlot from '../CourseCatalogDataTableControlBarSlot';\nimport CourseCatalogDataTableCardViewSlot from '../CourseCatalogDataTableCardViewSlot';\nimport CourseCatalogDataTableTableFooterSlot from '../CourseCatalogDataTableTableFooterSlot';\n\nexport interface TableColumnFilterChoice {\n name: string;\n number: number;\n value: string;\n}\n\nexport interface TableColumn {\n Header: string;\n accessor: string;\n Filter: React.ComponentType<any>;\n filter: string;\n filterChoices: TableColumnFilterChoice[];\n}\n\nexport interface CourseCatalogDataTableSlotProps {\n displayData?: CourseListSearchResponse;\n totalCourses: number;\n pageCount: number;\n pageIndex: number;\n tableColumns: TableColumn[];\n handleFetchData: (params: DataTableParams) => void;\n}\n\nconst CourseCatalogDataTableSlot = ({\n displayData,\n totalCourses,\n pageCount,\n pageIndex,\n tableColumns,\n handleFetchData,\n}: CourseCatalogDataTableSlotProps) => {\n const intl = useIntl();\n const isMedium = useMediaQuery({ maxWidth: breakpoints.large.maxWidth });\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogDataTable.v1\"\n displayData={displayData}\n totalCourses={totalCourses}\n pageCount={pageCount}\n pageIndex={pageIndex}\n tableColumns={tableColumns}\n handleFetchData={handleFetchData}\n >\n <DataTable\n showFiltersInSidebar={!isMedium}\n numBreakoutFilters={0}\n isFilterable={getAppConfig(appId).ENABLE_COURSE_DISCOVERY === true}\n isSortable\n isPaginated\n manualFilters\n manualPagination\n defaultColumnValues={{ Filter: TextFilter }}\n itemCount={displayData?.total || totalCourses}\n pageSize={DEFAULT_PAGE_SIZE}\n pageCount={pageCount}\n initialState={{ pageSize: DEFAULT_PAGE_SIZE, pageIndex }}\n data={displayData?.results}\n columns={tableColumns}\n fetchData={handleFetchData}\n initialTableOptions={{ getRowId: (row) => row.id }}\n >\n <CourseCatalogDataTableControlBarSlot\n currentPageResultsCount={displayData?.results?.length ?? 0}\n totalResultsCount={displayData?.total ?? 0}\n />\n <CourseCatalogDataTableCardViewSlot displayData={displayData} />\n <DataTable.EmptyTable content={intl.formatMessage(messages.noResultsFound)} />\n <CourseCatalogDataTableTableFooterSlot />\n </DataTable>\n </Slot>\n );\n};\n\nexport default CourseCatalogDataTableSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseCatalogIntroSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOzC,MAAM,sBAAsB,GAAG,CAAC,EAC9B,YAAY,EACZ,uBAAuB,GACK,EAAE,EAAE;IAChC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,QAAQ,GAAG,aAAa,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE1E,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,yDAAyD,EAC5D,YAAY,EAAE,YAAY,EAC1B,uBAAuB,EAAE,uBAAuB,YAEhD,KAAC,SAAS,IACR,KAAK,EAAE,YAAY,CAAC;gBAClB,IAAI;gBACJ,YAAY;gBACZ,uBAAuB;aACxB,CAAC,EACF,SAAS,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,GAC7C,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["import classNames from 'classnames';\nimport { Slot, useIntl } from '@openedx/frontend-base';\nimport { breakpoints, useMediaQuery } from '@openedx/paragon';\n\nimport { getPageTitle } from '@src/catalog/utils';\nimport { SubHeader } from '@src/generic';\n\nexport interface CourseCatalogIntroSlotProps {\n searchString: string,\n courseDataResultsLength?: number,\n}\n\nconst CourseCatalogIntroSlot = ({\n searchString,\n courseDataResultsLength,\n}: CourseCatalogIntroSlotProps) => {\n const intl = useIntl();\n const isMedium = useMediaQuery({ maxWidth: breakpoints.medium.maxWidth });\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogIntro.v1\"\n searchString={searchString}\n courseDataResultsLength={courseDataResultsLength}\n >\n <SubHeader\n title={getPageTitle({\n intl,\n searchString,\n courseDataResultsLength,\n })}\n className={classNames({ 'mx-2.5': isMedium })}\n />\n </Slot>\n );\n};\n\nexport default CourseCatalogIntroSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseCatalogIntroSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOzC,MAAM,sBAAsB,GAAG,CAAC,EAC9B,YAAY,EACZ,uBAAuB,GACK,EAAE,EAAE;IAChC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,QAAQ,GAAG,aAAa,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE1E,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,yDAAyD,EAC5D,YAAY,EAAE,YAAY,EAC1B,uBAAuB,EAAE,uBAAuB,YAEhD,KAAC,SAAS,IACR,KAAK,EAAE,YAAY,CAAC;gBAClB,IAAI;gBACJ,YAAY;gBACZ,uBAAuB;aACxB,CAAC,EACF,SAAS,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC,GAC7C,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["import classNames from 'classnames';\nimport { Slot, useIntl } from '@openedx/frontend-base';\nimport { breakpoints, useMediaQuery } from '@openedx/paragon';\n\nimport { getPageTitle } from '@src/catalog/utils';\nimport { SubHeader } from '@src/generic';\n\nexport interface CourseCatalogIntroSlotProps {\n searchString: string;\n courseDataResultsLength?: number;\n}\n\nconst CourseCatalogIntroSlot = ({\n searchString,\n courseDataResultsLength,\n}: CourseCatalogIntroSlotProps) => {\n const intl = useIntl();\n const isMedium = useMediaQuery({ maxWidth: breakpoints.medium.maxWidth });\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogIntro.v1\"\n searchString={searchString}\n courseDataResultsLength={courseDataResultsLength}\n >\n <SubHeader\n title={getPageTitle({\n intl,\n searchString,\n courseDataResultsLength,\n })}\n className={classNames({ 'mx-2.5': isMedium })}\n />\n </Slot>\n );\n};\n\nexport default CourseCatalogIntroSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseCatalogSearchFieldSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAQ7C,MAAM,4BAA4B,GAAG,CAAC,EACpC,cAAc,EACd,YAAY,EACZ,kBAAkB,GACgB,EAAE,EAAE;IACtC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,QAAQ,GAAG,aAAa,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEzE,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,+DAA+D,EAClE,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,YAErC,YAAY,CAAC,KAAK,CAAC,CAAC,uBAAuB,KAAK,IAAI,IAAI,CACvD,KAAC,WAAW,IAEV,SAAS,EAAE,UAAU,CAAC;gBACpB,oBAAoB,EAAE,QAAQ;gBAC9B,WAAW,EAAE,CAAC,QAAQ;aACvB,CAAC,EACF,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAC3D,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE;gBAC1B,cAAc,CAAC,KAAK,CAAC,CAAC;YACxB,CAAC,EACD,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE;gBAC1B,cAAc,CAAC,KAAK,CAAC,CAAC;gBACtB,YAAY,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC,EACD,KAAK,EAAE,kBAAkB,IAbrB,cAAc,CAclB,CACH,GACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC","sourcesContent":["import { breakpoints, SearchField, useMediaQuery } from '@openedx/paragon';\nimport { getAppConfig, Slot, useIntl } from '@openedx/frontend-base';\nimport classNames from 'classnames';\n\nimport { appId } from '@src/constants';\nimport messages from '@src/catalog/messages';\n\nexport interface CourseCatalogSearchFieldSlotProps {\n setSearchInput: (value: string) => void,\n handleSearch: (value: string) => void,\n initialSearchValue?: string,\n}\n\nconst CourseCatalogSearchFieldSlot = ({\n setSearchInput,\n handleSearch,\n initialSearchValue,\n}: CourseCatalogSearchFieldSlotProps) => {\n const intl = useIntl();\n const isMedium = useMediaQuery({ maxWidth: breakpoints.large.maxWidth });\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogSearchField.v1\"\n setSearchInput={setSearchInput}\n handleSearch={handleSearch}\n initialSearchValue={initialSearchValue}\n >\n {getAppConfig(appId).ENABLE_COURSE_DISCOVERY === true && (\n <SearchField\n key=\"search-field\"\n className={classNames({\n 'w-auto mx-2.5 mb-0': isMedium,\n 'mb-4 w-25': !isMedium,\n })}\n placeholder={intl.formatMessage(messages.searchPlaceholder)}\n onChange={(value: string) => {\n setSearchInput(value);\n }}\n onSubmit={(value: string) => {\n setSearchInput(value);\n handleSearch(value);\n }}\n value={initialSearchValue}\n />\n )}\n </Slot>\n );\n};\n\nexport default CourseCatalogSearchFieldSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/CourseCatalogSearchFieldSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAQ7C,MAAM,4BAA4B,GAAG,CAAC,EACpC,cAAc,EACd,YAAY,EACZ,kBAAkB,GACgB,EAAE,EAAE;IACtC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IACvB,MAAM,QAAQ,GAAG,aAAa,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEzE,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,+DAA+D,EAClE,cAAc,EAAE,cAAc,EAC9B,YAAY,EAAE,YAAY,EAC1B,kBAAkB,EAAE,kBAAkB,YAErC,YAAY,CAAC,KAAK,CAAC,CAAC,uBAAuB,KAAK,IAAI,IAAI,CACvD,KAAC,WAAW,IAEV,SAAS,EAAE,UAAU,CAAC;gBACpB,oBAAoB,EAAE,QAAQ;gBAC9B,WAAW,EAAE,CAAC,QAAQ;aACvB,CAAC,EACF,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAC3D,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE;gBAC1B,cAAc,CAAC,KAAK,CAAC,CAAC;YACxB,CAAC,EACD,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE;gBAC1B,cAAc,CAAC,KAAK,CAAC,CAAC;gBACtB,YAAY,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC,EACD,KAAK,EAAE,kBAAkB,IAbrB,cAAc,CAclB,CACH,GACI,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC","sourcesContent":["import { breakpoints, SearchField, useMediaQuery } from '@openedx/paragon';\nimport { getAppConfig, Slot, useIntl } from '@openedx/frontend-base';\nimport classNames from 'classnames';\n\nimport { appId } from '@src/constants';\nimport messages from '@src/catalog/messages';\n\nexport interface CourseCatalogSearchFieldSlotProps {\n setSearchInput: (value: string) => void;\n handleSearch: (value: string) => void;\n initialSearchValue?: string;\n}\n\nconst CourseCatalogSearchFieldSlot = ({\n setSearchInput,\n handleSearch,\n initialSearchValue,\n}: CourseCatalogSearchFieldSlotProps) => {\n const intl = useIntl();\n const isMedium = useMediaQuery({ maxWidth: breakpoints.large.maxWidth });\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.courseCatalogSearchField.v1\"\n setSearchInput={setSearchInput}\n handleSearch={handleSearch}\n initialSearchValue={initialSearchValue}\n >\n {getAppConfig(appId).ENABLE_COURSE_DISCOVERY === true && (\n <SearchField\n key=\"search-field\"\n className={classNames({\n 'w-auto mx-2.5 mb-0': isMedium,\n 'mb-4 w-25': !isMedium,\n })}\n placeholder={intl.formatMessage(messages.searchPlaceholder)}\n onChange={(value: string) => {\n setSearchInput(value);\n }}\n onSubmit={(value: string) => {\n setSearchInput(value);\n handleSearch(value);\n }}\n value={initialSearchValue}\n />\n )}\n </Slot>\n );\n};\n\nexport default CourseCatalogSearchFieldSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/HomeCourseCardSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1C,MAAM,kBAAkB,GAAG,CAAC,EAC1B,QAAQ,EAAE,UAAU,EACpB,SAAS,GAIV,EAAE,EAAE;IACH,MAAM,SAAS,GAA4B;QACzC,SAAS;QACT,QAAQ,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAE;QACxB,SAAS,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,GAAG;QAC/B,UAAU,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,OAAO,CAAC,WAAW;QAChD,YAAY,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,MAAM;QACrC,cAAc,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,QAAQ;QACzC,eAAe,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,KAAK;QACvC,qBAAqB,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,eAAe;KACxD,CAAC;IAEF,OAAO,CACL,KAAC,IAAI,kBACH,EAAE,EAAC,qDAAqD,IACpD,SAAS,cAEb,KAAC,UAAU,oBAAK,SAAS,EAAI,IACxB,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { CourseCard } from '@src/generic';\nimport type { Course } from '@src/generic/course-card/types';\n\nexport interface HomeCourseCardSlotProps {\n isLoading?: boolean,\n courseId?: string,\n courseOrg?: string,\n courseName?: string,\n courseNumber?: string,\n courseImageUrl?: string,\n courseStartDate?: string,\n courseAdvertisedStart?: string,\n}\n\nconst HomeCourseCardSlot = ({\n original: courseData,\n isLoading,\n}: {\n original?: Course,\n isLoading?: boolean,\n}) => {\n const slotProps: HomeCourseCardSlotProps = {\n isLoading,\n courseId: courseData?.id,\n courseOrg: courseData?.data.org,\n courseName: courseData?.data.content.displayName,\n courseNumber: courseData?.data.number,\n courseImageUrl: courseData?.data.imageUrl,\n courseStartDate: courseData?.data.start,\n courseAdvertisedStart: courseData?.data.advertisedStart,\n };\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.homeCourseCard.v1\"\n {...slotProps}\n >\n <CourseCard {...slotProps} />\n </Slot>\n );\n};\n\nexport default HomeCourseCardSlot;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/slots/HomeCourseCardSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1C,MAAM,kBAAkB,GAAG,CAAC,EAC1B,QAAQ,EAAE,UAAU,EACpB,SAAS,GAIV,EAAE,EAAE;IACH,MAAM,SAAS,GAA4B;QACzC,SAAS;QACT,QAAQ,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,EAAE;QACxB,SAAS,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,GAAG;QAC/B,UAAU,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,OAAO,CAAC,WAAW;QAChD,YAAY,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,MAAM;QACrC,cAAc,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,QAAQ;QACzC,eAAe,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,KAAK;QACvC,qBAAqB,EAAE,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAC,eAAe;KACxD,CAAC;IAEF,OAAO,CACL,KAAC,IAAI,kBACH,EAAE,EAAC,qDAAqD,IACpD,SAAS,cAEb,KAAC,UAAU,oBAAK,SAAS,EAAI,IACxB,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { CourseCard } from '@src/generic';\nimport type { Course } from '@src/generic/course-card/types';\n\nexport interface HomeCourseCardSlotProps {\n isLoading?: boolean;\n courseId?: string;\n courseOrg?: string;\n courseName?: string;\n courseNumber?: string;\n courseImageUrl?: string;\n courseStartDate?: string;\n courseAdvertisedStart?: string;\n}\n\nconst HomeCourseCardSlot = ({\n original: courseData,\n isLoading,\n}: {\n original?: Course;\n isLoading?: boolean;\n}) => {\n const slotProps: HomeCourseCardSlotProps = {\n isLoading,\n courseId: courseData?.id,\n courseOrg: courseData?.data.org,\n courseName: courseData?.data.content.displayName,\n courseNumber: courseData?.data.number,\n courseImageUrl: courseData?.data.imageUrl,\n courseStartDate: courseData?.data.start,\n courseAdvertisedStart: courseData?.data.advertisedStart,\n };\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.homeCourseCard.v1\"\n {...slotProps}\n >\n <CourseCard {...slotProps} />\n </Slot>\n );\n};\n\nexport default HomeCourseCardSlot;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/HomePromoVideoSlots/HomePromoVideoButtonSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AAMnF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EAAE,OAAO,EAAiC,EAAE,EAAE,CAAC,CACtF,KAAC,IAAI,IACH,EAAE,EAAC,2DAA2D,EAC9D,OAAO,EAAE,OAAO,YAEf,YAAY,CAAC,KAAK,CAAC,CAAC,+BAA+B;QAClD,CAAC,CAAC,KAAC,iBAAiB,IAAC,OAAO,EAAE,OAAO,GAAI;QACzC,CAAC,CAAC,IAAI,GACH,CACR,CAAC","sourcesContent":["import { getAppConfig, Slot } from '@openedx/frontend-base';\n\nimport { appId } from '@src/constants';\nimport HomePromoVideoBtn from '@src/home/components/home-banner/HomePromoVideoBtn';\n\nexport interface HomePromoVideoButtonSlotProps {\n onClick: () => void,\n}\n\nexport const HomePromoVideoButtonSlot = ({ onClick }: HomePromoVideoButtonSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.homePromoVideoButton.v1\"\n onClick={onClick}\n >\n {getAppConfig(appId).HOMEPAGE_PROMO_VIDEO_YOUTUBE_ID\n ? <HomePromoVideoBtn onClick={onClick} />\n : null}\n </Slot>\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/HomePromoVideoSlots/HomePromoVideoButtonSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AAMnF,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,EAAE,OAAO,EAAiC,EAAE,EAAE,CAAC,CACtF,KAAC,IAAI,IACH,EAAE,EAAC,2DAA2D,EAC9D,OAAO,EAAE,OAAO,YAEf,YAAY,CAAC,KAAK,CAAC,CAAC,+BAA+B;QAClD,CAAC,CAAC,KAAC,iBAAiB,IAAC,OAAO,EAAE,OAAO,GAAI;QACzC,CAAC,CAAC,IAAI,GACH,CACR,CAAC","sourcesContent":["import { getAppConfig, Slot } from '@openedx/frontend-base';\n\nimport { appId } from '@src/constants';\nimport HomePromoVideoBtn from '@src/home/components/home-banner/HomePromoVideoBtn';\n\nexport interface HomePromoVideoButtonSlotProps {\n onClick: () => void;\n}\n\nexport const HomePromoVideoButtonSlot = ({ onClick }: HomePromoVideoButtonSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.homePromoVideoButton.v1\"\n onClick={onClick}\n >\n {getAppConfig(appId).HOMEPAGE_PROMO_VIDEO_YOUTUBE_ID\n ? <HomePromoVideoBtn onClick={onClick} />\n : null}\n </Slot>\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/HomePromoVideoSlots/HomePromoVideoModalContentSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC9G,OAAO,QAAQ,MAAM,mCAAmC,CAAC;AAQzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,EAC7C,OAAO,EACP,KAAK,GAAG,yBAAyB,EACjC,MAAM,GAAG,0BAA0B,GACC,EAAE,EAAE;IACxC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,iEAAiE,EACpE,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,YAEd,iBACE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACpD,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,2BAA2B,OAAO,aAAa,EACpD,WAAW,EAAC,GAAG,EACf,eAAe,QACf,KAAK,EAAE,qBAAqB,GAC5B,GACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Slot, useIntl } from '@openedx/frontend-base';\n\nimport { DEFAULT_VIDEO_MODAL_HEIGHT, DEFAULT_VIDEO_MODAL_WIDTH, IFRAME_FEATURE_POLICY } from '@src/constants';\nimport messages from '@src/generic/video-modal/messages';\n\nexport interface HomePromoVideoModalContentSlotProps {\n videoId: string,\n width?: string,\n height?: number,\n}\n\nexport const HomePromoVideoModalContentSlot = ({\n videoId,\n width = DEFAULT_VIDEO_MODAL_WIDTH,\n height = DEFAULT_VIDEO_MODAL_HEIGHT,\n}: HomePromoVideoModalContentSlotProps) => {\n const intl = useIntl();\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.homePromoVideoModalContent.v1\"\n videoId={videoId}\n width={width}\n height={height}\n >\n <iframe\n title={intl.formatMessage(messages.videoIframeTitle)}\n width={width}\n height={height}\n src={`//www.youtube.com/embed/${videoId}?showinfo=0`}\n frameBorder=\"0\"\n allowFullScreen\n allow={IFRAME_FEATURE_POLICY}\n />\n </Slot>\n );\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/HomePromoVideoSlots/HomePromoVideoModalContentSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC9G,OAAO,QAAQ,MAAM,mCAAmC,CAAC;AAQzD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,EAC7C,OAAO,EACP,KAAK,GAAG,yBAAyB,EACjC,MAAM,GAAG,0BAA0B,GACC,EAAE,EAAE;IACxC,MAAM,IAAI,GAAG,OAAO,EAAE,CAAC;IAEvB,OAAO,CACL,KAAC,IAAI,IACH,EAAE,EAAC,iEAAiE,EACpE,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,YAEd,iBACE,KAAK,EAAE,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EACpD,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,2BAA2B,OAAO,aAAa,EACpD,WAAW,EAAC,GAAG,EACf,eAAe,QACf,KAAK,EAAE,qBAAqB,GAC5B,GACG,CACR,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import { Slot, useIntl } from '@openedx/frontend-base';\n\nimport { DEFAULT_VIDEO_MODAL_HEIGHT, DEFAULT_VIDEO_MODAL_WIDTH, IFRAME_FEATURE_POLICY } from '@src/constants';\nimport messages from '@src/generic/video-modal/messages';\n\nexport interface HomePromoVideoModalContentSlotProps {\n videoId: string;\n width?: string;\n height?: number;\n}\n\nexport const HomePromoVideoModalContentSlot = ({\n videoId,\n width = DEFAULT_VIDEO_MODAL_WIDTH,\n height = DEFAULT_VIDEO_MODAL_HEIGHT,\n}: HomePromoVideoModalContentSlotProps) => {\n const intl = useIntl();\n\n return (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.homePromoVideoModalContent.v1\"\n videoId={videoId}\n width={width}\n height={height}\n >\n <iframe\n title={intl.formatMessage(messages.videoIframeTitle)}\n width={width}\n height={height}\n src={`//www.youtube.com/embed/${videoId}?showinfo=0`}\n frameBorder=\"0\"\n allowFullScreen\n allow={IFRAME_FEATURE_POLICY}\n />\n </Slot>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/HomePromoVideoSlots/HomePromoVideoModalSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AAQnF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAgC,EAAE,EAAE,CAAC,CACnG,KAAC,IAAI,IACH,EAAE,EAAC,0DAA0D,EAC7D,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,YAEhB,KAAC,UAAU,IAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,YACtC,KAAC,8BAA8B,IAAC,OAAO,EAAE,OAAO,GAAI,GACzC,GACR,CACR,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { VideoModal } from '@src/generic';\nimport { HomePromoVideoModalContentSlot } from '../HomePromoVideoModalContentSlot';\n\nexport interface HomePromoVideoModalSlotProps {\n isOpen: boolean,\n close: () => void,\n videoId: string,\n}\n\nexport const HomePromoVideoModalSlot = ({ isOpen, close, videoId }: HomePromoVideoModalSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.homePromoVideoModal.v1\"\n isOpen={isOpen}\n close={close}\n videoId={videoId}\n >\n <VideoModal isOpen={isOpen} close={close}>\n <HomePromoVideoModalContentSlot videoId={videoId} />\n </VideoModal>\n </Slot>\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/slots/HomePromoVideoSlots/HomePromoVideoModalSlot/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,8BAA8B,EAAE,MAAM,mCAAmC,CAAC;AAQnF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAgC,EAAE,EAAE,CAAC,CACnG,KAAC,IAAI,IACH,EAAE,EAAC,0DAA0D,EAC7D,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,YAEhB,KAAC,UAAU,IAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,YACtC,KAAC,8BAA8B,IAAC,OAAO,EAAE,OAAO,GAAI,GACzC,GACR,CACR,CAAC","sourcesContent":["import { Slot } from '@openedx/frontend-base';\n\nimport { VideoModal } from '@src/generic';\nimport { HomePromoVideoModalContentSlot } from '../HomePromoVideoModalContentSlot';\n\nexport interface HomePromoVideoModalSlotProps {\n isOpen: boolean;\n close: () => void;\n videoId: string;\n}\n\nexport const HomePromoVideoModalSlot = ({ isOpen, close, videoId }: HomePromoVideoModalSlotProps) => (\n <Slot\n id=\"org.openedx.frontend.slot.catalog.homePromoVideoModal.v1\"\n isOpen={isOpen}\n close={close}\n videoId={videoId}\n >\n <VideoModal isOpen={isOpen} close={close}>\n <HomePromoVideoModalContentSlot videoId={videoId} />\n </VideoModal>\n </Slot>\n);\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openedx/frontend-app-catalog",
3
- "version": "1.0.0-alpha.1",
3
+ "version": "1.0.0-alpha.3",
4
4
  "description": "Frontend catalog application",
5
5
  "repository": {
6
6
  "type": "git",
@@ -75,7 +75,7 @@
75
75
  "turbo": "^2.9.2"
76
76
  },
77
77
  "peerDependencies": {
78
- "@openedx/frontend-base": "^1.0.0 || 0.0.0-dev",
78
+ "@openedx/frontend-base": "^2.0.0-alpha.4 || 0.0.0-dev",
79
79
  "@openedx/paragon": "^23",
80
80
  "@tanstack/react-query": "^5",
81
81
  "react": "^18",