@useinsider/guido 1.0.0-beta.61cf684 → 1.0.0-beta.63d99fe
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 -29
- package/dist/components/Guido.vue.d.ts +1 -2
- package/dist/components/Guido.vue.js +10 -10
- package/dist/components/Guido.vue2.js +44 -51
- package/dist/components/organisms/header/MiddleSlot.vue.js +9 -9
- package/dist/components/organisms/header/MiddleSlot.vue2.js +17 -16
- package/dist/components/organisms/header/RightSlot.vue.js +9 -10
- package/dist/components/organisms/header/RightSlot.vue2.js +24 -28
- package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
- package/dist/components/organisms/header/ViewOptions.vue2.js +10 -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/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +6 -6
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +35 -40
- package/dist/composables/useActionsApi.d.ts +1 -4
- package/dist/composables/useActionsApi.js +33 -74
- 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/useToaster.d.ts +1 -1
- package/dist/composables/useToaster.js +11 -11
- package/dist/composables/useTranslations.js +2 -3
- package/dist/composables/useValidation.d.ts +1 -27
- package/dist/composables/useValidation.js +8 -8
- package/dist/composables/validators/saveAsTemplate.d.ts +8 -13
- package/dist/composables/validators/saveAsTemplate.js +15 -18
- package/dist/enums/defaults.d.ts +1 -4
- package/dist/enums/defaults.js +6 -21
- 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/node_modules/valibot/dist/index.js +58 -91
- package/dist/stores/editor.d.ts +0 -1
- package/dist/stores/editor.js +0 -1
- package/dist/stores/save-as-template.d.ts +1 -49
- package/dist/stores/save-as-template.js +28 -32
- package/package.json +3 -2
- 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/amp/AmpErrorModal.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -25
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +0 -19
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
- package/dist/components/wrappers/WpModal.vue.d.ts +0 -65
- package/dist/components/wrappers/WpModal.vue.js +0 -27
- package/dist/components/wrappers/WpModal.vue2.js +0 -22
- package/dist/composables/useCodeEditorApi.d.ts +0 -4
- package/dist/composables/useCodeEditorApi.js +0 -11
- package/dist/composables/useConfig.d.ts +0 -4
- package/dist/composables/useConfig.js +0 -7
- package/dist/composables/useDebounce.d.ts +0 -4
- package/dist/composables/useDebounce.js +0 -12
- package/dist/composables/usePreviewMode.d.ts +0 -5
- package/dist/composables/usePreviewMode.js +0 -31
- package/dist/composables/useResponsivePreview.d.ts +0 -5
- package/dist/composables/useResponsivePreview.js +0 -86
- package/dist/enums/preview.d.ts +0 -13
- package/dist/enums/preview.js +0 -23
- 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/vue-demi/lib/index.js +0 -7
- package/dist/services/templateLibraryApi.d.ts +0 -7
- package/dist/services/templateLibraryApi.js +0 -86
- package/dist/static/assets/inbox-mockup.svg.js +0 -4
- package/dist/static/assets/phone-mockup.svg.js +0 -4
- package/dist/stores/preview.d.ts +0 -46
- package/dist/stores/preview.js +0 -53
- package/dist/utils/base64.d.ts +0 -1
- package/dist/utils/base64.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,44 +1,15 @@
|
|
|
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
|
-
emailHeader: EmailHeader;
|
|
17
|
-
partner?: Partner;
|
|
18
|
-
features?: Features;
|
|
19
6
|
};
|
|
20
7
|
export type DynamicContent = {
|
|
21
8
|
value: string;
|
|
22
9
|
text: string;
|
|
23
10
|
fallback?: string;
|
|
24
11
|
};
|
|
25
|
-
export interface EmailHeader {
|
|
26
|
-
senderName: string;
|
|
27
|
-
subject: string;
|
|
28
|
-
}
|
|
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
12
|
export type MergeTag = {
|
|
41
13
|
label: string;
|
|
42
14
|
value: string;
|
|
43
15
|
};
|
|
44
|
-
export {};
|
|
@@ -3,9 +3,8 @@ 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;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import o from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
},
|
|
8
|
-
o,
|
|
9
|
-
s,
|
|
5
|
+
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper" }, [r(t.HeaderWrapper), r("div", { staticClass: "guido-editor__container", attrs: { id: "guido-editor" } }), r(t.SaveAsTemplateDrawer)], 1);
|
|
7
|
+
}, i = [], _ = /* @__PURE__ */ o(
|
|
10
8
|
a,
|
|
9
|
+
s,
|
|
10
|
+
i,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"ac2711fd"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = _.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
|
@@ -1,21 +1,18 @@
|
|
|
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 { useStripoApi as
|
|
9
|
-
import { useDynamicContentStore as
|
|
10
|
-
import { useEditorStore as
|
|
11
|
-
|
|
12
|
-
import U from "../node_modules/lodash-es/merge.js";
|
|
13
|
-
const ne = /* @__PURE__ */ G({
|
|
1
|
+
import { defineComponent as w, computed as E, onMounted as _ } from "vue";
|
|
2
|
+
import { provideGuidoActions as G } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as I } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as T } from "../composables/useStripo.js";
|
|
5
|
+
import { DefaultUsername as k, DefaultGuidoConfig as P } from "../enums/defaults.js";
|
|
6
|
+
import A from "./organisms/header/HeaderWrapper.vue.js";
|
|
7
|
+
import N from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
8
|
+
import { useStripoApi as x } from "../services/stripoApi.js";
|
|
9
|
+
import { useDynamicContentStore as W } from "../stores/dynamic-content.js";
|
|
10
|
+
import { useEditorStore as z } from "../stores/editor.js";
|
|
11
|
+
const O = /* @__PURE__ */ w({
|
|
14
12
|
__name: "Guido",
|
|
15
13
|
props: {
|
|
16
14
|
templateId: null,
|
|
17
15
|
userId: null,
|
|
18
|
-
messageType: null,
|
|
19
16
|
partnerName: null,
|
|
20
17
|
productType: null,
|
|
21
18
|
username: null,
|
|
@@ -26,33 +23,29 @@ const ne = /* @__PURE__ */ G({
|
|
|
26
23
|
},
|
|
27
24
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
|
|
28
25
|
setup(b, { expose: L, emit: t }) {
|
|
29
|
-
const o = b,
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
productType: c = d(),
|
|
39
|
-
messageType: f = M,
|
|
40
|
-
username: C = x
|
|
26
|
+
const o = b, n = W(), s = z(), a = E(() => s.hasChanges), c = o.preselectedDynamicContentList || [], { getPartnerName: i, getProductType: r } = I(), {
|
|
27
|
+
templateId: m,
|
|
28
|
+
userId: d,
|
|
29
|
+
guidoConfig: l,
|
|
30
|
+
html: u = "",
|
|
31
|
+
css: p = "",
|
|
32
|
+
partnerName: y = i(),
|
|
33
|
+
productType: g = r(),
|
|
34
|
+
username: C = k
|
|
41
35
|
} = o;
|
|
42
|
-
window.GuidoConfig =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
messageType: f
|
|
36
|
+
window.GuidoConfig = {
|
|
37
|
+
...P,
|
|
38
|
+
...l
|
|
46
39
|
};
|
|
47
|
-
const { initPlugin:
|
|
48
|
-
emailId:
|
|
49
|
-
userId:
|
|
40
|
+
const { initPlugin: f } = T({
|
|
41
|
+
emailId: m,
|
|
42
|
+
userId: d,
|
|
50
43
|
username: C,
|
|
51
|
-
partnerName:
|
|
52
|
-
productType:
|
|
53
|
-
preselectedDynamicContentList:
|
|
54
|
-
}), { getDefaultTemplate:
|
|
55
|
-
|
|
44
|
+
partnerName: y,
|
|
45
|
+
productType: g,
|
|
46
|
+
preselectedDynamicContentList: c
|
|
47
|
+
}), { getDefaultTemplate: v } = x();
|
|
48
|
+
G({
|
|
56
49
|
onBack: () => {
|
|
57
50
|
console.debug("guido:back"), t("back");
|
|
58
51
|
},
|
|
@@ -69,37 +62,37 @@ const ne = /* @__PURE__ */ G({
|
|
|
69
62
|
});
|
|
70
63
|
}
|
|
71
64
|
});
|
|
72
|
-
const
|
|
65
|
+
const D = (e) => {
|
|
73
66
|
console.debug("dynamic-content:close", e), n.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
74
|
-
},
|
|
67
|
+
}, S = () => {
|
|
75
68
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
76
69
|
};
|
|
77
|
-
return
|
|
70
|
+
return _(async () => {
|
|
78
71
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
79
72
|
try {
|
|
80
73
|
let e = {
|
|
81
|
-
html:
|
|
82
|
-
css:
|
|
74
|
+
html: u,
|
|
75
|
+
css: p,
|
|
83
76
|
forceRecreate: !0
|
|
84
77
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
85
78
|
};
|
|
86
|
-
e.html || (e = await
|
|
79
|
+
e.html || (e = await v()), await f(e), n.selectedDynamicContentList = c;
|
|
87
80
|
} catch (e) {
|
|
88
81
|
console.error("Failed to initialize Stripo editor:", e);
|
|
89
82
|
}
|
|
90
83
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
91
|
-
const
|
|
92
|
-
console.debug("dynamic-content:open",
|
|
84
|
+
const h = e;
|
|
85
|
+
console.debug("dynamic-content:open", h.detail), t("dynamic-content:open", h.detail);
|
|
93
86
|
});
|
|
94
87
|
}), L({
|
|
95
88
|
dynamicContent: {
|
|
96
|
-
insert:
|
|
97
|
-
close:
|
|
89
|
+
insert: D,
|
|
90
|
+
close: S
|
|
98
91
|
},
|
|
99
|
-
hasChanges:
|
|
100
|
-
}), { __sfc: !0,
|
|
92
|
+
hasChanges: a
|
|
93
|
+
}), { __sfc: !0, dynamicContentStore: n, props: o, editorStore: s, hasChanges: a, preselectedDynamicContentList: c, getPartnerName: i, getProductType: r, templateId: m, userId: d, guidoConfig: l, html: u, css: p, partnerName: y, productType: g, username: C, emit: t, initPlugin: f, getDefaultTemplate: v, insertDynamicContent: D, closeDynamicContent: S, HeaderWrapper: A, SaveAsTemplateDrawer: N };
|
|
101
94
|
}
|
|
102
95
|
});
|
|
103
96
|
export {
|
|
104
|
-
|
|
97
|
+
O as default
|
|
105
98
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import s from "./MiddleSlot.vue2.js";
|
|
2
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var n = function() {
|
|
4
|
-
var
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ?
|
|
6
|
-
},
|
|
7
|
-
|
|
4
|
+
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
5
|
+
return t.editorStore.isVersionHistoryOpen ? o("div", { staticClass: "d-f" }, [o(t.VersionHistory), o(t.VersionHistoryViewOptions)], 1) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.trans("newsletter.email-preview") } }), o(t.ViewOptions, { staticClass: "ml-3" })], 1);
|
|
6
|
+
}, l = [], r = /* @__PURE__ */ i(
|
|
7
|
+
s,
|
|
8
8
|
n,
|
|
9
|
-
|
|
9
|
+
l,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const p = r.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
p as default
|
|
17
17
|
};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
import u from "./version-history/VersionHistory.vue.js";
|
|
10
|
-
import T from "./version-history/ViewOptions.vue.js";
|
|
11
|
-
import P from "./ViewOptions.vue.js";
|
|
12
|
-
const B = /* @__PURE__ */ m({
|
|
1
|
+
import { defineComponent as r } from "vue";
|
|
2
|
+
import { useTranslations as s } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { useEditorStore as n } from "../../../stores/editor.js";
|
|
4
|
+
import { InButtonV2 as e } from "@useinsider/design-system-vue";
|
|
5
|
+
import m from "./version-history/VersionHistory.vue.js";
|
|
6
|
+
import p from "./version-history/ViewOptions.vue.js";
|
|
7
|
+
import f from "./ViewOptions.vue.js";
|
|
8
|
+
const y = /* @__PURE__ */ r({
|
|
13
9
|
__name: "MiddleSlot",
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
return { __sfc: !0, editorStore:
|
|
10
|
+
setup(a) {
|
|
11
|
+
const o = n(), t = s();
|
|
12
|
+
return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
|
|
13
|
+
id: `${i}-tooltip`,
|
|
14
|
+
dynamicPosition: !1,
|
|
15
|
+
staticPosition: "bottom center",
|
|
16
|
+
iconStatus: !1
|
|
17
|
+
}), InButtonV2: e, VersionHistory: m, VersionHistoryViewOptions: p, ViewOptions: f };
|
|
17
18
|
}
|
|
18
19
|
});
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
y as default
|
|
21
22
|
};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var s,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import o from "./RightSlot.vue2.js";
|
|
2
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var n = function() {
|
|
4
|
+
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
5
|
+
return e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.handleSaveAs } }), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleSave } })], 1);
|
|
6
|
+
}, r = [], a = /* @__PURE__ */ i(
|
|
7
|
+
o,
|
|
8
8
|
n,
|
|
9
|
-
l,
|
|
10
9
|
r,
|
|
11
10
|
!1,
|
|
12
11
|
null,
|
|
13
12
|
null
|
|
14
13
|
);
|
|
15
|
-
const
|
|
14
|
+
const u = a.exports;
|
|
16
15
|
export {
|
|
17
|
-
|
|
16
|
+
u as default
|
|
18
17
|
};
|
|
@@ -1,41 +1,37 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActionsApi as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
import { usePreviewStore as C } from "../../../stores/preview.js";
|
|
10
|
-
import { getTooltipOptions as T } from "../../../utils/tooltipUtils.js";
|
|
11
|
-
import { InButtonV2 as x } from "@useinsider/design-system-vue";
|
|
12
|
-
const z = /* @__PURE__ */ y({
|
|
1
|
+
import { defineComponent as m } from "vue";
|
|
2
|
+
import { useActionsApi as p } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useExport as c } from "../../../composables/useExport.js";
|
|
4
|
+
import { useSaveStart as l, useSaveComplete as d } from "../../../composables/useGuidoActions.js";
|
|
5
|
+
import { useVersionHistoryApi as f } from "../../../composables/useVersionHistoryApi.js";
|
|
6
|
+
import { useEditorStore as u } from "../../../stores/editor.js";
|
|
7
|
+
import { InButtonV2 as S } from "@useinsider/design-system-vue";
|
|
8
|
+
const w = /* @__PURE__ */ m({
|
|
13
9
|
__name: "RightSlot",
|
|
14
|
-
setup(
|
|
15
|
-
const {
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
setup(h) {
|
|
11
|
+
const { exportHtml: a } = c(), { getCompiledEmail: o } = p(), r = l(), s = d(), { openVersionHistory: n, closeVersionHistory: i } = f(), e = u();
|
|
12
|
+
return { __sfc: !0, exportHtml: a, getCompiledEmail: o, saveStart: r, saveComplete: s, openVersionHistory: n, closeVersionHistory: i, editorStore: e, handleVersionHistory: () => {
|
|
13
|
+
if (e.isVersionHistoryOpen) {
|
|
14
|
+
i();
|
|
18
15
|
return;
|
|
19
16
|
}
|
|
20
17
|
n();
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
|
|
18
|
+
}, handleSaveAs: () => {
|
|
19
|
+
e.isSaveAsTemplateDrawerOpen = !0;
|
|
20
|
+
}, handleSave: async () => {
|
|
21
|
+
r();
|
|
25
22
|
try {
|
|
26
|
-
const { html:
|
|
27
|
-
|
|
28
|
-
html:
|
|
23
|
+
const { html: t } = await o();
|
|
24
|
+
s({
|
|
25
|
+
html: t || "",
|
|
29
26
|
css: ""
|
|
30
27
|
// CSS is embedded in HTML from Stripo
|
|
31
28
|
});
|
|
32
|
-
} catch (
|
|
33
|
-
console.error("Failed to get template data for save:",
|
|
29
|
+
} catch (t) {
|
|
30
|
+
console.error("Failed to get template data for save:", t);
|
|
34
31
|
}
|
|
35
|
-
}, S
|
|
36
|
-
return { __sfc: !0, config: c, exportHtml: l, getCompiledEmail: r, saveStart: s, saveComplete: i, openVersionHistory: n, closeVersionHistory: p, editorStore: o, trans: t, previewStore: m, handleVersionHistory: f, handleSaveAs: u, versionHistoryTooltipText: v, handleSave: d, isSaveButtonDisabled: S, getTooltipOptions: T, InButtonV2: x };
|
|
32
|
+
}, InButtonV2: S };
|
|
37
33
|
}
|
|
38
34
|
});
|
|
39
35
|
export {
|
|
40
|
-
|
|
36
|
+
w as default
|
|
41
37
|
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import r from "./ViewOptions.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
5
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
6
|
-
return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "",
|
|
7
|
-
},
|
|
6
|
+
return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
|
|
7
|
+
}, i = [], _ = /* @__PURE__ */ s(
|
|
8
8
|
r,
|
|
9
|
-
s,
|
|
10
9
|
n,
|
|
10
|
+
i,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"0fff376c"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const l = _.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
l as default
|
|
18
18
|
};
|
|
@@ -1,35 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { getTooltipOptions as t } from "../../../utils/tooltipUtils.js";
|
|
6
|
-
import { InSegments as l } from "@useinsider/design-system-vue";
|
|
7
|
-
const w = /* @__PURE__ */ p({
|
|
1
|
+
import { defineComponent as e } from "vue";
|
|
2
|
+
import { useEditorStore as t } from "../../../stores/editor.js";
|
|
3
|
+
import { InSegments as o } from "@useinsider/design-system-vue";
|
|
4
|
+
const u = /* @__PURE__ */ e({
|
|
8
5
|
__name: "ViewOptions",
|
|
9
|
-
setup(
|
|
10
|
-
|
|
11
|
-
{
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
value: "desktop",
|
|
15
|
-
position: "bottom",
|
|
16
|
-
align: "center",
|
|
17
|
-
tooltipText: o("newsletter.desktop"),
|
|
18
|
-
tooltipOptions: t("guido__view-option-desktop")
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
text: "",
|
|
22
|
-
icon: "line-menu-mobileapp",
|
|
23
|
-
value: "mobile",
|
|
24
|
-
position: "bottom",
|
|
25
|
-
align: "center",
|
|
26
|
-
tooltipText: o("newsletter.mobile"),
|
|
27
|
-
tooltipOptions: t("guido__view-option-mobile")
|
|
28
|
-
}
|
|
29
|
-
], n = m();
|
|
30
|
-
return { __sfc: !0, editorStore: e, trans: o, segmentList: i, previewStore: n, InSegments: l };
|
|
6
|
+
setup(n) {
|
|
7
|
+
return { __sfc: !0, editorStore: t(), segmentList: [
|
|
8
|
+
{ text: "", icon: "line-desktop", value: "desktop" },
|
|
9
|
+
{ text: "", icon: "line-menu-mobileapp", value: "mobile" }
|
|
10
|
+
], InSegments: o };
|
|
31
11
|
}
|
|
32
12
|
});
|
|
33
13
|
export {
|
|
34
|
-
|
|
14
|
+
u as default
|
|
35
15
|
};
|
|
@@ -1,41 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import { InSegments as c } from "@useinsider/design-system-vue";
|
|
7
|
-
const h = /* @__PURE__ */ p({
|
|
1
|
+
import { defineComponent as s } from "vue";
|
|
2
|
+
import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
|
|
3
|
+
import { useVersionHistoryStore as r } from "../../../../stores/version-history.js";
|
|
4
|
+
import { InSegments as m } from "@useinsider/design-system-vue";
|
|
5
|
+
const d = /* @__PURE__ */ s({
|
|
8
6
|
__name: "ViewOptions",
|
|
9
|
-
setup(
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
tooltipText: o("newsletter.desktop"),
|
|
18
|
-
tooltipOptions: n("guido__version-history-view-option-desktop")
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
text: "",
|
|
22
|
-
icon: "line-menu-mobileapp",
|
|
23
|
-
value: "mobile",
|
|
24
|
-
position: "bottom",
|
|
25
|
-
align: "center",
|
|
26
|
-
tooltipText: o("newsletter.mobile"),
|
|
27
|
-
tooltipOptions: n("guido__version-history-view-option-mobile")
|
|
28
|
-
}
|
|
29
|
-
];
|
|
30
|
-
return { __sfc: !0, versionHistoryStore: t, switchToDesktopPreview: e, switchToMobilePreview: i, trans: o, segmentList: r, changeVisualMode: (s) => {
|
|
31
|
-
if (t.editorVisualMode = s, s === "mobile") {
|
|
32
|
-
i();
|
|
7
|
+
setup(p) {
|
|
8
|
+
const e = r(), { switchToDesktopPreview: o, switchToMobilePreview: t } = n();
|
|
9
|
+
return { __sfc: !0, versionHistoryStore: e, switchToDesktopPreview: o, switchToMobilePreview: t, segmentList: [
|
|
10
|
+
{ text: "", icon: "line-desktop", value: "desktop" },
|
|
11
|
+
{ text: "", icon: "line-menu-mobileapp", value: "mobile" }
|
|
12
|
+
], changeVisualMode: (i) => {
|
|
13
|
+
if (e.editorVisualMode = i, i === "mobile") {
|
|
14
|
+
t();
|
|
33
15
|
return;
|
|
34
16
|
}
|
|
35
|
-
|
|
36
|
-
}, InSegments:
|
|
17
|
+
o();
|
|
18
|
+
}, InSegments: m };
|
|
37
19
|
}
|
|
38
20
|
});
|
|
39
21
|
export {
|
|
40
|
-
|
|
22
|
+
d as default
|
|
41
23
|
};
|