@edx/frontend-app-subscription-learner-dashboard 1.68.1 → 1.68.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { ProductCard } from '../../ProductCard';
3
+ import { useGridKeyboardNavigation } from '../../../hooks/useGridKeyboardNavigation';
3
4
  export const Recommendations = ({ items }) => {
4
- return (_jsx("div", { "data-testid": "popular-courses-items", children: _jsx("div", { className: "row g-3 flex-nowrap flex-md-wrap overflow-auto", children: items.map((item) => (_jsx("div", { className: "col-12 col-md-6 col-xl-3 d-flex mb-2", children: _jsx(ProductCard, { item: item }) }, item.objectID))) }) }));
5
+ const { gridRef, registerCard, handleKeyDown, setFocusedIndex } = useGridKeyboardNavigation({ columns: 4 });
6
+ return (_jsx("div", { "data-testid": "popular-courses-items", ref: gridRef, tabIndex: 0, onKeyDown: handleKeyDown, children: _jsx("div", { className: "row g-3 flex-nowrap flex-md-wrap overflow-auto", children: items.map((item, index) => (_jsx("div", { ref: node => registerCard(index, node), tabIndex: 0, className: "col-12 col-md-6 col-xl-3 d-flex mb-2", onFocus: () => setFocusedIndex(index), children: _jsx(ProductCard, { item: item }) }, item.objectID))) }) }));
5
7
  };
6
8
  export default Recommendations;
7
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/containers/RecommendationsRailsPanel/Recommendations/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACrE,OAAO,CACL,6BAAiB,uBAAuB,YACtC,cAAK,SAAS,EAAC,gDAAgD,YAC5D,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,cAAyB,SAAS,EAAC,sCAAsC,YACvE,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI,IADnB,IAAI,CAAC,QAAQ,CAEjB,CACP,CAAC,GACE,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { FC } from 'react';\n\nimport { ProductCard } from '../../ProductCard';\nimport { RecommendationsProps } from './data/types';\n\nexport const Recommendations: FC<RecommendationsProps> = ({ items }) => {\n return (\n <div data-testid=\"popular-courses-items\">\n <div className=\"row g-3 flex-nowrap flex-md-wrap overflow-auto\">\n {items.map((item) => (\n <div key={item.objectID} className=\"col-12 col-md-6 col-xl-3 d-flex mb-2\">\n <ProductCard item={item} />\n </div>\n ))}\n </div>\n </div>\n );\n};\n\nexport default Recommendations;\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/containers/RecommendationsRailsPanel/Recommendations/index.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAGjF,MAAM,CAAC,MAAM,eAAe,GAA6B,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;IACrE,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,GAAG,yBAAyB,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC,CAAC;IAE5G,OAAO,CACL,6BACc,uBAAuB,EACnC,GAAG,EAAE,OAAO,EACZ,QAAQ,EAAE,CAAC,EACX,SAAS,EAAE,aAAa,YAExB,cAAK,SAAS,EAAC,gDAAgD,YAC5D,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC1B,cAEE,GAAG,EAAE,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,EACtC,QAAQ,EAAE,CAAC,EACX,SAAS,EAAC,sCAAsC,EAChD,OAAO,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,KAAK,CAAC,YAErC,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,GAAI,IANtB,IAAI,CAAC,QAAQ,CAOd,CACP,CAAC,GACE,GACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { FC } from 'react';\n\nimport { ProductCard } from '../../ProductCard';\nimport { useGridKeyboardNavigation } from '@src/hooks/useGridKeyboardNavigation';\nimport { RecommendationsProps } from './data/types';\n\nexport const Recommendations: FC<RecommendationsProps> = ({ items }) => {\n const { gridRef, registerCard, handleKeyDown, setFocusedIndex } = useGridKeyboardNavigation({ columns: 4 });\n\n return (\n <div\n data-testid=\"popular-courses-items\"\n ref={gridRef}\n tabIndex={0}\n onKeyDown={handleKeyDown}\n >\n <div className=\"row g-3 flex-nowrap flex-md-wrap overflow-auto\">\n {items.map((item, index) => (\n <div\n key={item.objectID}\n ref={node => registerCard(index, node)}\n tabIndex={0}\n className=\"col-12 col-md-6 col-xl-3 d-flex mb-2\"\n onFocus={() => setFocusedIndex(index)}\n >\n <ProductCard item={item} />\n </div>\n ))}\n </div>\n </div>\n );\n};\n\nexport default Recommendations;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edx/frontend-app-subscription-learner-dashboard",
3
- "version": "1.68.1",
3
+ "version": "1.68.2",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",