@orderlyshop/web-components 0.1.0-build.7045
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/AGENTS.md +110 -0
- package/README.md +685 -0
- package/bin/orderly-build-category-pages.mjs +160 -0
- package/bin/orderly-generate-category-pages.mjs +308 -0
- package/bin/orderly-hydrate-static-pages.mjs +595 -0
- package/bin/orderly-init-navigation.mjs +327 -0
- package/bin/orderly-init-shop.mjs +876 -0
- package/bin/orderly-init-taxonomy.mjs +2 -0
- package/bin/orderly-publish-site.mjs +342 -0
- package/custom-elements.json +505 -0
- package/dist/browser/orderly-web-components.define.global.js +3551 -0
- package/dist/browser/orderly-web-components.define.global.js.map +1 -0
- package/dist/browser/orderly-web-components.global.js +3551 -0
- package/dist/browser/orderly-web-components.global.js.map +1 -0
- package/dist/default-shop-DgX6uy10.d.ts +221 -0
- package/dist/default-shop.d.ts +6 -0
- package/dist/default-shop.js +762 -0
- package/dist/default-shop.js.map +1 -0
- package/dist/define-BNMhl19n.d.ts +9 -0
- package/dist/define.d.ts +2 -0
- package/dist/define.js +11094 -0
- package/dist/define.js.map +1 -0
- package/dist/index.d.ts +683 -0
- package/dist/index.js +11417 -0
- package/dist/index.js.map +1 -0
- package/dist/navigation.d.ts +61 -0
- package/dist/navigation.js +1125 -0
- package/dist/navigation.js.map +1 -0
- package/dist/query.d.ts +31 -0
- package/dist/query.js +115 -0
- package/dist/query.js.map +1 -0
- package/dist/registry-CPDecU3g.d.ts +6 -0
- package/dist/shop-BgQhGRzS.d.ts +173 -0
- package/dist/shop-query.d.ts +8 -0
- package/dist/shop-query.js +100 -0
- package/dist/shop-query.js.map +1 -0
- package/dist/shop.d.ts +8 -0
- package/dist/shop.js +11187 -0
- package/dist/shop.js.map +1 -0
- package/dist/stores.d.ts +46 -0
- package/dist/stores.js +145 -0
- package/dist/stores.js.map +1 -0
- package/dist/taxonomy.d.ts +35 -0
- package/dist/taxonomy.js +247 -0
- package/dist/taxonomy.js.map +1 -0
- package/dist/types-Bjez59Hr.d.ts +96 -0
- package/docs/components/README.md +708 -0
- package/docs/components/product-grid.md +182 -0
- package/docs/components/product-rail.md +174 -0
- package/examples/shop/README.md +72 -0
- package/examples/shop/package.json +28 -0
- package/examples/shop/src/category.html +20 -0
- package/examples/shop/src/checkout.html +21 -0
- package/examples/shop/src/forretningsbetingelser.html +81 -0
- package/examples/shop/src/includes/body-end.html +1 -0
- package/examples/shop/src/includes/body-start.html +3 -0
- package/examples/shop/src/includes/head.html +32 -0
- package/examples/shop/src/index.html +25 -0
- package/examples/shop/src/navigation.ts +154 -0
- package/examples/shop/src/product.html +24 -0
- package/examples/shop/src/templates/page-layouts.html +162 -0
- package/examples/shop/src/templates/shop-footer.html +76 -0
- package/examples/shop/tsconfig.json +32 -0
- package/examples/shop/vite.config.mjs +190 -0
- package/html-custom-data.json +279 -0
- package/package.json +118 -0
- package/server/README.md +111 -0
- package/server/apache/.htaccess +18 -0
- package/server/nginx/orderly-products.conf +24 -0
- package/server/node/product-snapshot-server.mjs +133 -0
- package/server/php/orderly-product.php +204 -0
|
@@ -0,0 +1,762 @@
|
|
|
1
|
+
// src/taxonomy.ts
|
|
2
|
+
import { clone, create as create2 } from "@bufbuild/protobuf";
|
|
3
|
+
import { SearchQuerySchema as SearchQuerySchema2 } from "@orderlyshop/core-client";
|
|
4
|
+
|
|
5
|
+
// src/query.ts
|
|
6
|
+
import { create } from "@bufbuild/protobuf";
|
|
7
|
+
import {
|
|
8
|
+
SearchQuerySchema,
|
|
9
|
+
TagSchema
|
|
10
|
+
} from "@orderlyshop/core-client";
|
|
11
|
+
function createSearchQuery(input = {}) {
|
|
12
|
+
return create(SearchQuerySchema, {
|
|
13
|
+
Query: input.query ?? input.keywords,
|
|
14
|
+
HiddenQuery: input.hiddenQuery,
|
|
15
|
+
Tags: (input.tags ?? []).map((tag) => create(TagSchema, { Value: tag })),
|
|
16
|
+
OrderBy: input.orderBy ?? [],
|
|
17
|
+
StoreId: input.storeId,
|
|
18
|
+
Featured: input.featured ?? false
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function normalizeSearchQuery(input = {}) {
|
|
22
|
+
if (isCoreSearchQuery(input)) {
|
|
23
|
+
return create(SearchQuerySchema, input);
|
|
24
|
+
}
|
|
25
|
+
return createSearchQuery(input);
|
|
26
|
+
}
|
|
27
|
+
function isCoreSearchQuery(input) {
|
|
28
|
+
return "Query" in input || "HiddenQuery" in input || "Tags" in input || "OrderBy" in input || "StoreId" in input || "Featured" in input;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// src/taxonomy.ts
|
|
32
|
+
var defaultCategoryPageRoot = "/categories/";
|
|
33
|
+
function createCategoryNavigation(definitions, options = {}) {
|
|
34
|
+
assertValidNavigationDefinitions(definitions);
|
|
35
|
+
const pageRoot = options.pageRoot ?? defaultCategoryPageRoot;
|
|
36
|
+
const urlMode = options.urlMode ?? "path";
|
|
37
|
+
return definitions.map((definition) => {
|
|
38
|
+
return createCategoryItem({
|
|
39
|
+
definition,
|
|
40
|
+
pageRoot,
|
|
41
|
+
urlMode,
|
|
42
|
+
description: options.description,
|
|
43
|
+
pathLabels: [definition.label],
|
|
44
|
+
pathSlugs: [definition.slug]
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function validateNavigationDefinitions(definitions) {
|
|
49
|
+
const errors = [];
|
|
50
|
+
const seenIds = /* @__PURE__ */ new Map();
|
|
51
|
+
const seenSlugs = /* @__PURE__ */ new Map();
|
|
52
|
+
if (!Array.isArray(definitions) || definitions.length === 0) {
|
|
53
|
+
errors.push("navigationDefinitions must contain at least one category.");
|
|
54
|
+
return { valid: false, errors };
|
|
55
|
+
}
|
|
56
|
+
validateNavigationLevel(definitions, {
|
|
57
|
+
errors,
|
|
58
|
+
seenIds,
|
|
59
|
+
seenSlugs,
|
|
60
|
+
pathLabels: [],
|
|
61
|
+
pathSlugs: []
|
|
62
|
+
});
|
|
63
|
+
return { valid: errors.length === 0, errors };
|
|
64
|
+
}
|
|
65
|
+
function navigationConfigurationError(definitions) {
|
|
66
|
+
const result = validateNavigationDefinitions(definitions);
|
|
67
|
+
return result.valid ? void 0 : `Navigation configuration error: ${result.errors.join(" ")}`;
|
|
68
|
+
}
|
|
69
|
+
function assertValidNavigationDefinitions(definitions) {
|
|
70
|
+
const error = navigationConfigurationError(definitions);
|
|
71
|
+
if (error) {
|
|
72
|
+
throw new Error(error);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function categoryPagePath(id, options = {}) {
|
|
76
|
+
const pageRoot = options.pageRoot ?? defaultCategoryPageRoot;
|
|
77
|
+
if (options.urlMode === "hash") {
|
|
78
|
+
return `${pageRoot}#id=${encodeURIComponent(id)}`;
|
|
79
|
+
}
|
|
80
|
+
return `${pageRoot}${id}/`;
|
|
81
|
+
}
|
|
82
|
+
function resolveCategoryUrlMode(url = currentLocationUrl(), options = {}) {
|
|
83
|
+
const target = urlFromInput(url);
|
|
84
|
+
const pageRoot = options.pageRoot ?? defaultCategoryPageRoot;
|
|
85
|
+
if (categoryIdFromHash(target.hash)) {
|
|
86
|
+
return "hash";
|
|
87
|
+
}
|
|
88
|
+
return categoryIdFromPath(target.pathname, pageRoot) ? "path" : "hash";
|
|
89
|
+
}
|
|
90
|
+
function createCategoryItem(input) {
|
|
91
|
+
const id = input.pathSlugs.join("/");
|
|
92
|
+
const query = categorySearchQuery(input.definition, input.parent, input.pathLabels);
|
|
93
|
+
const searchText = categorySearchText(query, input.pathLabels);
|
|
94
|
+
const metadata = {
|
|
95
|
+
slug: input.pathSlugs[input.pathSlugs.length - 1],
|
|
96
|
+
parentId: input.parentId,
|
|
97
|
+
pathSegments: input.pathSlugs,
|
|
98
|
+
query: clone(SearchQuerySchema2, query),
|
|
99
|
+
searchText,
|
|
100
|
+
description: input.definition.description ?? input.description?.({
|
|
101
|
+
definition: input.definition,
|
|
102
|
+
parent: input.parent,
|
|
103
|
+
pathLabels: input.pathLabels
|
|
104
|
+
}) ?? `Selected products in ${input.pathLabels.join(" ").toLowerCase()}.`,
|
|
105
|
+
heroImage: input.definition.heroImage ?? input.parent?.heroImage ?? "",
|
|
106
|
+
pagePath: input.pageRoot
|
|
107
|
+
};
|
|
108
|
+
return {
|
|
109
|
+
id,
|
|
110
|
+
label: input.definition.label,
|
|
111
|
+
href: categoryPagePath(id, { pageRoot: input.pageRoot, urlMode: input.urlMode }),
|
|
112
|
+
query: clone(SearchQuerySchema2, query),
|
|
113
|
+
metadata,
|
|
114
|
+
children: (input.definition.children ?? []).map((child) => createCategoryItem({
|
|
115
|
+
definition: child,
|
|
116
|
+
parent: input.definition,
|
|
117
|
+
pageRoot: input.pageRoot,
|
|
118
|
+
urlMode: input.urlMode,
|
|
119
|
+
description: input.description,
|
|
120
|
+
parentId: id,
|
|
121
|
+
pathLabels: [...input.pathLabels, child.label],
|
|
122
|
+
pathSlugs: [...input.pathSlugs, child.slug]
|
|
123
|
+
}))
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
function validateNavigationLevel(definitions, context) {
|
|
127
|
+
definitions.forEach((definition, index) => {
|
|
128
|
+
const label = definition?.label?.trim();
|
|
129
|
+
const location2 = [...context.pathLabels, label || `item ${index + 1}`].join(" > ");
|
|
130
|
+
const slug = definition?.slug?.trim();
|
|
131
|
+
if (!label) {
|
|
132
|
+
context.errors.push(`Category ${location2} is missing label.`);
|
|
133
|
+
}
|
|
134
|
+
if (!slug) {
|
|
135
|
+
context.errors.push(`Category ${location2} is missing slug.`);
|
|
136
|
+
} else if (!/^[a-z0-9]+(?:-[a-z0-9]+)*$/.test(slug)) {
|
|
137
|
+
context.errors.push(`Category ${location2} has invalid slug "${slug}". Use lowercase letters, numbers, and hyphens only.`);
|
|
138
|
+
}
|
|
139
|
+
const nextPathSlugs = slug ? [...context.pathSlugs, slug] : context.pathSlugs;
|
|
140
|
+
const id = nextPathSlugs.join("/");
|
|
141
|
+
if (id) {
|
|
142
|
+
const existing = context.seenIds.get(id);
|
|
143
|
+
if (existing) {
|
|
144
|
+
context.errors.push(`Category ${location2} duplicates category id "${id}" already used by ${existing}.`);
|
|
145
|
+
} else {
|
|
146
|
+
context.seenIds.set(id, location2);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (slug) {
|
|
150
|
+
const existing = context.seenSlugs.get(slug);
|
|
151
|
+
if (existing) {
|
|
152
|
+
context.errors.push(`Category ${location2} duplicates slug "${slug}" already used by ${existing}. Slugs must be globally unique.`);
|
|
153
|
+
} else {
|
|
154
|
+
context.seenSlugs.set(slug, location2);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (definition.children?.length) {
|
|
158
|
+
validateNavigationLevel(definition.children, {
|
|
159
|
+
...context,
|
|
160
|
+
pathLabels: [...context.pathLabels, label || `item ${index + 1}`],
|
|
161
|
+
pathSlugs: nextPathSlugs
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function categorySearchQuery(definition, parent, pathLabels) {
|
|
167
|
+
if (definition.query) {
|
|
168
|
+
return normalizeSearchQuery(definition.query);
|
|
169
|
+
}
|
|
170
|
+
const parentQuery = parent?.query ? normalizeSearchQuery(parent.query) : void 0;
|
|
171
|
+
const inherited = parentQuery ? clone(SearchQuerySchema2, parentQuery) : create2(SearchQuerySchema2);
|
|
172
|
+
const parentText = parentQuery ? categorySearchText(parentQuery, pathLabels.slice(0, -1)) : parent?.label;
|
|
173
|
+
inherited.Query = [definition.label, parentText].filter(Boolean).join(" ");
|
|
174
|
+
return inherited;
|
|
175
|
+
}
|
|
176
|
+
function categorySearchText(query, pathLabels) {
|
|
177
|
+
return query.Query || query.HiddenQuery || query.Tags.map((tag) => tag.Value).filter(Boolean).join(" ") || pathLabels.join(" ");
|
|
178
|
+
}
|
|
179
|
+
function categoryIdFromPath(pathname, pageRoot) {
|
|
180
|
+
const path = pathname.replace(/\/index\.html$/, "/");
|
|
181
|
+
if (!path.startsWith(pageRoot) || path === pageRoot) {
|
|
182
|
+
return void 0;
|
|
183
|
+
}
|
|
184
|
+
const normalized = path.slice(pageRoot.length).replace(/^\/+|\/+$/g, "");
|
|
185
|
+
return normalized ? normalized.split("/").map(decodeURIComponent).join("/") : void 0;
|
|
186
|
+
}
|
|
187
|
+
function categoryIdFromHash(hash) {
|
|
188
|
+
const value = hash.startsWith("#") ? hash.slice(1) : hash;
|
|
189
|
+
if (!value) {
|
|
190
|
+
return void 0;
|
|
191
|
+
}
|
|
192
|
+
const params = new URLSearchParams(value.startsWith("?") ? value.slice(1) : value);
|
|
193
|
+
const id = params.get("id");
|
|
194
|
+
if (id) {
|
|
195
|
+
return id.trim() || void 0;
|
|
196
|
+
}
|
|
197
|
+
if (value.includes("=")) {
|
|
198
|
+
return void 0;
|
|
199
|
+
}
|
|
200
|
+
try {
|
|
201
|
+
return decodeURIComponent(value).trim() || void 0;
|
|
202
|
+
} catch {
|
|
203
|
+
return value.trim() || void 0;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function urlFromInput(url) {
|
|
207
|
+
if (typeof url === "string") {
|
|
208
|
+
return new URL(url, currentLocationUrl());
|
|
209
|
+
}
|
|
210
|
+
return new URL(url.href);
|
|
211
|
+
}
|
|
212
|
+
function currentLocationUrl() {
|
|
213
|
+
return typeof location === "undefined" ? new URL(defaultCategoryPageRoot, "https://example.test") : new URL(location.href);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
// src/shop-query.ts
|
|
217
|
+
import { clone as clone2, create as create3 } from "@bufbuild/protobuf";
|
|
218
|
+
import {
|
|
219
|
+
AccountIdSchema,
|
|
220
|
+
SearchQuerySchema as SearchQuerySchema3,
|
|
221
|
+
UUIDSchema
|
|
222
|
+
} from "@orderlyshop/core-client";
|
|
223
|
+
var configuredShopQuery;
|
|
224
|
+
function configureShopSearchQuery(query) {
|
|
225
|
+
configuredShopQuery = query ? clone2(SearchQuerySchema3, query) : void 0;
|
|
226
|
+
}
|
|
227
|
+
function shopSearchQuery() {
|
|
228
|
+
return configuredShopQuery ? clone2(SearchQuerySchema3, configuredShopQuery) : void 0;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
// src/i18n.ts
|
|
232
|
+
var UI_TEXTS = {
|
|
233
|
+
DA: {
|
|
234
|
+
addressTitle: "Adresse",
|
|
235
|
+
basketCheckoutDisabledLabel: "L\xE6g varer i kurven f\xF8r betaling",
|
|
236
|
+
basketCheckoutLabel: "G\xE5 til betaling",
|
|
237
|
+
basketEmptyLabel: "Din kurv er tom",
|
|
238
|
+
basketLabel: "Kurv",
|
|
239
|
+
basketPanelTitle: "Kurv",
|
|
240
|
+
categoriesLabel: "Kategorier",
|
|
241
|
+
categoryConfigurationErrorTitle: "Fejl i kategorikonfiguration",
|
|
242
|
+
categoryNoConfigured: "Der er ikke konfigureret nogen kategori.",
|
|
243
|
+
categoryNoDefinitions: "Der er ikke konfigureret nogen navigation.",
|
|
244
|
+
categoryNoSlugMatch: 'Ingen kategori matcher slug "{slug}". Tjek navigation.ts og slug-attributten p\xE5 orderly-category-page.',
|
|
245
|
+
categoryNoUrlMatch: 'Ingen kategori matcher URL-id "{id}". Tjek navigation.ts og #id-v\xE6rdien.',
|
|
246
|
+
checkoutAddressTitle: "Leveringsadresse",
|
|
247
|
+
checkoutCityLabel: "By",
|
|
248
|
+
checkoutCompanyLabel: "Firma",
|
|
249
|
+
checkoutCountryLabel: "Land",
|
|
250
|
+
checkoutCustomerTitle: "Kundeoplysninger",
|
|
251
|
+
checkoutChooseServicePointLabel: "V\xE6lg {method}",
|
|
252
|
+
checkoutDeliveryAddressPrompt: "Udfyld adresse, postnummer og by for at se leveringsmetoder.",
|
|
253
|
+
checkoutDeliveryMethodLabel: "Leveringsmetode",
|
|
254
|
+
checkoutDeliveryTitle: "Leveringsmetode",
|
|
255
|
+
checkoutEmailLabel: "Email",
|
|
256
|
+
checkoutErrorLabel: "Checkout kunne ikke gennemf\xF8res.",
|
|
257
|
+
checkoutFirstNameLabel: "Fornavn",
|
|
258
|
+
checkoutFormTitle: "Levering og kontakt",
|
|
259
|
+
checkoutLastNameLabel: "Efternavn",
|
|
260
|
+
checkoutOrderTitle: "Din ordre",
|
|
261
|
+
checkoutNoDeliveryMethodsLabel: "Der blev ikke fundet leveringsmetoder til adressen.",
|
|
262
|
+
checkoutNoServicePointsLabel: "Der blev ikke fundet udleveringssteder til adressen.",
|
|
263
|
+
checkoutPageDescription: "Udfyld leveringsoplysninger, v\xE6lg levering og gennemf\xF8r din ordre sikkert.",
|
|
264
|
+
checkoutPageTitle: "Levering & betaling",
|
|
265
|
+
checkoutPhoneCountryLabel: "Landekode",
|
|
266
|
+
checkoutPhoneLabel: "Telefon",
|
|
267
|
+
checkoutServicePointLabel: "Udleveringssted",
|
|
268
|
+
checkoutServicePointHelpLabel: "V\xE6lg dit \xF8nskede udleveringssted",
|
|
269
|
+
checkoutStreet2Label: "Adresse 2",
|
|
270
|
+
checkoutStreetLabel: "Adresse",
|
|
271
|
+
checkoutSubmitLabel: "Betal og bestil",
|
|
272
|
+
checkoutSubmittingLabel: "Sender ordre...",
|
|
273
|
+
checkoutTermsLabel: "Jeg accepterer",
|
|
274
|
+
checkoutTermsLinkLabel: "forretningsbetingelserne",
|
|
275
|
+
checkoutZipLabel: "Postnummer",
|
|
276
|
+
clearBasketLabel: "T\xF8m kurv",
|
|
277
|
+
clearSearchLabel: "Ryd s\xF8gning",
|
|
278
|
+
closeLabel: "Luk",
|
|
279
|
+
closeMenuLabel: "Luk menu",
|
|
280
|
+
collapseLabel: "Luk {label}",
|
|
281
|
+
contactTitle: "Kontakt",
|
|
282
|
+
continueShoppingLabel: "Forts\xE6t med at handle",
|
|
283
|
+
deliveryFallbackLabel: "Levering {index}",
|
|
284
|
+
deliveryNote: "Levering beregnes fra valgt leveringsmetode.",
|
|
285
|
+
emailLabel: "Email",
|
|
286
|
+
emptyLabel: "Der blev ikke fundet varer.",
|
|
287
|
+
expandLabel: "\xC5bn {label}",
|
|
288
|
+
homeRailCtaLabel: "Se alle",
|
|
289
|
+
homeTitle: "Butik",
|
|
290
|
+
informationLinksTitle: "Information",
|
|
291
|
+
itemFallbackTitle: "Vare",
|
|
292
|
+
loadMoreLabel: "Indl\xE6s flere",
|
|
293
|
+
loadingLabel: "Indl\xE6ser...",
|
|
294
|
+
mainCategoriesLabel: "Hovedkategorier",
|
|
295
|
+
mainNavigationLabel: "Navigation",
|
|
296
|
+
menuLabel: "Menu",
|
|
297
|
+
navigationItemFallbackLabel: "Punkt {index}",
|
|
298
|
+
openingHoursTitle: "\xC5bningstider",
|
|
299
|
+
phoneLabel: "Telefon",
|
|
300
|
+
productAddLabel: "L\xE6g i kurven",
|
|
301
|
+
productDetailColorLabel: "Farve",
|
|
302
|
+
productDetailConditionLabel: "Stand",
|
|
303
|
+
productDetailSizeLabel: "St\xF8rrelse",
|
|
304
|
+
productErrorLabel: "Produktet kunne ikke indl\xE6ses.",
|
|
305
|
+
productFallbackTitle: "Produkt",
|
|
306
|
+
productImageLabel: "billede {index}",
|
|
307
|
+
productImageOverlayLabel: "Produktbillede",
|
|
308
|
+
productLoadingLabel: "Indl\xE6ser produkt...",
|
|
309
|
+
productNotFoundLabel: "Produktet blev ikke fundet.",
|
|
310
|
+
productOpenImageLabel: "\xC5bn produktbillede i fuld sk\xE6rm",
|
|
311
|
+
productOpenPageLabel: "\xC5bn produktside",
|
|
312
|
+
productRemoveLabel: "Fjern fra kurven",
|
|
313
|
+
productViewLabel: "Vis produkt",
|
|
314
|
+
productViewWithTitle: "Vis {title}",
|
|
315
|
+
productsLabel: "varer",
|
|
316
|
+
productsLoadError: "Varerne kunne ikke indl\xE6ses.",
|
|
317
|
+
quantityLabel: "Antal",
|
|
318
|
+
quantityShortLabel: "Antal",
|
|
319
|
+
removeLabel: "Fjern",
|
|
320
|
+
searchLabel: "S\xF8g",
|
|
321
|
+
searchPlaceholder: "S\xF8g produkter",
|
|
322
|
+
searchPromptLabel: "Skriv i s\xF8gefeltet for at finde varer.",
|
|
323
|
+
searchingLabel: "S\xF8ger efter",
|
|
324
|
+
servicePointFallbackLabel: "Udleveringssted {index}",
|
|
325
|
+
shippingLabel: "Levering",
|
|
326
|
+
shopBrandLabel: "Butik",
|
|
327
|
+
shopNowLabel: "Se varer",
|
|
328
|
+
sortLabel: "Sorter",
|
|
329
|
+
subtotalLabel: "Varer",
|
|
330
|
+
totalLabel: "Total",
|
|
331
|
+
totalNote: "Inkl. moms",
|
|
332
|
+
websiteLabel: "Website"
|
|
333
|
+
},
|
|
334
|
+
EN: {
|
|
335
|
+
addressTitle: "Address",
|
|
336
|
+
basketCheckoutDisabledLabel: "Add items before checkout",
|
|
337
|
+
basketCheckoutLabel: "Go to checkout",
|
|
338
|
+
basketEmptyLabel: "Your basket is empty",
|
|
339
|
+
basketLabel: "Basket",
|
|
340
|
+
basketPanelTitle: "Basket",
|
|
341
|
+
categoriesLabel: "Categories",
|
|
342
|
+
categoryConfigurationErrorTitle: "Category configuration error",
|
|
343
|
+
categoryNoConfigured: "No category has been configured.",
|
|
344
|
+
categoryNoDefinitions: "No navigation definitions have been configured.",
|
|
345
|
+
categoryNoSlugMatch: 'No category matches slug "{slug}". Check navigation.ts and the orderly-category-page slug attribute.',
|
|
346
|
+
categoryNoUrlMatch: 'No category matches URL id "{id}". Check navigation.ts and the #id value.',
|
|
347
|
+
checkoutAddressTitle: "Delivery address",
|
|
348
|
+
checkoutCityLabel: "City",
|
|
349
|
+
checkoutCompanyLabel: "Company",
|
|
350
|
+
checkoutCountryLabel: "Country",
|
|
351
|
+
checkoutCustomerTitle: "Customer information",
|
|
352
|
+
checkoutChooseServicePointLabel: "Choose {method}",
|
|
353
|
+
checkoutDeliveryAddressPrompt: "Enter street, zip, and city to see delivery methods.",
|
|
354
|
+
checkoutDeliveryMethodLabel: "Delivery method",
|
|
355
|
+
checkoutDeliveryTitle: "Delivery method",
|
|
356
|
+
checkoutEmailLabel: "Email",
|
|
357
|
+
checkoutErrorLabel: "Checkout failed.",
|
|
358
|
+
checkoutFirstNameLabel: "First name",
|
|
359
|
+
checkoutFormTitle: "Delivery and contact",
|
|
360
|
+
checkoutLastNameLabel: "Last name",
|
|
361
|
+
checkoutOrderTitle: "Your order",
|
|
362
|
+
checkoutNoDeliveryMethodsLabel: "No delivery methods were found for the address.",
|
|
363
|
+
checkoutNoServicePointsLabel: "No service points were found for the address.",
|
|
364
|
+
checkoutPageDescription: "Enter your delivery details, choose delivery, and complete your order securely.",
|
|
365
|
+
checkoutPageTitle: "Delivery & Payment",
|
|
366
|
+
checkoutPhoneCountryLabel: "Phone country",
|
|
367
|
+
checkoutPhoneLabel: "Phone",
|
|
368
|
+
checkoutServicePointLabel: "Service point",
|
|
369
|
+
checkoutServicePointHelpLabel: "Choose your preferred pickup point",
|
|
370
|
+
checkoutStreet2Label: "Street 2",
|
|
371
|
+
checkoutStreetLabel: "Street",
|
|
372
|
+
checkoutSubmitLabel: "Create order",
|
|
373
|
+
checkoutSubmittingLabel: "Creating order...",
|
|
374
|
+
checkoutTermsLabel: "I accept the terms and conditions",
|
|
375
|
+
checkoutTermsLinkLabel: "terms",
|
|
376
|
+
checkoutZipLabel: "Zip",
|
|
377
|
+
clearBasketLabel: "Clear basket",
|
|
378
|
+
clearSearchLabel: "Clear search",
|
|
379
|
+
closeLabel: "Close",
|
|
380
|
+
closeMenuLabel: "Close menu",
|
|
381
|
+
collapseLabel: "Collapse {label}",
|
|
382
|
+
contactTitle: "Contact",
|
|
383
|
+
continueShoppingLabel: "Continue shopping",
|
|
384
|
+
deliveryFallbackLabel: "Delivery {index}",
|
|
385
|
+
deliveryNote: "Delivery is calculated from the selected delivery method.",
|
|
386
|
+
emailLabel: "Email",
|
|
387
|
+
emptyLabel: "No products found.",
|
|
388
|
+
expandLabel: "Expand {label}",
|
|
389
|
+
homeRailCtaLabel: "See all",
|
|
390
|
+
homeTitle: "Shop",
|
|
391
|
+
informationLinksTitle: "Information",
|
|
392
|
+
itemFallbackTitle: "Item",
|
|
393
|
+
loadMoreLabel: "Load more",
|
|
394
|
+
loadingLabel: "Loading...",
|
|
395
|
+
mainCategoriesLabel: "Main categories",
|
|
396
|
+
mainNavigationLabel: "Main navigation",
|
|
397
|
+
menuLabel: "Menu",
|
|
398
|
+
navigationItemFallbackLabel: "Item {index}",
|
|
399
|
+
openingHoursTitle: "Opening hours",
|
|
400
|
+
phoneLabel: "Phone",
|
|
401
|
+
productAddLabel: "Add to basket",
|
|
402
|
+
productDetailColorLabel: "Color",
|
|
403
|
+
productDetailConditionLabel: "Condition",
|
|
404
|
+
productDetailSizeLabel: "Size",
|
|
405
|
+
productErrorLabel: "Product could not be loaded.",
|
|
406
|
+
productFallbackTitle: "Product",
|
|
407
|
+
productImageLabel: "image {index}",
|
|
408
|
+
productImageOverlayLabel: "Product image",
|
|
409
|
+
productLoadingLabel: "Loading product...",
|
|
410
|
+
productNotFoundLabel: "Product could not be found.",
|
|
411
|
+
productOpenImageLabel: "Open product image fullscreen",
|
|
412
|
+
productOpenPageLabel: "Open product page",
|
|
413
|
+
productRemoveLabel: "Remove from basket",
|
|
414
|
+
productViewLabel: "View product",
|
|
415
|
+
productViewWithTitle: "View {title}",
|
|
416
|
+
productsLabel: "products",
|
|
417
|
+
productsLoadError: "Products could not be loaded.",
|
|
418
|
+
quantityLabel: "Quantity",
|
|
419
|
+
quantityShortLabel: "Qty",
|
|
420
|
+
removeLabel: "Remove",
|
|
421
|
+
searchLabel: "Search",
|
|
422
|
+
searchPlaceholder: "Search products",
|
|
423
|
+
searchPromptLabel: "Start typing to find products.",
|
|
424
|
+
searchingLabel: "Searching for",
|
|
425
|
+
servicePointFallbackLabel: "Service point {index}",
|
|
426
|
+
shippingLabel: "Shipping",
|
|
427
|
+
shopBrandLabel: "Shop",
|
|
428
|
+
shopNowLabel: "Shop now",
|
|
429
|
+
sortLabel: "Sort",
|
|
430
|
+
subtotalLabel: "Items",
|
|
431
|
+
totalLabel: "Total",
|
|
432
|
+
totalNote: "Incl. VAT",
|
|
433
|
+
websiteLabel: "Website"
|
|
434
|
+
}
|
|
435
|
+
};
|
|
436
|
+
var currentUiLanguage = "DA";
|
|
437
|
+
function configureUiLanguage(language) {
|
|
438
|
+
currentUiLanguage = normalizeUiLanguage(language);
|
|
439
|
+
return currentUiLanguage;
|
|
440
|
+
}
|
|
441
|
+
function normalizeUiLanguage(language) {
|
|
442
|
+
const value = language?.trim().toUpperCase();
|
|
443
|
+
return value === "EN" ? "EN" : "DA";
|
|
444
|
+
}
|
|
445
|
+
function uiText(key, language = currentUiLanguage) {
|
|
446
|
+
return UI_TEXTS[language][key] ?? UI_TEXTS.DA[key];
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// src/default-shop.ts
|
|
450
|
+
var DEFAULT_SHOP_BASE_URL = "https://service.orderly.shop";
|
|
451
|
+
var DEFAULT_SHOP_BRAND_LABEL = uiText("shopBrandLabel", "DA");
|
|
452
|
+
var DEFAULT_SHOP_SORT_OPTIONS = defaultShopSortOptionsForLanguage("DA");
|
|
453
|
+
var DEFAULT_SHOP_NAVIGATION_DEFINITIONS = defaultShopNavigationDefinitionsForLanguage("DA");
|
|
454
|
+
var DEFAULT_SHOP_CATEGORY_DEFINITIONS = DEFAULT_SHOP_NAVIGATION_DEFINITIONS;
|
|
455
|
+
var initialDefaultShopConfig = defaultShopStateForLanguage("DA");
|
|
456
|
+
var defaultShopConfig = cloneDefaultShopConfig(initialDefaultShopConfig);
|
|
457
|
+
function configureDefaultShop(config = {}) {
|
|
458
|
+
const nextLanguage = "uiLanguage" in config ? configureUiLanguage(config.uiLanguage) : defaultShopConfig.uiLanguage;
|
|
459
|
+
const baseConfig = nextLanguage === defaultShopConfig.uiLanguage ? defaultShopConfig : defaultShopStateForLanguage(nextLanguage);
|
|
460
|
+
if ("defaultQuery" in config) {
|
|
461
|
+
configureShopSearchQuery(config.defaultQuery);
|
|
462
|
+
} else if ("query" in config) {
|
|
463
|
+
configureShopSearchQuery(config.query);
|
|
464
|
+
}
|
|
465
|
+
const navigationDefinitions = config.navigationDefinitions ?? config.categoryDefinitions ?? baseConfig.navigationDefinitions;
|
|
466
|
+
defaultShopConfig = cloneDefaultShopConfig({
|
|
467
|
+
uiLanguage: nextLanguage,
|
|
468
|
+
baseUrl: config.baseUrl ?? baseConfig.baseUrl,
|
|
469
|
+
brandLabel: config.brandLabel ?? baseConfig.brandLabel,
|
|
470
|
+
homeHref: config.homeHref ?? baseConfig.homeHref,
|
|
471
|
+
productHref: config.productHref ?? baseConfig.productHref,
|
|
472
|
+
checkoutHref: config.checkoutHref ?? baseConfig.checkoutHref,
|
|
473
|
+
checkoutLabel: config.checkoutLabel ?? baseConfig.checkoutLabel,
|
|
474
|
+
checkoutPageTitle: config.checkoutPageTitle ?? baseConfig.checkoutPageTitle,
|
|
475
|
+
checkoutPageDescription: config.checkoutPageDescription ?? baseConfig.checkoutPageDescription,
|
|
476
|
+
checkoutOrderTitle: config.checkoutOrderTitle ?? baseConfig.checkoutOrderTitle,
|
|
477
|
+
checkoutTermsHref: config.checkoutTermsHref ?? baseConfig.checkoutTermsHref,
|
|
478
|
+
checkoutLabels: config.checkoutLabels ? { ...baseConfig.checkoutLabels, ...config.checkoutLabels } : baseConfig.checkoutLabels,
|
|
479
|
+
basketLabels: config.basketLabels ? { ...baseConfig.basketLabels, ...config.basketLabels } : baseConfig.basketLabels,
|
|
480
|
+
searchPlaceholder: config.searchPlaceholder ?? baseConfig.searchPlaceholder,
|
|
481
|
+
emptyLabel: config.emptyLabel ?? baseConfig.emptyLabel,
|
|
482
|
+
navigationDefinitions,
|
|
483
|
+
categoryPageRoot: config.categoryPageRoot ?? baseConfig.categoryPageRoot,
|
|
484
|
+
categoryUrlMode: "categoryUrlMode" in config ? config.categoryUrlMode : baseConfig.categoryUrlMode,
|
|
485
|
+
sortOptions: config.sortOptions ?? baseConfig.sortOptions,
|
|
486
|
+
navigationError: navigationConfigurationError(navigationDefinitions)
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
function resetDefaultShop() {
|
|
490
|
+
configureUiLanguage("DA");
|
|
491
|
+
defaultShopConfig = cloneDefaultShopConfig(initialDefaultShopConfig);
|
|
492
|
+
configureShopSearchQuery(void 0);
|
|
493
|
+
}
|
|
494
|
+
function defaultShopUiLanguage() {
|
|
495
|
+
return defaultShopConfig.uiLanguage;
|
|
496
|
+
}
|
|
497
|
+
function defaultShopBaseUrl() {
|
|
498
|
+
return defaultShopConfig.baseUrl;
|
|
499
|
+
}
|
|
500
|
+
function defaultShopBrandLabel() {
|
|
501
|
+
return defaultShopConfig.brandLabel;
|
|
502
|
+
}
|
|
503
|
+
function defaultShopHomeHref() {
|
|
504
|
+
return defaultShopConfig.homeHref;
|
|
505
|
+
}
|
|
506
|
+
function defaultShopProductHref() {
|
|
507
|
+
return defaultShopConfig.productHref;
|
|
508
|
+
}
|
|
509
|
+
function defaultShopCheckoutHref() {
|
|
510
|
+
return defaultShopConfig.checkoutHref;
|
|
511
|
+
}
|
|
512
|
+
function defaultShopCheckoutLabel() {
|
|
513
|
+
return defaultShopConfig.checkoutLabel;
|
|
514
|
+
}
|
|
515
|
+
function defaultShopCheckoutPageTitle() {
|
|
516
|
+
return defaultShopConfig.checkoutPageTitle;
|
|
517
|
+
}
|
|
518
|
+
function defaultShopCheckoutPageDescription() {
|
|
519
|
+
return defaultShopConfig.checkoutPageDescription;
|
|
520
|
+
}
|
|
521
|
+
function defaultShopCheckoutOrderTitle() {
|
|
522
|
+
return defaultShopConfig.checkoutOrderTitle;
|
|
523
|
+
}
|
|
524
|
+
function defaultShopCheckoutTermsHref() {
|
|
525
|
+
return defaultShopConfig.checkoutTermsHref;
|
|
526
|
+
}
|
|
527
|
+
function defaultShopCheckoutLabels() {
|
|
528
|
+
return { ...defaultShopConfig.checkoutLabels };
|
|
529
|
+
}
|
|
530
|
+
function defaultShopBasketLabels() {
|
|
531
|
+
return { ...defaultShopConfig.basketLabels };
|
|
532
|
+
}
|
|
533
|
+
function defaultShopSearchPlaceholder() {
|
|
534
|
+
return defaultShopConfig.searchPlaceholder;
|
|
535
|
+
}
|
|
536
|
+
function defaultShopEmptyLabel() {
|
|
537
|
+
return defaultShopConfig.emptyLabel;
|
|
538
|
+
}
|
|
539
|
+
function defaultShopSortOptions() {
|
|
540
|
+
return defaultShopConfig.sortOptions.map((option) => ({
|
|
541
|
+
label: option.label,
|
|
542
|
+
orderBy: [...option.orderBy]
|
|
543
|
+
}));
|
|
544
|
+
}
|
|
545
|
+
function defaultShopSearchQuery() {
|
|
546
|
+
return shopSearchQuery();
|
|
547
|
+
}
|
|
548
|
+
function defaultShopNavigationItems(url = currentLocationUrl2()) {
|
|
549
|
+
if (defaultShopConfig.navigationError) {
|
|
550
|
+
return [];
|
|
551
|
+
}
|
|
552
|
+
return createCategoryNavigation(defaultShopConfig.navigationDefinitions, {
|
|
553
|
+
pageRoot: defaultShopConfig.categoryPageRoot,
|
|
554
|
+
urlMode: defaultShopConfig.categoryUrlMode ?? resolveCategoryUrlMode(url, { pageRoot: defaultShopConfig.categoryPageRoot })
|
|
555
|
+
});
|
|
556
|
+
}
|
|
557
|
+
function defaultShopNavigationError() {
|
|
558
|
+
return defaultShopConfig.navigationError;
|
|
559
|
+
}
|
|
560
|
+
function cloneDefaultShopConfig(config) {
|
|
561
|
+
return {
|
|
562
|
+
...config,
|
|
563
|
+
navigationDefinitions: config.navigationDefinitions.map(cloneNavigationDefinition),
|
|
564
|
+
checkoutLabels: { ...config.checkoutLabels },
|
|
565
|
+
basketLabels: { ...config.basketLabels },
|
|
566
|
+
navigationError: config.navigationError,
|
|
567
|
+
sortOptions: config.sortOptions.map((option) => ({
|
|
568
|
+
label: option.label,
|
|
569
|
+
orderBy: [...option.orderBy]
|
|
570
|
+
}))
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
function cloneNavigationDefinition(definition) {
|
|
574
|
+
return {
|
|
575
|
+
...definition,
|
|
576
|
+
query: definition.query ? normalizeSearchQuery(definition.query) : void 0,
|
|
577
|
+
children: definition.children?.map(cloneNavigationDefinition)
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
function defaultShopStateForLanguage(language) {
|
|
581
|
+
return {
|
|
582
|
+
uiLanguage: language,
|
|
583
|
+
baseUrl: DEFAULT_SHOP_BASE_URL,
|
|
584
|
+
brandLabel: uiText("shopBrandLabel", language),
|
|
585
|
+
homeHref: "/",
|
|
586
|
+
productHref: "/product.html",
|
|
587
|
+
checkoutHref: "/checkout.html",
|
|
588
|
+
checkoutLabel: uiText("basketCheckoutLabel", language),
|
|
589
|
+
checkoutPageTitle: uiText("checkoutPageTitle", language),
|
|
590
|
+
checkoutPageDescription: uiText("checkoutPageDescription", language),
|
|
591
|
+
checkoutOrderTitle: uiText("checkoutOrderTitle", language),
|
|
592
|
+
checkoutTermsHref: "#",
|
|
593
|
+
checkoutLabels: {},
|
|
594
|
+
basketLabels: {},
|
|
595
|
+
searchPlaceholder: uiText("searchPlaceholder", language),
|
|
596
|
+
emptyLabel: uiText("emptyLabel", language),
|
|
597
|
+
navigationDefinitions: defaultShopNavigationDefinitionsForLanguage(language),
|
|
598
|
+
categoryPageRoot: "/categories/",
|
|
599
|
+
categoryUrlMode: "path",
|
|
600
|
+
sortOptions: defaultShopSortOptionsForLanguage(language),
|
|
601
|
+
navigationError: void 0
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
function defaultShopSortOptionsForLanguage(language) {
|
|
605
|
+
return [
|
|
606
|
+
{ label: language === "EN" ? "Newest" : "Nyeste", orderBy: ["CreatedTime desc"] },
|
|
607
|
+
{ label: language === "EN" ? "Price: low to high" : "Pris: lav til h\xF8j", orderBy: ["Price asc"] },
|
|
608
|
+
{ label: language === "EN" ? "Price: high to low" : "Pris: h\xF8j til lav", orderBy: ["Price desc"] }
|
|
609
|
+
];
|
|
610
|
+
}
|
|
611
|
+
function defaultShopNavigationDefinitionsForLanguage(language) {
|
|
612
|
+
if (language === "EN") {
|
|
613
|
+
return [
|
|
614
|
+
{
|
|
615
|
+
label: "Clothing",
|
|
616
|
+
slug: "clothing",
|
|
617
|
+
heroImage: "https://images.unsplash.com/photo-1496747611176-843222e1e57c?auto=format&fit=crop&w=1800&q=80",
|
|
618
|
+
query: { query: "clothing fashion" },
|
|
619
|
+
children: [
|
|
620
|
+
{ label: "Women", slug: "women", query: { query: "women clothing dresses jackets" } },
|
|
621
|
+
{ label: "Men", slug: "men", query: { query: "men clothing shirts jackets" } },
|
|
622
|
+
{ label: "Kids", slug: "kids", query: { query: "kids clothing" } },
|
|
623
|
+
{ label: "Accessories", slug: "accessories", query: { query: "fashion accessories" } }
|
|
624
|
+
]
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
label: "Shoes",
|
|
628
|
+
slug: "shoes",
|
|
629
|
+
heroImage: "https://images.unsplash.com/photo-1542291026-7eec264c27ff?auto=format&fit=crop&w=1800&q=80",
|
|
630
|
+
query: { query: "shoes sneakers" },
|
|
631
|
+
children: [
|
|
632
|
+
{ label: "Women shoes", slug: "women-shoes", query: { query: "women shoes sneakers boots" } },
|
|
633
|
+
{ label: "Men shoes", slug: "men-shoes", query: { query: "men shoes sneakers boots" } },
|
|
634
|
+
{ label: "Sport shoes", slug: "sport-shoes", query: { query: "sport shoes running" } }
|
|
635
|
+
]
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
label: "Home",
|
|
639
|
+
slug: "home",
|
|
640
|
+
heroImage: "https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?auto=format&fit=crop&w=1800&q=80",
|
|
641
|
+
query: { query: "home interior design" },
|
|
642
|
+
children: [
|
|
643
|
+
{ label: "Furniture", slug: "furniture", query: { query: "furniture sofa chair table" } },
|
|
644
|
+
{ label: "Lighting", slug: "lighting", query: { query: "lamp lighting home" } },
|
|
645
|
+
{ label: "Kitchen", slug: "kitchen", query: { query: "kitchen equipment" } }
|
|
646
|
+
]
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
label: "Electronics",
|
|
650
|
+
slug: "electronics",
|
|
651
|
+
heroImage: "https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1800&q=80",
|
|
652
|
+
query: { query: "electronics computer mobile" },
|
|
653
|
+
children: [
|
|
654
|
+
{ label: "Computers", slug: "computers", query: { query: "computer tablet laptop" } },
|
|
655
|
+
{ label: "Mobile", slug: "mobile", query: { query: "mobile phone accessories" } },
|
|
656
|
+
{ label: "Gaming", slug: "gaming", query: { query: "gaming console" } }
|
|
657
|
+
]
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
label: "Beauty",
|
|
661
|
+
slug: "beauty",
|
|
662
|
+
heroImage: "https://images.unsplash.com/photo-1522335789203-aabd1fc54bc9?auto=format&fit=crop&w=1800&q=80",
|
|
663
|
+
query: { query: "beauty skincare makeup" },
|
|
664
|
+
children: [
|
|
665
|
+
{ label: "Skincare", slug: "skincare", query: { query: "skincare beauty" } },
|
|
666
|
+
{ label: "Makeup", slug: "makeup", query: { query: "makeup cosmetics" } },
|
|
667
|
+
{ label: "Perfume", slug: "perfume", query: { query: "perfume fragrance" } }
|
|
668
|
+
]
|
|
669
|
+
}
|
|
670
|
+
];
|
|
671
|
+
}
|
|
672
|
+
return [
|
|
673
|
+
{
|
|
674
|
+
label: "T\xF8j",
|
|
675
|
+
slug: "toej",
|
|
676
|
+
heroImage: "https://images.unsplash.com/photo-1496747611176-843222e1e57c?auto=format&fit=crop&w=1800&q=80",
|
|
677
|
+
query: { query: "t\xF8j mode" },
|
|
678
|
+
children: [
|
|
679
|
+
{ label: "Dame", slug: "dame", query: { query: "dame t\xF8j kjoler jakker" } },
|
|
680
|
+
{ label: "Herre", slug: "herre", query: { query: "herre t\xF8j skjorter jakker" } },
|
|
681
|
+
{ label: "B\xF8rn", slug: "boern", query: { query: "b\xF8rnet\xF8j" } },
|
|
682
|
+
{ label: "Accessories", slug: "accessories", query: { query: "mode accessories" } }
|
|
683
|
+
]
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
label: "Sko",
|
|
687
|
+
slug: "sko",
|
|
688
|
+
heroImage: "https://images.unsplash.com/photo-1542291026-7eec264c27ff?auto=format&fit=crop&w=1800&q=80",
|
|
689
|
+
query: { query: "sko sneakers" },
|
|
690
|
+
children: [
|
|
691
|
+
{ label: "Damesko", slug: "damesko", query: { query: "damesko sneakers st\xF8vler" } },
|
|
692
|
+
{ label: "Herresko", slug: "herresko", query: { query: "herresko sneakers st\xF8vler" } },
|
|
693
|
+
{ label: "Sportssko", slug: "sportssko", query: { query: "sportssko l\xF8besko" } }
|
|
694
|
+
]
|
|
695
|
+
},
|
|
696
|
+
{
|
|
697
|
+
label: "Bolig",
|
|
698
|
+
slug: "bolig",
|
|
699
|
+
heroImage: "https://images.unsplash.com/photo-1618221195710-dd6b41faaea6?auto=format&fit=crop&w=1800&q=80",
|
|
700
|
+
query: { query: "bolig indretning design" },
|
|
701
|
+
children: [
|
|
702
|
+
{ label: "M\xF8bler", slug: "moebler", query: { query: "m\xF8bler sofa stol bord" } },
|
|
703
|
+
{ label: "Belysning", slug: "belysning", query: { query: "lampe belysning bolig" } },
|
|
704
|
+
{ label: "K\xF8kken", slug: "koekken", query: { query: "k\xF8kkenudstyr" } }
|
|
705
|
+
]
|
|
706
|
+
},
|
|
707
|
+
{
|
|
708
|
+
label: "Elektronik",
|
|
709
|
+
slug: "elektronik",
|
|
710
|
+
heroImage: "https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1800&q=80",
|
|
711
|
+
query: { query: "elektronik computer mobil" },
|
|
712
|
+
children: [
|
|
713
|
+
{ label: "Computere", slug: "computere", query: { query: "computer tablet laptop" } },
|
|
714
|
+
{ label: "Mobil", slug: "mobil", query: { query: "mobil telefon tilbeh\xF8r" } },
|
|
715
|
+
{ label: "Gaming", slug: "gaming", query: { query: "gaming konsol" } }
|
|
716
|
+
]
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
label: "Sk\xF8nhed",
|
|
720
|
+
slug: "skoenhed",
|
|
721
|
+
heroImage: "https://images.unsplash.com/photo-1522335789203-aabd1fc54bc9?auto=format&fit=crop&w=1800&q=80",
|
|
722
|
+
query: { query: "sk\xF8nhed hudpleje makeup" },
|
|
723
|
+
children: [
|
|
724
|
+
{ label: "Hudpleje", slug: "hudpleje", query: { query: "hudpleje sk\xF8nhed" } },
|
|
725
|
+
{ label: "Makeup", slug: "makeup", query: { query: "makeup kosmetik" } },
|
|
726
|
+
{ label: "Parfume", slug: "parfume", query: { query: "parfume duft" } }
|
|
727
|
+
]
|
|
728
|
+
}
|
|
729
|
+
];
|
|
730
|
+
}
|
|
731
|
+
function currentLocationUrl2() {
|
|
732
|
+
return typeof location === "undefined" ? new URL(defaultShopConfig.categoryPageRoot, "https://example.test") : new URL(location.href);
|
|
733
|
+
}
|
|
734
|
+
export {
|
|
735
|
+
DEFAULT_SHOP_BASE_URL,
|
|
736
|
+
DEFAULT_SHOP_BRAND_LABEL,
|
|
737
|
+
DEFAULT_SHOP_CATEGORY_DEFINITIONS,
|
|
738
|
+
DEFAULT_SHOP_NAVIGATION_DEFINITIONS,
|
|
739
|
+
DEFAULT_SHOP_SORT_OPTIONS,
|
|
740
|
+
configureDefaultShop,
|
|
741
|
+
defaultShopBaseUrl,
|
|
742
|
+
defaultShopBasketLabels,
|
|
743
|
+
defaultShopBrandLabel,
|
|
744
|
+
defaultShopCheckoutHref,
|
|
745
|
+
defaultShopCheckoutLabel,
|
|
746
|
+
defaultShopCheckoutLabels,
|
|
747
|
+
defaultShopCheckoutOrderTitle,
|
|
748
|
+
defaultShopCheckoutPageDescription,
|
|
749
|
+
defaultShopCheckoutPageTitle,
|
|
750
|
+
defaultShopCheckoutTermsHref,
|
|
751
|
+
defaultShopEmptyLabel,
|
|
752
|
+
defaultShopHomeHref,
|
|
753
|
+
defaultShopNavigationError,
|
|
754
|
+
defaultShopNavigationItems,
|
|
755
|
+
defaultShopProductHref,
|
|
756
|
+
defaultShopSearchPlaceholder,
|
|
757
|
+
defaultShopSearchQuery,
|
|
758
|
+
defaultShopSortOptions,
|
|
759
|
+
defaultShopUiLanguage,
|
|
760
|
+
resetDefaultShop
|
|
761
|
+
};
|
|
762
|
+
//# sourceMappingURL=default-shop.js.map
|