@useinsider/guido 1.0.0-beta.401ddbd → 1.0.0-beta.4235d65
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 +6 -1
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +26 -22
- package/dist/components/organisms/header/LeftSlot.vue.d.ts +1 -1
- package/dist/components/organisms/header/LeftSlot.vue.js +8 -8
- package/dist/components/organisms/header/LeftSlot.vue2.js +5 -3
- package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
- package/dist/components/organisms/header/MiddleSlot.vue2.js +6 -4
- package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/components/organisms/header/RightSlot.vue.js +4 -7
- package/dist/components/organisms/header/RightSlot.vue2.js +13 -24
- package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +2 -0
- package/dist/components/organisms/header/version-history/RestoreButton.vue.js +19 -0
- package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +14 -0
- package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +13 -1
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +13 -10
- package/dist/components/organisms/{header → save-template}/SaveTemplateModal.vue.d.ts +3 -8
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +20 -0
- package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +78 -0
- package/dist/components/wrappers/ModalWrapper.vue.d.ts +72 -0
- package/dist/components/wrappers/ModalWrapper.vue.js +19 -0
- package/dist/components/wrappers/ModalWrapper.vue2.js +43 -0
- package/dist/composables/useActionsApi.d.ts +2 -1
- package/dist/composables/useActionsApi.js +42 -33
- package/dist/composables/useCustomInterfaceAppearance.js +45 -9
- package/dist/composables/useSaveAsTemplate.d.ts +7 -0
- package/dist/composables/useSaveAsTemplate.js +51 -0
- package/dist/composables/useStripo.js +13 -8
- package/dist/composables/useTemplateNameValidation.d.ts +7 -0
- package/dist/composables/useTemplateNameValidation.js +31 -0
- package/dist/enums/displayConditions.d.ts +2 -0
- package/dist/enums/displayConditions.js +80 -0
- package/dist/guido.css +1 -1
- package/dist/static/styles/base.css.js +11 -0
- package/dist/static/styles/components/alert-message.css.js +39 -0
- package/dist/static/styles/components/amp-block.css.js +18 -0
- package/dist/static/styles/components/base-input.css.js +47 -0
- package/dist/static/styles/components/button-group.css.js +54 -0
- package/dist/static/styles/components/button.css.js +106 -0
- package/dist/static/styles/components/combobox.css.js +49 -0
- package/dist/static/styles/components/counter.css.js +42 -0
- package/dist/static/styles/components/dropdown-menu.css.js +52 -0
- package/dist/static/styles/components/narrow-panel.css.js +38 -0
- package/dist/static/styles/components/switcher.css.js +11 -0
- package/dist/static/styles/components/tabs.css.js +97 -0
- package/dist/static/styles/components/tools.css.js +23 -0
- package/dist/static/styles/components/version-history.css.js +30 -0
- package/dist/static/styles/components/wide-panel.css.js +135 -0
- package/dist/static/styles/variables.css.js +23 -0
- package/dist/stores/editor.d.ts +1 -0
- package/dist/stores/editor.js +2 -1
- package/dist/stores/template-categories.d.ts +41 -0
- package/dist/stores/template-categories.js +91 -0
- package/dist/utils/base64.d.ts +2 -0
- package/dist/utils/base64.js +14 -0
- package/dist/utils/textUtil.d.ts +2 -0
- package/package.json +5 -7
- package/dist/components/organisms/header/SaveTemplateModal.vue.js +0 -21
- package/dist/components/organisms/header/SaveTemplateModal.vue2.js +0 -61
- package/dist/composables/useTemplateValidation.d.ts +0 -13
- package/dist/composables/useTemplateValidation.js +0 -57
- package/dist/static/editor.css.js +0 -232
package/README.md
CHANGED
|
@@ -211,7 +211,12 @@ ISC License
|
|
|
211
211
|
- [@useinsider/design-system-vue](https://github.com/useinsider/design-system-vue) - Insider's Vue design system
|
|
212
212
|
|
|
213
213
|
## 🎯 TODO:
|
|
214
|
-
-
|
|
214
|
+
- CSS part should be optimized with variables & `sass-loader`.
|
|
215
215
|
- Master Version Generator should be fixed.
|
|
216
216
|
- Playwright integration
|
|
217
217
|
- Commitlint & Precommit Hooks integration
|
|
218
|
+
- We need to emit save event and we should return template config to it
|
|
219
|
+
- Default template should be same with production
|
|
220
|
+
- Open Guido with saved template
|
|
221
|
+
- Get User ID, Email and Unique Template ID as dynamic from props
|
|
222
|
+
- Get Pre-built display conditions from API
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import a from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
},
|
|
5
|
+
var t = this, e = t._self._c, r = t._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "guido-editor__wrapper" }, [e(r.HeaderWrapper), e("div", { staticClass: "guido-editor__container", attrs: { id: "guido-editor" } }), e(r.SaveTemplateModal, { attrs: { "is-open": r.editorStore.isSaveTemplateModalOpen }, on: { close: r.handleCloseSaveTemplateModal } })], 1);
|
|
7
|
+
}, i = [], n = /* @__PURE__ */ a(
|
|
8
8
|
o,
|
|
9
9
|
s,
|
|
10
|
-
|
|
10
|
+
i,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"69c35c60"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const c = n.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
c as default
|
|
18
18
|
};
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePartner as
|
|
3
|
-
import { useStripo as
|
|
4
|
-
import { useTemplates as
|
|
5
|
-
import { DefaultUsername as
|
|
6
|
-
import
|
|
7
|
-
|
|
1
|
+
import { defineComponent as g, onMounted as T } from "vue";
|
|
2
|
+
import { usePartner as S } from "../composables/usePartner.js";
|
|
3
|
+
import { useStripo as C } from "../composables/useStripo.js";
|
|
4
|
+
import { useTemplates as _ } from "../composables/useTemplates.js";
|
|
5
|
+
import { DefaultUsername as y, DefaultGuidoConfig as w } from "../enums/defaults.js";
|
|
6
|
+
import I from "./organisms/header/HeaderWrapper.vue.js";
|
|
7
|
+
import M from "./organisms/save-template/SaveTemplateModal.vue.js";
|
|
8
|
+
import { useEditorStore as P } from "../stores/editor.js";
|
|
9
|
+
const F = /* @__PURE__ */ g({
|
|
8
10
|
__name: "Guido",
|
|
9
11
|
props: {
|
|
10
12
|
emailId: null,
|
|
@@ -14,30 +16,32 @@ const h = /* @__PURE__ */ f({
|
|
|
14
16
|
username: null,
|
|
15
17
|
guidoConfig: null
|
|
16
18
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const o =
|
|
19
|
-
emailId:
|
|
20
|
-
userId:
|
|
21
|
-
guidoConfig:
|
|
22
|
-
partnerName:
|
|
23
|
-
productType:
|
|
24
|
-
username:
|
|
19
|
+
setup(f) {
|
|
20
|
+
const o = f, { getPartnerName: t, getProductType: r } = S(), {
|
|
21
|
+
emailId: a,
|
|
22
|
+
userId: n,
|
|
23
|
+
guidoConfig: i,
|
|
24
|
+
partnerName: l = t(),
|
|
25
|
+
productType: m = r(),
|
|
26
|
+
username: p = y
|
|
25
27
|
} = o;
|
|
26
28
|
window.GuidoConfig = {
|
|
27
|
-
...
|
|
28
|
-
...
|
|
29
|
+
...w,
|
|
30
|
+
...i
|
|
29
31
|
};
|
|
30
|
-
const { initPlugin:
|
|
31
|
-
|
|
32
|
+
const { initPlugin: u } = C({ emailId: a, userId: n, username: p, partnerName: l, productType: m }), { getDefaultTemplate: s } = _(), d = P(), c = () => {
|
|
33
|
+
d.isSaveTemplateModalOpen = !1;
|
|
34
|
+
};
|
|
35
|
+
return T(async () => {
|
|
32
36
|
try {
|
|
33
37
|
const e = await s();
|
|
34
|
-
await
|
|
38
|
+
await u(e);
|
|
35
39
|
} catch (e) {
|
|
36
40
|
console.error("Failed to initialize Stripo editor:", e);
|
|
37
41
|
}
|
|
38
|
-
}), { __sfc: !0, props: o, getPartnerName:
|
|
42
|
+
}), { __sfc: !0, props: o, getPartnerName: t, getProductType: r, emailId: a, userId: n, guidoConfig: i, partnerName: l, productType: m, username: p, initPlugin: u, getDefaultTemplate: s, editorStore: d, handleCloseSaveTemplateModal: c, HeaderWrapper: I, SaveTemplateModal: M };
|
|
39
43
|
}
|
|
40
44
|
});
|
|
41
45
|
export {
|
|
42
|
-
|
|
46
|
+
F as default
|
|
43
47
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import r from "./LeftSlot.vue2.js";
|
|
2
2
|
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
4
|
-
var t = this, e = t._self._c,
|
|
5
|
-
return e("div", [e(
|
|
6
|
-
},
|
|
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);
|
|
6
|
+
}, a = [], i = /* @__PURE__ */ o(
|
|
7
7
|
r,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
n,
|
|
9
|
+
a,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const f = i.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
f as default
|
|
17
17
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { defineComponent as t } from "vue";
|
|
2
|
-
import {
|
|
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";
|
|
3
5
|
const _ = /* @__PURE__ */ t({
|
|
4
6
|
__name: "LeftSlot",
|
|
5
|
-
setup(
|
|
6
|
-
return { __sfc: !0,
|
|
7
|
+
setup(m) {
|
|
8
|
+
return { __sfc: !0, editorStore: o(), InButtonV2: r, RestoreButton: e };
|
|
7
9
|
}
|
|
8
10
|
});
|
|
9
11
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import s from "./MiddleSlot.vue2.js";
|
|
2
|
-
import
|
|
3
|
-
var
|
|
2
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var n = function() {
|
|
4
4
|
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ? o(t.VersionHistory) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.trans("newsletter.email-preview") } })], 1);
|
|
6
|
-
}, l = [], r = /* @__PURE__ */
|
|
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
7
|
s,
|
|
8
|
-
|
|
8
|
+
n,
|
|
9
9
|
l,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const p = r.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
p as default
|
|
17
17
|
};
|
|
@@ -3,18 +3,20 @@ import { useTranslations as s } from "../../../composables/useTranslations.js";
|
|
|
3
3
|
import { useEditorStore as n } from "../../../stores/editor.js";
|
|
4
4
|
import { InButtonV2 as e } from "@useinsider/design-system-vue";
|
|
5
5
|
import m from "./version-history/VersionHistory.vue.js";
|
|
6
|
-
|
|
6
|
+
import p from "./version-history/ViewOptions.vue.js";
|
|
7
|
+
import f from "./ViewOptions.vue.js";
|
|
8
|
+
const y = /* @__PURE__ */ r({
|
|
7
9
|
__name: "MiddleSlot",
|
|
8
|
-
setup(
|
|
10
|
+
setup(a) {
|
|
9
11
|
const o = n(), t = s();
|
|
10
12
|
return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
|
|
11
13
|
id: `${i}-tooltip`,
|
|
12
14
|
dynamicPosition: !1,
|
|
13
15
|
staticPosition: "bottom center",
|
|
14
16
|
iconStatus: !1
|
|
15
|
-
}), InButtonV2: e, VersionHistory: m };
|
|
17
|
+
}), InButtonV2: e, VersionHistory: m, VersionHistoryViewOptions: p, ViewOptions: f };
|
|
16
18
|
}
|
|
17
19
|
});
|
|
18
20
|
export {
|
|
19
|
-
|
|
21
|
+
y as default
|
|
20
22
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
import o from "./RightSlot.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
2
|
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
3
|
var n = function() {
|
|
5
4
|
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
-
return e("div",
|
|
7
|
-
return t.restoreVersion(t.versionHistoryStore.currentPatch.id);
|
|
8
|
-
} } }) : e(t.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save" } })], 1), e(t.SaveTemplateModal, { attrs: { "html-data": t.currentHtmlData, "is-open": t.isSaveTemplateModalOpen }, on: { close: t.handleCloseSaveTemplateModal } })], 1);
|
|
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 }, on: { click: t.handleSaveAsTemplate } }), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.editorStore.isVersionHistoryOpen } })], 1);
|
|
9
6
|
}, r = [], a = /* @__PURE__ */ i(
|
|
10
7
|
o,
|
|
11
8
|
n,
|
|
12
9
|
r,
|
|
13
10
|
!1,
|
|
14
11
|
null,
|
|
15
|
-
|
|
12
|
+
null
|
|
16
13
|
);
|
|
17
|
-
const
|
|
14
|
+
const c = a.exports;
|
|
18
15
|
export {
|
|
19
|
-
|
|
16
|
+
c as default
|
|
20
17
|
};
|
|
@@ -1,34 +1,23 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { InButtonV2 as H } from "@useinsider/design-system-vue";
|
|
8
|
-
import S from "./SaveTemplateModal.vue.js";
|
|
9
|
-
import v from "./version-history/ViewOptions.vue.js";
|
|
10
|
-
import h from "./ViewOptions.vue.js";
|
|
11
|
-
const b = /* @__PURE__ */ c({
|
|
1
|
+
import { defineComponent as s } from "vue";
|
|
2
|
+
import { useExport as n } from "../../../composables/useExport.js";
|
|
3
|
+
import { useVersionHistoryApi as i } 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 H = /* @__PURE__ */ s({
|
|
12
7
|
__name: "RightSlot",
|
|
13
|
-
setup(
|
|
14
|
-
const { exportHtml:
|
|
15
|
-
return { __sfc: !0, exportHtml:
|
|
16
|
-
if (
|
|
8
|
+
setup(a) {
|
|
9
|
+
const { exportHtml: r } = n(), { openVersionHistory: e, closeVersionHistory: t } = i(), o = p();
|
|
10
|
+
return { __sfc: !0, exportHtml: r, openVersionHistory: e, closeVersionHistory: t, editorStore: o, handleVersionHistory: () => {
|
|
11
|
+
if (o.isVersionHistoryOpen) {
|
|
17
12
|
t();
|
|
18
13
|
return;
|
|
19
14
|
}
|
|
20
15
|
e();
|
|
21
16
|
}, handleSaveAsTemplate: async () => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
i.value = p.html, o.value = !0;
|
|
25
|
-
} catch {
|
|
26
|
-
}
|
|
27
|
-
}, handleCloseSaveTemplateModal: () => {
|
|
28
|
-
o.value = !1;
|
|
29
|
-
}, InButtonV2: H, SaveTemplateModal: S, VersionHistoryViewOptions: v, ViewOptions: h };
|
|
17
|
+
o.isSaveTemplateModalOpen = !0;
|
|
18
|
+
}, InButtonV2: m };
|
|
30
19
|
}
|
|
31
20
|
});
|
|
32
21
|
export {
|
|
33
|
-
|
|
22
|
+
H as default
|
|
34
23
|
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import n from "./RestoreButton.vue2.js";
|
|
2
|
+
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var s = function() {
|
|
4
|
+
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
5
|
+
return r(t.InButtonV2, { attrs: { id: "guido__restore-button", "label-text": "Restore", type: "subtle-primary" }, on: { click: function(a) {
|
|
6
|
+
return t.restoreVersion(t.versionHistoryStore.currentPatch.id);
|
|
7
|
+
} } });
|
|
8
|
+
}, _ = [], i = /* @__PURE__ */ o(
|
|
9
|
+
n,
|
|
10
|
+
s,
|
|
11
|
+
_,
|
|
12
|
+
!1,
|
|
13
|
+
null,
|
|
14
|
+
null
|
|
15
|
+
);
|
|
16
|
+
const f = i.exports;
|
|
17
|
+
export {
|
|
18
|
+
f as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
import { useVersionHistoryApi as e } from "../../../../composables/useVersionHistoryApi.js";
|
|
3
|
+
import { useVersionHistoryStore as s } from "../../../../stores/version-history.js";
|
|
4
|
+
import { InButtonV2 as n } from "@useinsider/design-system-vue";
|
|
5
|
+
const _ = /* @__PURE__ */ t({
|
|
6
|
+
__name: "RestoreButton",
|
|
7
|
+
setup(i) {
|
|
8
|
+
const { restoreVersion: o } = e(), r = s();
|
|
9
|
+
return { __sfc: !0, restoreVersion: o, versionHistoryStore: r, InButtonV2: n };
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
_ as default
|
|
14
|
+
};
|
|
@@ -1,2 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
itemStatus?: boolean;
|
|
3
|
+
};
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
2
5
|
export default _default;
|
|
6
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
7
|
+
type __VLS_TypePropsToOption<T> = {
|
|
8
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
9
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
10
|
+
} : {
|
|
11
|
+
type: import('vue').PropType<T[K]>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
@@ -2,21 +2,21 @@ import o from "./VersionHistory.vue2.js";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var n = function() {
|
|
5
|
-
var
|
|
6
|
-
return e("div", { staticClass: "version-history-wrapper d-f a-i-c f-g-1 mx-
|
|
5
|
+
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "version-history-wrapper d-f a-i-c f-g-1 mx-3" }, [t.itemStatus ? e(t.VersionHistoryItem, { attrs: { "text-align": "right", date: t.versionHistoryStore.previousPatch.date, description: t.versionHistoryStore.previousPatch.description } }) : s._e(), e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasPreviousPatch, "label-text-status": !1 }, on: { click: function(r) {
|
|
7
7
|
return t.previewVersion(t.versionHistoryStore.previousPatch.id);
|
|
8
|
-
} } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasNextPatch, "label-text-status": !1 }, on: { click: function(
|
|
8
|
+
} } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasNextPatch, "label-text-status": !1 }, on: { click: function(r) {
|
|
9
9
|
return t.previewVersion(t.versionHistoryStore.nextPatch.id);
|
|
10
|
-
} } })], 1), e(t.VersionHistoryItem, { attrs: { "text-align": "left", date: t.versionHistoryStore.nextPatch.date, description: t.versionHistoryStore.nextPatch.description } })], 1);
|
|
10
|
+
} } })], 1), t.itemStatus ? e(t.VersionHistoryItem, { attrs: { "text-align": "left", date: t.versionHistoryStore.nextPatch.date, description: t.versionHistoryStore.nextPatch.description } }) : s._e()], 1);
|
|
11
11
|
}, a = [], c = /* @__PURE__ */ i(
|
|
12
12
|
o,
|
|
13
13
|
n,
|
|
14
14
|
a,
|
|
15
15
|
!1,
|
|
16
16
|
null,
|
|
17
|
-
"
|
|
17
|
+
"52a77eec"
|
|
18
18
|
);
|
|
19
|
-
const
|
|
19
|
+
const _ = c.exports;
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
_ as default
|
|
22
22
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useVersionHistoryApi as
|
|
3
|
-
import { useVersionHistoryStore as
|
|
4
|
-
import { InButtonV2 as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as i } from "vue";
|
|
2
|
+
import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
|
|
3
|
+
import { useVersionHistoryStore as m } from "../../../../stores/version-history.js";
|
|
4
|
+
import { InButtonV2 as p } from "@useinsider/design-system-vue";
|
|
5
|
+
import f from "./VersionHistoryItem.vue.js";
|
|
6
|
+
const _ = /* @__PURE__ */ i({
|
|
7
7
|
__name: "VersionHistory",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
props: {
|
|
9
|
+
itemStatus: { type: Boolean }
|
|
10
|
+
},
|
|
11
|
+
setup(t) {
|
|
12
|
+
const o = t, r = m(), { previewVersion: e } = n(), { itemStatus: s = !1 } = o;
|
|
13
|
+
return { __sfc: !0, versionHistoryStore: r, previewVersion: e, props: o, itemStatus: s, InButtonV2: p, VersionHistoryItem: f };
|
|
11
14
|
}
|
|
12
15
|
});
|
|
13
16
|
export {
|
|
14
|
-
|
|
17
|
+
_ as default
|
|
15
18
|
};
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface Props {
|
|
2
2
|
isOpen: boolean;
|
|
3
|
-
htmlData: string;
|
|
4
3
|
}
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<Props>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
|
|
6
5
|
close: () => void;
|
|
7
|
-
|
|
8
|
-
templateName: string;
|
|
9
|
-
htmlData: string;
|
|
10
|
-
}) => void;
|
|
11
|
-
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<TemplateModalProps>>>, {}>;
|
|
6
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<Props>>>, {}>;
|
|
12
7
|
export default _default;
|
|
13
8
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
14
9
|
type __VLS_TypePropsToOption<T> = {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import s from "./SaveTemplateModal.vue2.js";
|
|
2
|
+
import r from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var o = function() {
|
|
4
|
+
var a = this, t = a._self._c, e = a._self._setupProxy;
|
|
5
|
+
return t(e.ModalWrapper, { attrs: { "cancel-button-text": e.trans("products.cancel"), description: e.trans("newsletter.save-template-description"), "is-open": e.props.isOpen, "primary-button-loading": e.saveState.saving, "primary-button-text": e.trans(e.saveState.saving ? "newsletter.saving" : "products.save"), title: e.trans("products.save-template") }, on: { cancel: e.closeModal, close: e.closeModal, save: e.saveTemplate } }, [t(e.InBasicTextInput, { staticClass: "mb-5 w-1", attrs: { id: "template-name-input", name: "templateName", "character-counter-status": !1, "disabled-status": e.saveState.saving, "label-text": e.trans("products.template-name"), "placeholder-text": e.trans("newsletter.enter-template-name"), "state-message": e.getValidationMessage(), states: e.hasError() ? "error" : "", "tooltip-status": !1, value: e.templateName }, on: { input: e.templateNameInputHandler } }), t(e.InMultiSelect, { staticClass: "template-category-dropdown mb-5 w-1", attrs: { "create-option-status": "", "search-status": "", "button-status": !1, "character-limit-validation-text": e.trans("validation-v2.duration-value", {
|
|
6
|
+
min: 1,
|
|
7
|
+
max: e.templateCategorySearchInputLimit
|
|
8
|
+
}), "create-button-label": e.trans("products.create-new-category"), "disabled-status": e.saveState.saving, "label-text": e.trans("products.template-category"), "loading-state": e.categoriesStore.loading || e.categoriesStore.loadingCreate, "max-character-limit": e.templateCategorySearchInputLimit, options: e.categoriesStore.mappedCategories, "placeholder-text": e.trans("products.select-template-category"), value: e.categoriesStore.selectedCategories }, on: { addOption: e.addOption, change: e.categoriesStore.setSelectedCategories, resetAllOptions: e.categoriesStore.setSelectedCategories, selectAllOptions: e.categoriesStore.setSelectedCategories } })], 1);
|
|
9
|
+
}, n = [], l = /* @__PURE__ */ r(
|
|
10
|
+
s,
|
|
11
|
+
o,
|
|
12
|
+
n,
|
|
13
|
+
!1,
|
|
14
|
+
null,
|
|
15
|
+
null
|
|
16
|
+
);
|
|
17
|
+
const d = l.exports;
|
|
18
|
+
export {
|
|
19
|
+
d as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { defineComponent as b, ref as u, computed as A, watch as H } from "vue";
|
|
2
|
+
import L from "../../wrappers/ModalWrapper.vue.js";
|
|
3
|
+
import { useActionsApi as N } from "../../../composables/useActionsApi.js";
|
|
4
|
+
import { useToaster as V } from "../../../composables/useToaster.js";
|
|
5
|
+
import { useTranslations as j } from "../../../composables/useTranslations.js";
|
|
6
|
+
import { useTemplateCategoriesStore as x } from "../../../stores/template-categories.js";
|
|
7
|
+
import { InMultiSelect as B, InBasicTextInput as P } from "@useinsider/design-system-vue";
|
|
8
|
+
import { useSaveAsTemplate as E } from "../../../composables/useSaveAsTemplate.js";
|
|
9
|
+
import { useTemplateNameValidation as R } from "../../../composables/useTemplateNameValidation.js";
|
|
10
|
+
const U = /* @__PURE__ */ b({
|
|
11
|
+
__name: "SaveTemplateModal",
|
|
12
|
+
props: {
|
|
13
|
+
isOpen: { type: Boolean }
|
|
14
|
+
},
|
|
15
|
+
emits: ["close"],
|
|
16
|
+
setup(S, { emit: p }) {
|
|
17
|
+
const v = S, n = j(), { showToaster: c } = V(), { getRawTemplateData: f } = N(), a = x(), {
|
|
18
|
+
state: t,
|
|
19
|
+
saveTemplate: d
|
|
20
|
+
} = E(), {
|
|
21
|
+
templateName: s,
|
|
22
|
+
getValidationMessage: I,
|
|
23
|
+
hasError: w,
|
|
24
|
+
validateInputs: g,
|
|
25
|
+
resetValidation: i
|
|
26
|
+
} = R(), l = u(!1), o = u(""), r = u(""), C = 40, y = A(() => t.saving || l.value || a.loading || a.loadingCreate), m = () => {
|
|
27
|
+
s.value = "", o.value = "", r.value = "", a.resetSelection(), i();
|
|
28
|
+
}, M = (e) => {
|
|
29
|
+
s.value = e, i();
|
|
30
|
+
}, T = () => {
|
|
31
|
+
m(), p("close");
|
|
32
|
+
}, _ = async () => {
|
|
33
|
+
if (!y.value) {
|
|
34
|
+
if (t.saving = !0, !await g()) {
|
|
35
|
+
t.saving = !1;
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
try {
|
|
39
|
+
await d({
|
|
40
|
+
name: s.value,
|
|
41
|
+
htmlContent: o.value,
|
|
42
|
+
categoryIds: a.getSelectedCategoryIds,
|
|
43
|
+
css: r.value
|
|
44
|
+
}) && (t.saving = !1, c({
|
|
45
|
+
message: n("journey-builder.template-saved-successfully", { name: s.value }),
|
|
46
|
+
type: "success"
|
|
47
|
+
}), T());
|
|
48
|
+
} catch {
|
|
49
|
+
t.saving = !1, c({
|
|
50
|
+
message: n("journey-builder.template-save-error", { name: s.value }),
|
|
51
|
+
type: "error"
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}, h = async () => {
|
|
56
|
+
l.value = !0;
|
|
57
|
+
try {
|
|
58
|
+
const { html: e, css: O } = await f();
|
|
59
|
+
r.value = O || "", o.value = e || "";
|
|
60
|
+
} catch {
|
|
61
|
+
o.value = "", r.value = "";
|
|
62
|
+
} finally {
|
|
63
|
+
l.value = !1;
|
|
64
|
+
}
|
|
65
|
+
}, D = async (e) => {
|
|
66
|
+
await a.createCategory(e);
|
|
67
|
+
};
|
|
68
|
+
return H(() => v.isOpen, async (e) => {
|
|
69
|
+
e ? await Promise.all([
|
|
70
|
+
h(),
|
|
71
|
+
a.fetchCategories()
|
|
72
|
+
]) : m();
|
|
73
|
+
}), { __sfc: !0, props: v, emit: p, trans: n, showToaster: c, getRawTemplateData: f, categoriesStore: a, saveState: t, saveTemplateToLibrary: d, templateName: s, getValidationMessage: I, hasError: w, validateInputs: g, resetValidation: i, isLoadingHtml: l, htmlData: o, cssData: r, templateCategorySearchInputLimit: C, isOperationInProgress: y, resetModalState: m, templateNameInputHandler: M, closeModal: T, saveTemplate: _, fetchHtmlData: h, addOption: D, ModalWrapper: L, InBasicTextInput: P, InMultiSelect: B };
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
export {
|
|
77
|
+
U as default
|
|
78
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
interface ModalWrapperProps {
|
|
2
|
+
isOpen: boolean;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
|
+
primaryButtonText?: string;
|
|
7
|
+
primaryButtonDisabled?: boolean;
|
|
8
|
+
primaryButtonLoading?: boolean;
|
|
9
|
+
cancelButtonText?: string;
|
|
10
|
+
showCancelButton?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
declare var __VLS_12: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
default?: (props: typeof __VLS_12) => any;
|
|
16
|
+
};
|
|
17
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ModalWrapperProps>, {
|
|
18
|
+
description: string;
|
|
19
|
+
size: string;
|
|
20
|
+
primaryButtonText: string;
|
|
21
|
+
primaryButtonDisabled: boolean;
|
|
22
|
+
primaryButtonLoading: boolean;
|
|
23
|
+
cancelButtonText: string;
|
|
24
|
+
showCancelButton: boolean;
|
|
25
|
+
className: string;
|
|
26
|
+
}>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
|
|
27
|
+
close: () => void;
|
|
28
|
+
save: () => void;
|
|
29
|
+
cancel: () => void;
|
|
30
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ModalWrapperProps>, {
|
|
31
|
+
description: string;
|
|
32
|
+
size: string;
|
|
33
|
+
primaryButtonText: string;
|
|
34
|
+
primaryButtonDisabled: boolean;
|
|
35
|
+
primaryButtonLoading: boolean;
|
|
36
|
+
cancelButtonText: string;
|
|
37
|
+
showCancelButton: boolean;
|
|
38
|
+
className: string;
|
|
39
|
+
}>>>, {
|
|
40
|
+
className: string;
|
|
41
|
+
size: "small" | "medium" | "large";
|
|
42
|
+
description: string;
|
|
43
|
+
primaryButtonText: string;
|
|
44
|
+
primaryButtonDisabled: boolean;
|
|
45
|
+
primaryButtonLoading: boolean;
|
|
46
|
+
cancelButtonText: string;
|
|
47
|
+
showCancelButton: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
50
|
+
export default _default;
|
|
51
|
+
type __VLS_WithDefaults<P, D> = {
|
|
52
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
53
|
+
default: D[K];
|
|
54
|
+
}> : P[K];
|
|
55
|
+
};
|
|
56
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
57
|
+
type __VLS_TypePropsToOption<T> = {
|
|
58
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
59
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
60
|
+
} : {
|
|
61
|
+
type: import('vue').PropType<T[K]>;
|
|
62
|
+
required: true;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
66
|
+
new (): {
|
|
67
|
+
$scopedSlots: S;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
type __VLS_PrettifyLocal<T> = {
|
|
71
|
+
[K in keyof T]: T[K];
|
|
72
|
+
} & {};
|