@useinsider/guido 1.0.2-beta.833da0e → 1.0.2-beta.85ea6e2
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 +1 -31
- package/dist/components/Guido.vue.d.ts +1 -3
- package/dist/components/Guido.vue.js +2 -2
- package/dist/components/Guido.vue2.js +55 -66
- package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +2 -3
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +15 -14
- package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -15
- package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -3
- package/dist/components/organisms/header/RightSlot.vue.js +3 -5
- package/dist/components/organisms/header/RightSlot.vue2.js +27 -26
- package/dist/components/organisms/header/ViewOptions.vue.js +5 -5
- package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +5 -5
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +11 -11
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +7 -7
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +20 -25
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +5 -5
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +5 -5
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +6 -6
- package/dist/composables/useCustomInterfaceAppearance.js +18 -22
- package/dist/composables/useHtmlCompiler.js +9 -17
- package/dist/composables/usePreviewMode.js +15 -14
- package/dist/composables/useStripo.js +25 -27
- package/dist/composables/useToaster.js +17 -17
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -2
- package/dist/enums/defaults.d.ts +1 -5
- package/dist/enums/defaults.js +10 -14
- package/dist/guido.css +1 -1
- package/dist/static/styles/components/alert-message.css.js +2 -32
- package/dist/static/styles/components/button.css.js +2 -32
- package/dist/static/styles/components/wide-panel.css.js +1 -5
- package/dist/static/styles/customEditorStyle.css.js +0 -6
- package/dist/static/styles/variables.css.js +0 -10
- package/dist/stores/onboarding.d.ts +8 -72
- package/dist/stores/preview.js +3 -1
- package/dist/utils/templatePreparation.js +14 -21
- package/package.json +2 -4
- package/dist/composables/useHtmlValidator.d.ts +0 -3
- package/dist/composables/useHtmlValidator.js +0 -120
- package/dist/composables/useRecommendation.d.ts +0 -19
- package/dist/composables/useRecommendation.js +0 -27
- package/dist/composables/useSave.d.ts +0 -4
- package/dist/composables/useSave.js +0 -15
- package/dist/config/compiler/outlookCompilerRules.js +0 -36
- package/dist/config/compiler/recommendationCompilerRules.d.ts +0 -2
- package/dist/config/compiler/recommendationCompilerRules.js +0 -83
- package/dist/config/compiler/socialCompilerRules.d.ts +0 -2
- package/dist/config/compiler/socialCompilerRules.js +0 -21
- package/dist/config/compiler/unsubscribeCompilerRules.d.ts +0 -2
- package/dist/config/compiler/unsubscribeCompilerRules.js +0 -64
- package/dist/enums/html-validator.d.ts +0 -6
- package/dist/enums/html-validator.js +0 -7
- package/dist/enums/recommendation.d.ts +0 -54
- package/dist/enums/recommendation.js +0 -56
- package/dist/enums/unsubscribe.d.ts +0 -15
- package/dist/enums/unsubscribe.js +0 -17
- package/dist/mock/api/validator.d.ts +0 -2
- package/dist/static/styles/components/notification.css.js +0 -55
- package/dist/static/styles/components/popup.css.js +0 -68
- package/dist/stores/recommendation.d.ts +0 -10
- package/dist/stores/recommendation.js +0 -9
- package/dist/stores/unsubscribe.d.ts +0 -8
- package/dist/stores/unsubscribe.js +0 -9
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}
|
|
1
|
+
[data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-c144e1e3]{position:relative;display:inline-block}.new-tag[data-v-c144e1e3]{height:24px;position:absolute;top:-8px;right:-16px;background-color:#dae1fb;color:#0a2ecc;font-size:13px;font-weight:400;padding:4px;border-radius:4px;z-index:10;pointer-events:none;border:1px solid #B5C1F1;line-height:16px}[data-v-c144e1e3] .guido__verion-history-view-option-selection-desktop svg,[data-v-c144e1e3] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-c144e1e3] .in-segments-wrapper__button_selected,[data-v-c144e1e3] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-c144e1e3] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-99e4d32b]{position:relative;display:inline-block}.new-tag[data-v-99e4d32b]{height:24px;position:absolute;top:-8px;right:-16px;background-color:#dae1fb;color:#0a2ecc;font-size:13px;font-weight:400;padding:4px;border-radius:4px;z-index:10;pointer-events:none;border:1px solid #B5C1F1;line-height:16px}[data-v-99e4d32b] .guido__view-option-selection-desktop svg,[data-v-99e4d32b] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-99e4d32b] .in-segments-wrapper__button_selected,[data-v-99e4d32b] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-99e4d32b] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-2d4cd446]{height:calc(100% - 75px);top:75px}.guido-editor__wrapper[data-v-b74952a6],.guido-editor__container[data-v-b74952a6]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-b74952a6]{height:calc(100vh - 75px)}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-acae5543] .vueperslides__bullets,[data-v-bccb3b50] .vueperslides__bullets{pointer-events:none!important}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const n = `.alert-message-wrapper {
|
|
2
2
|
box-shadow: none;
|
|
3
3
|
border: 1px solid var(--guido-color-gray-300);
|
|
4
4
|
color: var(--guido-color-gray-600);
|
|
@@ -16,36 +16,6 @@ const r = `.alert-message-wrapper {
|
|
|
16
16
|
color: var(--guido-color-border-onpage-message-info);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
.alert-message-wrapper.warn {
|
|
20
|
-
background: var(--guido-color-background-onpage-message-warn);
|
|
21
|
-
border-color: var(--guido-color-border-onpage-message-warn);
|
|
22
|
-
color: inherit;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
.alert-message-wrapper.warn ue-icon-component.icon {
|
|
26
|
-
color: var(--guido-color-border-onpage-message-warn);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
.alert-message-wrapper.success {
|
|
30
|
-
background: var(--guido-color-background-onpage-message-success);
|
|
31
|
-
border-color: var(--guido-color-border-onpage-message-success);
|
|
32
|
-
color: inherit;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.alert-message-wrapper.success ue-icon-component.icon {
|
|
36
|
-
color: var(--guido-color-border-onpage-message-success);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.alert-message-wrapper.error {
|
|
40
|
-
background: var(--guido-color-background-onpage-message-error);
|
|
41
|
-
border-color: var(--guido-color-border-onpage-message-error);
|
|
42
|
-
color: inherit;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.alert-message-wrapper.error ue-icon-component.icon {
|
|
46
|
-
color: var(--guido-color-border-onpage-message-error);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
19
|
.alert-message-wrapper ue-button {
|
|
50
20
|
padding: 0;
|
|
51
21
|
}
|
|
@@ -65,5 +35,5 @@ const r = `.alert-message-wrapper {
|
|
|
65
35
|
}
|
|
66
36
|
`;
|
|
67
37
|
export {
|
|
68
|
-
|
|
38
|
+
n as default
|
|
69
39
|
};
|
|
@@ -60,28 +60,8 @@ const o = `.control-shadow-wrapper:has(.button) {
|
|
|
60
60
|
color: var(--guido-color-primary-500);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
.
|
|
64
|
-
|
|
65
|
-
background-color: var(--guido-color-neutral-200);
|
|
66
|
-
color: var(--guido-color-neutral-800);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.primary > .button .icon-button {
|
|
70
|
-
color: var(--guido-color-neutral-800);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.primary > .button:hover:not(:disabled,.disabled) {
|
|
74
|
-
background-color: var(--guido-color-neutral-100);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.danger > .button {
|
|
78
|
-
background-color: var(--guido-color-danger-500);
|
|
79
|
-
color: var(--guido-color-white);
|
|
80
|
-
border: none;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.danger > .button:hover:not(:disabled,.disabled) {
|
|
84
|
-
background-color: var(--guido-color-danger-300);
|
|
63
|
+
.flat-white > .button:hover:not(:disabled,.disabled) {
|
|
64
|
+
color: var(--guido-color-primary-500);
|
|
85
65
|
}
|
|
86
66
|
|
|
87
67
|
ue-check-button.checked:not(.flat-white) input:checked + label {
|
|
@@ -120,16 +100,6 @@ ue-color {
|
|
|
120
100
|
ue-color .base-input {
|
|
121
101
|
width: 100%;
|
|
122
102
|
}
|
|
123
|
-
|
|
124
|
-
ue-select-text-input .select-text-input-toggle {
|
|
125
|
-
top: 0;
|
|
126
|
-
right: 0;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
ue-select-text-input .select-text-input-toggle .button {
|
|
130
|
-
justify-content: center;
|
|
131
|
-
background-color: transparent !important;
|
|
132
|
-
}
|
|
133
103
|
`;
|
|
134
104
|
export {
|
|
135
105
|
o as default
|
|
@@ -2,10 +2,6 @@ const n = `ue-wide-panel {
|
|
|
2
2
|
width: 425px;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
ue-main-editor-container[panel-position=SETTINGS_BLOCKS] ue-wide-panel {
|
|
6
|
-
right: calc(100% - calc(var(--ue-spacing-step, 5px) * 3) - 425px);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
5
|
ue-main-tabs-panel-component .fixed-panel-header {
|
|
10
6
|
display: none;
|
|
11
7
|
}
|
|
@@ -21,7 +17,7 @@ ue-description a {
|
|
|
21
17
|
}
|
|
22
18
|
|
|
23
19
|
.stacked-panel {
|
|
24
|
-
overflow:
|
|
20
|
+
overflow: scroll;
|
|
25
21
|
}
|
|
26
22
|
|
|
27
23
|
.stacked-panel-title {
|
|
@@ -12,12 +12,6 @@ const n = `.esd-x,
|
|
|
12
12
|
.ue-preview-control-wrapper ue-icon-component:not([disabled=true]):not(.stripo-static-icon):hover {
|
|
13
13
|
background: none;
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
.ue-email-wrapper-rounded,
|
|
17
|
-
.ue-email-wrapper-rounded-top {
|
|
18
|
-
border-radius: 0;
|
|
19
|
-
box-shadow: none;
|
|
20
|
-
}
|
|
21
15
|
`;
|
|
22
16
|
export {
|
|
23
17
|
n as default
|
|
@@ -12,20 +12,10 @@ const o = `:host {
|
|
|
12
12
|
--guido-color-neutral-800: #222938;
|
|
13
13
|
--guido-color-neutral-200: #DCDFE6;
|
|
14
14
|
--guido-color-neutral-100: #EFF2F4;
|
|
15
|
-
--guido-color-danger-300: #e84342;
|
|
16
15
|
--guido-color-danger-500: #DC2A2A;
|
|
17
16
|
--guido-box-shadow: 0 4px 12px 0 rgba(44,53,70,0.15);
|
|
18
17
|
--guido-color-background-onpage-message-info: #D3EEF8;
|
|
19
18
|
--guido-color-border-onpage-message-info: #258DDE;
|
|
20
|
-
--guido-color-background-onpage-message-warn: #FCEFE5;
|
|
21
|
-
--guido-color-border-onpage-message-warn: #D37400;
|
|
22
|
-
--guido-color-background-onpage-message-success: #E9F9EB;
|
|
23
|
-
--guido-color-border-onpage-message-success: #128745;
|
|
24
|
-
--guido-color-background-onpage-message-error: #FCECEC;
|
|
25
|
-
--guido-color-border-onpage-message-error: var(--guido-color-danger-500);
|
|
26
|
-
--guido-color-background-toaster-success: #128745;
|
|
27
|
-
--guido-color-background-toaster-error: var(--guido-color-danger-500);
|
|
28
|
-
--guido-color-background-toaster-warn: #D37400;
|
|
29
19
|
}
|
|
30
20
|
`;
|
|
31
21
|
export {
|
|
@@ -108,15 +108,7 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
|
|
|
108
108
|
}[];
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
|
-
userModalState:
|
|
112
|
-
Guido?: {
|
|
113
|
-
newVersionPopup?: boolean | undefined;
|
|
114
|
-
genericOnboarding?: boolean | undefined;
|
|
115
|
-
textBlockOnboarding?: boolean | undefined;
|
|
116
|
-
versionHistoryOnboarding?: boolean | undefined;
|
|
117
|
-
ampOnboarding?: boolean | undefined;
|
|
118
|
-
} | undefined;
|
|
119
|
-
};
|
|
111
|
+
userModalState: Record<string, Record<string, boolean>>;
|
|
120
112
|
isFetched: boolean;
|
|
121
113
|
} & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => (type: OnboardingType) => {
|
|
122
114
|
cardIndex: number;
|
|
@@ -247,15 +239,7 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
|
|
|
247
239
|
}[];
|
|
248
240
|
};
|
|
249
241
|
};
|
|
250
|
-
userModalState:
|
|
251
|
-
Guido?: {
|
|
252
|
-
newVersionPopup?: boolean | undefined;
|
|
253
|
-
genericOnboarding?: boolean | undefined;
|
|
254
|
-
textBlockOnboarding?: boolean | undefined;
|
|
255
|
-
versionHistoryOnboarding?: boolean | undefined;
|
|
256
|
-
ampOnboarding?: boolean | undefined;
|
|
257
|
-
} | undefined;
|
|
258
|
-
};
|
|
242
|
+
userModalState: Record<string, Record<string, boolean>>;
|
|
259
243
|
isFetched: boolean;
|
|
260
244
|
} & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => (type: OnboardingType) => boolean;
|
|
261
245
|
getCurrentCard: (state: {
|
|
@@ -366,15 +350,7 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
|
|
|
366
350
|
}[];
|
|
367
351
|
};
|
|
368
352
|
};
|
|
369
|
-
userModalState:
|
|
370
|
-
Guido?: {
|
|
371
|
-
newVersionPopup?: boolean | undefined;
|
|
372
|
-
genericOnboarding?: boolean | undefined;
|
|
373
|
-
textBlockOnboarding?: boolean | undefined;
|
|
374
|
-
versionHistoryOnboarding?: boolean | undefined;
|
|
375
|
-
ampOnboarding?: boolean | undefined;
|
|
376
|
-
} | undefined;
|
|
377
|
-
};
|
|
353
|
+
userModalState: Record<string, Record<string, boolean>>;
|
|
378
354
|
isFetched: boolean;
|
|
379
355
|
} & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => (type: OnboardingType) => {
|
|
380
356
|
classes: string;
|
|
@@ -501,15 +477,7 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
|
|
|
501
477
|
}[];
|
|
502
478
|
};
|
|
503
479
|
};
|
|
504
|
-
userModalState:
|
|
505
|
-
Guido?: {
|
|
506
|
-
newVersionPopup?: boolean | undefined;
|
|
507
|
-
genericOnboarding?: boolean | undefined;
|
|
508
|
-
textBlockOnboarding?: boolean | undefined;
|
|
509
|
-
versionHistoryOnboarding?: boolean | undefined;
|
|
510
|
-
ampOnboarding?: boolean | undefined;
|
|
511
|
-
} | undefined;
|
|
512
|
-
};
|
|
480
|
+
userModalState: Record<string, Record<string, boolean>>;
|
|
513
481
|
isFetched: boolean;
|
|
514
482
|
} & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => {
|
|
515
483
|
classes: string;
|
|
@@ -636,15 +604,7 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
|
|
|
636
604
|
}[];
|
|
637
605
|
};
|
|
638
606
|
};
|
|
639
|
-
userModalState:
|
|
640
|
-
Guido?: {
|
|
641
|
-
newVersionPopup?: boolean | undefined;
|
|
642
|
-
genericOnboarding?: boolean | undefined;
|
|
643
|
-
textBlockOnboarding?: boolean | undefined;
|
|
644
|
-
versionHistoryOnboarding?: boolean | undefined;
|
|
645
|
-
ampOnboarding?: boolean | undefined;
|
|
646
|
-
} | undefined;
|
|
647
|
-
};
|
|
607
|
+
userModalState: Record<string, Record<string, boolean>>;
|
|
648
608
|
isFetched: boolean;
|
|
649
609
|
} & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => {
|
|
650
610
|
classes: string;
|
|
@@ -771,15 +731,7 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
|
|
|
771
731
|
}[];
|
|
772
732
|
};
|
|
773
733
|
};
|
|
774
|
-
userModalState:
|
|
775
|
-
Guido?: {
|
|
776
|
-
newVersionPopup?: boolean | undefined;
|
|
777
|
-
genericOnboarding?: boolean | undefined;
|
|
778
|
-
textBlockOnboarding?: boolean | undefined;
|
|
779
|
-
versionHistoryOnboarding?: boolean | undefined;
|
|
780
|
-
ampOnboarding?: boolean | undefined;
|
|
781
|
-
} | undefined;
|
|
782
|
-
};
|
|
734
|
+
userModalState: Record<string, Record<string, boolean>>;
|
|
783
735
|
isFetched: boolean;
|
|
784
736
|
} & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => {
|
|
785
737
|
classes: string;
|
|
@@ -906,15 +858,7 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
|
|
|
906
858
|
}[];
|
|
907
859
|
};
|
|
908
860
|
};
|
|
909
|
-
userModalState:
|
|
910
|
-
Guido?: {
|
|
911
|
-
newVersionPopup?: boolean | undefined;
|
|
912
|
-
genericOnboarding?: boolean | undefined;
|
|
913
|
-
textBlockOnboarding?: boolean | undefined;
|
|
914
|
-
versionHistoryOnboarding?: boolean | undefined;
|
|
915
|
-
ampOnboarding?: boolean | undefined;
|
|
916
|
-
} | undefined;
|
|
917
|
-
};
|
|
861
|
+
userModalState: Record<string, Record<string, boolean>>;
|
|
918
862
|
isFetched: boolean;
|
|
919
863
|
} & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => {
|
|
920
864
|
classes: string;
|
|
@@ -1041,15 +985,7 @@ export declare const useOnboardingStore: import("pinia").StoreDefinition<"onboar
|
|
|
1041
985
|
}[];
|
|
1042
986
|
};
|
|
1043
987
|
};
|
|
1044
|
-
userModalState:
|
|
1045
|
-
Guido?: {
|
|
1046
|
-
newVersionPopup?: boolean | undefined;
|
|
1047
|
-
genericOnboarding?: boolean | undefined;
|
|
1048
|
-
textBlockOnboarding?: boolean | undefined;
|
|
1049
|
-
versionHistoryOnboarding?: boolean | undefined;
|
|
1050
|
-
ampOnboarding?: boolean | undefined;
|
|
1051
|
-
} | undefined;
|
|
1052
|
-
};
|
|
988
|
+
userModalState: Record<string, Record<string, boolean>>;
|
|
1053
989
|
isFetched: boolean;
|
|
1054
990
|
} & import("pinia").PiniaCustomStateProperties<OnboardingStoreState>) => (type: OnboardingType) => boolean;
|
|
1055
991
|
}, {
|
package/dist/stores/preview.js
CHANGED
|
@@ -27,7 +27,9 @@ const s = () => ({
|
|
|
27
27
|
},
|
|
28
28
|
actions: {
|
|
29
29
|
updateAMPData(t) {
|
|
30
|
-
this.ampHtml = t.ampHtml ?? "", this.ampErrors = t.ampErrors ?? []
|
|
30
|
+
this.ampHtml = t.ampHtml ?? "", this.ampErrors = t.ampErrors ?? [];
|
|
31
|
+
const r = t.ampHtml ? "AMP" : "html";
|
|
32
|
+
this.emailFormat = r;
|
|
31
33
|
},
|
|
32
34
|
setEmailFormat(t) {
|
|
33
35
|
this.emailFormat = t;
|
|
@@ -1,28 +1,21 @@
|
|
|
1
|
-
import { useActionsApi as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
const
|
|
5
|
-
const t = f(), { getCompiledEmail: i, getTemplateData: o } = g(), { compileHtml: n } = S();
|
|
1
|
+
import { useActionsApi as c } from "../composables/useActionsApi.js";
|
|
2
|
+
import { useDynamicContentStore as l } from "../stores/dynamic-content.js";
|
|
3
|
+
const y = () => {
|
|
4
|
+
const t = l(), { getCompiledEmail: e, getTemplateData: a } = c();
|
|
6
5
|
return {
|
|
7
6
|
prepareTemplateDetails: async () => {
|
|
8
|
-
const { html:
|
|
7
|
+
const { html: n, ampHtml: s = "", ampErrors: o = [] } = await e({
|
|
9
8
|
minimize: !0,
|
|
10
9
|
resetDataSavedFlag: !1
|
|
11
|
-
}), { html:
|
|
12
|
-
return
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
executionTime: `${e.executionTime.toFixed(2)}ms`
|
|
18
|
-
}), {
|
|
19
|
-
dynamicContentList: u,
|
|
20
|
-
compiledHtml: p,
|
|
21
|
-
rawHtml: r,
|
|
22
|
-
css: c,
|
|
10
|
+
}), { html: m, css: i, syncModulesIds: r = [] } = await a();
|
|
11
|
+
return {
|
|
12
|
+
dynamicContentList: t.getSelectedDynamicContentList,
|
|
13
|
+
compiledHtml: n,
|
|
14
|
+
rawHtml: m,
|
|
15
|
+
css: i,
|
|
23
16
|
ampHtml: s,
|
|
24
|
-
ampErrors:
|
|
25
|
-
modules:
|
|
17
|
+
ampErrors: o,
|
|
18
|
+
modules: r,
|
|
26
19
|
recommendation: {
|
|
27
20
|
campaignUrls: {},
|
|
28
21
|
configs: {}
|
|
@@ -36,5 +29,5 @@ const H = () => {
|
|
|
36
29
|
};
|
|
37
30
|
};
|
|
38
31
|
export {
|
|
39
|
-
|
|
32
|
+
y as useTemplatePreparation
|
|
40
33
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.0.2-beta.
|
|
3
|
+
"version": "1.0.2-beta.85ea6e2",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
"lint": "NODE_OPTIONS=--max-old-space-size=2048 eslint ./ && bun run type-check",
|
|
25
25
|
"lint:fix": "NODE_OPTIONS=--max-old-space-size=2048 eslint --fix ./",
|
|
26
26
|
"type-check": "vue-tsc --noEmit --project tsconfig.config.json && vue-tsc --noEmit --project tsconfig.app.json",
|
|
27
|
-
"test:visual-update": "npx playwright test --update-snapshots --reporter html"
|
|
28
|
-
"prepare": "husky"
|
|
27
|
+
"test:visual-update": "npx playwright test --update-snapshots --reporter html"
|
|
29
28
|
},
|
|
30
29
|
"keywords": [],
|
|
31
30
|
"author": "",
|
|
@@ -66,7 +65,6 @@
|
|
|
66
65
|
"eslint-plugin-vue": "10.1.0",
|
|
67
66
|
"eslint-plugin-vue-scoped-css": "2.6.1",
|
|
68
67
|
"globals": "16.0.0",
|
|
69
|
-
"husky": "9.1.7",
|
|
70
68
|
"msw": "2.10.3",
|
|
71
69
|
"sass": "1.69.7",
|
|
72
70
|
"typescript": "5.5.4",
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { useConfig as V } from "./useConfig.js";
|
|
2
|
-
import { TemplateTypes as H } from "../enums/defaults.js";
|
|
3
|
-
import { DISPLAY_CONDITIONS_REGEX as O, DISPLAY_CONDITIONS_EXCEPTIONS_REGEX as B, CampaignCouldNotBeSavedKey as _, CanNotMakeAnyChangesForRunningKey as R } from "../enums/html-validator.js";
|
|
4
|
-
import { ToasterTypeOptions as r } from "../enums/toaster.js";
|
|
5
|
-
import { useRecommendationStore as D } from "../stores/recommendation.js";
|
|
6
|
-
import { base64EncodeWithSpecialChars as P } from "../utils/base64.js";
|
|
7
|
-
import { useHttp as X } from "./useHttp.js";
|
|
8
|
-
import { useToaster as j } from "./useToaster.js";
|
|
9
|
-
import { useTranslations as z } from "./useTranslations.js";
|
|
10
|
-
const tt = () => {
|
|
11
|
-
var d;
|
|
12
|
-
const { showToaster: a } = j(), { post: y } = X(), { config: C } = V(), i = z(), m = D(), f = ((d = C.partner) == null ? void 0 : d.messageType) === H.transactional, h = async (t) => {
|
|
13
|
-
const e = await y(
|
|
14
|
-
"/newsletter/template-library/check-template-html-body",
|
|
15
|
-
{ html: P(t) }
|
|
16
|
-
), { status: n, message: c } = e.data;
|
|
17
|
-
return n || a({
|
|
18
|
-
type: r.Alert,
|
|
19
|
-
message: n === void 0 ? c : i("newsletter.invalid-url-link-for-toaster")
|
|
20
|
-
}), i(_), c === i(R) && a({
|
|
21
|
-
type: r.Alert,
|
|
22
|
-
message: i("newsletter.already-in-progress")
|
|
23
|
-
}), n;
|
|
24
|
-
}, v = (t) => !["if", "endif", "else", "elif", "now"].includes(t.toLowerCase()), w = (t) => ["if", "endif"].includes(t.toLowerCase()), S = (t, s) => {
|
|
25
|
-
const e = t.match(/({%(.*?)%})/g);
|
|
26
|
-
let n = !0;
|
|
27
|
-
return e !== null && !f && e.forEach((c) => {
|
|
28
|
-
const o = c.slice(2, -2).trim().match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
|
|
29
|
-
if (o && o.length > 0) {
|
|
30
|
-
const [l] = o;
|
|
31
|
-
v(l) && !s.includes(l) && (a({
|
|
32
|
-
type: r.Warning,
|
|
33
|
-
message: i("custom-fields.invalid-custom-fields")
|
|
34
|
-
}), n = !1);
|
|
35
|
-
}
|
|
36
|
-
}), n;
|
|
37
|
-
}, E = async (t, s, e) => {
|
|
38
|
-
const n = e ? await h(t) : !0;
|
|
39
|
-
return S(t, s) && n;
|
|
40
|
-
}, T = (t) => t.length > 0 ? !0 : (a({
|
|
41
|
-
type: r.Warning,
|
|
42
|
-
message: i("newsletter.html-content-is-empty")
|
|
43
|
-
}), !1), I = (t) => {
|
|
44
|
-
const s = (t.match(/{/gm) || []).length, e = (t.match(/}/gm) || []).length;
|
|
45
|
-
return s > e && a({
|
|
46
|
-
type: r.Warning,
|
|
47
|
-
message: i("custom-fields.missing-closing-braces")
|
|
48
|
-
}), s < e && a({
|
|
49
|
-
type: r.Warning,
|
|
50
|
-
message: i("custom-fields.missing-opening-braces")
|
|
51
|
-
}), s === e;
|
|
52
|
-
}, A = (t) => {
|
|
53
|
-
const s = t.match(/{{\s*(\w+\s+((\w+\|\w+)|(\w+)))\s*}}/gm) === null;
|
|
54
|
-
return s || a({
|
|
55
|
-
type: r.Warning,
|
|
56
|
-
message: i("custom-fields.invalid-custom-fields")
|
|
57
|
-
}), s;
|
|
58
|
-
}, W = (t, s) => {
|
|
59
|
-
const e = t.match(/{{([a-zA-Z0-9_\s]*)}}/gm);
|
|
60
|
-
if (e && !f) {
|
|
61
|
-
const n = s.map((o) => o.toLowerCase()), c = e.some((o) => {
|
|
62
|
-
const l = o.replace("{{", "").replace("}}", "").trim().toLowerCase();
|
|
63
|
-
return !n.includes(l) || l === "";
|
|
64
|
-
});
|
|
65
|
-
return c && a({
|
|
66
|
-
type: r.Warning,
|
|
67
|
-
message: i("custom-fields.invalid-custom-fields")
|
|
68
|
-
}), !c;
|
|
69
|
-
}
|
|
70
|
-
return !0;
|
|
71
|
-
}, x = (t) => {
|
|
72
|
-
const s = t.match(/{%(.*?)%}/g), e = [];
|
|
73
|
-
let n = !0;
|
|
74
|
-
if (s && s.forEach((c) => {
|
|
75
|
-
const o = c.match(O), l = c.match(B), L = (o == null ? void 0 : o.join("")) || "";
|
|
76
|
-
(!o || c !== L) && !l && (a({
|
|
77
|
-
type: r.Alert,
|
|
78
|
-
message: i("newsletter.display-conditions-invalid-syntax")
|
|
79
|
-
}), n = !1), o && o.forEach((u) => {
|
|
80
|
-
u.trim() === "=" && (a({
|
|
81
|
-
type: r.Alert,
|
|
82
|
-
message: i("custom-conditions.wrong-equality-operators")
|
|
83
|
-
}), n = !1);
|
|
84
|
-
const g = u.match(/^[a-zA-Z]*$/g);
|
|
85
|
-
g && g.forEach((p) => {
|
|
86
|
-
w(p) && e.push(p);
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
}), e.length) {
|
|
90
|
-
const c = e.filter((l) => l === "if"), o = e.filter((l) => l === "endif");
|
|
91
|
-
c.length !== o.length && (a({
|
|
92
|
-
type: r.Alert,
|
|
93
|
-
message: i("custom-conditions.missing-if-endif-tag")
|
|
94
|
-
}), n = !1);
|
|
95
|
-
}
|
|
96
|
-
return n;
|
|
97
|
-
}, b = (t) => {
|
|
98
|
-
const s = (t.match(/{% /gm) || []).length, e = (t.match(/ %}/gm) || []).length, n = s === e;
|
|
99
|
-
return n || a({
|
|
100
|
-
type: r.Warning,
|
|
101
|
-
message: i("custom-conditions.no-space-after-braces")
|
|
102
|
-
}), n;
|
|
103
|
-
}, N = (t) => (t.match(/({%(.*?)%})/g) || []).filter((e) => e.includes("if")).map((e) => (e.match(/{{.*}}/gm) || []).length).reduce((e, n) => e + n, 0) > 0 ? (a({
|
|
104
|
-
type: r.Warning,
|
|
105
|
-
message: i("custom-conditions.no-braces-inside-if-tag")
|
|
106
|
-
}), !1) : !0, k = () => m.recommendationConfigs && Object.values(m.recommendationConfigs).find((s) => s.filters.find((e) => e.value === "")) !== void 0 ? (a({
|
|
107
|
-
type: r.Alert,
|
|
108
|
-
message: i("newsletter.fill-all-necessary-fields")
|
|
109
|
-
}), !1) : !0, F = (t) => {
|
|
110
|
-
const s = /src="[^"]*\.(svg|pst)"/gm;
|
|
111
|
-
return t.match(s) === null ? !0 : (a({
|
|
112
|
-
type: r.Alert,
|
|
113
|
-
message: i("newsletter.invalid-image-type")
|
|
114
|
-
}), !1);
|
|
115
|
-
};
|
|
116
|
-
return { validateHtml: async (t, s, e = !1) => await E(t, s, e) && T(t) && I(t) && A(t) && W(t, s) && x(t) && b(t) && N(t) && k() && F(t) };
|
|
117
|
-
};
|
|
118
|
-
export {
|
|
119
|
-
tt as useHtmlValidator
|
|
120
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
type CardWidthParams = {
|
|
2
|
-
mobileLeftPadding: number;
|
|
3
|
-
mobileRightPadding: number;
|
|
4
|
-
cardsInRow: number;
|
|
5
|
-
unresponsive: boolean;
|
|
6
|
-
};
|
|
7
|
-
interface CampaignData extends CardWidthParams {
|
|
8
|
-
textTrimming: boolean;
|
|
9
|
-
orientation: string;
|
|
10
|
-
priceBeforeTextValue: string;
|
|
11
|
-
priceAfterTextValue: string;
|
|
12
|
-
discountBeforeTextValue: string;
|
|
13
|
-
discountAfterTextValue: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const useRecommendation: () => {
|
|
16
|
-
calculateCardWidth: ({ mobileLeftPadding, mobileRightPadding, cardsInRow, unresponsive, }: CardWidthParams) => number;
|
|
17
|
-
getRecommendationCampaignData: (id: string) => CampaignData;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { MinDeviceViewport as r, DefaultPadding as c } from "../enums/recommendation.js";
|
|
2
|
-
const m = () => ({
|
|
3
|
-
calculateCardWidth: ({
|
|
4
|
-
mobileLeftPadding: e,
|
|
5
|
-
mobileRightPadding: a,
|
|
6
|
-
cardsInRow: n,
|
|
7
|
-
unresponsive: i
|
|
8
|
-
}) => {
|
|
9
|
-
const t = i ? n : 1, o = e + a + (t - 1) * c;
|
|
10
|
-
return (r - o) / t;
|
|
11
|
-
},
|
|
12
|
-
getRecommendationCampaignData: (e) => (console.debug(e), {
|
|
13
|
-
textTrimming: !1,
|
|
14
|
-
orientation: "vertical",
|
|
15
|
-
mobileLeftPadding: 0,
|
|
16
|
-
mobileRightPadding: 0,
|
|
17
|
-
cardsInRow: 2,
|
|
18
|
-
unresponsive: !1,
|
|
19
|
-
priceBeforeTextValue: "",
|
|
20
|
-
priceAfterTextValue: "",
|
|
21
|
-
discountBeforeTextValue: "",
|
|
22
|
-
discountAfterTextValue: ""
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
export {
|
|
26
|
-
m as useRecommendation
|
|
27
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useSaveStart as i, useSaveComplete as l } from "./useGuidoActions.js";
|
|
2
|
-
import { useTemplatePreparation as m } from "../utils/templatePreparation.js";
|
|
3
|
-
import { useHtmlValidator as n } from "./useHtmlValidator.js";
|
|
4
|
-
const f = () => {
|
|
5
|
-
const e = i(), a = l(), { validateHtml: s } = n();
|
|
6
|
-
return { save: async (o = !1) => {
|
|
7
|
-
e();
|
|
8
|
-
const { prepareTemplateDetails: r } = m(), t = await r();
|
|
9
|
-
if (await s(t.compiledHtml, [], !0))
|
|
10
|
-
return o || a(t), t;
|
|
11
|
-
} };
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
f as useSave
|
|
15
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
const c = `
|
|
2
|
-
<!--[if gte mso 9]>
|
|
3
|
-
<xml>
|
|
4
|
-
<o:OfficeDocumentSettings>
|
|
5
|
-
<o:AllowPNG></o:AllowPNG>
|
|
6
|
-
<o:PixelsPerInch>96</o:PixelsPerInch>
|
|
7
|
-
</o:OfficeDocumentSettings>
|
|
8
|
-
</xml>
|
|
9
|
-
<![endif]-->`, s = {
|
|
10
|
-
xmlns: "http://www.w3.org/1999/xhtml",
|
|
11
|
-
"xmlns:o": "urn:schemas-microsoft-com:office:office"
|
|
12
|
-
}, r = [
|
|
13
|
-
{
|
|
14
|
-
id: "append-office-xml",
|
|
15
|
-
description: "Appending office XML into the head if it does not exist.",
|
|
16
|
-
type: "custom",
|
|
17
|
-
processor: (e) => e.includes("<o:OfficeDocumentSettings>") ? e : e.replace("</head>", `${c}</head>`),
|
|
18
|
-
priority: 70
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
id: "set-html-attributes",
|
|
22
|
-
description: "Appending office XML into the head if it does not exist.",
|
|
23
|
-
type: "custom",
|
|
24
|
-
processor: (e) => {
|
|
25
|
-
let t = e;
|
|
26
|
-
return Object.entries(s).forEach(([o, i]) => {
|
|
27
|
-
const n = new RegExp(`${o}="[^"]*"`);
|
|
28
|
-
t.search(n) === -1 && (t = t.replace("<html", `<html ${o}="${i}"`));
|
|
29
|
-
}), t;
|
|
30
|
-
},
|
|
31
|
-
priority: 71
|
|
32
|
-
}
|
|
33
|
-
];
|
|
34
|
-
export {
|
|
35
|
-
r as outlookCompilerRules
|
|
36
|
-
};
|