@useinsider/guido 1.0.0-beta.fd1de58 → 1.0.1-beta.0168eae
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 +38 -2
- package/dist/@types/generic.d.ts +31 -1
- package/dist/@types/save-as-template.d.ts +29 -0
- package/dist/components/Guido.vue.d.ts +8 -5
- package/dist/components/Guido.vue.js +11 -11
- package/dist/components/Guido.vue2.js +67 -43
- package/dist/components/organisms/base/Toaster.vue.js +17 -0
- package/dist/components/organisms/base/Toaster.vue2.js +15 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +19 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +19 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +22 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +30 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +19 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +29 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +22 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +31 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +17 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +20 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +18 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +25 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +4 -0
- package/dist/components/organisms/{design-preview/EmailView.vue.js → email-preview/mobile-preview/ContentView.vue.js} +7 -7
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +23 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +20 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +21 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +17 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +22 -0
- package/dist/components/organisms/header/MiddleSlot.vue.js +5 -5
- package/dist/components/organisms/header/MiddleSlot.vue2.js +16 -21
- package/dist/components/organisms/header/RightSlot.vue.js +9 -8
- package/dist/components/organisms/header/RightSlot.vue2.js +27 -25
- package/dist/components/organisms/header/ViewOptions.vue.js +4 -4
- package/dist/components/organisms/header/ViewOptions.vue2.js +30 -10
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +34 -16
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +2 -0
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +20 -0
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +63 -0
- package/dist/components/wrappers/WpDrawer.vue.d.ts +63 -0
- package/dist/components/wrappers/WpDrawer.vue.js +25 -0
- package/dist/components/wrappers/WpDrawer.vue2.js +23 -0
- package/dist/components/wrappers/WpModal.vue.d.ts +65 -0
- package/dist/components/wrappers/WpModal.vue.js +27 -0
- package/dist/components/wrappers/WpModal.vue2.js +22 -0
- package/dist/composables/useActionsApi.d.ts +4 -1
- package/dist/composables/useActionsApi.js +74 -33
- package/dist/composables/useCodeEditorApi.d.ts +4 -0
- package/dist/composables/useCodeEditorApi.js +11 -0
- package/dist/composables/useConfig.d.ts +4 -0
- package/dist/composables/useConfig.js +7 -0
- package/dist/composables/useExport.js +10 -9
- package/dist/composables/useGuidoActions.d.ts +2 -2
- package/dist/composables/useHtmlCompiler.js +9 -8
- package/dist/composables/useHttp.js +23 -21
- package/dist/composables/usePartner.d.ts +1 -1
- package/dist/composables/usePartner.js +9 -14
- package/dist/composables/usePreviewMode.d.ts +3 -4
- package/dist/composables/usePreviewMode.js +28 -16
- package/dist/composables/useResponsivePreview.d.ts +5 -0
- package/dist/composables/useResponsivePreview.js +86 -0
- package/dist/composables/useStripo.js +44 -35
- package/dist/composables/useToaster.d.ts +1 -16
- package/dist/composables/useToaster.js +24 -30
- package/dist/composables/useTranslations.js +3 -2
- package/dist/composables/useValidation.d.ts +56 -0
- package/dist/composables/useValidation.js +19 -0
- package/dist/composables/useVersionHistoryApi.js +11 -10
- package/dist/composables/validators/saveAsTemplate.d.ts +31 -0
- package/dist/composables/validators/saveAsTemplate.js +24 -0
- package/dist/enums/defaults.d.ts +4 -1
- package/dist/enums/defaults.js +22 -6
- package/dist/enums/preview.d.ts +13 -0
- package/dist/enums/preview.js +23 -0
- package/dist/enums/toaster.d.ts +5 -0
- package/dist/enums/toaster.js +4 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +13 -15
- package/dist/guido.css +1 -1
- package/dist/mock/api/template-library.d.ts +2 -0
- 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/@vueuse/shared/index.js +45 -0
- package/dist/node_modules/lodash-es/_Stack.js +18 -0
- package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/lodash-es/_apply.js +16 -0
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +19 -0
- package/dist/node_modules/lodash-es/_assignMergeValue.js +8 -0
- package/dist/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/lodash-es/_baseCreate.js +17 -0
- package/dist/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +12 -0
- package/dist/node_modules/lodash-es/_baseKeysIn.js +15 -0
- package/dist/node_modules/lodash-es/_baseMerge.js +20 -0
- package/dist/node_modules/lodash-es/_baseMergeDeep.js +31 -0
- package/dist/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/lodash-es/_baseTimes.js +8 -0
- package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -0
- package/dist/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/lodash-es/_copyArray.js +9 -0
- package/dist/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/lodash-es/_createAssigner.js +15 -0
- package/dist/node_modules/lodash-es/_createBaseFor.js +13 -0
- package/dist/node_modules/lodash-es/_defineProperty.js +11 -0
- package/dist/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/lodash-es/_isIterateeCall.js +13 -0
- package/dist/node_modules/lodash-es/_isMasked.js +2 -2
- package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/lodash-es/_nativeKeysIn.js +10 -0
- package/dist/node_modules/lodash-es/_nodeUtil.js +11 -0
- package/dist/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/lodash-es/_overRest.js +15 -0
- package/dist/node_modules/lodash-es/_safeGet.js +7 -0
- package/dist/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/lodash-es/_shortOut.js +16 -0
- package/dist/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/lodash-es/_stackSet.js +17 -0
- package/dist/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/lodash-es/isPlainObject.js +16 -0
- package/dist/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/lodash-es/merge.js +8 -0
- package/dist/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/lodash-es/toPlainObject.js +8 -0
- package/dist/node_modules/valibot/dist/index.js +190 -0
- package/dist/node_modules/vue-demi/lib/index.js +7 -0
- package/dist/services/templateLibraryApi.d.ts +7 -0
- package/dist/services/templateLibraryApi.js +87 -0
- package/dist/static/assets/inbox-mockup.svg.js +4 -0
- package/dist/static/assets/phone-mockup.svg.js +4 -0
- package/dist/static/styles/components/wide-panel.css.js +9 -0
- package/dist/static/styles/customEditorStyle.css.js +18 -0
- package/dist/stores/dynamic-content.d.ts +27 -0
- package/dist/stores/dynamic-content.js +23 -0
- package/dist/stores/editor.d.ts +2 -3
- package/dist/stores/editor.js +4 -5
- package/dist/stores/preview.d.ts +46 -0
- package/dist/stores/preview.js +53 -0
- package/dist/stores/save-as-template.d.ts +73 -0
- package/dist/stores/save-as-template.js +48 -0
- package/dist/stores/toaster.d.ts +18 -0
- package/dist/stores/toaster.js +27 -0
- package/dist/utils/arrayUtil.d.ts +1 -0
- package/dist/utils/arrayUtil.js +10 -0
- package/dist/utils/base64.d.ts +1 -0
- package/dist/utils/base64.js +7 -0
- package/dist/utils/genericUtil.d.ts +3 -0
- package/dist/utils/genericUtil.js +11 -0
- package/dist/utils/templatePreparation.d.ts +4 -0
- package/dist/utils/templatePreparation.js +33 -0
- package/dist/utils/tooltipUtils.d.ts +2 -0
- package/dist/utils/tooltipUtils.js +11 -0
- package/package.json +3 -3
- package/dist/components/organisms/design-preview/DesktopPreview.vue.d.ts +0 -16
- package/dist/components/organisms/design-preview/DesktopPreview.vue.js +0 -22
- package/dist/components/organisms/design-preview/DesktopPreview.vue2.js +0 -28
- package/dist/components/organisms/design-preview/EmailPreview.vue.d.ts +0 -16
- package/dist/components/organisms/design-preview/EmailPreview.vue.js +0 -17
- package/dist/components/organisms/design-preview/EmailPreview.vue2.js +0 -37
- package/dist/components/organisms/design-preview/EmailView.vue.d.ts +0 -18
- package/dist/components/organisms/design-preview/EmailView.vue2.js +0 -24
- package/dist/components/organisms/design-preview/InboxView.vue.d.ts +0 -17
- package/dist/components/organisms/design-preview/InboxView.vue.js +0 -19
- package/dist/components/organisms/design-preview/InboxView.vue2.js +0 -23
- package/dist/components/organisms/design-preview/MobilePreview.vue.d.ts +0 -17
- package/dist/components/organisms/design-preview/MobilePreview.vue.js +0 -17
- package/dist/components/organisms/design-preview/MobilePreview.vue2.js +0 -22
- package/dist/components/organisms/header/AmpErrorModal.vue.d.ts +0 -16
- package/dist/components/organisms/header/AmpErrorModal.vue.js +0 -21
- package/dist/components/organisms/header/AmpErrorModal.vue2.js +0 -27
- package/dist/components/organisms/header/AmpToggle.vue.js +0 -19
- package/dist/components/organisms/header/AmpToggle.vue2.js +0 -38
- package/dist/composables/useMobileGmailFit.d.ts +0 -5
- package/dist/composables/useMobileGmailFit.js +0 -69
- package/dist/enums/gmailMobilePreview.d.ts +0 -7
- package/dist/enums/gmailMobilePreview.js +0 -17
- package/dist/inbox-mockup.svg +0 -39
- package/dist/phone-mockup.svg +0 -31
- /package/dist/components/organisms/{header/AmpToggle.vue.d.ts → base/Toaster.vue.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -57,6 +57,11 @@ 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
|
+
}
|
|
60
65
|
},
|
|
61
66
|
dynamicContentModalVisible: false
|
|
62
67
|
};
|
|
@@ -126,6 +131,7 @@ export default {
|
|
|
126
131
|
| `back` | - | Fired when user clicks the back button |
|
|
127
132
|
| `save:start` | - | Fired when the save process begins |
|
|
128
133
|
| `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
|
|
134
|
+
| `on-change` | void | It Fires once for managing leave modal etc. |
|
|
129
135
|
|
|
130
136
|
### Guido Exposed Methods
|
|
131
137
|
```typescript
|
|
@@ -138,8 +144,23 @@ dynamicContent.close();
|
|
|
138
144
|
```typescript
|
|
139
145
|
interface GuidoConfig {
|
|
140
146
|
translationsPath: string;
|
|
141
|
-
htmlCompilerRules
|
|
142
|
-
ignoreDefaultHtmlCompilerRules
|
|
147
|
+
htmlCompilerRules?: CompilerRule[];
|
|
148
|
+
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
149
|
+
useHeader: boolean
|
|
150
|
+
emailHeader: {
|
|
151
|
+
senderName: string;
|
|
152
|
+
subject: string;
|
|
153
|
+
};
|
|
154
|
+
partner: {
|
|
155
|
+
partnerName: string;
|
|
156
|
+
productType: number;
|
|
157
|
+
messageType: number;
|
|
158
|
+
};
|
|
159
|
+
features: {
|
|
160
|
+
dynamicContent: boolean;
|
|
161
|
+
saveAsTemplate: boolean;
|
|
162
|
+
versionHistory: boolean;
|
|
163
|
+
};
|
|
143
164
|
}
|
|
144
165
|
```
|
|
145
166
|
|
|
@@ -148,6 +169,11 @@ interface GuidoConfig {
|
|
|
148
169
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
149
170
|
| `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
|
|
150
171
|
| `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
|
|
172
|
+
| `useHeader` | `boolean` | `true` | Adds extra spaces to height for adjusting. If you don't use Inone Page header, override as `false` |
|
|
173
|
+
| `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
|
|
174
|
+
| `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
|
|
175
|
+
| `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
|
|
176
|
+
| `features.versionHistory` | `boolean` | `true` | Enable version history feature |
|
|
151
177
|
|
|
152
178
|
```typescript
|
|
153
179
|
interface DynamicContent {
|
|
@@ -255,6 +281,11 @@ Define complex transformation logic with a custom processor function.
|
|
|
255
281
|
```typescript
|
|
256
282
|
const guidoConfig = {
|
|
257
283
|
translationsPath: 'window.trans.en',
|
|
284
|
+
features: {
|
|
285
|
+
dynamicContent: true,
|
|
286
|
+
saveAsTemplate: true,
|
|
287
|
+
versionHistory: false // Disable version history
|
|
288
|
+
},
|
|
258
289
|
htmlCompilerRules: [
|
|
259
290
|
{
|
|
260
291
|
id: 'replace-domain',
|
|
@@ -283,6 +314,11 @@ const guidoConfig = {
|
|
|
283
314
|
```typescript
|
|
284
315
|
const guidoConfig = {
|
|
285
316
|
translationsPath: 'window.trans.en',
|
|
317
|
+
features: {
|
|
318
|
+
dynamicContent: true,
|
|
319
|
+
saveAsTemplate: true,
|
|
320
|
+
versionHistory: true
|
|
321
|
+
},
|
|
286
322
|
ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
|
|
287
323
|
htmlCompilerRules: [
|
|
288
324
|
// Only your custom rules will be applied
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -1,15 +1,45 @@
|
|
|
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
|
+
};
|
|
2
12
|
export type GuidoConfig = {
|
|
3
13
|
translationsPath: string;
|
|
4
14
|
htmlCompilerRules?: CompilerRule[];
|
|
5
15
|
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
16
|
+
useHeader?: boolean;
|
|
17
|
+
emailHeader: EmailHeader;
|
|
18
|
+
partner?: Partner;
|
|
19
|
+
features?: Features;
|
|
6
20
|
};
|
|
7
21
|
export type DynamicContent = {
|
|
8
22
|
value: string;
|
|
9
23
|
text: string;
|
|
10
24
|
fallback?: string;
|
|
11
25
|
};
|
|
12
|
-
export interface
|
|
26
|
+
export interface EmailHeader {
|
|
13
27
|
senderName: string;
|
|
14
28
|
subject: string;
|
|
15
29
|
}
|
|
30
|
+
export interface TooltipOptions {
|
|
31
|
+
id: string;
|
|
32
|
+
dynamicPosition: boolean;
|
|
33
|
+
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';
|
|
34
|
+
iconStatus: boolean;
|
|
35
|
+
offset?: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
};
|
|
39
|
+
preventXss?: boolean;
|
|
40
|
+
}
|
|
41
|
+
export type MergeTag = {
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface MappedCategory {
|
|
2
|
+
value: string;
|
|
3
|
+
text: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Category {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
partnerId: number;
|
|
9
|
+
isStripo: boolean;
|
|
10
|
+
templatesCount: number;
|
|
11
|
+
}
|
|
12
|
+
export interface RecommendationCampaignUrls {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CreateTemplateRequest {
|
|
16
|
+
name: string;
|
|
17
|
+
categories: number[];
|
|
18
|
+
productId: number;
|
|
19
|
+
editorType: number;
|
|
20
|
+
messageType?: number;
|
|
21
|
+
content: string;
|
|
22
|
+
css?: string;
|
|
23
|
+
stripoConfig: string;
|
|
24
|
+
recommendationConfigs?: string;
|
|
25
|
+
recommendationCampaignUrls?: string;
|
|
26
|
+
unsubscriptionPreferencePages: number[];
|
|
27
|
+
unsubscriptionPreferencePageStatus: boolean;
|
|
28
|
+
isGuido: boolean;
|
|
29
|
+
}
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import type { DynamicContent, GuidoConfig
|
|
2
|
-
import type {
|
|
1
|
+
import type { DynamicContent, GuidoConfig } from '@@/Types/generic';
|
|
2
|
+
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
templateId: string;
|
|
5
5
|
userId: string;
|
|
6
|
+
messageType?: number;
|
|
6
7
|
partnerName?: string;
|
|
7
|
-
productType?:
|
|
8
|
+
productType?: number;
|
|
8
9
|
username?: string;
|
|
9
10
|
html?: string;
|
|
10
11
|
css?: string;
|
|
12
|
+
preselectedDynamicContentList: DynamicContent[];
|
|
11
13
|
guidoConfig: GuidoConfig;
|
|
12
|
-
emailData?: EmailData;
|
|
13
14
|
};
|
|
14
15
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
15
16
|
dynamicContent: {
|
|
16
17
|
insert: (data: DynamicContent) => void;
|
|
17
18
|
close: () => void;
|
|
18
19
|
};
|
|
20
|
+
hasChanges: import("vue").ComputedRef<boolean>;
|
|
19
21
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
20
22
|
"dynamic-content:open": (detail: DynamicContent | null) => void;
|
|
21
23
|
back: () => void;
|
|
22
24
|
"save:start": () => void;
|
|
23
|
-
"save:complete": (
|
|
25
|
+
"save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
|
|
26
|
+
"on-change": () => void;
|
|
24
27
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
25
28
|
export default _default;
|
|
26
29
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return r("div", { staticClass: "guido-editor__wrapper"
|
|
7
|
-
}, a = [],
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
import s from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var t = function() {
|
|
5
|
+
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper), e.previewStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isPreviewModeOpen, expression: "!previewStore.isPreviewModeOpen" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.SaveAsTemplateDrawer)], 1);
|
|
7
|
+
}, a = [], n = /* @__PURE__ */ s(
|
|
8
|
+
i,
|
|
9
|
+
t,
|
|
10
10
|
a,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"49bb5907"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const c = n.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
c as default
|
|
18
18
|
};
|
|
@@ -1,43 +1,62 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { DefaultUsername as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
|
|
1
|
+
import { defineComponent as _, defineAsyncComponent as L, computed as b, watch as k, onMounted as A, onUnmounted as H } from "vue";
|
|
2
|
+
import { provideGuidoActions as N } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as U } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as x } from "../composables/useStripo.js";
|
|
5
|
+
import { DefaultUsername as M, DefaultMessageType as W, DefaultGuidoConfig as z } from "../enums/defaults.js";
|
|
6
|
+
import B from "./organisms/base/Toaster.vue.js";
|
|
7
|
+
import F from "./organisms/header/HeaderWrapper.vue.js";
|
|
8
|
+
import K from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
9
|
+
import { useStripoApi as R } from "../services/stripoApi.js";
|
|
10
|
+
import { useDynamicContentStore as j } from "../stores/dynamic-content.js";
|
|
11
|
+
import { useEditorStore as q } from "../stores/editor.js";
|
|
12
|
+
import { usePreviewStore as J } from "../stores/preview.js";
|
|
13
|
+
import O from "../node_modules/lodash-es/merge.js";
|
|
14
|
+
const ie = /* @__PURE__ */ _({
|
|
11
15
|
__name: "Guido",
|
|
12
16
|
props: {
|
|
13
17
|
templateId: null,
|
|
14
18
|
userId: null,
|
|
19
|
+
messageType: null,
|
|
15
20
|
partnerName: null,
|
|
16
21
|
productType: null,
|
|
17
22
|
username: null,
|
|
18
23
|
html: null,
|
|
19
24
|
css: null,
|
|
20
|
-
|
|
21
|
-
|
|
25
|
+
preselectedDynamicContentList: null,
|
|
26
|
+
guidoConfig: null
|
|
22
27
|
},
|
|
23
|
-
emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
|
|
24
|
-
setup(
|
|
25
|
-
const o =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change"],
|
|
29
|
+
setup(E, { expose: T, emit: t }) {
|
|
30
|
+
const o = E, G = L(
|
|
31
|
+
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
32
|
+
), n = j(), c = q(), r = b(() => c.hasChanges), s = o.preselectedDynamicContentList || [], { getPartnerName: m, getProductType: d } = U(), I = J(), {
|
|
33
|
+
templateId: l,
|
|
34
|
+
userId: u,
|
|
35
|
+
guidoConfig: p,
|
|
36
|
+
html: g = "",
|
|
37
|
+
css: f = "",
|
|
38
|
+
partnerName: a = m(),
|
|
39
|
+
productType: i = d(),
|
|
40
|
+
messageType: y = W,
|
|
41
|
+
username: C = M
|
|
34
42
|
} = o;
|
|
35
|
-
window.GuidoConfig = {
|
|
36
|
-
|
|
37
|
-
|
|
43
|
+
window.GuidoConfig = O(z, p), window.GuidoConfig.partner = {
|
|
44
|
+
partnerName: a,
|
|
45
|
+
productType: i,
|
|
46
|
+
messageType: y
|
|
38
47
|
};
|
|
39
|
-
const { initPlugin:
|
|
40
|
-
|
|
48
|
+
const { initPlugin: v } = x({
|
|
49
|
+
emailId: l,
|
|
50
|
+
userId: u,
|
|
51
|
+
username: C,
|
|
52
|
+
partnerName: a,
|
|
53
|
+
productType: i,
|
|
54
|
+
preselectedDynamicContentList: s
|
|
55
|
+
}), { getDefaultTemplate: w } = R(), P = b(() => {
|
|
56
|
+
var e;
|
|
57
|
+
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
58
|
+
});
|
|
59
|
+
N({
|
|
41
60
|
onBack: () => {
|
|
42
61
|
console.debug("guido:back"), t("back");
|
|
43
62
|
},
|
|
@@ -48,36 +67,41 @@ const M = /* @__PURE__ */ w({
|
|
|
48
67
|
console.debug("guido:save:complete", e), t("save:complete", e);
|
|
49
68
|
}
|
|
50
69
|
});
|
|
51
|
-
const
|
|
52
|
-
console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
53
|
-
},
|
|
70
|
+
const h = (e) => {
|
|
71
|
+
console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
72
|
+
}, D = () => {
|
|
54
73
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
55
74
|
};
|
|
56
|
-
return
|
|
75
|
+
return k(() => r.value, () => {
|
|
76
|
+
t("on-change");
|
|
77
|
+
}), A(async () => {
|
|
57
78
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
58
79
|
try {
|
|
59
80
|
let e = {
|
|
60
|
-
html:
|
|
61
|
-
css:
|
|
81
|
+
html: g,
|
|
82
|
+
css: f,
|
|
62
83
|
forceRecreate: !0
|
|
63
84
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
64
85
|
};
|
|
65
|
-
e.html || (e = await
|
|
86
|
+
e.html || (e = await w()), await v(e), n.selectedDynamicContentList = s;
|
|
66
87
|
} catch (e) {
|
|
67
88
|
console.error("Failed to initialize Stripo editor:", e);
|
|
68
89
|
}
|
|
69
90
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
70
|
-
const
|
|
71
|
-
console.debug("dynamic-content:open",
|
|
91
|
+
const S = e;
|
|
92
|
+
console.debug("dynamic-content:open", S.detail), t("dynamic-content:open", S.detail);
|
|
72
93
|
});
|
|
73
|
-
}),
|
|
94
|
+
}), H(() => {
|
|
95
|
+
window.UIEditor.removeEditor();
|
|
96
|
+
}), T({
|
|
74
97
|
dynamicContent: {
|
|
75
|
-
insert:
|
|
76
|
-
close:
|
|
77
|
-
}
|
|
78
|
-
|
|
98
|
+
insert: h,
|
|
99
|
+
close: D
|
|
100
|
+
},
|
|
101
|
+
hasChanges: r
|
|
102
|
+
}), { __sfc: !0, PreviewContainer: G, dynamicContentStore: n, props: o, editorStore: c, hasChanges: r, preselectedDynamicContentList: s, getPartnerName: m, getProductType: d, previewStore: I, templateId: l, userId: u, guidoConfig: p, html: g, css: f, partnerName: a, productType: i, messageType: y, username: C, emit: t, initPlugin: v, getDefaultTemplate: w, noHeader: P, insertDynamicContent: h, closeDynamicContent: D, Toaster: B, HeaderWrapper: F, SaveAsTemplateDrawer: K };
|
|
79
103
|
}
|
|
80
104
|
});
|
|
81
105
|
export {
|
|
82
|
-
|
|
106
|
+
ie as default
|
|
83
107
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import e from "./Toaster.vue2.js";
|
|
2
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var r = function() {
|
|
4
|
+
var o = this, n = o._self._c, t = o._self._setupProxy;
|
|
5
|
+
return n(t.InToasts, { attrs: { "action-buttons-config": t.actionButtonsConfig, status: t.store.status, text: t.store.text, type: t.store.type }, on: { actionButtonClick0: t.handleActionClick } });
|
|
6
|
+
}, a = [], _ = /* @__PURE__ */ s(
|
|
7
|
+
e,
|
|
8
|
+
r,
|
|
9
|
+
a,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const l = _.exports;
|
|
15
|
+
export {
|
|
16
|
+
l as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { defineComponent as n, computed as e } from "vue";
|
|
2
|
+
import { useToasterStore as i } from "../../../stores/toaster.js";
|
|
3
|
+
import { InToasts as c } from "@useinsider/design-system-vue";
|
|
4
|
+
const f = /* @__PURE__ */ n({
|
|
5
|
+
__name: "Toaster",
|
|
6
|
+
setup(s) {
|
|
7
|
+
const t = i(), o = e(() => t.actionButton ? [{ text: t.actionButton.text }] : []);
|
|
8
|
+
return { __sfc: !0, store: t, actionButtonsConfig: o, handleActionClick: () => {
|
|
9
|
+
t.actionButton && t.actionButton.onClick(), t.hideToaster();
|
|
10
|
+
}, InToasts: c };
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
f as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import i from "./PreviewContainer.vue2.js";
|
|
2
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var t = function() {
|
|
4
|
+
var s = this, e = s._self._c, r = s._self._setupProxy;
|
|
5
|
+
return e("div", { staticClass: "d-f f-d-c h-1 b-c-5 bor-r-2 pb-5" }, [e("div", { staticClass: "f-g-1 d-f p-5 o-a g-4 min-h-600" }, [r.previewStore.isLoading ? [e("div", { staticClass: "d-f a-i-c j-c-c w-1 h-1 f-g-1" }, [e(r.InLoading, { attrs: { "color-class": "i-c-1", size: "32" } })], 1)] : [e(r.DesktopPreview, { staticClass: "f-g-1 min-w-0" }), e(r.MobilePreview, { staticClass: "f-0 min-w-a" })]], 2), r.previewStore.isAMPErrorModalVisible ? e(r.AmpErrorModal, { on: { close: function(l) {
|
|
6
|
+
return r.previewStore.closeErrorModal();
|
|
7
|
+
} } }) : s._e()], 1);
|
|
8
|
+
}, a = [], n = /* @__PURE__ */ o(
|
|
9
|
+
i,
|
|
10
|
+
t,
|
|
11
|
+
a,
|
|
12
|
+
!1,
|
|
13
|
+
null,
|
|
14
|
+
null
|
|
15
|
+
);
|
|
16
|
+
const d = n.exports;
|
|
17
|
+
export {
|
|
18
|
+
d as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as r, onMounted as t } from "vue";
|
|
2
|
+
import { usePreviewMode as i } from "../../../composables/usePreviewMode.js";
|
|
3
|
+
import { usePreviewStore as m } from "../../../stores/preview.js";
|
|
4
|
+
import { InLoading as n } from "@useinsider/design-system-vue";
|
|
5
|
+
import p from "./amp/AmpErrorModal.vue.js";
|
|
6
|
+
import f from "./desktop-preview/DesktopPreview.vue.js";
|
|
7
|
+
import s from "./mobile-preview/MobilePreview.vue.js";
|
|
8
|
+
const l = /* @__PURE__ */ r({
|
|
9
|
+
__name: "PreviewContainer",
|
|
10
|
+
setup(a) {
|
|
11
|
+
const { loadPreviewData: o } = i(), e = m();
|
|
12
|
+
return t(() => {
|
|
13
|
+
o();
|
|
14
|
+
}), { __sfc: !0, loadPreviewData: o, previewStore: e, InLoading: n, AmpErrorModal: p, DesktopPreview: f, MobilePreview: s };
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
l as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
2
|
+
close: () => void;
|
|
3
|
+
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import s from "./AmpErrorModal.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
|
+
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return r(t.WpModal, { attrs: { id: "amp-error-modal", size: "medium", description: t.trans("email-editor.amp-validation-description"), "footer-button-options": t.footerButtonOptions, title: t.trans("email-editor.amp-validation-title") }, on: { close: function(o) {
|
|
7
|
+
return t.emit("close");
|
|
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 } });
|
|
10
|
+
}), 1)])]);
|
|
11
|
+
}, l = [], d = /* @__PURE__ */ a(
|
|
12
|
+
s,
|
|
13
|
+
n,
|
|
14
|
+
l,
|
|
15
|
+
!1,
|
|
16
|
+
null,
|
|
17
|
+
"7a09985c"
|
|
18
|
+
);
|
|
19
|
+
const _ = d.exports;
|
|
20
|
+
export {
|
|
21
|
+
_ as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { defineComponent as p, ref as m, computed as c } from "vue";
|
|
2
|
+
import d from "../../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useCodeEditorApi as l } from "../../../../composables/useCodeEditorApi.js";
|
|
4
|
+
import { usePreviewMode as u } from "../../../../composables/usePreviewMode.js";
|
|
5
|
+
import { useTranslations as f } from "../../../../composables/useTranslations.js";
|
|
6
|
+
import { usePreviewStore as _ } from "../../../../stores/preview.js";
|
|
7
|
+
import { InOnPageMessage as g } from "@useinsider/design-system-vue";
|
|
8
|
+
const P = /* @__PURE__ */ p({
|
|
9
|
+
__name: "AmpErrorModal",
|
|
10
|
+
emits: ["close"],
|
|
11
|
+
setup(x, { emit: e }) {
|
|
12
|
+
const o = f(), { closePreviewMode: r } = u(), { openCodeEditor: t } = l(), n = _(), s = m({
|
|
13
|
+
cancelOrBackButton: {
|
|
14
|
+
type: "secondary",
|
|
15
|
+
labelText: o("campaign-builder.cancel"),
|
|
16
|
+
styling: "ghost"
|
|
17
|
+
},
|
|
18
|
+
primaryButton: {
|
|
19
|
+
type: "primary",
|
|
20
|
+
labelText: o("email-editor.amp-validation-fix")
|
|
21
|
+
}
|
|
22
|
+
}), i = () => {
|
|
23
|
+
e("close"), r(), t();
|
|
24
|
+
}, a = c(() => `${o("products.errors")}(${n.ampErrors.length})`);
|
|
25
|
+
return { __sfc: !0, emit: e, trans: o, closePreviewMode: r, openCodeEditor: t, previewStore: n, footerButtonOptions: s, handleFixInCodeEditor: i, errorCountText: a, WpModal: d, InOnPageMessage: g };
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
export {
|
|
29
|
+
P as default
|
|
30
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import o from "./AmpToggle.vue2.js";
|
|
2
|
+
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var s = function() {
|
|
4
|
+
var r = this, t = r._self._c, e = r._self._setupProxy;
|
|
5
|
+
return t("div", [t("div", { staticClass: "d-f a-i-c ml-3" }, [t(e.InSegments, { attrs: { id: "guido__amp-toggle", "segment-list": e.segmentList, selected: e.previewStore.emailFormat }, on: { click: e.handleFormatChange } }), e.previewStore.showAMPErrorButton ? t(e.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: function(c) {
|
|
6
|
+
return e.previewStore.openErrorModal();
|
|
7
|
+
} } }) : r._e()], 1)]);
|
|
8
|
+
}, a = [], i = /* @__PURE__ */ n(
|
|
9
|
+
o,
|
|
10
|
+
s,
|
|
11
|
+
a,
|
|
12
|
+
!1,
|
|
13
|
+
null,
|
|
14
|
+
null
|
|
15
|
+
);
|
|
16
|
+
const d = i.exports;
|
|
17
|
+
export {
|
|
18
|
+
d as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { defineComponent as m, computed as n } from "vue";
|
|
2
|
+
import { useTranslations as r } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { usePreviewStore as i } from "../../../../stores/preview.js";
|
|
4
|
+
import { InButtonV2 as s, InSegments as l } from "@useinsider/design-system-vue";
|
|
5
|
+
const _ = /* @__PURE__ */ m({
|
|
6
|
+
__name: "AmpToggle",
|
|
7
|
+
setup(p) {
|
|
8
|
+
const t = i(), e = r(), o = n(() => [
|
|
9
|
+
{
|
|
10
|
+
text: e("dynamic-creatives.html"),
|
|
11
|
+
value: "html"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
text: e("email-editor.amp-html"),
|
|
15
|
+
value: "AMP",
|
|
16
|
+
tooltipText: t.hasAMP ? "" : e("email-editor.preview-amp-unavailable-tooltip"),
|
|
17
|
+
position: "bottom",
|
|
18
|
+
align: "center",
|
|
19
|
+
disable: !t.hasAMP
|
|
20
|
+
}
|
|
21
|
+
]);
|
|
22
|
+
return { __sfc: !0, previewStore: t, trans: e, segmentList: o, handleFormatChange: (a) => {
|
|
23
|
+
t.setEmailFormat(a);
|
|
24
|
+
}, InSegments: l, InButtonV2: s };
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export {
|
|
28
|
+
_ as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import o from "./DesktopPreview.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import a from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var s = function() {
|
|
5
|
+
var r = this, t = r._self._c, e = r._self._setupProxy;
|
|
6
|
+
return t("div", { ref: "containerRef", staticStyle: { "min-height": "720px", height: "80vh" } }, [t(e.InContainer, { staticClass: "s-2 m-b-5 desktop-preview-container", attrs: { "full-width-content-status": "", "header-status": "", "border-radius": "bor-r-1", "container-type": "default", "footer-status": !1 }, scopedSlots: r._u([{ key: "headerLeftSlot", fn: function() {
|
|
7
|
+
return [t(e.EmailHeaderInfo)];
|
|
8
|
+
}, proxy: !0 }, { key: "headerRightSlot", fn: function() {
|
|
9
|
+
return [t(e.EmailSizeIndicator)];
|
|
10
|
+
}, proxy: !0 }]) }, [e.isContainerReady ? t("iframe", { staticClass: "email-iframe w-1 bor-w-0", style: { height: e.iframeHeight }, attrs: { sandbox: "allow-same-origin allow-popups allow-forms allow-scripts", srcdoc: e.previewStore.previewHtml } }) : r._e()])], 1);
|
|
11
|
+
}, i = [], n = /* @__PURE__ */ a(
|
|
12
|
+
o,
|
|
13
|
+
s,
|
|
14
|
+
i,
|
|
15
|
+
!1,
|
|
16
|
+
null,
|
|
17
|
+
"2dd60b0c"
|
|
18
|
+
);
|
|
19
|
+
const d = n.exports;
|
|
20
|
+
export {
|
|
21
|
+
d as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { defineComponent as d, ref as r, onMounted as h, onBeforeUnmount as v, nextTick as g } from "vue";
|
|
2
|
+
import { usePreviewStore as _ } from "../../../../stores/preview.js";
|
|
3
|
+
import { InContainer as I } from "@useinsider/design-system-vue";
|
|
4
|
+
import R from "./EmailHeaderInfo.vue.js";
|
|
5
|
+
import C from "./EmailSizeIndicator.vue.js";
|
|
6
|
+
const B = /* @__PURE__ */ d({
|
|
7
|
+
__name: "DesktopPreview",
|
|
8
|
+
setup(H) {
|
|
9
|
+
const t = r(), i = r("400px"), a = r(!1), m = _(), n = () => {
|
|
10
|
+
if (!t.value)
|
|
11
|
+
return;
|
|
12
|
+
const o = t.value.querySelector(".in-container");
|
|
13
|
+
if (!o)
|
|
14
|
+
return;
|
|
15
|
+
const u = o.getBoundingClientRect(), s = o.querySelector(".in-container__header"), f = s ? s.getBoundingClientRect().height : 0, p = u.height - f;
|
|
16
|
+
i.value = `${p}px`;
|
|
17
|
+
};
|
|
18
|
+
let e = null;
|
|
19
|
+
const c = () => {
|
|
20
|
+
n(), t.value && (e = new ResizeObserver(n), e.observe(t.value), g(() => {
|
|
21
|
+
a.value = !0;
|
|
22
|
+
}));
|
|
23
|
+
}, l = () => {
|
|
24
|
+
e == null || e.disconnect();
|
|
25
|
+
};
|
|
26
|
+
return h(c), v(l), { __sfc: !0, containerRef: t, iframeHeight: i, isContainerReady: a, previewStore: m, calculateIframeHeight: n, resizeObserver: e, initIframe: c, cleanIframe: l, InContainer: I, EmailHeaderInfo: R, EmailSizeIndicator: C };
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
export {
|
|
30
|
+
B as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|