@useinsider/guido 1.0.0-beta.afdfab7 → 1.0.0-beta.b4126b3
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/@types/generic.d.ts +20 -0
- package/dist/@types/http.d.ts +19 -0
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +22 -26
- 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 +14 -11
- 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/composables/useApiExample.d.ts +4 -6
- package/dist/composables/useCustomInterfaceAppearance.js +9 -45
- package/dist/composables/useHttp.d.ts +1 -19
- package/dist/composables/useStripo.js +8 -13
- package/dist/composables/useToaster.d.ts +1 -9
- package/dist/guido.css +1 -1
- package/dist/static/editor.css.js +232 -0
- package/dist/stores/editor.d.ts +0 -1
- package/dist/stores/editor.js +1 -2
- 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/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/components/organisms/save-template/SaveTemplateModal.vue.d.ts +0 -16
- package/dist/components/organisms/save-template/SaveTemplateModal.vue.js +0 -22
- package/dist/components/organisms/save-template/SaveTemplateModal.vue2.js +0 -86
- package/dist/composables/useSaveAsTemplate.d.ts +0 -17
- package/dist/composables/useSaveAsTemplate.js +0 -44
- package/dist/composables/useTemplateCategories.d.ts +0 -35
- package/dist/composables/useTemplateCategories.js +0 -78
- package/dist/composables/useTemplateNameValidation.d.ts +0 -13
- package/dist/composables/useTemplateNameValidation.js +0 -57
- package/dist/enums/displayConditions.d.ts +0 -2
- package/dist/enums/displayConditions.js +0 -80
- package/dist/mock/api/template-library.d.ts +0 -2
- package/dist/static/styles/base.css.js +0 -11
- package/dist/static/styles/components/alert-message.css.js +0 -39
- package/dist/static/styles/components/amp-block.css.js +0 -18
- package/dist/static/styles/components/base-input.css.js +0 -47
- package/dist/static/styles/components/button-group.css.js +0 -54
- package/dist/static/styles/components/button.css.js +0 -106
- package/dist/static/styles/components/combobox.css.js +0 -49
- package/dist/static/styles/components/counter.css.js +0 -42
- package/dist/static/styles/components/dropdown-menu.css.js +0 -52
- package/dist/static/styles/components/narrow-panel.css.js +0 -38
- package/dist/static/styles/components/switcher.css.js +0 -11
- package/dist/static/styles/components/tabs.css.js +0 -97
- package/dist/static/styles/components/tools.css.js +0 -23
- package/dist/static/styles/components/version-history.css.js +0 -30
- package/dist/static/styles/components/wide-panel.css.js +0 -135
- package/dist/static/styles/variables.css.js +0 -23
- package/dist/utils/base64.d.ts +0 -1
- package/dist/utils/base64.js +0 -14
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
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
1
|
export type GuidoConfig = {
|
|
2
2
|
translationsPath: string;
|
|
3
3
|
};
|
|
4
|
+
export interface User {
|
|
5
|
+
id: number;
|
|
6
|
+
name: string;
|
|
7
|
+
email: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ApiResponse<T> {
|
|
10
|
+
data: T;
|
|
11
|
+
message: string;
|
|
12
|
+
success: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type ToasterType = 'success' | 'error' | 'info' | 'warning';
|
|
15
|
+
export interface ToasterActionButton {
|
|
16
|
+
text: string;
|
|
17
|
+
onClick: () => void;
|
|
18
|
+
}
|
|
19
|
+
export interface ToasterOptions {
|
|
20
|
+
type?: ToasterType;
|
|
21
|
+
message: string;
|
|
22
|
+
actionButton?: ToasterActionButton;
|
|
23
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
2
|
+
export interface HttpOptions extends Omit<RequestInit, 'method' | 'body'> {
|
|
3
|
+
baseURL?: string;
|
|
4
|
+
timeout?: number;
|
|
5
|
+
retry?: number;
|
|
6
|
+
retryDelay?: number;
|
|
7
|
+
}
|
|
8
|
+
export interface HttpResponse<T = unknown> {
|
|
9
|
+
data: T;
|
|
10
|
+
status: number;
|
|
11
|
+
statusText: string;
|
|
12
|
+
headers: Headers;
|
|
13
|
+
}
|
|
14
|
+
export interface HttpError {
|
|
15
|
+
message: string;
|
|
16
|
+
status?: number;
|
|
17
|
+
statusText?: string;
|
|
18
|
+
response?: Response;
|
|
19
|
+
}
|
|
@@ -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.HeaderWrapper), 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
|
+
"d4a5c957"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = a.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePartner as
|
|
3
|
-
import { useStripo as
|
|
4
|
-
import { useTemplates as
|
|
5
|
-
import { DefaultUsername as
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
import { useEditorStore as P } from "../stores/editor.js";
|
|
9
|
-
const F = /* @__PURE__ */ g({
|
|
1
|
+
import { defineComponent as f, onMounted as c } from "vue";
|
|
2
|
+
import { usePartner as g } from "../composables/usePartner.js";
|
|
3
|
+
import { useStripo as _ } from "../composables/useStripo.js";
|
|
4
|
+
import { useTemplates as y } from "../composables/useTemplates.js";
|
|
5
|
+
import { DefaultUsername as C, DefaultGuidoConfig as T } from "../enums/defaults.js";
|
|
6
|
+
import w from "./organisms/header/HeaderWrapper.vue.js";
|
|
7
|
+
const h = /* @__PURE__ */ f({
|
|
10
8
|
__name: "Guido",
|
|
11
9
|
props: {
|
|
12
10
|
emailId: null,
|
|
@@ -16,32 +14,30 @@ const F = /* @__PURE__ */ g({
|
|
|
16
14
|
username: null,
|
|
17
15
|
guidoConfig: null
|
|
18
16
|
},
|
|
19
|
-
setup(
|
|
20
|
-
const o =
|
|
21
|
-
emailId:
|
|
22
|
-
userId:
|
|
23
|
-
guidoConfig:
|
|
24
|
-
partnerName:
|
|
25
|
-
productType:
|
|
26
|
-
username:
|
|
17
|
+
setup(d) {
|
|
18
|
+
const o = d, { getPartnerName: r, getProductType: t } = g(), {
|
|
19
|
+
emailId: n,
|
|
20
|
+
userId: i,
|
|
21
|
+
guidoConfig: a,
|
|
22
|
+
partnerName: u = r(),
|
|
23
|
+
productType: p = t(),
|
|
24
|
+
username: m = C
|
|
27
25
|
} = o;
|
|
28
26
|
window.GuidoConfig = {
|
|
29
|
-
...
|
|
30
|
-
...
|
|
27
|
+
...T,
|
|
28
|
+
...a
|
|
31
29
|
};
|
|
32
|
-
const { initPlugin:
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
return T(async () => {
|
|
30
|
+
const { initPlugin: l } = _({ emailId: n, userId: i, username: m, partnerName: u, productType: p }), { getDefaultTemplate: s } = y();
|
|
31
|
+
return c(async () => {
|
|
36
32
|
try {
|
|
37
33
|
const e = await s();
|
|
38
|
-
await
|
|
34
|
+
await l(e);
|
|
39
35
|
} catch (e) {
|
|
40
36
|
console.error("Failed to initialize Stripo editor:", e);
|
|
41
37
|
}
|
|
42
|
-
}), { __sfc: !0, props: o, getPartnerName:
|
|
38
|
+
}), { __sfc: !0, props: o, getPartnerName: r, getProductType: t, emailId: n, userId: i, guidoConfig: a, partnerName: u, productType: p, username: m, initPlugin: l, getDefaultTemplate: s, HeaderWrapper: w };
|
|
43
39
|
}
|
|
44
40
|
});
|
|
45
41
|
export {
|
|
46
|
-
|
|
42
|
+
h as default
|
|
47
43
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import r from "./LeftSlot.vue2.js";
|
|
2
2
|
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
4
|
-
var t = this, e = t._self._c,
|
|
5
|
-
return e("div",
|
|
6
|
-
},
|
|
3
|
+
var _ = function() {
|
|
4
|
+
var t = this, e = t._self._c, n = t._self._setupProxy;
|
|
5
|
+
return e("div", [e(n.InButtonV2, { attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" } })], 1);
|
|
6
|
+
}, s = [], a = /* @__PURE__ */ o(
|
|
7
7
|
r,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
_,
|
|
9
|
+
s,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const i = a.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
i as default
|
|
17
17
|
};
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { defineComponent as t } from "vue";
|
|
2
|
-
import {
|
|
3
|
-
import { InButtonV2 as r } from "@useinsider/design-system-vue";
|
|
4
|
-
import e from "./version-history/RestoreButton.vue.js";
|
|
2
|
+
import { InButtonV2 as o } from "@useinsider/design-system-vue";
|
|
5
3
|
const _ = /* @__PURE__ */ t({
|
|
6
4
|
__name: "LeftSlot",
|
|
7
|
-
setup(
|
|
8
|
-
return { __sfc: !0,
|
|
5
|
+
setup(e) {
|
|
6
|
+
return { __sfc: !0, InButtonV2: o };
|
|
9
7
|
}
|
|
10
8
|
});
|
|
11
9
|
export {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import s from "./MiddleSlot.vue2.js";
|
|
2
|
-
import
|
|
3
|
-
var
|
|
2
|
+
import n from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var i = function() {
|
|
4
4
|
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
5
|
-
return t.editorStore.isVersionHistoryOpen ? o(
|
|
6
|
-
}, l = [], r = /* @__PURE__ */
|
|
5
|
+
return t.editorStore.isVersionHistoryOpen ? o(t.VersionHistory) : o("div", { staticClass: "d-f" }, [o(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "label-text-status": !1 } }), o(t.InButtonV2, { attrs: { id: "guido__code-button", "left-icon": "line-code", styling: "ghost", "tooltip-text": "Code Editor", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isCodeEditorOpen, "tooltip-options": t.getTooltipOptions("guido__code-button") } }), o(t.InButtonV2, { attrs: { id: "guido__preview-button", "left-icon": "line-show-on", styling: "ghost", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button"), "tooltip-text": t.trans("newsletter.email-preview") } })], 1);
|
|
6
|
+
}, l = [], r = /* @__PURE__ */ n(
|
|
7
7
|
s,
|
|
8
|
-
|
|
8
|
+
i,
|
|
9
9
|
l,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const _ = r.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
_ as default
|
|
17
17
|
};
|
|
@@ -3,20 +3,18 @@ import { useTranslations as s } from "../../../composables/useTranslations.js";
|
|
|
3
3
|
import { useEditorStore as n } from "../../../stores/editor.js";
|
|
4
4
|
import { InButtonV2 as e } from "@useinsider/design-system-vue";
|
|
5
5
|
import m from "./version-history/VersionHistory.vue.js";
|
|
6
|
-
|
|
7
|
-
import f from "./ViewOptions.vue.js";
|
|
8
|
-
const y = /* @__PURE__ */ r({
|
|
6
|
+
const _ = /* @__PURE__ */ r({
|
|
9
7
|
__name: "MiddleSlot",
|
|
10
|
-
setup(
|
|
8
|
+
setup(p) {
|
|
11
9
|
const o = n(), t = s();
|
|
12
10
|
return { __sfc: !0, editorStore: o, trans: t, getTooltipOptions: (i) => ({
|
|
13
11
|
id: `${i}-tooltip`,
|
|
14
12
|
dynamicPosition: !1,
|
|
15
13
|
staticPosition: "bottom center",
|
|
16
14
|
iconStatus: !1
|
|
17
|
-
}), InButtonV2: e, VersionHistory: m
|
|
15
|
+
}), InButtonV2: e, VersionHistory: m };
|
|
18
16
|
}
|
|
19
17
|
});
|
|
20
18
|
export {
|
|
21
|
-
|
|
19
|
+
_ as default
|
|
22
20
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
2
|
export default _default;
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import o from "./RightSlot.vue2.js";
|
|
2
|
+
/* empty css */
|
|
2
3
|
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
4
|
+
var r = function() {
|
|
4
5
|
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
5
|
-
return e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, {
|
|
6
|
-
|
|
6
|
+
return e("div", { 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 } }), 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
|
+
"fefca98f"
|
|
13
16
|
);
|
|
14
|
-
const
|
|
17
|
+
const f = a.exports;
|
|
15
18
|
export {
|
|
16
|
-
|
|
19
|
+
f as default
|
|
17
20
|
};
|
|
@@ -1,21 +1,24 @@
|
|
|
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 m } from "../../../composables/useExport.js";
|
|
3
|
+
import { useVersionHistoryApi as p } from "../../../composables/useVersionHistoryApi.js";
|
|
4
|
+
import { useEditorStore as f } from "../../../stores/editor.js";
|
|
5
|
+
import { useVersionHistoryStore as V } from "../../../stores/version-history.js";
|
|
6
|
+
import { InButtonV2 as u } from "@useinsider/design-system-vue";
|
|
7
|
+
import H from "./version-history/ViewOptions.vue.js";
|
|
8
|
+
import c from "./ViewOptions.vue.js";
|
|
9
|
+
const E = /* @__PURE__ */ n({
|
|
7
10
|
__name: "RightSlot",
|
|
8
|
-
setup(
|
|
9
|
-
const { exportHtml: e } =
|
|
10
|
-
return { __sfc: !0, exportHtml: e, openVersionHistory: o, closeVersionHistory: r, editorStore: t, handleVersionHistory: () => {
|
|
11
|
+
setup(y) {
|
|
12
|
+
const { exportHtml: e } = m(), { openVersionHistory: o, closeVersionHistory: r, restoreVersion: i } = p(), t = f(), s = V();
|
|
13
|
+
return { __sfc: !0, exportHtml: e, openVersionHistory: o, closeVersionHistory: r, restoreVersion: i, editorStore: t, versionHistoryStore: s, handleVersionHistory: () => {
|
|
11
14
|
if (t.isVersionHistoryOpen) {
|
|
12
15
|
r();
|
|
13
16
|
return;
|
|
14
17
|
}
|
|
15
18
|
o();
|
|
16
|
-
}, InButtonV2:
|
|
19
|
+
}, InButtonV2: u, VersionHistoryViewOptions: H, ViewOptions: c };
|
|
17
20
|
}
|
|
18
21
|
});
|
|
19
22
|
export {
|
|
20
|
-
|
|
23
|
+
E as default
|
|
21
24
|
};
|
|
@@ -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,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated - It's added for example purposes.
|
|
3
|
+
*/
|
|
4
|
+
import type { User } from '../@types/generic';
|
|
6
5
|
export declare const useApiExample: () => {
|
|
7
6
|
loading: import("vue").ComputedRef<boolean>;
|
|
8
7
|
error: import("vue").ComputedRef<{
|
|
@@ -60,4 +59,3 @@ export declare const useApiExample: () => {
|
|
|
60
59
|
uploadFile: (file: File) => Promise<string>;
|
|
61
60
|
clearError: () => void;
|
|
62
61
|
};
|
|
63
|
-
export {};
|
|
@@ -1,49 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import s from "../static/styles/components/combobox.css.js";
|
|
8
|
-
import C from "../static/styles/components/counter.css.js";
|
|
9
|
-
import f from "../static/styles/components/dropdown-menu.css.js";
|
|
10
|
-
import a from "../static/styles/components/narrow-panel.css.js";
|
|
11
|
-
import u from "../static/styles/components/switcher.css.js";
|
|
12
|
-
import c from "../static/styles/components/tabs.css.js";
|
|
13
|
-
import d from "../static/styles/components/tools.css.js";
|
|
14
|
-
import l from "../static/styles/components/version-history.css.js";
|
|
15
|
-
import h from "../static/styles/components/wide-panel.css.js";
|
|
16
|
-
import w from "../static/styles/variables.css.js";
|
|
17
|
-
const y = [
|
|
18
|
-
w,
|
|
19
|
-
// Must be on top
|
|
20
|
-
S,
|
|
21
|
-
// Must be on top
|
|
22
|
-
e,
|
|
23
|
-
m,
|
|
24
|
-
i,
|
|
25
|
-
p,
|
|
26
|
-
n,
|
|
27
|
-
s,
|
|
28
|
-
C,
|
|
29
|
-
f,
|
|
30
|
-
a,
|
|
31
|
-
u,
|
|
32
|
-
c,
|
|
33
|
-
d,
|
|
34
|
-
l,
|
|
35
|
-
h
|
|
36
|
-
].join(`
|
|
37
|
-
|
|
38
|
-
`), N = () => ({ importCss: () => {
|
|
39
|
-
const o = new CSSStyleSheet();
|
|
40
|
-
o.replaceSync(y);
|
|
41
|
-
const r = document.querySelector("ui-editor");
|
|
42
|
-
if (!r)
|
|
1
|
+
import r from "../static/editor.css.js";
|
|
2
|
+
const c = () => ({ importCss: () => {
|
|
3
|
+
const e = new CSSStyleSheet();
|
|
4
|
+
e.replaceSync(r);
|
|
5
|
+
const t = document.querySelector("ui-editor");
|
|
6
|
+
if (!t)
|
|
43
7
|
return;
|
|
44
|
-
const
|
|
45
|
-
|
|
8
|
+
const o = t.shadowRoot;
|
|
9
|
+
o && (o.adoptedStyleSheets = [e]);
|
|
46
10
|
} });
|
|
47
11
|
export {
|
|
48
|
-
|
|
12
|
+
c as useCustomInterfaceAppearance
|
|
49
13
|
};
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export interface HttpOptions extends Omit<RequestInit, 'method' | 'body'> {
|
|
3
|
-
baseURL?: string;
|
|
4
|
-
timeout?: number;
|
|
5
|
-
retry?: number;
|
|
6
|
-
retryDelay?: number;
|
|
7
|
-
}
|
|
8
|
-
export interface HttpResponse<T = unknown> {
|
|
9
|
-
data: T;
|
|
10
|
-
status: number;
|
|
11
|
-
statusText: string;
|
|
12
|
-
headers: Headers;
|
|
13
|
-
}
|
|
14
|
-
export interface HttpError {
|
|
15
|
-
message: string;
|
|
16
|
-
status?: number;
|
|
17
|
-
statusText?: string;
|
|
18
|
-
response?: Response;
|
|
19
|
-
}
|
|
1
|
+
import type { HttpMethod, HttpOptions, HttpResponse } from '@/@types/http';
|
|
20
2
|
export declare const useHttp: (defaultOptions?: HttpOptions) => {
|
|
21
3
|
loading: import("vue").ComputedRef<boolean>;
|
|
22
4
|
error: import("vue").ComputedRef<{
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { useCustomInterfaceAppearance as m } from "./useCustomInterfaceAppearance.js";
|
|
2
2
|
import { useToaster as g } from "./useToaster.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const r = w(), { html: t, css: n } = e;
|
|
3
|
+
import { useStripoApi as E } from "../services/stripoApi.js";
|
|
4
|
+
import { useEditorStore as S } from "../stores/editor.js";
|
|
5
|
+
const _ = (c) => {
|
|
6
|
+
const { handleError: d } = g(), { getToken: u, getCustomFonts: a } = E(), l = (e, i = []) => {
|
|
7
|
+
const r = S(), { html: t, css: n } = e;
|
|
9
8
|
window.UIEditor.initEditor(
|
|
10
9
|
document.querySelector("#guido-editor"),
|
|
11
10
|
{
|
|
@@ -18,10 +17,6 @@ const F = (c) => {
|
|
|
18
17
|
mobileViewButtonSelector: ".guido__view-option-selection-mobile",
|
|
19
18
|
desktopViewButtonSelector: ".guido__view-option-selection-desktop",
|
|
20
19
|
codeEditorButtonSelector: "#guido__code-button",
|
|
21
|
-
conditionsEnabled: !0,
|
|
22
|
-
customConditionsEnabled: !0,
|
|
23
|
-
conditionCategories: E,
|
|
24
|
-
messageSettingsEnabled: !1,
|
|
25
20
|
editorFonts: {
|
|
26
21
|
showDefaultStandardFonts: !0,
|
|
27
22
|
showDefaultNotStandardFonts: !0,
|
|
@@ -29,7 +24,7 @@ const F = (c) => {
|
|
|
29
24
|
},
|
|
30
25
|
async onTokenRefreshRequest(o) {
|
|
31
26
|
try {
|
|
32
|
-
const s = await
|
|
27
|
+
const s = await u();
|
|
33
28
|
o(s);
|
|
34
29
|
} catch (s) {
|
|
35
30
|
d(s, "Failed to refresh token");
|
|
@@ -69,11 +64,11 @@ const F = (c) => {
|
|
|
69
64
|
});
|
|
70
65
|
return { initPlugin: async (e) => {
|
|
71
66
|
await p(async () => {
|
|
72
|
-
const i = await
|
|
67
|
+
const i = await a();
|
|
73
68
|
l(e, i);
|
|
74
69
|
});
|
|
75
70
|
} };
|
|
76
71
|
};
|
|
77
72
|
export {
|
|
78
|
-
|
|
73
|
+
_ as useStripo
|
|
79
74
|
};
|
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export type ToasterOptions = {
|
|
3
|
-
type?: ToasterType;
|
|
4
|
-
message: string;
|
|
5
|
-
actionButton?: {
|
|
6
|
-
text: string;
|
|
7
|
-
onClick: () => void;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
1
|
+
import type { ToasterType, ToasterOptions } from '@/@types/generic';
|
|
10
2
|
export declare const useToaster: () => {
|
|
11
3
|
isToasterVisible: import("vue").Ref<boolean>;
|
|
12
4
|
toasterMessage: import("vue").Ref<string>;
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.version-history-item[data-v-0e2ff42d]{flex-basis:200px}.version-history-wrapper[data-v-
|
|
1
|
+
.version-history-item[data-v-0e2ff42d]{flex-basis:200px}.version-history-wrapper[data-v-187d41fa]{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}.header-right-slot[data-v-fefca98f]{gap:16px}.guido-editor__wrapper[data-v-d4a5c957],.guido-editor__container[data-v-d4a5c957]{width:100%;height:100vh}
|