@npm_leadtech/legal-lib-components 7.76.0 → 7.76.1

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.
@@ -3,5 +3,5 @@ import { Button } from '../../atoms/Button';
3
3
  import { DocumentListMenuSection } from '../../molecules/DocumentListMenuSection';
4
4
  import { DocumentListMenuStyled } from './DocumentListMenu.styled';
5
5
  export const DocumentListMenu = ({ routes, seeAllLegalDocs, seeAllTypeDocs, finalMenu, hasSubCategoryPage, setCookiePolicyFunc }) => {
6
- return (_jsxs(DocumentListMenuStyled, { className: 'document-list-menu', children: [_jsx("div", { className: 'documents-wrapper', children: finalMenu.map((item, index) => (_jsx("div", { className: 'products__list__section-container', children: _jsx(DocumentListMenuSection, { products: item.products, type: item.type, icon: item.icon, seeAllTypeDocs: seeAllTypeDocs, slug: finalMenu[0].slug, hasSubCategoryPage: hasSubCategoryPage, routes: routes, setCookiePolicyFunc: setCookiePolicyFunc }) }, index))) }), _jsx("div", { className: 'all-documents-button-wrapper', children: _jsx(Button, { color: 'transparent', centered: true, size: 'M', givenClass: 'all-documents-button', link: routes.LEGAL_DOCUMENTS, label: seeAllLegalDocs, dataQa: 'button-see-all-documents' }) })] }));
6
+ return (_jsxs(DocumentListMenuStyled, { className: 'document-list-menu', children: [_jsx("div", { className: 'documents-wrapper', children: finalMenu.map((item, index) => (_jsx("div", { className: 'products__list__section-container', children: _jsx(DocumentListMenuSection, { products: item.products, type: item.type, icon: item.icon, seeAllTypeDocs: seeAllTypeDocs, slug: item.slug, hasSubCategoryPage: hasSubCategoryPage, routes: routes, setCookiePolicyFunc: setCookiePolicyFunc }) }, index))) }), _jsx("div", { className: 'all-documents-button-wrapper', children: _jsx(Button, { color: 'transparent', centered: true, size: 'M', givenClass: 'all-documents-button', link: routes.LEGAL_DOCUMENTS, label: seeAllLegalDocs, dataQa: 'button-see-all-documents' }) })] }));
7
7
  };
@@ -23,7 +23,7 @@ export const DocumentListMenu: React.FC<DocumentListMenuProps> = ({
23
23
  type={item.type}
24
24
  icon={item.icon}
25
25
  seeAllTypeDocs={seeAllTypeDocs}
26
- slug={finalMenu[0].slug}
26
+ slug={item.slug}
27
27
  hasSubCategoryPage={hasSubCategoryPage}
28
28
  routes={routes}
29
29
  setCookiePolicyFunc={setCookiePolicyFunc}
@@ -5,7 +5,7 @@ import DocumentSubMenu from '../DocumentSubMenu/DocumentSubMenu';
5
5
  export const DocumentMainMenu = ({ seeAllTypeDocs, allLegalDocs, allTypeDocs, setCookiePolicyFunc, routes, hasSubCategoryPage, finalMenu }) => {
6
6
  return (_jsxs(DocumentMainMenuStyled, { children: [finalMenu.map((item, index) => (_jsxs("li", { className: 'menu-items-li', children: [item.type, _jsx("div", { className: 'icon-arrow', children: _jsx(ArrowRight, {}) }), _jsxs("ul", { className: 'submenu__list', children: [item.products.map((product, index) => (_jsx(DocumentSubMenu, { product: product, setCookiePolicyFunc: setCookiePolicyFunc, routes: routes }, index))), _jsx("li", { className: 'menu-items-li all-item', children: _jsx("a", { title: seeAllTypeDocs.replace(/{{type}}/g, item.type), "data-qa": `Header_Menu__${item.slug}_all-documents`, href: hasSubCategoryPage
7
7
  ? routes.LEGAL_DOCUMENTS_WITH_CATEGORY(item.slug)
8
- : routes.LEGAL_DOCUMENTS_WITH_HASH(item.type), children: item.type.includes('Documents')
8
+ : routes.LEGAL_DOCUMENTS_WITH_HASH(item.slug), children: item.type.includes('Documents')
9
9
  ? allTypeDocs.replace(/{{type}}/g, item.type).replace('Documents', '')
10
10
  : allTypeDocs.replace(/{{type}}/g, item.type) }) })] }, index)] }, index))), _jsx("li", { className: 'menu-items-li all-item', children: _jsx("a", { title: allLegalDocs, "data-qa": 'Header_Menu_Document_List_All_Documents', href: routes.LEGAL_DOCUMENTS, children: allLegalDocs }) })] }));
11
11
  };
@@ -38,7 +38,7 @@ export const DocumentMainMenu: React.FC<DocumentMainMenuProps> = ({
38
38
  href={
39
39
  hasSubCategoryPage
40
40
  ? routes.LEGAL_DOCUMENTS_WITH_CATEGORY(item.slug)
41
- : routes.LEGAL_DOCUMENTS_WITH_HASH(item.type)
41
+ : routes.LEGAL_DOCUMENTS_WITH_HASH(item.slug)
42
42
  }
43
43
  >
44
44
  {item.type.includes('Documents')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@npm_leadtech/legal-lib-components",
3
- "version": "7.76.0",
3
+ "version": "7.76.1",
4
4
  "license": "ISC",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",