@useinsider/guido 3.17.0 → 3.18.0-beta.41e529d
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/README.md +6 -5
- package/dist/@types/config/schemas.js +10 -7
- package/dist/components/Guido.vue.js +10 -10
- package/dist/components/Guido.vue2.js +86 -78
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +21 -0
- package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +131 -0
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
- package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +57 -0
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.js +19 -0
- package/dist/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue2.js +63 -0
- package/dist/composables/useCustomInterfaceAppearance.js +56 -38
- package/dist/composables/useLegacyStrategyConversion.js +52 -0
- package/dist/composables/useModuleRepair.js +33 -0
- package/dist/composables/useRecommendation.js +41 -34
- package/dist/composables/useSave.js +30 -29
- package/dist/composables/useStripo.js +15 -15
- package/dist/composables/useSyncModuleExtractor.js +15 -13
- package/dist/composables/validators/useSyncModuleBlockValidator.js +24 -0
- package/dist/config/i18n/en/labels.json.js +1 -1
- package/dist/config/migrator/index.js +9 -8
- package/dist/config/migrator/recommendation/compositionMapper.js +20 -20
- package/dist/config/migrator/recommendation/extractors.js +29 -24
- package/dist/config/migrator/recommendation/htmlBuilder.js +116 -130
- package/dist/config/migrator/recommendation/settingsMapper.js +17 -17
- package/dist/config/migrator/recommendationMigrator.js +31 -25
- package/dist/config/migrator/recommendationTitleMigrator.js +119 -0
- package/dist/enums/academy.js +2 -1
- package/dist/enums/date.js +5 -3
- package/dist/enums/extensions/recommendationBlock.js +4 -1
- package/dist/extensions/Blocks/Items/block.js +118 -49
- package/dist/extensions/Blocks/Items/constants/currency.js +25 -0
- package/dist/extensions/Blocks/Items/controls/price/currencyLocation.js +25 -24
- package/dist/extensions/Blocks/Items/controls/price/currencySymbol.js +12 -11
- package/dist/extensions/Blocks/Items/template.js +153 -152
- package/dist/extensions/Blocks/Items/utils/constants.js +4 -0
- package/dist/extensions/Blocks/Recommendation/block.js +35 -29
- package/dist/extensions/Blocks/Recommendation/constants/blockIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +29 -27
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +35 -28
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +309 -236
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +242 -180
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +159 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +1 -0
- package/dist/extensions/Blocks/Recommendation/controls/title/index.js +44 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +31 -29
- package/dist/extensions/Blocks/Recommendation/services/configService.js +54 -36
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +23 -4
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +217 -80
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +3 -3
- package/dist/extensions/Blocks/Recommendation/templates/titleRows.js +33 -0
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +85 -107
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +58 -0
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +22 -0
- package/dist/extensions/Blocks/Recommendation/utils/recommendationBlockCount.js +10 -6
- package/dist/extensions/Blocks/common-control.js +22 -19
- package/dist/guido.css +1 -1
- package/dist/services/recommendationApi.js +81 -33
- package/dist/src/@types/config/schemas.d.ts +6 -0
- package/dist/src/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.d.ts +3 -0
- package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +2 -0
- package/dist/src/components/organisms/extensions/recommendation/RemoveStrategyModal.vue.d.ts +2 -0
- package/dist/src/components/organisms/extensions/recommendation/StrategyInfoBoxContent.vue.d.ts +15 -0
- package/dist/src/composables/useConfig.d.ts +4 -0
- package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
- package/dist/src/composables/useModuleRepair.d.ts +18 -0
- package/dist/src/composables/useRecommendation.d.ts +1 -0
- package/dist/src/composables/useSyncModuleExtractor.d.ts +2 -0
- package/dist/src/composables/validators/useSyncModuleBlockValidator.d.ts +3 -0
- package/dist/src/config/migrator/recommendation/extractors.d.ts +8 -0
- package/dist/src/config/migrator/recommendationTitleMigrator.d.ts +5 -0
- package/dist/src/enums/academy.d.ts +1 -0
- package/dist/src/enums/date.d.ts +1 -0
- package/dist/src/enums/extensions/recommendationBlock.d.ts +3 -0
- package/dist/src/extensions/Blocks/Items/block.d.ts +35 -0
- package/dist/src/extensions/Blocks/Items/constants/currency.d.ts +43 -0
- package/dist/src/extensions/Blocks/Items/utils/constants.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/blockIds.d.ts +2 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +3 -6
- package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +2 -2
- package/dist/src/extensions/Blocks/Recommendation/constants/selectors.d.ts +12 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/cardComposition/index.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +44 -8
- package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +17 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +86 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +12 -1
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +229 -10
- package/dist/src/extensions/Blocks/Recommendation/templates/titleRows.d.ts +13 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +39 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/nodeConfigWriter.d.ts +31 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/recommendationBlockCount.d.ts +6 -2
- package/dist/src/extensions/Blocks/common-control.d.ts +4 -1
- package/dist/src/mock/api/recommendation-strategies.d.ts +2 -0
- package/dist/src/services/recommendationApi.d.ts +5 -1
- package/dist/src/stores/config.d.ts +178 -0
- package/dist/src/stores/save-as-template.d.ts +4 -3
- package/dist/src/utils/genericUtil.d.ts +5 -0
- package/dist/src/utils/itemsCurrencyRepair.d.ts +17 -0
- package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
- package/dist/static/assets/icons/line-change.svg.js +5 -0
- package/dist/static/assets/icons/line-delete.svg.js +5 -0
- package/dist/static/assets/icons/line-info.svg.js +5 -0
- package/dist/static/assets/icons/line-plus.svg.js +5 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +220 -0
- package/dist/static/styles/customEditorStyle.css.js +3 -1
- package/dist/stores/config.js +66 -59
- package/dist/utils/dateUtil.js +23 -10
- package/dist/utils/genericUtil.js +28 -27
- package/dist/utils/itemsCurrencyRepair.js +39 -0
- package/dist/utils/pairProductVariables.js +58 -58
- package/dist/utils/templatePreparation.js +35 -34
- package/package.json +3 -2
- package/dist/composables/useModuleDynamicContentRepair.js +0 -37
- package/dist/src/composables/useModuleDynamicContentRepair.d.ts +0 -13
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { Filter, RrsMigrationFilterGroup, RrsMigrationPayload } from '@@/Types/recommendation';
|
|
2
|
+
type FilterAttribute = {
|
|
3
|
+
value: string;
|
|
4
|
+
type: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* A block authored before reusable strategies: it still carries a plain feed
|
|
8
|
+
* configuration (compiled into a feed URL string) instead of a strategy id.
|
|
9
|
+
* Blocks created under RRS stamp `CURRENT_CONFIG_VERSION`, so the version is
|
|
10
|
+
* what separates "never converted" from "not assigned yet".
|
|
11
|
+
*/
|
|
12
|
+
export declare function isLegacyStrategyConfig({ strategyId, nodeConfigVersion }: {
|
|
13
|
+
strategyId: string;
|
|
14
|
+
nodeConfigVersion: number;
|
|
15
|
+
}): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Groups the block's valid filters the way the feed URL groups them, in the
|
|
18
|
+
* shape the migration endpoint validates. The URL's filter DSL states no
|
|
19
|
+
* attribute type and cannot express a mixed-operator group, which is exactly
|
|
20
|
+
* what this override exists to supply.
|
|
21
|
+
*/
|
|
22
|
+
export declare function toMigrationFilterGroups(filters: Filter[], attributes: FilterAttribute[]): RrsMigrationFilterGroup[];
|
|
23
|
+
interface MigrationInputs {
|
|
24
|
+
blockId: number;
|
|
25
|
+
url: string;
|
|
26
|
+
campaignId: string;
|
|
27
|
+
variationId: string;
|
|
28
|
+
strategy: string;
|
|
29
|
+
productIds: string[];
|
|
30
|
+
filters: Filter[];
|
|
31
|
+
attributes: FilterAttribute[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The server names and de-duplicates the strategy, so nothing here derives a
|
|
35
|
+
* name; `campaignId`/`variationId` only feed that name and fall back to 0 for
|
|
36
|
+
* templates and modules, which carry no numeric campaign.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildLegacyMigrationPayload({ blockId, url, campaignId, variationId, strategy, productIds, filters, attributes, }: MigrationInputs): RrsMigrationPayload;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { DocumentModifier } from '../services/configService';
|
|
2
|
+
import type { PartialNodeConfig } from '../types/nodeConfig';
|
|
3
|
+
import type { RecommendationProduct } from '@@/Types/recommendation';
|
|
4
|
+
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
5
|
+
interface ConfigWriterApi {
|
|
6
|
+
getDocumentModifier: () => DocumentModifier;
|
|
7
|
+
getDocumentRootHtmlNode: () => ImmutableHtmlNode;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Keeps a document handle alive for writes the settings panel can no longer make.
|
|
11
|
+
* Deliberately not cleared on deselect — that is the exact moment the handle is
|
|
12
|
+
* needed. It is replaced on the next render, and goes stale only if the editor
|
|
13
|
+
* itself is torn down.
|
|
14
|
+
*/
|
|
15
|
+
export declare function registerNodeConfigWriter(api: ConfigWriterApi): void;
|
|
16
|
+
/**
|
|
17
|
+
* Commits a config change and its product re-render straight to the document,
|
|
18
|
+
* bypassing the settings panel.
|
|
19
|
+
*
|
|
20
|
+
* Host-rendered UI (the remove-strategy modal) lives outside `ui-editor`, and
|
|
21
|
+
* Stripo deselects the block on the first click that lands there — destroying the
|
|
22
|
+
* control that normally does both, before the store change even happens.
|
|
23
|
+
*
|
|
24
|
+
* Mirrors the control's regenerate routine so config and cards land in ONE undo
|
|
25
|
+
* entry, and so partner-managed blocks keep their hand-authored cells.
|
|
26
|
+
* @param description - labels the undo entry only when there are no cards to
|
|
27
|
+
* re-render; the product helpers label their own batch.
|
|
28
|
+
* @returns whether the write reached a node
|
|
29
|
+
*/
|
|
30
|
+
export declare function commitBlockChangeOutsidePanel(blockId: number, updates: PartialNodeConfig, products: RecommendationProduct[], description: string): boolean;
|
|
31
|
+
export {};
|
|
@@ -13,16 +13,20 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export declare const RECOMMENDATION_BLOCK_SELECTOR = ".recommendation-block-v2";
|
|
15
15
|
export declare const RECOMMENDATION_PRODUCT_ROW_SELECTOR = ".recommendation-product-row";
|
|
16
|
-
interface QueryableNode {
|
|
16
|
+
export interface QueryableNode {
|
|
17
17
|
querySelector(selector: string): unknown;
|
|
18
18
|
}
|
|
19
19
|
export interface QueryableRoot {
|
|
20
20
|
querySelectorAll(selector: string): Iterable<QueryableNode>;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* Live-vs-ghost discriminator for a single `.recommendation-block-v2` node.
|
|
24
|
+
* Single home for the (provisional) heuristic described above.
|
|
25
|
+
*/
|
|
26
|
+
export declare function isLiveRecommendationBlock(block: QueryableNode): boolean;
|
|
22
27
|
/**
|
|
23
28
|
* Counts the live recommendation blocks reachable from `root`. Works on the
|
|
24
29
|
* editor's `ImmutableHtmlNode` document root (the `onCreated` drop / duplicate
|
|
25
30
|
* paths) and on any DOM-like root exposing `querySelectorAll`.
|
|
26
31
|
*/
|
|
27
32
|
export declare function countLiveRecommendationBlocks(root: QueryableRoot): number;
|
|
28
|
-
export {};
|
|
@@ -56,6 +56,9 @@ interface ButtonProps {
|
|
|
56
56
|
name: string;
|
|
57
57
|
label: string;
|
|
58
58
|
id?: string;
|
|
59
|
+
className?: string;
|
|
60
|
+
icon?: string;
|
|
61
|
+
disabled?: boolean;
|
|
59
62
|
}
|
|
60
63
|
/**
|
|
61
64
|
* Common control for all blocks which includes common UI Elements.
|
|
@@ -116,7 +119,7 @@ export declare abstract class CommonControl extends Control {
|
|
|
116
119
|
icon?: string;
|
|
117
120
|
}): string;
|
|
118
121
|
_GuRadioButton({ name, buttons, id }: RadioButtonProps): string;
|
|
119
|
-
_GuButton({ name, label, id }: ButtonProps): string;
|
|
122
|
+
_GuButton({ name, label, id, className, icon, disabled }: ButtonProps): string;
|
|
120
123
|
_GuIcon({ src, className }: IconProps): string;
|
|
121
124
|
/**
|
|
122
125
|
*
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams } from '@@/Types/recommendation';
|
|
1
|
+
import type { InitialResponse, FiltersResponse, RecommendationProduct, RecommendationProductsParams, RrsEndpointGenerateResponse, RrsMigrationPayload, RrsStrategy } from '@@/Types/recommendation';
|
|
2
2
|
export declare const useRecommendationApi: () => {
|
|
3
3
|
fetchRecommendationCreateData: () => Promise<InitialResponse>;
|
|
4
4
|
fetchRecommendationFilters: () => Promise<FiltersResponse>;
|
|
5
5
|
fetchRecommendationProducts: (strategy: string, params: RecommendationProductsParams) => Promise<RecommendationProduct[]>;
|
|
6
|
+
fetchRecommendationProductsByUrl: (url: string) => Promise<RecommendationProduct[]>;
|
|
7
|
+
fetchRecommendationStrategies: () => Promise<RrsStrategy[]>;
|
|
8
|
+
generateStrategyEndpoint: (strategy: RrsStrategy, currency: string) => Promise<RrsEndpointGenerateResponse | null>;
|
|
9
|
+
migrateLegacyStrategy: (payload: RrsMigrationPayload) => Promise<string>;
|
|
6
10
|
};
|
|
@@ -16,6 +16,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
16
16
|
templateId: string;
|
|
17
17
|
userId: string;
|
|
18
18
|
variationId?: string | undefined;
|
|
19
|
+
campaignId?: string | undefined;
|
|
19
20
|
};
|
|
20
21
|
partner: {
|
|
21
22
|
name: string;
|
|
@@ -104,6 +105,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
104
105
|
autosave: boolean;
|
|
105
106
|
allowlistEnabled: boolean;
|
|
106
107
|
linkTrackingIds: boolean;
|
|
108
|
+
reusableRecommendationStrategy: boolean;
|
|
107
109
|
};
|
|
108
110
|
blocks: {
|
|
109
111
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -156,6 +158,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
156
158
|
templateId: string;
|
|
157
159
|
userId: string;
|
|
158
160
|
variationId?: string | undefined;
|
|
161
|
+
campaignId?: string | undefined;
|
|
159
162
|
};
|
|
160
163
|
partner: {
|
|
161
164
|
name: string;
|
|
@@ -244,6 +247,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
244
247
|
autosave: boolean;
|
|
245
248
|
allowlistEnabled: boolean;
|
|
246
249
|
linkTrackingIds: boolean;
|
|
250
|
+
reusableRecommendationStrategy: boolean;
|
|
247
251
|
};
|
|
248
252
|
blocks: {
|
|
249
253
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -296,6 +300,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
296
300
|
templateId: string;
|
|
297
301
|
userId: string;
|
|
298
302
|
variationId?: string | undefined;
|
|
303
|
+
campaignId?: string | undefined;
|
|
299
304
|
};
|
|
300
305
|
partner: {
|
|
301
306
|
name: string;
|
|
@@ -384,6 +389,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
384
389
|
autosave: boolean;
|
|
385
390
|
allowlistEnabled: boolean;
|
|
386
391
|
linkTrackingIds: boolean;
|
|
392
|
+
reusableRecommendationStrategy: boolean;
|
|
387
393
|
};
|
|
388
394
|
blocks: {
|
|
389
395
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -436,6 +442,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
436
442
|
templateId: string;
|
|
437
443
|
userId: string;
|
|
438
444
|
variationId?: string | undefined;
|
|
445
|
+
campaignId?: string | undefined;
|
|
439
446
|
};
|
|
440
447
|
partner: {
|
|
441
448
|
name: string;
|
|
@@ -524,6 +531,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
524
531
|
autosave: boolean;
|
|
525
532
|
allowlistEnabled: boolean;
|
|
526
533
|
linkTrackingIds: boolean;
|
|
534
|
+
reusableRecommendationStrategy: boolean;
|
|
527
535
|
};
|
|
528
536
|
blocks: {
|
|
529
537
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -576,6 +584,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
576
584
|
templateId: string;
|
|
577
585
|
userId: string;
|
|
578
586
|
variationId?: string | undefined;
|
|
587
|
+
campaignId?: string | undefined;
|
|
579
588
|
};
|
|
580
589
|
partner: {
|
|
581
590
|
name: string;
|
|
@@ -664,6 +673,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
664
673
|
autosave: boolean;
|
|
665
674
|
allowlistEnabled: boolean;
|
|
666
675
|
linkTrackingIds: boolean;
|
|
676
|
+
reusableRecommendationStrategy: boolean;
|
|
667
677
|
};
|
|
668
678
|
blocks: {
|
|
669
679
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -716,6 +726,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
716
726
|
templateId: string;
|
|
717
727
|
userId: string;
|
|
718
728
|
variationId?: string | undefined;
|
|
729
|
+
campaignId?: string | undefined;
|
|
719
730
|
};
|
|
720
731
|
partner: {
|
|
721
732
|
name: string;
|
|
@@ -804,6 +815,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
804
815
|
autosave: boolean;
|
|
805
816
|
allowlistEnabled: boolean;
|
|
806
817
|
linkTrackingIds: boolean;
|
|
818
|
+
reusableRecommendationStrategy: boolean;
|
|
807
819
|
};
|
|
808
820
|
blocks: {
|
|
809
821
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -856,6 +868,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
856
868
|
templateId: string;
|
|
857
869
|
userId: string;
|
|
858
870
|
variationId?: string | undefined;
|
|
871
|
+
campaignId?: string | undefined;
|
|
859
872
|
};
|
|
860
873
|
partner: {
|
|
861
874
|
name: string;
|
|
@@ -944,6 +957,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
944
957
|
autosave: boolean;
|
|
945
958
|
allowlistEnabled: boolean;
|
|
946
959
|
linkTrackingIds: boolean;
|
|
960
|
+
reusableRecommendationStrategy: boolean;
|
|
947
961
|
};
|
|
948
962
|
blocks: {
|
|
949
963
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -996,6 +1010,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
996
1010
|
templateId: string;
|
|
997
1011
|
userId: string;
|
|
998
1012
|
variationId?: string | undefined;
|
|
1013
|
+
campaignId?: string | undefined;
|
|
999
1014
|
};
|
|
1000
1015
|
partner: {
|
|
1001
1016
|
name: string;
|
|
@@ -1084,6 +1099,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1084
1099
|
autosave: boolean;
|
|
1085
1100
|
allowlistEnabled: boolean;
|
|
1086
1101
|
linkTrackingIds: boolean;
|
|
1102
|
+
reusableRecommendationStrategy: boolean;
|
|
1087
1103
|
};
|
|
1088
1104
|
blocks: {
|
|
1089
1105
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1136,6 +1152,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1136
1152
|
templateId: string;
|
|
1137
1153
|
userId: string;
|
|
1138
1154
|
variationId?: string | undefined;
|
|
1155
|
+
campaignId?: string | undefined;
|
|
1139
1156
|
};
|
|
1140
1157
|
partner: {
|
|
1141
1158
|
name: string;
|
|
@@ -1224,6 +1241,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1224
1241
|
autosave: boolean;
|
|
1225
1242
|
allowlistEnabled: boolean;
|
|
1226
1243
|
linkTrackingIds: boolean;
|
|
1244
|
+
reusableRecommendationStrategy: boolean;
|
|
1227
1245
|
};
|
|
1228
1246
|
blocks: {
|
|
1229
1247
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1276,6 +1294,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1276
1294
|
templateId: string;
|
|
1277
1295
|
userId: string;
|
|
1278
1296
|
variationId?: string | undefined;
|
|
1297
|
+
campaignId?: string | undefined;
|
|
1279
1298
|
};
|
|
1280
1299
|
partner: {
|
|
1281
1300
|
name: string;
|
|
@@ -1364,6 +1383,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1364
1383
|
autosave: boolean;
|
|
1365
1384
|
allowlistEnabled: boolean;
|
|
1366
1385
|
linkTrackingIds: boolean;
|
|
1386
|
+
reusableRecommendationStrategy: boolean;
|
|
1367
1387
|
};
|
|
1368
1388
|
blocks: {
|
|
1369
1389
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1416,6 +1436,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1416
1436
|
templateId: string;
|
|
1417
1437
|
userId: string;
|
|
1418
1438
|
variationId?: string | undefined;
|
|
1439
|
+
campaignId?: string | undefined;
|
|
1419
1440
|
};
|
|
1420
1441
|
partner: {
|
|
1421
1442
|
name: string;
|
|
@@ -1504,6 +1525,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1504
1525
|
autosave: boolean;
|
|
1505
1526
|
allowlistEnabled: boolean;
|
|
1506
1527
|
linkTrackingIds: boolean;
|
|
1528
|
+
reusableRecommendationStrategy: boolean;
|
|
1507
1529
|
};
|
|
1508
1530
|
blocks: {
|
|
1509
1531
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1556,6 +1578,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1556
1578
|
templateId: string;
|
|
1557
1579
|
userId: string;
|
|
1558
1580
|
variationId?: string | undefined;
|
|
1581
|
+
campaignId?: string | undefined;
|
|
1559
1582
|
};
|
|
1560
1583
|
partner: {
|
|
1561
1584
|
name: string;
|
|
@@ -1644,6 +1667,149 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1644
1667
|
autosave: boolean;
|
|
1645
1668
|
allowlistEnabled: boolean;
|
|
1646
1669
|
linkTrackingIds: boolean;
|
|
1670
|
+
reusableRecommendationStrategy: boolean;
|
|
1671
|
+
};
|
|
1672
|
+
blocks: {
|
|
1673
|
+
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
1674
|
+
includeCustoms: ("dynamic-content" | "checkbox-block" | "radio-button-block" | "recommendation-block" | "unsubscribe-block" | "coupon-block" | "items-block")[];
|
|
1675
|
+
};
|
|
1676
|
+
compiler: {
|
|
1677
|
+
customRules: ({
|
|
1678
|
+
type: "replace";
|
|
1679
|
+
search: string;
|
|
1680
|
+
replacement: string;
|
|
1681
|
+
replaceAll?: boolean | undefined;
|
|
1682
|
+
id: string;
|
|
1683
|
+
description?: string | undefined;
|
|
1684
|
+
priority: number;
|
|
1685
|
+
} | {
|
|
1686
|
+
type: "regex";
|
|
1687
|
+
pattern: string;
|
|
1688
|
+
replacement: string;
|
|
1689
|
+
flags?: string | undefined;
|
|
1690
|
+
id: string;
|
|
1691
|
+
description?: string | undefined;
|
|
1692
|
+
priority: number;
|
|
1693
|
+
} | {
|
|
1694
|
+
type: "remove";
|
|
1695
|
+
targets: string[];
|
|
1696
|
+
id: string;
|
|
1697
|
+
description?: string | undefined;
|
|
1698
|
+
priority: number;
|
|
1699
|
+
} | {
|
|
1700
|
+
type: "custom";
|
|
1701
|
+
processor: (html: string) => string;
|
|
1702
|
+
id: string;
|
|
1703
|
+
description?: string | undefined;
|
|
1704
|
+
priority: number;
|
|
1705
|
+
})[];
|
|
1706
|
+
ignoreDefaultRules: boolean;
|
|
1707
|
+
};
|
|
1708
|
+
callbacks: {
|
|
1709
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
1710
|
+
};
|
|
1711
|
+
} | null;
|
|
1712
|
+
} & import("pinia").PiniaCustomStateProperties<ConfigStoreState>) => string;
|
|
1713
|
+
/**
|
|
1714
|
+
* Get the campaign ID
|
|
1715
|
+
*/
|
|
1716
|
+
campaignId: (state: {
|
|
1717
|
+
initialized: boolean;
|
|
1718
|
+
config: {
|
|
1719
|
+
identity: {
|
|
1720
|
+
templateId: string;
|
|
1721
|
+
userId: string;
|
|
1722
|
+
variationId?: string | undefined;
|
|
1723
|
+
campaignId?: string | undefined;
|
|
1724
|
+
};
|
|
1725
|
+
partner: {
|
|
1726
|
+
name: string;
|
|
1727
|
+
productType: 60 | 49 | 97;
|
|
1728
|
+
messageType: 1 | 2;
|
|
1729
|
+
username: string;
|
|
1730
|
+
fallbackFont?: {
|
|
1731
|
+
name: string;
|
|
1732
|
+
family: string;
|
|
1733
|
+
} | undefined;
|
|
1734
|
+
};
|
|
1735
|
+
template: {
|
|
1736
|
+
html: string;
|
|
1737
|
+
css: string;
|
|
1738
|
+
preselectedDynamicContent: {
|
|
1739
|
+
text: string;
|
|
1740
|
+
value: string;
|
|
1741
|
+
fallback?: string | undefined;
|
|
1742
|
+
format?: {
|
|
1743
|
+
key: string;
|
|
1744
|
+
value: string;
|
|
1745
|
+
} | undefined;
|
|
1746
|
+
}[];
|
|
1747
|
+
dynamicContentList: {
|
|
1748
|
+
[x: string]: import("../library").DynamicContentNode[];
|
|
1749
|
+
};
|
|
1750
|
+
customFieldAttributes: string[];
|
|
1751
|
+
selectedUnsubscribePages: number[];
|
|
1752
|
+
forceRecreate: boolean;
|
|
1753
|
+
trackIdCounter: number;
|
|
1754
|
+
migration: {
|
|
1755
|
+
recommendationConfigs: {
|
|
1756
|
+
[x: string]: {
|
|
1757
|
+
id?: number | undefined;
|
|
1758
|
+
decimalCount?: string | number | undefined;
|
|
1759
|
+
productIds?: unknown[] | undefined;
|
|
1760
|
+
sendProductRequestFlag?: boolean | undefined;
|
|
1761
|
+
shuffleProducts?: boolean | undefined;
|
|
1762
|
+
filters?: unknown[] | undefined;
|
|
1763
|
+
currency?: string | undefined;
|
|
1764
|
+
currencySettings?: unknown;
|
|
1765
|
+
language?: string | undefined;
|
|
1766
|
+
strategy?: string | undefined;
|
|
1767
|
+
recommendedProducts?: unknown[] | undefined;
|
|
1768
|
+
cardsInRow?: number | undefined;
|
|
1769
|
+
mobileRightPadding?: number | undefined;
|
|
1770
|
+
mobileLeftPadding?: number | undefined;
|
|
1771
|
+
unresponsive?: boolean | undefined;
|
|
1772
|
+
orientation?: string | undefined;
|
|
1773
|
+
textTrimming?: boolean | undefined;
|
|
1774
|
+
blockType?: string | undefined;
|
|
1775
|
+
size?: string | number | undefined;
|
|
1776
|
+
verticalResponsiveness?: boolean | undefined;
|
|
1777
|
+
isPriceMovedToNextLine?: boolean | undefined;
|
|
1778
|
+
isPriceDeletedForZeroSale?: boolean | undefined;
|
|
1779
|
+
} & {
|
|
1780
|
+
[key: string]: unknown;
|
|
1781
|
+
};
|
|
1782
|
+
};
|
|
1783
|
+
};
|
|
1784
|
+
};
|
|
1785
|
+
editor: {
|
|
1786
|
+
locale: string;
|
|
1787
|
+
translationsPath: string;
|
|
1788
|
+
migrationDate: number;
|
|
1789
|
+
emailHeader: {
|
|
1790
|
+
senderName: string;
|
|
1791
|
+
subject: string;
|
|
1792
|
+
};
|
|
1793
|
+
savedModulesFolderName: string;
|
|
1794
|
+
defaultModulesFolderName: string;
|
|
1795
|
+
};
|
|
1796
|
+
ui: {
|
|
1797
|
+
showHeader: boolean;
|
|
1798
|
+
backButtonLabel?: string | undefined;
|
|
1799
|
+
};
|
|
1800
|
+
features: {
|
|
1801
|
+
dynamicContent: boolean;
|
|
1802
|
+
saveAsTemplate: boolean;
|
|
1803
|
+
versionHistory: boolean;
|
|
1804
|
+
testMessage: boolean;
|
|
1805
|
+
displayConditions: boolean;
|
|
1806
|
+
unsubscribe: boolean;
|
|
1807
|
+
modulesDisabled: boolean;
|
|
1808
|
+
liquidSyntax: boolean;
|
|
1809
|
+
autosave: boolean;
|
|
1810
|
+
allowlistEnabled: boolean;
|
|
1811
|
+
linkTrackingIds: boolean;
|
|
1812
|
+
reusableRecommendationStrategy: boolean;
|
|
1647
1813
|
};
|
|
1648
1814
|
blocks: {
|
|
1649
1815
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1696,6 +1862,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1696
1862
|
templateId: string;
|
|
1697
1863
|
userId: string;
|
|
1698
1864
|
variationId?: string | undefined;
|
|
1865
|
+
campaignId?: string | undefined;
|
|
1699
1866
|
};
|
|
1700
1867
|
partner: {
|
|
1701
1868
|
name: string;
|
|
@@ -1784,6 +1951,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1784
1951
|
autosave: boolean;
|
|
1785
1952
|
allowlistEnabled: boolean;
|
|
1786
1953
|
linkTrackingIds: boolean;
|
|
1954
|
+
reusableRecommendationStrategy: boolean;
|
|
1787
1955
|
};
|
|
1788
1956
|
blocks: {
|
|
1789
1957
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1836,6 +2004,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1836
2004
|
templateId: string;
|
|
1837
2005
|
userId: string;
|
|
1838
2006
|
variationId?: string | undefined;
|
|
2007
|
+
campaignId?: string | undefined;
|
|
1839
2008
|
};
|
|
1840
2009
|
partner: {
|
|
1841
2010
|
name: string;
|
|
@@ -1924,6 +2093,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1924
2093
|
autosave: boolean;
|
|
1925
2094
|
allowlistEnabled: boolean;
|
|
1926
2095
|
linkTrackingIds: boolean;
|
|
2096
|
+
reusableRecommendationStrategy: boolean;
|
|
1927
2097
|
};
|
|
1928
2098
|
blocks: {
|
|
1929
2099
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1976,6 +2146,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1976
2146
|
templateId: string;
|
|
1977
2147
|
userId: string;
|
|
1978
2148
|
variationId?: string | undefined;
|
|
2149
|
+
campaignId?: string | undefined;
|
|
1979
2150
|
};
|
|
1980
2151
|
partner: {
|
|
1981
2152
|
name: string;
|
|
@@ -2064,6 +2235,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2064
2235
|
autosave: boolean;
|
|
2065
2236
|
allowlistEnabled: boolean;
|
|
2066
2237
|
linkTrackingIds: boolean;
|
|
2238
|
+
reusableRecommendationStrategy: boolean;
|
|
2067
2239
|
};
|
|
2068
2240
|
blocks: {
|
|
2069
2241
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -2116,6 +2288,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2116
2288
|
templateId: string;
|
|
2117
2289
|
userId: string;
|
|
2118
2290
|
variationId?: string | undefined;
|
|
2291
|
+
campaignId?: string | undefined;
|
|
2119
2292
|
};
|
|
2120
2293
|
partner: {
|
|
2121
2294
|
name: string;
|
|
@@ -2204,6 +2377,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2204
2377
|
autosave: boolean;
|
|
2205
2378
|
allowlistEnabled: boolean;
|
|
2206
2379
|
linkTrackingIds: boolean;
|
|
2380
|
+
reusableRecommendationStrategy: boolean;
|
|
2207
2381
|
};
|
|
2208
2382
|
blocks: {
|
|
2209
2383
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -2256,6 +2430,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2256
2430
|
templateId: string;
|
|
2257
2431
|
userId: string;
|
|
2258
2432
|
variationId?: string | undefined;
|
|
2433
|
+
campaignId?: string | undefined;
|
|
2259
2434
|
};
|
|
2260
2435
|
partner: {
|
|
2261
2436
|
name: string;
|
|
@@ -2344,6 +2519,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2344
2519
|
autosave: boolean;
|
|
2345
2520
|
allowlistEnabled: boolean;
|
|
2346
2521
|
linkTrackingIds: boolean;
|
|
2522
|
+
reusableRecommendationStrategy: boolean;
|
|
2347
2523
|
};
|
|
2348
2524
|
blocks: {
|
|
2349
2525
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -2398,6 +2574,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2398
2574
|
templateId: string;
|
|
2399
2575
|
userId: string;
|
|
2400
2576
|
variationId?: string | undefined;
|
|
2577
|
+
campaignId?: string | undefined;
|
|
2401
2578
|
};
|
|
2402
2579
|
partner: {
|
|
2403
2580
|
name: string;
|
|
@@ -2486,6 +2663,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2486
2663
|
autosave: boolean;
|
|
2487
2664
|
allowlistEnabled: boolean;
|
|
2488
2665
|
linkTrackingIds: boolean;
|
|
2666
|
+
reusableRecommendationStrategy: boolean;
|
|
2489
2667
|
};
|
|
2490
2668
|
blocks: {
|
|
2491
2669
|
excludeDefaults: ("amp-accordion" | "amp-carousel" | "amp-form-controls" | "banner-block" | "button-block" | "html-block" | "image-block" | "menu-block" | "social-block" | "spacer-block" | "text-block" | "timer-block" | "video-block")[];
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RecommendationCampaignUrlValue } from '@@/Types/recommendation';
|
|
1
2
|
import type { MappedCategory } from '@@/Types/save-as-template';
|
|
2
3
|
interface StoreState {
|
|
3
4
|
templateName: string;
|
|
@@ -5,7 +6,7 @@ interface StoreState {
|
|
|
5
6
|
selectedCategories: MappedCategory[];
|
|
6
7
|
skeletonStatus: boolean;
|
|
7
8
|
recommendation: {
|
|
8
|
-
campaignUrls: Record<string,
|
|
9
|
+
campaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
9
10
|
configs: Record<string, string>;
|
|
10
11
|
};
|
|
11
12
|
unsubscribe: {
|
|
@@ -30,7 +31,7 @@ export declare const useSaveAsTemplateStore: import("pinia").StoreDefinition<"gu
|
|
|
30
31
|
}[];
|
|
31
32
|
skeletonStatus: boolean;
|
|
32
33
|
recommendation: {
|
|
33
|
-
campaignUrls: Record<string,
|
|
34
|
+
campaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
34
35
|
configs: Record<string, string>;
|
|
35
36
|
};
|
|
36
37
|
unsubscribe: {
|
|
@@ -54,7 +55,7 @@ export declare const useSaveAsTemplateStore: import("pinia").StoreDefinition<"gu
|
|
|
54
55
|
}[];
|
|
55
56
|
skeletonStatus: boolean;
|
|
56
57
|
recommendation: {
|
|
57
|
-
campaignUrls: Record<string,
|
|
58
|
+
campaignUrls: Record<string, RecommendationCampaignUrlValue>;
|
|
58
59
|
configs: Record<string, string>;
|
|
59
60
|
};
|
|
60
61
|
unsubscribe: {
|
|
@@ -25,3 +25,8 @@ export declare const getCsrfToken: () => string;
|
|
|
25
25
|
export declare const getUrlParams: () => URLSearchParams;
|
|
26
26
|
export declare const getUrlParam: (paramName: string, defaultValue?: string) => string;
|
|
27
27
|
export declare const replaceString: (string?: string, values?: Record<string, string | number>, isRemoveEmptyValues?: boolean) => string;
|
|
28
|
+
/**
|
|
29
|
+
* Narrows an unknown API value to a printable string; anything that is neither
|
|
30
|
+
* a string nor a number becomes ''.
|
|
31
|
+
*/
|
|
32
|
+
export declare const asText: (value: unknown) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Heals stale price currency attributes on every v2 Items block inside a dropped
|
|
3
|
+
* saved module, driving `data-curency` / `data-currency_symbol` from each block's
|
|
4
|
+
* `esd-ext-config`. A saved module can serialize attrs that no longer match its
|
|
5
|
+
* config; the server-side export reads those exact attrs, so left stale they ship
|
|
6
|
+
* the wrong currency position/symbol.
|
|
7
|
+
*
|
|
8
|
+
* Pure `string → string`. Returns the original string untouched when nothing needs
|
|
9
|
+
* healing (0 blocks, all in sync) so the caller's `html !== currentHtml` guard stays
|
|
10
|
+
* meaningful. Fail-open: any parse fault returns the input unchanged.
|
|
11
|
+
*
|
|
12
|
+
* The module `<td>` stripe has no table context, so it is wrapped before parsing —
|
|
13
|
+
* a bare `<td>` root is otherwise dropped by the HTML parser (same reason
|
|
14
|
+
* recommendationMigrator wraps). If the wrap fails to capture the blocks (non-`<td>`
|
|
15
|
+
* root foster-parented out), it bails to the original string.
|
|
16
|
+
*/
|
|
17
|
+
export declare function repairItemsCurrencyAttributes(html: string): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const C = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.9403 5.51003L17.6328 11.0273C17.8845 11.3769 18.0068 11.8382 17.9997 12.2963L18 12.3333C18 13.2538 17.4627 14 16.8 14H15V15C15 15.5523 14.5523 16 14 16H10C9.44772 16 9 15.5523 9 15V14H7.2C6.53726 14 6 13.2538 6 12.3333L6.00029 12.2963C5.9932 11.8382 6.11551 11.3769 6.36722 11.0273L11.0597 5.51003C11.3182 5.15101 11.6615 4.98153 12 5.00159C12.3386 4.98153 12.6818 5.15101 12.9403 5.51003Z"/><path d="M10 18C9.44772 18 9 18.4477 9 19C9 19.5523 9.44772 20 10 20H14C14.5523 20 15 19.5523 15 19C15 18.4477 14.5523 18 14 18H10Z"/></svg>
|
|
2
|
+
`;
|
|
3
|
+
export {
|
|
4
|
+
C as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const l = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M17.768 11.694a1.03 1.03 0 0 1-1.465 0 1.051 1.051 0 0 1 0-1.478L17.51 9H9a1 1 0 1 1 0-2h8.509l-1.206-1.216a1.051 1.051 0 0 1 0-1.478 1.03 1.03 0 0 1 1.465 0l2.929 2.955c.404.408.404 1.07 0 1.478l-2.93 2.955zM3.303 15.261a1.051 1.051 0 0 0 0 1.478l2.93 2.955a1.03 1.03 0 0 0 1.464 0 1.051 1.051 0 0 0 0-1.478L6.49 17H15a1 1 0 1 0 0-2H6.491l1.206-1.216a1.051 1.051 0 0 0 0-1.478 1.03 1.03 0 0 0-1.465 0l-2.929 2.955z"/></svg>
|
|
2
|
+
`;
|
|
3
|
+
export {
|
|
4
|
+
l as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const a = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 3a2 2 0 0 0-2 2v2H5a1 1 0 0 0 0 2h1v10a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V9h1a1 1 0 1 0 0-2h-3V5a2 2 0 0 0-2-2h-4zm4 4h-4V5h4v2zm-4 2h6v10H8V9h2zm2 2a1 1 0 0 0-1 1v4a1 1 0 1 0 2 0v-4a1 1 0 0 0-1-1z"></path></svg>
|
|
2
|
+
`;
|
|
3
|
+
export {
|
|
4
|
+
a as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const C = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 4C14.1217 4 16.1566 4.84285 17.6569 6.34315C19.1571 7.84344 20 9.87827 20 12C20 14.1217 19.1571 16.1566 17.6569 17.6569C16.1566 19.1571 14.1217 20 12 20C9.87827 20 7.84344 19.1571 6.34315 17.6569C4.84285 16.1566 4 14.1217 4 12C4 9.87827 4.84285 7.84344 6.34315 6.34315C7.84344 4.84285 9.87827 4 12 4ZM12 5.6C10.3026 5.6 8.67475 6.27428 7.47452 7.47452C6.27428 8.67475 5.6 10.3026 5.6 12C5.6 13.6974 6.27428 15.3253 7.47452 16.5255C8.67475 17.7257 10.3026 18.4 12 18.4C13.6974 18.4 15.3253 17.7257 16.5255 16.5255C17.7257 15.3253 18.4 13.6974 18.4 12C18.4 10.3026 17.7257 8.67475 16.5255 7.47452C15.3253 6.27428 13.6974 5.6 12 5.6ZM11.496 10.448C11.928 10.448 12.264 10.552 12.496 10.768C12.736 10.976 12.848 11.248 12.848 11.584V11.688L12.824 11.944C12.816 12.064 12.8 12.176 12.776 12.28L12.736 12.432L12.288 14.024L12.248 14.152C12.1976 14.376 12.1629 14.6032 12.144 14.832C12.144 15.04 12.192 15.184 12.288 15.264C12.384 15.344 12.544 15.376 12.776 15.376C12.888 15.376 13.016 15.36 13.152 15.32L13.392 15.24L13.448 15.216L13.328 15.712L12.848 15.896L12.584 15.992L12.464 16.032C12.248 16.112 12 16.144 11.72 16.144C11.28 16.144 10.944 16.04 10.696 15.824C10.5803 15.7241 10.488 15.5998 10.4258 15.4602C10.3636 15.3205 10.3329 15.1689 10.336 15.016C10.3355 14.787 10.3624 14.5587 10.416 14.336L10.448 14.176L10.896 12.576L10.936 12.424L11 12.144C11.024 12.008 11.04 11.88 11.04 11.768C11.04 11.56 11 11.424 10.912 11.344C10.832 11.264 10.672 11.224 10.432 11.224C10.312 11.224 10.192 11.24 10.072 11.272L9.856 11.352L9.76 11.376L9.88 10.888L10.168 10.776C10.36 10.696 10.544 10.632 10.728 10.576C11 10.496 11.256 10.448 11.496 10.448ZM12.496 7.536C12.792 7.536 13.04 7.632 13.248 7.832C13.464 8.024 13.568 8.264 13.568 8.544C13.568 8.816 13.464 9.056 13.248 9.248C13.04 9.44 12.792 9.544 12.496 9.544C12.2 9.544 11.944 9.44 11.736 9.248C11.52 9.056 11.416 8.816 11.416 8.544C11.416 8.264 11.52 8.024 11.736 7.824C11.944 7.632 12.2 7.536 12.496 7.536Z"/></svg>
|
|
2
|
+
`;
|
|
3
|
+
export {
|
|
4
|
+
C as default
|
|
5
|
+
};
|