@useinsider/guido 3.2.0 → 3.3.0
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 +117 -1
- package/dist/@types/config/schemas.js +153 -95
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +90 -88
- package/dist/components/organisms/AutoSaveController.vue.js +17 -0
- package/dist/components/organisms/AutoSaveController.vue2.js +13 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue.js +22 -0
- package/dist/components/organisms/header/AutoSaveToggle.vue2.js +19 -0
- package/dist/components/organisms/header/RightSlot.vue.js +8 -8
- package/dist/components/organisms/header/RightSlot.vue2.js +9 -8
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
- package/dist/composables/useActionsApi.js +4 -4
- package/dist/composables/useAutoSave.js +71 -0
- package/dist/composables/useFullStoryBridge.js +14 -0
- package/dist/composables/useRecommendation.js +46 -26
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/composables/useSave.js +19 -16
- package/dist/composables/useStripo.js +40 -40
- package/dist/composables/validators/useCouponBlockValidator.js +24 -0
- package/dist/config/compiler/recommendationCompilerRules.js +79 -74
- package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
- package/dist/config/compiler/utils/recommendationCompilerUtils.js +107 -71
- package/dist/config/migrator/index.js +9 -9
- package/dist/config/migrator/radioButtonMigrator.js +64 -44
- package/dist/config/migrator/recommendation/compositionMapper.js +98 -0
- package/dist/config/migrator/recommendation/extractors.js +27 -0
- package/dist/config/migrator/recommendation/htmlBuilder.js +496 -0
- package/dist/config/migrator/recommendation/parseLegacyConfig.js +33 -0
- package/dist/config/migrator/recommendation/settingsMapper.js +70 -0
- package/dist/config/migrator/recommendation/themeMapper.js +93 -0
- package/dist/config/migrator/recommendationMigrator.js +74 -290
- package/dist/enums/extensions/recommendationBlock.js +2 -1
- package/dist/enums/onboarding.js +7 -2
- package/dist/enums/unsubscribe.js +34 -27
- package/dist/extensions/Blocks/Items/controls/price/singlePrice.js +38 -38
- package/dist/extensions/Blocks/Items/enums/productEnums.js +19 -7
- package/dist/extensions/Blocks/RadioButton/template.js +1 -1
- package/dist/extensions/Blocks/Recommendation/block.js +35 -32
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +5 -5
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/index.js +21 -18
- package/dist/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.js +99 -0
- package/dist/extensions/Blocks/Recommendation/controls/main/algorithm.js +27 -26
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +3 -1
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +228 -181
- package/dist/extensions/Blocks/Recommendation/controls/name/textTrim.js +27 -57
- package/dist/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.js +14 -0
- package/dist/extensions/Blocks/Recommendation/services/configService.js +65 -29
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +18 -17
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +123 -79
- package/dist/extensions/Blocks/Recommendation/templates/grid/elementRenderer.js +19 -10
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +8 -8
- package/dist/extensions/Blocks/Recommendation/templates/list/elementRenderer.js +25 -15
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +11 -11
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +1 -1
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +17 -14
- package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +21 -0
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +13 -22
- package/dist/extensions/Blocks/Unsubscribe/block.js +11 -11
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +393 -264
- package/dist/node_modules/valibot/dist/index.js +450 -235
- package/dist/package.json.js +1 -1
- package/dist/services/templateLibraryApi.js +5 -4
- package/dist/src/@types/config/defaults.d.ts +5 -1
- package/dist/src/@types/config/index.d.ts +3 -3
- package/dist/src/@types/config/schemas.d.ts +217 -0
- package/dist/src/@types/config/types.d.ts +9 -1
- package/dist/src/components/Guido.vue.d.ts +1 -1
- package/dist/src/components/organisms/AutoSaveController.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/AutoSaveToggle.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/composables/useActionsApi.d.ts +1 -1
- package/dist/src/composables/useAutoSave.d.ts +3 -0
- package/dist/src/composables/useConfig.d.ts +58 -0
- package/dist/src/composables/useFullStoryBridge.d.ts +11 -0
- package/dist/src/composables/useRecommendation.d.ts +10 -1
- package/dist/src/composables/useRecommendation.test.d.ts +1 -0
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/composables/useSave.d.ts +1 -1
- package/dist/src/composables/validators/useCouponBlockValidator.d.ts +3 -0
- package/dist/src/config/migrator/index.d.ts +2 -1
- package/dist/src/config/migrator/recommendation/compositionMapper.d.ts +2 -0
- package/dist/src/config/migrator/recommendation/compositionMapper.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/extractors.d.ts +7 -0
- package/dist/src/config/migrator/recommendation/extractors.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/htmlBuilder.d.ts +11 -0
- package/dist/src/config/migrator/recommendation/parseLegacyConfig.d.ts +15 -0
- package/dist/src/config/migrator/recommendation/parseLegacyConfig.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/settingsMapper.d.ts +7 -0
- package/dist/src/config/migrator/recommendation/settingsMapper.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/themeMapper.d.ts +5 -0
- package/dist/src/config/migrator/recommendation/themeMapper.test.d.ts +1 -0
- package/dist/src/config/migrator/recommendation/types.d.ts +205 -0
- package/dist/src/config/migrator/recommendationMigrator.d.ts +13 -1
- package/dist/src/config/migrator/recommendationMigrator.test.d.ts +1 -0
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/enums/unsubscribe.d.ts +5 -0
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +3 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +35 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.test.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/name/textTrim.d.ts +3 -20
- package/dist/src/extensions/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +29 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.d.ts +10 -0
- package/dist/src/extensions/Blocks/Recommendation/services/configService.test.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +34 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +1 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +21 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.test.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -3
- package/dist/src/library.d.ts +1 -1
- package/dist/src/stores/autosave.d.ts +12 -0
- package/dist/src/stores/config.d.ts +522 -0
- package/dist/src/stores/editor.d.ts +23 -0
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/src/utils/htmlEscape.d.ts +5 -0
- package/dist/src/utils/htmlEscape.test.d.ts +1 -0
- package/dist/src/utils/timeUtil.d.ts +8 -0
- package/dist/static/styles/components/button.css.js +16 -9
- package/dist/static/styles/components/loader.css.js +4 -0
- package/dist/static/styles/components/narrow-panel.css.js +52 -0
- package/dist/stores/autosave.js +17 -0
- package/dist/stores/editor.js +3 -1
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/htmlEscape.js +13 -0
- package/dist/utils/pairProductVariables.js +89 -88
- package/dist/utils/templatePreparation.js +72 -32
- package/dist/utils/timeUtil.js +19 -0
- package/package.json +7 -3
- package/dist/enums/displayConditions.js +0 -80
- package/dist/extensions/Blocks/Recommendation/templates/grid/migration.js +0 -251
- package/dist/src/enums/displayConditions.d.ts +0 -2
package/dist/package.json.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useConfig as w } from "../composables/useConfig.js";
|
|
2
2
|
import { useHttp as b } from "../composables/useHttp.js";
|
|
3
|
-
import { useToaster as
|
|
4
|
-
import { useTranslations as
|
|
3
|
+
import { useToaster as C } from "../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as h } from "../composables/useTranslations.js";
|
|
5
5
|
import { useLiquidValidator as S } from "../composables/validators/useLiquidValidator.js";
|
|
6
6
|
import { EditorType as v } from "../enums/defaults.js";
|
|
7
7
|
import { useRecommendationExtensionStore as N } from "../extensions/Blocks/Recommendation/store/recommendation.js";
|
|
@@ -9,7 +9,7 @@ import { useSaveAsTemplateStore as x } from "../stores/save-as-template.js";
|
|
|
9
9
|
import { base64EncodeWithSpecialChars as r } from "../utils/base64.js";
|
|
10
10
|
import { useTemplatePreparation as A } from "../utils/templatePreparation.js";
|
|
11
11
|
const $ = () => {
|
|
12
|
-
const { get: n, post: m } = b(), { handleError: o, showToaster: l } =
|
|
12
|
+
const { get: n, post: m } = b(), { handleError: o, showToaster: l } = C(), { config: c, isFeatureEnabled: p } = w(), { validateLiquidSyntax: g } = S(), u = h();
|
|
13
13
|
return {
|
|
14
14
|
getCategories: async () => {
|
|
15
15
|
try {
|
|
@@ -62,7 +62,8 @@ const $ = () => {
|
|
|
62
62
|
stripoConfig: r({
|
|
63
63
|
editor: "stripo",
|
|
64
64
|
html: a.rawHtml,
|
|
65
|
-
css: a.css
|
|
65
|
+
css: a.css,
|
|
66
|
+
dynamicContentList: a.dynamicContentList
|
|
66
67
|
})
|
|
67
68
|
}, { data: { type: T } } = await m(
|
|
68
69
|
"/newsletter/template-library/create-template",
|
|
@@ -5,11 +5,15 @@
|
|
|
5
5
|
* These are applied during validation when values are not provided.
|
|
6
6
|
* @module @types/config/defaults
|
|
7
7
|
*/
|
|
8
|
-
import type { TemplateConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, EmailHeader } from './types';
|
|
8
|
+
import type { TemplateConfig, TemplateMigrationConfig, EditorConfig, UIConfig, FeaturesConfig, BlocksConfig, CompilerConfig, EmailHeader } from './types';
|
|
9
9
|
/**
|
|
10
10
|
* Default email header values
|
|
11
11
|
*/
|
|
12
12
|
export declare const DEFAULT_EMAIL_HEADER: EmailHeader;
|
|
13
|
+
/**
|
|
14
|
+
* Default template migration configuration
|
|
15
|
+
*/
|
|
16
|
+
export declare const DEFAULT_TEMPLATE_MIGRATION: TemplateMigrationConfig;
|
|
13
17
|
/**
|
|
14
18
|
* Default template configuration
|
|
15
19
|
*/
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* - Default values for optional configuration
|
|
8
8
|
* - Validation utilities
|
|
9
9
|
*/
|
|
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, 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
|
-
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';
|
|
10
|
+
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, 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, FallbackFont, TemplateConfig, TemplateConfigInput, TemplateMigrationConfig, TemplateMigrationConfigInput, LegacyRecommendationConfig, LegacyRecommendationConfigInput, 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
|
+
export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_TEMPLATE_MIGRATION, 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';
|
|
@@ -86,6 +86,117 @@ export declare const DynamicContentSchema: v.ObjectSchema<{
|
|
|
86
86
|
readonly value: v.StringSchema<undefined>;
|
|
87
87
|
}, undefined>, undefined>;
|
|
88
88
|
}, undefined>;
|
|
89
|
+
/**
|
|
90
|
+
* Legacy recommendation block config (v1 format) keyed by block ID.
|
|
91
|
+
*
|
|
92
|
+
* Used by the recommendation migrator to enrich migrated blocks with
|
|
93
|
+
* filter, strategy, currency, language, and layout data that cannot be
|
|
94
|
+
* fully recovered from the legacy HTML alone.
|
|
95
|
+
*
|
|
96
|
+
* `looseObject` is used because legacy partner data shapes vary
|
|
97
|
+
* (e.g. some entries carry `verticalResponsiveness`, others `blockType`,
|
|
98
|
+
* `orientation`, `size`). Unknown keys are preserved and forwarded to
|
|
99
|
+
* the migrator unchanged.
|
|
100
|
+
*/
|
|
101
|
+
export declare const LegacyRecommendationConfigSchema: v.LooseObjectSchema<{
|
|
102
|
+
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
103
|
+
readonly id: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
104
|
+
/** Decimal places for price display (legacy data may use string or number) */
|
|
105
|
+
readonly decimalCount: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
106
|
+
/** Pinned product IDs (empty array when filter-driven) */
|
|
107
|
+
readonly productIds: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
108
|
+
/** Whether the block requested live products at send time */
|
|
109
|
+
readonly sendProductRequestFlag: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
110
|
+
/** Whether to randomize product order */
|
|
111
|
+
readonly shuffleProducts: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
112
|
+
/** Filter rules driving product selection */
|
|
113
|
+
readonly filters: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
114
|
+
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
115
|
+
readonly currency: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
116
|
+
/** Currency display settings (separators, alignment, decimals) */
|
|
117
|
+
readonly currencySettings: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
118
|
+
/** Locale (e.g. 'nl_NL') */
|
|
119
|
+
readonly language: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
120
|
+
/** Recommendation strategy key (e.g. 'newArrivals') */
|
|
121
|
+
readonly strategy: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
122
|
+
/** Snapshot of products as rendered by the legacy block */
|
|
123
|
+
readonly recommendedProducts: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
124
|
+
/** Number of product cards per row */
|
|
125
|
+
readonly cardsInRow: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
126
|
+
/** Mobile-only padding (right) */
|
|
127
|
+
readonly mobileRightPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
128
|
+
/** Mobile-only padding (left) */
|
|
129
|
+
readonly mobileLeftPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
130
|
+
/** Disable responsive scaling */
|
|
131
|
+
readonly unresponsive: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
132
|
+
/** Layout orientation ('vertical' | 'horizontal') */
|
|
133
|
+
readonly orientation: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
134
|
+
/** Whether long text is trimmed */
|
|
135
|
+
readonly textTrimming: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
136
|
+
/** Block type marker used by some legacy variants */
|
|
137
|
+
readonly blockType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
138
|
+
/** Size variant marker (legacy data may use string or number) */
|
|
139
|
+
readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
140
|
+
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
141
|
+
readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
142
|
+
}, undefined>;
|
|
143
|
+
/**
|
|
144
|
+
* Migration-only inputs scoped to this template.
|
|
145
|
+
*
|
|
146
|
+
* These fields are consumed by template migrators when upgrading
|
|
147
|
+
* legacy block formats to current versions. They have no effect on
|
|
148
|
+
* editor behavior once the template is in the current format.
|
|
149
|
+
*/
|
|
150
|
+
export declare const TemplateMigrationSchema: v.ObjectSchema<{
|
|
151
|
+
/**
|
|
152
|
+
* Legacy recommendation block configs keyed by block ID.
|
|
153
|
+
* Pass this when loading a template authored with the v1
|
|
154
|
+
* recommendation block so the migrator can preserve filters,
|
|
155
|
+
* strategy, currency, locale, and layout data.
|
|
156
|
+
*/
|
|
157
|
+
readonly recommendationConfigs: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.LooseObjectSchema<{
|
|
158
|
+
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
159
|
+
readonly id: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
160
|
+
/** Decimal places for price display (legacy data may use string or number) */
|
|
161
|
+
readonly decimalCount: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
162
|
+
/** Pinned product IDs (empty array when filter-driven) */
|
|
163
|
+
readonly productIds: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
164
|
+
/** Whether the block requested live products at send time */
|
|
165
|
+
readonly sendProductRequestFlag: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
166
|
+
/** Whether to randomize product order */
|
|
167
|
+
readonly shuffleProducts: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
168
|
+
/** Filter rules driving product selection */
|
|
169
|
+
readonly filters: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
170
|
+
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
171
|
+
readonly currency: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
172
|
+
/** Currency display settings (separators, alignment, decimals) */
|
|
173
|
+
readonly currencySettings: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
174
|
+
/** Locale (e.g. 'nl_NL') */
|
|
175
|
+
readonly language: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
176
|
+
/** Recommendation strategy key (e.g. 'newArrivals') */
|
|
177
|
+
readonly strategy: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
178
|
+
/** Snapshot of products as rendered by the legacy block */
|
|
179
|
+
readonly recommendedProducts: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
180
|
+
/** Number of product cards per row */
|
|
181
|
+
readonly cardsInRow: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
182
|
+
/** Mobile-only padding (right) */
|
|
183
|
+
readonly mobileRightPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
184
|
+
/** Mobile-only padding (left) */
|
|
185
|
+
readonly mobileLeftPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
186
|
+
/** Disable responsive scaling */
|
|
187
|
+
readonly unresponsive: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
188
|
+
/** Layout orientation ('vertical' | 'horizontal') */
|
|
189
|
+
readonly orientation: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
190
|
+
/** Whether long text is trimmed */
|
|
191
|
+
readonly textTrimming: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
192
|
+
/** Block type marker used by some legacy variants */
|
|
193
|
+
readonly blockType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
194
|
+
/** Size variant marker (legacy data may use string or number) */
|
|
195
|
+
readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
196
|
+
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
197
|
+
readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
198
|
+
}, undefined>, undefined>, {}>;
|
|
199
|
+
}, undefined>;
|
|
89
200
|
/**
|
|
90
201
|
* Template configuration - initial content and preselected values
|
|
91
202
|
*/
|
|
@@ -114,6 +225,57 @@ export declare const TemplateSchema: v.ObjectSchema<{
|
|
|
114
225
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
115
226
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
116
227
|
readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
228
|
+
/** Migration-only inputs (legacy block configs) */
|
|
229
|
+
readonly migration: v.OptionalSchema<v.ObjectSchema<{
|
|
230
|
+
/**
|
|
231
|
+
* Legacy recommendation block configs keyed by block ID.
|
|
232
|
+
* Pass this when loading a template authored with the v1
|
|
233
|
+
* recommendation block so the migrator can preserve filters,
|
|
234
|
+
* strategy, currency, locale, and layout data.
|
|
235
|
+
*/
|
|
236
|
+
readonly recommendationConfigs: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.LooseObjectSchema<{
|
|
237
|
+
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
238
|
+
readonly id: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
239
|
+
/** Decimal places for price display (legacy data may use string or number) */
|
|
240
|
+
readonly decimalCount: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
241
|
+
/** Pinned product IDs (empty array when filter-driven) */
|
|
242
|
+
readonly productIds: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
243
|
+
/** Whether the block requested live products at send time */
|
|
244
|
+
readonly sendProductRequestFlag: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
245
|
+
/** Whether to randomize product order */
|
|
246
|
+
readonly shuffleProducts: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
247
|
+
/** Filter rules driving product selection */
|
|
248
|
+
readonly filters: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
249
|
+
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
250
|
+
readonly currency: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
251
|
+
/** Currency display settings (separators, alignment, decimals) */
|
|
252
|
+
readonly currencySettings: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
253
|
+
/** Locale (e.g. 'nl_NL') */
|
|
254
|
+
readonly language: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
255
|
+
/** Recommendation strategy key (e.g. 'newArrivals') */
|
|
256
|
+
readonly strategy: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
257
|
+
/** Snapshot of products as rendered by the legacy block */
|
|
258
|
+
readonly recommendedProducts: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
259
|
+
/** Number of product cards per row */
|
|
260
|
+
readonly cardsInRow: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
261
|
+
/** Mobile-only padding (right) */
|
|
262
|
+
readonly mobileRightPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
263
|
+
/** Mobile-only padding (left) */
|
|
264
|
+
readonly mobileLeftPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
265
|
+
/** Disable responsive scaling */
|
|
266
|
+
readonly unresponsive: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
267
|
+
/** Layout orientation ('vertical' | 'horizontal') */
|
|
268
|
+
readonly orientation: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
269
|
+
/** Whether long text is trimmed */
|
|
270
|
+
readonly textTrimming: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
271
|
+
/** Block type marker used by some legacy variants */
|
|
272
|
+
readonly blockType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
273
|
+
/** Size variant marker (legacy data may use string or number) */
|
|
274
|
+
readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
275
|
+
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
276
|
+
readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
277
|
+
}, undefined>, undefined>, {}>;
|
|
278
|
+
}, undefined>, {}>;
|
|
117
279
|
}, undefined>;
|
|
118
280
|
/**
|
|
119
281
|
* Email header configuration (sender name and subject)
|
|
@@ -178,6 +340,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
178
340
|
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
179
341
|
/** Enable Liquid template syntax */
|
|
180
342
|
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
343
|
+
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
344
|
+
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
181
345
|
}, undefined>;
|
|
182
346
|
/**
|
|
183
347
|
* Default block types available in Stripo
|
|
@@ -452,6 +616,57 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
452
616
|
readonly selectedUnsubscribePages: v.OptionalSchema<v.ArraySchema<v.NumberSchema<undefined>, undefined>, readonly []>;
|
|
453
617
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
454
618
|
readonly forceRecreate: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
619
|
+
/** Migration-only inputs (legacy block configs) */
|
|
620
|
+
readonly migration: v.OptionalSchema<v.ObjectSchema<{
|
|
621
|
+
/**
|
|
622
|
+
* Legacy recommendation block configs keyed by block ID.
|
|
623
|
+
* Pass this when loading a template authored with the v1
|
|
624
|
+
* recommendation block so the migrator can preserve filters,
|
|
625
|
+
* strategy, currency, locale, and layout data.
|
|
626
|
+
*/
|
|
627
|
+
readonly recommendationConfigs: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.LooseObjectSchema<{
|
|
628
|
+
/** Block ID (matches the dictionary key and the legacy HTML element id) */
|
|
629
|
+
readonly id: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
630
|
+
/** Decimal places for price display (legacy data may use string or number) */
|
|
631
|
+
readonly decimalCount: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
632
|
+
/** Pinned product IDs (empty array when filter-driven) */
|
|
633
|
+
readonly productIds: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
634
|
+
/** Whether the block requested live products at send time */
|
|
635
|
+
readonly sendProductRequestFlag: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
636
|
+
/** Whether to randomize product order */
|
|
637
|
+
readonly shuffleProducts: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
638
|
+
/** Filter rules driving product selection */
|
|
639
|
+
readonly filters: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
640
|
+
/** Currency code (e.g. 'EUR') — sometimes absent in legacy data */
|
|
641
|
+
readonly currency: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
642
|
+
/** Currency display settings (separators, alignment, decimals) */
|
|
643
|
+
readonly currencySettings: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
644
|
+
/** Locale (e.g. 'nl_NL') */
|
|
645
|
+
readonly language: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
646
|
+
/** Recommendation strategy key (e.g. 'newArrivals') */
|
|
647
|
+
readonly strategy: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
648
|
+
/** Snapshot of products as rendered by the legacy block */
|
|
649
|
+
readonly recommendedProducts: v.OptionalSchema<v.ArraySchema<v.UnknownSchema, undefined>, undefined>;
|
|
650
|
+
/** Number of product cards per row */
|
|
651
|
+
readonly cardsInRow: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
652
|
+
/** Mobile-only padding (right) */
|
|
653
|
+
readonly mobileRightPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
654
|
+
/** Mobile-only padding (left) */
|
|
655
|
+
readonly mobileLeftPadding: v.OptionalSchema<v.NumberSchema<undefined>, undefined>;
|
|
656
|
+
/** Disable responsive scaling */
|
|
657
|
+
readonly unresponsive: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
658
|
+
/** Layout orientation ('vertical' | 'horizontal') */
|
|
659
|
+
readonly orientation: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
660
|
+
/** Whether long text is trimmed */
|
|
661
|
+
readonly textTrimming: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
662
|
+
/** Block type marker used by some legacy variants */
|
|
663
|
+
readonly blockType: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
664
|
+
/** Size variant marker (legacy data may use string or number) */
|
|
665
|
+
readonly size: v.OptionalSchema<v.UnionSchema<[v.StringSchema<undefined>, v.NumberSchema<undefined>], undefined>, undefined>;
|
|
666
|
+
/** Vertical responsiveness flag (legacy size=1 variants) */
|
|
667
|
+
readonly verticalResponsiveness: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
|
|
668
|
+
}, undefined>, undefined>, {}>;
|
|
669
|
+
}, undefined>, {}>;
|
|
455
670
|
}, undefined>, {}>;
|
|
456
671
|
/** Editor settings */
|
|
457
672
|
readonly editor: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -501,6 +716,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
501
716
|
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
502
717
|
/** Enable Liquid template syntax */
|
|
503
718
|
readonly liquidSyntax: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
719
|
+
/** Enable autosave (3-min interval + tab-hide). User toggles on/off from the header. */
|
|
720
|
+
readonly autosave: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
504
721
|
}, undefined>, {}>;
|
|
505
722
|
/** Block configuration */
|
|
506
723
|
readonly blocks: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -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, FallbackFontSchema, ExternalValidationHandler } from './schemas';
|
|
8
|
+
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, TemplateMigrationSchema, LegacyRecommendationConfigSchema, 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.
|
|
@@ -33,6 +33,10 @@ export type PartnerConfig = v.InferOutput<typeof PartnerSchema>;
|
|
|
33
33
|
export type FallbackFont = v.InferOutput<typeof FallbackFontSchema>;
|
|
34
34
|
/** Template configuration (html, css, dynamic content, unsubscribe pages) */
|
|
35
35
|
export type TemplateConfig = v.InferOutput<typeof TemplateSchema>;
|
|
36
|
+
/** Migration-only inputs scoped to a template */
|
|
37
|
+
export type TemplateMigrationConfig = v.InferOutput<typeof TemplateMigrationSchema>;
|
|
38
|
+
/** Legacy v1 recommendation block config (keyed by block ID in `recommendationConfigs`) */
|
|
39
|
+
export type LegacyRecommendationConfig = v.InferOutput<typeof LegacyRecommendationConfigSchema>;
|
|
36
40
|
/** Editor configuration (locale, translations, migration date, email header) */
|
|
37
41
|
export type EditorConfig = v.InferOutput<typeof EditorSchema>;
|
|
38
42
|
/** UI configuration (showHeader, backButtonLabel) */
|
|
@@ -81,6 +85,10 @@ export type IdentityConfigInput = v.InferInput<typeof IdentitySchema>;
|
|
|
81
85
|
export type PartnerConfigInput = v.InferInput<typeof PartnerSchema>;
|
|
82
86
|
/** Input type for template configuration */
|
|
83
87
|
export type TemplateConfigInput = v.InferInput<typeof TemplateSchema>;
|
|
88
|
+
/** Input type for template migration configuration */
|
|
89
|
+
export type TemplateMigrationConfigInput = v.InferInput<typeof TemplateMigrationSchema>;
|
|
90
|
+
/** Input type for a single legacy recommendation block config */
|
|
91
|
+
export type LegacyRecommendationConfigInput = v.InferInput<typeof LegacyRecommendationConfigSchema>;
|
|
84
92
|
/** Input type for editor configuration */
|
|
85
93
|
export type EditorConfigInput = v.InferInput<typeof EditorSchema>;
|
|
86
94
|
/** Input type for UI configuration */
|
|
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
11
11
|
close: () => void;
|
|
12
12
|
};
|
|
13
13
|
hasChanges: import("vue").ComputedRef<boolean>;
|
|
14
|
-
saveSilent: () => Promise<Omit<SavedTemplateDetails, "metadata"> | undefined> | undefined;
|
|
14
|
+
saveSilent: () => Promise<Omit<SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
15
15
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
16
16
|
"dynamic-content:open": (detail: {
|
|
17
17
|
text: string;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata"> | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata"> | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata"> | undefined> | undefined;
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata" | "silent"> | undefined> | undefined;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -32,8 +32,8 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
32
32
|
closeOnOutsideClick: boolean;
|
|
33
33
|
footerStatus: boolean;
|
|
34
34
|
}>>>, {
|
|
35
|
-
description: string;
|
|
36
35
|
size: "X-small" | "small" | "medium" | "large";
|
|
36
|
+
description: string;
|
|
37
37
|
closeOnOutsideClick: boolean;
|
|
38
38
|
footerButtonOptions: FooterButtonGroup;
|
|
39
39
|
closeButtonStatus: boolean;
|
|
@@ -7,5 +7,5 @@ export declare const useActionsApi: () => {
|
|
|
7
7
|
getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
|
|
8
8
|
updateTimerInClonedTemplate: () => Promise<string | null>;
|
|
9
9
|
updateHtmlAndCss: (html: string, css: string) => void;
|
|
10
|
-
editorSave: () => void
|
|
10
|
+
editorSave: () => Promise<void>;
|
|
11
11
|
};
|
|
@@ -37,6 +37,34 @@ export declare const useConfig: () => {
|
|
|
37
37
|
customFieldAttributes: string[];
|
|
38
38
|
selectedUnsubscribePages: number[];
|
|
39
39
|
forceRecreate: boolean;
|
|
40
|
+
migration: {
|
|
41
|
+
recommendationConfigs: {
|
|
42
|
+
[x: string]: {
|
|
43
|
+
id?: number | undefined;
|
|
44
|
+
decimalCount?: string | number | undefined;
|
|
45
|
+
productIds?: unknown[] | undefined;
|
|
46
|
+
sendProductRequestFlag?: boolean | undefined;
|
|
47
|
+
shuffleProducts?: boolean | undefined;
|
|
48
|
+
filters?: unknown[] | undefined;
|
|
49
|
+
currency?: string | undefined;
|
|
50
|
+
currencySettings?: unknown;
|
|
51
|
+
language?: string | undefined;
|
|
52
|
+
strategy?: string | undefined;
|
|
53
|
+
recommendedProducts?: unknown[] | undefined;
|
|
54
|
+
cardsInRow?: number | undefined;
|
|
55
|
+
mobileRightPadding?: number | undefined;
|
|
56
|
+
mobileLeftPadding?: number | undefined;
|
|
57
|
+
unresponsive?: boolean | undefined;
|
|
58
|
+
orientation?: string | undefined;
|
|
59
|
+
textTrimming?: boolean | undefined;
|
|
60
|
+
blockType?: string | undefined;
|
|
61
|
+
size?: string | number | undefined;
|
|
62
|
+
verticalResponsiveness?: boolean | undefined;
|
|
63
|
+
} & {
|
|
64
|
+
[key: string]: unknown;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
};
|
|
40
68
|
};
|
|
41
69
|
editor: {
|
|
42
70
|
locale: string;
|
|
@@ -62,6 +90,7 @@ export declare const useConfig: () => {
|
|
|
62
90
|
unsubscribe: boolean;
|
|
63
91
|
modulesDisabled: boolean;
|
|
64
92
|
liquidSyntax: boolean;
|
|
93
|
+
autosave: boolean;
|
|
65
94
|
};
|
|
66
95
|
blocks: {
|
|
67
96
|
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")[];
|
|
@@ -134,6 +163,34 @@ export declare const useConfig: () => {
|
|
|
134
163
|
customFieldAttributes: string[];
|
|
135
164
|
selectedUnsubscribePages: number[];
|
|
136
165
|
forceRecreate: boolean;
|
|
166
|
+
migration: {
|
|
167
|
+
recommendationConfigs: {
|
|
168
|
+
[x: string]: {
|
|
169
|
+
id?: number | undefined;
|
|
170
|
+
decimalCount?: string | number | undefined;
|
|
171
|
+
productIds?: unknown[] | undefined;
|
|
172
|
+
sendProductRequestFlag?: boolean | undefined;
|
|
173
|
+
shuffleProducts?: boolean | undefined;
|
|
174
|
+
filters?: unknown[] | undefined;
|
|
175
|
+
currency?: string | undefined;
|
|
176
|
+
currencySettings?: unknown;
|
|
177
|
+
language?: string | undefined;
|
|
178
|
+
strategy?: string | undefined;
|
|
179
|
+
recommendedProducts?: unknown[] | undefined;
|
|
180
|
+
cardsInRow?: number | undefined;
|
|
181
|
+
mobileRightPadding?: number | undefined;
|
|
182
|
+
mobileLeftPadding?: number | undefined;
|
|
183
|
+
unresponsive?: boolean | undefined;
|
|
184
|
+
orientation?: string | undefined;
|
|
185
|
+
textTrimming?: boolean | undefined;
|
|
186
|
+
blockType?: string | undefined;
|
|
187
|
+
size?: string | number | undefined;
|
|
188
|
+
verticalResponsiveness?: boolean | undefined;
|
|
189
|
+
} & {
|
|
190
|
+
[key: string]: unknown;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
137
194
|
} | null>;
|
|
138
195
|
editor: import("vue").ComputedRef<{
|
|
139
196
|
locale: string;
|
|
@@ -159,6 +216,7 @@ export declare const useConfig: () => {
|
|
|
159
216
|
unsubscribe: boolean;
|
|
160
217
|
modulesDisabled: boolean;
|
|
161
218
|
liquidSyntax: boolean;
|
|
219
|
+
autosave: boolean;
|
|
162
220
|
} | null>;
|
|
163
221
|
blocks: import("vue").ComputedRef<{
|
|
164
222
|
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")[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Injects the hosted FullStory bridge script into the Stripo editor iframe.
|
|
3
|
+
*
|
|
4
|
+
* The bridge script's origin is allowlisted via Stripo's
|
|
5
|
+
* `allowedScriptSourceDomains` in useStripo, so the iframe's CSP permits
|
|
6
|
+
* the load. The bundled script itself handles reading FS config from the
|
|
7
|
+
* parent window and booting the FullStory queue stub inside the iframe.
|
|
8
|
+
*/
|
|
9
|
+
export declare const useFullStoryBridge: () => {
|
|
10
|
+
injectFullStory: () => void;
|
|
11
|
+
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Filter } from '@@/Types/recommendation';
|
|
1
2
|
type CardWidthParams = {
|
|
2
3
|
mobileLeftPadding: number;
|
|
3
4
|
mobileRightPadding: number;
|
|
@@ -15,6 +16,14 @@ interface CampaignData extends CardWidthParams {
|
|
|
15
16
|
export declare const useRecommendation: () => {
|
|
16
17
|
calculateCardWidth: ({ mobileLeftPadding, mobileRightPadding, cardsInRow, unresponsive, }: CardWidthParams) => number;
|
|
17
18
|
getRecommendationCampaignData: (id: string) => CampaignData;
|
|
18
|
-
buildCampaignUrl: (campaignId: string
|
|
19
|
+
buildCampaignUrl: (campaignId: string, overrides?: {
|
|
20
|
+
strategy: string;
|
|
21
|
+
language: string;
|
|
22
|
+
currencyCode: string;
|
|
23
|
+
size: string;
|
|
24
|
+
productIds: string[];
|
|
25
|
+
filters: Filter[];
|
|
26
|
+
shuffleProducts: boolean;
|
|
27
|
+
}) => string;
|
|
19
28
|
};
|
|
20
29
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
2
2
|
export declare const useSave: () => {
|
|
3
|
-
save: (
|
|
3
|
+
save: (suppressEmit?: boolean, silent?: boolean) => Promise<Omit<SavedTemplateDetails, "metadata" | "silent"> | undefined>;
|
|
4
4
|
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import type { LegacyRecommendationConfig } from '@@/Types/config';
|
|
2
|
+
export declare const migrate: (html: string, recommendationConfigs?: Record<string, LegacyRecommendationConfig>) => Promise<string>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function extractTitleText(block: Element): string;
|
|
2
|
+
/**
|
|
3
|
+
* Card background lives on either the block (`bgcolor`/`style`) or per-card
|
|
4
|
+
* cells (`.product-card`). Returns empty string when no background is set —
|
|
5
|
+
* the caller treats that as "no segment background".
|
|
6
|
+
*/
|
|
7
|
+
export declare function extractCardBgColor(block: Element): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MappedComposition } from './types';
|
|
2
|
+
import type { RecommendationNodeConfig } from '@@/Extensions/Blocks/Recommendation/types/nodeConfig';
|
|
3
|
+
export declare function buildBlockHtml(params: {
|
|
4
|
+
nodeConfig: RecommendationNodeConfig;
|
|
5
|
+
composition: MappedComposition;
|
|
6
|
+
cardBg: string;
|
|
7
|
+
titleText: string;
|
|
8
|
+
extraClasses?: string;
|
|
9
|
+
legacyId?: string;
|
|
10
|
+
legacyBgColor?: string;
|
|
11
|
+
}): string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { LegacyProductConfig } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* `esd-dev-product-config` is double-HTML-encoded JSON: serialization
|
|
4
|
+
* escapes once to embed inside the attribute, and Stripo's templating
|
|
5
|
+
* layer escapes a second time when round-tripping. Returns `null` when
|
|
6
|
+
* the attribute is missing or unable to be parsed — the caller treats
|
|
7
|
+
* either case as an abort.
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseLegacyConfig(block: Element): LegacyProductConfig | null;
|
|
10
|
+
/**
|
|
11
|
+
* Older legacy templates omitted the canonical
|
|
12
|
+
* `ins-recommendation-v3-campaign-id` attribute but always included the
|
|
13
|
+
* `ins-recommendation-v3-block-<id>` class — fall back to scraping it.
|
|
14
|
+
*/
|
|
15
|
+
export declare function parseRecommendationId(block: Element): number | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|