@useinsider/guido 1.0.0-beta.b4126b3 → 1.0.0-beta.b79463f
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 +82 -15
- package/dist/@types/generic.d.ts +4 -19
- 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 +9 -2
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +39 -24
- 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 +11 -14
- 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/useApiExample.d.ts +6 -4
- package/dist/composables/useCustomInterfaceAppearance.js +45 -9
- package/dist/composables/useHttp.d.ts +19 -1
- package/dist/composables/useStripo.js +44 -28
- package/dist/composables/useToaster.d.ts +9 -1
- 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/package.json +5 -4
- package/dist/@types/http.d.ts +0 -19
- package/dist/static/editor.css.js +0 -232
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,29 @@ 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
|
+
handleDynamicContentInsert() {
|
|
62
|
+
this.$ref.guidoEditor?.dynamicContent.insert({
|
|
63
|
+
text: 'Text',
|
|
64
|
+
value: 'Value',
|
|
65
|
+
fallback: 'Fallback'
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
this.dynamicContentModalVisible = false;
|
|
69
|
+
},
|
|
70
|
+
// ⚠️ It's mandatory. There is no way to understand if user closes the modal without selection.
|
|
71
|
+
handleDynamicContentClose() {
|
|
72
|
+
this.$ref.guidoEditor?.dynamicContent.close();
|
|
73
|
+
}
|
|
74
|
+
|
|
48
75
|
}
|
|
49
76
|
};
|
|
50
77
|
</script>
|
|
@@ -63,7 +90,13 @@ export default {
|
|
|
63
90
|
| `productType` | `string` | ⚪ | Getting from URL path | Unique identifier for the product draft |
|
|
64
91
|
| `guidoConfig` | `GuidoConfig` | ✅ | - | Configuration object for the editor |
|
|
65
92
|
|
|
66
|
-
###
|
|
93
|
+
### Guido Exposed Methods
|
|
94
|
+
```typescript
|
|
95
|
+
dynamicContent.insert(DynamicContent);
|
|
96
|
+
dynamicContent.close();
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Guido Interfaces
|
|
67
100
|
|
|
68
101
|
```typescript
|
|
69
102
|
interface GuidoConfig {
|
|
@@ -75,6 +108,20 @@ interface GuidoConfig {
|
|
|
75
108
|
|----------|------|---------|-------------|
|
|
76
109
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
77
110
|
|
|
111
|
+
```typescript
|
|
112
|
+
interface DynamicContent {
|
|
113
|
+
value: string;
|
|
114
|
+
text: string;
|
|
115
|
+
fallback?: string;
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
| Property | Type | Default | Description |
|
|
120
|
+
|----------|------|---------|-------------|
|
|
121
|
+
| `value` | `string` | '' | Value of the dynamic content |
|
|
122
|
+
| `text` | `string` | '' | Visible value of the dynamic content |
|
|
123
|
+
| `fallback?` | `string` | '' | Fallback value of the dynamic content. Optional |
|
|
124
|
+
|
|
78
125
|
### TypeScript Types
|
|
79
126
|
|
|
80
127
|
The library exports the following TypeScript types:
|
|
@@ -88,19 +135,6 @@ import type { GuidoConfig } from '@useinsider/guido';
|
|
|
88
135
|
import type { StripoEventType } from '@useinsider/guido';
|
|
89
136
|
```
|
|
90
137
|
|
|
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
138
|
---
|
|
105
139
|
|
|
106
140
|
## 🔧 Development
|
|
@@ -170,6 +204,34 @@ const trans = useTranslations();
|
|
|
170
204
|
trans('foo.bar')
|
|
171
205
|
```
|
|
172
206
|
|
|
207
|
+
## 📦 Local Building (Recommended)
|
|
208
|
+
|
|
209
|
+
Run this commands if you want to test the package on your local before sending to NPM.
|
|
210
|
+
```sh
|
|
211
|
+
bun run build
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
Since bun does not have packaging yet, use npm here: 🥲
|
|
215
|
+
```sh
|
|
216
|
+
npm pack
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
It'll crate like `useinsider-guido-1.0.0.tgz` file.
|
|
220
|
+
|
|
221
|
+
Move this file to your project path like: `email-fe` via:
|
|
222
|
+
```sh
|
|
223
|
+
cp useinsider-guido-1.0.0.tgz ../email-fe
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
Install the file to your project:
|
|
227
|
+
```sh
|
|
228
|
+
npm i ./useinsider-guido-1.0.0.tgz
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Then you just need to rebuild to your project or restart the Container. 🎉
|
|
232
|
+
|
|
233
|
+
For Future, we can create a shell script for it. Feel free to help 🙃
|
|
234
|
+
|
|
173
235
|
## 📦 Build Output
|
|
174
236
|
|
|
175
237
|
The library builds to multiple formats:
|
|
@@ -211,7 +273,12 @@ ISC License
|
|
|
211
273
|
- [@useinsider/design-system-vue](https://github.com/useinsider/design-system-vue) - Insider's Vue design system
|
|
212
274
|
|
|
213
275
|
## 🎯 TODO:
|
|
214
|
-
-
|
|
276
|
+
- CSS part should be optimized with variables & `sass-loader`.
|
|
215
277
|
- Master Version Generator should be fixed.
|
|
216
278
|
- Playwright integration
|
|
217
279
|
- Commitlint & Precommit Hooks integration
|
|
280
|
+
- We need to emit save event and we should return template config to it
|
|
281
|
+
- Default template should be same with production
|
|
282
|
+
- Open Guido with saved template
|
|
283
|
+
- Get User ID, Email and Unique Template ID as dynamic from props
|
|
284
|
+
- Get Pre-built display conditions from API
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -1,23 +1,8 @@
|
|
|
1
1
|
export type GuidoConfig = {
|
|
2
2
|
translationsPath: string;
|
|
3
3
|
};
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
name: string;
|
|
7
|
-
email: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ApiResponse<T> {
|
|
10
|
-
data: T;
|
|
11
|
-
message: string;
|
|
12
|
-
success: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type ToasterType = 'success' | 'error' | 'info' | 'warning';
|
|
15
|
-
export interface ToasterActionButton {
|
|
4
|
+
export type DynamicContent = {
|
|
5
|
+
value: string;
|
|
16
6
|
text: string;
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
export interface ToasterOptions {
|
|
20
|
-
type?: ToasterType;
|
|
21
|
-
message: string;
|
|
22
|
-
actionButton?: ToasterActionButton;
|
|
23
|
-
}
|
|
7
|
+
fallback?: string;
|
|
8
|
+
};
|
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,14 @@ 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
|
+
dynamicContent: {
|
|
12
|
+
insert: (data: DynamicContent) => void;
|
|
13
|
+
close: () => void;
|
|
14
|
+
};
|
|
15
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
16
|
+
"dynamic-content:open": (detail: DynamicContent | null) => void;
|
|
17
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
11
18
|
export default _default;
|
|
12
19
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
13
20
|
type __VLS_TypePropsToOption<T> = {
|
|
@@ -1,10 +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
|
-
const
|
|
1
|
+
import { defineComponent as v, onMounted as w } from "vue";
|
|
2
|
+
import { usePartner as h } from "../composables/usePartner.js";
|
|
3
|
+
import { useStripo as D } from "../composables/useStripo.js";
|
|
4
|
+
import { useTemplates as E } from "../composables/useTemplates.js";
|
|
5
|
+
import { DefaultUsername as _, DefaultGuidoConfig as b } from "../enums/defaults.js";
|
|
6
|
+
import T from "./organisms/header/HeaderWrapper.vue.js";
|
|
7
|
+
const W = /* @__PURE__ */ v({
|
|
8
8
|
__name: "Guido",
|
|
9
9
|
props: {
|
|
10
10
|
emailId: null,
|
|
@@ -14,30 +14,45 @@ const h = /* @__PURE__ */ f({
|
|
|
14
14
|
username: null,
|
|
15
15
|
guidoConfig: null
|
|
16
16
|
},
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
emits: ["dynamic-content:open"],
|
|
18
|
+
setup(g, { expose: C, emit: n }) {
|
|
19
|
+
const t = g, { getPartnerName: o, getProductType: c } = h(), {
|
|
20
|
+
emailId: i,
|
|
21
|
+
userId: a,
|
|
22
|
+
guidoConfig: r,
|
|
23
|
+
partnerName: s = o(),
|
|
24
|
+
productType: d = c(),
|
|
25
|
+
username: u = _
|
|
26
|
+
} = t;
|
|
26
27
|
window.GuidoConfig = {
|
|
27
|
-
...
|
|
28
|
-
...
|
|
28
|
+
...b,
|
|
29
|
+
...r
|
|
29
30
|
};
|
|
30
|
-
const { initPlugin:
|
|
31
|
-
|
|
31
|
+
const { initPlugin: m } = D({ emailId: i, userId: a, username: u, partnerName: s, productType: d }), { getDefaultTemplate: l } = E(), p = (e) => {
|
|
32
|
+
console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
33
|
+
}, y = () => {
|
|
34
|
+
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
35
|
+
};
|
|
36
|
+
return w(async () => {
|
|
37
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
32
38
|
try {
|
|
33
|
-
const e = await
|
|
34
|
-
await
|
|
39
|
+
const e = await l();
|
|
40
|
+
await m(e);
|
|
35
41
|
} catch (e) {
|
|
36
42
|
console.error("Failed to initialize Stripo editor:", e);
|
|
37
43
|
}
|
|
38
|
-
|
|
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
|
+
}), C({
|
|
49
|
+
dynamicContent: {
|
|
50
|
+
insert: p,
|
|
51
|
+
close: y
|
|
52
|
+
}
|
|
53
|
+
}), { __sfc: !0, props: t, getPartnerName: o, getProductType: c, emailId: i, userId: a, guidoConfig: r, partnerName: s, productType: d, username: u, emit: n, initPlugin: m, getDefaultTemplate: l, insertDynamicContent: p, closeDynamicContent: y, HeaderWrapper: T };
|
|
39
54
|
}
|
|
40
55
|
});
|
|
41
56
|
export {
|
|
42
|
-
|
|
57
|
+
W as default
|
|
43
58
|
};
|
|
@@ -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
|
};
|