@useinsider/guido 2.0.0-beta.9b144a9 → 2.0.0-beta.ac3cd4d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/config/schemas.js +52 -36
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/composables/useConfig.js +29 -27
- package/dist/composables/useSave.js +13 -11
- package/dist/composables/useStripo.js +51 -50
- package/dist/extensions/Blocks/CouponBlock/constants.js +4 -0
- package/dist/extensions/Blocks/CouponBlock/controls/index.js +29 -0
- package/dist/extensions/Blocks/CouponBlock/extension.js +5 -4
- package/dist/extensions/Blocks/CouponBlock/settingsPanel.js +20 -14
- package/dist/extensions/Blocks/CouponBlock/template.js +22 -11
- package/dist/extensions/Blocks/Unsubscribe/extension.js +9 -9
- package/dist/extensions/Blocks/controlFactories.js +122 -111
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +57 -52
- package/dist/src/@types/config/index.d.ts +2 -2
- package/dist/src/@types/config/schemas.d.ts +30 -0
- package/dist/src/@types/config/types.d.ts +7 -1
- package/dist/src/composables/useConfig.d.ts +8 -0
- package/dist/src/extensions/Blocks/CouponBlock/constants.d.ts +14 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +108 -0
- package/dist/src/extensions/Blocks/CouponBlock/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/controlFactories.d.ts +30 -7
- package/dist/src/stores/config.d.ts +163 -1
- package/dist/static/styles/components/button.css.js +1 -1
- package/dist/static/styles/components/narrow-panel.css.js +0 -10
- package/dist/stores/config.js +7 -0
- package/package.json +1 -1
|
@@ -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, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
|
|
11
|
-
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
10
|
+
export { MessageType, ProductType, GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, CompilerRuleSchema, CompilerRuleTypeSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, } from './schemas';
|
|
11
|
+
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput, CallbacksConfig, CallbacksConfigInput, ExternalValidationHandler, EmailHeader, DynamicContent, DefaultBlockType, CustomBlockType, BlockType, FeatureName, CompilerRule, ReplaceRule, RegexRule, RemoveRule, CustomRule, DeepPartial, ConfigOverrides, } from './types';
|
|
12
12
|
export { DEFAULT_EMAIL_HEADER, DEFAULT_TEMPLATE, DEFAULT_EDITOR, DEFAULT_UI, DEFAULT_FEATURES, DEFAULT_BLOCKS, DEFAULT_COMPILER, DEFAULT_PRODUCT_TYPE, DEFAULT_MESSAGE_TYPE, DEFAULT_USERNAME, EDITOR_TYPE, TEST_PARTNERS, isTestPartner, } from './defaults';
|
|
13
13
|
export { validateConfig, parseConfig, parseConfigSafe, getValidationErrors, isValidConfig, validateIdentity, validatePartner, } from './validator';
|
|
14
14
|
export type { ValidationResult, ValidationError, } from './validator';
|
|
@@ -5,7 +5,14 @@
|
|
|
5
5
|
* All types are inferred from these schemas to ensure single source of truth.
|
|
6
6
|
* @module @types/config/schemas
|
|
7
7
|
*/
|
|
8
|
+
import type { SavedTemplateDetails } from '../stripo';
|
|
8
9
|
import * as v from 'valibot';
|
|
10
|
+
/**
|
|
11
|
+
* Handler function for external validation before save
|
|
12
|
+
* @param data - The template details to validate
|
|
13
|
+
* @returns Promise<boolean> - true if valid, false to cancel save
|
|
14
|
+
*/
|
|
15
|
+
export type ExternalValidationHandler = (data: SavedTemplateDetails) => Promise<boolean>;
|
|
9
16
|
/**
|
|
10
17
|
* Message type constants for email templates
|
|
11
18
|
*/
|
|
@@ -146,6 +153,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
146
153
|
readonly displayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
147
154
|
/** Enable unsubscribe block */
|
|
148
155
|
readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
156
|
+
/** Disable modules panel in the editor */
|
|
157
|
+
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
149
158
|
}, undefined>;
|
|
150
159
|
/**
|
|
151
160
|
* Default block types available in Stripo
|
|
@@ -342,6 +351,16 @@ export declare const CompilerSchema: v.ObjectSchema<{
|
|
|
342
351
|
/** Skip default compiler rules */
|
|
343
352
|
readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
344
353
|
}, undefined>;
|
|
354
|
+
/**
|
|
355
|
+
* Callbacks configuration - event handlers and hooks
|
|
356
|
+
*/
|
|
357
|
+
export declare const CallbacksSchema: v.ObjectSchema<{
|
|
358
|
+
/**
|
|
359
|
+
* External validation handler called before save completes.
|
|
360
|
+
* Return false to cancel the save operation.
|
|
361
|
+
*/
|
|
362
|
+
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
363
|
+
}, undefined>;
|
|
345
364
|
/**
|
|
346
365
|
* Complete Guido configuration schema
|
|
347
366
|
*
|
|
@@ -354,6 +373,7 @@ export declare const CompilerSchema: v.ObjectSchema<{
|
|
|
354
373
|
* - features: Feature toggles
|
|
355
374
|
* - blocks: Block configuration
|
|
356
375
|
* - compiler: HTML compilation
|
|
376
|
+
* - callbacks: Event handlers and hooks
|
|
357
377
|
*/
|
|
358
378
|
export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
359
379
|
/** Identity configuration (required) */
|
|
@@ -439,6 +459,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
439
459
|
readonly displayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
440
460
|
/** Enable unsubscribe block */
|
|
441
461
|
readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
462
|
+
/** Disable modules panel in the editor */
|
|
463
|
+
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
442
464
|
}, undefined>, {}>;
|
|
443
465
|
/** Block configuration */
|
|
444
466
|
readonly blocks: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -502,4 +524,12 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
502
524
|
/** Skip default compiler rules */
|
|
503
525
|
readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
504
526
|
}, undefined>, {}>;
|
|
527
|
+
/** Callbacks and event handlers */
|
|
528
|
+
readonly callbacks: v.OptionalSchema<v.ObjectSchema<{
|
|
529
|
+
/**
|
|
530
|
+
* External validation handler called before save completes.
|
|
531
|
+
* Return false to cancel the save operation.
|
|
532
|
+
*/
|
|
533
|
+
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
534
|
+
}, undefined>, {}>;
|
|
505
535
|
}, undefined>;
|
|
@@ -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, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema } from './schemas';
|
|
8
|
+
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, CallbacksSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema, ExternalValidationHandler } from './schemas';
|
|
9
9
|
import type * as v from 'valibot';
|
|
10
10
|
/**
|
|
11
11
|
* Complete validated Guido configuration.
|
|
@@ -41,6 +41,10 @@ export type FeaturesConfig = v.InferOutput<typeof FeaturesSchema>;
|
|
|
41
41
|
export type BlocksConfig = v.InferOutput<typeof BlocksSchema>;
|
|
42
42
|
/** Compiler configuration (custom rules, ignore defaults) */
|
|
43
43
|
export type CompilerConfig = v.InferOutput<typeof CompilerSchema>;
|
|
44
|
+
/** Callbacks configuration (event handlers and hooks) */
|
|
45
|
+
export type CallbacksConfig = v.InferOutput<typeof CallbacksSchema>;
|
|
46
|
+
/** Re-export ExternalValidationHandler for convenience */
|
|
47
|
+
export type { ExternalValidationHandler };
|
|
44
48
|
/** Email header configuration (senderName, subject) */
|
|
45
49
|
export type EmailHeader = v.InferOutput<typeof EmailHeaderSchema>;
|
|
46
50
|
/** Dynamic content item */
|
|
@@ -85,6 +89,8 @@ export type FeaturesConfigInput = v.InferInput<typeof FeaturesSchema>;
|
|
|
85
89
|
export type BlocksConfigInput = v.InferInput<typeof BlocksSchema>;
|
|
86
90
|
/** Input type for compiler configuration */
|
|
87
91
|
export type CompilerConfigInput = v.InferInput<typeof CompilerSchema>;
|
|
92
|
+
/** Input type for callbacks configuration */
|
|
93
|
+
export type CallbacksConfigInput = v.InferInput<typeof CallbacksSchema>;
|
|
88
94
|
/** Default Stripo block types */
|
|
89
95
|
export type DefaultBlockType = v.InferOutput<typeof DefaultBlockTypeSchema>;
|
|
90
96
|
/** Custom Guido block types */
|
|
@@ -52,6 +52,7 @@ export declare const useConfig: () => {
|
|
|
52
52
|
testMessage: boolean;
|
|
53
53
|
displayConditions: boolean;
|
|
54
54
|
unsubscribe: boolean;
|
|
55
|
+
modulesDisabled: boolean;
|
|
55
56
|
};
|
|
56
57
|
blocks: {
|
|
57
58
|
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")[];
|
|
@@ -89,6 +90,9 @@ export declare const useConfig: () => {
|
|
|
89
90
|
})[];
|
|
90
91
|
ignoreDefaultRules: boolean;
|
|
91
92
|
};
|
|
93
|
+
callbacks: {
|
|
94
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
95
|
+
};
|
|
92
96
|
} | null>;
|
|
93
97
|
initialized: import("vue").Ref<boolean>;
|
|
94
98
|
identity: import("vue").ComputedRef<{
|
|
@@ -136,6 +140,7 @@ export declare const useConfig: () => {
|
|
|
136
140
|
testMessage: boolean;
|
|
137
141
|
displayConditions: boolean;
|
|
138
142
|
unsubscribe: boolean;
|
|
143
|
+
modulesDisabled: boolean;
|
|
139
144
|
} | null>;
|
|
140
145
|
blocks: import("vue").ComputedRef<{
|
|
141
146
|
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")[];
|
|
@@ -173,6 +178,9 @@ export declare const useConfig: () => {
|
|
|
173
178
|
})[];
|
|
174
179
|
ignoreDefaultRules: boolean;
|
|
175
180
|
} | null>;
|
|
181
|
+
callbacks: import("vue").ComputedRef<{
|
|
182
|
+
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
183
|
+
} | null>;
|
|
176
184
|
templateId: import("vue").ComputedRef<string>;
|
|
177
185
|
userId: import("vue").ComputedRef<string>;
|
|
178
186
|
variationId: import("vue").ComputedRef<string>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Control IDs used in the CouponBlock Extension
|
|
3
|
+
* These IDs are returned by the getId() method of each control
|
|
4
|
+
*/
|
|
5
|
+
export declare enum CouponControlId {
|
|
6
|
+
TEXT_ALIGN = "coupon-block-text-align-control",
|
|
7
|
+
TEXT_COLOR = "coupon-block-text-color-control",
|
|
8
|
+
TEXT_SIZE = "coupon-block-text-size-control",
|
|
9
|
+
TEXT_STYLE = "coupon-block-text-style-control",
|
|
10
|
+
TEXT_FONT_FAMILY = "coupon-block-text-font-family-control",
|
|
11
|
+
TEXT_BACKGROUND = "coupon-block-text-background-control",
|
|
12
|
+
TEXT_PADDINGS = "coupon-block-text-paddings-control",
|
|
13
|
+
TEXT_LINE_SPACING = "coupon-block-text-line-spacing-control"
|
|
14
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CouponBlock Control Instances
|
|
3
|
+
*
|
|
4
|
+
* This file generates all control instances for the CouponBlock
|
|
5
|
+
* using the reusable factory functions from controlFactories.ts
|
|
6
|
+
*
|
|
7
|
+
* Note: Factory-generated controls use runtime class generation which TypeScript
|
|
8
|
+
* cannot fully type-check. The controls are type-safe at runtime.
|
|
9
|
+
*
|
|
10
|
+
* These controls apply directly to the selected root element (no targetBlockId/containerSelector)
|
|
11
|
+
* to ensure styles are applied correctly regardless of nested element structure.
|
|
12
|
+
*/
|
|
13
|
+
export declare const TextAlignControl: {
|
|
14
|
+
new (): {
|
|
15
|
+
getId(): string;
|
|
16
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
17
|
+
getParentControlId(): string;
|
|
18
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
19
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
20
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
21
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
22
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
export declare const TextColorControl: {
|
|
26
|
+
new (): {
|
|
27
|
+
getId(): string;
|
|
28
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
29
|
+
getParentControlId(): string;
|
|
30
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
31
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
32
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
33
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
34
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export declare const TextSizeControl: {
|
|
38
|
+
new (): {
|
|
39
|
+
getId(): string;
|
|
40
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
41
|
+
getParentControlId(): string;
|
|
42
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
43
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
44
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
45
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
46
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export declare const TextStyleControl: {
|
|
50
|
+
new (): {
|
|
51
|
+
getId(): string;
|
|
52
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
53
|
+
getParentControlId(): string;
|
|
54
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
55
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
56
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
57
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
58
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
export declare const TextFontFamilyControl: {
|
|
62
|
+
new (): {
|
|
63
|
+
getId(): string;
|
|
64
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
65
|
+
getParentControlId(): string;
|
|
66
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
67
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
68
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
69
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
70
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export declare const TextBackgroundControl: {
|
|
74
|
+
new (): {
|
|
75
|
+
getId(): string;
|
|
76
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
77
|
+
getParentControlId(): string;
|
|
78
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
79
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
80
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
81
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
82
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export declare const TextPaddingsControl: {
|
|
86
|
+
new (): {
|
|
87
|
+
getId(): string;
|
|
88
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
89
|
+
getParentControlId(): string;
|
|
90
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
91
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
92
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
93
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
94
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
export declare const TextLineSpacingControl: {
|
|
98
|
+
new (): {
|
|
99
|
+
getId(): string;
|
|
100
|
+
getTargetNodes(root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode[];
|
|
101
|
+
getParentControlId(): string;
|
|
102
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
103
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
104
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
105
|
+
getAdditionalModifications(_root: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
106
|
+
isVisible(_node: import("@stripoinc/ui-editor-extensions").ImmutableHtmlNode): boolean;
|
|
107
|
+
};
|
|
108
|
+
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
declare const migrationTemplate = "\n <td
|
|
1
|
+
declare const migrationTemplate = "\n <td\n class=\"coupon-block coupon-block-v2 ins-coupon-code esd-block-text esd-extension-block\"\n esd-extension-block-id=\"coupon-block\"\n >\n <p class=\"ins-title\" contenteditable=\"false\">{@COUPON_CODE}</p>\n </td>\n";
|
|
2
2
|
export declare function getDefaultTemplate(): string;
|
|
3
3
|
export default migrationTemplate;
|
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
import { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
13
13
|
/**
|
|
14
14
|
* Factory function to create text align controls for different block elements
|
|
15
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
15
16
|
*/
|
|
16
|
-
export declare function createTextAlignControl(controlId: string, targetBlockId
|
|
17
|
+
export declare function createTextAlignControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
17
18
|
new (): {
|
|
18
19
|
getId(): string;
|
|
19
20
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -27,8 +28,9 @@ export declare function createTextAlignControl(controlId: string, targetBlockId:
|
|
|
27
28
|
};
|
|
28
29
|
/**
|
|
29
30
|
* Factory function to create text color controls for different block elements
|
|
31
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
30
32
|
*/
|
|
31
|
-
export declare function createTextColorControl(controlId: string, targetBlockId
|
|
33
|
+
export declare function createTextColorControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
32
34
|
new (): {
|
|
33
35
|
getId(): string;
|
|
34
36
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -42,8 +44,9 @@ export declare function createTextColorControl(controlId: string, targetBlockId:
|
|
|
42
44
|
};
|
|
43
45
|
/**
|
|
44
46
|
* Factory function to create text size controls for different block elements
|
|
47
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
45
48
|
*/
|
|
46
|
-
export declare function createTextSizeControl(controlId: string, targetBlockId
|
|
49
|
+
export declare function createTextSizeControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
47
50
|
new (): {
|
|
48
51
|
getId(): string;
|
|
49
52
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -57,8 +60,9 @@ export declare function createTextSizeControl(controlId: string, targetBlockId:
|
|
|
57
60
|
};
|
|
58
61
|
/**
|
|
59
62
|
* Factory function to create text style controls for different block elements
|
|
63
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
60
64
|
*/
|
|
61
|
-
export declare function createTextStyleControl(controlId: string, targetBlockId
|
|
65
|
+
export declare function createTextStyleControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
62
66
|
new (): {
|
|
63
67
|
getId(): string;
|
|
64
68
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -72,8 +76,9 @@ export declare function createTextStyleControl(controlId: string, targetBlockId:
|
|
|
72
76
|
};
|
|
73
77
|
/**
|
|
74
78
|
* Factory function to create text font family controls for different block elements
|
|
79
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
75
80
|
*/
|
|
76
|
-
export declare function createTextFontFamilyControl(controlId: string, targetBlockId
|
|
81
|
+
export declare function createTextFontFamilyControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
77
82
|
new (): {
|
|
78
83
|
getId(): string;
|
|
79
84
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -87,8 +92,9 @@ export declare function createTextFontFamilyControl(controlId: string, targetBlo
|
|
|
87
92
|
};
|
|
88
93
|
/**
|
|
89
94
|
* Factory function to create text background color controls for different block elements
|
|
95
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
90
96
|
*/
|
|
91
|
-
export declare function createTextBackgroundColorControl(controlId: string, targetBlockId
|
|
97
|
+
export declare function createTextBackgroundColorControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
92
98
|
new (): {
|
|
93
99
|
getId(): string;
|
|
94
100
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
@@ -102,8 +108,25 @@ export declare function createTextBackgroundColorControl(controlId: string, targ
|
|
|
102
108
|
};
|
|
103
109
|
/**
|
|
104
110
|
* Factory function to create paddings controls for different block elements
|
|
111
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
105
112
|
*/
|
|
106
|
-
export declare function createPaddingsControl(controlId: string, targetBlockId
|
|
113
|
+
export declare function createPaddingsControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
114
|
+
new (): {
|
|
115
|
+
getId(): string;
|
|
116
|
+
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|
|
117
|
+
getParentControlId(): string;
|
|
118
|
+
api: import("@stripoinc/ui-editor-extensions").ControlApi;
|
|
119
|
+
getLabels(): import("@stripoinc/ui-editor-extensions").ControlLabels | undefined;
|
|
120
|
+
getModificationDescription(): import("@stripoinc/ui-editor-extensions").ModificationDescription | undefined;
|
|
121
|
+
getAdditionalModifications(_root: ImmutableHtmlNode): import("@stripoinc/ui-editor-extensions").TemplateModifier<import("@stripoinc/ui-editor-extensions").HtmlNodeModifier, import("@stripoinc/ui-editor-extensions").CssNodeModifier> | undefined;
|
|
122
|
+
isVisible(_node: ImmutableHtmlNode): boolean;
|
|
123
|
+
};
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Factory function to create text line spacing controls for different block elements
|
|
127
|
+
* When targetBlockId and containerSelector are not provided, applies directly to root
|
|
128
|
+
*/
|
|
129
|
+
export declare function createTextLineSpacingControl(controlId: string, targetBlockId?: string, containerSelector?: string): {
|
|
107
130
|
new (): {
|
|
108
131
|
getId(): string;
|
|
109
132
|
getTargetNodes(root: ImmutableHtmlNode): ImmutableHtmlNode[];
|