@telia/teddy 0.7.15 → 0.7.16

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.
@@ -48,7 +48,7 @@ const MY_PAGE_RETAILER_LINKS = {
48
48
  links: [
49
49
  {
50
50
  name: "Velg Butikk",
51
- link: "/forhandler/butikk",
51
+ link: "/forhandler/butikker",
52
52
  appKey: APP_KEYS["web-shop"],
53
53
  icon: "store"
54
54
  },
@@ -66,7 +66,7 @@ const MY_PAGE_RETAILER_LINKS = {
66
66
  },
67
67
  {
68
68
  name: "Se kundeopplysninger",
69
- link: "/forhandler/kunde",
69
+ link: "/forhandler/dashboard/kunde",
70
70
  appKey: APP_KEYS["web-shop"],
71
71
  icon: "end-user"
72
72
  }
@@ -51,7 +51,7 @@ export declare const MY_PAGE_RETAILER_LINKS: {
51
51
  readonly appKey: "web-shop";
52
52
  readonly links: [{
53
53
  readonly name: "Velg Butikk";
54
- readonly link: "/forhandler/butikk";
54
+ readonly link: "/forhandler/butikker";
55
55
  readonly appKey: "web-shop";
56
56
  readonly icon: "store";
57
57
  }, {
@@ -66,7 +66,7 @@ export declare const MY_PAGE_RETAILER_LINKS: {
66
66
  readonly icon: "settings";
67
67
  }, {
68
68
  readonly name: "Se kundeopplysninger";
69
- readonly link: "/forhandler/kunde";
69
+ readonly link: "/forhandler/dashboard/kunde";
70
70
  readonly appKey: "web-shop";
71
71
  readonly icon: "end-user";
72
72
  }];
@@ -46,7 +46,7 @@ const MY_PAGE_RETAILER_LINKS = {
46
46
  links: [
47
47
  {
48
48
  name: "Velg Butikk",
49
- link: "/forhandler/butikk",
49
+ link: "/forhandler/butikker",
50
50
  appKey: APP_KEYS["web-shop"],
51
51
  icon: "store"
52
52
  },
@@ -64,7 +64,7 @@ const MY_PAGE_RETAILER_LINKS = {
64
64
  },
65
65
  {
66
66
  name: "Se kundeopplysninger",
67
- link: "/forhandler/kunde",
67
+ link: "/forhandler/dashboard/kunde",
68
68
  appKey: APP_KEYS["web-shop"],
69
69
  icon: "end-user"
70
70
  }
@@ -1145,16 +1145,18 @@ const HighlightedLinks = ({
1145
1145
  ] });
1146
1146
  };
1147
1147
  const DesktopSimplified = React.forwardRef(() => {
1148
+ var _a;
1148
1149
  const rootContext = React.useContext(RootContext);
1150
+ const isRetailerLoggedIn = (_a = rootContext == null ? void 0 : rootContext.loggedInUser) == null ? void 0 : _a.isRetailer;
1149
1151
  if (!rootContext) return null;
1150
1152
  const { setSelectedMenuItem, linkComponent: Link2 } = rootContext;
1151
1153
  const isBusinessRental = rootContext.pathname.includes("bedrift/utstyrsavtale");
1152
1154
  const links = components_navigationMenu_globalNavigation_utils.getLinks(isBusinessRental, rootContext.customLinks);
1153
1155
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1154
1156
  links.map((link) => {
1155
- var _a;
1157
+ var _a2;
1156
1158
  return /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu.List, { value: link.name, children: [
1157
- (_a = link.links) == null ? void 0 : _a.map((subLink) => /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu.Item, { value: subLink.name, children: [
1159
+ (_a2 = link.links) == null ? void 0 : _a2.map((subLink) => /* @__PURE__ */ jsxRuntime.jsxs(NavigationMenu.Item, { value: subLink.name, children: [
1158
1160
  subLink.name === "Logo" && /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Link, { asChild: true, variant: "button", children: subLink.appKey === rootContext.appKey || rootContext.appKey === "storybook" ? /* @__PURE__ */ jsxRuntime.jsx(Link2, { href: subLink.link, onClick: () => setSelectedMenuItem(""), children: /* @__PURE__ */ jsxRuntime.jsx(
1159
1161
  "img",
1160
1162
  {
@@ -1173,7 +1175,8 @@ const DesktopSimplified = React.forwardRef(() => {
1173
1175
  subLink.name === "Hjem" && isBusinessRental && /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Link, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: subLink.link, children: subLink.name }) })
1174
1176
  ] }, subLink.name)),
1175
1177
  /* @__PURE__ */ jsxRuntime.jsx(components_box_box.Box, { ml: "auto" }),
1176
- /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Item, { children: /* @__PURE__ */ jsxRuntime.jsx(ShoppingCart, {}) })
1178
+ /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Item, { children: /* @__PURE__ */ jsxRuntime.jsx(ShoppingCart, {}) }),
1179
+ isRetailerLoggedIn && /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Item, { children: /* @__PURE__ */ jsxRuntime.jsx(MyPages, {}) })
1177
1180
  ] }, link.name);
1178
1181
  }),
1179
1182
  /* @__PURE__ */ jsxRuntime.jsx(NavigationMenu.Viewport, { className: styles[`${rootClassName}__viewport`] })
@@ -1124,16 +1124,18 @@ const HighlightedLinks = ({
1124
1124
  ] });
1125
1125
  };
1126
1126
  const DesktopSimplified = React__default.forwardRef(() => {
1127
+ var _a;
1127
1128
  const rootContext = React__default.useContext(RootContext);
1129
+ const isRetailerLoggedIn = (_a = rootContext == null ? void 0 : rootContext.loggedInUser) == null ? void 0 : _a.isRetailer;
1128
1130
  if (!rootContext) return null;
1129
1131
  const { setSelectedMenuItem, linkComponent: Link2 } = rootContext;
1130
1132
  const isBusinessRental = rootContext.pathname.includes("bedrift/utstyrsavtale");
1131
1133
  const links = getLinks(isBusinessRental, rootContext.customLinks);
1132
1134
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1133
1135
  links.map((link) => {
1134
- var _a;
1136
+ var _a2;
1135
1137
  return /* @__PURE__ */ jsxs(NavigationMenu.List, { value: link.name, children: [
1136
- (_a = link.links) == null ? void 0 : _a.map((subLink) => /* @__PURE__ */ jsxs(NavigationMenu.Item, { value: subLink.name, children: [
1138
+ (_a2 = link.links) == null ? void 0 : _a2.map((subLink) => /* @__PURE__ */ jsxs(NavigationMenu.Item, { value: subLink.name, children: [
1137
1139
  subLink.name === "Logo" && /* @__PURE__ */ jsx(NavigationMenu.Link, { asChild: true, variant: "button", children: subLink.appKey === rootContext.appKey || rootContext.appKey === "storybook" ? /* @__PURE__ */ jsx(Link2, { href: subLink.link, onClick: () => setSelectedMenuItem(""), children: /* @__PURE__ */ jsx(
1138
1140
  "img",
1139
1141
  {
@@ -1152,7 +1154,8 @@ const DesktopSimplified = React__default.forwardRef(() => {
1152
1154
  subLink.name === "Hjem" && isBusinessRental && /* @__PURE__ */ jsx(NavigationMenu.Link, { asChild: true, children: /* @__PURE__ */ jsx("a", { href: subLink.link, children: subLink.name }) })
1153
1155
  ] }, subLink.name)),
1154
1156
  /* @__PURE__ */ jsx(Box, { ml: "auto" }),
1155
- /* @__PURE__ */ jsx(NavigationMenu.Item, { children: /* @__PURE__ */ jsx(ShoppingCart, {}) })
1157
+ /* @__PURE__ */ jsx(NavigationMenu.Item, { children: /* @__PURE__ */ jsx(ShoppingCart, {}) }),
1158
+ isRetailerLoggedIn && /* @__PURE__ */ jsx(NavigationMenu.Item, { children: /* @__PURE__ */ jsx(MyPages, {}) })
1156
1159
  ] }, link.name);
1157
1160
  }),
1158
1161
  /* @__PURE__ */ jsx(NavigationMenu.Viewport, { className: styles[`${rootClassName}__viewport`] })
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "pnpm": ">=9"
21
21
  },
22
22
  "private": false,
23
- "version": "0.7.15",
23
+ "version": "0.7.16",
24
24
  "sideEffects": [
25
25
  "**/*.css",
26
26
  "**/*.svg"