@useinsider/guido 1.0.0-beta.7881387 → 1.0.0-beta.7e9f048

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 (33) hide show
  1. package/README.md +133 -21
  2. package/dist/@types/generic.d.ts +11 -0
  3. package/dist/components/Guido.vue.d.ts +7 -1
  4. package/dist/components/Guido.vue.js +1 -1
  5. package/dist/components/Guido.vue2.js +51 -29
  6. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  7. package/dist/components/organisms/header/LeftSlot.vue2.js +10 -8
  8. package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
  9. package/dist/components/organisms/header/MiddleSlot.vue2.js +15 -17
  10. package/dist/components/organisms/header/RightSlot.vue.js +7 -7
  11. package/dist/components/organisms/header/RightSlot.vue2.js +30 -14
  12. package/dist/components/organisms/header/ViewOptions.vue.js +1 -1
  13. package/dist/components/organisms/header/ViewOptions.vue2.js +29 -10
  14. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
  15. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +34 -16
  16. package/dist/composables/useGuidoActions.d.ts +46 -0
  17. package/dist/composables/useGuidoActions.js +37 -0
  18. package/dist/composables/useProvideInject.d.ts +14 -0
  19. package/dist/composables/useProvideInject.js +17 -0
  20. package/dist/composables/useStripo.js +15 -14
  21. package/dist/guido.css +1 -1
  22. package/dist/mock/api/default-template.d.ts +2 -0
  23. package/dist/services/stripoApi.d.ts +2 -1
  24. package/dist/services/stripoApi.js +27 -7
  25. package/dist/stores/editor.d.ts +1 -0
  26. package/dist/stores/editor.js +3 -2
  27. package/dist/utils/tooltipUtils.d.ts +2 -0
  28. package/dist/utils/tooltipUtils.js +11 -0
  29. package/package.json +1 -1
  30. package/dist/composables/useTemplates.d.ts +0 -5
  31. package/dist/composables/useTemplates.js +0 -27
  32. package/dist/static/templates/default/index.html.js +0 -5
  33. package/dist/static/templates/default/style.css.js +0 -119
package/README.md CHANGED
@@ -27,10 +27,15 @@ npm install @useinsider/guido
27
27
  <div>
28
28
  <Guido
29
29
  ref="guidoEditor"
30
- :email-id="emailId"
30
+ :template-id="templateId"
31
31
  :user-id="userId"
32
32
  :guido-config="guidoConfig"
33
+ :html="initialHtml"
34
+ :css="initialCss"
33
35
  @dynamic-content:open="handleDynamicContentOpen"
36
+ @back="handleBack"
37
+ @save:start="handleSaveStart"
38
+ @save:complete="handleSaveComplete"
34
39
  />
35
40
  </div>
36
41
  </template>
@@ -44,36 +49,55 @@ export default {
44
49
  },
45
50
  data() {
46
51
  return {
47
- emailId: 'abc123',
48
- userId: '12345',
52
+ templateId: 'template-123',
53
+ userId: 'user-456',
54
+ initialHtml: '<p>Initial HTML content</p>',
55
+ initialCss: 'p { color: #333; }',
49
56
  guidoConfig: {
50
57
  translationsPath: 'window.trans.en',
51
58
  htmlCompilerRules: [],
52
59
  ignoreDefaultHtmlCompilerRules: false,
53
- }
60
+ },
54
61
  dynamicContentModalVisible: false
55
62
  };
56
63
  },
57
64
 
58
65
  methods: {
59
- handleDynamicContentOpen() {
66
+ handleDynamicContentOpen(detail) {
67
+ console.log('Dynamic content requested:', detail);
60
68
  this.dynamicContentModalVisible = true;
61
- }
69
+ },
70
+
71
+ handleBack() {
72
+ console.log('User clicked back button');
73
+ // Handle navigation back
74
+ },
75
+
76
+ handleSaveStart() {
77
+ console.log('Save process started');
78
+ // Show loading indicator
79
+ },
80
+
81
+ handleSaveComplete(template) {
82
+ console.log('Save completed:', template);
83
+ // Handle saved template data
84
+ },
85
+
62
86
  // ⚠️ Your own Dynamic Content Modal should have this id: #guido-dynamic-content-modal
63
87
  handleDynamicContentInsert() {
64
- this.$ref.guidoEditor?.dynamicContent.insert({
65
- text: 'Text',
66
- value: 'Value',
67
- fallback: 'Fallback'
88
+ this.$refs.guidoEditor?.dynamicContent.insert({
89
+ text: 'Display Text',
90
+ value: 'actual-value',
91
+ fallback: 'Fallback Text'
68
92
  });
69
93
 
70
94
  this.dynamicContentModalVisible = false;
71
95
  },
96
+
72
97
  // ⚠️ It's mandatory. There is no way to understand if user closes the modal without selection.
73
98
  handleDynamicContentClose() {
74
- this.$ref.guidoEditor?.dynamicContent.close();
99
+ this.$refs.guidoEditor?.dynamicContent.close();
75
100
  }
76
-
77
101
  }
78
102
  };
79
103
  </script>
@@ -85,12 +109,23 @@ export default {
85
109
 
86
110
  | Prop | Type | Required | Default | Description |
87
111
  |------|------|----------|---------|-------------|
88
- | `emailId` | `string` | ✅ | - | Unique identifier for the email draft |
89
- | `userId` | `string` | ✅ | - | Unique identifier for the user draft |
90
- | `username` | `string` | ⚪ | Guido User | User name |
91
- | `partnerName` | `string` | ⚪ | Getting from URL host | Unique identifier for the partner draft |
92
- | `productType` | `string` | ⚪ | Getting from URL path | Unique identifier for the product draft |
112
+ | `templateId` | `string` | ✅ | - | Unique identifier for the email template |
113
+ | `userId` | `string` | ✅ | - | Unique identifier for the user |
93
114
  | `guidoConfig` | `GuidoConfig` | ✅ | - | Configuration object for the editor |
115
+ | `partnerName` | `string` | ⚪ | From URL host | Partner identifier |
116
+ | `productType` | `string` | ⚪ | From URL path | Product type identifier |
117
+ | `username` | `string` | ⚪ | `'Guido User'` | Display name for the user |
118
+ | `html` | `string` | ⚪ | `''` | Initial HTML content for the template |
119
+ | `css` | `string` | ⚪ | `''` | Initial CSS styles for the template |
120
+
121
+ ### Guido Component Events
122
+
123
+ | Event | Payload | Description |
124
+ |-------|---------|-------------|
125
+ | `dynamic-content:open` | `DynamicContent \| null` | Fired when user requests to insert dynamic content |
126
+ | `back` | - | Fired when user clicks the back button |
127
+ | `save:start` | - | Fired when the save process begins |
128
+ | `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
94
129
 
95
130
  ### Guido Exposed Methods
96
131
  ```typescript
@@ -377,6 +412,87 @@ src/
377
412
  └── library.ts # Main export
378
413
  ```
379
414
 
415
+ ## 🔌 Provide/Inject Utilities
416
+
417
+ Guido includes type-safe utilities for Vue's provide/inject system to facilitate dependency injection between components.
418
+
419
+ ### useProvideInject
420
+
421
+ The `useProvideInject` composable provides two helper functions for type-safe dependency injection:
422
+
423
+ #### Basic Usage
424
+
425
+ ```typescript
426
+ // Parent component
427
+ import { provideValue } from '@useinsider/guido';
428
+ import { InjectionKey } from 'vue';
429
+
430
+ // Define a typed injection key
431
+ const MyServiceKey: InjectionKey<MyService> = Symbol('MyService');
432
+
433
+ // Provide the value
434
+ const myService = new MyService();
435
+ provideValue(MyServiceKey, myService);
436
+
437
+ // Child component
438
+ import { useInjectedValue } from '@useinsider/guido';
439
+
440
+ // Inject the value with type safety
441
+ const myService = useInjectedValue(MyServiceKey);
442
+ ```
443
+
444
+ #### With Default Value
445
+
446
+ ```typescript
447
+ // Inject with a fallback value
448
+ const myService = useInjectedValue(MyServiceKey, new DefaultService());
449
+ ```
450
+
451
+ #### Error Handling
452
+
453
+ The `useInjectedValue` function will throw a descriptive error if no provider is found and no default value is provided:
454
+
455
+ ```typescript
456
+ // This will throw an error if no provider exists
457
+ try {
458
+ const myService = useInjectedValue(MyServiceKey);
459
+ } catch (error) {
460
+ console.error('No provider found for MyService');
461
+ }
462
+ ```
463
+
464
+ ### API Reference
465
+
466
+ #### `provideValue`
467
+
468
+ ```typescript
469
+ provideValue<T>(key: InjectionKey<T>, value: T): void
470
+ ```
471
+
472
+ Provides a value using Vue's provide system with type safety.
473
+
474
+ | Parameter | Type | Description |
475
+ |-----------|------|-------------|
476
+ | `key` | `InjectionKey<T>` | The typed injection key |
477
+ | `value` | `T` | The value to provide |
478
+
479
+ #### `useInjectedValue`
480
+
481
+ ```typescript
482
+ useInjectedValue<T>(key: InjectionKey<T>, defaultValue?: T): T
483
+ ```
484
+
485
+ Injects a value using Vue's inject system with type safety and error handling.
486
+
487
+ | Parameter | Type | Required | Description |
488
+ |-----------|------|----------|-------------|
489
+ | `key` | `InjectionKey<T>` | ✅ | The typed injection key |
490
+ | `defaultValue` | `T` | ⚪ | Optional fallback value |
491
+
492
+ **Returns:** `T` - The injected value
493
+
494
+ **Throws:** `Error` - When no provider is found and no default value is provided
495
+
380
496
  ## 🌐 i18n
381
497
  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).
382
498
  It allows to use production or local translations on your code. 🚀
@@ -463,8 +579,4 @@ ISC License
463
579
  - Master Version Generator should be fixed.
464
580
  - Playwright integration
465
581
  - Commitlint & Precommit Hooks integration
466
- - We need to emit save event and we should return template config to it
467
- - Default template should be same with production
468
- - Open Guido with saved template
469
- - Get User ID, Email and Unique Template ID as dynamic from props
470
582
  - Get Pre-built display conditions from API
@@ -9,3 +9,14 @@ export type DynamicContent = {
9
9
  text: string;
10
10
  fallback?: string;
11
11
  };
12
+ export interface TooltipOptions {
13
+ id: string;
14
+ dynamicPosition: boolean;
15
+ staticPosition: 'top center' | 'top left' | 'top right' | 'bottom center' | 'bottom left' | 'bottom right' | 'right center' | 'right top' | 'right bottom' | 'left center' | 'left top' | 'left bottom';
16
+ iconStatus: boolean;
17
+ offset?: {
18
+ x: number;
19
+ y: number;
20
+ };
21
+ preventXss?: boolean;
22
+ }
@@ -1,10 +1,13 @@
1
1
  import type { DynamicContent, GuidoConfig } from '@@/Types/generic';
2
+ import type { Template } from '@@/Types/stripo';
2
3
  type __VLS_Props = {
3
- emailId: string;
4
+ templateId: string;
4
5
  userId: string;
5
6
  partnerName?: string;
6
7
  productType?: string;
7
8
  username?: string;
9
+ html?: string;
10
+ css?: string;
8
11
  guidoConfig: GuidoConfig;
9
12
  };
10
13
  declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
@@ -14,6 +17,9 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
14
17
  };
15
18
  }, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
16
19
  "dynamic-content:open": (detail: DynamicContent | null) => void;
20
+ back: () => void;
21
+ "save:start": () => void;
22
+ "save:complete": (template: Omit<Template, "forceRecreate">) => void;
17
23
  }, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
18
24
  export default _default;
19
25
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -10,7 +10,7 @@ var s = function() {
10
10
  _,
11
11
  !1,
12
12
  null,
13
- "89423288"
13
+ "89bedf08"
14
14
  );
15
15
  const f = a.exports;
16
16
  export {
@@ -1,34 +1,51 @@
1
- import { defineComponent as v, onMounted as w } from "vue";
2
- import { usePartner as h } from "../composables/usePartner.js";
3
- import { useStripo as D } from "../composables/useStripo.js";
4
- import { useTemplates as E } from "../composables/useTemplates.js";
5
- import { DefaultUsername as _, DefaultGuidoConfig as b } from "../enums/defaults.js";
6
- import T from "./organisms/header/HeaderWrapper.vue.js";
7
- const W = /* @__PURE__ */ v({
1
+ import { defineComponent as h, onMounted as w } from "vue";
2
+ import { provideGuidoActions as D } from "../composables/useGuidoActions.js";
3
+ import { usePartner as E } from "../composables/usePartner.js";
4
+ import { useStripo as S } from "../composables/useStripo.js";
5
+ import { DefaultUsername as _, DefaultGuidoConfig as G } from "../enums/defaults.js";
6
+ import I from "./organisms/header/HeaderWrapper.vue.js";
7
+ import { useStripoApi as k } from "../services/stripoApi.js";
8
+ const B = /* @__PURE__ */ h({
8
9
  __name: "Guido",
9
10
  props: {
10
- emailId: null,
11
+ templateId: null,
11
12
  userId: null,
12
13
  partnerName: null,
13
14
  productType: null,
14
15
  username: null,
16
+ html: null,
17
+ css: null,
15
18
  guidoConfig: null
16
19
  },
17
- emits: ["dynamic-content:open"],
18
- setup(g, { expose: C, emit: n }) {
19
- const t = g, { getPartnerName: o, getProductType: c } = h(), {
20
- emailId: i,
21
- userId: a,
22
- guidoConfig: r,
23
- partnerName: s = o(),
24
- productType: d = c(),
25
- username: u = _
26
- } = t;
20
+ emits: ["dynamic-content:open", "back", "save:start", "save:complete"],
21
+ setup(C, { expose: b, emit: t }) {
22
+ const o = C, { getPartnerName: n, getProductType: a } = E(), {
23
+ templateId: c,
24
+ userId: s,
25
+ guidoConfig: i,
26
+ html: r = "",
27
+ css: l = "",
28
+ partnerName: d = n(),
29
+ productType: u = a(),
30
+ username: m = _
31
+ } = o;
27
32
  window.GuidoConfig = {
28
- ...b,
29
- ...r
33
+ ...G,
34
+ ...i
30
35
  };
31
- const { initPlugin: m } = D({ emailId: i, userId: a, username: u, partnerName: s, productType: d }), { getDefaultTemplate: l } = E(), p = (e) => {
36
+ const { initPlugin: p } = S({ emailId: c, userId: s, username: m, partnerName: d, productType: u }), { getDefaultTemplate: g } = k();
37
+ D({
38
+ onBack: () => {
39
+ console.debug("guido:back"), t("back");
40
+ },
41
+ onSaveStart: () => {
42
+ console.debug("guido:save:start"), t("save:start");
43
+ },
44
+ onSaveComplete: (e) => {
45
+ console.debug("guido:save:complete", e), t("save:complete", e);
46
+ }
47
+ });
48
+ const f = (e) => {
32
49
  console.debug("dynamic-content:close", e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
33
50
  }, y = () => {
34
51
  console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
@@ -36,23 +53,28 @@ const W = /* @__PURE__ */ v({
36
53
  return w(async () => {
37
54
  console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
38
55
  try {
39
- const e = await l();
40
- await m(e);
56
+ let e = {
57
+ html: r,
58
+ css: l,
59
+ forceRecreate: !0
60
+ // TODO: It should be false for old templates. We will communicate with Stripo
61
+ };
62
+ e.html || (e = await g()), await p(e);
41
63
  } catch (e) {
42
64
  console.error("Failed to initialize Stripo editor:", e);
43
65
  }
44
66
  document.addEventListener("dynamic-content:open", (e) => {
45
- const f = e;
46
- console.debug("dynamic-content:open", f.detail), n("dynamic-content:open", f.detail);
67
+ const v = e;
68
+ console.debug("dynamic-content:open", v.detail), t("dynamic-content:open", v.detail);
47
69
  });
48
- }), C({
70
+ }), b({
49
71
  dynamicContent: {
50
- insert: p,
72
+ insert: f,
51
73
  close: y
52
74
  }
53
- }), { __sfc: !0, props: t, getPartnerName: o, getProductType: c, emailId: i, userId: a, guidoConfig: r, partnerName: s, productType: d, username: u, emit: n, initPlugin: m, getDefaultTemplate: l, insertDynamicContent: p, closeDynamicContent: y, HeaderWrapper: T };
75
+ }), { __sfc: !0, props: o, getPartnerName: n, getProductType: a, templateId: c, userId: s, guidoConfig: i, html: r, css: l, partnerName: d, productType: u, username: m, emit: t, initPlugin: p, getDefaultTemplate: g, insertDynamicContent: f, closeDynamicContent: y, HeaderWrapper: I };
54
76
  }
55
77
  });
56
78
  export {
57
- W as default
79
+ B as default
58
80
  };
@@ -1,11 +1,11 @@
1
- import r from "./LeftSlot.vue2.js";
1
+ import n from "./LeftSlot.vue2.js";
2
2
  import o from "../../../_virtual/_plugin-vue2_normalizer.js";
3
- var n = function() {
4
- var t = this, e = t._self._c, s = t._self._setupProxy;
5
- return e("div", { staticClass: "d-f a-i-c" }, [e(s.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" } }), s.editorStore.isVersionHistoryOpen ? e(s.RestoreButton, { staticClass: "ml-3" }) : t._e()], 1);
3
+ var r = function() {
4
+ var e = this, s = e._self._c, t = e._self._setupProxy;
5
+ return s("div", { staticClass: "d-f a-i-c" }, [s(t.InButtonV2, { staticClass: "p-2", attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" }, on: { click: t.handleBack } }), t.editorStore.isVersionHistoryOpen ? s(t.RestoreButton, { staticClass: "ml-3" }) : e._e()], 1);
6
6
  }, a = [], i = /* @__PURE__ */ o(
7
- r,
8
7
  n,
8
+ r,
9
9
  a,
10
10
  !1,
11
11
  null,
@@ -1,13 +1,15 @@
1
- import { defineComponent as t } from "vue";
2
- import { useEditorStore as o } from "../../../stores/editor.js";
3
- import { InButtonV2 as r } from "@useinsider/design-system-vue";
4
- import e from "./version-history/RestoreButton.vue.js";
5
- const _ = /* @__PURE__ */ t({
1
+ import { defineComponent as r } from "vue";
2
+ import { useBack as e } from "../../../composables/useGuidoActions.js";
3
+ import { useEditorStore as m } from "../../../stores/editor.js";
4
+ import { InButtonV2 as n } from "@useinsider/design-system-vue";
5
+ import s from "./version-history/RestoreButton.vue.js";
6
+ const c = /* @__PURE__ */ r({
6
7
  __name: "LeftSlot",
7
- setup(m) {
8
- return { __sfc: !0, editorStore: o(), InButtonV2: r, RestoreButton: e };
8
+ setup(f) {
9
+ const o = m(), t = e();
10
+ return { __sfc: !0, editorStore: o, handleBack: t, InButtonV2: n, RestoreButton: s };
9
11
  }
10
12
  });
11
13
  export {
12
- _ as default
14
+ c as default
13
15
  };
@@ -1,17 +1,17 @@
1
- import s from "./MiddleSlot.vue2.js";
2
- import i from "../../../_virtual/_plugin-vue2_normalizer.js";
1
+ import i from "./MiddleSlot.vue2.js";
2
+ import s from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var n = function() {
4
4
  var e = this, o = e._self._c, t = e._self._setupProxy;
5
- return t.editorStore.isVersionHistoryOpen ? o("div", { staticClass: "d-f" }, [o(t.VersionHistory), o(t.VersionHistoryViewOptions)], 1) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.trans("newsletter.email-preview") } }), o(t.ViewOptions, { staticClass: "ml-3" })], 1);
6
- }, l = [], r = /* @__PURE__ */ i(
7
- s,
5
+ return t.editorStore.isVersionHistoryOpen ? o("div", { staticClass: "d-f" }, [o(t.VersionHistory), o(t.VersionHistoryViewOptions)], 1) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__undo-button"), "tooltip-text": t.trans("action-builder.undo") } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__redo-button"), "tooltip-text": t.trans("action-builder.redo") } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "data-testid": "Code Editor", "left-icon": "line-code", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button"), "tooltip-text": t.codeEditorTooltipText } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isPreviewModeOpen, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.previewTooltipText }, on: { click: t.handlePreview } }), o(t.ViewOptions, { staticClass: "ml-3" })], 1);
6
+ }, l = [], r = /* @__PURE__ */ s(
7
+ i,
8
8
  n,
9
9
  l,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const p = r.exports;
14
+ const u = r.exports;
15
15
  export {
16
- p as default
16
+ u as default
17
17
  };
@@ -1,22 +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
- import p from "./version-history/ViewOptions.vue.js";
7
- import f from "./ViewOptions.vue.js";
8
- const y = /* @__PURE__ */ r({
1
+ import { defineComponent as s, computed as t } from "vue";
2
+ import { useTranslations as n } from "../../../composables/useTranslations.js";
3
+ import { useEditorStore as p } from "../../../stores/editor.js";
4
+ import { getTooltipOptions as m } from "../../../utils/tooltipUtils.js";
5
+ import { InButtonV2 as l } from "@useinsider/design-system-vue";
6
+ import d from "./version-history/VersionHistory.vue.js";
7
+ import w from "./version-history/ViewOptions.vue.js";
8
+ import c from "./ViewOptions.vue.js";
9
+ const M = /* @__PURE__ */ s({
9
10
  __name: "MiddleSlot",
10
- setup(a) {
11
- const o = n(), t = s();
12
- return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
13
- id: `${i}-tooltip`,
14
- dynamicPosition: !1,
15
- staticPosition: "bottom center",
16
- iconStatus: !1
17
- }), InButtonV2: e, VersionHistory: m, VersionHistoryViewOptions: p, ViewOptions: f };
11
+ setup(f) {
12
+ const e = p(), o = n(), r = t(() => e.isCodeEditorOpen ? o("newsletter.close-html-editor") : o("newsletter.html-editor")), i = t(() => e.isPreviewModeOpen ? o("newsletter.close-email-preview") : o("newsletter.email-preview"));
13
+ return { __sfc: !0, editorStore: e, trans: o, codeEditorTooltipText: r, previewTooltipText: i, handlePreview: () => {
14
+ e.isPreviewModeOpen = !e.isPreviewModeOpen;
15
+ }, getTooltipOptions: m, InButtonV2: l, VersionHistory: d, VersionHistoryViewOptions: w, ViewOptions: c };
18
16
  }
19
17
  });
20
18
  export {
21
- y as default
19
+ M as default
22
20
  };
@@ -1,17 +1,17 @@
1
- import o from "./RightSlot.vue2.js";
1
+ import s from "./RightSlot.vue2.js";
2
2
  import i from "../../../_virtual/_plugin-vue2_normalizer.js";
3
3
  var n = function() {
4
- 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, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.editorStore.isVersionHistoryOpen } })], 1);
6
- }, r = [], a = /* @__PURE__ */ i(
7
- o,
4
+ var o = this, e = o._self._c, t = o._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, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, 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, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, 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, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") } }), 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, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleSave } })], 1);
6
+ }, r = [], l = /* @__PURE__ */ i(
7
+ s,
8
8
  n,
9
9
  r,
10
10
  !1,
11
11
  null,
12
12
  null
13
13
  );
14
- const c = a.exports;
14
+ const u = l.exports;
15
15
  export {
16
- c as default
16
+ u as default
17
17
  };
@@ -1,21 +1,37 @@
1
- import { defineComponent as s } from "vue";
2
- import { useExport as i } from "../../../composables/useExport.js";
3
- import { useVersionHistoryApi as n } from "../../../composables/useVersionHistoryApi.js";
4
- import { useEditorStore as p } from "../../../stores/editor.js";
5
- import { InButtonV2 as m } from "@useinsider/design-system-vue";
6
- const d = /* @__PURE__ */ s({
1
+ import { defineComponent as l, computed as f } from "vue";
2
+ import { useActionsApi as u } from "../../../composables/useActionsApi.js";
3
+ import { useExport as d } from "../../../composables/useExport.js";
4
+ import { useSaveStart as y, useSaveComplete as v } from "../../../composables/useGuidoActions.js";
5
+ import { useTranslations as h } from "../../../composables/useTranslations.js";
6
+ import { useVersionHistoryApi as S } from "../../../composables/useVersionHistoryApi.js";
7
+ import { useEditorStore as H } from "../../../stores/editor.js";
8
+ import { getTooltipOptions as _ } from "../../../utils/tooltipUtils.js";
9
+ import { InButtonV2 as V } from "@useinsider/design-system-vue";
10
+ const R = /* @__PURE__ */ l({
7
11
  __name: "RightSlot",
8
- setup(f) {
9
- const { exportHtml: e } = i(), { openVersionHistory: o, closeVersionHistory: r } = n(), t = p();
10
- return { __sfc: !0, exportHtml: e, openVersionHistory: o, closeVersionHistory: r, editorStore: t, handleVersionHistory: () => {
11
- if (t.isVersionHistoryOpen) {
12
- r();
12
+ setup(g) {
13
+ const { exportHtml: p } = d(), { getCompiledEmail: r } = u(), s = y(), i = v(), { openVersionHistory: n, closeVersionHistory: m } = S(), o = H(), t = h(), a = () => {
14
+ if (o.isVersionHistoryOpen) {
15
+ m();
13
16
  return;
14
17
  }
15
- o();
16
- }, InButtonV2: m };
18
+ n();
19
+ }, c = f(() => o.isVersionHistoryOpen ? t("newsletter.close-version-history") : t("newsletter.version-history"));
20
+ return { __sfc: !0, exportHtml: p, getCompiledEmail: r, saveStart: s, saveComplete: i, openVersionHistory: n, closeVersionHistory: m, editorStore: o, trans: t, handleVersionHistory: a, versionHistoryTooltipText: c, handleSave: async () => {
21
+ s();
22
+ try {
23
+ const { html: e } = await r();
24
+ i({
25
+ html: e || "",
26
+ css: ""
27
+ // CSS is embedded in HTML from Stripo
28
+ });
29
+ } catch (e) {
30
+ console.error("Failed to get template data for save:", e);
31
+ }
32
+ }, getTooltipOptions: _, InButtonV2: V };
17
33
  }
18
34
  });
19
35
  export {
20
- d as default
36
+ R as default
21
37
  };
@@ -10,7 +10,7 @@ var n = function() {
10
10
  i,
11
11
  !1,
12
12
  null,
13
- "0fff376c"
13
+ "93dadc5a"
14
14
  );
15
15
  const l = _.exports;
16
16
  export {
@@ -1,15 +1,34 @@
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({
1
+ import { defineComponent as n } from "vue";
2
+ import { useTranslations as p } from "../../../composables/useTranslations.js";
3
+ import { useEditorStore as s } from "../../../stores/editor.js";
4
+ import { getTooltipOptions as o } from "../../../utils/tooltipUtils.js";
5
+ import { InSegments as r } from "@useinsider/design-system-vue";
6
+ const d = /* @__PURE__ */ n({
5
7
  __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 };
8
+ setup(m) {
9
+ const e = s(), t = p(), i = [
10
+ {
11
+ text: "",
12
+ icon: "line-desktop",
13
+ value: "desktop",
14
+ position: "bottom",
15
+ align: "center",
16
+ tooltipText: t("newsletter.desktop"),
17
+ tooltipOptions: o("guido__view-option-desktop")
18
+ },
19
+ {
20
+ text: "",
21
+ icon: "line-menu-mobileapp",
22
+ value: "mobile",
23
+ position: "bottom",
24
+ align: "center",
25
+ tooltipText: t("newsletter.mobile"),
26
+ tooltipOptions: o("guido__view-option-mobile")
27
+ }
28
+ ];
29
+ return { __sfc: !0, editorStore: e, trans: t, segmentList: i, InSegments: r };
11
30
  }
12
31
  });
13
32
  export {
14
- u as default
33
+ d as default
15
34
  };
@@ -10,9 +10,9 @@ var r = function() {
10
10
  n,
11
11
  !1,
12
12
  null,
13
- "6a2bde67"
13
+ "421ffc13"
14
14
  );
15
- const d = _.exports;
15
+ const f = _.exports;
16
16
  export {
17
- d as default
17
+ f as default
18
18
  };
@@ -1,23 +1,41 @@
1
- import { defineComponent as s } from "vue";
2
- import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
3
- import { useVersionHistoryStore as r } from "../../../../stores/version-history.js";
4
- import { InSegments as m } from "@useinsider/design-system-vue";
5
- const d = /* @__PURE__ */ s({
1
+ import { defineComponent as p } from "vue";
2
+ import { useTranslations as m } from "../../../../composables/useTranslations.js";
3
+ import { useVersionHistoryApi as l } from "../../../../composables/useVersionHistoryApi.js";
4
+ import { useVersionHistoryStore as a } from "../../../../stores/version-history.js";
5
+ import { getTooltipOptions as n } from "../../../../utils/tooltipUtils.js";
6
+ import { InSegments as c } from "@useinsider/design-system-vue";
7
+ const h = /* @__PURE__ */ p({
6
8
  __name: "ViewOptions",
7
- setup(p) {
8
- const e = r(), { switchToDesktopPreview: o, switchToMobilePreview: t } = n();
9
- return { __sfc: !0, versionHistoryStore: e, switchToDesktopPreview: o, switchToMobilePreview: t, segmentList: [
10
- { text: "", icon: "line-desktop", value: "desktop" },
11
- { text: "", icon: "line-menu-mobileapp", value: "mobile" }
12
- ], changeVisualMode: (i) => {
13
- if (e.editorVisualMode = i, i === "mobile") {
14
- t();
9
+ setup(u) {
10
+ const t = a(), { switchToDesktopPreview: e, switchToMobilePreview: i } = l(), o = m(), r = [
11
+ {
12
+ text: "",
13
+ icon: "line-desktop",
14
+ value: "desktop",
15
+ position: "bottom",
16
+ align: "center",
17
+ tooltipText: o("newsletter.desktop"),
18
+ tooltipOptions: n("guido__version-history-view-option-desktop")
19
+ },
20
+ {
21
+ text: "",
22
+ icon: "line-menu-mobileapp",
23
+ value: "mobile",
24
+ position: "bottom",
25
+ align: "center",
26
+ tooltipText: o("newsletter.mobile"),
27
+ tooltipOptions: n("guido__version-history-view-option-mobile")
28
+ }
29
+ ];
30
+ return { __sfc: !0, versionHistoryStore: t, switchToDesktopPreview: e, switchToMobilePreview: i, trans: o, segmentList: r, changeVisualMode: (s) => {
31
+ if (t.editorVisualMode = s, s === "mobile") {
32
+ i();
15
33
  return;
16
34
  }
17
- o();
18
- }, InSegments: m };
35
+ e();
36
+ }, InSegments: c };
19
37
  }
20
38
  });
21
39
  export {
22
- d as default
40
+ h as default
23
41
  };
@@ -0,0 +1,46 @@
1
+ import type { Template } from '@@/Types/stripo';
2
+ import type { InjectionKey } from 'vue';
3
+ export type BackHandler = () => void;
4
+ export type SaveStartHandler = () => void;
5
+ export type SaveCompleteHandler = (template: Omit<Template, 'forceRecreate'>) => void;
6
+ export declare const BACK_KEY: InjectionKey<BackHandler>;
7
+ export declare const SAVE_START_KEY: InjectionKey<SaveStartHandler>;
8
+ export declare const SAVE_COMPLETE_KEY: InjectionKey<SaveCompleteHandler>;
9
+ /**
10
+ * Provides Guido action handlers to child components
11
+ */
12
+ export declare const provideGuidoActions: (actions: {
13
+ onBack: BackHandler;
14
+ onSaveStart: SaveStartHandler;
15
+ onSaveComplete: SaveCompleteHandler;
16
+ }) => void;
17
+ /**
18
+ * Provides individual Guido action handlers
19
+ */
20
+ export declare const provideBackHandler: (handler: BackHandler) => void;
21
+ export declare const provideSaveStartHandler: (handler: SaveStartHandler) => void;
22
+ export declare const provideSaveCompleteHandler: (handler: SaveCompleteHandler) => void;
23
+ /**
24
+ * Hook to use the back navigation handler
25
+ * @returns Back navigation function
26
+ */
27
+ export declare const useBack: () => BackHandler;
28
+ /**
29
+ * Hook to use the save start handler
30
+ * @returns Save start function
31
+ */
32
+ export declare const useSaveStart: () => SaveStartHandler;
33
+ /**
34
+ * Hook to use the save complete handler
35
+ * @returns Save complete function
36
+ */
37
+ export declare const useSaveComplete: () => SaveCompleteHandler;
38
+ /**
39
+ * Convenience hook to get all Guido actions
40
+ * @returns Object containing all action handlers
41
+ */
42
+ export declare const useGuidoActions: () => {
43
+ back: BackHandler;
44
+ saveStart: SaveStartHandler;
45
+ saveComplete: SaveCompleteHandler;
46
+ };
@@ -0,0 +1,37 @@
1
+ import { provideValue as o, useInjectedValue as t } from "./useProvideInject.js";
2
+ const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), a = Symbol.for("guido.save.complete"), s = (e) => {
3
+ o(r, e.onBack), o(n, e.onSaveStart), o(a, e.onSaveComplete);
4
+ }, u = () => {
5
+ try {
6
+ return t(r);
7
+ } catch {
8
+ throw new Error(
9
+ "useBack: No back handler provided. Make sure Guido component is in the component tree."
10
+ );
11
+ }
12
+ }, d = () => {
13
+ try {
14
+ return t(n);
15
+ } catch {
16
+ throw new Error(
17
+ "useSaveStart: No save start handler provided. Make sure Guido component is in the component tree."
18
+ );
19
+ }
20
+ }, i = () => {
21
+ try {
22
+ return t(a);
23
+ } catch {
24
+ throw new Error(
25
+ "useSaveComplete: No save complete handler provided. Make sure Guido component is in the component tree."
26
+ );
27
+ }
28
+ };
29
+ export {
30
+ r as BACK_KEY,
31
+ a as SAVE_COMPLETE_KEY,
32
+ n as SAVE_START_KEY,
33
+ s as provideGuidoActions,
34
+ u as useBack,
35
+ i as useSaveComplete,
36
+ d as useSaveStart
37
+ };
@@ -0,0 +1,14 @@
1
+ import { type InjectionKey } from 'vue';
2
+ /**
3
+ * Provides a value using Vue's provide/inject system
4
+ * @param key - The injection key
5
+ * @param value - The value to provide
6
+ */
7
+ export declare const provideValue: <T>(key: InjectionKey<T>, value: T) => void;
8
+ /**
9
+ * Injects a value using Vue's provide/inject system
10
+ * @param key - The injection key
11
+ * @param defaultValue - Optional default value if injection fails
12
+ * @returns The injected value
13
+ */
14
+ export declare const useInjectedValue: <T>(key: InjectionKey<T>, defaultValue?: T) => T;
@@ -0,0 +1,17 @@
1
+ import { provide as t, inject as i } from "vue";
2
+ const d = (e, o) => {
3
+ t(e, o);
4
+ }, s = (e, o) => {
5
+ const r = i(e, o);
6
+ if (r === void 0 && o === void 0) {
7
+ const n = e.description || String(e);
8
+ throw new Error(
9
+ `useInjectedValue: No provider found for key "${n}". Make sure a parent component provides this value.`
10
+ );
11
+ }
12
+ return r;
13
+ };
14
+ export {
15
+ d as provideValue,
16
+ s as useInjectedValue
17
+ };
@@ -1,19 +1,20 @@
1
- import { useActionsApi as m } from "./useActionsApi.js";
2
- import { useCustomInterfaceAppearance as g } from "./useCustomInterfaceAppearance.js";
3
- import { useToaster as f } from "./useToaster.js";
4
- import { displayConditions as E } from "../enums/displayConditions.js";
5
- import S from "../extensions/DynamicContent/extension.js";
6
- import { useStripoApi as y } from "../services/stripoApi.js";
7
- import { useEditorStore as C } from "../stores/editor.js";
8
- const x = (a) => {
9
- const { handleError: d } = f(), { getToken: c, getCustomFonts: u } = y(), l = (e, r = []) => {
10
- const i = C(), { html: t, css: s } = e;
1
+ import { useActionsApi as g } from "./useActionsApi.js";
2
+ import { useCustomInterfaceAppearance as f } from "./useCustomInterfaceAppearance.js";
3
+ import { useToaster as E } from "./useToaster.js";
4
+ import { displayConditions as S } from "../enums/displayConditions.js";
5
+ import y from "../extensions/DynamicContent/extension.js";
6
+ import { useStripoApi as C } from "../services/stripoApi.js";
7
+ import { useEditorStore as w } from "../stores/editor.js";
8
+ const A = (a) => {
9
+ const { handleError: d } = E(), { getToken: c, getCustomFonts: u } = C(), l = (e, r = []) => {
10
+ const i = w(), { html: t, css: s, forceRecreate: m } = e;
11
11
  window.UIEditor.initEditor(
12
12
  document.querySelector("#guido-editor"),
13
13
  {
14
14
  metadata: a,
15
15
  html: t,
16
16
  css: s,
17
+ forceRecreate: m,
17
18
  locale: "en",
18
19
  undoButtonSelector: "#guido__undo-button",
19
20
  redoButtonSelector: "#guido__redo-button",
@@ -29,7 +30,7 @@ const x = (a) => {
29
30
  `,
30
31
  conditionsEnabled: !0,
31
32
  customConditionsEnabled: !0,
32
- conditionCategories: E,
33
+ conditionCategories: S,
33
34
  messageSettingsEnabled: !1,
34
35
  editorFonts: {
35
36
  showDefaultStandardFonts: !0,
@@ -46,7 +47,7 @@ const x = (a) => {
46
47
  },
47
48
  onTemplateLoaded() {
48
49
  try {
49
- const { importCss: o } = g(), { activateCustomViewStyles: n } = m();
50
+ const { importCss: o } = f(), { activateCustomViewStyles: n } = g();
50
51
  o(), n();
51
52
  } catch (o) {
52
53
  d(o, "Failed to load custom interface appearance");
@@ -62,7 +63,7 @@ const x = (a) => {
62
63
  i.isVersionHistoryOpen = o;
63
64
  },
64
65
  ignoreClickOutsideSelectors: ["#guido-dynamic-content-modal"],
65
- extensions: [S]
66
+ extensions: [y]
66
67
  }
67
68
  );
68
69
  }, p = (e) => new Promise((r, i) => {
@@ -86,5 +87,5 @@ const x = (a) => {
86
87
  } };
87
88
  };
88
89
  export {
89
- x as useStripo
90
+ A as useStripo
90
91
  };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- .version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-6a2bde67] .guido__verion-history-view-option-selection-desktop svg,[data-v-6a2bde67] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-6a2bde67] .in-segments-wrapper__button_selected,[data-v-6a2bde67] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-0fff376c] .guido__view-option-selection-desktop svg,[data-v-0fff376c] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-0fff376c] .in-segments-wrapper__button_selected,[data-v-0fff376c] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.guido-editor__wrapper[data-v-89423288],.guido-editor__container[data-v-89423288]{width:100%;height:calc(100vh - 75px)}
1
+ .version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-421ffc13] .guido__verion-history-view-option-selection-desktop svg,[data-v-421ffc13] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-421ffc13] .in-segments-wrapper__button_selected,[data-v-421ffc13] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-421ffc13] .in-tooltip-wrapper__icon{cursor:pointer}[data-v-93dadc5a] .guido__view-option-selection-desktop svg,[data-v-93dadc5a] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-93dadc5a] .in-segments-wrapper__button_selected,[data-v-93dadc5a] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-93dadc5a] .in-tooltip-wrapper__icon{cursor:pointer}.guido-editor__wrapper[data-v-89bedf08],.guido-editor__container[data-v-89bedf08]{width:100%;height:calc(100vh - 75px)}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("msw").HttpHandler[];
2
+ export default _default;
@@ -1,7 +1,8 @@
1
- import type { CustomFont } from '@@/Types/stripo';
1
+ import type { CustomFont, Template } from '@@/Types/stripo';
2
2
  export declare const useStripoApi: () => {
3
3
  getToken: () => Promise<string>;
4
4
  getCustomFonts: () => Promise<(CustomFont & {
5
5
  active: boolean;
6
6
  })[]>;
7
+ getDefaultTemplate: () => Promise<Template>;
7
8
  };
@@ -1,25 +1,45 @@
1
- import { useHttp as s } from "../composables/useHttp.js";
2
- import { useToaster as n } from "../composables/useToaster.js";
1
+ import { useHttp as a } from "../composables/useHttp.js";
2
+ import { useToaster as s } from "../composables/useToaster.js";
3
3
  const m = () => {
4
- const { get: o } = s(), { handleError: r } = n();
4
+ const { get: r } = a(), { handleError: o } = s();
5
5
  return {
6
6
  getToken: async () => {
7
7
  try {
8
- const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await o(`/stripo/get-user-token?test=${t}`);
8
+ const t = Number(localStorage.getItem("ins-guido-test-instance")), { data: e } = await r(`/stripo/get-user-token?test=${t}`);
9
9
  return e.body.token;
10
10
  } catch (t) {
11
- return r(t, "Failed to fetch token"), "";
11
+ return o(t, "Failed to fetch token"), "";
12
12
  }
13
13
  },
14
14
  getCustomFonts: async () => {
15
15
  try {
16
- const { data: t = [] } = await o("/stripo/get-partner-custom-fonts");
16
+ const { data: t = [] } = await r("/stripo/get-partner-custom-fonts");
17
17
  return t.map((e) => ({
18
18
  ...e,
19
19
  active: !0
20
20
  }));
21
21
  } catch (t) {
22
- return r(t, "Failed to fetch custom fonts"), [];
22
+ return o(t, "Failed to fetch custom fonts"), [];
23
+ }
24
+ },
25
+ getDefaultTemplate: async () => {
26
+ const t = {
27
+ html: "",
28
+ css: "",
29
+ forceRecreate: !0
30
+ };
31
+ try {
32
+ const { data: e } = await r("/stripo/default-template");
33
+ try {
34
+ return {
35
+ ...JSON.parse(e),
36
+ forceRecreate: !0
37
+ };
38
+ } catch {
39
+ return t;
40
+ }
41
+ } catch (e) {
42
+ return o(e, "Failed to fetch default template"), t;
23
43
  }
24
44
  }
25
45
  };
@@ -1,5 +1,6 @@
1
1
  export declare const useEditorStore: import("pinia").StoreDefinition<"editor", {
2
2
  isCodeEditorOpen: boolean;
3
3
  isVersionHistoryOpen: boolean;
4
+ isPreviewModeOpen: boolean;
4
5
  editorVisualMode: string;
5
6
  }, {}, {}>;
@@ -1,11 +1,12 @@
1
1
  import { defineStore as e } from "pinia";
2
- const t = e("editor", {
2
+ const i = e("editor", {
3
3
  state: () => ({
4
4
  isCodeEditorOpen: !1,
5
5
  isVersionHistoryOpen: !1,
6
+ isPreviewModeOpen: !1,
6
7
  editorVisualMode: "desktop"
7
8
  })
8
9
  });
9
10
  export {
10
- t as useEditorStore
11
+ i as useEditorStore
11
12
  };
@@ -0,0 +1,2 @@
1
+ import type { TooltipOptions } from '../@types/generic';
2
+ export declare const getTooltipOptions: (id: string, options?: Partial<Omit<TooltipOptions, "id">>) => TooltipOptions;
@@ -0,0 +1,11 @@
1
+ const e = (s, t = {}) => ({
2
+ id: s,
3
+ dynamicPosition: t.dynamicPosition ?? !1,
4
+ staticPosition: t.staticPosition ?? "bottom center",
5
+ iconStatus: t.iconStatus ?? !1,
6
+ offset: t.offset,
7
+ preventXss: t.preventXss
8
+ });
9
+ export {
10
+ e as getTooltipOptions
11
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "1.0.0-beta.7881387",
3
+ "version": "1.0.0-beta.7e9f048",
4
4
  "description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
5
5
  "main": "./dist/guido.umd.cjs",
6
6
  "module": "./dist/library.js",
@@ -1,5 +0,0 @@
1
- import type { Template } from '@@/Types/stripo';
2
- export declare const useTemplates: () => {
3
- getDefaultTemplate: () => Promise<Template>;
4
- getTemplate: (templateName: string) => Promise<Template>;
5
- };
@@ -1,27 +0,0 @@
1
- const s = () => {
2
- const t = async () => {
3
- const [e, a] = await Promise.all([
4
- // eslint-disable-next-line import/extensions
5
- import("../static/templates/default/index.html.js"),
6
- import("../static/templates/default/style.css.js")
7
- ]);
8
- return {
9
- html: e.default,
10
- css: a.default
11
- };
12
- };
13
- return {
14
- getDefaultTemplate: t,
15
- getTemplate: async (e) => {
16
- switch (e) {
17
- case "default":
18
- return t();
19
- default:
20
- return t();
21
- }
22
- }
23
- };
24
- };
25
- export {
26
- s as useTemplates
27
- };
@@ -1,5 +0,0 @@
1
- const t = `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta charset="UTF-8"><meta content="width=device-width, initial-scale=1" name="viewport"><meta name="x-apple-disable-message-reformatting"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta content="telephone=no" name="format-detection"><title></title><!--[if (mso 16)]><style type="text/css">a{text-decoration:none;}</style><![endif]--><!--[if gte mso 9]><style>sup{font-size:100% !important;}</style><![endif]--><!--[if gte mso 9]><noscript><xml><o:OfficeDocumentSettings><o:AllowPNG></o:AllowPNG><o:PixelsPerInch>96</o:PixelsPerInch></o:OfficeDocumentSettings></xml></noscript><![endif]--><!--[if mso]><xml><w:WordDocument xmlns:w="urn:schemas-microsoft-com:office:word"><w:DontUseAdvancedTypographyReadingMail></w:DontUseAdvancedTypographyReadingMail></w:WordDocument></xml><![endif]--></head><body><div class="es-wrapper-color"> <!--[if gte mso 9]> <v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t"> <v:fill type="tile" color="#f6f6f6"></v:fill> </v:background> <![endif]--><table class="es-wrapper" width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td class="esd-email-paddings" valign="top"><table class="es-content esd-header-popover" cellspacing="0" cellpadding="0" align="center"><tbody><tr><td class="esd-stripe" align="center"><table class="es-content-body" width="600" cellspacing="0" cellpadding="0" bgcolor="#ffffff" align="center"><tbody><tr><td class="esd-structure es-p20" align="left" bgcolor="#91949F" style="background-color: #91949f;"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td class="esd-container-frame" width="560" valign="top" align="center"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td align="center" class="esd-block-image es-p15" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/logo.png" alt style="display: block;" height="30"></a></td></tr><tr><td class="esd-block-text" align="center"><h2 style="color: #ffffff; font-size: 30px;"><strong>Time for great email design</strong></h2></td></tr><tr><td class="esd-block-text es-m-txt-c es-p10t" align="center"><p style="color: #ffffff;">I'm a new text block ready for your message content.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><table class="es-content" cellspacing="0" cellpadding="0" align="center"><tbody><tr><td class="esd-stripe" align="center"><table class="es-content-body" width="600" cellspacing="0" cellpadding="0" bgcolor="#ffffff" align="center"><tbody><tr><td class="esd-structure es-p30t es-p20b es-p20r es-p20l" align="left" bgcolor="#F9F9F9" style="background-color: #f9f9f9;"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td width="560" class="esd-container-frame" align="center" valign="top"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-image es-p30t es-p20r" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/image-placeholder.png" alt style="display: block;" width="138"></a></td></tr><tr><td align="center" class="esd-block-text es-p10t es-p40b"><p style="color: #c5c6cc;">Image Placeholder</p></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td class="esd-structure es-p20t es-p20r es-p20l" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td width="560" class="esd-container-frame" align="center" valign="top"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-text"><p style="font-size: 24px; color: #2c3546;"><strong>This is a sample heading</strong><br></p></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #2c3546;">I'm a new text block ready for your message content.</p></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #959aa3; font-size: 10px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor<br> incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud<br>&nbsp;exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table><table class="es-content esd-footer-popover" cellspacing="0" cellpadding="0" align="center"><tbody><tr></tr><tr><td class="esd-stripe" esd-custom-block-id="8631" align="center"><table class="es-footer-body" style="background-color: #ffffff;" width="600" cellspacing="0" cellpadding="0" align="center" bgcolor="#fff"><tbody><tr><td class="esd-structure es-p20t es-p15b es-p20r es-p20l" align="left"> <!--[if mso]><table width="560" cellpadding="0" cellspacing="0"><tr><td width="270" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-left" align="left"><tbody><tr><td width="270" class="es-m-p20b esd-container-frame" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="right" class="esd-block-button"><span class="es-button-border" style="border-radius: 4px; border-color: #5d6980; background: #5d6980; border-width: 1px;"><a href class="es-button" target="_blank" style="color: #ffffff; background: #5d6980; border-color: #5d6980; border-radius: 4px; border-width: 10px 15px;"> Button </a></span></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td><td width="20"></td><td width="270" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-right" align="right"><tbody><tr><td width="270" align="left" class="esd-container-frame"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="left" class="esd-block-button"><span class="es-button-border" style="border-radius: 4px; border-color: #5d6980; background: #ffffff; border-width: 1px;"><a href class="es-button" target="_blank" style="background: #ffffff; border-color: #ffffff; color: #5d6980; border-radius: 4px; border-width: 10px 15px;"> Button </a></span></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td></tr></table><![endif]--></td></tr><tr><td class="esd-structure es-p30t es-p35b es-p40r es-p40l" align="left" bgcolor="#F9F9F9" style="background-color: #f9f9f9;"> <!--[if mso]><table width="520" cellpadding="0" cellspacing="0"><tr><td width="257" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-left" align="left"><tbody><tr><td width="257" class="es-m-p20b esd-container-frame" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-image" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/image-placeholder.png" alt style="display: block;" width="96"></a></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #c5c6cc;">Image Placeholder</p></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td><td width="0"></td><td width="263" valign="top"><![endif]--><table cellpadding="0" cellspacing="0" class="es-right" align="right"><tbody><tr><td width="263" align="left" class="esd-container-frame"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="center" class="esd-block-image" style="font-size: 0px;"><a target="_blank"><img class="adapt-img" src="https://web-image.useinsider.com/email-template/image-placeholder.png" alt style="display: block;" width="96"></a></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #c5c6cc;">Image Placeholder</p></td></tr></tbody></table></td></tr></tbody></table> <!--[if mso]></td></tr></table><![endif]--></td></tr><tr><td class="esd-structure es-p20t es-p15b es-p20r es-p20l" align="left"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td width="560" class="esd-container-frame" align="center" valign="top"><table cellpadding="0" cellspacing="0" width="100%"><tbody><tr><td align="left" class="esd-block-text"><p>Text</p></td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td class="esd-structure es-p20t es-p20b es-p20r es-p20l" align="left" bgcolor="#2C3546" style="background-color: #2c3546;"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td class="esd-container-frame" width="560" valign="top" align="center"><table width="100%" cellspacing="0" cellpadding="0"><tbody><tr><td align="center" class="esd-block-social" style="font-size:0"><table cellpadding="0" cellspacing="0" class="es-table-not-adapt es-social"><tbody><tr><td align="center" valign="top" class="es-p20r" esd-tmp-icon-type="facebook"><a target="_blank" href="https://facebook.com"><img title="Facebook" src="https://web-image.useinsider.com/email-template/facebook.png" alt="Facebook" width="24" height="24"></a></td><td align="center" valign="top" class="es-p20r" esd-tmp-icon-type="twitter"><a target="_blank" href="https://instagram.com"><img title="Instagram" src="https://web-image.useinsider.com/email-template/instagram.png" alt="Instagram" width="24" height="24"></a></td><td align="center" valign="top" esd-tmp-icon-type="instagram"><a target="_blank" href="https://twitter.com"><img title="Twitter" src="https://web-image.useinsider.com/email-template/twitter.png" alt="Twitter" width="24" height="24"></a></td></tr></tbody></table></td></tr><tr><td align="center" class="esd-block-text es-p20"><p style="font-size: 10px;">ADDRESS LINE, PROVINCE, CITY, COUNTRY - 999999</p></td></tr><tr><td align="center" class="esd-block-text"><p style="color: #959aa2; font-size: 10px;">You can <u>unsubscribe</u> from our emails, if you need to.</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></div></body></html>
2
- `;
3
- export {
4
- t as default
5
- };
@@ -1,119 +0,0 @@
1
- const t = `/* CONFIG STYLES Please do not delete and edit CSS styles below */ /* IMPORTANT THIS STYLES MUST BE ON FINAL EMAIL */ #outlook a { padding: 0; }.ExternalClass { width: 100%; }.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; }.es-button { mso-style-priority: 100 !important; text-decoration: none !important; }a[x-apple-data-detectors] { color: inherit !important; text-decoration: none !important; font-size: inherit !important; font-family: inherit !important; font-weight: inherit !important; line-height: inherit !important; }.es-desk-hidden { display: none; float: left; overflow: hidden; width: 0; max-height: 0; line-height: 0; mso-hide: all; }/* END OF IMPORTANT */ html, body { width: 100%; font-family: arial, 'helvetica neue', helvetica, sans-serif; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; }table { mso-table-lspace: 0pt; mso-table-rspace: 0pt; border-collapse: collapse; border-spacing: 0px; }table td, html, body, .es-wrapper { padding: 0; Margin: 0; }.es-content, .es-header, .es-footer { table-layout: fixed !important; width: 100%; }img { display: block; border: 0; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; }table tr { border-collapse: collapse; }p, hr { Margin: 0; }h1, h2, h3, h4, h5 { Margin: 0; line-height: 120%; mso-line-height-rule: exactly; font-family: arial, 'helvetica neue', helvetica, sans-serif; }p, ul li, ol li, a { -webkit-text-size-adjust: none; -ms-text-size-adjust: none; mso-line-height-rule: exactly; }.es-left { float: left; }.es-right { float: right; }.es-p5 { padding: 5px; }.es-p5t { padding-top: 5px; }.es-p5b { padding-bottom: 5px; }.es-p5l { padding-left: 5px; }.es-p5r { padding-right: 5px; }.es-p10 { padding: 10px; }.es-p10t { padding-top: 10px; }.es-p10b { padding-bottom: 10px; }.es-p10l { padding-left: 10px; }.es-p10r { padding-right: 10px; }.es-p15 { padding: 15px; }.es-p15t { padding-top: 15px; }.es-p15b { padding-bottom: 15px; }.es-p15l { padding-left: 15px; }.es-p15r { padding-right: 15px; }.es-p20 { padding: 20px; }.es-p20t { padding-top: 20px; }.es-p20b { padding-bottom: 20px; }.es-p20l { padding-left: 20px; }.es-p20r { padding-right: 20px; }.es-p25 { padding: 25px; }.es-p25t { padding-top: 25px; }.es-p25b { padding-bottom: 25px; }.es-p25l { padding-left: 25px; }.es-p25r { padding-right: 25px; }.es-p30 { padding: 30px; }.es-p30t { padding-top: 30px; }.es-p30b { padding-bottom: 30px; }.es-p30l { padding-left: 30px; }.es-p30r { padding-right: 30px; }.es-p35 { padding: 35px; }.es-p35t { padding-top: 35px; }.es-p35b { padding-bottom: 35px; }.es-p35l { padding-left: 35px; }.es-p35r { padding-right: 35px; }.es-p40 { padding: 40px; }.es-p40t { padding-top: 40px; }.es-p40b { padding-bottom: 40px; }.es-p40l { padding-left: 40px; }.es-p40r { padding-right: 40px; }.es-menu td { border: 0; }.es-menu td a img { display: inline !important; }/* END CONFIG STYLES */ a { text-decoration: underline; }p, ul li, ol li { font-family: arial, 'helvetica neue', helvetica, sans-serif; line-height: 150%; }ul li, ol li { Margin-bottom: 15px; }.es-menu td a { text-decoration: none; display: block; }.es-wrapper { width: 100%; height: 100%; background-image: ; background-repeat: repeat; background-position: center top; }.es-wrapper-color { background-color: #f6f6f6; }.es-header { background-color: transparent; background-image: ; background-repeat: repeat; background-position: center top; }.es-header-body { background-color: transparent; }.es-header-body p, .es-header-body ul li, .es-header-body ol li { color: #333333; font-size: 14px; }.es-header-body a { color: #333333; font-size: 14px; }.es-content-body { background-color: #ffffff; }.es-content-body p, .es-content-body ul li, .es-content-body ol li { color: #333333; font-size: 14px; }.es-content-body a { color: #333333; font-size: 14px; }.es-footer { background-color: transparent; background-image: ; background-repeat: repeat; background-position: center top; }.es-footer-body { background-color: #333333; }.es-footer-body p, .es-footer-body ul li, .es-footer-body ol li { color: #ffffff; font-size: 14px; }.es-footer-body a { color: #ffffff; font-size: 14px; }.es-infoblock, .es-infoblock p, .es-infoblock ul li, .es-infoblock ol li { line-height: 120%; font-size: 12px; color: #cccccc; }.es-infoblock a { font-size: 12px; color: #cccccc; }h1 { font-size: 30px; font-style: normal; font-weight: normal; color: #333333; }h2 { font-size: 24px; font-style: normal; font-weight: normal; color: #333333; }h3 { font-size: 20px; font-style: normal; font-weight: normal; color: #333333; }.es-header-body h1 a, .es-content-body h1 a, .es-footer-body h1 a { font-size: 30px; }.es-header-body h2 a, .es-content-body h2 a, .es-footer-body h2 a { font-size: 24px; }.es-header-body h3 a, .es-content-body h3 a, .es-footer-body h3 a { font-size: 20px; }a.es-button, button.es-button { border-style: solid; border-color: #f0f0f0; border-width: 5px 30px 5px 30px; display: inline-block; background: #f0f0f0; border-radius: 0px; font-size: 16px; font-family: arial, 'helvetica neue', helvetica, sans-serif; font-weight: normal; font-style: normal; line-height: 120%; color: #333333; text-decoration: none; width: auto; text-align: center; }.es-button-border { border-style: solid solid solid solid; border-color: #808080 #808080 #808080 #808080; background: #f0f0f0; border-width: 2px 2px 2px 2px; display: inline-block; border-radius: 0px; width: auto; }.ins-trim-text {
2
- overflow: hidden;
3
- text-overflow: ellipsis;
4
- white-space: nowrap;
5
- padding-top: 10px;
6
- padding-bottom: 10px;
7
- }/* RESPONSIVE STYLES Please do not delete and edit CSS styles below. If you don't need responsive layout, please delete this section. */ @media only screen and (max-width: 600px) {p, ul li, ol li, a { line-height: 150% !important; }h1 { font-size: 30px !important; text-align: center; line-height: 120% !important; }h2 { font-size: 26px !important; text-align: center; line-height: 120% !important; }h3 { font-size: 20px !important; text-align: center; line-height: 120% !important; }.es-header-body h1 a, .es-content-body h1 a, .es-footer-body h1 a { font-size: 30px !important; }.es-header-body h2 a, .es-content-body h2 a, .es-footer-body h2 a { font-size: 26px !important; }.es-header-body h3 a, .es-content-body h3 a, .es-footer-body h3 a { font-size: 20px !important; }.es-menu td a { font-size: 13px !important; }.es-header-body p, .es-header-body ul li, .es-header-body ol li, .es-header-body a { font-size: 16px !important; }.es-content-body p, .es-content-body ul li, .es-content-body ol li, .es-content-body a { font-size: 16px !important; }.es-footer-body p, .es-footer-body ul li, .es-footer-body ol li, .es-footer-body a { font-size: 16px !important; }.es-infoblock p, .es-infoblock ul li, .es-infoblock ol li, .es-infoblock a { font-size: 12px !important; }*[class="gmail-fix"] { display: none !important; }.es-m-txt-c, .es-m-txt-c h1, .es-m-txt-c h2, .es-m-txt-c h3 { text-align: center !important; }.es-m-txt-r, .es-m-txt-r h1, .es-m-txt-r h2, .es-m-txt-r h3 { text-align: right !important; }.es-m-txt-l, .es-m-txt-l h1, .es-m-txt-l h2, .es-m-txt-l h3 { text-align: left !important; }.es-m-txt-r img, .es-m-txt-c img, .es-m-txt-l img { display: inline !important; }.es-button-border { display: block !important; }a.es-button, button.es-button { font-size: 16px !important; display: block !important; border-width: 10px 0px 10px 0px !important; }.es-btn-fw { border-width: 10px 0px !important; text-align: center !important; }.es-adaptive table, .es-btn-fw, .es-btn-fw-brdr, .es-left, .es-right { width: 100% !important; }.ext-product-button,
8
- .ext-product-price p,
9
- .ext-product-original-price p,
10
- .ext-product-omnibus-price p,
11
- .ext-product-omnibus-discount p {
12
- width: 100% !important;
13
- }
14
-
15
- .ext-product-button a {
16
- max-width: 100% !important;
17
- }
18
-
19
- .ext-product-name.ins-vertical p {
20
- height: 90px !important;
21
- overflow: hidden !important;
22
- word-break: break-all !important;
23
- font-size: 12px !important;
24
- line-height: 150% !important;
25
- }
26
-
27
- .ext-product-name.ins-vertical {
28
- height: 100px !important;
29
- }
30
-
31
- .ext-product-omnibus-price.ins-vertical p {
32
- height: 30px !important;
33
- overflow: hidden !important;
34
- word-break: break-all !important;
35
- font-size: 10px !important;
36
- line-height: 150% !important;
37
- }
38
-
39
- .ext-product-omnibus-price.ins-vertical {
40
- height: 50px !important;
41
- }
42
-
43
- .ext-product-omnibus-discount.ins-vertical p {
44
- height: 30px !important;
45
- overflow: hidden !important;
46
- word-break: break-all !important;
47
- font-size: 10px !important;
48
- line-height: 150% !important;
49
- }
50
-
51
- .ext-product-omnibus-discount.ins-vertical {
52
- height: 50px !important;
53
- }
54
-
55
- .ext-product-name p {
56
- height: unset !important;
57
- width: 100% !important;
58
- overflow: hidden !important;
59
- font-size: 16px !important;
60
- line-height: 150% !important;
61
- }
62
-
63
- .ext-product-name {
64
- height: unset !important;
65
- }
66
-
67
- .ext-product-price.ins-vertical p {
68
- overflow: hidden !important;
69
- word-break: break-all !important;
70
- height: 36px !important;
71
- font-size: 12px !important;
72
- line-height: 150% !important;
73
- }
74
-
75
- .ext-product-price.ins-vertical {
76
- height: 56px !important;
77
- }
78
-
79
- .ext-product-original-price.ins-vertical p {
80
- overflow: hidden !important;
81
- word-break: break-all !important;
82
- height: 36px !important;
83
- font-size: 12px !important;
84
- line-height: 150% !important;
85
- }
86
-
87
- .ext-product-original-price.ins-vertical {
88
- height: 56px !important;
89
- }
90
-
91
- .ext-ins-attr.ins-vertical p {
92
- overflow: hidden !important;
93
- word-break: break-all !important;
94
- height: 54px !important;
95
- font-size: 12px !important;
96
- line-height: 150% !important;
97
- width: 100% !important;
98
- }
99
-
100
- .ext-ins-attr.ins-vertical {
101
- height: 74px !important;
102
- }
103
-
104
- .ext-product-button a.ins-vertical {
105
- word-break: break-all !important;
106
- font-size: 12px !important;
107
- }
108
-
109
- .ext-product-image.ins-vertical {
110
- height: unset !important;
111
- }
112
-
113
- td.esdev-mso-td.ins-vertical {
114
- vertical-align: bottom !important;
115
- }.es-content table, .es-header table, .es-footer table, .es-content, .es-footer, .es-header { width: 100% !important; max-width: 600px !important; }.es-adapt-td { display: block !important; width: 100% !important; }.adapt-img { width: 100% !important; height: auto !important; }.es-m-p0 { padding: 0px !important; }.es-m-p0r { padding-right: 0px !important; }.es-m-p0l { padding-left: 0px !important; }.es-m-p0t { padding-top: 0px !important; }.es-m-p0b { padding-bottom: 0 !important; }.es-m-p20b { padding-bottom: 20px !important; }.es-mobile-hidden, .es-hidden { display: none !important; }.es-desk-hidden { display: table-row !important; width: auto !important; overflow: visible !important; float: none !important; max-height: inherit !important; line-height: inherit !important; }.es-desk-menu-hidden { display: table-cell !important; }table.es-table-not-adapt, .esd-block-html table { width: auto !important; }table.es-social { display: inline-block !important; }table.es-social td { display: inline-block !important; } }/* END RESPONSIVE STYLES */.ext-product-name p { -webkit-line-clamp:3 !important;-webkit-box-orient:vertical !important;overflow:hidden !important; }.ext-product-price p { height:26px !important; }
116
- `;
117
- export {
118
- t as default
119
- };