@useinsider/guido 1.0.0-beta.61cf684 → 1.0.0-beta.637a8ae
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 +2 -26
- package/dist/@types/generic.d.ts +0 -28
- package/dist/components/Guido.vue.d.ts +2 -8
- package/dist/components/Guido.vue.js +9 -9
- package/dist/components/Guido.vue2.js +43 -67
- package/dist/components/organisms/email-preview/EmailPreviewContainer.vue.d.ts +15 -0
- package/dist/components/organisms/email-preview/EmailPreviewContainer.vue.js +17 -0
- package/dist/components/organisms/email-preview/EmailPreviewContainer.vue2.js +32 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +14 -2
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +9 -12
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +23 -16
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +8 -10
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +51 -23
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +15 -1
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +11 -11
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +31 -23
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +14 -1
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +2 -2
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +10 -15
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +18 -1
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +3 -4
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +12 -20
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +15 -2
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +10 -11
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +13 -11
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +16 -1
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +9 -9
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +21 -16
- package/dist/components/organisms/email-preview/mobile-preview/OpenedEmailView.vue.d.ts +17 -0
- package/dist/components/organisms/email-preview/mobile-preview/{ContentView.vue.js → OpenedEmailView.vue.js} +6 -6
- package/dist/components/organisms/email-preview/mobile-preview/OpenedEmailView.vue2.js +26 -0
- package/dist/components/organisms/header/MiddleSlot.vue.js +6 -6
- package/dist/components/organisms/header/MiddleSlot.vue2.js +18 -15
- package/dist/components/organisms/header/RightSlot.vue.js +8 -9
- package/dist/components/organisms/header/RightSlot.vue2.js +23 -28
- package/dist/components/organisms/header/ViewOptions.vue.js +7 -7
- package/dist/components/organisms/header/ViewOptions.vue2.js +12 -30
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
- package/dist/components/wrappers/{WpModal.vue.d.ts → BaseModal.vue.d.ts} +14 -3
- package/dist/components/wrappers/{WpModal.vue.js → BaseModal.vue.js} +8 -16
- package/dist/components/wrappers/{WpModal.vue2.js → BaseModal.vue2.js} +6 -6
- package/dist/composables/useActionsApi.d.ts +2 -3
- package/dist/composables/useActionsApi.js +25 -55
- package/dist/composables/useCodeEditorApi.d.ts +3 -2
- package/dist/composables/useCodeEditorApi.js +10 -4
- package/dist/composables/{useResponsivePreview.d.ts → useEmailResponsiveFit.d.ts} +2 -2
- package/dist/composables/useEmailResponsiveFit.js +72 -0
- package/dist/composables/useHtmlCompiler.js +8 -9
- package/dist/composables/usePartner.d.ts +1 -1
- package/dist/composables/usePartner.js +14 -9
- package/dist/composables/usePreviewMode.d.ts +2 -1
- package/dist/composables/usePreviewMode.js +14 -24
- package/dist/composables/useStripo.js +15 -25
- package/dist/composables/useToaster.d.ts +1 -1
- package/dist/composables/useToaster.js +11 -11
- package/dist/composables/useTranslations.js +2 -3
- package/dist/enums/defaults.d.ts +1 -4
- package/dist/enums/defaults.js +4 -15
- package/dist/enums/gmailMobilePreview.d.ts +7 -0
- package/dist/enums/gmailMobilePreview.js +17 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +15 -13
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +4 -4
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +2 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +2 -2
- package/dist/node_modules/lodash-es/_isMasked.js +2 -2
- package/dist/stores/editor.d.ts +0 -2
- package/dist/stores/editor.js +3 -5
- package/dist/stores/preview.d.ts +49 -39
- package/dist/stores/preview.js +14 -44
- package/package.json +3 -3
- package/dist/@types/save-as-template.d.ts +0 -11
- package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
- package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -2
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +0 -20
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +0 -63
- package/dist/components/wrappers/WpDrawer.vue.d.ts +0 -63
- package/dist/components/wrappers/WpDrawer.vue.js +0 -25
- package/dist/components/wrappers/WpDrawer.vue2.js +0 -23
- package/dist/composables/useConfig.d.ts +0 -4
- package/dist/composables/useConfig.js +0 -7
- package/dist/composables/useResponsivePreview.js +0 -86
- package/dist/composables/useValidation.d.ts +0 -56
- package/dist/composables/useValidation.js +0 -19
- package/dist/composables/validators/saveAsTemplate.d.ts +0 -31
- package/dist/composables/validators/saveAsTemplate.js +0 -24
- package/dist/enums/preview.d.ts +0 -13
- package/dist/enums/preview.js +0 -23
- package/dist/mock/api/template-library.d.ts +0 -2
- package/dist/node_modules/@vueuse/shared/index.js +0 -45
- package/dist/node_modules/lodash-es/_Stack.js +0 -18
- package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/lodash-es/_apply.js +0 -16
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -19
- package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
- package/dist/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
- package/dist/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
- package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
- package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
- package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
- package/dist/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
- package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
- package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/lodash-es/_copyArray.js +0 -9
- package/dist/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
- package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
- package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
- package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
- package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
- package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
- package/dist/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/lodash-es/_overRest.js +0 -15
- package/dist/node_modules/lodash-es/_safeGet.js +0 -7
- package/dist/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/lodash-es/_shortOut.js +0 -16
- package/dist/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/lodash-es/_stackSet.js +0 -17
- package/dist/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
- package/dist/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
- package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/lodash-es/merge.js +0 -8
- package/dist/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
- package/dist/node_modules/valibot/dist/index.js +0 -190
- package/dist/node_modules/vue-demi/lib/index.js +0 -7
- package/dist/services/templateLibraryApi.d.ts +0 -7
- package/dist/services/templateLibraryApi.js +0 -86
- package/dist/stores/dynamic-content.d.ts +0 -27
- package/dist/stores/dynamic-content.js +0 -23
- package/dist/stores/save-as-template.d.ts +0 -73
- package/dist/stores/save-as-template.js +0 -48
- package/dist/utils/arrayUtil.d.ts +0 -1
- package/dist/utils/arrayUtil.js +0 -10
- package/dist/utils/base64.d.ts +0 -1
- package/dist/utils/base64.js +0 -7
- package/dist/utils/genericUtil.d.ts +0 -2
- package/dist/utils/genericUtil.js +0 -7
- package/dist/utils/templatePreparation.d.ts +0 -20
- package/dist/utils/templatePreparation.js +0 -31
- package/dist/utils/tooltipUtils.d.ts +0 -2
- package/dist/utils/tooltipUtils.js +0 -11
package/README.md
CHANGED
|
@@ -57,11 +57,6 @@ export default {
|
|
|
57
57
|
translationsPath: 'window.trans.en',
|
|
58
58
|
htmlCompilerRules: [],
|
|
59
59
|
ignoreDefaultHtmlCompilerRules: false,
|
|
60
|
-
features: {
|
|
61
|
-
dynamicContent: true,
|
|
62
|
-
saveAsTemplate: true,
|
|
63
|
-
versionHistory: true
|
|
64
|
-
}
|
|
65
60
|
},
|
|
66
61
|
dynamicContentModalVisible: false
|
|
67
62
|
};
|
|
@@ -143,13 +138,8 @@ dynamicContent.close();
|
|
|
143
138
|
```typescript
|
|
144
139
|
interface GuidoConfig {
|
|
145
140
|
translationsPath: string;
|
|
146
|
-
htmlCompilerRules
|
|
147
|
-
ignoreDefaultHtmlCompilerRules
|
|
148
|
-
features: {
|
|
149
|
-
dynamicContent: boolean;
|
|
150
|
-
saveAsTemplate: boolean;
|
|
151
|
-
versionHistory: boolean;
|
|
152
|
-
};
|
|
141
|
+
htmlCompilerRules: CompilerRule[];
|
|
142
|
+
ignoreDefaultHtmlCompilerRules: boolean;
|
|
153
143
|
}
|
|
154
144
|
```
|
|
155
145
|
|
|
@@ -158,10 +148,6 @@ interface GuidoConfig {
|
|
|
158
148
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
159
149
|
| `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
|
|
160
150
|
| `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
|
|
161
|
-
| `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
|
|
162
|
-
| `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
|
|
163
|
-
| `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
|
|
164
|
-
| `features.versionHistory` | `boolean` | `true` | Enable version history feature |
|
|
165
151
|
|
|
166
152
|
```typescript
|
|
167
153
|
interface DynamicContent {
|
|
@@ -269,11 +255,6 @@ Define complex transformation logic with a custom processor function.
|
|
|
269
255
|
```typescript
|
|
270
256
|
const guidoConfig = {
|
|
271
257
|
translationsPath: 'window.trans.en',
|
|
272
|
-
features: {
|
|
273
|
-
dynamicContent: true,
|
|
274
|
-
saveAsTemplate: true,
|
|
275
|
-
versionHistory: false // Disable version history
|
|
276
|
-
},
|
|
277
258
|
htmlCompilerRules: [
|
|
278
259
|
{
|
|
279
260
|
id: 'replace-domain',
|
|
@@ -302,11 +283,6 @@ const guidoConfig = {
|
|
|
302
283
|
```typescript
|
|
303
284
|
const guidoConfig = {
|
|
304
285
|
translationsPath: 'window.trans.en',
|
|
305
|
-
features: {
|
|
306
|
-
dynamicContent: true,
|
|
307
|
-
saveAsTemplate: true,
|
|
308
|
-
versionHistory: true
|
|
309
|
-
},
|
|
310
286
|
ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
|
|
311
287
|
htmlCompilerRules: [
|
|
312
288
|
// Only your custom rules will be applied
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -1,21 +1,9 @@
|
|
|
1
1
|
import type { CompilerRule } from './html-compiler';
|
|
2
|
-
type Features = {
|
|
3
|
-
dynamicContent?: boolean;
|
|
4
|
-
saveAsTemplate?: boolean;
|
|
5
|
-
versionHistory?: boolean;
|
|
6
|
-
};
|
|
7
|
-
type Partner = {
|
|
8
|
-
partnerName: string;
|
|
9
|
-
productType: number;
|
|
10
|
-
messageType: number;
|
|
11
|
-
};
|
|
12
2
|
export type GuidoConfig = {
|
|
13
3
|
translationsPath: string;
|
|
14
4
|
htmlCompilerRules?: CompilerRule[];
|
|
15
5
|
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
16
6
|
emailHeader: EmailHeader;
|
|
17
|
-
partner?: Partner;
|
|
18
|
-
features?: Features;
|
|
19
7
|
};
|
|
20
8
|
export type DynamicContent = {
|
|
21
9
|
value: string;
|
|
@@ -26,19 +14,3 @@ export interface EmailHeader {
|
|
|
26
14
|
senderName: string;
|
|
27
15
|
subject: string;
|
|
28
16
|
}
|
|
29
|
-
export interface TooltipOptions {
|
|
30
|
-
id: string;
|
|
31
|
-
dynamicPosition: boolean;
|
|
32
|
-
staticPosition: 'top center' | 'top left' | 'top right' | 'bottom center' | 'bottom left' | 'bottom right' | 'right center' | 'right top' | 'right bottom' | 'left center' | 'left top' | 'left bottom';
|
|
33
|
-
iconStatus: boolean;
|
|
34
|
-
offset?: {
|
|
35
|
-
x: number;
|
|
36
|
-
y: number;
|
|
37
|
-
};
|
|
38
|
-
preventXss?: boolean;
|
|
39
|
-
}
|
|
40
|
-
export type MergeTag = {
|
|
41
|
-
label: string;
|
|
42
|
-
value: string;
|
|
43
|
-
};
|
|
44
|
-
export {};
|
|
@@ -3,13 +3,11 @@ import type { Template } from '@@/Types/stripo';
|
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
templateId: string;
|
|
5
5
|
userId: string;
|
|
6
|
-
messageType?: number;
|
|
7
6
|
partnerName?: string;
|
|
8
|
-
productType?:
|
|
7
|
+
productType?: string;
|
|
9
8
|
username?: string;
|
|
10
9
|
html?: string;
|
|
11
10
|
css?: string;
|
|
12
|
-
preselectedDynamicContentList: DynamicContent[];
|
|
13
11
|
guidoConfig: GuidoConfig;
|
|
14
12
|
};
|
|
15
13
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
@@ -17,15 +15,11 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
17
15
|
insert: (data: DynamicContent) => void;
|
|
18
16
|
close: () => void;
|
|
19
17
|
};
|
|
20
|
-
hasChanges: import("vue").ComputedRef<boolean>;
|
|
21
18
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
22
19
|
"dynamic-content:open": (detail: DynamicContent | null) => void;
|
|
23
20
|
back: () => void;
|
|
24
21
|
"save:start": () => void;
|
|
25
|
-
"save:complete": (
|
|
26
|
-
template: Omit<Template, "forceRecreate">;
|
|
27
|
-
dynamicContentList: DynamicContent[];
|
|
28
|
-
}) => void;
|
|
22
|
+
"save:complete": (template: Omit<Template, "forceRecreate">) => void;
|
|
29
23
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
30
24
|
export default _default;
|
|
31
25
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var i = this,
|
|
6
|
-
return
|
|
7
|
-
},
|
|
3
|
+
import s from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
5
|
+
var i = this, r = i._self._c, e = i._self._setupProxy;
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper" }, [r(e.HeaderWrapper), e.isPreviewModeOpen ? r(e.EmailPreview, { attrs: { "email-header": e.guidoConfig.emailHeader } }) : i._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.isPreviewModeOpen, expression: "!isPreviewModeOpen" }], staticClass: "guido-editor__container", attrs: { id: "guido-editor" } })], 1);
|
|
7
|
+
}, t = [], d = /* @__PURE__ */ s(
|
|
8
8
|
o,
|
|
9
|
-
s,
|
|
10
9
|
a,
|
|
10
|
+
t,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"988dfdfd"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const v = d.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
v as default
|
|
18
18
|
};
|
|
@@ -1,105 +1,81 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useStripoApi as
|
|
9
|
-
|
|
10
|
-
import { useEditorStore as K } from "../stores/editor.js";
|
|
11
|
-
import { usePreviewStore as R } from "../stores/preview.js";
|
|
12
|
-
import U from "../node_modules/lodash-es/merge.js";
|
|
13
|
-
const ne = /* @__PURE__ */ G({
|
|
1
|
+
import { defineComponent as E, defineAsyncComponent as P, onMounted as D } from "vue";
|
|
2
|
+
import { provideGuidoActions as S } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as _ } from "../composables/usePartner.js";
|
|
4
|
+
import { usePreviewMode as G } from "../composables/usePreviewMode.js";
|
|
5
|
+
import { useStripo as I } from "../composables/useStripo.js";
|
|
6
|
+
import { DefaultUsername as k, DefaultGuidoConfig as T } from "../enums/defaults.js";
|
|
7
|
+
import A from "./organisms/header/HeaderWrapper.vue.js";
|
|
8
|
+
import { useStripoApi as M } from "../services/stripoApi.js";
|
|
9
|
+
const L = /* @__PURE__ */ E({
|
|
14
10
|
__name: "Guido",
|
|
15
11
|
props: {
|
|
16
12
|
templateId: null,
|
|
17
13
|
userId: null,
|
|
18
|
-
messageType: null,
|
|
19
14
|
partnerName: null,
|
|
20
15
|
productType: null,
|
|
21
16
|
username: null,
|
|
22
17
|
html: null,
|
|
23
18
|
css: null,
|
|
24
|
-
preselectedDynamicContentList: null,
|
|
25
19
|
guidoConfig: null
|
|
26
20
|
},
|
|
27
21
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
|
|
28
|
-
setup(
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
window.GuidoConfig = U(W, p), window.GuidoConfig.partner = {
|
|
43
|
-
partnerName: i,
|
|
44
|
-
productType: c,
|
|
45
|
-
messageType: f
|
|
22
|
+
setup(C, { expose: b, emit: o }) {
|
|
23
|
+
const t = C, w = P(() => import("./organisms/email-preview/EmailPreviewContainer.vue.js")), { getPartnerName: n, getProductType: c } = _(), { isPreviewModeOpen: h } = G(), {
|
|
24
|
+
templateId: a,
|
|
25
|
+
userId: i,
|
|
26
|
+
guidoConfig: s,
|
|
27
|
+
html: r = "",
|
|
28
|
+
css: d = "",
|
|
29
|
+
partnerName: l = n(),
|
|
30
|
+
productType: u = c(),
|
|
31
|
+
username: m = k
|
|
32
|
+
} = t;
|
|
33
|
+
window.GuidoConfig = {
|
|
34
|
+
...T,
|
|
35
|
+
...s
|
|
46
36
|
};
|
|
47
|
-
const { initPlugin:
|
|
48
|
-
|
|
49
|
-
userId: u,
|
|
50
|
-
username: C,
|
|
51
|
-
partnerName: i,
|
|
52
|
-
productType: c,
|
|
53
|
-
preselectedDynamicContentList: s
|
|
54
|
-
}), { getDefaultTemplate: D } = F();
|
|
55
|
-
k({
|
|
37
|
+
const { initPlugin: p } = I({ emailId: a, userId: i, username: m, partnerName: l, productType: u }), { getDefaultTemplate: f } = M();
|
|
38
|
+
S({
|
|
56
39
|
onBack: () => {
|
|
57
|
-
console.debug("guido:back"),
|
|
40
|
+
console.debug("guido:back"), o("back");
|
|
58
41
|
},
|
|
59
42
|
onSaveStart: () => {
|
|
60
|
-
console.debug("guido:save:start"),
|
|
43
|
+
console.debug("guido:save:start"), o("save:start");
|
|
61
44
|
},
|
|
62
45
|
onSaveComplete: (e) => {
|
|
63
|
-
console.debug("guido:save:complete",
|
|
64
|
-
template: e,
|
|
65
|
-
dynamicContentList: n.getSelectedDynamicContentList
|
|
66
|
-
}), t("save:complete", {
|
|
67
|
-
template: e,
|
|
68
|
-
dynamicContentList: n.getSelectedDynamicContentList
|
|
69
|
-
});
|
|
46
|
+
console.debug("guido:save:complete", e), o("save:complete", e);
|
|
70
47
|
}
|
|
71
48
|
});
|
|
72
|
-
const
|
|
73
|
-
console.debug("dynamic-content:close", e),
|
|
74
|
-
},
|
|
49
|
+
const g = (e) => {
|
|
50
|
+
console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
51
|
+
}, v = () => {
|
|
75
52
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
76
53
|
};
|
|
77
|
-
return
|
|
54
|
+
return D(async () => {
|
|
78
55
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
79
56
|
try {
|
|
80
57
|
let e = {
|
|
81
|
-
html:
|
|
82
|
-
css:
|
|
58
|
+
html: r,
|
|
59
|
+
css: d,
|
|
83
60
|
forceRecreate: !0
|
|
84
61
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
85
62
|
};
|
|
86
|
-
e.html || (e = await
|
|
63
|
+
e.html || (e = await f()), await p(e);
|
|
87
64
|
} catch (e) {
|
|
88
65
|
console.error("Failed to initialize Stripo editor:", e);
|
|
89
66
|
}
|
|
90
67
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
91
|
-
const
|
|
92
|
-
console.debug("dynamic-content:open",
|
|
68
|
+
const y = e;
|
|
69
|
+
console.debug("dynamic-content:open", y.detail), o("dynamic-content:open", y.detail);
|
|
93
70
|
});
|
|
94
|
-
}),
|
|
71
|
+
}), b({
|
|
95
72
|
dynamicContent: {
|
|
96
|
-
insert:
|
|
97
|
-
close:
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
}), { __sfc: !0, PreviewContainer: T, dynamicContentStore: n, props: o, editorStore: a, hasChanges: r, preselectedDynamicContentList: s, getPartnerName: m, getProductType: d, previewStore: E, templateId: l, userId: u, guidoConfig: p, html: y, css: g, partnerName: i, productType: c, messageType: f, username: C, emit: t, initPlugin: v, getDefaultTemplate: D, insertDynamicContent: S, closeDynamicContent: h, HeaderWrapper: z, SaveAsTemplateDrawer: B };
|
|
73
|
+
insert: g,
|
|
74
|
+
close: v
|
|
75
|
+
}
|
|
76
|
+
}), { __sfc: !0, EmailPreview: w, props: t, getPartnerName: n, getProductType: c, isPreviewModeOpen: h, templateId: a, userId: i, guidoConfig: s, html: r, css: d, partnerName: l, productType: u, username: m, emit: o, initPlugin: p, getDefaultTemplate: f, insertDynamicContent: g, closeDynamicContent: v, HeaderWrapper: A };
|
|
101
77
|
}
|
|
102
78
|
});
|
|
103
79
|
export {
|
|
104
|
-
|
|
80
|
+
L as default
|
|
105
81
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { EmailHeader } from '@@/Types/generic';
|
|
2
|
+
interface Props {
|
|
3
|
+
emailHeader: EmailHeader;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
+
type __VLS_TypePropsToOption<T> = {
|
|
9
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
|
+
} : {
|
|
12
|
+
type: import('vue').PropType<T[K]>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import t from "./EmailPreviewContainer.vue2.js";
|
|
2
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var i = function() {
|
|
4
|
+
var s = this, a = s._self._c, e = s._self._setupProxy;
|
|
5
|
+
return a("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2 pb-5" }, [a("div", { staticClass: "f-g-1 d-f p-5 o-a g-4 min-h-600" }, [e.isLoading ? [a("div", { staticClass: "d-f a-i-c j-c-c w-1 h-1 f-g-1" }, [a(e.InLoading, { attrs: { "color-class": "i-c-1", size: "32" } })], 1)] : [a(e.DesktopPreview, { staticClass: "f-g-1 min-w-0", attrs: { "email-header": s.emailHeader, html: e.currentHtml } }), a(e.MobilePreview, { staticClass: "f-0 min-w-a", attrs: { "email-header": s.emailHeader, html: e.currentHtml, "is-amp": e.isAmp } })]], 2)]);
|
|
6
|
+
}, l = [], n = /* @__PURE__ */ r(
|
|
7
|
+
t,
|
|
8
|
+
i,
|
|
9
|
+
l,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const f = n.exports;
|
|
15
|
+
export {
|
|
16
|
+
f as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { defineComponent as p, ref as c, computed as i, onMounted as d } from "vue";
|
|
2
|
+
import { useActionsApi as f } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useToaster as u } from "../../../composables/useToaster.js";
|
|
4
|
+
import { usePreviewStore as v } from "../../../stores/preview.js";
|
|
5
|
+
import { InLoading as w } from "@useinsider/design-system-vue";
|
|
6
|
+
import P from "./desktop-preview/DesktopPreview.vue.js";
|
|
7
|
+
import _ from "./mobile-preview/MobilePreview.vue.js";
|
|
8
|
+
const D = /* @__PURE__ */ p({
|
|
9
|
+
__name: "EmailPreviewContainer",
|
|
10
|
+
props: {
|
|
11
|
+
emailHeader: null
|
|
12
|
+
},
|
|
13
|
+
setup(s) {
|
|
14
|
+
const { emailHeader: g } = s, { getPreviewData: r } = f(), { showToaster: t } = u(), e = v(), o = c(!1), n = i(() => e.previewHtml), m = i(() => e.isAMPModeEnabled), a = async () => {
|
|
15
|
+
o.value = !0;
|
|
16
|
+
try {
|
|
17
|
+
const l = await r();
|
|
18
|
+
e.templateHtml = l.html;
|
|
19
|
+
} catch {
|
|
20
|
+
console.error("Failed to load preview"), t({ type: "error", message: "Failed to load email preview. Please try again later." });
|
|
21
|
+
} finally {
|
|
22
|
+
o.value = !1;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
return d(() => {
|
|
26
|
+
a();
|
|
27
|
+
}), { __sfc: !0, getPreviewData: r, showToaster: t, previewStore: e, isLoading: o, currentHtml: n, isAmp: m, loadPreview: a, InLoading: w, DesktopPreview: P, MobilePreview: _ };
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
export {
|
|
31
|
+
D as default
|
|
32
|
+
};
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
interface Props {
|
|
2
|
+
errors: string[];
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
2
5
|
close: () => void;
|
|
3
|
-
}, string, Readonly<import("vue").ExtractPropTypes<
|
|
6
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
|
|
4
7
|
export default _default;
|
|
8
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
+
type __VLS_TypePropsToOption<T> = {
|
|
10
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
+
} : {
|
|
13
|
+
type: import('vue').PropType<T[K]>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -1,22 +1,19 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
1
|
+
import a from "./AmpErrorModal.vue2.js";
|
|
2
|
+
import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
3
|
var n = function() {
|
|
5
4
|
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
6
|
-
return r(t.
|
|
7
|
-
return t.
|
|
8
|
-
}, "primary-action": t.handleFixInCodeEditor } }, [r("div", { staticClass: "d-f f-d-c" }, [r("div", { staticClass: "mb-3" }, [r("div", { staticClass: "l-s-5 f-s-1 f-w-600 t-c-55 t-t-u" }, [e._v(" " + e._s(t.errorCountText) + " ")])]), r("div", { staticClass: "d-f f-d-c g-13 max-h-21-s o-y-a error-list" }, e._l(t.previewStore.ampErrors, function(o, i) {
|
|
9
|
-
return r(t.InOnPageMessage, { key: i, attrs: { icon: "filled-error-box", size: "medium", type: "alert", text: o } });
|
|
5
|
+
return r(t.BaseModal, { attrs: { id: "amp-error-modal", size: "medium", description: t.modalDescription, "footer-button-options": t.footerButtonOptions, title: t.modalTitle }, on: { close: t.handleClose, "primary-action": t.handleFixInCodeEditor } }, [r("div", { staticClass: "d-f f-d-c" }, [r("div", { staticClass: "mb-3" }, [r("div", { staticClass: "l-s-5 f-s-1 f-w-600 t-c-55 t-t-u" }, [e._v(" " + e._s(`${t.trans("products.errors")}(${t.errorCount})`) + " ")])]), r("div", { staticClass: "d-f f-d-c g-13 max-h-21-s o-y-a", staticStyle: { gap: "16px" } }, e._l(t.props.errors, function(o, s) {
|
|
6
|
+
return r(t.InOnPageMessage, { key: s, attrs: { icon: "filled-error-box", size: "medium", type: "alert", text: o } });
|
|
10
7
|
}), 1)])]);
|
|
11
|
-
}, l = [], d = /* @__PURE__ */
|
|
12
|
-
|
|
8
|
+
}, l = [], d = /* @__PURE__ */ i(
|
|
9
|
+
a,
|
|
13
10
|
n,
|
|
14
11
|
l,
|
|
15
12
|
!1,
|
|
16
13
|
null,
|
|
17
|
-
|
|
14
|
+
null
|
|
18
15
|
);
|
|
19
|
-
const
|
|
16
|
+
const f = d.exports;
|
|
20
17
|
export {
|
|
21
|
-
|
|
18
|
+
f as default
|
|
22
19
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useCodeEditorApi as
|
|
4
|
-
import { usePreviewMode as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { InOnPageMessage as
|
|
8
|
-
const
|
|
1
|
+
import { defineComponent as u, computed as e } from "vue";
|
|
2
|
+
import f from "../../../wrappers/BaseModal.vue.js";
|
|
3
|
+
import { useCodeEditorApi as C } from "../../../../composables/useCodeEditorApi.js";
|
|
4
|
+
import { usePreviewMode as E } from "../../../../composables/usePreviewMode.js";
|
|
5
|
+
import { useToaster as g } from "../../../../composables/useToaster.js";
|
|
6
|
+
import { useTranslations as h } from "../../../../composables/useTranslations.js";
|
|
7
|
+
import { InOnPageMessage as v } from "@useinsider/design-system-vue";
|
|
8
|
+
const I = /* @__PURE__ */ u({
|
|
9
9
|
__name: "AmpErrorModal",
|
|
10
|
+
props: {
|
|
11
|
+
errors: null
|
|
12
|
+
},
|
|
10
13
|
emits: ["close"],
|
|
11
|
-
setup(
|
|
12
|
-
const o =
|
|
14
|
+
setup(l, { emit: t }) {
|
|
15
|
+
const i = l, o = h(), { closePreviewMode: s } = E(), { showToaster: a } = g(), { openCodeEditor: n, isCodeEditorApiAvailable: r } = C(), d = e(() => i.errors.length), p = e(() => o("email-editor.amp-validation-title")), m = e(() => o("email-editor.amp-validation-description")), c = e(() => ({
|
|
13
16
|
cancelOrBackButton: {
|
|
14
17
|
type: "secondary",
|
|
15
18
|
labelText: o("campaign-builder.cancel"),
|
|
@@ -17,14 +20,18 @@ const P = /* @__PURE__ */ p({
|
|
|
17
20
|
},
|
|
18
21
|
primaryButton: {
|
|
19
22
|
type: "primary",
|
|
20
|
-
labelText: o("email-editor.amp-validation-fix")
|
|
23
|
+
labelText: o("email-editor.amp-validation-fix"),
|
|
24
|
+
disabledStatus: !r()
|
|
21
25
|
}
|
|
22
|
-
})
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
}));
|
|
27
|
+
return { __sfc: !0, props: i, emit: t, trans: o, closePreviewMode: s, showToaster: a, openCodeEditor: n, isCodeEditorApiAvailable: r, errorCount: d, modalTitle: p, modalDescription: m, footerButtonOptions: c, handleClose: () => t("close"), handleFixInCodeEditor: () => {
|
|
28
|
+
t("close"), s(), r() ? n() : a({
|
|
29
|
+
type: "error",
|
|
30
|
+
message: "StripoEditorApi codeEditorApi not available"
|
|
31
|
+
});
|
|
32
|
+
}, BaseModal: f, InOnPageMessage: v };
|
|
26
33
|
}
|
|
27
34
|
});
|
|
28
35
|
export {
|
|
29
|
-
|
|
36
|
+
I as default
|
|
30
37
|
};
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import o from "./AmpToggle.vue2.js";
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
return
|
|
6
|
-
|
|
7
|
-
} } }) : r._e()], 1)]);
|
|
8
|
-
}, a = [], i = /* @__PURE__ */ n(
|
|
2
|
+
import s from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var a = function() {
|
|
4
|
+
var t = this, e = t._self._c, r = t._self._setupProxy;
|
|
5
|
+
return e("div", [e("div", { staticClass: "d-f a-i-c ml-3" }, [e(r.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": r.segmentList, selected: r.previewStore.emailFormat }, on: { click: r.handleFormatChange } }), r.showErrorButton ? e(r.InButtonV2, { staticClass: "ml-2 d-f a-i-c b-c-11 b-c-h-11 t-c-4 t-c-h-4 i-c-4 bor-w-1 bor-s-s bor-c-11 bor-r-2", attrs: { id: "guido__amp-error-button", "left-icon": "line-error-box", type: "danger", "label-text-status": !1 }, on: { click: r.handleErrorClick } }) : t._e()], 1), r.isErrorModalVisible ? e(r.AmpErrorModal, { attrs: { errors: r.previewStore.AMPErrors }, on: { close: r.closeErrorModal } }) : t._e()], 1);
|
|
6
|
+
}, l = [], n = /* @__PURE__ */ s(
|
|
9
7
|
o,
|
|
10
|
-
s,
|
|
11
8
|
a,
|
|
9
|
+
l,
|
|
12
10
|
!1,
|
|
13
11
|
null,
|
|
14
12
|
null
|
|
15
13
|
);
|
|
16
|
-
const
|
|
14
|
+
const m = n.exports;
|
|
17
15
|
export {
|
|
18
|
-
|
|
16
|
+
m as default
|
|
19
17
|
};
|
|
@@ -1,29 +1,57 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { defineComponent as M, ref as P, computed as r, onMounted as f } from "vue";
|
|
2
|
+
import { useActionsApi as h } from "../../../../composables/useActionsApi.js";
|
|
3
|
+
import { useToaster as v } from "../../../../composables/useToaster.js";
|
|
4
|
+
import { useTranslations as E } from "../../../../composables/useTranslations.js";
|
|
5
|
+
import { usePreviewStore as g } from "../../../../stores/preview.js";
|
|
6
|
+
import { InButtonV2 as _, InSegments as w } from "@useinsider/design-system-vue";
|
|
7
|
+
import b from "./AmpErrorModal.vue.js";
|
|
8
|
+
const H = /* @__PURE__ */ M({
|
|
6
9
|
__name: "AmpToggle",
|
|
7
|
-
setup(
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
10
|
+
setup(y) {
|
|
11
|
+
const e = g(), { getPreviewData: s } = h(), { showToaster: n } = v(), o = E(), a = P(!1), i = r(() => e.hasAMP), l = r(() => e.hasAMPErrors), c = r(() => {
|
|
12
|
+
const t = !i.value;
|
|
13
|
+
return [
|
|
14
|
+
{
|
|
15
|
+
text: o("dynamic-creatives.html"),
|
|
16
|
+
value: "html"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
text: o("email-editor.amp-html"),
|
|
20
|
+
value: "AMP",
|
|
21
|
+
tooltipText: t ? o("email-editor.preview-amp-unavailable-tooltip") : "",
|
|
22
|
+
position: "bottom",
|
|
23
|
+
align: "center",
|
|
24
|
+
disable: t
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
}), p = r(() => e.isAMPModeEnabled && l.value), m = async () => {
|
|
28
|
+
try {
|
|
29
|
+
const t = await s();
|
|
30
|
+
e.updateAMPData({
|
|
31
|
+
AMPHtml: t.AMPHtml,
|
|
32
|
+
AMPErrors: t.AMPErrors
|
|
33
|
+
});
|
|
34
|
+
} catch {
|
|
35
|
+
n({
|
|
36
|
+
type: "error",
|
|
37
|
+
message: "Failed to load AMP data. Please try again later."
|
|
38
|
+
});
|
|
20
39
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
40
|
+
};
|
|
41
|
+
f(() => {
|
|
42
|
+
m();
|
|
43
|
+
});
|
|
44
|
+
const u = (t) => {
|
|
45
|
+
e.emailFormat = t;
|
|
46
|
+
}, d = () => {
|
|
47
|
+
a.value = !0;
|
|
48
|
+
};
|
|
49
|
+
function A() {
|
|
50
|
+
a.value = !1;
|
|
51
|
+
}
|
|
52
|
+
return { __sfc: !0, previewStore: e, getPreviewData: s, showToaster: n, trans: o, isErrorModalVisible: a, hasAMP: i, hasAMPErrors: l, segmentList: c, showErrorButton: p, updateAmpData: m, handleFormatChange: u, handleErrorClick: d, closeErrorModal: A, InSegments: w, InButtonV2: _, AmpErrorModal: b };
|
|
25
53
|
}
|
|
26
54
|
});
|
|
27
55
|
export {
|
|
28
|
-
|
|
56
|
+
H as default
|
|
29
57
|
};
|
|
@@ -1,2 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
import type { EmailHeader } from '@@/Types/generic';
|
|
2
|
+
interface Props {
|
|
3
|
+
html: string;
|
|
4
|
+
emailHeader?: EmailHeader;
|
|
5
|
+
}
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
|
|
2
7
|
export default _default;
|
|
8
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
+
type __VLS_TypePropsToOption<T> = {
|
|
10
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
+
} : {
|
|
13
|
+
type: import('vue').PropType<T[K]>;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
};
|