@useinsider/guido 3.8.1 → 3.8.2-beta.189e91c
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 +70 -66
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +8 -8
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +15 -12
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +16 -15
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +5 -5
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +42 -37
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +40 -37
- package/dist/composables/useHtmlCompiler.js +13 -10
- package/dist/composables/useHtmlValidator.js +180 -133
- package/dist/composables/usePreviewInteractionGuard.js +17 -0
- package/dist/composables/usePreviewMode.js +15 -14
- package/dist/composables/useRecommendationPreview.js +111 -0
- package/dist/composables/useSave.js +14 -14
- package/dist/composables/validators/useUnsubscribeBlockValidator.js +26 -17
- package/dist/config/compiler/htmlCompilerRules.js +38 -10
- package/dist/config/compiler/recommendationCompilerRules.js +84 -109
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +98 -89
- package/dist/config/compiler/utils/recommendationIgnoreUtils.js +15 -0
- package/dist/config/migrator/recommendation/extractors.js +44 -22
- package/dist/config/migrator/recommendation/htmlBuilder.js +170 -163
- package/dist/config/migrator/recommendation/settingsMapper.js +38 -33
- package/dist/config/migrator/recommendationMigrator.js +30 -31
- package/dist/extensions/Blocks/Recommendation/block.js +60 -41
- package/dist/extensions/Blocks/Recommendation/canvasPreview.css.js +16 -0
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +41 -32
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +26 -20
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +359 -264
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +96 -83
- package/dist/extensions/Blocks/Recommendation/controls/main/layoutOrientation.js +43 -31
- package/dist/extensions/Blocks/Recommendation/controls/main/pricePlacement.js +133 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/productCount.js +3 -2
- package/dist/extensions/Blocks/Recommendation/controls/main/productLayout.js +55 -45
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +175 -166
- package/dist/extensions/Blocks/Recommendation/controls/syncInfoMessage.js +7 -6
- package/dist/extensions/Blocks/Recommendation/extension.js +31 -29
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +21 -7
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +64 -4
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +3 -2
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +6 -3
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +130 -96
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +43 -53
- package/dist/extensions/Blocks/Recommendation/templates/index.js +20 -16
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +86 -80
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +31 -40
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +155 -102
- package/dist/extensions/Blocks/Unsubscribe/block.js +40 -37
- package/dist/extensions/Blocks/Unsubscribe/control.js +19 -16
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/schemas.d.ts +16 -0
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/useHtmlValidator.d.ts +27 -0
- package/dist/src/composables/useHtmlValidator.test.d.ts +1 -0
- package/dist/src/composables/usePreviewInteractionGuard.d.ts +3 -0
- package/dist/src/composables/useRecommendationPreview.d.ts +10 -0
- package/dist/src/composables/validators/useUnsubscribeBlockValidator.d.ts +1 -0
- package/dist/src/config/compiler/utils/recommendationIgnoreUtils.d.ts +17 -0
- package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/extractors.d.ts +15 -0
- package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +8 -0
- package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/block.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 +21 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +36 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +3 -1
- package/dist/src/extensions/Blocks/Recommendation/controls/main/layoutOrientation.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/pricePlacement.d.ts +59 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/productLayout.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +9 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +13 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/grid/template.d.ts +4 -4
- package/dist/src/extensions/Blocks/Recommendation/templates/index.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/list/elementRenderer.d.ts +10 -1
- package/dist/src/extensions/Blocks/Recommendation/templates/list/template.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/templates/utils.d.ts +51 -1
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +15 -0
- package/dist/src/stores/config.d.ts +36 -0
- package/dist/src/stores/unsubscribe.d.ts +11 -1
- package/dist/src/utils/ampErrorFilter.d.ts +1 -0
- package/dist/stores/unsubscribe.js +8 -7
- package/dist/utils/ampErrorFilter.js +6 -5
- package/package.json +1 -1
|
@@ -1,10 +1,39 @@
|
|
|
1
|
+
import type { CurrencyConfig } from '../types/nodeConfig';
|
|
1
2
|
import type { FiltersResponse, RecommendationProduct } from '@@/Types/recommendation';
|
|
2
3
|
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';
|
|
4
|
+
type PriceKey = 'price' | 'original_price' | 'discount';
|
|
5
|
+
/**
|
|
6
|
+
* Current currency configuration from the store, in CurrencyConfig shape.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCurrentCurrencyConfig(): CurrencyConfig;
|
|
9
|
+
/**
|
|
10
|
+
* Formats a product price using current currency settings. Falls back to the
|
|
11
|
+
* first available currency, then 0, when the active currency has no value.
|
|
12
|
+
*/
|
|
13
|
+
export declare function formatProductPrice(product: RecommendationProduct, priceKey?: PriceKey): string;
|
|
14
|
+
/**
|
|
15
|
+
* True when the formatted sale price equals the formatted original price.
|
|
16
|
+
* Mirrors the email-service / preview hide-if-same comparison semantics
|
|
17
|
+
* (formatted-string equality, same currency fallback chain).
|
|
18
|
+
*/
|
|
19
|
+
export declare function isSamePrice(product: RecommendationProduct): boolean;
|
|
3
20
|
/**
|
|
4
21
|
* Converts a snake_case attribute name to Title Case display name.
|
|
5
22
|
* e.g., "rating_star" → "Rating Star"
|
|
6
23
|
*/
|
|
7
24
|
export declare function toDisplayName(attrName: string): string;
|
|
25
|
+
/**
|
|
26
|
+
* Resolves the inline (side-by-side) price layout from the composition order so
|
|
27
|
+
* it matches the stacked order. `anchor` is whichever of price / original price
|
|
28
|
+
* comes first in the composition (the merged cell renders there); `skip` is the
|
|
29
|
+
* other (dropped, since it's merged in); `originalFirst` puts the original price
|
|
30
|
+
* on the left when it precedes the sale price (the default composition order).
|
|
31
|
+
*/
|
|
32
|
+
export declare function resolveInlinePriceOrder(composition: string[]): {
|
|
33
|
+
originalFirst: boolean;
|
|
34
|
+
anchor: string;
|
|
35
|
+
skip: string;
|
|
36
|
+
};
|
|
8
37
|
/**
|
|
9
38
|
* Reduces a raw product-attribute value to a displayable scalar string.
|
|
10
39
|
* Array-type attributes (filter types `Strings`/`Numbers`) are substituted with
|
|
@@ -150,10 +179,24 @@ export interface RenderOptions {
|
|
|
150
179
|
/** Per-attribute visibility (show/hide) re-applied across regeneration; falls back to defaults. */
|
|
151
180
|
visibility?: AttributeVisibility;
|
|
152
181
|
}
|
|
182
|
+
/**
|
|
183
|
+
* Builds the per-attribute `CellRenderOptions` for one composition key from the block-level
|
|
184
|
+
* `RenderOptions`. Single source for both the stacked per-cell options and the two inline
|
|
185
|
+
* (price + old-price) option sets, so style capture → re-bake stays consistent across layouts.
|
|
186
|
+
*/
|
|
187
|
+
export declare function buildCellOptions(attrType: string, renderOptions: RenderOptions): CellRenderOptions;
|
|
153
188
|
/**
|
|
154
189
|
* Options for prepareProductRows unified function
|
|
155
190
|
*/
|
|
156
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Block-level price placement flags threaded into the row builders.
|
|
193
|
+
* - `priceInline`: render sale + original price on one line (skip the standalone
|
|
194
|
+
* original-price row).
|
|
195
|
+
*/
|
|
196
|
+
export interface PricePlacementFlags {
|
|
197
|
+
priceInline?: boolean;
|
|
198
|
+
}
|
|
199
|
+
export interface PrepareProductRowsOptions extends PricePlacementFlags, RenderOptions {
|
|
157
200
|
/** Number of products per row (only for grid layout, defaults to 3) */
|
|
158
201
|
productsPerRow?: number;
|
|
159
202
|
/** Number of products per row on mobile (only for grid layout, defaults to 1) */
|
|
@@ -223,6 +266,12 @@ export declare function renderStyledParagraph(text: string, defaults: {
|
|
|
223
266
|
* base style. Returns '' when there is nothing to set.
|
|
224
267
|
*/
|
|
225
268
|
export declare function resolveSegmentBgStyle(baseStyle: string, cardBackgroundColor?: string): string;
|
|
269
|
+
/**
|
|
270
|
+
* The ` background-color: …;` CSS fragment for a captured "Block Background Color", or ''.
|
|
271
|
+
* Use this when merging into an existing `style="…"` attribute; use `cellBgStyleAttr` when the
|
|
272
|
+
* cell has no other inline style and needs the whole attribute.
|
|
273
|
+
*/
|
|
274
|
+
export declare function bgColorFragment(color?: string): string;
|
|
226
275
|
/**
|
|
227
276
|
* Builds the ` style="background-color: …"` attribute for a text attribute's
|
|
228
277
|
* `[esd-extension-block-id]` cell, baking in the captured "Block Background Color".
|
|
@@ -278,3 +327,4 @@ export declare function getDefaultProducts(count?: number): RecommendationProduc
|
|
|
278
327
|
* @returns HTML template string with {-{-TITLE-}-}, {-{-PRODUCT_ROWS-}-}, and {-{-MOBILE_PRODUCT_ROWS-}-} (grid only) placeholders
|
|
279
328
|
*/
|
|
280
329
|
export declare function createBlockTemplate(layout?: Orientation, instanceClass?: string): string;
|
|
330
|
+
export {};
|
|
@@ -152,6 +152,21 @@ export interface RecommendationNodeConfig {
|
|
|
152
152
|
* Whether to trim long product names with ellipsis
|
|
153
153
|
*/
|
|
154
154
|
textTrimming: boolean;
|
|
155
|
+
/**
|
|
156
|
+
* Whether the price and original price render on separate stacked lines.
|
|
157
|
+
* - true (default): each on its own attribute row (current Guido look)
|
|
158
|
+
* - false: both rendered inline on the same line, and Card Composition
|
|
159
|
+
* collapses them into a single "Product Prices" entry
|
|
160
|
+
* Ported from the legacy product block's `isPriceMovedToNextLine`.
|
|
161
|
+
*/
|
|
162
|
+
priceMovedToNextLine: boolean;
|
|
163
|
+
/**
|
|
164
|
+
* Whether to hide the redundant original price when it equals the sale
|
|
165
|
+
* price (no real discount). Enforced in the real email via a liquid
|
|
166
|
+
* condition and mirrored in the editor on mock data.
|
|
167
|
+
* Ported from the legacy product block's `isPriceDeletedForZeroSale`.
|
|
168
|
+
*/
|
|
169
|
+
priceHideIfSameAsDiscounted: boolean;
|
|
155
170
|
/**
|
|
156
171
|
* Configuration version for future migrations
|
|
157
172
|
* Increment when making breaking changes to schema
|
|
@@ -65,6 +65,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
65
65
|
blockType?: string | undefined;
|
|
66
66
|
size?: string | number | undefined;
|
|
67
67
|
verticalResponsiveness?: boolean | undefined;
|
|
68
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
69
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
68
70
|
} & {
|
|
69
71
|
[key: string]: unknown;
|
|
70
72
|
};
|
|
@@ -197,6 +199,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
197
199
|
blockType?: string | undefined;
|
|
198
200
|
size?: string | number | undefined;
|
|
199
201
|
verticalResponsiveness?: boolean | undefined;
|
|
202
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
203
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
200
204
|
} & {
|
|
201
205
|
[key: string]: unknown;
|
|
202
206
|
};
|
|
@@ -329,6 +333,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
329
333
|
blockType?: string | undefined;
|
|
330
334
|
size?: string | number | undefined;
|
|
331
335
|
verticalResponsiveness?: boolean | undefined;
|
|
336
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
337
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
332
338
|
} & {
|
|
333
339
|
[key: string]: unknown;
|
|
334
340
|
};
|
|
@@ -461,6 +467,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
461
467
|
blockType?: string | undefined;
|
|
462
468
|
size?: string | number | undefined;
|
|
463
469
|
verticalResponsiveness?: boolean | undefined;
|
|
470
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
471
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
464
472
|
} & {
|
|
465
473
|
[key: string]: unknown;
|
|
466
474
|
};
|
|
@@ -593,6 +601,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
593
601
|
blockType?: string | undefined;
|
|
594
602
|
size?: string | number | undefined;
|
|
595
603
|
verticalResponsiveness?: boolean | undefined;
|
|
604
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
605
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
596
606
|
} & {
|
|
597
607
|
[key: string]: unknown;
|
|
598
608
|
};
|
|
@@ -725,6 +735,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
725
735
|
blockType?: string | undefined;
|
|
726
736
|
size?: string | number | undefined;
|
|
727
737
|
verticalResponsiveness?: boolean | undefined;
|
|
738
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
739
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
728
740
|
} & {
|
|
729
741
|
[key: string]: unknown;
|
|
730
742
|
};
|
|
@@ -857,6 +869,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
857
869
|
blockType?: string | undefined;
|
|
858
870
|
size?: string | number | undefined;
|
|
859
871
|
verticalResponsiveness?: boolean | undefined;
|
|
872
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
873
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
860
874
|
} & {
|
|
861
875
|
[key: string]: unknown;
|
|
862
876
|
};
|
|
@@ -989,6 +1003,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
989
1003
|
blockType?: string | undefined;
|
|
990
1004
|
size?: string | number | undefined;
|
|
991
1005
|
verticalResponsiveness?: boolean | undefined;
|
|
1006
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
1007
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
992
1008
|
} & {
|
|
993
1009
|
[key: string]: unknown;
|
|
994
1010
|
};
|
|
@@ -1121,6 +1137,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1121
1137
|
blockType?: string | undefined;
|
|
1122
1138
|
size?: string | number | undefined;
|
|
1123
1139
|
verticalResponsiveness?: boolean | undefined;
|
|
1140
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
1141
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
1124
1142
|
} & {
|
|
1125
1143
|
[key: string]: unknown;
|
|
1126
1144
|
};
|
|
@@ -1253,6 +1271,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1253
1271
|
blockType?: string | undefined;
|
|
1254
1272
|
size?: string | number | undefined;
|
|
1255
1273
|
verticalResponsiveness?: boolean | undefined;
|
|
1274
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
1275
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
1256
1276
|
} & {
|
|
1257
1277
|
[key: string]: unknown;
|
|
1258
1278
|
};
|
|
@@ -1385,6 +1405,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1385
1405
|
blockType?: string | undefined;
|
|
1386
1406
|
size?: string | number | undefined;
|
|
1387
1407
|
verticalResponsiveness?: boolean | undefined;
|
|
1408
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
1409
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
1388
1410
|
} & {
|
|
1389
1411
|
[key: string]: unknown;
|
|
1390
1412
|
};
|
|
@@ -1517,6 +1539,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1517
1539
|
blockType?: string | undefined;
|
|
1518
1540
|
size?: string | number | undefined;
|
|
1519
1541
|
verticalResponsiveness?: boolean | undefined;
|
|
1542
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
1543
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
1520
1544
|
} & {
|
|
1521
1545
|
[key: string]: unknown;
|
|
1522
1546
|
};
|
|
@@ -1649,6 +1673,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1649
1673
|
blockType?: string | undefined;
|
|
1650
1674
|
size?: string | number | undefined;
|
|
1651
1675
|
verticalResponsiveness?: boolean | undefined;
|
|
1676
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
1677
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
1652
1678
|
} & {
|
|
1653
1679
|
[key: string]: unknown;
|
|
1654
1680
|
};
|
|
@@ -1781,6 +1807,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1781
1807
|
blockType?: string | undefined;
|
|
1782
1808
|
size?: string | number | undefined;
|
|
1783
1809
|
verticalResponsiveness?: boolean | undefined;
|
|
1810
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
1811
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
1784
1812
|
} & {
|
|
1785
1813
|
[key: string]: unknown;
|
|
1786
1814
|
};
|
|
@@ -1913,6 +1941,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1913
1941
|
blockType?: string | undefined;
|
|
1914
1942
|
size?: string | number | undefined;
|
|
1915
1943
|
verticalResponsiveness?: boolean | undefined;
|
|
1944
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
1945
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
1916
1946
|
} & {
|
|
1917
1947
|
[key: string]: unknown;
|
|
1918
1948
|
};
|
|
@@ -2045,6 +2075,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2045
2075
|
blockType?: string | undefined;
|
|
2046
2076
|
size?: string | number | undefined;
|
|
2047
2077
|
verticalResponsiveness?: boolean | undefined;
|
|
2078
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
2079
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
2048
2080
|
} & {
|
|
2049
2081
|
[key: string]: unknown;
|
|
2050
2082
|
};
|
|
@@ -2177,6 +2209,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2177
2209
|
blockType?: string | undefined;
|
|
2178
2210
|
size?: string | number | undefined;
|
|
2179
2211
|
verticalResponsiveness?: boolean | undefined;
|
|
2212
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
2213
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
2180
2214
|
} & {
|
|
2181
2215
|
[key: string]: unknown;
|
|
2182
2216
|
};
|
|
@@ -2309,6 +2343,8 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2309
2343
|
blockType?: string | undefined;
|
|
2310
2344
|
size?: string | number | undefined;
|
|
2311
2345
|
verticalResponsiveness?: boolean | undefined;
|
|
2346
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
2347
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
2312
2348
|
} & {
|
|
2313
2349
|
[key: string]: unknown;
|
|
2314
2350
|
};
|
|
@@ -10,6 +10,7 @@ interface StoreState {
|
|
|
10
10
|
typeSelectionDrawerStatus: boolean;
|
|
11
11
|
isGlobalUnsubscribeDisabled: boolean;
|
|
12
12
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
13
|
+
pendingBlockId: string | null;
|
|
13
14
|
}
|
|
14
15
|
export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guidoUnsubscribe", StoreState, {
|
|
15
16
|
getSelectedCollection: (state: {
|
|
@@ -35,6 +36,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
35
36
|
typeSelectionDrawerStatus: boolean;
|
|
36
37
|
isGlobalUnsubscribeDisabled: boolean;
|
|
37
38
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
39
|
+
pendingBlockId: string | null;
|
|
38
40
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => number[];
|
|
39
41
|
getSelectedTemplateByActiveType: (state: {
|
|
40
42
|
templates: {
|
|
@@ -59,6 +61,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
59
61
|
typeSelectionDrawerStatus: boolean;
|
|
60
62
|
isGlobalUnsubscribeDisabled: boolean;
|
|
61
63
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
64
|
+
pendingBlockId: string | null;
|
|
62
65
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => number;
|
|
63
66
|
getTemplatesByActiveType: (state: {
|
|
64
67
|
templates: {
|
|
@@ -83,6 +86,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
83
86
|
typeSelectionDrawerStatus: boolean;
|
|
84
87
|
isGlobalUnsubscribeDisabled: boolean;
|
|
85
88
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
89
|
+
pendingBlockId: string | null;
|
|
86
90
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => {
|
|
87
91
|
id: number;
|
|
88
92
|
name: string;
|
|
@@ -119,6 +123,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
119
123
|
typeSelectionDrawerStatus: boolean;
|
|
120
124
|
isGlobalUnsubscribeDisabled: boolean;
|
|
121
125
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
126
|
+
pendingBlockId: string | null;
|
|
122
127
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => (id: number) => string;
|
|
123
128
|
getSelectedUnsubscribePagesByCollection: (state: {
|
|
124
129
|
templates: {
|
|
@@ -143,6 +148,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
143
148
|
typeSelectionDrawerStatus: boolean;
|
|
144
149
|
isGlobalUnsubscribeDisabled: boolean;
|
|
145
150
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
151
|
+
pendingBlockId: string | null;
|
|
146
152
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => (collectionType: number) => number[];
|
|
147
153
|
isActiveTypeFirstInCollection: (state: {
|
|
148
154
|
templates: {
|
|
@@ -167,6 +173,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
167
173
|
typeSelectionDrawerStatus: boolean;
|
|
168
174
|
isGlobalUnsubscribeDisabled: boolean;
|
|
169
175
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
176
|
+
pendingBlockId: string | null;
|
|
170
177
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
|
|
171
178
|
isActiveTypeLastInCollection: (state: {
|
|
172
179
|
templates: {
|
|
@@ -191,6 +198,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
191
198
|
typeSelectionDrawerStatus: boolean;
|
|
192
199
|
isGlobalUnsubscribeDisabled: boolean;
|
|
193
200
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
201
|
+
pendingBlockId: string | null;
|
|
194
202
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
|
|
195
203
|
hasTemplatesByCollectionType: (state: {
|
|
196
204
|
templates: {
|
|
@@ -215,6 +223,7 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
215
223
|
typeSelectionDrawerStatus: boolean;
|
|
216
224
|
isGlobalUnsubscribeDisabled: boolean;
|
|
217
225
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
226
|
+
pendingBlockId: string | null;
|
|
218
227
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => Record<number, boolean>;
|
|
219
228
|
unsubscribePagesStatus: (state: {
|
|
220
229
|
templates: {
|
|
@@ -239,10 +248,11 @@ export declare const useUnsubscribeStore: import("pinia").StoreDefinition<"guido
|
|
|
239
248
|
typeSelectionDrawerStatus: boolean;
|
|
240
249
|
isGlobalUnsubscribeDisabled: boolean;
|
|
241
250
|
isSubscriptionPreferencesCenterDisabled: boolean;
|
|
251
|
+
pendingBlockId: string | null;
|
|
242
252
|
} & import("pinia").PiniaCustomStateProperties<StoreState>) => boolean;
|
|
243
253
|
}, {
|
|
244
254
|
$reset(): void;
|
|
245
|
-
fetchTemplates(): Promise<void>;
|
|
255
|
+
fetchTemplates(force?: boolean): Promise<void>;
|
|
246
256
|
setCollection(collectionType: number): void;
|
|
247
257
|
setCollectionWithoutAutoSelection(collectionType: number): void;
|
|
248
258
|
setSelectedTemplate(template: number): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TYPE_COLLECTIONS as i, PAGE_TYPES as p } from "../enums/unsubscribe.js";
|
|
2
2
|
import { useUnsubscribeApi as d } from "../services/unsubscribeApi.js";
|
|
3
|
-
import { defineStore as
|
|
3
|
+
import { defineStore as u } from "pinia";
|
|
4
4
|
let o = null;
|
|
5
5
|
const r = () => ({
|
|
6
6
|
templates: [],
|
|
@@ -12,8 +12,9 @@ const r = () => ({
|
|
|
12
12
|
pageSelectionDrawerStatus: !1,
|
|
13
13
|
typeSelectionDrawerStatus: !1,
|
|
14
14
|
isGlobalUnsubscribeDisabled: !1,
|
|
15
|
-
isSubscriptionPreferencesCenterDisabled: !1
|
|
16
|
-
|
|
15
|
+
isSubscriptionPreferencesCenterDisabled: !1,
|
|
16
|
+
pendingBlockId: null
|
|
17
|
+
}), b = u("guidoUnsubscribe", {
|
|
17
18
|
state: () => r(),
|
|
18
19
|
getters: {
|
|
19
20
|
getSelectedCollection: (e) => i[e.selectedCollectionType],
|
|
@@ -62,10 +63,10 @@ const r = () => ({
|
|
|
62
63
|
selectedUnsubscribePages: t
|
|
63
64
|
});
|
|
64
65
|
},
|
|
65
|
-
async fetchTemplates() {
|
|
66
|
-
this.templates.length || (
|
|
67
|
-
const { getUnsubscribePages:
|
|
68
|
-
this.templates = await
|
|
66
|
+
async fetchTemplates(e = !1) {
|
|
67
|
+
!e && this.templates.length || ((e || !o) && (o = (async () => {
|
|
68
|
+
const { getUnsubscribePages: t } = d();
|
|
69
|
+
this.templates = await t();
|
|
69
70
|
})().finally(() => {
|
|
70
71
|
o = null;
|
|
71
72
|
})), await o);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { MERGE_TAGS as
|
|
2
|
-
const
|
|
3
|
-
(e) => !
|
|
1
|
+
import { MERGE_TAGS as R } from "../enums/unsubscribe.js";
|
|
2
|
+
const o = Object.values(R), s = ["attribute 'contenteditable'"], _ = (E) => E.filter(
|
|
3
|
+
(e) => !o.some((t) => e.includes(t)) && !s.some((t) => e.includes(t))
|
|
4
4
|
);
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
s as AMP_ERROR_STRIPPED_ATTRIBUTE_FRAGMENTS,
|
|
7
|
+
o as AMP_ERROR_WHITELISTED_TOKENS,
|
|
8
|
+
_ as filterAmpErrors
|
|
8
9
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2-beta.189e91c",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|