richie-education 2.30.0 → 2.30.1-dev11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/jest.config.js CHANGED
@@ -15,7 +15,7 @@ module.exports = {
15
15
  },
16
16
  resolver: '<rootDir>/jest/resolver.js',
17
17
  transformIgnorePatterns: [
18
- 'node_modules/(?!(lodash-es|@hookform/resolvers|query-string|decode-uri-component|split-on-first|filter-obj|@openfun/cunningham-react)/)',
18
+ 'node_modules/(?!(react-intl|lodash-es|@hookform/resolvers|query-string|decode-uri-component|split-on-first|filter-obj|@openfun/cunningham-react)/)',
19
19
  ],
20
20
  globals: {
21
21
  RICHIE_VERSION: 'test',
@@ -1,3 +1,4 @@
1
+ import { Button } from '@openfun/cunningham-react';
1
2
  import { defineMessages, FormattedMessage, useIntl } from 'react-intl';
2
3
  import { CourseRun, CourseRunDisplayMode, PacedCourse } from 'types';
3
4
  import useDateFormat from 'hooks/useDateFormat';
@@ -76,9 +77,9 @@ const OpenedSelfPacedCourseRun = ({
76
77
  {findLmsBackend(courseRun.resource_link) ? (
77
78
  <CourseRunEnrollment courseRun={courseRun} />
78
79
  ) : (
79
- <a className="course-run-enrollment__cta" href={courseRun.resource_link}>
80
+ <Button className="course-run-enrollment__cta" href={courseRun.resource_link} fullWidth>
80
81
  {StringHelper.capitalizeFirst(courseRun.state.call_to_action)}
81
- </a>
82
+ </Button>
82
83
  )}
83
84
  </>
84
85
  );
@@ -85,7 +85,7 @@ const SyllabusCourseRunsList = ({
85
85
  </div>
86
86
  )}
87
87
  {openedRuns.length === 1 &&
88
- (course.is_self_paced && openedRuns[0].state.priority !== Priority.ARCHIVED_OPEN ? (
88
+ (course.is_self_paced && openedRuns[0].state.priority === Priority.ONGOING_OPEN ? (
89
89
  <div className="course-detail__row course-detail__runs course-detail__runs--open">
90
90
  <SyllabusCourseRunCompacted
91
91
  courseRun={openedRuns[0]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "richie-education",
3
- "version": "2.30.0",
3
+ "version": "2.30.1-dev11",
4
4
  "description": "A CMS to build learning portals for Open Education",
5
5
  "main": "sandbox/manage.py",
6
6
  "scripts": {
@@ -38,51 +38,50 @@
38
38
  "not dead"
39
39
  ],
40
40
  "dependencies": {
41
- "@babel/core": "7.25.7",
41
+ "@babel/core": "7.26.0",
42
42
  "@babel/plugin-syntax-dynamic-import": "7.8.3",
43
- "@babel/plugin-transform-modules-commonjs": "7.25.7",
44
- "@babel/preset-env": "7.25.7",
45
- "@babel/preset-react": "7.25.7",
46
- "@babel/preset-typescript": "7.25.7",
47
- "@faker-js/faker": "9.0.3",
48
- "@formatjs/cli": "6.2.14",
49
- "@formatjs/intl-relativetimeformat": "11.2.15",
43
+ "@babel/plugin-transform-modules-commonjs": "7.25.9",
44
+ "@babel/preset-env": "7.26.0",
45
+ "@babel/preset-react": "7.25.9",
46
+ "@babel/preset-typescript": "7.26.0",
47
+ "@faker-js/faker": "9.1.0",
48
+ "@formatjs/cli": "6.3.5",
49
+ "@formatjs/intl-relativetimeformat": "11.4.1",
50
50
  "@hookform/resolvers": "3.9.0",
51
51
  "@lyracom/embedded-form-glue": "1.4.2",
52
52
  "@openfun/cunningham-react": "2.9.4",
53
53
  "@openfun/cunningham-tokens": "2.1.1",
54
- "@sentry/browser": "8.33.1",
55
- "@sentry/types": "8.33.1",
56
- "@storybook/addon-actions": "8.3.5",
57
- "@storybook/addon-essentials": "8.3.5",
58
- "@storybook/addon-interactions": "8.3.5",
59
- "@storybook/addon-links": "8.3.5",
60
- "@storybook/react": "8.3.5",
61
- "@storybook/react-webpack5": "8.3.5",
62
- "@storybook/test": "8.3.5",
63
- "@tanstack/query-core": "5.59.4",
64
- "@tanstack/query-sync-storage-persister": "5.59.4",
65
- "@tanstack/react-query": "5.59.4",
66
- "@tanstack/react-query-devtools": "5.59.4",
67
- "@tanstack/react-query-persist-client": "5.59.4",
54
+ "@sentry/browser": "8.35.0",
55
+ "@sentry/types": "8.35.0",
56
+ "@storybook/addon-actions": "8.3.6",
57
+ "@storybook/addon-essentials": "8.3.6",
58
+ "@storybook/addon-interactions": "8.3.6",
59
+ "@storybook/addon-links": "8.3.6",
60
+ "@storybook/react": "8.3.6",
61
+ "@storybook/react-webpack5": "8.3.6",
62
+ "@storybook/test": "8.3.6",
63
+ "@tanstack/query-core": "5.59.16",
64
+ "@tanstack/query-sync-storage-persister": "5.59.16",
65
+ "@tanstack/react-query": "5.59.16",
66
+ "@tanstack/react-query-devtools": "5.59.16",
67
+ "@tanstack/react-query-persist-client": "5.59.16",
68
68
  "@testing-library/dom": "10.4.0",
69
- "@testing-library/jest-dom": "6.5.0",
69
+ "@testing-library/jest-dom": "6.6.2",
70
70
  "@testing-library/react": "16.0.1",
71
71
  "@testing-library/user-event": "14.5.2",
72
72
  "@types/fetch-mock": "7.3.8",
73
73
  "@types/iframe-resizer": "3.5.13",
74
- "@types/jest": "29.5.13",
74
+ "@types/jest": "29.5.14",
75
75
  "@types/js-cookie": "3.0.6",
76
76
  "@types/lodash-es": "4.17.12",
77
77
  "@types/node-fetch": "2.6.11",
78
78
  "@types/query-string": "6.3.0",
79
- "@types/react": "18.3.11",
79
+ "@types/react": "18.3.12",
80
80
  "@types/react-autosuggest": "10.1.11",
81
- "@types/react-dom": "18.3.0",
81
+ "@types/react-dom": "18.3.1",
82
82
  "@types/react-modal": "3.16.3",
83
- "@types/uuid": "10.0.0",
84
- "@typescript-eslint/eslint-plugin": "8.8.1",
85
- "@typescript-eslint/parser": "8.8.1",
83
+ "@typescript-eslint/eslint-plugin": "8.11.0",
84
+ "@typescript-eslint/parser": "8.11.0",
86
85
  "babel-jest": "29.7.0",
87
86
  "babel-loader": "9.2.1",
88
87
  "babel-plugin-react-intl": "8.2.25",
@@ -97,13 +96,13 @@
97
96
  "eslint-config-prettier": "9.1.0",
98
97
  "eslint-import-resolver-webpack": "0.13.9",
99
98
  "eslint-plugin-compat": "6.0.1",
100
- "eslint-plugin-formatjs": "5.0.2",
99
+ "eslint-plugin-formatjs": "5.1.5",
101
100
  "eslint-plugin-import": "2.31.0",
102
- "eslint-plugin-jsx-a11y": "6.10.0",
101
+ "eslint-plugin-jsx-a11y": "6.10.2",
103
102
  "eslint-plugin-prettier": "5.2.1",
104
- "eslint-plugin-react": "7.37.1",
105
- "eslint-plugin-react-hooks": "4.6.2",
106
- "eslint-plugin-storybook": "0.9.0",
103
+ "eslint-plugin-react": "7.37.2",
104
+ "eslint-plugin-react-hooks": "5.0.0",
105
+ "eslint-plugin-storybook": "0.10.1",
107
106
  "fetch-mock": "<10",
108
107
  "file-loader": "6.2.0",
109
108
  "glob": "11.0.0",
@@ -115,7 +114,7 @@
115
114
  "js-cookie": "3.0.5",
116
115
  "lodash-es": "4.17.21",
117
116
  "mdn-polyfills": "5.20.0",
118
- "msw": "2.4.9",
117
+ "msw": "2.5.2",
119
118
  "node-fetch": ">2.6.6 <3",
120
119
  "nodemon": "3.1.7",
121
120
  "prettier": "3.3.3",
@@ -123,16 +122,16 @@
123
122
  "react": "18.3.1",
124
123
  "react-autosuggest": "10.1.0",
125
124
  "react-dom": "18.3.1",
126
- "react-hook-form": "7.53.0",
127
- "react-intl": "6.7.2",
125
+ "react-hook-form": "7.53.1",
126
+ "react-intl": "6.8.4",
128
127
  "react-modal": "3.16.1",
129
- "react-router-dom": "6.26.2",
130
- "sass": "1.79.4",
128
+ "react-router-dom": "6.27.0",
129
+ "sass": "1.80.4",
131
130
  "source-map-loader": "5.0.0",
132
- "storybook": "8.3.5",
131
+ "storybook": "8.3.6",
133
132
  "tsconfig-paths-webpack-plugin": "4.1.0",
134
133
  "typescript": "5.6.3",
135
- "uuid": "10.0.0",
134
+ "uuid": "11.0.2",
136
135
  "webpack": "5.95.0",
137
136
  "webpack-cli": "5.1.4",
138
137
  "whatwg-fetch": "3.6.20",
@@ -142,8 +141,8 @@
142
141
  },
143
142
  "resolutions": {
144
143
  "@testing-library/dom": "10.4.0",
145
- "@types/react": "18.3.11",
146
- "@types/react-dom": "18.3.0"
144
+ "@types/react": "18.3.12",
145
+ "@types/react-dom": "18.3.1"
147
146
  },
148
147
  "msw": {
149
148
  "workerDirectory": "../richie/static/richie/js"
@@ -152,7 +151,7 @@
152
151
  "node": "20.11.0"
153
152
  },
154
153
  "devDependencies": {
155
- "@storybook/addon-mdx-gfm": "8.3.5",
154
+ "@storybook/addon-mdx-gfm": "8.3.6",
156
155
  "@storybook/addon-webpack5-compiler-babel": "3.0.3"
157
156
  }
158
157
  }
@@ -1,3 +1,6 @@
1
+ $r-section-grid-sizes: () !default;
2
+ $r-section-grid-gutters: () !default;
3
+
1
4
  section {
2
5
  // Ensure caesura always takes full width with some space around
3
6
  // within flex grid
@@ -70,6 +73,9 @@ section {
70
73
  }
71
74
  }
72
75
  }
76
+
77
+ // Enable CSS grid
78
+ @include m-o-grid($r-section-grid-sizes, $r-section-grid-gutters);
73
79
  }
74
80
 
75
81
  //
@@ -127,6 +133,9 @@ section {
127
133
  }
128
134
  }
129
135
 
136
+ // Enable CSS grid
137
+ @include m-o-grid($r-section-grid-sizes, $r-section-grid-gutters);
138
+
130
139
  .category-glimpse {
131
140
  @include sv-flex(1, 0, calc(15% - 1rem));
132
141
  max-width: none;
@@ -165,3 +165,20 @@ $r-search-filters-gutter: 0.2rem !default;
165
165
  $r-ease-in: cubic-bezier(0.5, 0, 0.75, 0) !default;
166
166
  $r-ease-out: cubic-bezier(0.25, 1, 0.5, 1) !default;
167
167
  $r-ease-in-out: cubic-bezier(0.76, 0, 0.24, 1) !default;
168
+
169
+ // Define the grid column template for Section grid
170
+ // Each item will be a variant to allow on grid
171
+ $r-section-grid-sizes: (
172
+ '50x50': 1fr 1fr,
173
+ '33x33x33': 1fr 1fr 1fr,
174
+ '25x75': 25% 2fr,
175
+ '75x25': 2fr 25%,
176
+ );
177
+
178
+ // Define gutter size to apply on Section grid
179
+ // Each item is a breakpoint where to apply the gutter, breakpoint 'sm' is used as
180
+ // the default gutter size for minimal breakpoint if defined
181
+ $r-section-grid-gutters: (
182
+ 'sm': 0.5rem,
183
+ 'xl': 1rem,
184
+ );
@@ -0,0 +1,50 @@
1
+ // Basic CSS grid
2
+
3
+ // Define CSS grid rules for content
4
+ @mixin m-o-grid($grid-sizes, $grid-gutters) {
5
+ // CSS grid definition
6
+ &__grid {
7
+ display: grid;
8
+ grid-template-columns: 100%;
9
+
10
+ // Neutralize and adapt some rules that for content items that can define some
11
+ // rules which conflict with expected section grid behaviors
12
+ & > * {
13
+ min-width: auto !important;
14
+ max-width: none !important;
15
+ }
16
+
17
+ // Adjust button caesura
18
+ & > .button-caesura {
19
+ display: block;
20
+ }
21
+
22
+ // Enable column size only for large screen and up
23
+ @include media-breakpoint-up(lg) {
24
+ @each $key, $value in $r-section-grid-sizes {
25
+ &--#{$key} {
26
+ grid-template-columns: $value;
27
+ }
28
+ }
29
+ }
30
+
31
+ // Variants with a gutter between content items
32
+ &--with-gutter {
33
+ @if map-get($r-section-grid-gutters, 'sm') {
34
+ column-gap: map-get($r-section-grid-gutters, 'sm');
35
+ row-gap: map-get($r-section-grid-gutters, 'sm');
36
+ }
37
+ @each $key, $value in $r-section-grid-gutters {
38
+ @include media-breakpoint-up($key) {
39
+ column-gap: $value;
40
+ row-gap: $value;
41
+ }
42
+ }
43
+
44
+ // Disable contents margin in profit of grid gutter
45
+ & > * {
46
+ margin: 0 !important;
47
+ }
48
+ }
49
+ }
50
+ }
@@ -7,6 +7,7 @@
7
7
  @import './empty';
8
8
  @import './features';
9
9
  @import './flexbox';
10
+ @import './grids';
10
11
  @import './hero';
11
12
  @import './keyframes';
12
13
  @import './list-group';
package/webpack.config.js CHANGED
@@ -21,7 +21,7 @@ module.exports = (env) => {
21
21
  ? require(path.join(process.cwd(), richieSettings)).overrides
22
22
  : {};
23
23
 
24
- const babelCompileDeps = ['react-intl', 'react-modal', 'strict-uri-encode'];
24
+ const babelCompileDeps = ['react-modal'];
25
25
 
26
26
  // Get the version from package.json to make it available in the bundle
27
27
  let version;