@useinsider/guido 1.0.0-beta.f2fcf4d → 1.0.0-beta.f47d56f
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 +177 -89
- package/dist/@types/generic.d.ts +11 -4
- package/dist/@types/http.d.ts +19 -0
- package/dist/components/Guido.vue.d.ts +6 -0
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +34 -15
- package/dist/components/organisms/{top-bar/Header.vue.js → header/HeaderWrapper.vue.js} +7 -7
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +14 -0
- package/dist/components/organisms/{top-bar/HeaderLeftSlot.vue.js → header/LeftSlot.vue.js} +7 -7
- package/dist/components/organisms/header/LeftSlot.vue2.js +11 -0
- package/dist/components/organisms/header/MiddleSlot.vue.d.ts +2 -0
- package/dist/components/organisms/header/MiddleSlot.vue.js +17 -0
- package/dist/components/organisms/header/MiddleSlot.vue2.js +20 -0
- package/dist/components/organisms/header/RightSlot.vue.d.ts +2 -0
- package/dist/components/organisms/header/RightSlot.vue.js +20 -0
- package/dist/components/organisms/header/RightSlot.vue2.js +24 -0
- package/dist/components/organisms/header/ViewOptions.vue.js +18 -0
- package/dist/components/organisms/header/ViewOptions.vue2.js +15 -0
- package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +2 -0
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +22 -0
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +15 -0
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +16 -0
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +18 -0
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue2.js +16 -0
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +18 -0
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +23 -0
- package/dist/composables/useActionsApi.d.ts +4 -0
- package/dist/composables/useActionsApi.js +36 -0
- package/dist/composables/useApiExample.d.ts +4 -6
- package/dist/composables/useExport.d.ts +3 -0
- package/dist/composables/useExport.js +30 -0
- package/dist/composables/useHttp.d.ts +1 -19
- package/dist/composables/useHttp.js +84 -0
- package/dist/composables/usePartner.d.ts +4 -0
- package/dist/composables/usePartner.js +16 -0
- package/dist/composables/useStripo.d.ts +2 -2
- package/dist/composables/useStripo.js +54 -48
- package/dist/composables/useTemplates.d.ts +1 -1
- package/dist/composables/useToaster.d.ts +1 -0
- package/dist/composables/useToaster.js +37 -0
- package/dist/composables/useTranslations.d.ts +1 -3
- package/dist/composables/useTranslations.js +18 -0
- package/dist/composables/useVersionHistoryApi.d.ts +8 -0
- package/dist/composables/useVersionHistoryApi.js +53 -0
- package/dist/enums/defaults.d.ts +4 -0
- package/dist/enums/defaults.js +8 -0
- package/dist/guido.css +1 -1
- package/dist/guido.png +0 -0
- package/dist/library.d.ts +1 -0
- package/dist/mock/api/custom-fonts.d.ts +2 -0
- package/dist/node_modules/lodash-es/_Hash.js +20 -0
- package/dist/node_modules/lodash-es/_ListCache.js +20 -0
- package/dist/node_modules/lodash-es/_Map.js +6 -0
- package/dist/node_modules/lodash-es/_MapCache.js +20 -0
- package/dist/node_modules/lodash-es/_Symbol.js +5 -0
- package/dist/node_modules/lodash-es/_assocIndexOf.js +10 -0
- package/dist/node_modules/lodash-es/_baseGetTag.js +10 -0
- package/dist/node_modules/lodash-es/_baseIsNative.js +16 -0
- package/dist/node_modules/lodash-es/_coreJsData.js +5 -0
- package/dist/node_modules/lodash-es/_freeGlobal.js +4 -0
- package/dist/node_modules/lodash-es/_getMapData.js +8 -0
- package/dist/node_modules/lodash-es/_getNative.js +9 -0
- package/dist/node_modules/lodash-es/_getRawTag.js +15 -0
- package/dist/node_modules/lodash-es/_getValue.js +6 -0
- package/dist/node_modules/lodash-es/_hashClear.js +7 -0
- package/dist/node_modules/lodash-es/_hashDelete.js +7 -0
- package/dist/node_modules/lodash-es/_hashGet.js +13 -0
- package/dist/node_modules/lodash-es/_hashHas.js +9 -0
- package/dist/node_modules/lodash-es/_hashSet.js +9 -0
- package/dist/node_modules/lodash-es/_isKeyable.js +7 -0
- package/dist/node_modules/lodash-es/_isMasked.js +11 -0
- package/dist/node_modules/lodash-es/_listCacheClear.js +6 -0
- package/dist/node_modules/lodash-es/_listCacheDelete.js +12 -0
- package/dist/node_modules/lodash-es/_listCacheGet.js +8 -0
- package/dist/node_modules/lodash-es/_listCacheHas.js +7 -0
- package/dist/node_modules/lodash-es/_listCacheSet.js +8 -0
- package/dist/node_modules/lodash-es/_mapCacheClear.js +13 -0
- package/dist/node_modules/lodash-es/_mapCacheDelete.js +8 -0
- package/dist/node_modules/lodash-es/_mapCacheGet.js +7 -0
- package/dist/node_modules/lodash-es/_mapCacheHas.js +7 -0
- package/dist/node_modules/lodash-es/_mapCacheSet.js +8 -0
- package/dist/node_modules/lodash-es/_nativeCreate.js +5 -0
- package/dist/node_modules/lodash-es/_objectToString.js +7 -0
- package/dist/node_modules/lodash-es/_root.js +5 -0
- package/dist/node_modules/lodash-es/_toSource.js +17 -0
- package/dist/node_modules/lodash-es/eq.js +6 -0
- package/dist/node_modules/lodash-es/isFunction.js +12 -0
- package/dist/node_modules/lodash-es/isObject.js +7 -0
- package/dist/node_modules/lodash-es/memoize.js +18 -0
- package/dist/services/stripoApi.d.ts +7 -0
- package/dist/services/stripoApi.js +29 -0
- package/dist/static/editor.css.js +72 -22
- package/dist/stores/editor.d.ts +5 -0
- package/dist/stores/editor.js +11 -0
- package/dist/stores/version-history.d.ts +80 -0
- package/dist/stores/version-history.js +28 -0
- package/dist/utils/dateUtil.d.ts +1 -0
- package/dist/utils/dateUtil.js +16 -0
- package/package.json +1 -1
- package/dist/components/organisms/top-bar/Header.vue2.js +0 -14
- package/dist/components/organisms/top-bar/HeaderLeftSlot.vue2.js +0 -11
- package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.js +0 -17
- package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue2.js +0 -11
- package/dist/components/organisms/top-bar/HeaderRightSlot.vue.js +0 -18
- package/dist/components/organisms/top-bar/HeaderRightSlot.vue2.js +0 -14
- package/dist/enums/defaults.enum.d.ts +0 -18
- package/dist/stores/counter.d.ts +0 -12
- /package/dist/components/organisms/{top-bar/Header.vue.d.ts → header/HeaderWrapper.vue.d.ts} +0 -0
- /package/dist/components/organisms/{top-bar/HeaderLeftSlot.vue.d.ts → header/LeftSlot.vue.d.ts} +0 -0
- /package/dist/components/organisms/{top-bar/HeaderMiddleSlot.vue.d.ts → header/ViewOptions.vue.d.ts} +0 -0
- /package/dist/components/organisms/{top-bar/HeaderRightSlot.vue.d.ts → header/version-history/ViewOptions.vue.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -1,25 +1,33 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://www.youtube.com/shorts/Y0RwBeMezL4" target="_blank" rel="noopener noreferrer">
|
|
3
|
+
<img width="180" src="./public/guido.png" alt="Guido logo">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
2
6
|
|
|
3
|
-
|
|
7
|
+
|
|
8
|
+
# @useinsider/guido
|
|
9
|
+
|
|
10
|
+
Guido is a Vue 2 + TypeScript wrapper for the Stripo Email Editor plugin. Easily embed the professional email editor in your Vue applications with a clean, customizable interface.
|
|
4
11
|
|
|
5
12
|
## 📦 Install
|
|
13
|
+
|
|
6
14
|
```bash
|
|
7
15
|
npm install @useinsider/guido
|
|
8
16
|
```
|
|
9
17
|
|
|
10
|
-
## 🚀 Usage
|
|
11
|
-
|
|
18
|
+
## 🚀 Usage
|
|
19
|
+
|
|
20
|
+
### Basic Usage
|
|
21
|
+
|
|
22
|
+
```html
|
|
12
23
|
<template>
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
@export:ready="handleHtml"
|
|
21
|
-
@close="onClose"
|
|
22
|
-
/>
|
|
24
|
+
<div>
|
|
25
|
+
<Guido
|
|
26
|
+
:email-id="emailId"
|
|
27
|
+
:user-id="userId"
|
|
28
|
+
:guido-config="guidoConfig"
|
|
29
|
+
/>
|
|
30
|
+
</div>
|
|
23
31
|
</template>
|
|
24
32
|
|
|
25
33
|
<script lang="ts">
|
|
@@ -31,99 +39,179 @@ export default {
|
|
|
31
39
|
},
|
|
32
40
|
data() {
|
|
33
41
|
return {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
footer: '/api/footer',
|
|
39
|
-
productName: '/api/product-name',
|
|
40
|
-
productVersion: '/api/product-version',
|
|
41
|
-
token: '/api/stripo-token'
|
|
42
|
-
},
|
|
43
|
-
extensions: {
|
|
44
|
-
dynamicContent: true,
|
|
45
|
-
unsubPages: true,
|
|
46
|
-
header: false,
|
|
47
|
-
footer: false
|
|
42
|
+
emailId: 'abc123',
|
|
43
|
+
userId: '12345',
|
|
44
|
+
guidoConfig: {
|
|
45
|
+
translationsPath: 'window.trans.en'
|
|
48
46
|
}
|
|
49
47
|
};
|
|
50
|
-
},
|
|
51
|
-
methods: {
|
|
52
|
-
handleSave(data: any) {
|
|
53
|
-
console.log('Saved:', data);
|
|
54
|
-
},
|
|
55
|
-
handleHtml({ html }: { html: string }) {
|
|
56
|
-
console.log('HTML ready:', html);
|
|
57
|
-
},
|
|
58
|
-
onExportRequested() {
|
|
59
|
-
console.log('Export started');
|
|
60
|
-
},
|
|
61
|
-
onClose() {
|
|
62
|
-
console.log('Closed');
|
|
63
|
-
}
|
|
64
48
|
}
|
|
65
49
|
};
|
|
66
50
|
</script>
|
|
67
51
|
```
|
|
68
52
|
|
|
69
53
|
## 📚 API
|
|
70
|
-
### `<StripoEditor />` Props
|
|
71
|
-
| Prop | Type | Required | Description |
|
|
72
|
-
|-------------|----------|----------|----------------------------|
|
|
73
|
-
| emailId | string | ✅ | Stripo email draft ID |
|
|
74
|
-
| iframeId | string | ❌ | Custom iframe ID |
|
|
75
|
-
| api | object | ❌ | Custom API endpoints |
|
|
76
|
-
| extensions | object | ❌ | Enable/disable extensions |
|
|
77
|
-
| insiderStripoConfig | object | ❌ | Insider Stripo configuration |
|
|
78
|
-
|
|
79
|
-
### Extensions
|
|
80
|
-
| Extension | Type | Default | Description |
|
|
81
|
-
|----------------|-----------|---------|--------------------------------|
|
|
82
|
-
| dynamicContent | boolean | true | Dynamic content functionality |
|
|
83
|
-
| unsubPages | boolean | true | Unsubscribe pages feature |
|
|
84
|
-
| header | boolean | true | Header customization |
|
|
85
|
-
| footer | boolean | true | Footer customization |
|
|
86
|
-
|
|
87
|
-
### Insider Stripo Configuration
|
|
88
|
-
| Property | Type | Default | Description |
|
|
89
|
-
|-------------------|----------|---------|--------------------------------|
|
|
90
|
-
| translationsPath | string | 'window.trans.en | JS Path to translations file |
|
|
91
|
-
|
|
92
|
-
### API Endpoints
|
|
93
|
-
| Endpoint | Default Path | Description |
|
|
94
|
-
|-------------------|------------------------|--------------------------------|
|
|
95
|
-
| dynamicContent | /api/dynamic-content | Dynamic content endpoint |
|
|
96
|
-
| unsubPages | /api/unsub-pages | Unsubscribe pages endpoint |
|
|
97
|
-
| header | /api/header | Header endpoint |
|
|
98
|
-
| footer | /api/footer | Footer endpoint |
|
|
99
|
-
| productName | /api/product-name | Product name endpoint |
|
|
100
|
-
| productVersion | /api/product-version | Product version endpoint |
|
|
101
|
-
| token | /api/stripo-token | Authentication token endpoint |
|
|
102
|
-
|
|
103
|
-
### Events
|
|
104
|
-
| Event | Payload | Description |
|
|
105
|
-
|-------------------|------------------------|--------------------------------|
|
|
106
|
-
| `save` | any | Triggered on save |
|
|
107
|
-
| `export:requested`| void | Triggered when export starts |
|
|
108
|
-
| `export:ready` | { html: string } | Triggered when HTML is ready |
|
|
109
|
-
| `close` | void | Triggered when editor closes |
|
|
110
54
|
|
|
55
|
+
### Guido Component Props
|
|
56
|
+
|
|
57
|
+
| Prop | Type | Required | Default | Description |
|
|
58
|
+
|------|------|----------|---------|-------------|
|
|
59
|
+
| `emailId` | `string` | ✅ | - | Unique identifier for the email draft |
|
|
60
|
+
| `userId` | `string` | ✅ | - | Unique identifier for the user draft |
|
|
61
|
+
| `username` | `string` | ⚪ | Guido User | User name |
|
|
62
|
+
| `partnerName` | `string` | ⚪ | Getting from URL host | Unique identifier for the partner draft |
|
|
63
|
+
| `productType` | `string` | ⚪ | Getting from URL path | Unique identifier for the product draft |
|
|
64
|
+
| `guidoConfig` | `GuidoConfig` | ✅ | - | Configuration object for the editor |
|
|
65
|
+
|
|
66
|
+
### GuidoConfig Interface
|
|
67
|
+
|
|
68
|
+
```typescript
|
|
69
|
+
interface GuidoConfig {
|
|
70
|
+
translationsPath: string;
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
| Property | Type | Default | Description |
|
|
75
|
+
|----------|------|---------|-------------|
|
|
76
|
+
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
77
|
+
|
|
78
|
+
### TypeScript Types
|
|
79
|
+
|
|
80
|
+
The library exports the following TypeScript types:
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
// Main component
|
|
84
|
+
import { Guido } from '@useinsider/guido';
|
|
85
|
+
|
|
86
|
+
// Types
|
|
87
|
+
import type { GuidoConfig } from '@useinsider/guido';
|
|
88
|
+
import type { StripoEventType } from '@useinsider/guido';
|
|
89
|
+
```
|
|
90
|
+
|
|
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
|
+
```
|
|
111
103
|
|
|
112
104
|
---
|
|
113
105
|
|
|
114
|
-
##
|
|
106
|
+
## 🔧 Development
|
|
107
|
+
|
|
108
|
+
### Prerequisites
|
|
109
|
+
|
|
110
|
+
- 🧄 `Bun` (strongly recommended)
|
|
111
|
+
or
|
|
112
|
+
- NodeJS 18+ & `npm`
|
|
113
|
+
|
|
114
|
+
### Setup
|
|
115
|
+
|
|
115
116
|
```bash
|
|
117
|
+
# Install dependencies
|
|
116
118
|
bun install
|
|
119
|
+
|
|
120
|
+
# Start development server
|
|
117
121
|
bun start
|
|
118
|
-
```
|
|
119
122
|
|
|
120
|
-
Build
|
|
121
|
-
```bash
|
|
123
|
+
# Build for production
|
|
122
124
|
bun run build
|
|
125
|
+
|
|
126
|
+
# Type checking
|
|
127
|
+
bun run type-check
|
|
128
|
+
|
|
129
|
+
# Linting
|
|
130
|
+
bun run lint
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Environment Variables
|
|
134
|
+
|
|
135
|
+
Create a `.env` file with the following variables: (You can get env variables from your senior)
|
|
136
|
+
|
|
137
|
+
```env
|
|
138
|
+
VITE_STRIPO_PLUGIN_ID=your_plugin_id
|
|
139
|
+
VITE_STRIPO_SECRET_KEY=your_secret_key
|
|
140
|
+
VITE_STRIPO_ROLE=your_role
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Project Structure
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
src/
|
|
147
|
+
├── components/ # Vue components
|
|
148
|
+
├── composables/ # Vue composables & business logic
|
|
149
|
+
├── services/ # API layer
|
|
150
|
+
├── stores/ # State management
|
|
151
|
+
├── @types/ # TypeScript definitions
|
|
152
|
+
├── static/ # Static assets & templates
|
|
153
|
+
├── utils/ # Utility functions
|
|
154
|
+
├── enums/ # Constants & enums
|
|
155
|
+
├── mock/ # Mock data for development
|
|
156
|
+
├── plugins/ # Vue plugins
|
|
157
|
+
└── library.ts # Main export
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## 🌐 i18n
|
|
161
|
+
Before running the project, it sends to request to inone.useinsider.com/translations and writes the JSON file into - [trans.json](src/mock/responses/trans.json).
|
|
162
|
+
It allows to use production or local translations on your code. 🚀
|
|
163
|
+
Example usage:
|
|
164
|
+
```js
|
|
165
|
+
import { useTranslations } from '@@/Composables/useTranslations';
|
|
166
|
+
|
|
167
|
+
const trans = useTranslations();
|
|
168
|
+
|
|
169
|
+
// use everywhere like this:
|
|
170
|
+
trans('foo.bar')
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## 📦 Build Output
|
|
174
|
+
|
|
175
|
+
The library builds to multiple formats:
|
|
176
|
+
|
|
177
|
+
- **ES Module**: `dist/library.js` (recommended)
|
|
178
|
+
- **CSS**: `dist/guido.css` (custom styles)
|
|
179
|
+
|
|
180
|
+
### Package Exports
|
|
181
|
+
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"exports": {
|
|
185
|
+
".": {
|
|
186
|
+
"import": "./dist/library.js",
|
|
187
|
+
"types": "./dist/components/Guido.vue.d.ts",
|
|
188
|
+
"require": "./dist/components/Guido.vue.js"
|
|
189
|
+
},
|
|
190
|
+
"./style": "./dist/guido.css"
|
|
191
|
+
}
|
|
192
|
+
}
|
|
123
193
|
```
|
|
124
194
|
|
|
195
|
+
## 🤝 Contributing
|
|
196
|
+
- PR Titles should be structured like `TASK-ID | 🔥 | Some Clear Task Descriptions`
|
|
197
|
+
- PR Labels should be filled.
|
|
198
|
+
- PR Assignee required.
|
|
199
|
+
- Tests should be covered.
|
|
200
|
+
- All required checks should be passed before sending review request.
|
|
201
|
+
|
|
202
|
+
## 📄 License
|
|
203
|
+
|
|
204
|
+
ISC License
|
|
205
|
+
|
|
125
206
|
---
|
|
126
207
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
[ ] -
|
|
208
|
+
## 🔗 Related
|
|
209
|
+
|
|
210
|
+
- [Stripo Email Editor](https://stripo.email/) - The underlying email editor
|
|
211
|
+
- [@useinsider/design-system-vue](https://github.com/useinsider/design-system-vue) - Insider's Vue design system
|
|
212
|
+
|
|
213
|
+
## 🎯 TODO:
|
|
214
|
+
- [editor.css](src/static/editor.css) should be optimized with variables & `sass-loader`.
|
|
215
|
+
- Master Version Generator should be fixed.
|
|
216
|
+
- Playwright integration
|
|
217
|
+
- Commitlint & Precommit Hooks integration
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
export type
|
|
2
|
-
[key: string]: string;
|
|
3
|
-
};
|
|
4
|
-
export type InsiderStripoConfig = {
|
|
1
|
+
export type GuidoConfig = {
|
|
5
2
|
translationsPath: string;
|
|
6
3
|
};
|
|
4
|
+
export interface User {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
email: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ApiResponse<T> {
|
|
10
|
+
data: T;
|
|
11
|
+
message: string;
|
|
12
|
+
success: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
2
|
+
export interface HttpOptions extends Omit<RequestInit, 'method' | 'body'> {
|
|
3
|
+
baseURL?: string;
|
|
4
|
+
timeout?: number;
|
|
5
|
+
retry?: number;
|
|
6
|
+
retryDelay?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface HttpResponse<T = unknown> {
|
|
9
|
+
data: T;
|
|
10
|
+
status: number;
|
|
11
|
+
statusText: string;
|
|
12
|
+
headers: Headers;
|
|
13
|
+
}
|
|
14
|
+
export interface HttpError {
|
|
15
|
+
message: string;
|
|
16
|
+
status?: number;
|
|
17
|
+
statusText?: string;
|
|
18
|
+
response?: Response;
|
|
19
|
+
}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
+
import type { GuidoConfig } from '@@/Types/generic';
|
|
1
2
|
type __VLS_Props = {
|
|
2
3
|
emailId: string;
|
|
4
|
+
userId: string;
|
|
5
|
+
partnerName?: string;
|
|
6
|
+
productType?: string;
|
|
7
|
+
username?: string;
|
|
8
|
+
guidoConfig: GuidoConfig;
|
|
3
9
|
};
|
|
4
10
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
5
11
|
export default _default;
|
|
@@ -2,17 +2,17 @@ import o from "./Guido.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
|
-
var
|
|
6
|
-
return r("div", { staticClass: "guido-
|
|
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
|
+
"d4a5c957"
|
|
14
14
|
);
|
|
15
|
-
const f =
|
|
15
|
+
const f = a.exports;
|
|
16
16
|
export {
|
|
17
17
|
f as default
|
|
18
18
|
};
|
|
@@ -1,24 +1,43 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
|
|
1
|
+
import { defineComponent as f, onMounted as c } from "vue";
|
|
2
|
+
import { usePartner as g } from "../composables/usePartner.js";
|
|
3
|
+
import { useStripo as _ } from "../composables/useStripo.js";
|
|
4
|
+
import { useTemplates as y } from "../composables/useTemplates.js";
|
|
5
|
+
import { DefaultUsername as C, DefaultGuidoConfig as T } from "../enums/defaults.js";
|
|
6
|
+
import w from "./organisms/header/HeaderWrapper.vue.js";
|
|
7
|
+
const h = /* @__PURE__ */ f({
|
|
6
8
|
__name: "Guido",
|
|
7
9
|
props: {
|
|
8
|
-
emailId: null
|
|
10
|
+
emailId: null,
|
|
11
|
+
userId: null,
|
|
12
|
+
partnerName: null,
|
|
13
|
+
productType: null,
|
|
14
|
+
username: null,
|
|
15
|
+
guidoConfig: null
|
|
9
16
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
|
|
17
|
+
setup(d) {
|
|
18
|
+
const o = d, { getPartnerName: r, getProductType: t } = g(), {
|
|
19
|
+
emailId: n,
|
|
20
|
+
userId: i,
|
|
21
|
+
guidoConfig: a,
|
|
22
|
+
partnerName: u = r(),
|
|
23
|
+
productType: p = t(),
|
|
24
|
+
username: m = C
|
|
25
|
+
} = o;
|
|
26
|
+
window.GuidoConfig = {
|
|
27
|
+
...T,
|
|
28
|
+
...a
|
|
29
|
+
};
|
|
30
|
+
const { initPlugin: l } = _({ emailId: n, userId: i, username: m, partnerName: u, productType: p }), { getDefaultTemplate: s } = y();
|
|
31
|
+
return c(async () => {
|
|
13
32
|
try {
|
|
14
|
-
const
|
|
15
|
-
await
|
|
16
|
-
} catch (
|
|
17
|
-
console.error("Failed to initialize Stripo editor:",
|
|
33
|
+
const e = await s();
|
|
34
|
+
await l(e);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
console.error("Failed to initialize Stripo editor:", e);
|
|
18
37
|
}
|
|
19
|
-
}), { __sfc: !0, props:
|
|
38
|
+
}), { __sfc: !0, props: o, getPartnerName: r, getProductType: t, emailId: n, userId: i, guidoConfig: a, partnerName: u, productType: p, username: m, initPlugin: l, getDefaultTemplate: s, HeaderWrapper: w };
|
|
20
39
|
}
|
|
21
40
|
});
|
|
22
41
|
export {
|
|
23
|
-
|
|
42
|
+
h as default
|
|
24
43
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import t from "./
|
|
1
|
+
import t from "./HeaderWrapper.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
3
|
+
var n = function() {
|
|
4
4
|
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
5
|
-
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.
|
|
6
|
-
},
|
|
5
|
+
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.LeftSlot), r(e.MiddleSlot), r(e.RightSlot)], 1)]);
|
|
6
|
+
}, a = [], _ = /* @__PURE__ */ s(
|
|
7
7
|
t,
|
|
8
|
-
a,
|
|
9
8
|
n,
|
|
9
|
+
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const d = _.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
d as default
|
|
17
17
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineComponent as o } from "vue";
|
|
2
|
+
import { InContainer as r } from "@useinsider/design-system-vue";
|
|
3
|
+
import t from "./LeftSlot.vue.js";
|
|
4
|
+
import e from "./MiddleSlot.vue.js";
|
|
5
|
+
import m from "./RightSlot.vue.js";
|
|
6
|
+
const s = /* @__PURE__ */ o({
|
|
7
|
+
__name: "HeaderWrapper",
|
|
8
|
+
setup(p) {
|
|
9
|
+
return { __sfc: !0, InContainer: r, LeftSlot: t, MiddleSlot: e, RightSlot: m };
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
s as default
|
|
14
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from "./LeftSlot.vue2.js";
|
|
2
2
|
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var _ = function() {
|
|
4
|
-
var t = this, e = t._self._c,
|
|
5
|
-
return e("div", [e(
|
|
6
|
-
},
|
|
7
|
-
|
|
4
|
+
var t = this, e = t._self._c, n = t._self._setupProxy;
|
|
5
|
+
return e("div", [e(n.InButtonV2, { attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" } })], 1);
|
|
6
|
+
}, s = [], a = /* @__PURE__ */ o(
|
|
7
|
+
r,
|
|
8
8
|
_,
|
|
9
|
-
|
|
9
|
+
s,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const i =
|
|
14
|
+
const i = a.exports;
|
|
15
15
|
export {
|
|
16
16
|
i as default
|
|
17
17
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
import { InButtonV2 as o } from "@useinsider/design-system-vue";
|
|
3
|
+
const _ = /* @__PURE__ */ t({
|
|
4
|
+
__name: "LeftSlot",
|
|
5
|
+
setup(e) {
|
|
6
|
+
return { __sfc: !0, InButtonV2: o };
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
_ as default
|
|
11
|
+
};
|
|
@@ -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,17 @@
|
|
|
1
|
+
import s from "./MiddleSlot.vue2.js";
|
|
2
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var i = function() {
|
|
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__ */ n(
|
|
7
|
+
s,
|
|
8
|
+
i,
|
|
9
|
+
l,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const _ = r.exports;
|
|
15
|
+
export {
|
|
16
|
+
_ as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
const _ = /* @__PURE__ */ r({
|
|
7
|
+
__name: "MiddleSlot",
|
|
8
|
+
setup(p) {
|
|
9
|
+
const o = n(), t = s();
|
|
10
|
+
return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
|
|
11
|
+
id: `${i}-tooltip`,
|
|
12
|
+
dynamicPosition: !1,
|
|
13
|
+
staticPosition: "bottom center",
|
|
14
|
+
iconStatus: !1
|
|
15
|
+
}), InButtonV2: e, VersionHistory: m };
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
_ as default
|
|
20
|
+
};
|
|
@@ -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,20 @@
|
|
|
1
|
+
import o from "./RightSlot.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var r = function() {
|
|
5
|
+
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "d-f header-right-slot" }, [e("div", { staticClass: "d-f" }, [t.editorStore.isVersionHistoryOpen ? e(t.VersionHistoryViewOptions) : e(t.ViewOptions)], 1), 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 } }), 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 } })], 1), t.editorStore.isVersionHistoryOpen ? e(t.InButtonV2, { attrs: { id: "guido__restore-button", "label-text": "Restore" }, on: { click: function(d) {
|
|
7
|
+
return t.restoreVersion(t.versionHistoryStore.currentPatch.id);
|
|
8
|
+
} } }) : e(t.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save" } })], 1);
|
|
9
|
+
}, n = [], a = /* @__PURE__ */ i(
|
|
10
|
+
o,
|
|
11
|
+
r,
|
|
12
|
+
n,
|
|
13
|
+
!1,
|
|
14
|
+
null,
|
|
15
|
+
"fefca98f"
|
|
16
|
+
);
|
|
17
|
+
const f = a.exports;
|
|
18
|
+
export {
|
|
19
|
+
f as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineComponent as n } from "vue";
|
|
2
|
+
import { useExport as m } from "../../../composables/useExport.js";
|
|
3
|
+
import { useVersionHistoryApi as p } from "../../../composables/useVersionHistoryApi.js";
|
|
4
|
+
import { useEditorStore as f } from "../../../stores/editor.js";
|
|
5
|
+
import { useVersionHistoryStore as V } from "../../../stores/version-history.js";
|
|
6
|
+
import { InButtonV2 as u } from "@useinsider/design-system-vue";
|
|
7
|
+
import H from "./version-history/ViewOptions.vue.js";
|
|
8
|
+
import c from "./ViewOptions.vue.js";
|
|
9
|
+
const E = /* @__PURE__ */ n({
|
|
10
|
+
__name: "RightSlot",
|
|
11
|
+
setup(y) {
|
|
12
|
+
const { exportHtml: e } = m(), { openVersionHistory: o, closeVersionHistory: r, restoreVersion: i } = p(), t = f(), s = V();
|
|
13
|
+
return { __sfc: !0, exportHtml: e, openVersionHistory: o, closeVersionHistory: r, restoreVersion: i, editorStore: t, versionHistoryStore: s, handleVersionHistory: () => {
|
|
14
|
+
if (t.isVersionHistoryOpen) {
|
|
15
|
+
r();
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
o();
|
|
19
|
+
}, InButtonV2: u, VersionHistoryViewOptions: H, ViewOptions: c };
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
E as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import r from "./ViewOptions.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
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": "", "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
|
|
7
|
+
}, i = [], _ = /* @__PURE__ */ s(
|
|
8
|
+
r,
|
|
9
|
+
n,
|
|
10
|
+
i,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"0fff376c"
|
|
14
|
+
);
|
|
15
|
+
const l = _.exports;
|
|
16
|
+
export {
|
|
17
|
+
l as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
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({
|
|
5
|
+
__name: "ViewOptions",
|
|
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 };
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
u 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;
|