@ikas/code-components-mcp 1.4.0-beta.162 → 1.4.0-beta.164
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/data/section-templates/account-info-section/children/AccountOrders/index.tsx +1 -1
- package/data/section-templates/blog-home-section/index.tsx +2 -1
- package/data/section-templates/blog-post-section/index.tsx +3 -2
- package/data/section-templates/cart-section/components/EmptyState/index.tsx +1 -1
- package/data/section-templates/category-list-section/index.tsx +2 -1
- package/data/section-templates/component-renderer/additional/ProductDetail/index.tsx +5 -1
- package/data/section-templates/forgot-password-section/components/ForgotPasswordForm/index.tsx +1 -1
- package/data/section-templates/header-section/children/Navbar/components/CartSidebar/index.tsx +2 -1
- package/data/section-templates/header-section/children/Navbar/components/SearchModal/index.tsx +2 -1
- package/data/section-templates/header-section/children/Navbar/index.tsx +6 -5
- package/data/section-templates/hero-slider-section/children/HeroSliderItem/index.tsx +12 -7
- package/data/section-templates/image-handling/index.tsx +5 -1
- package/data/section-templates/navigation/components/CartSidebar/index.tsx +2 -1
- package/data/section-templates/navigation/components/SearchModal/index.tsx +2 -1
- package/data/section-templates/navigation/index.tsx +6 -5
- package/data/section-templates/product-detail-section/index.tsx +5 -1
- package/data/storefront-api.json +24 -1
- package/data/storefront-types.json +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
hasBlogListPrevPage,
|
|
7
7
|
hasBlogListNextPage,
|
|
8
8
|
getIkasBlogCategoryHref,
|
|
9
|
+
withRoutePrefix,
|
|
9
10
|
} from "@ikas/bp-storefront";
|
|
10
11
|
import { observer } from "@ikas/component-utils";
|
|
11
12
|
import { cx } from "../../utils/cx";
|
|
@@ -47,7 +48,7 @@ export function BlogHome({
|
|
|
47
48
|
{categories.length > 0 && (
|
|
48
49
|
<div className="kombos-blog-home__categories">
|
|
49
50
|
<a
|
|
50
|
-
href="/blog"
|
|
51
|
+
href={withRoutePrefix("/blog")}
|
|
51
52
|
className={cx(
|
|
52
53
|
"kombos-blog-home__cat-btn",
|
|
53
54
|
"text-sm-medium",
|
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
getIkasBlogFormattedDate,
|
|
3
3
|
getIkasBlogCategoryHref,
|
|
4
4
|
getDefaultSrc,
|
|
5
|
+
withRoutePrefix,
|
|
5
6
|
} from "@ikas/bp-storefront";
|
|
6
7
|
|
|
7
8
|
import { Props } from "./types";
|
|
@@ -31,8 +32,8 @@ export function BlogPost({
|
|
|
31
32
|
const writerName = getFullName(blogPost.writer?.firstName, blogPost.writer?.lastName);
|
|
32
33
|
|
|
33
34
|
const breadcrumbItems: BreadcrumbItem[] = [
|
|
34
|
-
{ label: homeText, href: "/" },
|
|
35
|
-
{ label: blogText, href: "/blog" },
|
|
35
|
+
{ label: homeText, href: withRoutePrefix("/") },
|
|
36
|
+
{ label: blogText, href: withRoutePrefix("/blog") },
|
|
36
37
|
];
|
|
37
38
|
if (categoryName && categoryHref) {
|
|
38
39
|
breadcrumbItems.push({ label: categoryName, href: categoryHref });
|
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
searchProductList,
|
|
22
22
|
getProductOptionSet,
|
|
23
23
|
IkasComponentRenderer,
|
|
24
|
+
withRoutePrefix,
|
|
24
25
|
} from "@ikas/bp-storefront";
|
|
25
26
|
import { Props } from "./types";
|
|
26
27
|
import ProductCard from "../../sub-components/ProductCard";
|
|
@@ -170,7 +171,7 @@ export function CategoryList(props: Props) {
|
|
|
170
171
|
const path = getCategoryPath(category);
|
|
171
172
|
if (path.length === 0) return [];
|
|
172
173
|
return [
|
|
173
|
-
{ label: homepageText, href: "/" } as BreadcrumbItem,
|
|
174
|
+
{ label: homepageText, href: withRoutePrefix("/") } as BreadcrumbItem,
|
|
174
175
|
...path.map(
|
|
175
176
|
(cat: any) =>
|
|
176
177
|
({
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
IkasImage,
|
|
7
7
|
isNotEmpty,
|
|
8
8
|
IkasComponentRenderer,
|
|
9
|
+
withRoutePrefix,
|
|
9
10
|
} from "@ikas/bp-storefront";
|
|
10
11
|
import { Props } from "./types";
|
|
11
12
|
import Breadcrumb from "../../sub-components/Breadcrumb";
|
|
@@ -42,7 +43,10 @@ export function ProductDetail(props: Props) {
|
|
|
42
43
|
<div className="kombos-container kombos-pd__container">
|
|
43
44
|
<Breadcrumb
|
|
44
45
|
items={[
|
|
45
|
-
{
|
|
46
|
+
{
|
|
47
|
+
label: homepageText,
|
|
48
|
+
href: withRoutePrefix("/"),
|
|
49
|
+
} as BreadcrumbItem,
|
|
46
50
|
...(isNotEmpty(categoryPath)
|
|
47
51
|
? categoryPath.map(
|
|
48
52
|
(pathItem: any) =>
|
package/data/section-templates/forgot-password-section/components/ForgotPasswordForm/index.tsx
CHANGED
|
@@ -49,7 +49,7 @@ const ForgotPasswordForm = observer(function ForgotPasswordForm({
|
|
|
49
49
|
variant="primary"
|
|
50
50
|
size="s"
|
|
51
51
|
className="forgot-password__submit-btn"
|
|
52
|
-
onClick={() => Router.
|
|
52
|
+
onClick={() => Router.navigateToPage("INDEX")}
|
|
53
53
|
>
|
|
54
54
|
{successButtonText}
|
|
55
55
|
</Button>
|
package/data/section-templates/header-section/children/Navbar/components/CartSidebar/index.tsx
CHANGED
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
getCheckoutUrlFromCartStore,
|
|
20
20
|
IkasOrderLineItem,
|
|
21
21
|
Router,
|
|
22
|
+
withRoutePrefix,
|
|
22
23
|
} from "@ikas/bp-storefront";
|
|
23
24
|
import type { AspectRatio, ObjectFit } from "../../../../global-types";
|
|
24
25
|
import CartItem from "../../../../sub-components/CartItem";
|
|
@@ -164,7 +165,7 @@ const CartSidebar = observer(function CartSidebar({
|
|
|
164
165
|
</div>
|
|
165
166
|
<div className="kombos-cart-sidebar__footer-buttons">
|
|
166
167
|
<a
|
|
167
|
-
href="/cart"
|
|
168
|
+
href={withRoutePrefix("/cart")}
|
|
168
169
|
className="kombos-cart-sidebar__view-cart-link"
|
|
169
170
|
onClick={(e: Event) => {
|
|
170
171
|
e.preventDefault();
|
package/data/section-templates/header-section/children/Navbar/components/SearchModal/index.tsx
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
createMediaSrcset,
|
|
13
13
|
getProductOptionSet,
|
|
14
14
|
IkasComponentRenderer,
|
|
15
|
+
withRoutePrefix,
|
|
15
16
|
} from "@ikas/bp-storefront";
|
|
16
17
|
import type { IkasProduct } from "@ikas/bp-storefront";
|
|
17
18
|
import { cx } from "../../../../utils/cx";
|
|
@@ -199,7 +200,7 @@ const SearchModal = observer(function SearchModal({
|
|
|
199
200
|
<div className="kombos-search__logo-area">
|
|
200
201
|
{logo && (
|
|
201
202
|
<a
|
|
202
|
-
href="/"
|
|
203
|
+
href={withRoutePrefix("/")}
|
|
203
204
|
className="kombos-search__logo"
|
|
204
205
|
style={{
|
|
205
206
|
"--search-logo-h-desktop": logoSizeDesktop,
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
getFormattedHeightSize,
|
|
9
9
|
Router,
|
|
10
10
|
createMediaSrcset,
|
|
11
|
+
withRoutePrefix,
|
|
11
12
|
} from "@ikas/bp-storefront";
|
|
12
13
|
import { Props } from "./types";
|
|
13
14
|
import CartSidebar from "./components/CartSidebar";
|
|
@@ -104,10 +105,10 @@ export function Navbar(props: Props) {
|
|
|
104
105
|
{logo && (
|
|
105
106
|
<a
|
|
106
107
|
className="kombos-navbar__logo"
|
|
107
|
-
href="/"
|
|
108
|
+
href={withRoutePrefix("/")}
|
|
108
109
|
onClick={(e) => {
|
|
109
110
|
e.preventDefault();
|
|
110
|
-
Router.
|
|
111
|
+
Router.navigateToPage("INDEX");
|
|
111
112
|
}}
|
|
112
113
|
style={{
|
|
113
114
|
"--logo-h-desktop": logoSizeDesktop,
|
|
@@ -145,7 +146,7 @@ export function Navbar(props: Props) {
|
|
|
145
146
|
{/* Search */}
|
|
146
147
|
<a
|
|
147
148
|
className="kombos-navbar__icon-btn"
|
|
148
|
-
href="/search"
|
|
149
|
+
href={withRoutePrefix("/search")}
|
|
149
150
|
onClick={(e) => {
|
|
150
151
|
e.preventDefault();
|
|
151
152
|
e.stopPropagation();
|
|
@@ -159,7 +160,7 @@ export function Navbar(props: Props) {
|
|
|
159
160
|
{/* Account */}
|
|
160
161
|
<a
|
|
161
162
|
className="kombos-navbar__icon-btn"
|
|
162
|
-
href={isLoggedIn ? "/account" : "/login"}
|
|
163
|
+
href={withRoutePrefix(isLoggedIn ? "/account" : "/account/login")}
|
|
163
164
|
onClick={(e) => {
|
|
164
165
|
e.preventDefault();
|
|
165
166
|
e.stopPropagation();
|
|
@@ -173,7 +174,7 @@ export function Navbar(props: Props) {
|
|
|
173
174
|
{/* Cart */}
|
|
174
175
|
<a
|
|
175
176
|
className="kombos-navbar__icon-btn kombos-navbar__cart-trigger"
|
|
176
|
-
href="/cart"
|
|
177
|
+
href={withRoutePrefix("/cart")}
|
|
177
178
|
onClick={(e) => {
|
|
178
179
|
e.preventDefault();
|
|
179
180
|
e.stopPropagation();
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
createMediaSrcset,
|
|
5
5
|
getFormattedFontSize,
|
|
6
6
|
Router,
|
|
7
|
+
withRoutePrefix,
|
|
7
8
|
} from "@ikas/bp-storefront";
|
|
8
9
|
import { Props } from "./types";
|
|
9
10
|
import {
|
|
@@ -113,15 +114,19 @@ export function HeroSliderItem({
|
|
|
113
114
|
mobileRoundedCorners && "kombos-hero-slider-item--mobile-rounded",
|
|
114
115
|
);
|
|
115
116
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
// `target.href` already carries the routing prefix — it comes from a LINK prop the storefront
|
|
118
|
+
// resolves per request. Only the fallback is a literal, so only it needs prefixing.
|
|
119
|
+
const navigateToLink = (target: typeof link) => {
|
|
120
|
+
if (!target) return;
|
|
121
|
+
Router.navigate(
|
|
122
|
+
target.href || withRoutePrefix("/"),
|
|
123
|
+
false,
|
|
124
|
+
target.openInNewTab ?? false,
|
|
125
|
+
);
|
|
119
126
|
};
|
|
120
127
|
|
|
121
|
-
const
|
|
122
|
-
|
|
123
|
-
Router.navigate(mobLink.href || "/", false, mobLink.openInNewTab ?? false);
|
|
124
|
-
};
|
|
128
|
+
const handleDesktopClick = () => navigateToLink(link);
|
|
129
|
+
const handleMobileClick = () => navigateToLink(mobLink);
|
|
125
130
|
|
|
126
131
|
const formattedDesktopFontSize = getFormattedFontSize(buttonFontSize);
|
|
127
132
|
const formattedMobileFontSize = getFormattedFontSize(mobBtnFontSize);
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
IkasImage,
|
|
7
7
|
isNotEmpty,
|
|
8
8
|
IkasComponentRenderer,
|
|
9
|
+
withRoutePrefix,
|
|
9
10
|
} from "@ikas/bp-storefront";
|
|
10
11
|
import { Props } from "./types";
|
|
11
12
|
import Breadcrumb from "../../sub-components/Breadcrumb";
|
|
@@ -42,7 +43,10 @@ export function ProductDetail(props: Props) {
|
|
|
42
43
|
<div className="kombos-container kombos-pd__container">
|
|
43
44
|
<Breadcrumb
|
|
44
45
|
items={[
|
|
45
|
-
{
|
|
46
|
+
{
|
|
47
|
+
label: homepageText,
|
|
48
|
+
href: withRoutePrefix("/"),
|
|
49
|
+
} as BreadcrumbItem,
|
|
46
50
|
...(isNotEmpty(categoryPath)
|
|
47
51
|
? categoryPath.map(
|
|
48
52
|
(pathItem: any) =>
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
getCheckoutUrlFromCartStore,
|
|
20
20
|
IkasOrderLineItem,
|
|
21
21
|
Router,
|
|
22
|
+
withRoutePrefix,
|
|
22
23
|
} from "@ikas/bp-storefront";
|
|
23
24
|
import type { AspectRatio, ObjectFit } from "../../../../global-types";
|
|
24
25
|
import CartItem from "../../../../sub-components/CartItem";
|
|
@@ -164,7 +165,7 @@ const CartSidebar = observer(function CartSidebar({
|
|
|
164
165
|
</div>
|
|
165
166
|
<div className="kombos-cart-sidebar__footer-buttons">
|
|
166
167
|
<a
|
|
167
|
-
href="/cart"
|
|
168
|
+
href={withRoutePrefix("/cart")}
|
|
168
169
|
className="kombos-cart-sidebar__view-cart-link"
|
|
169
170
|
onClick={(e: Event) => {
|
|
170
171
|
e.preventDefault();
|
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
createMediaSrcset,
|
|
13
13
|
getProductOptionSet,
|
|
14
14
|
IkasComponentRenderer,
|
|
15
|
+
withRoutePrefix,
|
|
15
16
|
} from "@ikas/bp-storefront";
|
|
16
17
|
import type { IkasProduct } from "@ikas/bp-storefront";
|
|
17
18
|
import { cx } from "../../../../utils/cx";
|
|
@@ -199,7 +200,7 @@ const SearchModal = observer(function SearchModal({
|
|
|
199
200
|
<div className="kombos-search__logo-area">
|
|
200
201
|
{logo && (
|
|
201
202
|
<a
|
|
202
|
-
href="/"
|
|
203
|
+
href={withRoutePrefix("/")}
|
|
203
204
|
className="kombos-search__logo"
|
|
204
205
|
style={{
|
|
205
206
|
"--search-logo-h-desktop": logoSizeDesktop,
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
getFormattedHeightSize,
|
|
9
9
|
Router,
|
|
10
10
|
createMediaSrcset,
|
|
11
|
+
withRoutePrefix,
|
|
11
12
|
} from "@ikas/bp-storefront";
|
|
12
13
|
import { Props } from "./types";
|
|
13
14
|
import CartSidebar from "./components/CartSidebar";
|
|
@@ -104,10 +105,10 @@ export function Navbar(props: Props) {
|
|
|
104
105
|
{logo && (
|
|
105
106
|
<a
|
|
106
107
|
className="kombos-navbar__logo"
|
|
107
|
-
href="/"
|
|
108
|
+
href={withRoutePrefix("/")}
|
|
108
109
|
onClick={(e) => {
|
|
109
110
|
e.preventDefault();
|
|
110
|
-
Router.
|
|
111
|
+
Router.navigateToPage("INDEX");
|
|
111
112
|
}}
|
|
112
113
|
style={{
|
|
113
114
|
"--logo-h-desktop": logoSizeDesktop,
|
|
@@ -145,7 +146,7 @@ export function Navbar(props: Props) {
|
|
|
145
146
|
{/* Search */}
|
|
146
147
|
<a
|
|
147
148
|
className="kombos-navbar__icon-btn"
|
|
148
|
-
href="/search"
|
|
149
|
+
href={withRoutePrefix("/search")}
|
|
149
150
|
onClick={(e) => {
|
|
150
151
|
e.preventDefault();
|
|
151
152
|
e.stopPropagation();
|
|
@@ -159,7 +160,7 @@ export function Navbar(props: Props) {
|
|
|
159
160
|
{/* Account */}
|
|
160
161
|
<a
|
|
161
162
|
className="kombos-navbar__icon-btn"
|
|
162
|
-
href={isLoggedIn ? "/account" : "/login"}
|
|
163
|
+
href={withRoutePrefix(isLoggedIn ? "/account" : "/account/login")}
|
|
163
164
|
onClick={(e) => {
|
|
164
165
|
e.preventDefault();
|
|
165
166
|
e.stopPropagation();
|
|
@@ -173,7 +174,7 @@ export function Navbar(props: Props) {
|
|
|
173
174
|
{/* Cart */}
|
|
174
175
|
<a
|
|
175
176
|
className="kombos-navbar__icon-btn kombos-navbar__cart-trigger"
|
|
176
|
-
href="/cart"
|
|
177
|
+
href={withRoutePrefix("/cart")}
|
|
177
178
|
onClick={(e) => {
|
|
178
179
|
e.preventDefault();
|
|
179
180
|
e.stopPropagation();
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
IkasImage,
|
|
7
7
|
isNotEmpty,
|
|
8
8
|
IkasComponentRenderer,
|
|
9
|
+
withRoutePrefix,
|
|
9
10
|
} from "@ikas/bp-storefront";
|
|
10
11
|
import { Props } from "./types";
|
|
11
12
|
import Breadcrumb from "../../sub-components/Breadcrumb";
|
|
@@ -42,7 +43,10 @@ export function ProductDetail(props: Props) {
|
|
|
42
43
|
<div className="kombos-container kombos-pd__container">
|
|
43
44
|
<Breadcrumb
|
|
44
45
|
items={[
|
|
45
|
-
{
|
|
46
|
+
{
|
|
47
|
+
label: homepageText,
|
|
48
|
+
href: withRoutePrefix("/"),
|
|
49
|
+
} as BreadcrumbItem,
|
|
46
50
|
...(isNotEmpty(categoryPath)
|
|
47
51
|
? categoryPath.map(
|
|
48
52
|
(pathItem: any) =>
|
package/data/storefront-api.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"generatedAt": "2026-08-
|
|
2
|
+
"generatedAt": "2026-08-18T14:25:38.304Z",
|
|
3
3
|
"functions": [
|
|
4
4
|
{
|
|
5
5
|
"name": "apiListProductBrand",
|
|
@@ -15148,6 +15148,29 @@
|
|
|
15148
15148
|
"isClass": true,
|
|
15149
15149
|
"className": "Router"
|
|
15150
15150
|
},
|
|
15151
|
+
{
|
|
15152
|
+
"name": "withRoutePrefix",
|
|
15153
|
+
"signature": "function withRoutePrefix(path: string): string",
|
|
15154
|
+
"description": "Put the visitor's storefront routing in front of a path you wrote yourself.\n\nEntity links (`getProductHref`, `getIkasOrderHref`, …) and LINK props already carry the prefix.\nA literal path in your own markup does not: `href=\"/cart\"` sends a visitor browsing `/en` to the\ndefault language. Wrap it, and a store with no extra routings gets the path back unchanged.\n\nIdempotent — a path that already starts with a supported routing segment is returned as-is.\nAnything that is not a path on this storefront — an absolute URL, `mailto:`, `tel:` — is returned\nuntouched, so a merchant-authored prop can be wrapped without checking it first.",
|
|
15155
|
+
"params": [
|
|
15156
|
+
{
|
|
15157
|
+
"name": "path",
|
|
15158
|
+
"description": "- A path on this storefront, starting with `/`"
|
|
15159
|
+
}
|
|
15160
|
+
],
|
|
15161
|
+
"returns": "The path under the current routing (e.g. `/cart` → `/en/cart`)",
|
|
15162
|
+
"returnType": "string",
|
|
15163
|
+
"example": "```tsx\nimport { Router, withRoutePrefix } from \"@ikas/bp-storefront\";\n\n// Correct href for crawlers, middle-click and open-in-new-tab...\n<a href={withRoutePrefix(\"/cart\")} onClick={e => {\n e.preventDefault();\n Router.navigateToPage(\"CART\"); // ...and this prefixes on its own.\n}}>Cart</a>\n```",
|
|
15164
|
+
"categories": [
|
|
15165
|
+
"Navigation"
|
|
15166
|
+
],
|
|
15167
|
+
"related": [
|
|
15168
|
+
"navigate",
|
|
15169
|
+
"navigateToPage"
|
|
15170
|
+
],
|
|
15171
|
+
"isAsync": false,
|
|
15172
|
+
"isClass": false
|
|
15173
|
+
},
|
|
15151
15174
|
{
|
|
15152
15175
|
"name": "registerThemeSettingValues",
|
|
15153
15176
|
"signature": "function registerThemeSettingValues(values: Record<string, any> | null): void",
|