@useinsider/guido 2.0.0-beta.86a694f → 2.0.0-beta.94bb44d
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 +33 -45
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +3 -3
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +8 -8
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +12 -11
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +7 -8
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +14 -12
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +10 -14
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +18 -22
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +3 -3
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +11 -10
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +15 -14
- package/dist/components/organisms/header/LeftSlot.vue.js +9 -9
- package/dist/components/organisms/header/MiddleSlot.vue.js +5 -4
- package/dist/components/organisms/header/MiddleSlot.vue2.js +14 -13
- package/dist/components/organisms/header/RightSlot.vue.js +7 -7
- package/dist/components/organisms/header/RightSlot.vue2.js +10 -10
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +15 -15
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +1 -1
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +20 -19
- package/dist/components/wrappers/WpModal.vue.js +4 -3
- package/dist/composables/useConfig.js +27 -29
- package/dist/composables/useSave.js +11 -13
- package/dist/composables/useStripo.js +51 -50
- package/dist/enums/academy.js +8 -0
- package/dist/enums/onboarding.js +1 -2
- package/dist/enums/unsubscribe.js +20 -21
- 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/guido.css +1 -1
- 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 +4 -26
- package/dist/src/@types/config/types.d.ts +1 -7
- package/dist/src/composables/useConfig.d.ts +2 -6
- package/dist/src/enums/academy.d.ts +12 -0
- package/dist/src/enums/onboarding.d.ts +0 -1
- package/dist/src/enums/unsubscribe.d.ts +0 -1
- 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 +18 -145
- package/dist/static/assets/desktop/desktop-mockup-center.svg.js +4 -0
- package/dist/static/assets/desktop/desktop-mockup-left.svg.js +4 -0
- package/dist/static/assets/desktop/desktop-mockup-right.svg.js +4 -0
- package/dist/static/assets/mobile/email-mockup.svg.js +4 -0
- package/dist/static/assets/mobile/inbox-mockup.svg.js +4 -0
- 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 +0 -7
- package/package.json +1 -1
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
- package/dist/static/assets/inbox-mockup.svg.js +0 -4
- package/dist/static/assets/phone-mockup.svg.js +0 -4
|
@@ -23,12 +23,12 @@ ${s.map((E) => ` - ${E}`).join(`
|
|
|
23
23
|
validateImplementation(e, r) {
|
|
24
24
|
var I;
|
|
25
25
|
const s = [], E = r.name, T = Object.getPrototypeOf(this);
|
|
26
|
-
e.forEach((
|
|
27
|
-
if (typeof this[
|
|
28
|
-
s.push(`Method ${
|
|
26
|
+
e.forEach((d) => {
|
|
27
|
+
if (typeof this[d] != "function") {
|
|
28
|
+
s.push(`Method ${d}() is not defined`);
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
31
|
-
T[
|
|
31
|
+
T[d] === r.prototype[d] && s.push(`Method ${d}() must be implemented (currently using base class error-throwing implementation)`);
|
|
32
32
|
}), u.validatedClasses.add(r), s.length > 0 ? (u.validationErrors.set(r, s), console.error(`[${E} Validation] ${E} validation failed:`, s)) : typeof process < "u" && ((I = process.env) == null ? void 0 : I.NODE_ENV) === "development" && console.log(`[${E} Validation] ✅ ${E} validated successfully`);
|
|
33
33
|
}
|
|
34
34
|
};
|
|
@@ -254,10 +254,10 @@ var st = {
|
|
|
254
254
|
...o,
|
|
255
255
|
caption: "caption",
|
|
256
256
|
icon: "icon"
|
|
257
|
-
},
|
|
257
|
+
}, gt = {
|
|
258
258
|
...o,
|
|
259
259
|
caption: "caption"
|
|
260
|
-
},
|
|
260
|
+
}, mt = {
|
|
261
261
|
...o,
|
|
262
262
|
minValue: "min-value",
|
|
263
263
|
maxValue: "max-value",
|
|
@@ -265,7 +265,7 @@ var st = {
|
|
|
265
265
|
}, bt = {
|
|
266
266
|
...o,
|
|
267
267
|
text: "text"
|
|
268
|
-
},
|
|
268
|
+
}, Nt = {
|
|
269
269
|
...o
|
|
270
270
|
}, X = {
|
|
271
271
|
...o,
|
|
@@ -273,7 +273,7 @@ var st = {
|
|
|
273
273
|
multiSelect: "multi-select",
|
|
274
274
|
placeholder: "placeholder",
|
|
275
275
|
items: "items"
|
|
276
|
-
},
|
|
276
|
+
}, At = {
|
|
277
277
|
...X
|
|
278
278
|
}, Dt = {
|
|
279
279
|
text: "text",
|
|
@@ -292,15 +292,15 @@ var st = {
|
|
|
292
292
|
position: "position"
|
|
293
293
|
}, vt = {
|
|
294
294
|
...o
|
|
295
|
-
},
|
|
295
|
+
}, Gt = {
|
|
296
296
|
BUTTON: Ct,
|
|
297
|
-
CHECKBOX:
|
|
297
|
+
CHECKBOX: gt,
|
|
298
298
|
COLOR: o,
|
|
299
|
-
COUNTER:
|
|
299
|
+
COUNTER: mt,
|
|
300
300
|
LABEL: bt,
|
|
301
|
-
RADIO_BUTTONS:
|
|
301
|
+
RADIO_BUTTONS: Nt,
|
|
302
302
|
SELECTPICKER: X,
|
|
303
|
-
FONT_FAMILY_SELECT:
|
|
303
|
+
FONT_FAMILY_SELECT: At,
|
|
304
304
|
SWITCHER: o,
|
|
305
305
|
TEXT: Bt,
|
|
306
306
|
SELECT_ITEM: Dt,
|
|
@@ -344,7 +344,7 @@ var st = {
|
|
|
344
344
|
const e = t.querySelectorAll(O.BUTTON), r = t.asElement().hasClass(U) ? [t] : [];
|
|
345
345
|
return e.length ? e : r;
|
|
346
346
|
}
|
|
347
|
-
},
|
|
347
|
+
}, Vt = class extends i {
|
|
348
348
|
getParentControlId() {
|
|
349
349
|
return n.BLOCK_BUTTON.BORDER_RADIUS;
|
|
350
350
|
}
|
|
@@ -454,20 +454,20 @@ var st = {
|
|
|
454
454
|
}
|
|
455
455
|
};
|
|
456
456
|
k.REQUIRED_METHODS = ["getId", "getTemplate"];
|
|
457
|
-
var ee = k,
|
|
457
|
+
var ee = k, G = class extends x {
|
|
458
458
|
getTargetNodes(t) {
|
|
459
459
|
const e = t.querySelectorAll(O.IMAGE), r = t.asElement().hasClass(K) ? [t] : [];
|
|
460
460
|
return e.length ? e : r;
|
|
461
461
|
}
|
|
462
|
-
}, re = class extends
|
|
462
|
+
}, re = class extends G {
|
|
463
463
|
getParentControlId() {
|
|
464
464
|
return n.BLOCK_IMAGE.EXTERNAL_INDENTS;
|
|
465
465
|
}
|
|
466
|
-
}, ne = class extends
|
|
466
|
+
}, ne = class extends G {
|
|
467
467
|
getParentControlId() {
|
|
468
468
|
return n.BLOCK_IMAGE.SIZE;
|
|
469
469
|
}
|
|
470
|
-
},
|
|
470
|
+
}, V = class L extends a {
|
|
471
471
|
constructor() {
|
|
472
472
|
super(L.REQUIRED_METHODS, L);
|
|
473
473
|
}
|
|
@@ -475,8 +475,8 @@ var ee = k, V = class extends x {
|
|
|
475
475
|
throw new Error("Method registerBlockControls() must be implemented by the subclass");
|
|
476
476
|
}
|
|
477
477
|
};
|
|
478
|
-
|
|
479
|
-
var se =
|
|
478
|
+
V.REQUIRED_METHODS = ["registerBlockControls"];
|
|
479
|
+
var se = V, ae = class {
|
|
480
480
|
constructor(t, e) {
|
|
481
481
|
this.tabId = t, this.controlsIds = e;
|
|
482
482
|
}
|
|
@@ -499,42 +499,46 @@ var se = G, ae = class {
|
|
|
499
499
|
const e = this.controlsIds.indexOf(t);
|
|
500
500
|
e !== -1 && this.controlsIds.splice(e, 1);
|
|
501
501
|
}
|
|
502
|
-
},
|
|
502
|
+
}, l = class extends x {
|
|
503
503
|
getTargetNodes(t) {
|
|
504
504
|
const e = t.querySelectorAll(O.TEXT), r = t.asElement().hasClass(p) ? [t] : [];
|
|
505
505
|
return e.length ? e : r;
|
|
506
506
|
}
|
|
507
|
-
}, ie = class extends
|
|
507
|
+
}, ie = class extends l {
|
|
508
508
|
getParentControlId() {
|
|
509
509
|
return n.GENERAL.TEXT_ALIGN;
|
|
510
510
|
}
|
|
511
|
-
}, oe = class extends
|
|
511
|
+
}, oe = class extends l {
|
|
512
512
|
getParentControlId() {
|
|
513
513
|
return n.BLOCK_TEXT.TEXT_BLOCK_BACKGROUND_COLOR;
|
|
514
514
|
}
|
|
515
|
-
}, Ee = class extends
|
|
515
|
+
}, Ee = class extends l {
|
|
516
516
|
getParentControlId() {
|
|
517
517
|
return n.GENERAL.TEXT_COLOR;
|
|
518
518
|
}
|
|
519
|
-
}, le = class extends
|
|
519
|
+
}, le = class extends l {
|
|
520
520
|
getParentControlId() {
|
|
521
521
|
return n.BLOCK_TEXT.FONT_FAMILY;
|
|
522
522
|
}
|
|
523
|
-
}, de = class extends
|
|
523
|
+
}, de = class extends l {
|
|
524
|
+
getParentControlId() {
|
|
525
|
+
return n.GENERAL.TEXT_LINE_SPACING;
|
|
526
|
+
}
|
|
527
|
+
}, ue = class extends l {
|
|
524
528
|
getParentControlId() {
|
|
525
529
|
return n.BLOCK_TEXT.INTERNAL_INDENTS;
|
|
526
530
|
}
|
|
527
|
-
},
|
|
531
|
+
}, Ie = class extends l {
|
|
528
532
|
getParentControlId() {
|
|
529
533
|
return n.GENERAL.TEXT_SIZE;
|
|
530
534
|
}
|
|
531
|
-
},
|
|
535
|
+
}, Oe = class extends l {
|
|
532
536
|
getParentControlId() {
|
|
533
537
|
return n.GENERAL.TEXT_STYLE;
|
|
534
538
|
}
|
|
535
539
|
}, Ut = class {
|
|
536
|
-
constructor(t, e, r = [], s, E = [], T, I = [],
|
|
537
|
-
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.i18n = t, this.styles = e, this.previewStyles = W, this.uiElements = r, this.uiElementTagRegistry = s, this.controls = E, this.settingsPanelRegistry = T, this.contextActions = I, this.blocks =
|
|
540
|
+
constructor(t, e, r = [], s, E = [], T, I = [], d = [], v, $, W, z, Z, j, q, J, tt) {
|
|
541
|
+
this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [], this.i18n = t, this.styles = e, this.previewStyles = W, this.uiElements = r, this.uiElementTagRegistry = s, this.controls = E, this.settingsPanelRegistry = T, this.contextActions = I, this.blocks = d, this.externalSmartElementsLibrary = v, this.externalImageLibrary = $, this.externalImageLibraryTab = tt, this.externalAiAssistant = z, this.externalDisplayConditionsLibrary = Z, this.externalVideoLibrary = j, this.blocksPanel = q, this.iconsRegistry = J, this.id = Math.random().toString(36).substring(2);
|
|
538
542
|
}
|
|
539
543
|
getI18n() {
|
|
540
544
|
return this.i18n;
|
|
@@ -590,7 +594,7 @@ var se = G, ae = class {
|
|
|
590
594
|
getIconsRegistry() {
|
|
591
595
|
return this.iconsRegistry;
|
|
592
596
|
}
|
|
593
|
-
},
|
|
597
|
+
}, Te = class {
|
|
594
598
|
constructor() {
|
|
595
599
|
this.styles = [], this.uiElements = [], this.controls = [], this.contextActions = [], this.blocks = [];
|
|
596
600
|
}
|
|
@@ -685,9 +689,9 @@ var se = G, ae = class {
|
|
|
685
689
|
}
|
|
686
690
|
};
|
|
687
691
|
pt.REQUIRED_METHODS = ["openAiAssistant"];
|
|
688
|
-
var Kt = class
|
|
692
|
+
var Kt = class g extends a {
|
|
689
693
|
constructor() {
|
|
690
|
-
super(
|
|
694
|
+
super(g.REQUIRED_METHODS, g);
|
|
691
695
|
}
|
|
692
696
|
/**
|
|
693
697
|
* Retrieves the name of the category.
|
|
@@ -726,9 +730,9 @@ var Kt = class m extends a {
|
|
|
726
730
|
}
|
|
727
731
|
};
|
|
728
732
|
Kt.REQUIRED_METHODS = ["getCategoryName", "openExternalDisplayConditionsDialog"];
|
|
729
|
-
var Ft = class
|
|
733
|
+
var Ft = class m extends a {
|
|
730
734
|
constructor() {
|
|
731
|
-
super(
|
|
735
|
+
super(m.REQUIRED_METHODS, m);
|
|
732
736
|
}
|
|
733
737
|
openImageLibrary(e, r, s) {
|
|
734
738
|
throw new Error("Method openImageLibrary() must be implemented by the subclass");
|
|
@@ -756,18 +760,18 @@ var wt = class b extends a {
|
|
|
756
760
|
}
|
|
757
761
|
};
|
|
758
762
|
wt.REQUIRED_METHODS = ["getName", "openImageLibraryTab"];
|
|
759
|
-
var Pt = class
|
|
763
|
+
var Pt = class N extends a {
|
|
760
764
|
constructor() {
|
|
761
|
-
super(
|
|
765
|
+
super(N.REQUIRED_METHODS, N);
|
|
762
766
|
}
|
|
763
767
|
openSmartElementsLibrary(e, r) {
|
|
764
768
|
throw new Error("Method openSmartElementsLibrary() must be implemented by the subclass");
|
|
765
769
|
}
|
|
766
770
|
};
|
|
767
771
|
Pt.REQUIRED_METHODS = ["openSmartElementsLibrary"];
|
|
768
|
-
var Ht = class
|
|
772
|
+
var Ht = class A extends a {
|
|
769
773
|
constructor() {
|
|
770
|
-
super(
|
|
774
|
+
super(A.REQUIRED_METHODS, A);
|
|
771
775
|
}
|
|
772
776
|
openExternalVideosLibraryDialog(e, r, s) {
|
|
773
777
|
throw new Error("Method openExternalVideosLibraryDialog() must be implemented by the subclass");
|
|
@@ -783,7 +787,7 @@ var Q = class D extends a {
|
|
|
783
787
|
}
|
|
784
788
|
};
|
|
785
789
|
Q.REQUIRED_METHODS = ["registerIconsSvg"];
|
|
786
|
-
var
|
|
790
|
+
var ce = Q, _e = class {
|
|
787
791
|
constructor(t) {
|
|
788
792
|
this.key = t;
|
|
789
793
|
}
|
|
@@ -852,7 +856,7 @@ var Te = Q, ce = class {
|
|
|
852
856
|
}
|
|
853
857
|
};
|
|
854
858
|
f.REQUIRED_METHODS = ["onRender", "getId", "getTemplate"];
|
|
855
|
-
var
|
|
859
|
+
var he = f, Y = class B extends a {
|
|
856
860
|
constructor() {
|
|
857
861
|
super(B.REQUIRED_METHODS, B);
|
|
858
862
|
}
|
|
@@ -861,7 +865,7 @@ var _e = f, Y = class B extends a {
|
|
|
861
865
|
}
|
|
862
866
|
};
|
|
863
867
|
Y.REQUIRED_METHODS = ["registerUiElements"];
|
|
864
|
-
var
|
|
868
|
+
var Re = Y;
|
|
865
869
|
export {
|
|
866
870
|
Xt as Block,
|
|
867
871
|
kt as BlockAttr,
|
|
@@ -873,7 +877,7 @@ export {
|
|
|
873
877
|
Qt as ButtonAlignBuiltInControl,
|
|
874
878
|
ft as ButtonBackgroundColorBuiltInControl,
|
|
875
879
|
Yt as ButtonBorderBuiltInControl,
|
|
876
|
-
|
|
880
|
+
Vt as ButtonBorderRadiusBuiltInControl,
|
|
877
881
|
$t as ButtonColorBuiltInControl,
|
|
878
882
|
w as ButtonControls,
|
|
879
883
|
Wt as ButtonFitToContainerBuiltInControl,
|
|
@@ -886,13 +890,13 @@ export {
|
|
|
886
890
|
Rt as ContainerControls,
|
|
887
891
|
ee as Control,
|
|
888
892
|
Ut as Extension,
|
|
889
|
-
|
|
893
|
+
Te as ExtensionBuilder,
|
|
890
894
|
F as GeneralControls,
|
|
891
|
-
|
|
895
|
+
ce as IconsRegistry,
|
|
892
896
|
H as ImageControls,
|
|
893
897
|
re as ImageMarginsBuiltInControl,
|
|
894
898
|
ne as ImageSizeBuiltInControl,
|
|
895
|
-
|
|
899
|
+
_e as ModificationDescription,
|
|
896
900
|
se as SettingsPanelRegistry,
|
|
897
901
|
ae as SettingsPanelTab,
|
|
898
902
|
Lt as SettingsTab,
|
|
@@ -901,11 +905,12 @@ export {
|
|
|
901
905
|
Ee as TextColorBuiltInControl,
|
|
902
906
|
P as TextControls,
|
|
903
907
|
le as TextFontFamilyBuiltInControl,
|
|
904
|
-
de as
|
|
905
|
-
ue as
|
|
906
|
-
Ie as
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
he as
|
|
908
|
+
de as TextLineSpacingBuiltInControl,
|
|
909
|
+
ue as TextPaddingsBuiltInControl,
|
|
910
|
+
Ie as TextSizeBuiltInControl,
|
|
911
|
+
Oe as TextStyleBuiltInControl,
|
|
912
|
+
Gt as UEAttr,
|
|
913
|
+
he as UIElement,
|
|
914
|
+
Re as UIElementTagRegistry,
|
|
910
915
|
yt as UIElementType
|
|
911
916
|
};
|
|
@@ -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,
|
|
11
|
-
export type { GuidoConfig, GuidoConfigInput, IdentityConfig, IdentityConfigInput, PartnerConfig, PartnerConfigInput, TemplateConfig, TemplateConfigInput, EditorConfig, EditorConfigInput, UIConfig, UIConfigInput, FeaturesConfig, FeaturesConfigInput, BlocksConfig, BlocksConfigInput, CompilerConfig, CompilerConfigInput,
|
|
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';
|
|
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,14 +5,7 @@
|
|
|
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';
|
|
9
8
|
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>;
|
|
16
9
|
/**
|
|
17
10
|
* Message type constants for email templates
|
|
18
11
|
*/
|
|
@@ -153,6 +146,8 @@ export declare const FeaturesSchema: v.ObjectSchema<{
|
|
|
153
146
|
readonly displayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
154
147
|
/** Enable unsubscribe block */
|
|
155
148
|
readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
149
|
+
/** Disable modules panel in the editor */
|
|
150
|
+
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
156
151
|
}, undefined>;
|
|
157
152
|
/**
|
|
158
153
|
* Default block types available in Stripo
|
|
@@ -349,16 +344,6 @@ export declare const CompilerSchema: v.ObjectSchema<{
|
|
|
349
344
|
/** Skip default compiler rules */
|
|
350
345
|
readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
351
346
|
}, undefined>;
|
|
352
|
-
/**
|
|
353
|
-
* Callbacks configuration - event handlers and hooks
|
|
354
|
-
*/
|
|
355
|
-
export declare const CallbacksSchema: v.ObjectSchema<{
|
|
356
|
-
/**
|
|
357
|
-
* External validation handler called before save completes.
|
|
358
|
-
* Return false to cancel the save operation.
|
|
359
|
-
*/
|
|
360
|
-
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
361
|
-
}, undefined>;
|
|
362
347
|
/**
|
|
363
348
|
* Complete Guido configuration schema
|
|
364
349
|
*
|
|
@@ -371,7 +356,6 @@ export declare const CallbacksSchema: v.ObjectSchema<{
|
|
|
371
356
|
* - features: Feature toggles
|
|
372
357
|
* - blocks: Block configuration
|
|
373
358
|
* - compiler: HTML compilation
|
|
374
|
-
* - callbacks: Event handlers and hooks
|
|
375
359
|
*/
|
|
376
360
|
export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
377
361
|
/** Identity configuration (required) */
|
|
@@ -457,6 +441,8 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
457
441
|
readonly displayConditions: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
458
442
|
/** Enable unsubscribe block */
|
|
459
443
|
readonly unsubscribe: v.OptionalSchema<v.BooleanSchema<undefined>, true>;
|
|
444
|
+
/** Disable modules panel in the editor */
|
|
445
|
+
readonly modulesDisabled: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
460
446
|
}, undefined>, {}>;
|
|
461
447
|
/** Block configuration */
|
|
462
448
|
readonly blocks: v.OptionalSchema<v.ObjectSchema<{
|
|
@@ -520,12 +506,4 @@ export declare const GuidoConfigSchema: v.ObjectSchema<{
|
|
|
520
506
|
/** Skip default compiler rules */
|
|
521
507
|
readonly ignoreDefaultRules: v.OptionalSchema<v.BooleanSchema<undefined>, false>;
|
|
522
508
|
}, undefined>, {}>;
|
|
523
|
-
/** Callbacks and event handlers */
|
|
524
|
-
readonly callbacks: v.OptionalSchema<v.ObjectSchema<{
|
|
525
|
-
/**
|
|
526
|
-
* External validation handler called before save completes.
|
|
527
|
-
* Return false to cancel the save operation.
|
|
528
|
-
*/
|
|
529
|
-
readonly externalValidation: v.OptionalSchema<v.CustomSchema<ExternalValidationHandler, v.ErrorMessage<v.CustomIssue> | undefined>, undefined>;
|
|
530
|
-
}, undefined>, {}>;
|
|
531
509
|
}, 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,
|
|
8
|
+
import type { GuidoConfigSchema, IdentitySchema, PartnerSchema, TemplateSchema, EditorSchema, UISchema, FeaturesSchema, BlocksSchema, CompilerSchema, DynamicContentSchema, EmailHeaderSchema, CompilerRuleSchema, ReplaceRuleSchema, RegexRuleSchema, RemoveRuleSchema, CustomRuleSchema, DefaultBlockTypeSchema, CustomBlockTypeSchema } from './schemas';
|
|
9
9
|
import type * as v from 'valibot';
|
|
10
10
|
/**
|
|
11
11
|
* Complete validated Guido configuration.
|
|
@@ -41,10 +41,6 @@ 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 };
|
|
48
44
|
/** Email header configuration (senderName, subject) */
|
|
49
45
|
export type EmailHeader = v.InferOutput<typeof EmailHeaderSchema>;
|
|
50
46
|
/** Dynamic content item */
|
|
@@ -89,8 +85,6 @@ export type FeaturesConfigInput = v.InferInput<typeof FeaturesSchema>;
|
|
|
89
85
|
export type BlocksConfigInput = v.InferInput<typeof BlocksSchema>;
|
|
90
86
|
/** Input type for compiler configuration */
|
|
91
87
|
export type CompilerConfigInput = v.InferInput<typeof CompilerSchema>;
|
|
92
|
-
/** Input type for callbacks configuration */
|
|
93
|
-
export type CallbacksConfigInput = v.InferInput<typeof CallbacksSchema>;
|
|
94
88
|
/** Default Stripo block types */
|
|
95
89
|
export type DefaultBlockType = v.InferOutput<typeof DefaultBlockTypeSchema>;
|
|
96
90
|
/** 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,9 +90,6 @@ export declare const useConfig: () => {
|
|
|
89
90
|
})[];
|
|
90
91
|
ignoreDefaultRules: boolean;
|
|
91
92
|
};
|
|
92
|
-
callbacks: {
|
|
93
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
94
|
-
};
|
|
95
93
|
} | null>;
|
|
96
94
|
initialized: import("vue").Ref<boolean>;
|
|
97
95
|
identity: import("vue").ComputedRef<{
|
|
@@ -139,6 +137,7 @@ export declare const useConfig: () => {
|
|
|
139
137
|
testMessage: boolean;
|
|
140
138
|
displayConditions: boolean;
|
|
141
139
|
unsubscribe: boolean;
|
|
140
|
+
modulesDisabled: boolean;
|
|
142
141
|
} | null>;
|
|
143
142
|
blocks: import("vue").ComputedRef<{
|
|
144
143
|
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")[];
|
|
@@ -176,9 +175,6 @@ export declare const useConfig: () => {
|
|
|
176
175
|
})[];
|
|
177
176
|
ignoreDefaultRules: boolean;
|
|
178
177
|
} | null>;
|
|
179
|
-
callbacks: import("vue").ComputedRef<{
|
|
180
|
-
externalValidation?: import("@@/Types/config").ExternalValidationHandler | undefined;
|
|
181
|
-
} | null>;
|
|
182
178
|
templateId: import("vue").ComputedRef<string>;
|
|
183
179
|
userId: import("vue").ComputedRef<string>;
|
|
184
180
|
variationId: import("vue").ComputedRef<string>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Centralized Academy Links
|
|
3
|
+
*
|
|
4
|
+
* All external academy documentation links should be defined here
|
|
5
|
+
* for easy maintenance and domain migration.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ACADEMY_LINKS: {
|
|
8
|
+
readonly EMAIL_EDITOR: "https://academy.useinsider.com/docs/email-drag-drop-editor";
|
|
9
|
+
readonly GLOBAL_UNSUBSCRIBE: "https://academy.useinsider.com/docs/global-unsubscribe-preference-center";
|
|
10
|
+
readonly AMP_FOR_EMAILS: "https://academy.useinsider.com/docs/amp-for-emails";
|
|
11
|
+
};
|
|
12
|
+
export type AcademyLinkKey = keyof typeof ACADEMY_LINKS;
|
|
@@ -3,4 +3,3 @@ export declare const UI_EDITOR_SELECTOR = "ui-editor";
|
|
|
3
3
|
export declare const CARD_COMPOSITION_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Card Composition\"]";
|
|
4
4
|
export declare const SETTINGS_TAB_SELECTOR = "button[role=\"tab\"][aria-label=\"Settings\"]";
|
|
5
5
|
export declare const RIBBON_SELECTOR = ".in-ribbons-wrapper";
|
|
6
|
-
export declare const ACADEMY_LINK = "https://academy.useinsider.com/docs/email-drag-drop-editor";
|
|
@@ -17,7 +17,6 @@ export declare const DEFAULT_UNSUBSCRIBE_GROUP: {
|
|
|
17
17
|
readonly name: "Global Unsubscribe";
|
|
18
18
|
readonly sendGridId: "G";
|
|
19
19
|
};
|
|
20
|
-
export declare const ACADEMY_LINK = "https://academy.useinsider.com/docs/global-unsubscribe-preference-center";
|
|
21
20
|
export declare const UNSUBSCRIBE_PAGES_LINK = "/email/unsubscribe-pages";
|
|
22
21
|
export declare const PAGE_TYPES: {
|
|
23
22
|
GLOBAL_UNSUBSCRIBE: number;
|
|
@@ -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;
|