@useinsider/guido 3.1.0 → 3.1.1-beta.0220fb9
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/@types/config/schemas.js +66 -56
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +7 -7
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +12 -20
- package/dist/composables/useHtmlCompiler.js +20 -20
- package/dist/composables/useHtmlValidator.js +40 -38
- package/dist/composables/usePreviewMode.js +20 -16
- package/dist/composables/useSave.js +15 -13
- package/dist/composables/useToaster.js +12 -10
- package/dist/config/compiler/unsubscribeCompilerRules.js +37 -37
- package/dist/config/i18n/en/tooltips.json.js +2 -1
- package/dist/config/migrator/checkboxMigrator.js +5 -3
- package/dist/config/migrator/radioButtonMigrator.js +14 -12
- package/dist/extensions/Blocks/Recommendation/block.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +27 -11
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +185 -172
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +95 -93
- package/dist/extensions/Blocks/Recommendation/controls/spacing/index.js +75 -73
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +7 -5
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +30 -29
- package/dist/extensions/Blocks/Recommendation/templates/index.js +7 -7
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +3 -1
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +20 -20
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +57 -50
- package/dist/extensions/Blocks/Recommendation/utils/tagName.js +6 -6
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +16 -17
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +324 -218
- package/dist/package.json.js +1 -1
- package/dist/src/@types/config/index.d.ts +1 -1
- package/dist/src/@types/config/schemas.d.ts +24 -0
- package/dist/src/@types/config/types.d.ts +3 -1
- package/dist/src/composables/useConfig.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +20 -3
- package/dist/src/stores/config.d.ts +90 -0
- package/dist/src/stores/preview.d.ts +3 -0
- package/dist/src/utils/htmlCompiler.d.ts +2 -1
- package/dist/stores/preview.js +4 -3
- package/dist/stores/toaster.js +7 -7
- package/dist/utils/htmlCompiler.js +48 -41
- package/dist/utils/templatePreparation.js +26 -24
- package/package.json +3 -3
package/dist/package.json.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Validation utilities
|
|
9
9
|
*/
|
|
10
10
|
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
|
|
11
|
-
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, CallbacksConfig, CallbacksConfigInput, ExternalValidationHandler, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
11
|
+
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, FallbackFont, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, CallbacksConfig, CallbacksConfigInput, ExternalValidationHandler, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
12
12
|
export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_EDITOR, DEFAULT_UI, DEFAULT_FEATURES, DEFAULT_BLOCKS, DEFAULT_COMPILER, DEFAULT_PRODUCT_TYPE, DEFAULT_MESSAGE_TYPE, DEFAULT_USERNAME, EDITOR_TYPE, TEST_PARTNERS, isTestPartner, } from './defaults';
|
|
13
13
|
export { validateConfig, parseConfig, parseConfigSafe, getValidationErrors, isValidConfig, validateIdentity, validatePartner, } from './validator';
|
|
14
14
|
export type { ValidationResult, ValidationError, } from './validator';
|
|
@@ -47,6 +47,12 @@ export declare const IdentitySchema: v.ObjectSchema<{
|
|
|
47
47
|
/**
|
|
48
48
|
* Partner configuration - organization and product context
|
|
49
49
|
*/
|
|
50
|
+
export declare const FallbackFontSchema: v.ObjectSchema<{
|
|
51
|
+
/** Fallback font name (e.g., "Georgia") */
|
|
52
|
+
readonly name: v.StringSchema<undefined>;
|
|
53
|
+
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
54
|
+
readonly family: v.StringSchema<undefined>;
|
|
55
|
+
}, undefined>;
|
|
50
56
|
export declare const PartnerSchema: v.ObjectSchema<{
|
|
51
57
|
/** Partner/organization name (required) */
|
|
52
58
|
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, "partner.name is required">]>;
|
|
@@ -56,6 +62,13 @@ export declare const PartnerSchema: v.ObjectSchema<{
|
|
|
56
62
|
readonly messageType: v.OptionalSchema<v.PicklistSchema<[1, 2], undefined>, 1>;
|
|
57
63
|
/** Display name for the current user */
|
|
58
64
|
readonly username: v.OptionalSchema<v.StringSchema<undefined>, "Guido User">;
|
|
65
|
+
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
66
|
+
readonly fallbackFont: v.OptionalSchema<v.ObjectSchema<{
|
|
67
|
+
/** Fallback font name (e.g., "Georgia") */
|
|
68
|
+
readonly name: v.StringSchema<undefined>;
|
|
69
|
+
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
70
|
+
readonly family: v.StringSchema<undefined>;
|
|
71
|
+
}, undefined>, undefined>;
|
|
59
72
|
}, undefined>;
|
|
60
73
|
/**
|
|
61
74
|
* Dynamic content item schema
|
|
@@ -95,6 +108,8 @@ export declare const TemplateSchema: v.ObjectSchema<{
|
|
|
95
108
|
readonly value: v.StringSchema<undefined>;
|
|
96
109
|
}, undefined>, undefined>;
|
|
97
110
|
}, undefined>, undefined>, readonly []>;
|
|
111
|
+
/** Valid custom field attribute names from the partner's categorized fields */
|
|
112
|
+
readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
|
|
98
113
|
/** Selected unsubscribe page IDs */
|
|
99
114
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
100
115
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
@@ -401,6 +416,13 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
401
416
|
readonly messageType: v.OptionalSchema<v.PicklistSchema<[1, 2], undefined>, 1>;
|
|
402
417
|
/** Display name for the current user */
|
|
403
418
|
readonly username: v.OptionalSchema<v.StringSchema<undefined>, "Guido User">;
|
|
419
|
+
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
420
|
+
readonly fallbackFont: v.OptionalSchema<v.ObjectSchema<{
|
|
421
|
+
/** Fallback font name (e.g., "Georgia") */
|
|
422
|
+
readonly name: v.StringSchema<undefined>;
|
|
423
|
+
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
424
|
+
readonly family: v.StringSchema<undefined>;
|
|
425
|
+
}, undefined>, undefined>;
|
|
404
426
|
}, undefined>;
|
|
405
427
|
/** Template content and presets */
|
|
406
428
|
readonly template: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -422,6 +444,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
422
444
|
readonly value: v.StringSchema<undefined>;
|
|
423
445
|
}, undefined>, undefined>;
|
|
424
446
|
}, undefined>, undefined>, readonly []>;
|
|
447
|
+
/** Valid custom field attribute names from the partner's categorized fields */
|
|
448
|
+
readonly customFieldAttributes: v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, readonly []>;
|
|
425
449
|
/** Selected unsubscribe page IDs */
|
|
426
450
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
427
451
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* This ensures type definitions are always in sync with validation.
|
|
6
6
|
* @module @types/config/types
|
|
7
7
|
*/
|
|
8
|
-
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, ExternalValidationHandler } from './schemas';
|
|
8
|
+
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, FallbackFontSchema, ExternalValidationHandler } from './schemas';
|
|
9
9
|
import type * as v from 'valibot';
|
|
10
10
|
/**
|
|
11
11
|
* Complete validated Guido configuration.
|
|
@@ -29,6 +29,8 @@ export type GuidoConfig = v.InferOutput<typeof GuidoConfigSchema>;
|
|
|
29
29
|
export type IdentityConfig = v.InferOutput<typeof IdentitySchema>;
|
|
30
30
|
/** Partner configuration (name, productType, messageType, username) */
|
|
31
31
|
export type PartnerConfig = v.InferOutput<typeof PartnerSchema>;
|
|
32
|
+
/** Fallback font settings for backend size calculation alignment */
|
|
33
|
+
export type FallbackFont = v.InferOutput<typeof FallbackFontSchema>;
|
|
32
34
|
/** Template configuration (html, css, dynamic content, unsubscribe pages) */
|
|
33
35
|
export type TemplateConfig = v.InferOutput<typeof TemplateSchema>;
|
|
34
36
|
/** Editor configuration (locale, translations, migration date, email header) */
|
|
@@ -17,6 +17,10 @@ export declare const useConfig: () => {
|
|
|
17
17
|
productType: 60 | 49 | 97;
|
|
18
18
|
messageType: 1 | 2;
|
|
19
19
|
username: string;
|
|
20
|
+
fallbackFont?: {
|
|
21
|
+
name: string;
|
|
22
|
+
family: string;
|
|
23
|
+
} | undefined;
|
|
20
24
|
};
|
|
21
25
|
template: {
|
|
22
26
|
html: string;
|
|
@@ -30,6 +34,7 @@ export declare const useConfig: () => {
|
|
|
30
34
|
value: string;
|
|
31
35
|
} | undefined;
|
|
32
36
|
}[];
|
|
37
|
+
customFieldAttributes: string[];
|
|
33
38
|
selectedUnsubscribePages: number[];
|
|
34
39
|
forceRecreate: boolean;
|
|
35
40
|
};
|
|
@@ -108,6 +113,10 @@ export declare const useConfig: () => {
|
|
|
108
113
|
productType: 60 | 49 | 97;
|
|
109
114
|
messageType: 1 | 2;
|
|
110
115
|
username: string;
|
|
116
|
+
fallbackFont?: {
|
|
117
|
+
name: string;
|
|
118
|
+
family: string;
|
|
119
|
+
} | undefined;
|
|
111
120
|
} | null>;
|
|
112
121
|
template: import("vue").ComputedRef<{
|
|
113
122
|
html: string;
|
|
@@ -121,6 +130,7 @@ export declare const useConfig: () => {
|
|
|
121
130
|
value: string;
|
|
122
131
|
} | undefined;
|
|
123
132
|
}[];
|
|
133
|
+
customFieldAttributes: string[];
|
|
124
134
|
selectedUnsubscribePages: number[];
|
|
125
135
|
forceRecreate: boolean;
|
|
126
136
|
} | null>;
|
|
@@ -8,6 +8,6 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export { RecommendationBlockId } from './blockIds';
|
|
10
10
|
export { RecommendationControlId } from './controlIds';
|
|
11
|
-
export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_CUSTOM_PREFIX, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, } from './selectors';
|
|
11
|
+
export { BLOCK_ROOT_SELECTOR, CONTAINER_SELECTOR, DESKTOP_CONTAINER_SELECTOR, MOBILE_CONTAINER_SELECTOR, MOBILE_ROW_SELECTOR, CURRENCY_ATTR, ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON, ATTR_CUSTOM_PREFIX, ATTR_DATA_CUSTOM_ATTRIBUTES, ATTR_PRODUCT_ATTR, BUILT_IN_DEFAULT_ATTRIBUTES, } from './selectors';
|
|
12
12
|
export { LAYOUT_VALUES, LAYOUT_OPTIONS, DEFAULT_PRODUCTS_PER_ROW, DEFAULT_CARDS_IN_ROW, DEFAULT_MOBILE_CARDS_IN_ROW, MAX_PRODUCT_COUNT, MIN_PRODUCT_COUNT, MAX_PRODUCTS_PER_ROW, MIN_PRODUCTS_PER_ROW, MAX_MOBILE_PRODUCTS_PER_ROW, MIN_MOBILE_PRODUCTS_PER_ROW, DEFAULT_COLUMN_SPACING, DEFAULT_ROW_SPACING, DEFAULT_MOBILE_COLUMN_SPACING, DEFAULT_MOBILE_ROW_SPACING, MIN_SPACING, MAX_SPACING, SPACING_STEP, } from './layout';
|
|
13
13
|
export { DEFAULT_NODE_CONFIG, DEFAULT_CURRENCY, DEFAULT_COMPOSITION, DEFAULT_VISIBILITY, CURRENT_CONFIG_VERSION, EXCLUDED_ALGORITHM_IDS, } from './defaultConfig';
|
|
@@ -50,3 +50,8 @@ export declare const ATTR_CUSTOM_PREFIX = "customAttr:";
|
|
|
50
50
|
export declare const ATTR_DATA_CUSTOM_ATTRIBUTES = "data-custom-attributes";
|
|
51
51
|
/** HTML attribute on <td> elements identifying the product attribute for compiler template variable generation */
|
|
52
52
|
export declare const ATTR_PRODUCT_ATTR = "product-attr";
|
|
53
|
+
/**
|
|
54
|
+
* Default attribute names that are already represented by built-in composition toggle items.
|
|
55
|
+
* Used to exclude these from the custom attribute dropdown to prevent duplication with toggles.
|
|
56
|
+
*/
|
|
57
|
+
export declare const BUILT_IN_DEFAULT_ATTRIBUTES: Set<string>;
|
|
@@ -170,6 +170,11 @@ export declare class RecommendationCardCompositionControl extends CommonControl
|
|
|
170
170
|
* When filterList changes (e.g. after async fetch), re-renders dropdowns with new options.
|
|
171
171
|
*/
|
|
172
172
|
private _subscribeToStoreChanges;
|
|
173
|
+
/**
|
|
174
|
+
* Returns filters eligible for the custom attribute dropdown,
|
|
175
|
+
* excluding default attributes already covered by built-in toggle items.
|
|
176
|
+
*/
|
|
177
|
+
private _getAddableFilters;
|
|
173
178
|
/**
|
|
174
179
|
* Looks up the display name for an attribute from the store's filterList.
|
|
175
180
|
* Falls back to Title Case conversion of the snake_case attribute name.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
1
|
+
import type { FiltersResponse, RecommendationProduct } from '@@/Types/recommendation';
|
|
2
2
|
import { type ElementRenderer } from '../utils';
|
|
3
3
|
/**
|
|
4
4
|
* Generates attribute-aligned product rows for grid layout.
|
|
@@ -9,7 +9,7 @@ import { type ElementRenderer } from '../utils';
|
|
|
9
9
|
* @param composition - Array defining order of card elements
|
|
10
10
|
* @returns HTML string for attribute-aligned rows
|
|
11
11
|
*/
|
|
12
|
-
export declare function prepareGridAttributeRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[]): string;
|
|
12
|
+
export declare function prepareGridAttributeRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[], filterList?: FiltersResponse): string;
|
|
13
13
|
/**
|
|
14
14
|
* Prepares grid product rows with attribute-aligned structure
|
|
15
15
|
* Groups products into rows, then generates attribute-aligned HTML for each group
|
|
@@ -19,7 +19,7 @@ export declare function prepareGridAttributeRows(products: RecommendationProduct
|
|
|
19
19
|
* @param composition - Array defining order of card elements
|
|
20
20
|
* @returns HTML string for all product rows
|
|
21
21
|
*/
|
|
22
|
-
export declare function prepareGridProductRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[]): string;
|
|
22
|
+
export declare function prepareGridProductRows(products: RecommendationProduct[], productsPerRow: number, elementRenderer: ElementRenderer, composition?: string[], filterList?: FiltersResponse): string;
|
|
23
23
|
/**
|
|
24
24
|
* Prepares grid product rows with attribute-aligned structure.
|
|
25
25
|
* Uses row-based rendering where each attribute type forms a single row across all products.
|
|
@@ -28,6 +28,6 @@ export declare function prepareGridProductRows(products: RecommendationProduct[]
|
|
|
28
28
|
* @param composition - Array defining element order
|
|
29
29
|
* @returns HTML string for product rows
|
|
30
30
|
*/
|
|
31
|
-
export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[]): string;
|
|
31
|
+
export declare function prepareProductRows(products: RecommendationProduct[], productsPerRow: number, composition?: string[], filterList?: FiltersResponse): string;
|
|
32
32
|
export declare function getDefaultTemplate(recommendationId?: number): string;
|
|
33
33
|
export declare function generateBlockTemplate(products: RecommendationProduct[], productsPerRow: number, title?: string, composition?: string[], mobileProductsPerRow?: number): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
1
|
+
import type { FiltersResponse, RecommendationProduct } from '@@/Types/recommendation';
|
|
2
2
|
/**
|
|
3
3
|
* Generates a list product card with 3-column layout
|
|
4
4
|
* Uses buildElementRenderer to render Image, Info content, and Button
|
|
@@ -11,7 +11,7 @@ import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
|
11
11
|
* @param composition - Array defining order of card elements
|
|
12
12
|
* @returns HTML string for a single product card row
|
|
13
13
|
*/
|
|
14
|
-
export declare function getListProductCard(product: RecommendationProduct, composition?: string[]): string;
|
|
14
|
+
export declare function getListProductCard(product: RecommendationProduct, composition?: string[], filterList?: FiltersResponse): string;
|
|
15
15
|
/**
|
|
16
16
|
* Prepares list product rows
|
|
17
17
|
* Each product is a full-width row with 3-column layout
|
|
@@ -19,6 +19,6 @@ export declare function getListProductCard(product: RecommendationProduct, compo
|
|
|
19
19
|
* @param composition - Array defining order of card elements
|
|
20
20
|
* @returns HTML string for product rows
|
|
21
21
|
*/
|
|
22
|
-
export declare function prepareProductRows(products: RecommendationProduct[], composition?: string[]): string;
|
|
22
|
+
export declare function prepareProductRows(products: RecommendationProduct[], composition?: string[], filterList?: FiltersResponse): string;
|
|
23
23
|
export declare function getDefaultTemplate(): string;
|
|
24
24
|
export declare function generateBlockTemplate(products: RecommendationProduct[], title?: string, composition?: string[]): string;
|
|
@@ -1,15 +1,29 @@
|
|
|
1
|
-
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
1
|
+
import type { FiltersResponse, RecommendationProduct } from '@@/Types/recommendation';
|
|
2
2
|
import { ATTR_PRODUCT_IMAGE, ATTR_PRODUCT_NAME, ATTR_PRODUCT_PRICE, ATTR_PRODUCT_OLD_PRICE, ATTR_PRODUCT_OMNIBUS_PRICE, ATTR_PRODUCT_OMNIBUS_DISCOUNT, ATTR_PRODUCT_BUTTON } from '../constants';
|
|
3
3
|
/**
|
|
4
4
|
* Converts a snake_case attribute name to Title Case display name.
|
|
5
5
|
* e.g., "rating_star" → "Rating Star"
|
|
6
6
|
*/
|
|
7
7
|
export declare function toDisplayName(attrName: string): string;
|
|
8
|
+
/**
|
|
9
|
+
* Checks whether an attribute is a default (top-level) product attribute
|
|
10
|
+
* vs a custom product attribute (nested under `product_attributes`).
|
|
11
|
+
* Returns false when filterList is empty or the attribute is not found.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isDefaultAttribute(attrName: string, filterList: FiltersResponse): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Resolves the `product-attr` HTML attribute value based on attribute type from the filter list.
|
|
16
|
+
* - Default attributes → attribute name directly (e.g., "brand") → compiles to `{{1_0_brand}}`
|
|
17
|
+
* - Product attributes → "product_attribute.<name>" (e.g., "product_attribute.rating_star")
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveProductAttrValue(attrName: string, filterList: FiltersResponse): string;
|
|
8
20
|
/**
|
|
9
21
|
* Callback that generates the cell HTML for a custom product attribute.
|
|
10
22
|
* Layout-specific: grid returns `<td>…`, list returns `<tr><td>…</td></tr>`.
|
|
23
|
+
* @param productAttrValue - The resolved `product-attr` value (e.g., "brand" or "product_attribute.rating_star")
|
|
24
|
+
* @param content - The display content for the cell
|
|
11
25
|
*/
|
|
12
|
-
export type CustomCellHtmlGetter = (
|
|
26
|
+
export type CustomCellHtmlGetter = (productAttrValue: string, content: string) => string;
|
|
13
27
|
/**
|
|
14
28
|
* Symbol key for embedding custom attribute HTML in an ElementRenderer.
|
|
15
29
|
* Grid and list renderers store their custom-attribute cell template under this key
|
|
@@ -28,8 +42,9 @@ export declare const CUSTOM_CELL_HTML: unique symbol;
|
|
|
28
42
|
* alongside built-in ones, so template code can use a uniform lookup for all attributes.
|
|
29
43
|
* @param baseRenderer - The built-in element renderer (grid or list), must include a [CUSTOM_CELL_HTML] entry
|
|
30
44
|
* @param composition - Array of attribute keys including `customAttr:*` entries
|
|
45
|
+
* @param filterList - Filter list from the store, used to determine attribute type for correct product-attr resolution
|
|
31
46
|
*/
|
|
32
|
-
export declare function buildElementRenderer(baseRenderer: ElementRenderer, composition: string[]): ElementRenderer;
|
|
47
|
+
export declare function buildElementRenderer(baseRenderer: ElementRenderer, composition: string[], filterList?: FiltersResponse): ElementRenderer;
|
|
33
48
|
export type Orientation = 'list' | 'grid';
|
|
34
49
|
/**
|
|
35
50
|
* Options for prepareProductRows unified function
|
|
@@ -41,6 +56,8 @@ export interface PrepareProductRowsOptions {
|
|
|
41
56
|
mobileProductsPerRow?: number;
|
|
42
57
|
/** Array defining order of card elements */
|
|
43
58
|
composition?: string[];
|
|
59
|
+
/** Filter list for attribute type resolution (default vs product attributes) */
|
|
60
|
+
filterList?: FiltersResponse;
|
|
44
61
|
}
|
|
45
62
|
/**
|
|
46
63
|
* Element renderer interface for product card elements.
|
|
@@ -22,6 +22,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
22
22
|
productType: 60 | 49 | 97;
|
|
23
23
|
messageType: 1 | 2;
|
|
24
24
|
username: string;
|
|
25
|
+
fallbackFont?: {
|
|
26
|
+
name: string;
|
|
27
|
+
family: string;
|
|
28
|
+
} | undefined;
|
|
25
29
|
};
|
|
26
30
|
template: {
|
|
27
31
|
html: string;
|
|
@@ -35,6 +39,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
35
39
|
value: string;
|
|
36
40
|
} | undefined;
|
|
37
41
|
}[];
|
|
42
|
+
customFieldAttributes: string[];
|
|
38
43
|
selectedUnsubscribePages: number[];
|
|
39
44
|
forceRecreate: boolean;
|
|
40
45
|
};
|
|
@@ -119,6 +124,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
119
124
|
productType: 60 | 49 | 97;
|
|
120
125
|
messageType: 1 | 2;
|
|
121
126
|
username: string;
|
|
127
|
+
fallbackFont?: {
|
|
128
|
+
name: string;
|
|
129
|
+
family: string;
|
|
130
|
+
} | undefined;
|
|
122
131
|
};
|
|
123
132
|
template: {
|
|
124
133
|
html: string;
|
|
@@ -132,6 +141,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
132
141
|
value: string;
|
|
133
142
|
} | undefined;
|
|
134
143
|
}[];
|
|
144
|
+
customFieldAttributes: string[];
|
|
135
145
|
selectedUnsubscribePages: number[];
|
|
136
146
|
forceRecreate: boolean;
|
|
137
147
|
};
|
|
@@ -216,6 +226,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
216
226
|
productType: 60 | 49 | 97;
|
|
217
227
|
messageType: 1 | 2;
|
|
218
228
|
username: string;
|
|
229
|
+
fallbackFont?: {
|
|
230
|
+
name: string;
|
|
231
|
+
family: string;
|
|
232
|
+
} | undefined;
|
|
219
233
|
};
|
|
220
234
|
template: {
|
|
221
235
|
html: string;
|
|
@@ -229,6 +243,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
229
243
|
value: string;
|
|
230
244
|
} | undefined;
|
|
231
245
|
}[];
|
|
246
|
+
customFieldAttributes: string[];
|
|
232
247
|
selectedUnsubscribePages: number[];
|
|
233
248
|
forceRecreate: boolean;
|
|
234
249
|
};
|
|
@@ -313,6 +328,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
313
328
|
productType: 60 | 49 | 97;
|
|
314
329
|
messageType: 1 | 2;
|
|
315
330
|
username: string;
|
|
331
|
+
fallbackFont?: {
|
|
332
|
+
name: string;
|
|
333
|
+
family: string;
|
|
334
|
+
} | undefined;
|
|
316
335
|
};
|
|
317
336
|
template: {
|
|
318
337
|
html: string;
|
|
@@ -326,6 +345,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
326
345
|
value: string;
|
|
327
346
|
} | undefined;
|
|
328
347
|
}[];
|
|
348
|
+
customFieldAttributes: string[];
|
|
329
349
|
selectedUnsubscribePages: number[];
|
|
330
350
|
forceRecreate: boolean;
|
|
331
351
|
};
|
|
@@ -410,6 +430,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
410
430
|
productType: 60 | 49 | 97;
|
|
411
431
|
messageType: 1 | 2;
|
|
412
432
|
username: string;
|
|
433
|
+
fallbackFont?: {
|
|
434
|
+
name: string;
|
|
435
|
+
family: string;
|
|
436
|
+
} | undefined;
|
|
413
437
|
};
|
|
414
438
|
template: {
|
|
415
439
|
html: string;
|
|
@@ -423,6 +447,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
423
447
|
value: string;
|
|
424
448
|
} | undefined;
|
|
425
449
|
}[];
|
|
450
|
+
customFieldAttributes: string[];
|
|
426
451
|
selectedUnsubscribePages: number[];
|
|
427
452
|
forceRecreate: boolean;
|
|
428
453
|
};
|
|
@@ -507,6 +532,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
507
532
|
productType: 60 | 49 | 97;
|
|
508
533
|
messageType: 1 | 2;
|
|
509
534
|
username: string;
|
|
535
|
+
fallbackFont?: {
|
|
536
|
+
name: string;
|
|
537
|
+
family: string;
|
|
538
|
+
} | undefined;
|
|
510
539
|
};
|
|
511
540
|
template: {
|
|
512
541
|
html: string;
|
|
@@ -520,6 +549,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
520
549
|
value: string;
|
|
521
550
|
} | undefined;
|
|
522
551
|
}[];
|
|
552
|
+
customFieldAttributes: string[];
|
|
523
553
|
selectedUnsubscribePages: number[];
|
|
524
554
|
forceRecreate: boolean;
|
|
525
555
|
};
|
|
@@ -604,6 +634,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
604
634
|
productType: 60 | 49 | 97;
|
|
605
635
|
messageType: 1 | 2;
|
|
606
636
|
username: string;
|
|
637
|
+
fallbackFont?: {
|
|
638
|
+
name: string;
|
|
639
|
+
family: string;
|
|
640
|
+
} | undefined;
|
|
607
641
|
};
|
|
608
642
|
template: {
|
|
609
643
|
html: string;
|
|
@@ -617,6 +651,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
617
651
|
value: string;
|
|
618
652
|
} | undefined;
|
|
619
653
|
}[];
|
|
654
|
+
customFieldAttributes: string[];
|
|
620
655
|
selectedUnsubscribePages: number[];
|
|
621
656
|
forceRecreate: boolean;
|
|
622
657
|
};
|
|
@@ -701,6 +736,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
701
736
|
productType: 60 | 49 | 97;
|
|
702
737
|
messageType: 1 | 2;
|
|
703
738
|
username: string;
|
|
739
|
+
fallbackFont?: {
|
|
740
|
+
name: string;
|
|
741
|
+
family: string;
|
|
742
|
+
} | undefined;
|
|
704
743
|
};
|
|
705
744
|
template: {
|
|
706
745
|
html: string;
|
|
@@ -714,6 +753,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
714
753
|
value: string;
|
|
715
754
|
} | undefined;
|
|
716
755
|
}[];
|
|
756
|
+
customFieldAttributes: string[];
|
|
717
757
|
selectedUnsubscribePages: number[];
|
|
718
758
|
forceRecreate: boolean;
|
|
719
759
|
};
|
|
@@ -798,6 +838,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
798
838
|
productType: 60 | 49 | 97;
|
|
799
839
|
messageType: 1 | 2;
|
|
800
840
|
username: string;
|
|
841
|
+
fallbackFont?: {
|
|
842
|
+
name: string;
|
|
843
|
+
family: string;
|
|
844
|
+
} | undefined;
|
|
801
845
|
};
|
|
802
846
|
template: {
|
|
803
847
|
html: string;
|
|
@@ -811,6 +855,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
811
855
|
value: string;
|
|
812
856
|
} | undefined;
|
|
813
857
|
}[];
|
|
858
|
+
customFieldAttributes: string[];
|
|
814
859
|
selectedUnsubscribePages: number[];
|
|
815
860
|
forceRecreate: boolean;
|
|
816
861
|
};
|
|
@@ -895,6 +940,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
895
940
|
productType: 60 | 49 | 97;
|
|
896
941
|
messageType: 1 | 2;
|
|
897
942
|
username: string;
|
|
943
|
+
fallbackFont?: {
|
|
944
|
+
name: string;
|
|
945
|
+
family: string;
|
|
946
|
+
} | undefined;
|
|
898
947
|
};
|
|
899
948
|
template: {
|
|
900
949
|
html: string;
|
|
@@ -908,6 +957,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
908
957
|
value: string;
|
|
909
958
|
} | undefined;
|
|
910
959
|
}[];
|
|
960
|
+
customFieldAttributes: string[];
|
|
911
961
|
selectedUnsubscribePages: number[];
|
|
912
962
|
forceRecreate: boolean;
|
|
913
963
|
};
|
|
@@ -992,6 +1042,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
992
1042
|
productType: 60 | 49 | 97;
|
|
993
1043
|
messageType: 1 | 2;
|
|
994
1044
|
username: string;
|
|
1045
|
+
fallbackFont?: {
|
|
1046
|
+
name: string;
|
|
1047
|
+
family: string;
|
|
1048
|
+
} | undefined;
|
|
995
1049
|
};
|
|
996
1050
|
template: {
|
|
997
1051
|
html: string;
|
|
@@ -1005,6 +1059,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1005
1059
|
value: string;
|
|
1006
1060
|
} | undefined;
|
|
1007
1061
|
}[];
|
|
1062
|
+
customFieldAttributes: string[];
|
|
1008
1063
|
selectedUnsubscribePages: number[];
|
|
1009
1064
|
forceRecreate: boolean;
|
|
1010
1065
|
};
|
|
@@ -1089,6 +1144,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1089
1144
|
productType: 60 | 49 | 97;
|
|
1090
1145
|
messageType: 1 | 2;
|
|
1091
1146
|
username: string;
|
|
1147
|
+
fallbackFont?: {
|
|
1148
|
+
name: string;
|
|
1149
|
+
family: string;
|
|
1150
|
+
} | undefined;
|
|
1092
1151
|
};
|
|
1093
1152
|
template: {
|
|
1094
1153
|
html: string;
|
|
@@ -1102,6 +1161,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1102
1161
|
value: string;
|
|
1103
1162
|
} | undefined;
|
|
1104
1163
|
}[];
|
|
1164
|
+
customFieldAttributes: string[];
|
|
1105
1165
|
selectedUnsubscribePages: number[];
|
|
1106
1166
|
forceRecreate: boolean;
|
|
1107
1167
|
};
|
|
@@ -1186,6 +1246,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1186
1246
|
productType: 60 | 49 | 97;
|
|
1187
1247
|
messageType: 1 | 2;
|
|
1188
1248
|
username: string;
|
|
1249
|
+
fallbackFont?: {
|
|
1250
|
+
name: string;
|
|
1251
|
+
family: string;
|
|
1252
|
+
} | undefined;
|
|
1189
1253
|
};
|
|
1190
1254
|
template: {
|
|
1191
1255
|
html: string;
|
|
@@ -1199,6 +1263,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1199
1263
|
value: string;
|
|
1200
1264
|
} | undefined;
|
|
1201
1265
|
}[];
|
|
1266
|
+
customFieldAttributes: string[];
|
|
1202
1267
|
selectedUnsubscribePages: number[];
|
|
1203
1268
|
forceRecreate: boolean;
|
|
1204
1269
|
};
|
|
@@ -1283,6 +1348,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1283
1348
|
productType: 60 | 49 | 97;
|
|
1284
1349
|
messageType: 1 | 2;
|
|
1285
1350
|
username: string;
|
|
1351
|
+
fallbackFont?: {
|
|
1352
|
+
name: string;
|
|
1353
|
+
family: string;
|
|
1354
|
+
} | undefined;
|
|
1286
1355
|
};
|
|
1287
1356
|
template: {
|
|
1288
1357
|
html: string;
|
|
@@ -1296,6 +1365,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1296
1365
|
value: string;
|
|
1297
1366
|
} | undefined;
|
|
1298
1367
|
}[];
|
|
1368
|
+
customFieldAttributes: string[];
|
|
1299
1369
|
selectedUnsubscribePages: number[];
|
|
1300
1370
|
forceRecreate: boolean;
|
|
1301
1371
|
};
|
|
@@ -1380,6 +1450,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1380
1450
|
productType: 60 | 49 | 97;
|
|
1381
1451
|
messageType: 1 | 2;
|
|
1382
1452
|
username: string;
|
|
1453
|
+
fallbackFont?: {
|
|
1454
|
+
name: string;
|
|
1455
|
+
family: string;
|
|
1456
|
+
} | undefined;
|
|
1383
1457
|
};
|
|
1384
1458
|
template: {
|
|
1385
1459
|
html: string;
|
|
@@ -1393,6 +1467,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1393
1467
|
value: string;
|
|
1394
1468
|
} | undefined;
|
|
1395
1469
|
}[];
|
|
1470
|
+
customFieldAttributes: string[];
|
|
1396
1471
|
selectedUnsubscribePages: number[];
|
|
1397
1472
|
forceRecreate: boolean;
|
|
1398
1473
|
};
|
|
@@ -1477,6 +1552,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1477
1552
|
productType: 60 | 49 | 97;
|
|
1478
1553
|
messageType: 1 | 2;
|
|
1479
1554
|
username: string;
|
|
1555
|
+
fallbackFont?: {
|
|
1556
|
+
name: string;
|
|
1557
|
+
family: string;
|
|
1558
|
+
} | undefined;
|
|
1480
1559
|
};
|
|
1481
1560
|
template: {
|
|
1482
1561
|
html: string;
|
|
@@ -1490,6 +1569,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1490
1569
|
value: string;
|
|
1491
1570
|
} | undefined;
|
|
1492
1571
|
}[];
|
|
1572
|
+
customFieldAttributes: string[];
|
|
1493
1573
|
selectedUnsubscribePages: number[];
|
|
1494
1574
|
forceRecreate: boolean;
|
|
1495
1575
|
};
|
|
@@ -1574,6 +1654,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1574
1654
|
productType: 60 | 49 | 97;
|
|
1575
1655
|
messageType: 1 | 2;
|
|
1576
1656
|
username: string;
|
|
1657
|
+
fallbackFont?: {
|
|
1658
|
+
name: string;
|
|
1659
|
+
family: string;
|
|
1660
|
+
} | undefined;
|
|
1577
1661
|
};
|
|
1578
1662
|
template: {
|
|
1579
1663
|
html: string;
|
|
@@ -1587,6 +1671,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1587
1671
|
value: string;
|
|
1588
1672
|
} | undefined;
|
|
1589
1673
|
}[];
|
|
1674
|
+
customFieldAttributes: string[];
|
|
1590
1675
|
selectedUnsubscribePages: number[];
|
|
1591
1676
|
forceRecreate: boolean;
|
|
1592
1677
|
};
|
|
@@ -1671,6 +1756,10 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1671
1756
|
productType: 60 | 49 | 97;
|
|
1672
1757
|
messageType: 1 | 2;
|
|
1673
1758
|
username: string;
|
|
1759
|
+
fallbackFont?: {
|
|
1760
|
+
name: string;
|
|
1761
|
+
family: string;
|
|
1762
|
+
} | undefined;
|
|
1674
1763
|
};
|
|
1675
1764
|
template: {
|
|
1676
1765
|
html: string;
|
|
@@ -1684,6 +1773,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1684
1773
|
value: string;
|
|
1685
1774
|
} | undefined;
|
|
1686
1775
|
}[];
|
|
1776
|
+
customFieldAttributes: string[];
|
|
1687
1777
|
selectedUnsubscribePages: number[];
|
|
1688
1778
|
forceRecreate: boolean;
|
|
1689
1779
|
};
|
|
@@ -7,6 +7,7 @@ export declare const usePreviewStore: import("pinia").StoreDefinition<"guidoPrev
|
|
|
7
7
|
templateHtml: string;
|
|
8
8
|
isLoaded: boolean;
|
|
9
9
|
isAMPErrorModalVisible: boolean;
|
|
10
|
+
emailSizeKB: number;
|
|
10
11
|
} & import("pinia").PiniaCustomStateProperties<PreviewState>) => boolean;
|
|
11
12
|
previewHtml(): string;
|
|
12
13
|
hasAMP: (state: {
|
|
@@ -16,6 +17,7 @@ export declare const usePreviewStore: import("pinia").StoreDefinition<"guidoPrev
|
|
|
16
17
|
templateHtml: string;
|
|
17
18
|
isLoaded: boolean;
|
|
18
19
|
isAMPErrorModalVisible: boolean;
|
|
20
|
+
emailSizeKB: number;
|
|
19
21
|
} & import("pinia").PiniaCustomStateProperties<PreviewState>) => boolean;
|
|
20
22
|
hasAMPErrors: (state: {
|
|
21
23
|
emailFormat: EmailFormat;
|
|
@@ -24,6 +26,7 @@ export declare const usePreviewStore: import("pinia").StoreDefinition<"guidoPrev
|
|
|
24
26
|
templateHtml: string;
|
|
25
27
|
isLoaded: boolean;
|
|
26
28
|
isAMPErrorModalVisible: boolean;
|
|
29
|
+
emailSizeKB: number;
|
|
27
30
|
} & import("pinia").PiniaCustomStateProperties<PreviewState>) => boolean;
|
|
28
31
|
showAMPErrorButton(): boolean;
|
|
29
32
|
isAMPResponsive(): boolean;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { FallbackFont } from '@@/Types/config';
|
|
1
2
|
import type { CompilerRule, CompilationResult, HtmlCompiler } from '@@/Types/html-compiler';
|
|
2
3
|
export declare class HtmlCompilerEngine implements HtmlCompiler {
|
|
3
4
|
private rules;
|
|
4
5
|
constructor(rules?: CompilerRule[]);
|
|
5
|
-
compile(html: string, rules?: CompilerRule[]): CompilationResult;
|
|
6
|
+
compile(html: string, rules?: CompilerRule[], fallbackFont?: FallbackFont): CompilationResult;
|
|
6
7
|
private applyRule;
|
|
7
8
|
private applyReplaceRule;
|
|
8
9
|
private applyRegexRule;
|
package/dist/stores/preview.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { defineStore as e } from "pinia";
|
|
2
|
-
const
|
|
2
|
+
const i = () => ({
|
|
3
3
|
emailFormat: "html",
|
|
4
4
|
ampHtml: "",
|
|
5
5
|
ampErrors: [],
|
|
6
6
|
templateHtml: "",
|
|
7
7
|
isLoaded: !1,
|
|
8
|
-
isAMPErrorModalVisible: !1
|
|
8
|
+
isAMPErrorModalVisible: !1,
|
|
9
|
+
emailSizeKB: 0
|
|
9
10
|
}), a = e("guidoPreview", {
|
|
10
|
-
state: () =>
|
|
11
|
+
state: () => i(),
|
|
11
12
|
getters: {
|
|
12
13
|
isAMPModeEnabled: (t) => t.emailFormat === "AMP",
|
|
13
14
|
previewHtml() {
|