@useinsider/guido 1.0.0-beta.80097a9 → 1.0.0-beta.81c7b67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -6
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/{wrappers → organisms/base}/ModalWrapper.vue.js +1 -1
- package/dist/components/{wrappers → organisms/base}/ModalWrapper.vue2.js +3 -3
- package/dist/components/organisms/header/LeftSlot.vue.d.ts +1 -1
- package/dist/components/organisms/header/LeftSlot.vue.js +8 -8
- package/dist/components/organisms/header/LeftSlot.vue2.js +3 -5
- package/dist/components/organisms/header/MiddleSlot.vue.js +7 -7
- package/dist/components/organisms/header/MiddleSlot.vue2.js +4 -6
- package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/components/organisms/header/RightSlot.vue.js +10 -7
- package/dist/components/organisms/header/RightSlot.vue2.js +16 -13
- package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +1 -13
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +10 -13
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.d.ts +8 -3
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +13 -11
- package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +62 -60
- package/dist/composables/useActionsApi.d.ts +1 -2
- package/dist/composables/useActionsApi.js +33 -42
- package/dist/composables/useCustomInterfaceAppearance.js +9 -45
- package/dist/composables/useHttp.js +21 -23
- package/dist/composables/useStripo.js +8 -13
- package/dist/composables/useTemplateCategories.d.ts +38 -0
- package/dist/composables/useTemplateCategories.js +80 -0
- package/dist/composables/useTemplateValidation.d.ts +13 -0
- package/dist/composables/useTemplateValidation.js +57 -0
- package/dist/guido.css +1 -1
- package/dist/static/editor.css.js +232 -0
- package/package.json +7 -5
- package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +0 -2
- package/dist/components/organisms/header/version-history/RestoreButton.vue.js +0 -19
- package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +0 -14
- package/dist/composables/useSaveAsTemplate.d.ts +0 -7
- package/dist/composables/useSaveAsTemplate.js +0 -51
- package/dist/composables/useTemplateNameValidation.d.ts +0 -7
- package/dist/composables/useTemplateNameValidation.js +0 -33
- package/dist/enums/displayConditions.d.ts +0 -2
- package/dist/enums/displayConditions.js +0 -80
- package/dist/static/styles/base.css.js +0 -11
- package/dist/static/styles/components/alert-message.css.js +0 -39
- package/dist/static/styles/components/amp-block.css.js +0 -18
- package/dist/static/styles/components/base-input.css.js +0 -47
- package/dist/static/styles/components/button-group.css.js +0 -54
- package/dist/static/styles/components/button.css.js +0 -106
- package/dist/static/styles/components/combobox.css.js +0 -49
- package/dist/static/styles/components/counter.css.js +0 -42
- package/dist/static/styles/components/dropdown-menu.css.js +0 -52
- package/dist/static/styles/components/narrow-panel.css.js +0 -38
- package/dist/static/styles/components/switcher.css.js +0 -11
- package/dist/static/styles/components/tabs.css.js +0 -97
- package/dist/static/styles/components/tools.css.js +0 -23
- package/dist/static/styles/components/version-history.css.js +0 -30
- package/dist/static/styles/components/wide-panel.css.js +0 -135
- package/dist/static/styles/variables.css.js +0 -23
- package/dist/stores/template-categories.d.ts +0 -41
- package/dist/stores/template-categories.js +0 -91
- package/dist/utils/base64.d.ts +0 -2
- package/dist/utils/base64.js +0 -14
- package/dist/utils/generic.d.ts +0 -1
- package/dist/utils/generic.js +0 -7
- package/dist/utils/textUtil.d.ts +0 -2
- /package/dist/components/{wrappers → organisms/base}/ModalWrapper.vue.d.ts +0 -0
package/README.md
CHANGED
|
@@ -211,12 +211,7 @@ 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
|
+
- [editor.css](src/static/editor.css) 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,5 +1,5 @@
|
|
|
1
1
|
import r from "./ModalWrapper.vue2.js";
|
|
2
|
-
import o from "
|
|
2
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var s = function() {
|
|
4
4
|
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
5
5
|
return n(e.InDrawer, { attrs: { id: "modal-wrapper", "description-text": t.description, "footer-button-group-options": e.drawerFooterOptions, size: t.size, status: t.isOpen, "title-text": t.title }, on: { cancelOrBackButtonEvent: e.handleCancel, onCloseEvent: e.handleClose, primaryButtonEvent: e.handleSave }, scopedSlots: t._u([{ key: "contentSlot", fn: function() {
|
|
@@ -7,10 +7,10 @@ const i = /* @__PURE__ */ o({
|
|
|
7
7
|
title: null,
|
|
8
8
|
description: { default: "" },
|
|
9
9
|
size: { default: "small" },
|
|
10
|
-
primaryButtonText: { default: "" },
|
|
10
|
+
primaryButtonText: { default: "Save" },
|
|
11
11
|
primaryButtonDisabled: { type: Boolean, default: !1 },
|
|
12
12
|
primaryButtonLoading: { type: Boolean, default: !1 },
|
|
13
|
-
cancelButtonText: { default: "" },
|
|
13
|
+
cancelButtonText: { default: "Cancel" },
|
|
14
14
|
showCancelButton: { type: Boolean, default: !0 },
|
|
15
15
|
className: { default: "" }
|
|
16
16
|
},
|
|
@@ -21,7 +21,7 @@ const i = /* @__PURE__ */ o({
|
|
|
21
21
|
styling: "solid",
|
|
22
22
|
type: "primary",
|
|
23
23
|
labelText: e.primaryButtonText,
|
|
24
|
-
|
|
24
|
+
disabled: e.primaryButtonDisabled || e.primaryButtonLoading
|
|
25
25
|
},
|
|
26
26
|
cancelOrBackButton: e.showCancelButton ? {
|
|
27
27
|
type: "secondary",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import r from "./LeftSlot.vue2.js";
|
|
2
2
|
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
4
|
-
var t = this, e = t._self._c,
|
|
5
|
-
return e("div",
|
|
6
|
-
},
|
|
3
|
+
var _ = function() {
|
|
4
|
+
var t = this, e = t._self._c, n = t._self._setupProxy;
|
|
5
|
+
return e("div", [e(n.InButtonV2, { attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" } })], 1);
|
|
6
|
+
}, s = [], a = /* @__PURE__ */ o(
|
|
7
7
|
r,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
_,
|
|
9
|
+
s,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const i = a.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
i as default
|
|
17
17
|
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { defineComponent as t } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { InButtonV2 as r } from "@useinsider/design-system-vue";
|
|
4
|
-
import e from "./version-history/RestoreButton.vue.js";
|
|
2
|
+
import { InButtonV2 as o } from "@useinsider/design-system-vue";
|
|
5
3
|
const _ = /* @__PURE__ */ t({
|
|
6
4
|
__name: "LeftSlot",
|
|
7
|
-
setup(
|
|
8
|
-
return { __sfc: !0,
|
|
5
|
+
setup(e) {
|
|
6
|
+
return { __sfc: !0, InButtonV2: o };
|
|
9
7
|
}
|
|
10
8
|
});
|
|
11
9
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import s from "./MiddleSlot.vue2.js";
|
|
2
|
-
import
|
|
3
|
-
var
|
|
2
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var i = function() {
|
|
4
4
|
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ? o(
|
|
6
|
-
}, l = [], r = /* @__PURE__ */
|
|
5
|
+
return t.editorStore.isVersionHistoryOpen ? o(t.VersionHistory) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.trans("newsletter.email-preview") } })], 1);
|
|
6
|
+
}, l = [], r = /* @__PURE__ */ n(
|
|
7
7
|
s,
|
|
8
|
-
|
|
8
|
+
i,
|
|
9
9
|
l,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const _ = r.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
_ as default
|
|
17
17
|
};
|
|
@@ -3,20 +3,18 @@ import { useTranslations as s } from "../../../composables/useTranslations.js";
|
|
|
3
3
|
import { useEditorStore as n } from "../../../stores/editor.js";
|
|
4
4
|
import { InButtonV2 as e } from "@useinsider/design-system-vue";
|
|
5
5
|
import m from "./version-history/VersionHistory.vue.js";
|
|
6
|
-
|
|
7
|
-
import f from "./ViewOptions.vue.js";
|
|
8
|
-
const y = /* @__PURE__ */ r({
|
|
6
|
+
const _ = /* @__PURE__ */ r({
|
|
9
7
|
__name: "MiddleSlot",
|
|
10
|
-
setup(
|
|
8
|
+
setup(p) {
|
|
11
9
|
const o = n(), t = s();
|
|
12
10
|
return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
|
|
13
11
|
id: `${i}-tooltip`,
|
|
14
12
|
dynamicPosition: !1,
|
|
15
13
|
staticPosition: "bottom center",
|
|
16
14
|
iconStatus: !1
|
|
17
|
-
}), InButtonV2: e, VersionHistory: m
|
|
15
|
+
}), InButtonV2: e, VersionHistory: m };
|
|
18
16
|
}
|
|
19
17
|
});
|
|
20
18
|
export {
|
|
21
|
-
|
|
19
|
+
_ as default
|
|
22
20
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import o from "./RightSlot.vue2.js";
|
|
2
|
+
/* empty css */
|
|
2
3
|
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
4
|
+
var r = function() {
|
|
4
5
|
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
5
|
-
return e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, 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, {
|
|
6
|
-
|
|
6
|
+
return e("div", { staticClass: "d-f header-right-slot" }, [e("div", { staticClass: "d-f" }, [t.editorStore.isVersionHistoryOpen ? e(t.VersionHistoryViewOptions) : e(t.ViewOptions)], 1), e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.handleSaveAsTemplate } }), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } })], 1), t.editorStore.isVersionHistoryOpen ? e(t.InButtonV2, { attrs: { id: "guido__restore-button", "label-text": "Restore" }, on: { click: function(d) {
|
|
7
|
+
return t.restoreVersion(t.versionHistoryStore.currentPatch.id);
|
|
8
|
+
} } }) : e(t.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save" } })], 1);
|
|
9
|
+
}, n = [], a = /* @__PURE__ */ i(
|
|
7
10
|
o,
|
|
8
|
-
n,
|
|
9
11
|
r,
|
|
12
|
+
n,
|
|
10
13
|
!1,
|
|
11
14
|
null,
|
|
12
|
-
|
|
15
|
+
"78791c47"
|
|
13
16
|
);
|
|
14
|
-
const
|
|
17
|
+
const p = a.exports;
|
|
15
18
|
export {
|
|
16
|
-
|
|
19
|
+
p as default
|
|
17
20
|
};
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useExport as
|
|
3
|
-
import { useVersionHistoryApi as
|
|
4
|
-
import { useEditorStore as
|
|
5
|
-
import {
|
|
6
|
-
|
|
1
|
+
import { defineComponent as n } from "vue";
|
|
2
|
+
import { useExport as p } from "../../../composables/useExport.js";
|
|
3
|
+
import { useVersionHistoryApi as m } from "../../../composables/useVersionHistoryApi.js";
|
|
4
|
+
import { useEditorStore as a } from "../../../stores/editor.js";
|
|
5
|
+
import { useVersionHistoryStore as f } from "../../../stores/version-history.js";
|
|
6
|
+
import { InButtonV2 as l } from "@useinsider/design-system-vue";
|
|
7
|
+
import V from "./version-history/ViewOptions.vue.js";
|
|
8
|
+
import c from "./ViewOptions.vue.js";
|
|
9
|
+
const T = /* @__PURE__ */ n({
|
|
7
10
|
__name: "RightSlot",
|
|
8
|
-
setup(
|
|
9
|
-
const { exportHtml:
|
|
10
|
-
return { __sfc: !0, exportHtml:
|
|
11
|
+
setup(u) {
|
|
12
|
+
const { exportHtml: t } = p(), { openVersionHistory: r, closeVersionHistory: e, restoreVersion: s } = m(), o = a(), i = f();
|
|
13
|
+
return { __sfc: !0, exportHtml: t, openVersionHistory: r, closeVersionHistory: e, restoreVersion: s, editorStore: o, versionHistoryStore: i, handleVersionHistory: () => {
|
|
11
14
|
if (o.isVersionHistoryOpen) {
|
|
12
|
-
|
|
15
|
+
e();
|
|
13
16
|
return;
|
|
14
17
|
}
|
|
15
|
-
|
|
18
|
+
r();
|
|
16
19
|
}, handleSaveAsTemplate: async () => {
|
|
17
20
|
o.isSaveTemplateModalOpen = !0;
|
|
18
|
-
}, InButtonV2:
|
|
21
|
+
}, InButtonV2: l, VersionHistoryViewOptions: V, ViewOptions: c };
|
|
19
22
|
}
|
|
20
23
|
});
|
|
21
24
|
export {
|
|
22
|
-
|
|
25
|
+
T as default
|
|
23
26
|
};
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
|
|
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>>>, {}>;
|
|
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<{}>>, {}>;
|
|
5
2
|
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 r = this, e = r._self._c, t = r._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "version-history-wrapper d-f a-i-c f-g-1 mx-2" }, [e(t.VersionHistoryItem, { attrs: { "text-align": "right", date: t.versionHistoryStore.previousPatch.date, description: t.versionHistoryStore.previousPatch.description } }), e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasPreviousPatch, "label-text-status": !1 }, on: { click: function(s) {
|
|
7
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(s) {
|
|
9
9
|
return t.previewVersion(t.versionHistoryStore.nextPatch.id);
|
|
10
|
-
} } })], 1),
|
|
10
|
+
} } })], 1), e(t.VersionHistoryItem, { attrs: { "text-align": "left", date: t.versionHistoryStore.nextPatch.date, description: t.versionHistoryStore.nextPatch.description } })], 1);
|
|
11
11
|
}, a = [], c = /* @__PURE__ */ i(
|
|
12
12
|
o,
|
|
13
13
|
n,
|
|
14
14
|
a,
|
|
15
15
|
!1,
|
|
16
16
|
null,
|
|
17
|
-
"
|
|
17
|
+
"187d41fa"
|
|
18
18
|
);
|
|
19
|
-
const
|
|
19
|
+
const p = c.exports;
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
p as default
|
|
22
22
|
};
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useVersionHistoryApi as
|
|
3
|
-
import { useVersionHistoryStore as
|
|
4
|
-
import { InButtonV2 as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
import { useVersionHistoryApi as e } from "../../../../composables/useVersionHistoryApi.js";
|
|
3
|
+
import { useVersionHistoryStore as s } from "../../../../stores/version-history.js";
|
|
4
|
+
import { InButtonV2 as i } from "@useinsider/design-system-vue";
|
|
5
|
+
import n from "./VersionHistoryItem.vue.js";
|
|
6
|
+
const c = /* @__PURE__ */ t({
|
|
7
7
|
__name: "VersionHistory",
|
|
8
|
-
|
|
9
|
-
|
|
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 };
|
|
8
|
+
setup(m) {
|
|
9
|
+
const o = s(), { previewVersion: r } = e();
|
|
10
|
+
return { __sfc: !0, versionHistoryStore: o, previewVersion: r, InButtonV2: i, VersionHistoryItem: n };
|
|
14
11
|
}
|
|
15
12
|
});
|
|
16
13
|
export {
|
|
17
|
-
|
|
14
|
+
c as default
|
|
18
15
|
};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
interface
|
|
1
|
+
interface TemplateModalProps {
|
|
2
2
|
isOpen: boolean;
|
|
3
3
|
}
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<
|
|
4
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<TemplateModalProps>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {
|
|
5
5
|
close: () => void;
|
|
6
|
-
|
|
6
|
+
save: (data: {
|
|
7
|
+
templateName: string;
|
|
8
|
+
htmlData: string;
|
|
9
|
+
categoryIds: number[];
|
|
10
|
+
}) => void;
|
|
11
|
+
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<TemplateModalProps>>>, {}>;
|
|
7
12
|
export default _default;
|
|
8
13
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
14
|
type __VLS_TypePropsToOption<T> = {
|
|
@@ -1,20 +1,22 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
return t
|
|
1
|
+
import n from "./SaveTemplateModal.vue2.js";
|
|
2
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var l = function() {
|
|
4
|
+
var r = this, e = r._self._c, t = r._self._setupProxy;
|
|
5
|
+
return e(t.ModalWrapper, { attrs: { "cancel-button-text": t.trans("products.cancel"), description: t.trans("newsletter.save-template-description"), "is-open": t.props.isOpen, "primary-button-loading": t.isSaving || t.isLoadingHtml, "primary-button-text": t.trans("products.save"), title: t.trans("products.save-template") }, on: { cancel: t.closeModal, close: t.closeModal, save: t.saveTemplate } }, [e(t.InTextInput, { staticClass: "mb-5 w-1", attrs: { id: "template-name-input", "with-label": "", name: "templateName", disabled: t.isSaving, invalid: !!t.validationError, "invalid-message": t.validationError, label: t.trans("products.template-name"), placeholder: t.trans("newsletter.enter-template-name") }, model: { value: t.templateNameInput, callback: function(a) {
|
|
6
|
+
t.templateNameInput = typeof a == "string" ? a.trim() : a;
|
|
7
|
+
}, expression: "templateNameInput" } }), e(t.InMultiSelect, { staticClass: "template-category-dropdown mb-5 w-1", attrs: { "create-option-status": "", "search-status": "", "button-status": !1, "character-limit-validation-text": t.trans("validation-v2.duration-value", {
|
|
6
8
|
min: 1,
|
|
7
|
-
max:
|
|
8
|
-
}), "create-button-label":
|
|
9
|
-
},
|
|
10
|
-
s,
|
|
11
|
-
o,
|
|
9
|
+
max: t.templateCategorySearchInputLimit
|
|
10
|
+
}), "create-button-label": t.trans("products.create-new-category"), "label-text": t.trans("products.template-category"), "loading-state": t.categoriesData.loading || t.categoriesData.loadingCreate, "max-character-limit": t.templateCategorySearchInputLimit, options: t.categoriesData.mappedCategories, "placeholder-text": t.trans("products.select-template-category"), value: t.categoriesData.selectedCategories }, on: { addOption: t.addOption, change: t.categoryChangeHandler, resetAllOptions: t.categoryChangeHandler, selectAllOptions: t.categoryChangeHandler } })], 1);
|
|
11
|
+
}, o = [], i = /* @__PURE__ */ s(
|
|
12
12
|
n,
|
|
13
|
+
l,
|
|
14
|
+
o,
|
|
13
15
|
!1,
|
|
14
16
|
null,
|
|
15
17
|
null
|
|
16
18
|
);
|
|
17
|
-
const d =
|
|
19
|
+
const d = i.exports;
|
|
18
20
|
export {
|
|
19
21
|
d as default
|
|
20
22
|
};
|
|
@@ -1,78 +1,80 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const U = /* @__PURE__ */ b({
|
|
1
|
+
import { defineComponent as O, ref as s, watch as S } from "vue";
|
|
2
|
+
import { useActionsApi as b } from "../../../composables/useActionsApi.js";
|
|
3
|
+
import { useTemplateCategories as j } from "../../../composables/useTemplateCategories.js";
|
|
4
|
+
import { useTemplateValidation as x } from "../../../composables/useTemplateValidation.js";
|
|
5
|
+
import { useToaster as A } from "../../../composables/useToaster.js";
|
|
6
|
+
import { useTranslations as E } from "../../../composables/useTranslations.js";
|
|
7
|
+
import L from "../base/ModalWrapper.vue.js";
|
|
8
|
+
import { InMultiSelect as R, InTextInput as V } from "@useinsider/design-system-vue";
|
|
9
|
+
const J = /* @__PURE__ */ O({
|
|
11
10
|
__name: "SaveTemplateModal",
|
|
12
11
|
props: {
|
|
13
12
|
isOpen: { type: Boolean }
|
|
14
13
|
},
|
|
15
|
-
emits: ["close"],
|
|
16
|
-
setup(
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
if (
|
|
34
|
-
|
|
35
|
-
t.saving = !1;
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
14
|
+
emits: ["close", "save"],
|
|
15
|
+
setup(I, { emit: o }) {
|
|
16
|
+
const p = I, l = E(), { showToaster: r } = A(), { getCompiledEmail: d } = b(), {
|
|
17
|
+
data: _,
|
|
18
|
+
fetchCategories: f,
|
|
19
|
+
createCategory: v,
|
|
20
|
+
setSelectedCategories: y,
|
|
21
|
+
resetSelection: g,
|
|
22
|
+
getSelectedCategoryIds: h
|
|
23
|
+
} = j(), t = s(""), n = s(!1), i = s(!1), a = s(""), w = 40, {
|
|
24
|
+
validationError: M,
|
|
25
|
+
validateTemplateName: c,
|
|
26
|
+
clearValidation: m
|
|
27
|
+
} = x(), u = () => {
|
|
28
|
+
t.value = "", g(), m(), a.value = "";
|
|
29
|
+
}, C = () => {
|
|
30
|
+
u(), o("close");
|
|
31
|
+
}, D = async () => {
|
|
32
|
+
if (t.value.trim()) {
|
|
33
|
+
n.value = !0;
|
|
38
34
|
try {
|
|
39
|
-
await
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
35
|
+
if (!(await c(t.value)).isValid)
|
|
36
|
+
return;
|
|
37
|
+
o("save", {
|
|
38
|
+
templateName: t.value,
|
|
39
|
+
htmlData: a.value,
|
|
40
|
+
categoryIds: h.value
|
|
41
|
+
}), r({ message: l(
|
|
42
|
+
"journey-builder.template-saved-successfully",
|
|
43
|
+
{ name: t.value }
|
|
44
|
+
) }), C();
|
|
48
45
|
} catch {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
});
|
|
46
|
+
r({ message: l("journey-builder.template-save-error", { name: t.value }) });
|
|
47
|
+
} finally {
|
|
48
|
+
n.value = !1;
|
|
53
49
|
}
|
|
54
50
|
}
|
|
55
|
-
}
|
|
56
|
-
|
|
51
|
+
};
|
|
52
|
+
S(t, (e) => {
|
|
53
|
+
e.trim() ? c(e) : m();
|
|
54
|
+
});
|
|
55
|
+
const T = async () => {
|
|
56
|
+
i.value = !0;
|
|
57
57
|
try {
|
|
58
|
-
const { html: e
|
|
59
|
-
|
|
58
|
+
const { html: e } = await d();
|
|
59
|
+
a.value = e || "";
|
|
60
60
|
} catch {
|
|
61
|
-
|
|
61
|
+
a.value = "";
|
|
62
62
|
} finally {
|
|
63
|
-
|
|
63
|
+
i.value = !1;
|
|
64
64
|
}
|
|
65
|
-
},
|
|
66
|
-
|
|
65
|
+
}, H = (e) => {
|
|
66
|
+
y(e);
|
|
67
|
+
}, N = async (e) => {
|
|
68
|
+
await v(e);
|
|
67
69
|
};
|
|
68
|
-
return
|
|
70
|
+
return S(() => p.isOpen, async (e) => {
|
|
69
71
|
e ? await Promise.all([
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
]) :
|
|
73
|
-
}), { __sfc: !0, props:
|
|
72
|
+
T(),
|
|
73
|
+
f()
|
|
74
|
+
]) : u();
|
|
75
|
+
}), { __sfc: !0, props: p, emit: o, trans: l, showToaster: r, getCompiledEmail: d, categoriesData: _, fetchCategories: f, createCategory: v, setSelectedCategories: y, resetSelection: g, getSelectedCategoryIds: h, templateNameInput: t, isSaving: n, isLoadingHtml: i, htmlData: a, templateCategorySearchInputLimit: w, validationError: M, validateTemplateName: c, clearValidation: m, resetModalState: u, closeModal: C, saveTemplate: D, fetchHtmlData: T, categoryChangeHandler: H, addOption: N, ModalWrapper: L, InTextInput: V, InMultiSelect: R };
|
|
74
76
|
}
|
|
75
77
|
});
|
|
76
78
|
export {
|
|
77
|
-
|
|
79
|
+
J as default
|
|
78
80
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { GetCompiledEmailOptions, CompiledEmailResult
|
|
1
|
+
import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
|
|
2
2
|
export declare const useActionsApi: () => {
|
|
3
3
|
getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
|
|
4
|
-
getRawTemplateData: () => Promise<TemplateDataResult>;
|
|
5
4
|
};
|
|
@@ -1,45 +1,36 @@
|
|
|
1
|
-
const d = () => ({
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}),
|
|
35
|
-
getRawTemplateData: () => new Promise((t) => {
|
|
36
|
-
window.StripoEditorApi.actionsApi.getTemplateData(
|
|
37
|
-
(e) => {
|
|
38
|
-
t(e);
|
|
39
|
-
}
|
|
40
|
-
);
|
|
41
|
-
})
|
|
42
|
-
});
|
|
1
|
+
const d = () => ({ getCompiledEmail: (t = {}) => new Promise((a, i) => {
|
|
2
|
+
const m = { ...{
|
|
3
|
+
minimize: !0,
|
|
4
|
+
utmEntity: {
|
|
5
|
+
utmSource: "",
|
|
6
|
+
utmMedium: "",
|
|
7
|
+
utmCampaign: "",
|
|
8
|
+
utmContent: "",
|
|
9
|
+
utmTerm: "",
|
|
10
|
+
customUtms: [
|
|
11
|
+
{
|
|
12
|
+
name1: "val1",
|
|
13
|
+
name2: "val2"
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
mergeTags: ["Tag1", "Tag2"],
|
|
18
|
+
forseAmp: !1,
|
|
19
|
+
resetDataSavedFlag: !1,
|
|
20
|
+
disableLineHeightsReplace: !0
|
|
21
|
+
}, ...t }, s = {
|
|
22
|
+
callback: (e, l, n, o, c) => {
|
|
23
|
+
e ? i(e) : a({
|
|
24
|
+
html: l,
|
|
25
|
+
ampHtml: n,
|
|
26
|
+
ampErrors: o,
|
|
27
|
+
displayConditions: c
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
...m
|
|
31
|
+
};
|
|
32
|
+
window.StripoEditorApi.actionsApi.compileEmail(s);
|
|
33
|
+
}) });
|
|
43
34
|
export {
|
|
44
35
|
d as useActionsApi
|
|
45
36
|
};
|