@useinsider/guido 1.0.0-beta.e239762 → 1.0.0-beta.e40480e

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.
Files changed (102) hide show
  1. package/README.md +178 -89
  2. package/dist/@types/generic.d.ts +1 -4
  3. package/dist/components/Guido.vue.d.ts +2 -0
  4. package/dist/components/Guido.vue.js +6 -6
  5. package/dist/components/Guido.vue2.js +20 -13
  6. package/dist/components/organisms/{top-bar/Header.vue.js → header/HeaderWrapper.vue.js} +7 -7
  7. package/dist/components/organisms/header/HeaderWrapper.vue2.js +14 -0
  8. package/dist/components/organisms/{top-bar/HeaderLeftSlot.vue.js → header/LeftSlot.vue.js} +7 -7
  9. package/dist/components/organisms/header/LeftSlot.vue2.js +11 -0
  10. package/dist/components/organisms/header/MiddleSlot.vue.d.ts +2 -0
  11. package/dist/components/organisms/header/MiddleSlot.vue.js +17 -0
  12. package/dist/components/organisms/header/MiddleSlot.vue2.js +20 -0
  13. package/dist/components/organisms/header/RightSlot.vue.d.ts +2 -0
  14. package/dist/components/organisms/header/RightSlot.vue.js +20 -0
  15. package/dist/components/organisms/header/RightSlot.vue2.js +24 -0
  16. package/dist/components/organisms/header/ViewOptions.vue.js +18 -0
  17. package/dist/components/organisms/header/ViewOptions.vue2.js +15 -0
  18. package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +2 -0
  19. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +22 -0
  20. package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +15 -0
  21. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +16 -0
  22. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +18 -0
  23. package/dist/components/organisms/header/version-history/VersionHistoryItem.vue2.js +16 -0
  24. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +18 -0
  25. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +23 -0
  26. package/dist/composables/useActionsApi.d.ts +4 -0
  27. package/dist/composables/useActionsApi.js +36 -0
  28. package/dist/composables/useExport.d.ts +3 -0
  29. package/dist/composables/useExport.js +30 -0
  30. package/dist/composables/useStripo.d.ts +1 -1
  31. package/dist/composables/useStripo.js +41 -26
  32. package/dist/composables/useTemplates.d.ts +1 -1
  33. package/dist/composables/useToaster.js +29 -0
  34. package/dist/composables/useTranslations.d.ts +1 -3
  35. package/dist/composables/useTranslations.js +18 -0
  36. package/dist/composables/useVersionHistoryApi.d.ts +8 -0
  37. package/dist/composables/useVersionHistoryApi.js +53 -0
  38. package/dist/enums/defaults.d.ts +2 -0
  39. package/dist/enums/defaults.js +6 -0
  40. package/dist/guido.css +1 -1
  41. package/dist/guido.png +0 -0
  42. package/dist/library.d.ts +1 -0
  43. package/dist/node_modules/lodash-es/_Hash.js +20 -0
  44. package/dist/node_modules/lodash-es/_ListCache.js +20 -0
  45. package/dist/node_modules/lodash-es/_Map.js +6 -0
  46. package/dist/node_modules/lodash-es/_MapCache.js +20 -0
  47. package/dist/node_modules/lodash-es/_Symbol.js +5 -0
  48. package/dist/node_modules/lodash-es/_assocIndexOf.js +10 -0
  49. package/dist/node_modules/lodash-es/_baseGetTag.js +10 -0
  50. package/dist/node_modules/lodash-es/_baseIsNative.js +16 -0
  51. package/dist/node_modules/lodash-es/_coreJsData.js +5 -0
  52. package/dist/node_modules/lodash-es/_freeGlobal.js +4 -0
  53. package/dist/node_modules/lodash-es/_getMapData.js +8 -0
  54. package/dist/node_modules/lodash-es/_getNative.js +9 -0
  55. package/dist/node_modules/lodash-es/_getRawTag.js +15 -0
  56. package/dist/node_modules/lodash-es/_getValue.js +6 -0
  57. package/dist/node_modules/lodash-es/_hashClear.js +7 -0
  58. package/dist/node_modules/lodash-es/_hashDelete.js +7 -0
  59. package/dist/node_modules/lodash-es/_hashGet.js +13 -0
  60. package/dist/node_modules/lodash-es/_hashHas.js +9 -0
  61. package/dist/node_modules/lodash-es/_hashSet.js +9 -0
  62. package/dist/node_modules/lodash-es/_isKeyable.js +7 -0
  63. package/dist/node_modules/lodash-es/_isMasked.js +11 -0
  64. package/dist/node_modules/lodash-es/_listCacheClear.js +6 -0
  65. package/dist/node_modules/lodash-es/_listCacheDelete.js +12 -0
  66. package/dist/node_modules/lodash-es/_listCacheGet.js +8 -0
  67. package/dist/node_modules/lodash-es/_listCacheHas.js +7 -0
  68. package/dist/node_modules/lodash-es/_listCacheSet.js +8 -0
  69. package/dist/node_modules/lodash-es/_mapCacheClear.js +13 -0
  70. package/dist/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  71. package/dist/node_modules/lodash-es/_mapCacheGet.js +7 -0
  72. package/dist/node_modules/lodash-es/_mapCacheHas.js +7 -0
  73. package/dist/node_modules/lodash-es/_mapCacheSet.js +8 -0
  74. package/dist/node_modules/lodash-es/_nativeCreate.js +5 -0
  75. package/dist/node_modules/lodash-es/_objectToString.js +7 -0
  76. package/dist/node_modules/lodash-es/_root.js +5 -0
  77. package/dist/node_modules/lodash-es/_toSource.js +17 -0
  78. package/dist/node_modules/lodash-es/eq.js +6 -0
  79. package/dist/node_modules/lodash-es/isFunction.js +12 -0
  80. package/dist/node_modules/lodash-es/isObject.js +7 -0
  81. package/dist/node_modules/lodash-es/memoize.js +18 -0
  82. package/dist/node_modules/pinia/dist/pinia.js +317 -0
  83. package/dist/node_modules/pinia/node_modules/vue-demi/lib/index.js +11 -0
  84. package/dist/stores/editor.d.ts +5 -0
  85. package/dist/stores/editor.js +11 -0
  86. package/dist/stores/version-history.d.ts +80 -0
  87. package/dist/stores/version-history.js +28 -0
  88. package/dist/utils/dateUtil.d.ts +1 -0
  89. package/dist/utils/dateUtil.js +16 -0
  90. package/package.json +1 -1
  91. package/dist/components/organisms/top-bar/Header.vue2.js +0 -14
  92. package/dist/components/organisms/top-bar/HeaderLeftSlot.vue2.js +0 -11
  93. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.js +0 -17
  94. package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue2.js +0 -11
  95. package/dist/components/organisms/top-bar/HeaderRightSlot.vue.js +0 -18
  96. package/dist/components/organisms/top-bar/HeaderRightSlot.vue2.js +0 -14
  97. package/dist/enums/defaults.enum.d.ts +0 -18
  98. package/dist/stores/counter.d.ts +0 -12
  99. /package/dist/components/organisms/{top-bar/Header.vue.d.ts → header/HeaderWrapper.vue.d.ts} +0 -0
  100. /package/dist/components/organisms/{top-bar/HeaderLeftSlot.vue.d.ts → header/LeftSlot.vue.d.ts} +0 -0
  101. /package/dist/components/organisms/{top-bar/HeaderMiddleSlot.vue.d.ts → header/ViewOptions.vue.d.ts} +0 -0
  102. /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,32 @@
1
- # @useinsider/guido-plugin
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
- Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.
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 (Vue 2)
11
- ```vue
18
+ ## 🚀 Usage
19
+
20
+ ### Basic Usage
21
+
22
+ ```html
12
23
  <template>
13
- <Guido
14
- email-id="abc123"
15
- :api="apiEndpoints"
16
- :extensions="extensions"
17
- :insider-stripo-config="insiderStripoConfig"
18
- @save="handleSave"
19
- @export:requested="onExportRequested"
20
- @export:ready="handleHtml"
21
- @close="onClose"
22
- />
24
+ <div>
25
+ <Guido
26
+ :email-id="emailId"
27
+ :guido-config="guidoConfig"
28
+ />
29
+ </div>
23
30
  </template>
24
31
 
25
32
  <script lang="ts">
@@ -31,99 +38,181 @@ export default {
31
38
  },
32
39
  data() {
33
40
  return {
34
- apiEndpoints: {
35
- dynamicContent: '/api/dynamic-content',
36
- unsubPages: '/api/unsub-pages',
37
- header: '/api/header',
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
41
+ emailId: 'abc123',
42
+ guidoConfig: {
43
+ translationsPath: 'window.trans.en'
48
44
  }
49
45
  };
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
46
  }
65
47
  };
66
48
  </script>
67
49
  ```
68
50
 
69
51
  ## 📚 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
52
 
53
+ ### Guido Component Props
54
+
55
+ | Prop | Type | Required | Default | Description |
56
+ |------|------|----------|---------|-------------|
57
+ | `emailId` | `string` | ✅ | - | Unique identifier for the email draft |
58
+ | `guidoConfig` | `GuidoConfig` | ✅ | - | Configuration object for the editor |
59
+
60
+ ### GuidoConfig Interface
61
+
62
+ ```typescript
63
+ interface GuidoConfig {
64
+ translationsPath: string;
65
+ }
66
+ ```
67
+
68
+ | Property | Type | Default | Description |
69
+ |----------|------|---------|-------------|
70
+ | `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
71
+
72
+ ### TypeScript Types
73
+
74
+ The library exports the following TypeScript types:
75
+
76
+ ```typescript
77
+ // Main component
78
+ import { Guido } from '@useinsider/guido';
79
+
80
+ // Types
81
+ import type { GuidoConfig } from '@useinsider/guido';
82
+ import type { StripoEventType } from '@useinsider/guido';
83
+ ```
84
+
85
+ ### StripoEventType
86
+
87
+ ```typescript
88
+ type StripoEventType =
89
+ | 'save'
90
+ | 'export'
91
+ | 'close'
92
+ | 'autosave'
93
+ | 'publish'
94
+ | 'export:requested'
95
+ | 'export:ready';
96
+ ```
111
97
 
112
98
  ---
113
99
 
114
- ## 🛠 Development
100
+ ## 🔧 Development
101
+
102
+ ### Prerequisites
103
+
104
+ - 🧄 `Bun` (strongly recommended)
105
+ or
106
+ - NodeJS 18+ & `npm`
107
+
108
+ ### Setup
109
+
115
110
  ```bash
111
+ # Install dependencies
116
112
  bun install
113
+
114
+ # Start development server
117
115
  bun start
118
- ```
119
116
 
120
- Build & types:
121
- ```bash
117
+ # Build for production
122
118
  bun run build
119
+
120
+ # Type checking
121
+ bun run type-check
122
+
123
+ # Linting
124
+ bun run lint
125
+ ```
126
+
127
+ ### Environment Variables
128
+
129
+ Create a `.env` file with the following variables: (You can get env variables from your senior)
130
+
131
+ ```env
132
+ VITE_STRIPO_PLUGIN_ID=your_plugin_id
133
+ VITE_STRIPO_SECRET_KEY=your_secret_key
134
+ VITE_STRIPO_ROLE=your_role
135
+ ```
136
+
137
+ ### Project Structure
138
+
139
+ ```
140
+ src/
141
+ ├── components/
142
+ │ ├── Guido.vue # Main component
143
+ │ └── organisms/
144
+ │ └── header/ # Header components
145
+ │ └── version-history/ # Version History components
146
+ ...
147
+ ├── composables/
148
+ │ ├── useStripo.ts # Stripo integration
149
+ │ └── useTranslations.ts # Translation management
150
+ ├── @types/
151
+ │ ├── generic.ts # Generic types
152
+ │ ├── stripo.d.ts # Stripo-specific types
153
+ │ └── events.ts # Event types
154
+ ├── static/
155
+ │ ├── editor.css # Custom editor styles
156
+ │ └── templates/
157
+ │ └── default/ # Default email template
158
+ └── library.ts # Main export for library
159
+ ```
160
+
161
+ ## 🌐 i18n
162
+ 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).
163
+ It allows to use production or local translations on your code. 🚀
164
+ Example usage:
165
+ ```js
166
+ import { useTranslations } from '@@/Composables/useTranslations';
167
+
168
+ const trans = useTranslations();
169
+
170
+ // use everywhere like this:
171
+ trans('foo.bar')
172
+ ```
173
+
174
+ ## 📦 Build Output
175
+
176
+ The library builds to multiple formats:
177
+
178
+ - **ES Module**: `dist/library.js` (recommended)
179
+ - **CSS**: `dist/guido.css` (custom styles)
180
+
181
+ ### Package Exports
182
+
183
+ ```json
184
+ {
185
+ "exports": {
186
+ ".": {
187
+ "import": "./dist/library.js",
188
+ "types": "./dist/components/Guido.vue.d.ts",
189
+ "require": "./dist/components/Guido.vue.js"
190
+ },
191
+ "./style": "./dist/guido.css"
192
+ }
193
+ }
123
194
  ```
124
195
 
196
+ ## 🤝 Contributing
197
+ - PR Titles should be structured like `TASK-ID | 🔥 | Some Clear Task Descriptions`
198
+ - PR Labels should be filled.
199
+ - PR Assignee required.
200
+ - Tests should be covered.
201
+ - All required checks should be passed before sending review request.
202
+
203
+ ## 📄 License
204
+
205
+ ISC License
206
+
125
207
  ---
126
208
 
127
- TODO:
128
- [ ] - Default Template @edugencioglu
129
- [ ] - Using CSS variables into [editor.css](./src/static/editor.css) @berkansezer-useinsider
209
+ ## 🔗 Related
210
+
211
+ - [Stripo Email Editor](https://stripo.email/) - The underlying email editor
212
+ - [@useinsider/design-system-vue](https://github.com/useinsider/design-system-vue) - Insider's Vue design system
213
+
214
+ ## 🎯 TODO:
215
+ - [editor.css](src/static/editor.css) should be optimized with variables & `sass-loader`.
216
+ - Master Version Generator should be fixed.
217
+ - Playwright integration
218
+ - Commitlint & Precommit Hooks integration
@@ -1,6 +1,3 @@
1
- export type Translations = {
2
- [key: string]: string;
3
- };
4
- export type InsiderStripoConfig = {
1
+ export type GuidoConfig = {
5
2
  translationsPath: string;
6
3
  };
@@ -1,5 +1,7 @@
1
+ import type { GuidoConfig } from '@@/Types/generic';
1
2
  type __VLS_Props = {
2
3
  emailId: string;
4
+ guidoConfig: GuidoConfig;
3
5
  };
4
6
  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
7
  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 t = this, r = t._self._c, e = t._self._setupProxy;
6
- return r("div", { staticClass: "guido-editor-wrapper" }, [r(e.Header), r("div", { staticClass: "guido-editor-container", attrs: { id: "guido-editor" } })], 1);
7
- }, a = [], n = /* @__PURE__ */ i(
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
- a,
10
+ _,
11
11
  !1,
12
12
  null,
13
- "c14163ad"
13
+ "3da1d904"
14
14
  );
15
- const f = n.exports;
15
+ const f = a.exports;
16
16
  export {
17
17
  f as default
18
18
  };
@@ -1,24 +1,31 @@
1
- import { defineComponent as a, onMounted as n } from "vue";
2
- import { useStripo as m } from "../composables/useStripo.js";
3
- import { useTemplates as p } from "../composables/useTemplates.js";
4
- import s from "./organisms/top-bar/Header.vue.js";
5
- const f = /* @__PURE__ */ a({
1
+ import { defineComponent as n, onMounted as a } from "vue";
2
+ import { useStripo as p } from "../composables/useStripo.js";
3
+ import { useTemplates as m } from "../composables/useTemplates.js";
4
+ import { DefaultGuidoConfig as u } from "../enums/defaults.js";
5
+ import l from "./organisms/header/HeaderWrapper.vue.js";
6
+ const _ = /* @__PURE__ */ n({
6
7
  __name: "Guido",
7
8
  props: {
8
- emailId: null
9
+ emailId: null,
10
+ guidoConfig: null
9
11
  },
10
- setup(i) {
11
- const e = i, { initPlugin: o } = m(e.emailId), { getDefaultTemplate: r } = p();
12
- return n(async () => {
12
+ setup(r) {
13
+ const o = r;
14
+ window.GuidoConfig = {
15
+ ...u,
16
+ ...o.guidoConfig
17
+ };
18
+ const { initPlugin: e } = p(o.emailId), { getDefaultTemplate: i } = m();
19
+ return a(async () => {
13
20
  try {
14
- const t = await r();
15
- await o(t);
21
+ const t = await i();
22
+ await e(t);
16
23
  } catch (t) {
17
24
  console.error("Failed to initialize Stripo editor:", t);
18
25
  }
19
- }), { __sfc: !0, props: e, initPlugin: o, getDefaultTemplate: r, Header: s };
26
+ }), { __sfc: !0, props: o, initPlugin: e, getDefaultTemplate: i, HeaderWrapper: l };
20
27
  }
21
28
  });
22
29
  export {
23
- f as default
30
+ _ as default
24
31
  };
@@ -1,17 +1,17 @@
1
- import t from "./Header.vue2.js";
1
+ import t from "./HeaderWrapper.vue2.js";
2
2
  import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var a = function() {
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.HeaderLeftSlot), r(e.HeaderMiddleSlot), r(e.HeaderRightSlot)], 1)]);
6
- }, n = [], _ = /* @__PURE__ */ s(
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 c = _.exports;
14
+ const d = _.exports;
15
15
  export {
16
- c as default
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 n from "./HeaderLeftSlot.vue2.js";
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, r = t._self._setupProxy;
5
- return e("div", [e(r.InButtonV2, { attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" } })], 1);
6
- }, a = [], s = /* @__PURE__ */ o(
7
- n,
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
- a,
9
+ s,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const i = s.exports;
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
+ "378010db"
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;
@@ -0,0 +1,22 @@
1
+ import o from "./VersionHistory.vue2.js";
2
+ /* empty css */
3
+ import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
4
+ var n = function() {
5
+ var r = this, e = r._self._c, t = r._self._setupProxy;
6
+ return e("div", { staticClass: "version-history-wrapper d-f a-i-c f-g-1 mx-2" }, [e(t.VersionHistoryItem, { attrs: { "text-align": "right", date: t.versionHistoryStore.previousPatch.date, description: t.versionHistoryStore.previousPatch.description } }), e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasPreviousPatch, "label-text-status": !1 }, on: { click: function(s) {
7
+ return t.previewVersion(t.versionHistoryStore.previousPatch.id);
8
+ } } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasNextPatch, "label-text-status": !1 }, on: { click: function(s) {
9
+ return t.previewVersion(t.versionHistoryStore.nextPatch.id);
10
+ } } })], 1), e(t.VersionHistoryItem, { attrs: { "text-align": "left", date: t.versionHistoryStore.nextPatch.date, description: t.versionHistoryStore.nextPatch.description } })], 1);
11
+ }, a = [], c = /* @__PURE__ */ i(
12
+ o,
13
+ n,
14
+ a,
15
+ !1,
16
+ null,
17
+ "187d41fa"
18
+ );
19
+ const p = c.exports;
20
+ export {
21
+ p as default
22
+ };
@@ -0,0 +1,15 @@
1
+ import { defineComponent as t } from "vue";
2
+ import { useVersionHistoryApi as e } from "../../../../composables/useVersionHistoryApi.js";
3
+ import { useVersionHistoryStore as s } from "../../../../stores/version-history.js";
4
+ import { InButtonV2 as i } from "@useinsider/design-system-vue";
5
+ import n from "./VersionHistoryItem.vue.js";
6
+ const c = /* @__PURE__ */ t({
7
+ __name: "VersionHistory",
8
+ setup(m) {
9
+ const o = s(), { previewVersion: r } = e();
10
+ return { __sfc: !0, versionHistoryStore: o, previewVersion: r, InButtonV2: i, VersionHistoryItem: n };
11
+ }
12
+ });
13
+ export {
14
+ c as default
15
+ };