@useinsider/guido 1.0.0-beta.d77a041 → 1.0.0-beta.dad21f4
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 +76 -15
- package/dist/@types/generic.d.ts +5 -0
- package/dist/App.vue.d.ts +1 -1
- package/dist/_virtual/AddCustomFont.js +4 -0
- package/dist/_virtual/AiAssistantValueType.js +4 -0
- package/dist/_virtual/BackgroundColorBuiltInControl.js +4 -0
- package/dist/_virtual/BackgroundImageBuiltInControl.js +4 -0
- package/dist/_virtual/Block.js +4 -0
- package/dist/_virtual/BlockAttributes.js +4 -0
- package/dist/_virtual/BlockCompositionType.js +4 -0
- package/dist/_virtual/BlockPaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/BlockRenderer.js +4 -0
- package/dist/_virtual/BlockType.js +4 -0
- package/dist/_virtual/BlocksPanel.js +4 -0
- package/dist/_virtual/BuiltInControl.js +4 -0
- package/dist/_virtual/BuiltInControlTypes.js +4 -0
- package/dist/_virtual/ButtonBorderBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonFontColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonTextBuiltInControl.js +4 -0
- package/dist/_virtual/ContextAction.js +4 -0
- package/dist/_virtual/ContextActionType.js +4 -0
- package/dist/_virtual/Control.js +4 -0
- package/dist/_virtual/EditorStatePropertyType.js +4 -0
- package/dist/_virtual/Extension.js +4 -0
- package/dist/_virtual/ExtensionBuilder.js +4 -0
- package/dist/_virtual/FontFamilyBuiltInControl.js +4 -0
- package/dist/_virtual/LinkColorBuiltInControl.js +4 -0
- package/dist/_virtual/ModificationDescription.js +4 -0
- package/dist/_virtual/PanelPosition.js +4 -0
- package/dist/_virtual/PreviewDeviceMode.js +4 -0
- package/dist/_virtual/SettingsPanelRegistry.js +4 -0
- package/dist/_virtual/SettingsPanelTab.js +4 -0
- package/dist/_virtual/SettingsTab.js +4 -0
- package/dist/_virtual/StructureBorderBuiltInControl.js +4 -0
- package/dist/_virtual/StructurePaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/TextColorBuiltInControl.js +4 -0
- package/dist/_virtual/TextLineSpacingBuiltInControl.js +4 -0
- package/dist/_virtual/TextSizeBuiltInControl.js +4 -0
- package/dist/_virtual/TextStyleBuiltInControl.js +4 -0
- package/dist/_virtual/UIElement.js +4 -0
- package/dist/_virtual/UIElementTagRegistry.js +4 -0
- package/dist/_virtual/UIElementType.js +4 -0
- package/dist/_virtual/UIElementsAttributes.js +4 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/components/Guido.vue.d.ts +6 -2
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +34 -26
- package/dist/components/organisms/header/LeftSlot.vue.d.ts +1 -1
- package/dist/components/organisms/header/LeftSlot.vue.js +8 -8
- package/dist/components/organisms/header/LeftSlot.vue2.js +5 -3
- package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
- package/dist/components/organisms/header/MiddleSlot.vue2.js +6 -4
- package/dist/components/organisms/header/RightSlot.vue.js +7 -10
- package/dist/components/organisms/header/RightSlot.vue2.js +14 -19
- package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
- package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +2 -0
- package/dist/components/organisms/header/version-history/RestoreButton.vue.js +19 -0
- package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +14 -0
- package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +13 -1
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +13 -10
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
- package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
- package/dist/composables/useActionsApi.d.ts +1 -0
- package/dist/composables/useActionsApi.js +14 -12
- package/dist/composables/useCustomInterfaceAppearance.js +45 -9
- package/dist/composables/useStripo.js +44 -28
- package/dist/enums/displayConditions.d.ts +2 -0
- package/dist/enums/displayConditions.js +80 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +27 -0
- package/dist/extensions/DynamicContent/dynamic-content.css.js +24 -0
- package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +63 -0
- package/dist/extensions/DynamicContent/extension.d.ts +2 -0
- package/dist/extensions/DynamicContent/extension.js +11 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +51 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +52 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +41 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +104 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +20 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +32 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +26 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +18 -0
- package/dist/static/styles/base.css.js +11 -0
- package/dist/static/styles/components/alert-message.css.js +39 -0
- package/dist/static/styles/components/amp-block.css.js +18 -0
- package/dist/static/styles/components/base-input.css.js +47 -0
- package/dist/static/styles/components/button-group.css.js +54 -0
- package/dist/static/styles/components/button.css.js +106 -0
- package/dist/static/styles/components/combobox.css.js +49 -0
- package/dist/static/styles/components/counter.css.js +42 -0
- package/dist/static/styles/components/dropdown-menu.css.js +52 -0
- package/dist/static/styles/components/narrow-panel.css.js +38 -0
- package/dist/static/styles/components/switcher.css.js +11 -0
- package/dist/static/styles/components/tabs.css.js +97 -0
- package/dist/static/styles/components/tools.css.js +23 -0
- package/dist/static/styles/components/version-history.css.js +30 -0
- package/dist/static/styles/components/wide-panel.css.js +135 -0
- package/dist/static/styles/variables.css.js +23 -0
- package/dist/stores/editor.d.ts +0 -1
- package/dist/stores/editor.js +1 -2
- package/package.json +5 -4
- package/dist/components/organisms/base/ModalWrapper.vue.d.ts +0 -72
- package/dist/components/organisms/base/ModalWrapper.vue.js +0 -19
- package/dist/components/organisms/base/ModalWrapper.vue2.js +0 -43
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.d.ts +0 -16
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +0 -22
- package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +0 -86
- package/dist/composables/useSaveAsTemplate.d.ts +0 -17
- package/dist/composables/useSaveAsTemplate.js +0 -44
- package/dist/composables/useTemplateCategories.d.ts +0 -35
- package/dist/composables/useTemplateCategories.js +0 -78
- package/dist/composables/useTemplateNameValidation.d.ts +0 -13
- package/dist/composables/useTemplateNameValidation.js +0 -57
- package/dist/mock/api/template-library.d.ts +0 -2
- package/dist/static/editor.css.js +0 -232
- package/dist/utils/base64.d.ts +0 -1
- package/dist/utils/base64.js +0 -14
package/README.md
CHANGED
|
@@ -14,7 +14,10 @@ Guido is a Vue 2 + TypeScript wrapper for the Stripo Email Editor plugin. Easily
|
|
|
14
14
|
```bash
|
|
15
15
|
npm install @useinsider/guido
|
|
16
16
|
```
|
|
17
|
+
### Prerequisites
|
|
18
|
+
🍍 Your project should have `pinia`
|
|
17
19
|
|
|
20
|
+
---
|
|
18
21
|
## 🚀 Usage
|
|
19
22
|
|
|
20
23
|
### Basic Usage
|
|
@@ -23,9 +26,11 @@ npm install @useinsider/guido
|
|
|
23
26
|
<template>
|
|
24
27
|
<div>
|
|
25
28
|
<Guido
|
|
29
|
+
ref="guidoEditor"
|
|
26
30
|
:email-id="emailId"
|
|
27
31
|
:user-id="userId"
|
|
28
32
|
:guido-config="guidoConfig"
|
|
33
|
+
@dynamic-content:open="handleDynamicContentOpen"
|
|
29
34
|
/>
|
|
30
35
|
</div>
|
|
31
36
|
</template>
|
|
@@ -44,7 +49,24 @@ export default {
|
|
|
44
49
|
guidoConfig: {
|
|
45
50
|
translationsPath: 'window.trans.en'
|
|
46
51
|
}
|
|
52
|
+
dynamicContentModalVisible: false
|
|
47
53
|
};
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
methods: {
|
|
57
|
+
handleDynamicContentOpen() {
|
|
58
|
+
this.dynamicContentModalVisible = true;
|
|
59
|
+
}
|
|
60
|
+
// ⚠️ Your own Dynamic Content Modal should have this id: #guido-dynamic-content-modal
|
|
61
|
+
handleDynamicContentApply() {
|
|
62
|
+
this.$ref.guidoEditor.applyDynamicContent({
|
|
63
|
+
text: 'Text',
|
|
64
|
+
value: 'Value',
|
|
65
|
+
fallback: 'Fallback'
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
this.dynamicContentModalVisible = false;
|
|
69
|
+
}
|
|
48
70
|
}
|
|
49
71
|
};
|
|
50
72
|
</script>
|
|
@@ -63,7 +85,12 @@ export default {
|
|
|
63
85
|
| `productType` | `string` | ⚪ | Getting from URL path | Unique identifier for the product draft |
|
|
64
86
|
| `guidoConfig` | `GuidoConfig` | ✅ | - | Configuration object for the editor |
|
|
65
87
|
|
|
66
|
-
###
|
|
88
|
+
### Guido Exposed Methods
|
|
89
|
+
```typescript
|
|
90
|
+
applyDynamicContent(DynamicContent);
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Guido Interfaces
|
|
67
94
|
|
|
68
95
|
```typescript
|
|
69
96
|
interface GuidoConfig {
|
|
@@ -75,6 +102,20 @@ interface GuidoConfig {
|
|
|
75
102
|
|----------|------|---------|-------------|
|
|
76
103
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
77
104
|
|
|
105
|
+
```typescript
|
|
106
|
+
interface DynamicContent {
|
|
107
|
+
value: string;
|
|
108
|
+
text: string;
|
|
109
|
+
fallback?: string;
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
| Property | Type | Default | Description |
|
|
114
|
+
|----------|------|---------|-------------|
|
|
115
|
+
| `value` | `string` | '' | Value of the dynamic content |
|
|
116
|
+
| `text` | `string` | '' | Visible value of the dynamic content |
|
|
117
|
+
| `fallback?` | `string` | '' | Fallback value of the dynamic content. Optional |
|
|
118
|
+
|
|
78
119
|
### TypeScript Types
|
|
79
120
|
|
|
80
121
|
The library exports the following TypeScript types:
|
|
@@ -88,19 +129,6 @@ import type { GuidoConfig } from '@useinsider/guido';
|
|
|
88
129
|
import type { StripoEventType } from '@useinsider/guido';
|
|
89
130
|
```
|
|
90
131
|
|
|
91
|
-
### StripoEventType
|
|
92
|
-
|
|
93
|
-
```typescript
|
|
94
|
-
type StripoEventType =
|
|
95
|
-
| 'save'
|
|
96
|
-
| 'export'
|
|
97
|
-
| 'close'
|
|
98
|
-
| 'autosave'
|
|
99
|
-
| 'publish'
|
|
100
|
-
| 'export:requested'
|
|
101
|
-
| 'export:ready';
|
|
102
|
-
```
|
|
103
|
-
|
|
104
132
|
---
|
|
105
133
|
|
|
106
134
|
## 🔧 Development
|
|
@@ -170,6 +198,34 @@ const trans = useTranslations();
|
|
|
170
198
|
trans('foo.bar')
|
|
171
199
|
```
|
|
172
200
|
|
|
201
|
+
## 📦 Local Building (Recommended)
|
|
202
|
+
|
|
203
|
+
Run this commands if you want to test the package on your local before sending to NPM.
|
|
204
|
+
```sh
|
|
205
|
+
bun run build
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Since bun does not have packaging yet, use npm here: 🥲
|
|
209
|
+
```sh
|
|
210
|
+
npm pack
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
It'll crate like `useinsider-guido-1.0.0.gz` file.
|
|
214
|
+
|
|
215
|
+
Move this file to your project path like: `email-fe` via:
|
|
216
|
+
```sh
|
|
217
|
+
cp useinsider-guido-1.0.0.gz ../email-fe
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Install the file to your project:
|
|
221
|
+
```sh
|
|
222
|
+
npm i ./useinsider-guido-1.0.0.gz
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Then you just need to rebuild to your project or restart the Container. 🎉
|
|
226
|
+
|
|
227
|
+
For Future, we can create a shell script for it. Feel free to help 🙃
|
|
228
|
+
|
|
173
229
|
## 📦 Build Output
|
|
174
230
|
|
|
175
231
|
The library builds to multiple formats:
|
|
@@ -211,7 +267,12 @@ ISC License
|
|
|
211
267
|
- [@useinsider/design-system-vue](https://github.com/useinsider/design-system-vue) - Insider's Vue design system
|
|
212
268
|
|
|
213
269
|
## 🎯 TODO:
|
|
214
|
-
-
|
|
270
|
+
- CSS part should be optimized with variables & `sass-loader`.
|
|
215
271
|
- Master Version Generator should be fixed.
|
|
216
272
|
- Playwright integration
|
|
217
273
|
- Commitlint & Precommit Hooks integration
|
|
274
|
+
- We need to emit save event and we should return template config to it
|
|
275
|
+
- Default template should be same with production
|
|
276
|
+
- Open Guido with saved template
|
|
277
|
+
- Get User ID, Email and Unique Template ID as dynamic from props
|
|
278
|
+
- Get Pre-built display conditions from API
|
package/dist/@types/generic.d.ts
CHANGED
package/dist/App.vue.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../node_modules/@useinsider/design-system-vue/dist/design-system-vue.css';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
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<{}>>, {}>;
|
|
3
3
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GuidoConfig } from '@@/Types/generic';
|
|
1
|
+
import type { DynamicContent, GuidoConfig } from '@@/Types/generic';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
emailId: string;
|
|
4
4
|
userId: string;
|
|
@@ -7,7 +7,11 @@ type __VLS_Props = {
|
|
|
7
7
|
username?: string;
|
|
8
8
|
guidoConfig: GuidoConfig;
|
|
9
9
|
};
|
|
10
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
10
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
11
|
+
applyDynamicContent: (data: DynamicContent) => void;
|
|
12
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
13
|
+
"dynamic-content:open": (detail: DynamicContent | null) => void;
|
|
14
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
11
15
|
export default _default;
|
|
12
16
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
17
|
type __VLS_TypePropsToOption<T> = {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
},
|
|
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" } })], 1);
|
|
7
|
+
}, _ = [], a = /* @__PURE__ */ i(
|
|
8
8
|
o,
|
|
9
9
|
s,
|
|
10
|
-
|
|
10
|
+
_,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"1d1d2b7c"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = a.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePartner as
|
|
3
|
-
import { useStripo as
|
|
4
|
-
import { useTemplates as
|
|
5
|
-
import { DefaultUsername as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
import { useEditorStore as P } from "../stores/editor.js";
|
|
9
|
-
const F = /* @__PURE__ */ g({
|
|
1
|
+
import { defineComponent as C, onMounted as w } from "vue";
|
|
2
|
+
import { usePartner as _ } from "../composables/usePartner.js";
|
|
3
|
+
import { useStripo as T } from "../composables/useStripo.js";
|
|
4
|
+
import { useTemplates as b } from "../composables/useTemplates.js";
|
|
5
|
+
import { DefaultUsername as h, DefaultGuidoConfig as v } from "../enums/defaults.js";
|
|
6
|
+
import D from "./organisms/header/HeaderWrapper.vue.js";
|
|
7
|
+
const x = /* @__PURE__ */ C({
|
|
10
8
|
__name: "Guido",
|
|
11
9
|
props: {
|
|
12
10
|
emailId: null,
|
|
@@ -16,32 +14,42 @@ const F = /* @__PURE__ */ g({
|
|
|
16
14
|
username: null,
|
|
17
15
|
guidoConfig: null
|
|
18
16
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
17
|
+
emits: ["dynamic-content:open"],
|
|
18
|
+
setup(g, { expose: y, emit: n }) {
|
|
19
|
+
const o = g, { getPartnerName: t, getProductType: r } = _(), {
|
|
20
|
+
emailId: i,
|
|
21
|
+
userId: a,
|
|
22
|
+
guidoConfig: c,
|
|
23
|
+
partnerName: s = t(),
|
|
24
|
+
productType: u = r(),
|
|
25
|
+
username: d = h
|
|
27
26
|
} = o;
|
|
28
27
|
window.GuidoConfig = {
|
|
29
|
-
...
|
|
30
|
-
...
|
|
28
|
+
...v,
|
|
29
|
+
...c
|
|
31
30
|
};
|
|
32
|
-
const { initPlugin:
|
|
33
|
-
|
|
31
|
+
const { initPlugin: m } = T({ emailId: i, userId: a, username: d, partnerName: s, productType: u }), { getDefaultTemplate: p } = b(), l = (e) => {
|
|
32
|
+
console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", {
|
|
33
|
+
detail: e
|
|
34
|
+
}));
|
|
34
35
|
};
|
|
35
|
-
return
|
|
36
|
+
return w(async () => {
|
|
37
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
36
38
|
try {
|
|
37
|
-
const e = await
|
|
38
|
-
await
|
|
39
|
+
const e = await p();
|
|
40
|
+
await m(e);
|
|
39
41
|
} catch (e) {
|
|
40
42
|
console.error("Failed to initialize Stripo editor:", e);
|
|
41
43
|
}
|
|
42
|
-
|
|
44
|
+
document.addEventListener("dynamic-content:open", (e) => {
|
|
45
|
+
const f = e;
|
|
46
|
+
console.debug("dynamic-content:open", f.detail), n("dynamic-content:open", f.detail);
|
|
47
|
+
});
|
|
48
|
+
}), y({
|
|
49
|
+
applyDynamicContent: l
|
|
50
|
+
}), { __sfc: !0, props: o, getPartnerName: t, getProductType: r, emailId: i, userId: a, guidoConfig: c, partnerName: s, productType: u, username: d, emit: n, initPlugin: m, getDefaultTemplate: p, applyDynamicContent: l, HeaderWrapper: D };
|
|
43
51
|
}
|
|
44
52
|
});
|
|
45
53
|
export {
|
|
46
|
-
|
|
54
|
+
x as default
|
|
47
55
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
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
2
|
export default _default;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import r from "./LeftSlot.vue2.js";
|
|
2
2
|
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
4
|
-
var t = this, e = t._self._c,
|
|
5
|
-
return e("div", [e(
|
|
6
|
-
},
|
|
3
|
+
var n = function() {
|
|
4
|
+
var t = this, e = t._self._c, s = t._self._setupProxy;
|
|
5
|
+
return e("div", { staticClass: "d-f a-i-c" }, [e(s.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" } }), s.editorStore.isVersionHistoryOpen ? e(s.RestoreButton, { staticClass: "ml-3" }) : t._e()], 1);
|
|
6
|
+
}, a = [], i = /* @__PURE__ */ o(
|
|
7
7
|
r,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
n,
|
|
9
|
+
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const f = i.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
f as default
|
|
17
17
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { defineComponent as t } from "vue";
|
|
2
|
-
import {
|
|
2
|
+
import { useEditorStore as o } from "../../../stores/editor.js";
|
|
3
|
+
import { InButtonV2 as r } from "@useinsider/design-system-vue";
|
|
4
|
+
import e from "./version-history/RestoreButton.vue.js";
|
|
3
5
|
const _ = /* @__PURE__ */ t({
|
|
4
6
|
__name: "LeftSlot",
|
|
5
|
-
setup(
|
|
6
|
-
return { __sfc: !0,
|
|
7
|
+
setup(m) {
|
|
8
|
+
return { __sfc: !0, editorStore: o(), InButtonV2: r, RestoreButton: e };
|
|
7
9
|
}
|
|
8
10
|
});
|
|
9
11
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import s from "./MiddleSlot.vue2.js";
|
|
2
|
-
import
|
|
3
|
-
var
|
|
2
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var n = function() {
|
|
4
4
|
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ? o(t.VersionHistory) : 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", "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") } })], 1);
|
|
6
|
-
}, l = [], r = /* @__PURE__ */
|
|
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", "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
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
|
};
|