@useinsider/guido 1.0.0-beta.6ebce36 → 1.0.0-beta.6ecc044
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 +1 -191
- package/dist/@types/generic.d.ts +0 -3
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +26 -22
- package/dist/components/organisms/base/ModalWrapper.vue.d.ts +72 -0
- package/dist/components/organisms/base/ModalWrapper.vue.js +19 -0
- package/dist/components/organisms/base/ModalWrapper.vue2.js +43 -0
- 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 +3 -5
- package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
- package/dist/components/organisms/header/MiddleSlot.vue2.js +4 -6
- package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/components/organisms/header/RightSlot.vue.js +10 -7
- package/dist/components/organisms/header/RightSlot.vue2.js +19 -14
- package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +1 -13
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +10 -13
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.d.ts +20 -0
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +19 -0
- package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +66 -0
- package/dist/composables/useCustomInterfaceAppearance.js +9 -45
- package/dist/composables/useExport.d.ts +1 -1
- package/dist/composables/useExport.js +20 -35
- package/dist/composables/useStripo.js +8 -13
- package/dist/composables/useTemplateValidation.d.ts +13 -0
- package/dist/composables/useTemplateValidation.js +57 -0
- package/dist/guido.css +1 -1
- package/dist/mock/api/template-library.d.ts +2 -0
- package/dist/static/editor.css.js +232 -0
- package/dist/stores/editor.d.ts +1 -0
- package/dist/stores/editor.js +2 -1
- package/package.json +1 -1
- package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +0 -2
- package/dist/components/organisms/header/version-history/RestoreButton.vue.js +0 -19
- package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +0 -14
- package/dist/composables/useHtmlCompiler.d.ts +0 -4
- package/dist/composables/useHtmlCompiler.js +0 -16
- package/dist/config/compiler/htmlCompilerRules.d.ts +0 -2
- package/dist/config/compiler/htmlCompilerRules.js +0 -145
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
- package/dist/enums/displayConditions.d.ts +0 -2
- package/dist/enums/displayConditions.js +0 -80
- package/dist/static/styles/base.css.js +0 -11
- package/dist/static/styles/components/alert-message.css.js +0 -39
- package/dist/static/styles/components/amp-block.css.js +0 -18
- package/dist/static/styles/components/base-input.css.js +0 -47
- package/dist/static/styles/components/button-group.css.js +0 -54
- package/dist/static/styles/components/button.css.js +0 -106
- package/dist/static/styles/components/combobox.css.js +0 -49
- package/dist/static/styles/components/counter.css.js +0 -42
- package/dist/static/styles/components/dropdown-menu.css.js +0 -52
- package/dist/static/styles/components/narrow-panel.css.js +0 -38
- package/dist/static/styles/components/switcher.css.js +0 -11
- package/dist/static/styles/components/tabs.css.js +0 -97
- package/dist/static/styles/components/tools.css.js +0 -23
- package/dist/static/styles/components/version-history.css.js +0 -30
- package/dist/static/styles/components/wide-panel.css.js +0 -135
- package/dist/static/styles/variables.css.js +0 -23
- package/dist/utils/htmlCompiler.d.ts +0 -12
- package/dist/utils/htmlCompiler.js +0 -70
package/README.md
CHANGED
|
@@ -43,8 +43,6 @@ export default {
|
|
|
43
43
|
userId: '12345',
|
|
44
44
|
guidoConfig: {
|
|
45
45
|
translationsPath: 'window.trans.en'
|
|
46
|
-
htmlCompilerRules: [],
|
|
47
|
-
ignoreDefaultHtmlCompilerRules: false,
|
|
48
46
|
}
|
|
49
47
|
};
|
|
50
48
|
}
|
|
@@ -70,16 +68,12 @@ export default {
|
|
|
70
68
|
```typescript
|
|
71
69
|
interface GuidoConfig {
|
|
72
70
|
translationsPath: string;
|
|
73
|
-
htmlCompilerRules: CompilerRule[];
|
|
74
|
-
ignoreDefaultHtmlCompilerRules: boolean;
|
|
75
71
|
}
|
|
76
72
|
```
|
|
77
73
|
|
|
78
74
|
| Property | Type | Default | Description |
|
|
79
75
|
|----------|------|---------|-------------|
|
|
80
76
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
81
|
-
| `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
|
|
82
|
-
| `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
|
|
83
77
|
|
|
84
78
|
### TypeScript Types
|
|
85
79
|
|
|
@@ -107,185 +101,6 @@ type StripoEventType =
|
|
|
107
101
|
| 'export:ready';
|
|
108
102
|
```
|
|
109
103
|
|
|
110
|
-
## 🔨 HTML Compiler Rules
|
|
111
|
-
|
|
112
|
-
Guido includes a powerful HTML compiler system that allows you to transform HTML content with custom rules. You can define additional rules and optionally ignore the default rules.
|
|
113
|
-
|
|
114
|
-
### Rule Types
|
|
115
|
-
|
|
116
|
-
There are 4 types of compiler rules:
|
|
117
|
-
|
|
118
|
-
#### 1. Replace Rule
|
|
119
|
-
Replace specific strings in HTML content.
|
|
120
|
-
|
|
121
|
-
```typescript
|
|
122
|
-
{
|
|
123
|
-
id: 'fix-encoding',
|
|
124
|
-
description: 'Fix URL encoding issues',
|
|
125
|
-
type: 'replace',
|
|
126
|
-
search: '{%22', // String to find
|
|
127
|
-
replacement: '%7B%22', // String to replace with
|
|
128
|
-
replaceAll: true, // Replace all occurrences (default: true)
|
|
129
|
-
priority: 10 // Execution priority (lower = earlier)
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
#### 2. Regex Rule
|
|
134
|
-
Use regular expressions for complex pattern matching and replacement.
|
|
135
|
-
|
|
136
|
-
```typescript
|
|
137
|
-
{
|
|
138
|
-
id: 'remove-comments',
|
|
139
|
-
description: 'Remove HTML comments',
|
|
140
|
-
type: 'regex',
|
|
141
|
-
pattern: '<!--.*?-->', // Regex pattern
|
|
142
|
-
replacement: '', // Replacement string
|
|
143
|
-
flags: 'g', // Regex flags (default: 'g')
|
|
144
|
-
priority: 20
|
|
145
|
-
}
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
#### 3. Remove Rule
|
|
149
|
-
Remove specific strings or patterns from HTML content.
|
|
150
|
-
|
|
151
|
-
```typescript
|
|
152
|
-
{
|
|
153
|
-
id: 'cleanup-scripts',
|
|
154
|
-
description: 'Remove unwanted script tags',
|
|
155
|
-
type: 'remove',
|
|
156
|
-
targets: [ // Array of strings or RegExp objects
|
|
157
|
-
'<script src="unwanted.js"></script>',
|
|
158
|
-
/onclick="[^"]*"/g
|
|
159
|
-
],
|
|
160
|
-
priority: 30
|
|
161
|
-
}
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
#### 4. Custom Rule
|
|
165
|
-
Define complex transformation logic with a custom processor function.
|
|
166
|
-
|
|
167
|
-
```typescript
|
|
168
|
-
{
|
|
169
|
-
id: 'add-meta-tags',
|
|
170
|
-
description: 'Add custom meta tags to head',
|
|
171
|
-
type: 'custom',
|
|
172
|
-
processor: (html: string): string => {
|
|
173
|
-
// Custom transformation logic
|
|
174
|
-
const metaTags = '<meta name="custom" content="value">';
|
|
175
|
-
return html.replace('</head>', `${metaTags}</head>`);
|
|
176
|
-
},
|
|
177
|
-
priority: 40
|
|
178
|
-
}
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
### Using HTML Compiler Rules
|
|
182
|
-
|
|
183
|
-
#### Basic Usage with Custom Rules
|
|
184
|
-
|
|
185
|
-
```typescript
|
|
186
|
-
const guidoConfig = {
|
|
187
|
-
translationsPath: 'window.trans.en',
|
|
188
|
-
htmlCompilerRules: [
|
|
189
|
-
{
|
|
190
|
-
id: 'replace-domain',
|
|
191
|
-
description: 'Replace old domain with new one',
|
|
192
|
-
type: 'replace',
|
|
193
|
-
search: 'old-domain.com',
|
|
194
|
-
replacement: 'new-domain.com',
|
|
195
|
-
replaceAll: true,
|
|
196
|
-
priority: 10
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
id: 'remove-tracking',
|
|
200
|
-
description: 'Remove tracking pixels',
|
|
201
|
-
type: 'regex',
|
|
202
|
-
pattern: '<img[^>]*tracking[^>]*>',
|
|
203
|
-
replacement: '',
|
|
204
|
-
flags: 'gi',
|
|
205
|
-
priority: 20
|
|
206
|
-
}
|
|
207
|
-
]
|
|
208
|
-
};
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
#### Ignoring Default Rules
|
|
212
|
-
|
|
213
|
-
```typescript
|
|
214
|
-
const guidoConfig = {
|
|
215
|
-
translationsPath: 'window.trans.en',
|
|
216
|
-
ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
|
|
217
|
-
htmlCompilerRules: [
|
|
218
|
-
// Only your custom rules will be applied
|
|
219
|
-
{
|
|
220
|
-
id: 'custom-transformation',
|
|
221
|
-
type: 'replace',
|
|
222
|
-
search: 'old-text',
|
|
223
|
-
replacement: 'new-text',
|
|
224
|
-
priority: 1
|
|
225
|
-
}
|
|
226
|
-
]
|
|
227
|
-
};
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
### Rule Execution Order
|
|
231
|
-
|
|
232
|
-
Rules are executed in priority order (lower numbers first). Rules with the same priority are executed in array order.
|
|
233
|
-
|
|
234
|
-
- **Priority 1-99**: Reserved for critical transformations
|
|
235
|
-
- **Priority 100-999**: Standard transformations
|
|
236
|
-
- **Priority 1000+**: Additional custom rules (automatically assigned)
|
|
237
|
-
|
|
238
|
-
### Default Rules
|
|
239
|
-
|
|
240
|
-
Guido includes several default rules for common email HTML optimizations:
|
|
241
|
-
|
|
242
|
-
- **URL encoding fixes**: Fixes malformed URL encoding in dynamic content
|
|
243
|
-
- **Template tag restoration**: Restores `{{}}` template tags that got URL encoded
|
|
244
|
-
- **HTML entity decoding**: Converts `<` and `>` back to `<` and `>`
|
|
245
|
-
- **Cleanup rules**: Removes unwanted iframe and style elements
|
|
246
|
-
- **MSO conditions**: Manages Outlook-specific conditional comments
|
|
247
|
-
- **Domain replacement**: Updates old image domains to current ones
|
|
248
|
-
|
|
249
|
-
You can view all default rules in: `src/config/compiler/htmlCompilerRules.ts`
|
|
250
|
-
|
|
251
|
-
### CompilerRule Interface
|
|
252
|
-
|
|
253
|
-
```typescript
|
|
254
|
-
type CompilerRuleType = 'replace' | 'regex' | 'remove' | 'custom';
|
|
255
|
-
|
|
256
|
-
interface BaseCompilerRule {
|
|
257
|
-
id: string;
|
|
258
|
-
description?: string;
|
|
259
|
-
priority: number;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
interface ReplaceRule extends BaseCompilerRule {
|
|
263
|
-
type: 'replace';
|
|
264
|
-
search: string;
|
|
265
|
-
replacement: string;
|
|
266
|
-
replaceAll?: boolean; // Default: true
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
interface RegexRule extends BaseCompilerRule {
|
|
270
|
-
type: 'regex';
|
|
271
|
-
pattern: string;
|
|
272
|
-
replacement: string;
|
|
273
|
-
flags?: string; // Default: 'g'
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
interface RemoveRule extends BaseCompilerRule {
|
|
277
|
-
type: 'remove';
|
|
278
|
-
targets: (string | RegExp)[]; // Array of strings or RegExp objects
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
interface CustomRule extends BaseCompilerRule {
|
|
282
|
-
type: 'custom';
|
|
283
|
-
processor: (html: string) => string;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
type CompilerRule = ReplaceRule | RegexRule | RemoveRule | CustomRule;
|
|
287
|
-
```
|
|
288
|
-
|
|
289
104
|
---
|
|
290
105
|
|
|
291
106
|
## 🔧 Development
|
|
@@ -396,12 +211,7 @@ ISC License
|
|
|
396
211
|
- [@useinsider/design-system-vue](https://github.com/useinsider/design-system-vue) - Insider's Vue design system
|
|
397
212
|
|
|
398
213
|
## 🎯 TODO:
|
|
399
|
-
-
|
|
214
|
+
- [editor.css](src/static/editor.css) should be optimized with variables & `sass-loader`.
|
|
400
215
|
- Master Version Generator should be fixed.
|
|
401
216
|
- Playwright integration
|
|
402
217
|
- Commitlint & Precommit Hooks integration
|
|
403
|
-
- We need to emit save event and we should return template config to it
|
|
404
|
-
- Default template should be same with production
|
|
405
|
-
- Open Guido with saved template
|
|
406
|
-
- Get User ID, Email and Unique Template ID as dynamic from props
|
|
407
|
-
- Get Pre-built display conditions from API
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import a from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
},
|
|
5
|
+
var t = this, e = t._self._c, r = t._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), e("div", { staticClass: "guido-editor__container", attrs: { id: "guido-editor" } }), e(r.SaveTemplateModal, { attrs: { "is-open": r.editorStore.isSaveTemplateModalOpen }, on: { close: r.handleCloseSaveTemplateModal } })], 1);
|
|
7
|
+
}, i = [], n = /* @__PURE__ */ a(
|
|
8
8
|
o,
|
|
9
9
|
s,
|
|
10
|
-
|
|
10
|
+
i,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"f20b186e"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const c = n.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
c as default
|
|
18
18
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePartner as
|
|
3
|
-
import { useStripo as
|
|
4
|
-
import { useTemplates as
|
|
5
|
-
import { DefaultUsername as
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { defineComponent as g, onMounted as T } from "vue";
|
|
2
|
+
import { usePartner as S } from "../composables/usePartner.js";
|
|
3
|
+
import { useStripo as C } from "../composables/useStripo.js";
|
|
4
|
+
import { useTemplates as _ } from "../composables/useTemplates.js";
|
|
5
|
+
import { DefaultUsername as y, DefaultGuidoConfig as w } from "../enums/defaults.js";
|
|
6
|
+
import I from "./organisms/header/HeaderWrapper.vue.js";
|
|
7
|
+
import M from "./organisms/save-template/SaveTemplateModal.vue.js";
|
|
8
|
+
import { useEditorStore as P } from "../stores/editor.js";
|
|
9
|
+
const F = /* @__PURE__ */ g({
|
|
8
10
|
__name: "Guido",
|
|
9
11
|
props: {
|
|
10
12
|
emailId: null,
|
|
@@ -14,30 +16,32 @@ const h = /* @__PURE__ */ f({
|
|
|
14
16
|
username: null,
|
|
15
17
|
guidoConfig: null
|
|
16
18
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const o =
|
|
19
|
-
emailId:
|
|
20
|
-
userId:
|
|
21
|
-
guidoConfig:
|
|
22
|
-
partnerName:
|
|
23
|
-
productType:
|
|
24
|
-
username:
|
|
19
|
+
setup(f) {
|
|
20
|
+
const o = f, { getPartnerName: t, getProductType: r } = S(), {
|
|
21
|
+
emailId: a,
|
|
22
|
+
userId: n,
|
|
23
|
+
guidoConfig: i,
|
|
24
|
+
partnerName: l = t(),
|
|
25
|
+
productType: m = r(),
|
|
26
|
+
username: p = y
|
|
25
27
|
} = o;
|
|
26
28
|
window.GuidoConfig = {
|
|
27
|
-
...
|
|
28
|
-
...
|
|
29
|
+
...w,
|
|
30
|
+
...i
|
|
29
31
|
};
|
|
30
|
-
const { initPlugin:
|
|
31
|
-
|
|
32
|
+
const { initPlugin: u } = C({ emailId: a, userId: n, username: p, partnerName: l, productType: m }), { getDefaultTemplate: s } = _(), d = P(), c = () => {
|
|
33
|
+
d.isSaveTemplateModalOpen = !1;
|
|
34
|
+
};
|
|
35
|
+
return T(async () => {
|
|
32
36
|
try {
|
|
33
37
|
const e = await s();
|
|
34
|
-
await
|
|
38
|
+
await u(e);
|
|
35
39
|
} catch (e) {
|
|
36
40
|
console.error("Failed to initialize Stripo editor:", e);
|
|
37
41
|
}
|
|
38
|
-
}), { __sfc: !0, props: o, getPartnerName:
|
|
42
|
+
}), { __sfc: !0, props: o, getPartnerName: t, getProductType: r, emailId: a, userId: n, guidoConfig: i, partnerName: l, productType: m, username: p, initPlugin: u, getDefaultTemplate: s, editorStore: d, handleCloseSaveTemplateModal: c, HeaderWrapper: I, SaveTemplateModal: M };
|
|
39
43
|
}
|
|
40
44
|
});
|
|
41
45
|
export {
|
|
42
|
-
|
|
46
|
+
F as default
|
|
43
47
|
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
interface ModalWrapperProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
size?: 'small' | 'medium' | 'large' | 'extra-large';
|
|
6
|
+
primaryButtonText?: string;
|
|
7
|
+
primaryButtonDisabled?: boolean;
|
|
8
|
+
primaryButtonLoading?: boolean;
|
|
9
|
+
cancelButtonText?: string;
|
|
10
|
+
showCancelButton?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
declare var __VLS_12: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_12) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ModalWrapperProps>, {
|
|
18
|
+
description: string;
|
|
19
|
+
size: string;
|
|
20
|
+
primaryButtonText: string;
|
|
21
|
+
primaryButtonDisabled: boolean;
|
|
22
|
+
primaryButtonLoading: boolean;
|
|
23
|
+
cancelButtonText: string;
|
|
24
|
+
showCancelButton: boolean;
|
|
25
|
+
className: string;
|
|
26
|
+
}>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
|
|
27
|
+
close: () => void;
|
|
28
|
+
save: () => void;
|
|
29
|
+
cancel: () => void;
|
|
30
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ModalWrapperProps>, {
|
|
31
|
+
description: string;
|
|
32
|
+
size: string;
|
|
33
|
+
primaryButtonText: string;
|
|
34
|
+
primaryButtonDisabled: boolean;
|
|
35
|
+
primaryButtonLoading: boolean;
|
|
36
|
+
cancelButtonText: string;
|
|
37
|
+
showCancelButton: boolean;
|
|
38
|
+
className: string;
|
|
39
|
+
}>>>, {
|
|
40
|
+
className: string;
|
|
41
|
+
size: "small" | "medium" | "large" | "extra-large";
|
|
42
|
+
description: string;
|
|
43
|
+
primaryButtonText: string;
|
|
44
|
+
primaryButtonDisabled: boolean;
|
|
45
|
+
primaryButtonLoading: boolean;
|
|
46
|
+
cancelButtonText: string;
|
|
47
|
+
showCancelButton: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
50
|
+
export default _default;
|
|
51
|
+
type __VLS_WithDefaults<P, D> = {
|
|
52
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
53
|
+
default: D[K];
|
|
54
|
+
}> : P[K];
|
|
55
|
+
};
|
|
56
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
57
|
+
type __VLS_TypePropsToOption<T> = {
|
|
58
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
59
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
60
|
+
} : {
|
|
61
|
+
type: import('vue').PropType<T[K]>;
|
|
62
|
+
required: true;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
66
|
+
new (): {
|
|
67
|
+
$scopedSlots: S;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
type __VLS_PrettifyLocal<T> = {
|
|
71
|
+
[K in keyof T]: T[K];
|
|
72
|
+
} & {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import r from "./ModalWrapper.vue2.js";
|
|
2
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var s = function() {
|
|
4
|
+
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
5
|
+
return n(e.InDrawer, { attrs: { id: `drawer-${Math.random().toString(36).substr(2, 9)}`, "description-text": t.description, "footer-button-group-options": e.drawerFooterOptions, size: t.size, status: t.isOpen, "title-text": t.title }, on: { cancelOrBackButtonEvent: e.handleCancel, onCloseEvent: e.handleClose, primaryButtonEvent: e.handleSave }, scopedSlots: t._u([{ key: "contentSlot", fn: function() {
|
|
6
|
+
return [n("div", { staticClass: "modal-content-wrapper", class: t.className }, [t._t("default")], 2)];
|
|
7
|
+
}, proxy: !0 }], null, !0) });
|
|
8
|
+
}, a = [], l = /* @__PURE__ */ o(
|
|
9
|
+
r,
|
|
10
|
+
s,
|
|
11
|
+
a,
|
|
12
|
+
!1,
|
|
13
|
+
null,
|
|
14
|
+
null
|
|
15
|
+
);
|
|
16
|
+
const u = l.exports;
|
|
17
|
+
export {
|
|
18
|
+
u as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineComponent as o, computed as l } from "vue";
|
|
2
|
+
import { InDrawer as r } from "@useinsider/design-system-vue";
|
|
3
|
+
const i = /* @__PURE__ */ o({
|
|
4
|
+
__name: "ModalWrapper",
|
|
5
|
+
props: {
|
|
6
|
+
isOpen: { type: Boolean },
|
|
7
|
+
title: null,
|
|
8
|
+
description: { default: "" },
|
|
9
|
+
size: { default: "medium" },
|
|
10
|
+
primaryButtonText: { default: "Save" },
|
|
11
|
+
primaryButtonDisabled: { type: Boolean, default: !1 },
|
|
12
|
+
primaryButtonLoading: { type: Boolean, default: !1 },
|
|
13
|
+
cancelButtonText: { default: "Cancel" },
|
|
14
|
+
showCancelButton: { type: Boolean, default: !0 },
|
|
15
|
+
className: { default: "" }
|
|
16
|
+
},
|
|
17
|
+
emits: ["close", "save", "cancel"],
|
|
18
|
+
setup(a, { emit: t }) {
|
|
19
|
+
const e = a, n = l(() => ({
|
|
20
|
+
primaryButton: {
|
|
21
|
+
styling: "solid",
|
|
22
|
+
type: "primary",
|
|
23
|
+
labelText: e.primaryButtonText,
|
|
24
|
+
disabled: e.primaryButtonDisabled || e.primaryButtonLoading
|
|
25
|
+
},
|
|
26
|
+
cancelOrBackButton: e.showCancelButton ? {
|
|
27
|
+
type: "secondary",
|
|
28
|
+
styling: "ghost",
|
|
29
|
+
labelText: e.cancelButtonText
|
|
30
|
+
} : void 0
|
|
31
|
+
}));
|
|
32
|
+
return { __sfc: !0, props: e, emit: t, drawerFooterOptions: n, handleClose: () => {
|
|
33
|
+
t("close");
|
|
34
|
+
}, handleSave: () => {
|
|
35
|
+
t("save");
|
|
36
|
+
}, handleCancel: () => {
|
|
37
|
+
t("cancel");
|
|
38
|
+
}, InDrawer: r };
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
export {
|
|
42
|
+
i as default
|
|
43
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options
|
|
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<{}>>, {}>;
|
|
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",
|
|
6
|
-
},
|
|
3
|
+
var _ = function() {
|
|
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
7
|
r,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
_,
|
|
9
|
+
s,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const i = a.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
i as default
|
|
17
17
|
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { defineComponent as t } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { InButtonV2 as r } from "@useinsider/design-system-vue";
|
|
4
|
-
import e from "./version-history/RestoreButton.vue.js";
|
|
2
|
+
import { InButtonV2 as o } from "@useinsider/design-system-vue";
|
|
5
3
|
const _ = /* @__PURE__ */ t({
|
|
6
4
|
__name: "LeftSlot",
|
|
7
|
-
setup(
|
|
8
|
-
return { __sfc: !0,
|
|
5
|
+
setup(e) {
|
|
6
|
+
return { __sfc: !0, InButtonV2: o };
|
|
9
7
|
}
|
|
10
8
|
});
|
|
11
9
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import s from "./MiddleSlot.vue2.js";
|
|
2
|
-
import
|
|
3
|
-
var
|
|
2
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var i = function() {
|
|
4
4
|
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ? o(
|
|
6
|
-
}, l = [], r = /* @__PURE__ */
|
|
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
7
|
s,
|
|
8
|
-
|
|
8
|
+
i,
|
|
9
9
|
l,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const _ = r.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
_ as default
|
|
17
17
|
};
|
|
@@ -3,20 +3,18 @@ import { useTranslations as s } from "../../../composables/useTranslations.js";
|
|
|
3
3
|
import { useEditorStore as n } from "../../../stores/editor.js";
|
|
4
4
|
import { InButtonV2 as e } from "@useinsider/design-system-vue";
|
|
5
5
|
import m from "./version-history/VersionHistory.vue.js";
|
|
6
|
-
|
|
7
|
-
import f from "./ViewOptions.vue.js";
|
|
8
|
-
const y = /* @__PURE__ */ r({
|
|
6
|
+
const _ = /* @__PURE__ */ r({
|
|
9
7
|
__name: "MiddleSlot",
|
|
10
|
-
setup(
|
|
8
|
+
setup(p) {
|
|
11
9
|
const o = n(), t = s();
|
|
12
10
|
return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
|
|
13
11
|
id: `${i}-tooltip`,
|
|
14
12
|
dynamicPosition: !1,
|
|
15
13
|
staticPosition: "bottom center",
|
|
16
14
|
iconStatus: !1
|
|
17
|
-
}), InButtonV2: e, VersionHistory: m
|
|
15
|
+
}), InButtonV2: e, VersionHistory: m };
|
|
18
16
|
}
|
|
19
17
|
});
|
|
20
18
|
export {
|
|
21
|
-
|
|
19
|
+
_ as default
|
|
22
20
|
};
|
|
@@ -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,20 @@
|
|
|
1
1
|
import o from "./RightSlot.vue2.js";
|
|
2
|
+
/* empty css */
|
|
2
3
|
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
4
|
+
var r = function() {
|
|
4
5
|
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
5
|
-
return e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, {
|
|
6
|
-
|
|
6
|
+
return e("div", [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 }, on: { click: t.handleSaveAsTemplate } }), 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(
|
|
7
10
|
o,
|
|
8
|
-
n,
|
|
9
11
|
r,
|
|
12
|
+
n,
|
|
10
13
|
!1,
|
|
11
14
|
null,
|
|
12
|
-
|
|
15
|
+
"0318cf78"
|
|
13
16
|
);
|
|
14
|
-
const
|
|
17
|
+
const p = a.exports;
|
|
15
18
|
export {
|
|
16
|
-
|
|
19
|
+
p as default
|
|
17
20
|
};
|
|
@@ -1,21 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useExport as
|
|
3
|
-
import { useVersionHistoryApi as
|
|
4
|
-
import { useEditorStore as
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { defineComponent as n } from "vue";
|
|
2
|
+
import { useExport as p } from "../../../composables/useExport.js";
|
|
3
|
+
import { useVersionHistoryApi as m } from "../../../composables/useVersionHistoryApi.js";
|
|
4
|
+
import { useEditorStore as a } from "../../../stores/editor.js";
|
|
5
|
+
import { useVersionHistoryStore as f } from "../../../stores/version-history.js";
|
|
6
|
+
import { InButtonV2 as l } from "@useinsider/design-system-vue";
|
|
7
|
+
import V from "./version-history/ViewOptions.vue.js";
|
|
8
|
+
import c from "./ViewOptions.vue.js";
|
|
9
|
+
const T = /* @__PURE__ */ n({
|
|
7
10
|
__name: "RightSlot",
|
|
8
|
-
setup(
|
|
9
|
-
const { exportHtml:
|
|
10
|
-
return { __sfc: !0, exportHtml:
|
|
11
|
-
if (
|
|
12
|
-
|
|
11
|
+
setup(u) {
|
|
12
|
+
const { exportHtml: t } = p(), { openVersionHistory: r, closeVersionHistory: e, restoreVersion: s } = m(), o = a(), i = f();
|
|
13
|
+
return { __sfc: !0, exportHtml: t, openVersionHistory: r, closeVersionHistory: e, restoreVersion: s, editorStore: o, versionHistoryStore: i, handleVersionHistory: () => {
|
|
14
|
+
if (o.isVersionHistoryOpen) {
|
|
15
|
+
e();
|
|
13
16
|
return;
|
|
14
17
|
}
|
|
15
|
-
|
|
16
|
-
},
|
|
18
|
+
r();
|
|
19
|
+
}, handleSaveAsTemplate: async () => {
|
|
20
|
+
o.isSaveTemplateModalOpen = !0;
|
|
21
|
+
}, InButtonV2: l, VersionHistoryViewOptions: V, ViewOptions: c };
|
|
17
22
|
}
|
|
18
23
|
});
|
|
19
24
|
export {
|
|
20
|
-
|
|
25
|
+
T as default
|
|
21
26
|
};
|