@useinsider/guido 1.0.0-beta.83deaec → 1.0.0-beta.8861b13
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 +17 -17
- package/dist/components/Guido.vue.d.ts +0 -4
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +18 -34
- package/dist/components/organisms/{header/HeaderWrapper.vue.js → top-bar/Header.vue.js} +7 -7
- package/dist/components/organisms/top-bar/Header.vue2.js +14 -0
- package/dist/components/organisms/{header/LeftSlot.vue.js → top-bar/HeaderLeftSlot.vue.js} +7 -7
- package/dist/components/organisms/top-bar/HeaderLeftSlot.vue2.js +11 -0
- package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.js +17 -0
- package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue2.js +19 -0
- package/dist/components/organisms/top-bar/HeaderRightSlot.vue.js +18 -0
- package/dist/components/organisms/top-bar/HeaderRightSlot.vue2.js +14 -0
- package/dist/components/organisms/{header/ViewOptions.vue.js → top-bar/HeaderViewOptions.vue.js} +5 -5
- package/dist/components/organisms/{header/ViewOptions.vue2.js → top-bar/HeaderViewOptions.vue2.js} +3 -3
- package/dist/composables/useStripo.d.ts +2 -2
- package/dist/composables/useStripo.js +55 -48
- package/dist/composables/useToaster.d.ts +0 -1
- package/dist/composables/useToaster.js +16 -24
- package/dist/enums/defaults.d.ts +0 -2
- package/dist/enums/defaults.js +3 -5
- package/dist/guido.css +1 -1
- package/dist/node_modules/pinia/dist/pinia.js +314 -0
- package/dist/node_modules/pinia/node_modules/vue-demi/lib/index.js +11 -0
- package/dist/static/editor.css.js +22 -72
- package/dist/stores/editor.d.ts +0 -2
- package/dist/stores/editor.js +2 -4
- package/package.json +1 -1
- package/dist/components/organisms/base/ModalWrapper.vue.d.ts +0 -72
- package/dist/components/organisms/base/ModalWrapper.vue.js +0 -19
- package/dist/components/organisms/base/ModalWrapper.vue2.js +0 -43
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +0 -14
- package/dist/components/organisms/header/LeftSlot.vue2.js +0 -11
- package/dist/components/organisms/header/MiddleSlot.vue.js +0 -17
- package/dist/components/organisms/header/MiddleSlot.vue2.js +0 -20
- package/dist/components/organisms/header/RightSlot.vue.d.ts +0 -2
- package/dist/components/organisms/header/RightSlot.vue.js +0 -20
- package/dist/components/organisms/header/RightSlot.vue2.js +0 -26
- package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +0 -2
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +0 -22
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +0 -15
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -16
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +0 -18
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue2.js +0 -16
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +0 -18
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +0 -23
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.d.ts +0 -21
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +0 -22
- package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +0 -81
- package/dist/composables/useHttp.js +0 -84
- package/dist/composables/usePartner.d.ts +0 -4
- package/dist/composables/usePartner.js +0 -16
- package/dist/composables/useTemplateCategories.d.ts +0 -38
- package/dist/composables/useTemplateCategories.js +0 -80
- package/dist/composables/useTemplateValidation.d.ts +0 -13
- package/dist/composables/useTemplateValidation.js +0 -57
- package/dist/composables/useVersionHistoryApi.d.ts +0 -8
- package/dist/composables/useVersionHistoryApi.js +0 -53
- package/dist/mock/api/custom-fonts.d.ts +0 -2
- package/dist/mock/api/template-library.d.ts +0 -2
- package/dist/services/stripoApi.d.ts +0 -7
- package/dist/services/stripoApi.js +0 -29
- package/dist/stores/version-history.d.ts +0 -80
- package/dist/stores/version-history.js +0 -28
- package/dist/utils/dateUtil.d.ts +0 -1
- package/dist/utils/dateUtil.js +0 -16
- /package/dist/components/organisms/{header/HeaderWrapper.vue.d.ts → top-bar/Header.vue.d.ts} +0 -0
- /package/dist/components/organisms/{header/LeftSlot.vue.d.ts → top-bar/HeaderLeftSlot.vue.d.ts} +0 -0
- /package/dist/components/organisms/{header/ViewOptions.vue.d.ts → top-bar/HeaderMiddleSlot.vue.d.ts} +0 -0
- /package/dist/components/organisms/{header/MiddleSlot.vue.d.ts → top-bar/HeaderRightSlot.vue.d.ts} +0 -0
- /package/dist/components/organisms/{header/version-history/ViewOptions.vue.d.ts → top-bar/HeaderViewOptions.vue.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -24,7 +24,6 @@ npm install @useinsider/guido
|
|
|
24
24
|
<div>
|
|
25
25
|
<Guido
|
|
26
26
|
:email-id="emailId"
|
|
27
|
-
:user-id="userId"
|
|
28
27
|
:guido-config="guidoConfig"
|
|
29
28
|
/>
|
|
30
29
|
</div>
|
|
@@ -40,7 +39,6 @@ export default {
|
|
|
40
39
|
data() {
|
|
41
40
|
return {
|
|
42
41
|
emailId: 'abc123',
|
|
43
|
-
userId: '12345',
|
|
44
42
|
guidoConfig: {
|
|
45
43
|
translationsPath: 'window.trans.en'
|
|
46
44
|
}
|
|
@@ -57,10 +55,6 @@ export default {
|
|
|
57
55
|
| Prop | Type | Required | Default | Description |
|
|
58
56
|
|------|------|----------|---------|-------------|
|
|
59
57
|
| `emailId` | `string` | ✅ | - | Unique identifier for the email draft |
|
|
60
|
-
| `userId` | `string` | ✅ | - | Unique identifier for the user draft |
|
|
61
|
-
| `username` | `string` | ⚪ | Guido User | User name |
|
|
62
|
-
| `partnerName` | `string` | ⚪ | Getting from URL host | Unique identifier for the partner draft |
|
|
63
|
-
| `productType` | `string` | ⚪ | Getting from URL path | Unique identifier for the product draft |
|
|
64
58
|
| `guidoConfig` | `GuidoConfig` | ✅ | - | Configuration object for the editor |
|
|
65
59
|
|
|
66
60
|
### GuidoConfig Interface
|
|
@@ -144,17 +138,23 @@ VITE_STRIPO_ROLE=your_role
|
|
|
144
138
|
|
|
145
139
|
```
|
|
146
140
|
src/
|
|
147
|
-
├── components/
|
|
148
|
-
├──
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
├──
|
|
153
|
-
├──
|
|
154
|
-
|
|
155
|
-
├──
|
|
156
|
-
├──
|
|
157
|
-
|
|
141
|
+
├── components/
|
|
142
|
+
│ ├── Guido.vue # Main component
|
|
143
|
+
│ └── organisms/
|
|
144
|
+
│ └── top-bar/ # Header components
|
|
145
|
+
...
|
|
146
|
+
├── composables/
|
|
147
|
+
│ ├── useStripo.ts # Stripo integration
|
|
148
|
+
│ └── useTranslations.ts # Translation management
|
|
149
|
+
├── @types/
|
|
150
|
+
│ ├── generic.ts # Generic types
|
|
151
|
+
│ ├── stripo.d.ts # Stripo-specific types
|
|
152
|
+
│ └── events.ts # Event types
|
|
153
|
+
├── static/
|
|
154
|
+
│ ├── editor.css # Custom editor styles
|
|
155
|
+
│ └── templates/
|
|
156
|
+
│ └── default/ # Default email template
|
|
157
|
+
└── library.ts # Main export for library
|
|
158
158
|
```
|
|
159
159
|
|
|
160
160
|
## 🌐 i18n
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { GuidoConfig } from '@@/Types/generic';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
emailId: string;
|
|
4
|
-
userId: string;
|
|
5
|
-
partnerName?: string;
|
|
6
|
-
productType?: string;
|
|
7
|
-
username?: string;
|
|
8
4
|
guidoConfig: GuidoConfig;
|
|
9
5
|
};
|
|
10
6
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
},
|
|
5
|
+
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper" }, [r(t.Header), r("div", { staticClass: "guido-editor__container", attrs: { id: "guido-editor" } })], 1);
|
|
7
|
+
}, _ = [], a = /* @__PURE__ */ i(
|
|
8
8
|
o,
|
|
9
9
|
s,
|
|
10
|
-
|
|
10
|
+
_,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"ef4897b1"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const p = a.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
p as default
|
|
18
18
|
};
|
|
@@ -1,47 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
import M from "./organisms/save-template/SaveTemplateModal.vue.js";
|
|
8
|
-
import { useEditorStore as P } from "../stores/editor.js";
|
|
9
|
-
const F = /* @__PURE__ */ g({
|
|
1
|
+
import { defineComponent as n, onMounted as a } from "vue";
|
|
2
|
+
import { useStripo as m } from "../composables/useStripo.js";
|
|
3
|
+
import { useTemplates as p } from "../composables/useTemplates.js";
|
|
4
|
+
import { DefaultGuidoConfig as u } from "../enums/defaults.js";
|
|
5
|
+
import l from "./organisms/top-bar/Header.vue.js";
|
|
6
|
+
const _ = /* @__PURE__ */ n({
|
|
10
7
|
__name: "Guido",
|
|
11
8
|
props: {
|
|
12
9
|
emailId: null,
|
|
13
|
-
userId: null,
|
|
14
|
-
partnerName: null,
|
|
15
|
-
productType: null,
|
|
16
|
-
username: null,
|
|
17
10
|
guidoConfig: null
|
|
18
11
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const o =
|
|
21
|
-
emailId: a,
|
|
22
|
-
userId: n,
|
|
23
|
-
guidoConfig: i,
|
|
24
|
-
partnerName: l = t(),
|
|
25
|
-
productType: m = r(),
|
|
26
|
-
username: p = y
|
|
27
|
-
} = o;
|
|
12
|
+
setup(r) {
|
|
13
|
+
const o = r;
|
|
28
14
|
window.GuidoConfig = {
|
|
29
|
-
...
|
|
30
|
-
...
|
|
15
|
+
...u,
|
|
16
|
+
...o.guidoConfig
|
|
31
17
|
};
|
|
32
|
-
const { initPlugin:
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
return T(async () => {
|
|
18
|
+
const { initPlugin: i } = m(o.emailId), { getDefaultTemplate: e } = p();
|
|
19
|
+
return a(async () => {
|
|
36
20
|
try {
|
|
37
|
-
const
|
|
38
|
-
await
|
|
39
|
-
} catch (
|
|
40
|
-
console.error("Failed to initialize Stripo editor:",
|
|
21
|
+
const t = await e();
|
|
22
|
+
await i(t);
|
|
23
|
+
} catch (t) {
|
|
24
|
+
console.error("Failed to initialize Stripo editor:", t);
|
|
41
25
|
}
|
|
42
|
-
}), { __sfc: !0, props: o,
|
|
26
|
+
}), { __sfc: !0, props: o, initPlugin: i, getDefaultTemplate: e, Header: l };
|
|
43
27
|
}
|
|
44
28
|
});
|
|
45
29
|
export {
|
|
46
|
-
|
|
30
|
+
_ as default
|
|
47
31
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import t from "./
|
|
1
|
+
import t from "./Header.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
3
|
+
var a = function() {
|
|
4
4
|
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
5
|
-
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.
|
|
6
|
-
},
|
|
5
|
+
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.HeaderLeftSlot), r(e.HeaderMiddleSlot), r(e.HeaderRightSlot)], 1)]);
|
|
6
|
+
}, n = [], _ = /* @__PURE__ */ s(
|
|
7
7
|
t,
|
|
8
|
-
n,
|
|
9
8
|
a,
|
|
9
|
+
n,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const c = _.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
c as default
|
|
17
17
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineComponent as e } from "vue";
|
|
2
|
+
import { InContainer as r } from "@useinsider/design-system-vue";
|
|
3
|
+
import o from "./HeaderLeftSlot.vue.js";
|
|
4
|
+
import t from "./HeaderMiddleSlot.vue.js";
|
|
5
|
+
import m from "./HeaderRightSlot.vue.js";
|
|
6
|
+
const _ = /* @__PURE__ */ e({
|
|
7
|
+
__name: "Header",
|
|
8
|
+
setup(f) {
|
|
9
|
+
return { __sfc: !0, InContainer: r, HeaderLeftSlot: o, HeaderMiddleSlot: t, HeaderRightSlot: m };
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
_ as default
|
|
14
|
+
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import n from "./HeaderLeftSlot.vue2.js";
|
|
2
2
|
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var _ = function() {
|
|
4
|
-
var t = this, e = t._self._c,
|
|
5
|
-
return e("div", [e(
|
|
6
|
-
},
|
|
7
|
-
|
|
4
|
+
var t = this, e = t._self._c, r = t._self._setupProxy;
|
|
5
|
+
return e("div", [e(r.InButtonV2, { attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" } })], 1);
|
|
6
|
+
}, a = [], s = /* @__PURE__ */ o(
|
|
7
|
+
n,
|
|
8
8
|
_,
|
|
9
|
-
|
|
9
|
+
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const i =
|
|
14
|
+
const i = s.exports;
|
|
15
15
|
export {
|
|
16
16
|
i as default
|
|
17
17
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
import { InButtonV2 as e } from "@useinsider/design-system-vue";
|
|
3
|
+
const _ = /* @__PURE__ */ t({
|
|
4
|
+
__name: "HeaderLeftSlot",
|
|
5
|
+
setup(o) {
|
|
6
|
+
return { __sfc: !0, InButtonV2: e };
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
_ as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import n from "./HeaderMiddleSlot.vue2.js";
|
|
2
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var i = function() {
|
|
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__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), e(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") } }), e(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__ */ s(
|
|
7
|
+
n,
|
|
8
|
+
i,
|
|
9
|
+
l,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const _ = r.exports;
|
|
15
|
+
export {
|
|
16
|
+
_ as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as i } from "vue";
|
|
2
|
+
import { useTranslations as n } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { useEditorStore as s } from "../../../stores/editor.js";
|
|
4
|
+
import { InButtonV2 as r } from "@useinsider/design-system-vue";
|
|
5
|
+
const l = /* @__PURE__ */ i({
|
|
6
|
+
__name: "HeaderMiddleSlot",
|
|
7
|
+
setup(p) {
|
|
8
|
+
const t = s(), o = n();
|
|
9
|
+
return { __sfc: !0, editorStore: t, trans: o, getTooltipOptions: (e) => ({
|
|
10
|
+
id: `${e}-tooltip`,
|
|
11
|
+
dynamicPosition: !1,
|
|
12
|
+
staticPosition: "bottom center",
|
|
13
|
+
iconStatus: !1
|
|
14
|
+
}), InButtonV2: r };
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
l as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import o from "./HeaderRightSlot.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
5
|
+
var s = this, t = s._self._c, e = s._self._setupProxy;
|
|
6
|
+
return t("div", { staticClass: "d-f header-right-slot" }, [t("div", { staticClass: "d-f" }, [t(e.HeaderViewOptions)], 1), t("div", { staticClass: "d-f" }, [t(e.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1 } }), t(e.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "label-text-status": !1 }, on: { click: e.exportHtml } }), t(e.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "label-text-status": !1 } }), t(e.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "label-text-status": !1 } })], 1), t(e.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save" } })], 1);
|
|
7
|
+
}, i = [], r = /* @__PURE__ */ n(
|
|
8
|
+
o,
|
|
9
|
+
a,
|
|
10
|
+
i,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"28200d25"
|
|
14
|
+
);
|
|
15
|
+
const u = r.exports;
|
|
16
|
+
export {
|
|
17
|
+
u as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineComponent as o } from "vue";
|
|
2
|
+
import { useExport as r } from "../../../composables/useExport.js";
|
|
3
|
+
import { InButtonV2 as e } from "@useinsider/design-system-vue";
|
|
4
|
+
import m from "./HeaderViewOptions.vue.js";
|
|
5
|
+
const _ = /* @__PURE__ */ o({
|
|
6
|
+
__name: "HeaderRightSlot",
|
|
7
|
+
setup(p) {
|
|
8
|
+
const { exportHtml: t } = r();
|
|
9
|
+
return { __sfc: !0, exportHtml: t, InButtonV2: e, HeaderViewOptions: m };
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
_ as default
|
|
14
|
+
};
|
package/dist/components/organisms/{header/ViewOptions.vue.js → top-bar/HeaderViewOptions.vue.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import r from "./
|
|
2
|
-
/* empty css
|
|
1
|
+
import r from "./HeaderViewOptions.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
3
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var n = function() {
|
|
5
5
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
@@ -10,9 +10,9 @@ var n = function() {
|
|
|
10
10
|
i,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"f67c82be"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = _.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
package/dist/components/organisms/{header/ViewOptions.vue2.js → top-bar/HeaderViewOptions.vue2.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as e } from "vue";
|
|
2
2
|
import { useEditorStore as t } from "../../../stores/editor.js";
|
|
3
3
|
import { InSegments as o } from "@useinsider/design-system-vue";
|
|
4
|
-
const
|
|
5
|
-
__name: "
|
|
4
|
+
const a = /* @__PURE__ */ e({
|
|
5
|
+
__name: "HeaderViewOptions",
|
|
6
6
|
setup(n) {
|
|
7
7
|
return { __sfc: !0, editorStore: t(), segmentList: [
|
|
8
8
|
{ text: "", icon: "line-desktop", value: "desktop" },
|
|
@@ -11,5 +11,5 @@ const u = /* @__PURE__ */ e({
|
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
a as default
|
|
15
15
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const useStripo: (
|
|
1
|
+
import type { Template } from '@@/Types/stripo';
|
|
2
|
+
export declare const useStripo: (emailId: string) => {
|
|
3
3
|
initPlugin: (template: Template) => Promise<void>;
|
|
4
4
|
};
|
|
@@ -1,74 +1,81 @@
|
|
|
1
|
-
import { useCustomInterfaceAppearance as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const r =
|
|
1
|
+
import { useCustomInterfaceAppearance as u } from "./useCustomInterfaceAppearance.js";
|
|
2
|
+
import { useEditorStore as l } from "../stores/editor.js";
|
|
3
|
+
const g = (s) => {
|
|
4
|
+
const c = () => {
|
|
5
|
+
const t = new Headers();
|
|
6
|
+
t.append("Content-Type", "application/json");
|
|
7
|
+
const r = JSON.stringify({
|
|
8
|
+
pluginId: void 0,
|
|
9
|
+
secretKey: void 0,
|
|
10
|
+
role: void 0,
|
|
11
|
+
userId: s
|
|
12
|
+
});
|
|
13
|
+
return fetch("/v2/stripo/get-token", {
|
|
14
|
+
method: "POST",
|
|
15
|
+
headers: t,
|
|
16
|
+
body: r,
|
|
17
|
+
redirect: "follow"
|
|
18
|
+
}).then((o) => o.json());
|
|
19
|
+
}, d = (t) => {
|
|
20
|
+
const r = l(), n = t.html, o = t.css;
|
|
8
21
|
window.UIEditor.initEditor(
|
|
9
22
|
document.querySelector("#guido-editor"),
|
|
10
23
|
{
|
|
11
|
-
metadata:
|
|
12
|
-
|
|
13
|
-
|
|
24
|
+
metadata: {
|
|
25
|
+
emailId: s,
|
|
26
|
+
userId: "1",
|
|
27
|
+
username: "Plugin Demo User"
|
|
28
|
+
},
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
30
|
+
html: n,
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
32
|
+
css: o,
|
|
14
33
|
locale: "en",
|
|
15
34
|
undoButtonSelector: "#guido__undo-button",
|
|
16
35
|
redoButtonSelector: "#guido__redo-button",
|
|
17
36
|
mobileViewButtonSelector: ".guido__view-option-selection-mobile",
|
|
18
37
|
desktopViewButtonSelector: ".guido__view-option-selection-desktop",
|
|
38
|
+
versionHistoryButtonSelector: "#guido__history-button",
|
|
19
39
|
codeEditorButtonSelector: "#guido__code-button",
|
|
20
|
-
|
|
21
|
-
showDefaultStandardFonts: !0,
|
|
22
|
-
showDefaultNotStandardFonts: !0,
|
|
23
|
-
customFonts: i
|
|
24
|
-
},
|
|
25
|
-
async onTokenRefreshRequest(o) {
|
|
40
|
+
async onTokenRefreshRequest(e) {
|
|
26
41
|
try {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
} catch (
|
|
30
|
-
|
|
42
|
+
const i = await c();
|
|
43
|
+
e(i.token);
|
|
44
|
+
} catch (i) {
|
|
45
|
+
console.error("Failed to refresh token:", i);
|
|
31
46
|
}
|
|
32
47
|
},
|
|
33
48
|
onTemplateLoaded() {
|
|
34
49
|
try {
|
|
35
|
-
const { importCss:
|
|
36
|
-
|
|
37
|
-
} catch (
|
|
38
|
-
|
|
50
|
+
const { importCss: e } = u();
|
|
51
|
+
e();
|
|
52
|
+
} catch (e) {
|
|
53
|
+
console.error("Failed to load custom interface appearance:", e);
|
|
39
54
|
}
|
|
40
55
|
},
|
|
41
|
-
onCodeEditorVisibilityChanged(
|
|
42
|
-
r.isCodeEditorOpen =
|
|
56
|
+
onCodeEditorVisibilityChanged(e) {
|
|
57
|
+
r.isCodeEditorOpen = e;
|
|
43
58
|
},
|
|
44
|
-
onEditorVisualModeChanged(
|
|
45
|
-
r.editorVisualMode =
|
|
46
|
-
},
|
|
47
|
-
onVersionHistoryVisibilityChanged(o) {
|
|
48
|
-
r.isVersionHistoryOpen = o;
|
|
59
|
+
onEditorVisualModeChanged(e) {
|
|
60
|
+
r.editorVisualMode = e.toLowerCase();
|
|
49
61
|
}
|
|
50
62
|
}
|
|
51
63
|
);
|
|
52
|
-
}
|
|
64
|
+
};
|
|
65
|
+
return { initPlugin: (t) => new Promise((r, n) => {
|
|
53
66
|
if (document.getElementById("UiEditorScript")) {
|
|
54
|
-
|
|
67
|
+
d(t), r();
|
|
55
68
|
return;
|
|
56
69
|
}
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
}, document.body.appendChild(
|
|
64
|
-
});
|
|
65
|
-
return { initPlugin: async (e) => {
|
|
66
|
-
await p(async () => {
|
|
67
|
-
const i = await a();
|
|
68
|
-
l(e, i);
|
|
69
|
-
});
|
|
70
|
-
} };
|
|
70
|
+
const o = document.createElement("script");
|
|
71
|
+
o.id = "UiEditorScript", o.type = "module", o.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", o.onload = () => {
|
|
72
|
+
d(t), r();
|
|
73
|
+
}, o.onerror = () => {
|
|
74
|
+
const e = new Error("Failed to load Stripo UIEditor script");
|
|
75
|
+
n(e);
|
|
76
|
+
}, document.body.appendChild(o);
|
|
77
|
+
}) };
|
|
71
78
|
};
|
|
72
79
|
export {
|
|
73
|
-
|
|
80
|
+
g as useStripo
|
|
74
81
|
};
|
|
@@ -1,37 +1,29 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
const
|
|
3
|
-
const t =
|
|
1
|
+
import { ref as u, watch as f } from "vue";
|
|
2
|
+
const T = () => {
|
|
3
|
+
const t = u(!1), s = u(""), r = u("success"), o = u([]);
|
|
4
4
|
let a = null;
|
|
5
|
-
function
|
|
5
|
+
function l() {
|
|
6
6
|
a && (clearTimeout(a), a = null);
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
t.value = !1,
|
|
8
|
+
function c() {
|
|
9
|
+
t.value = !1, o.value = [], s.value = "";
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
|
|
11
|
+
function n(e = { message: "" }) {
|
|
12
|
+
c(), s.value = e.message, r.value = e.type || "success", o.value = e.actionButton ? [e.actionButton] : [], t.value = !0;
|
|
13
13
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
type: "error",
|
|
18
|
-
message: `${r}: ${m}`
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
return T([t, s], ([e, r]) => {
|
|
22
|
-
i(), e && r && (a = setTimeout(() => {
|
|
23
|
-
u();
|
|
14
|
+
return f([t, s], ([e, i]) => {
|
|
15
|
+
l(), e && i && (a = setTimeout(() => {
|
|
16
|
+
c();
|
|
24
17
|
}, 6e3));
|
|
25
18
|
}), {
|
|
26
19
|
isToasterVisible: t,
|
|
27
20
|
toasterMessage: s,
|
|
28
|
-
toasterType:
|
|
29
|
-
toasterActionButton:
|
|
30
|
-
showToaster:
|
|
31
|
-
hideToaster:
|
|
32
|
-
handleError: f
|
|
21
|
+
toasterType: r,
|
|
22
|
+
toasterActionButton: o,
|
|
23
|
+
showToaster: n,
|
|
24
|
+
hideToaster: c
|
|
33
25
|
};
|
|
34
26
|
};
|
|
35
27
|
export {
|
|
36
|
-
|
|
28
|
+
T as useToaster
|
|
37
29
|
};
|
package/dist/enums/defaults.d.ts
CHANGED
package/dist/enums/defaults.js
CHANGED
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
[data-v-f67c82be] .guido__view-option-selection-desktop svg,[data-v-f67c82be] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}.header-right-slot[data-v-28200d25]{gap:16px}.guido-editor__wrapper[data-v-ef4897b1],.guido-editor__container[data-v-ef4897b1]{width:100%;height:100vh}
|