platform-types 1.10.691 → 1.10.693
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/dist/ai.d.ts +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/literals.js +1 -1
- package/dist/cjs/storefrontProductMeta.js +42 -0
- package/dist/cjs/storefrontWebLiteralKeys.js +56 -10
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/literals.d.ts +5 -0
- package/dist/literals.js +1 -1
- package/dist/platform.d.ts +8 -8
- package/dist/storefrontProductMeta.d.ts +21 -0
- package/dist/storefrontProductMeta.js +36 -0
- package/dist/storefrontWebLiteralKeys.js +56 -10
- package/package.json +1 -1
package/dist/ai.d.ts
CHANGED
|
@@ -624,7 +624,7 @@ declare global {
|
|
|
624
624
|
interface WhatsAppOrderDraftRequest {
|
|
625
625
|
/** Meta's message id of an INBOUND message this store received. The server re-reads its text. */
|
|
626
626
|
messageId: string;
|
|
627
|
-
/** `CUST` + 6–10 digits. Prices the draft at this customer
|
|
627
|
+
/** `CUST` + 6–10 digits. Prices the draft at the list a cart prices this customer at (a missing, 0 or deleted list is PUBLICO 1); absent → the store default. */
|
|
628
628
|
customerId?: string;
|
|
629
629
|
}
|
|
630
630
|
/**
|
package/dist/cjs/index.js
CHANGED
|
@@ -104,6 +104,7 @@ __exportStar(require("./storeNetwork.js"), exports);
|
|
|
104
104
|
__exportStar(require("./storefrontAssets.js"), exports);
|
|
105
105
|
__exportStar(require("./storefrontEvent.js"), exports);
|
|
106
106
|
__exportStar(require("./storefrontSeo.js"), exports);
|
|
107
|
+
__exportStar(require("./storefrontProductMeta.js"), exports);
|
|
107
108
|
__exportStar(require("./storefrontWebLiteralKeys.js"), exports);
|
|
108
109
|
__exportStar(require("./subscription.js"), exports);
|
|
109
110
|
__exportStar(require("./support.js"), exports);
|
package/dist/cjs/literals.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
//
|
|
2
|
+
// Literal read and catalog-seed wire contracts — the surface union and response
|
|
3
3
|
// envelopes, so a native client has something to import instead of hand-pinning
|
|
4
4
|
// strings it cannot be told about when they change.
|
|
5
5
|
//
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.storefrontProductMetaDescription = exports.storefrontProductName = exports.storefrontDisplayName = exports.PRODUCT_DESCRIPTION_MAX = void 0;
|
|
4
|
+
/** The supplied product description's maximum code points, including the trailing ellipsis. */
|
|
5
|
+
exports.PRODUCT_DESCRIPTION_MAX = 200;
|
|
6
|
+
/** The edge and SPA's store name: keep a nonblank name verbatim, else the platform fallback. */
|
|
7
|
+
const storefrontDisplayName = (name) => typeof name === 'string' && name.trim() !== '' ? name : 'Tienda online';
|
|
8
|
+
exports.storefrontDisplayName = storefrontDisplayName;
|
|
9
|
+
/** A product's display name: a nonblank name verbatim, else its id — the head's title and the fallback description share it. */
|
|
10
|
+
const storefrontProductName = (product) => typeof product.name === 'string' && product.name.trim() ? product.name : String(product.productId);
|
|
11
|
+
exports.storefrontProductName = storefrontProductName;
|
|
12
|
+
/** Every `<…>` tag as a space, in one linear pass (a tag regex backtracks on an unclosed `<`). */
|
|
13
|
+
const withoutTags = (text) => {
|
|
14
|
+
let out = '';
|
|
15
|
+
let inTag = false;
|
|
16
|
+
for (const char of text) {
|
|
17
|
+
if (char === '<')
|
|
18
|
+
inTag = true;
|
|
19
|
+
if (!inTag)
|
|
20
|
+
out += char;
|
|
21
|
+
if (char === '>' && inTag) {
|
|
22
|
+
inTag = false;
|
|
23
|
+
out += ' ';
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return out;
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Raw text for a product's description meta tags. Strip tags, preserve literal
|
|
30
|
+
* entities, collapse whitespace and cut supplied text on a code-point boundary.
|
|
31
|
+
* Blank or non-string descriptions use the name (else the id) and display store
|
|
32
|
+
* name verbatim; that fallback sentence is neither stripped nor capped.
|
|
33
|
+
* HTML renderers must escape the returned text when writing an attribute.
|
|
34
|
+
*/
|
|
35
|
+
const storefrontProductMetaDescription = (product, storeName) => {
|
|
36
|
+
const text = typeof product.description === 'string' ? withoutTags(product.description).replaceAll(/\s+/g, ' ').trim() : '';
|
|
37
|
+
if (!text)
|
|
38
|
+
return `${(0, exports.storefrontProductName)(product)} en ${(0, exports.storefrontDisplayName)(storeName)}.`;
|
|
39
|
+
const chars = [...text];
|
|
40
|
+
return chars.length <= exports.PRODUCT_DESCRIPTION_MAX ? text : `${chars.slice(0, exports.PRODUCT_DESCRIPTION_MAX - 1).join('')}…`;
|
|
41
|
+
};
|
|
42
|
+
exports.storefrontProductMetaDescription = storefrontProductMetaDescription;
|
|
@@ -103,6 +103,7 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
103
103
|
'AUTH_LOGIN_ERROR_WRONG_CREDENTIALS',
|
|
104
104
|
'AUTH_LOGIN_FORGOT_LINK',
|
|
105
105
|
'AUTH_LOGIN_META_DESCRIPTION',
|
|
106
|
+
'AUTH_LOGIN_PAGE_TITLE',
|
|
106
107
|
'AUTH_LOGIN_PASSWORD',
|
|
107
108
|
'AUTH_LOGIN_PASSWORD_MIN',
|
|
108
109
|
'AUTH_LOGIN_PASSWORD_REQUIRED',
|
|
@@ -305,6 +306,7 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
305
306
|
'BASKET_TITLE',
|
|
306
307
|
'BASKET_TOTAL',
|
|
307
308
|
'BRANDS_TITLE',
|
|
309
|
+
'CHECKOUT_ACCOUNT_DISABLED',
|
|
308
310
|
'CHECKOUT_BACK_BUTTON',
|
|
309
311
|
'CHECKOUT_COL_PRODUCT',
|
|
310
312
|
'CHECKOUT_COL_QUANTITY',
|
|
@@ -341,6 +343,7 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
341
343
|
'CHECKOUT_DELIVERY_DETAILS_TITLE',
|
|
342
344
|
'CHECKOUT_DELIVERY_FULLNAME_LABEL',
|
|
343
345
|
'CHECKOUT_DELIVERY_METHOD_LABEL',
|
|
346
|
+
'CHECKOUT_DELIVERY_METHOD_UNAVAILABLE',
|
|
344
347
|
'CHECKOUT_DELIVERY_NO_DATA',
|
|
345
348
|
'CHECKOUT_DELIVERY_PHONE_LABEL',
|
|
346
349
|
'CHECKOUT_DELIVERY_POSTAL_CODE_LABEL',
|
|
@@ -358,18 +361,23 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
358
361
|
'CHECKOUT_DNI_REQUIRED_DIALOG',
|
|
359
362
|
'CHECKOUT_DNI_REQUIRED_MESSAGE',
|
|
360
363
|
'CHECKOUT_DNI_REQUIRED_MESSAGE_NO_THRESHOLD',
|
|
364
|
+
'CHECKOUT_EMAIL_VERIFICATION_REQUIRED',
|
|
361
365
|
'CHECKOUT_EMPTY_BASKET',
|
|
362
366
|
'CHECKOUT_FX_NOTICE_PAYING',
|
|
363
367
|
'CHECKOUT_FX_NOTICE_PREFERRED',
|
|
364
368
|
'CHECKOUT_FX_NOTICE_STORE_HINT',
|
|
365
369
|
'CHECKOUT_INITIAL_NO_INVOICE',
|
|
370
|
+
'CHECKOUT_INVALID_CART',
|
|
366
371
|
'CHECKOUT_INVOICING_LABEL',
|
|
367
372
|
'CHECKOUT_MIN_BUY_ALERT',
|
|
368
373
|
'CHECKOUT_MIN_BUY_ERROR',
|
|
374
|
+
'CHECKOUT_MIN_BUY_REFUSED',
|
|
369
375
|
'CHECKOUT_NO_INVOICE',
|
|
370
376
|
'CHECKOUT_ORDER_CREATED',
|
|
371
377
|
'CHECKOUT_ORDER_CREATION_ERROR',
|
|
378
|
+
'CHECKOUT_PAYMENT_METHODS_NOT_CONFIGURED',
|
|
372
379
|
'CHECKOUT_PAYMENT_METHOD_LABEL',
|
|
380
|
+
'CHECKOUT_PAYMENT_METHOD_UNAVAILABLE',
|
|
373
381
|
'CHECKOUT_PRICES_CHANGED',
|
|
374
382
|
'CHECKOUT_PROMOTION_APPLIED',
|
|
375
383
|
'CHECKOUT_PROMOTION_APPLY',
|
|
@@ -612,9 +620,6 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
612
620
|
'HOME_QUICK_ADD',
|
|
613
621
|
'HOME_SUBTITLE',
|
|
614
622
|
'HOME_TITLE',
|
|
615
|
-
'HOME_WHATSAPP_CTA',
|
|
616
|
-
'HOME_WHATSAPP_LOGIN_REQUIRED',
|
|
617
|
-
'HOME_WHATSAPP_PHONE',
|
|
618
623
|
'HOME_WHATSAPP_TITLE',
|
|
619
624
|
'IMAGE_CROP_WARNING',
|
|
620
625
|
'INCOMES_DATE_FROM',
|
|
@@ -857,6 +862,21 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
857
862
|
'PAYMENT_METHOD_SANTANDER_CBU',
|
|
858
863
|
'PAYMENT_METHOD_SANTANDER_NAME',
|
|
859
864
|
'PAYMENT_METHOD_SANTANDER_TYPE',
|
|
865
|
+
'PREVIEW_BACK',
|
|
866
|
+
'PREVIEW_DISABLED',
|
|
867
|
+
'PREVIEW_EXPIRED',
|
|
868
|
+
'PREVIEW_FAILED',
|
|
869
|
+
'PREVIEW_HOME',
|
|
870
|
+
'PREVIEW_LOADING',
|
|
871
|
+
'PREVIEW_READ_FAILED',
|
|
872
|
+
'PREVIEW_READ_ONLY',
|
|
873
|
+
'PREVIEW_RESTART',
|
|
874
|
+
'PREVIEW_RETRY',
|
|
875
|
+
'PREVIEW_TITLE',
|
|
876
|
+
'PREVIEW_UNAVAILABLE',
|
|
877
|
+
'PREVIEW_UNAVAILABLE_ACTION',
|
|
878
|
+
'PREVIEW_VARIANTS',
|
|
879
|
+
'PREVIEW_WAITING',
|
|
860
880
|
'PRICING_TIER_CHIP',
|
|
861
881
|
'PRICING_TIER_FROM',
|
|
862
882
|
'PRICING_TIER_UNITS',
|
|
@@ -1093,6 +1113,32 @@ exports.STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
1093
1113
|
'SETTINGS_SUCCESS_MESSAGE',
|
|
1094
1114
|
'SETTINGS_THEME_DARK',
|
|
1095
1115
|
'SETTINGS_TITLE',
|
|
1116
|
+
'STOREFRONT_CATALOGUE',
|
|
1117
|
+
'STOREFRONT_CONTACT_ADDRESS',
|
|
1118
|
+
'STOREFRONT_CONTACT_EMAIL',
|
|
1119
|
+
'STOREFRONT_CONTACT_HOURS',
|
|
1120
|
+
'STOREFRONT_CONTACT_PHONE',
|
|
1121
|
+
'STOREFRONT_CONTACT_SOCIALS',
|
|
1122
|
+
'STOREFRONT_CONTACT_WHATSAPP',
|
|
1123
|
+
'STOREFRONT_DAY_FRIDAY',
|
|
1124
|
+
'STOREFRONT_DAY_MONDAY',
|
|
1125
|
+
'STOREFRONT_DAY_SATURDAY',
|
|
1126
|
+
'STOREFRONT_DAY_SUNDAY',
|
|
1127
|
+
'STOREFRONT_DAY_THURSDAY',
|
|
1128
|
+
'STOREFRONT_DAY_TUESDAY',
|
|
1129
|
+
'STOREFRONT_DAY_WEDNESDAY',
|
|
1130
|
+
'STOREFRONT_FOOTER_NAV_ARIA',
|
|
1131
|
+
'STOREFRONT_MERCHANT_NAV_ARIA',
|
|
1132
|
+
'STOREFRONT_NAV_GROUP_FALLBACK',
|
|
1133
|
+
'STOREFRONT_PLATFORM_NAV_ARIA',
|
|
1134
|
+
'STOREFRONT_SEARCH',
|
|
1135
|
+
'STOREFRONT_SOCIAL_FACEBOOK',
|
|
1136
|
+
'STOREFRONT_SOCIAL_INSTAGRAM',
|
|
1137
|
+
'STOREFRONT_SOCIAL_LINKEDIN',
|
|
1138
|
+
'STOREFRONT_SOCIAL_TIKTOK',
|
|
1139
|
+
'STOREFRONT_SOCIAL_X',
|
|
1140
|
+
'STOREFRONT_SOCIAL_YOUTUBE',
|
|
1141
|
+
'STOREFRONT_TAXONOMY_FAILED',
|
|
1096
1142
|
'STORE_NAME_FALLBACK',
|
|
1097
1143
|
'SURVEY_COMMENT_PLACEHOLDER',
|
|
1098
1144
|
'SURVEY_RATING_BAD',
|
|
@@ -1117,14 +1163,14 @@ exports.isStorefrontLiteralKey = isStorefrontLiteralKey;
|
|
|
1117
1163
|
const STOREFRONT_NAVIGATE_LITERAL_PREFIX = 'NAVIGATE_';
|
|
1118
1164
|
/**
|
|
1119
1165
|
* A same-origin path: a leading `/`, a second character that is neither `/` nor `\`
|
|
1120
|
-
* (`//host` and `/\host` are protocol-relative to a browser), and no whitespace
|
|
1121
|
-
* backslash
|
|
1122
|
-
*
|
|
1123
|
-
*
|
|
1124
|
-
*
|
|
1125
|
-
*
|
|
1166
|
+
* (`//host` and `/\host` are protocol-relative to a browser), and no whitespace,
|
|
1167
|
+
* backslash, control character (`\p{Cc}`) or invisible format character (`\p{Cf}`: every
|
|
1168
|
+
* bidi mark including U+061C, zero-width characters, the soft hyphen, tag characters)
|
|
1169
|
+
* anywhere. Browsers strip tab and newline before parsing, so `/\t/host` becomes `//host`;
|
|
1170
|
+
* invisible and directional characters can also disguise the link target. A scheme
|
|
1171
|
+
* cannot start with `/`.
|
|
1126
1172
|
*/
|
|
1127
|
-
const STOREFRONT_SAME_ORIGIN_PATH_RE = /^\/(?![/\\])[^\s
|
|
1173
|
+
const STOREFRONT_SAME_ORIGIN_PATH_RE = /^\/(?![/\\])[^\s\\\p{Cc}\p{Cf}]*$/u;
|
|
1128
1174
|
/**
|
|
1129
1175
|
* Whether `value` may be stored, published or served for `key`. A `NAVIGATE_*` key is
|
|
1130
1176
|
* rendered as a link, so it must be a same-origin path — otherwise an override could
|
package/dist/index.d.ts
CHANGED
|
@@ -80,6 +80,7 @@ export * from './storeNetwork.ts';
|
|
|
80
80
|
export * from './storefrontAssets.ts';
|
|
81
81
|
export * from './storefrontEvent.ts';
|
|
82
82
|
export * from './storefrontSeo.ts';
|
|
83
|
+
export * from './storefrontProductMeta.ts';
|
|
83
84
|
export * from './storefrontWebLiteralKeys.ts';
|
|
84
85
|
export * from './subscription.ts';
|
|
85
86
|
export * from './support.ts';
|
package/dist/index.js
CHANGED
|
@@ -88,6 +88,7 @@ export * from "./storeNetwork.js";
|
|
|
88
88
|
export * from "./storefrontAssets.js";
|
|
89
89
|
export * from "./storefrontEvent.js";
|
|
90
90
|
export * from "./storefrontSeo.js";
|
|
91
|
+
export * from "./storefrontProductMeta.js";
|
|
91
92
|
export * from "./storefrontWebLiteralKeys.js";
|
|
92
93
|
export * from "./subscription.js";
|
|
93
94
|
export * from "./support.js";
|
package/dist/literals.d.ts
CHANGED
package/dist/literals.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Literal read and catalog-seed wire contracts — the surface union and response
|
|
2
2
|
// envelopes, so a native client has something to import instead of hand-pinning
|
|
3
3
|
// strings it cannot be told about when they change.
|
|
4
4
|
//
|
package/dist/platform.d.ts
CHANGED
|
@@ -851,9 +851,10 @@ export interface TenantBillingRollupRow {
|
|
|
851
851
|
/**
|
|
852
852
|
* Why a plan's marketing copy disagrees with the entitlements actually backing
|
|
853
853
|
* that tier. Advisory only — `PATCH /platform/billing/plans/{tier}` reports
|
|
854
|
-
* these and still applies the write. It never blocks:
|
|
854
|
+
* these and still applies the write. It never blocks: plan copy is hand-tuned
|
|
855
855
|
* between pricing decisions, so a mismatch is routinely the intended
|
|
856
|
-
* intermediate state rather than an error.
|
|
856
|
+
* intermediate state rather than an error. The entitlements themselves come
|
|
857
|
+
* from the code matrix; that route refuses `features`.
|
|
857
858
|
*
|
|
858
859
|
* - `NUMERIC_MISMATCH` — a bullet advertises a number that differs from the
|
|
859
860
|
* numeric entitlement it maps to.
|
|
@@ -864,12 +865,11 @@ export interface TenantBillingRollupRow {
|
|
|
864
865
|
* `status: 'live'` and `enabled: true` for.
|
|
865
866
|
* - `MISSING_FEATURE_ROW` — a bullet states a LIMIT for an entitlement the tier
|
|
866
867
|
* has no row for at all. Distinct from `UNBACKED_CAPABILITY` on purpose: that
|
|
867
|
-
* one means "the row exists but is not live/enabled
|
|
868
|
-
*
|
|
869
|
-
*
|
|
870
|
-
*
|
|
871
|
-
*
|
|
872
|
-
* severe of the two behind the more common one.
|
|
868
|
+
* one means "the row exists but is not live/enabled in the matrix", whereas
|
|
869
|
+
* this one means the supplied catalogue lacks the backing row — a template
|
|
870
|
+
* PATCH cannot add it; the repair is the copy or a matrix change. Collapsing
|
|
871
|
+
* them (as the API briefly did) hides the more severe of the two behind the
|
|
872
|
+
* more common one.
|
|
873
873
|
*/
|
|
874
874
|
export type CatalogWarningCode = 'NUMERIC_MISMATCH' | 'UNLIMITED_ADVERTISED_AS_CAPPED' | 'UNBACKED_CAPABILITY' | 'MISSING_FEATURE_ROW';
|
|
875
875
|
/**
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** The supplied product description's maximum code points, including the trailing ellipsis. */
|
|
2
|
+
export declare const PRODUCT_DESCRIPTION_MAX = 200;
|
|
3
|
+
/** The edge and SPA's store name: keep a nonblank name verbatim, else the platform fallback. */
|
|
4
|
+
export declare const storefrontDisplayName: (name: unknown) => string;
|
|
5
|
+
/** A product's display name: a nonblank name verbatim, else its id — the head's title and the fallback description share it. */
|
|
6
|
+
export declare const storefrontProductName: (product: {
|
|
7
|
+
name?: unknown;
|
|
8
|
+
productId?: unknown;
|
|
9
|
+
}) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Raw text for a product's description meta tags. Strip tags, preserve literal
|
|
12
|
+
* entities, collapse whitespace and cut supplied text on a code-point boundary.
|
|
13
|
+
* Blank or non-string descriptions use the name (else the id) and display store
|
|
14
|
+
* name verbatim; that fallback sentence is neither stripped nor capped.
|
|
15
|
+
* HTML renderers must escape the returned text when writing an attribute.
|
|
16
|
+
*/
|
|
17
|
+
export declare const storefrontProductMetaDescription: (product: {
|
|
18
|
+
name?: unknown;
|
|
19
|
+
productId?: unknown;
|
|
20
|
+
description?: unknown;
|
|
21
|
+
}, storeName: unknown) => string;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** The supplied product description's maximum code points, including the trailing ellipsis. */
|
|
2
|
+
export const PRODUCT_DESCRIPTION_MAX = 200;
|
|
3
|
+
/** The edge and SPA's store name: keep a nonblank name verbatim, else the platform fallback. */
|
|
4
|
+
export const storefrontDisplayName = (name) => typeof name === 'string' && name.trim() !== '' ? name : 'Tienda online';
|
|
5
|
+
/** A product's display name: a nonblank name verbatim, else its id — the head's title and the fallback description share it. */
|
|
6
|
+
export const storefrontProductName = (product) => typeof product.name === 'string' && product.name.trim() ? product.name : String(product.productId);
|
|
7
|
+
/** Every `<…>` tag as a space, in one linear pass (a tag regex backtracks on an unclosed `<`). */
|
|
8
|
+
const withoutTags = (text) => {
|
|
9
|
+
let out = '';
|
|
10
|
+
let inTag = false;
|
|
11
|
+
for (const char of text) {
|
|
12
|
+
if (char === '<')
|
|
13
|
+
inTag = true;
|
|
14
|
+
if (!inTag)
|
|
15
|
+
out += char;
|
|
16
|
+
if (char === '>' && inTag) {
|
|
17
|
+
inTag = false;
|
|
18
|
+
out += ' ';
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return out;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Raw text for a product's description meta tags. Strip tags, preserve literal
|
|
25
|
+
* entities, collapse whitespace and cut supplied text on a code-point boundary.
|
|
26
|
+
* Blank or non-string descriptions use the name (else the id) and display store
|
|
27
|
+
* name verbatim; that fallback sentence is neither stripped nor capped.
|
|
28
|
+
* HTML renderers must escape the returned text when writing an attribute.
|
|
29
|
+
*/
|
|
30
|
+
export const storefrontProductMetaDescription = (product, storeName) => {
|
|
31
|
+
const text = typeof product.description === 'string' ? withoutTags(product.description).replaceAll(/\s+/g, ' ').trim() : '';
|
|
32
|
+
if (!text)
|
|
33
|
+
return `${storefrontProductName(product)} en ${storefrontDisplayName(storeName)}.`;
|
|
34
|
+
const chars = [...text];
|
|
35
|
+
return chars.length <= PRODUCT_DESCRIPTION_MAX ? text : `${chars.slice(0, PRODUCT_DESCRIPTION_MAX - 1).join('')}…`;
|
|
36
|
+
};
|
|
@@ -100,6 +100,7 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
100
100
|
'AUTH_LOGIN_ERROR_WRONG_CREDENTIALS',
|
|
101
101
|
'AUTH_LOGIN_FORGOT_LINK',
|
|
102
102
|
'AUTH_LOGIN_META_DESCRIPTION',
|
|
103
|
+
'AUTH_LOGIN_PAGE_TITLE',
|
|
103
104
|
'AUTH_LOGIN_PASSWORD',
|
|
104
105
|
'AUTH_LOGIN_PASSWORD_MIN',
|
|
105
106
|
'AUTH_LOGIN_PASSWORD_REQUIRED',
|
|
@@ -302,6 +303,7 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
302
303
|
'BASKET_TITLE',
|
|
303
304
|
'BASKET_TOTAL',
|
|
304
305
|
'BRANDS_TITLE',
|
|
306
|
+
'CHECKOUT_ACCOUNT_DISABLED',
|
|
305
307
|
'CHECKOUT_BACK_BUTTON',
|
|
306
308
|
'CHECKOUT_COL_PRODUCT',
|
|
307
309
|
'CHECKOUT_COL_QUANTITY',
|
|
@@ -338,6 +340,7 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
338
340
|
'CHECKOUT_DELIVERY_DETAILS_TITLE',
|
|
339
341
|
'CHECKOUT_DELIVERY_FULLNAME_LABEL',
|
|
340
342
|
'CHECKOUT_DELIVERY_METHOD_LABEL',
|
|
343
|
+
'CHECKOUT_DELIVERY_METHOD_UNAVAILABLE',
|
|
341
344
|
'CHECKOUT_DELIVERY_NO_DATA',
|
|
342
345
|
'CHECKOUT_DELIVERY_PHONE_LABEL',
|
|
343
346
|
'CHECKOUT_DELIVERY_POSTAL_CODE_LABEL',
|
|
@@ -355,18 +358,23 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
355
358
|
'CHECKOUT_DNI_REQUIRED_DIALOG',
|
|
356
359
|
'CHECKOUT_DNI_REQUIRED_MESSAGE',
|
|
357
360
|
'CHECKOUT_DNI_REQUIRED_MESSAGE_NO_THRESHOLD',
|
|
361
|
+
'CHECKOUT_EMAIL_VERIFICATION_REQUIRED',
|
|
358
362
|
'CHECKOUT_EMPTY_BASKET',
|
|
359
363
|
'CHECKOUT_FX_NOTICE_PAYING',
|
|
360
364
|
'CHECKOUT_FX_NOTICE_PREFERRED',
|
|
361
365
|
'CHECKOUT_FX_NOTICE_STORE_HINT',
|
|
362
366
|
'CHECKOUT_INITIAL_NO_INVOICE',
|
|
367
|
+
'CHECKOUT_INVALID_CART',
|
|
363
368
|
'CHECKOUT_INVOICING_LABEL',
|
|
364
369
|
'CHECKOUT_MIN_BUY_ALERT',
|
|
365
370
|
'CHECKOUT_MIN_BUY_ERROR',
|
|
371
|
+
'CHECKOUT_MIN_BUY_REFUSED',
|
|
366
372
|
'CHECKOUT_NO_INVOICE',
|
|
367
373
|
'CHECKOUT_ORDER_CREATED',
|
|
368
374
|
'CHECKOUT_ORDER_CREATION_ERROR',
|
|
375
|
+
'CHECKOUT_PAYMENT_METHODS_NOT_CONFIGURED',
|
|
369
376
|
'CHECKOUT_PAYMENT_METHOD_LABEL',
|
|
377
|
+
'CHECKOUT_PAYMENT_METHOD_UNAVAILABLE',
|
|
370
378
|
'CHECKOUT_PRICES_CHANGED',
|
|
371
379
|
'CHECKOUT_PROMOTION_APPLIED',
|
|
372
380
|
'CHECKOUT_PROMOTION_APPLY',
|
|
@@ -609,9 +617,6 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
609
617
|
'HOME_QUICK_ADD',
|
|
610
618
|
'HOME_SUBTITLE',
|
|
611
619
|
'HOME_TITLE',
|
|
612
|
-
'HOME_WHATSAPP_CTA',
|
|
613
|
-
'HOME_WHATSAPP_LOGIN_REQUIRED',
|
|
614
|
-
'HOME_WHATSAPP_PHONE',
|
|
615
620
|
'HOME_WHATSAPP_TITLE',
|
|
616
621
|
'IMAGE_CROP_WARNING',
|
|
617
622
|
'INCOMES_DATE_FROM',
|
|
@@ -854,6 +859,21 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
854
859
|
'PAYMENT_METHOD_SANTANDER_CBU',
|
|
855
860
|
'PAYMENT_METHOD_SANTANDER_NAME',
|
|
856
861
|
'PAYMENT_METHOD_SANTANDER_TYPE',
|
|
862
|
+
'PREVIEW_BACK',
|
|
863
|
+
'PREVIEW_DISABLED',
|
|
864
|
+
'PREVIEW_EXPIRED',
|
|
865
|
+
'PREVIEW_FAILED',
|
|
866
|
+
'PREVIEW_HOME',
|
|
867
|
+
'PREVIEW_LOADING',
|
|
868
|
+
'PREVIEW_READ_FAILED',
|
|
869
|
+
'PREVIEW_READ_ONLY',
|
|
870
|
+
'PREVIEW_RESTART',
|
|
871
|
+
'PREVIEW_RETRY',
|
|
872
|
+
'PREVIEW_TITLE',
|
|
873
|
+
'PREVIEW_UNAVAILABLE',
|
|
874
|
+
'PREVIEW_UNAVAILABLE_ACTION',
|
|
875
|
+
'PREVIEW_VARIANTS',
|
|
876
|
+
'PREVIEW_WAITING',
|
|
857
877
|
'PRICING_TIER_CHIP',
|
|
858
878
|
'PRICING_TIER_FROM',
|
|
859
879
|
'PRICING_TIER_UNITS',
|
|
@@ -1090,6 +1110,32 @@ export const STOREFRONT_WEB_LITERAL_KEYS = Object.freeze([
|
|
|
1090
1110
|
'SETTINGS_SUCCESS_MESSAGE',
|
|
1091
1111
|
'SETTINGS_THEME_DARK',
|
|
1092
1112
|
'SETTINGS_TITLE',
|
|
1113
|
+
'STOREFRONT_CATALOGUE',
|
|
1114
|
+
'STOREFRONT_CONTACT_ADDRESS',
|
|
1115
|
+
'STOREFRONT_CONTACT_EMAIL',
|
|
1116
|
+
'STOREFRONT_CONTACT_HOURS',
|
|
1117
|
+
'STOREFRONT_CONTACT_PHONE',
|
|
1118
|
+
'STOREFRONT_CONTACT_SOCIALS',
|
|
1119
|
+
'STOREFRONT_CONTACT_WHATSAPP',
|
|
1120
|
+
'STOREFRONT_DAY_FRIDAY',
|
|
1121
|
+
'STOREFRONT_DAY_MONDAY',
|
|
1122
|
+
'STOREFRONT_DAY_SATURDAY',
|
|
1123
|
+
'STOREFRONT_DAY_SUNDAY',
|
|
1124
|
+
'STOREFRONT_DAY_THURSDAY',
|
|
1125
|
+
'STOREFRONT_DAY_TUESDAY',
|
|
1126
|
+
'STOREFRONT_DAY_WEDNESDAY',
|
|
1127
|
+
'STOREFRONT_FOOTER_NAV_ARIA',
|
|
1128
|
+
'STOREFRONT_MERCHANT_NAV_ARIA',
|
|
1129
|
+
'STOREFRONT_NAV_GROUP_FALLBACK',
|
|
1130
|
+
'STOREFRONT_PLATFORM_NAV_ARIA',
|
|
1131
|
+
'STOREFRONT_SEARCH',
|
|
1132
|
+
'STOREFRONT_SOCIAL_FACEBOOK',
|
|
1133
|
+
'STOREFRONT_SOCIAL_INSTAGRAM',
|
|
1134
|
+
'STOREFRONT_SOCIAL_LINKEDIN',
|
|
1135
|
+
'STOREFRONT_SOCIAL_TIKTOK',
|
|
1136
|
+
'STOREFRONT_SOCIAL_X',
|
|
1137
|
+
'STOREFRONT_SOCIAL_YOUTUBE',
|
|
1138
|
+
'STOREFRONT_TAXONOMY_FAILED',
|
|
1093
1139
|
'STORE_NAME_FALLBACK',
|
|
1094
1140
|
'SURVEY_COMMENT_PLACEHOLDER',
|
|
1095
1141
|
'SURVEY_RATING_BAD',
|
|
@@ -1113,14 +1159,14 @@ export const isStorefrontLiteralKey = (key) => STOREFRONT_WEB_LITERAL_KEY_SET.ha
|
|
|
1113
1159
|
const STOREFRONT_NAVIGATE_LITERAL_PREFIX = 'NAVIGATE_';
|
|
1114
1160
|
/**
|
|
1115
1161
|
* A same-origin path: a leading `/`, a second character that is neither `/` nor `\`
|
|
1116
|
-
* (`//host` and `/\host` are protocol-relative to a browser), and no whitespace
|
|
1117
|
-
* backslash
|
|
1118
|
-
*
|
|
1119
|
-
*
|
|
1120
|
-
*
|
|
1121
|
-
*
|
|
1162
|
+
* (`//host` and `/\host` are protocol-relative to a browser), and no whitespace,
|
|
1163
|
+
* backslash, control character (`\p{Cc}`) or invisible format character (`\p{Cf}`: every
|
|
1164
|
+
* bidi mark including U+061C, zero-width characters, the soft hyphen, tag characters)
|
|
1165
|
+
* anywhere. Browsers strip tab and newline before parsing, so `/\t/host` becomes `//host`;
|
|
1166
|
+
* invisible and directional characters can also disguise the link target. A scheme
|
|
1167
|
+
* cannot start with `/`.
|
|
1122
1168
|
*/
|
|
1123
|
-
const STOREFRONT_SAME_ORIGIN_PATH_RE = /^\/(?![/\\])[^\s
|
|
1169
|
+
const STOREFRONT_SAME_ORIGIN_PATH_RE = /^\/(?![/\\])[^\s\\\p{Cc}\p{Cf}]*$/u;
|
|
1124
1170
|
/**
|
|
1125
1171
|
* Whether `value` may be stored, published or served for `key`. A `NAVIGATE_*` key is
|
|
1126
1172
|
* rendered as a link, so it must be a same-origin path — otherwise an override could
|