@useinsider/guido 1.0.0-beta.a9e37bf → 1.0.0-beta.ae2520e
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 +12 -35
- package/dist/components/Guido.vue.d.ts +0 -4
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +18 -30
- package/dist/components/organisms/{header/HeaderWrapper.vue.js → top-bar/Header.vue.js} +7 -7
- package/dist/components/organisms/top-bar/Header.vue2.js +14 -0
- package/dist/components/organisms/top-bar/HeaderLeftSlot.vue.js +17 -0
- package/dist/components/organisms/top-bar/HeaderLeftSlot.vue2.js +11 -0
- package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.js +17 -0
- package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue2.js +17 -0
- package/dist/components/organisms/top-bar/HeaderRightSlot.vue.js +18 -0
- package/dist/components/organisms/top-bar/HeaderRightSlot.vue2.js +12 -0
- package/dist/components/organisms/{header/ViewOptions.vue.js → top-bar/HeaderViewOptions.vue.js} +5 -5
- package/dist/components/organisms/{header/ViewOptions.vue2.js → top-bar/HeaderViewOptions.vue2.js} +3 -3
- package/dist/composables/useCustomInterfaceAppearance.js +9 -43
- package/dist/composables/useStripo.d.ts +2 -2
- package/dist/composables/useStripo.js +55 -73
- package/dist/composables/useToaster.d.ts +0 -1
- package/dist/composables/useTranslations.d.ts +3 -1
- package/dist/enums/defaults.d.ts +0 -2
- package/dist/enums/defaults.js +3 -5
- package/dist/guido.css +1 -1
- package/dist/node_modules/pinia/dist/pinia.js +110 -113
- package/dist/static/editor.css.js +182 -0
- package/dist/stores/counter.d.ts +12 -0
- package/dist/stores/editor.d.ts +4 -3
- package/dist/stores/editor.js +0 -1
- package/package.json +1 -1
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +0 -14
- package/dist/components/organisms/header/LeftSlot.vue.js +0 -17
- package/dist/components/organisms/header/LeftSlot.vue2.js +0 -13
- package/dist/components/organisms/header/MiddleSlot.vue.d.ts +0 -2
- package/dist/components/organisms/header/MiddleSlot.vue.js +0 -17
- package/dist/components/organisms/header/MiddleSlot.vue2.js +0 -22
- package/dist/components/organisms/header/RightSlot.vue.js +0 -17
- package/dist/components/organisms/header/RightSlot.vue2.js +0 -21
- 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/header/version-history/VersionHistory.vue.d.ts +0 -14
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +0 -22
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +0 -18
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -16
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +0 -18
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue2.js +0 -16
- package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +0 -2
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +0 -18
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +0 -23
- package/dist/composables/useActionsApi.d.ts +0 -4
- package/dist/composables/useActionsApi.js +0 -36
- package/dist/composables/useExport.d.ts +0 -3
- package/dist/composables/useExport.js +0 -30
- package/dist/composables/useHttp.js +0 -84
- package/dist/composables/usePartner.d.ts +0 -4
- package/dist/composables/usePartner.js +0 -16
- package/dist/composables/useToaster.js +0 -37
- package/dist/composables/useTranslations.js +0 -18
- package/dist/composables/useVersionHistoryApi.d.ts +0 -8
- package/dist/composables/useVersionHistoryApi.js +0 -53
- package/dist/enums/displayConditions.d.ts +0 -2
- package/dist/enums/displayConditions.js +0 -80
- package/dist/mock/api/custom-fonts.d.ts +0 -2
- package/dist/node_modules/lodash-es/_Hash.js +0 -20
- package/dist/node_modules/lodash-es/_ListCache.js +0 -20
- package/dist/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/lodash-es/_MapCache.js +0 -20
- package/dist/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/lodash-es/_assocIndexOf.js +0 -10
- package/dist/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/lodash-es/_baseIsNative.js +0 -16
- package/dist/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/lodash-es/_getRawTag.js +0 -15
- package/dist/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/lodash-es/_listCacheDelete.js +0 -12
- package/dist/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/lodash-es/_toSource.js +0 -17
- package/dist/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/lodash-es/isFunction.js +0 -12
- package/dist/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/lodash-es/memoize.js +0 -18
- 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 -44
- 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/wide-panel.css.js +0 -135
- package/dist/static/styles/variables.css.js +0 -23
- package/dist/stores/version-history.d.ts +0 -80
- package/dist/stores/version-history.js +0 -28
- package/dist/utils/dateUtil.d.ts +0 -1
- package/dist/utils/dateUtil.js +0 -16
- /package/dist/components/organisms/{header/HeaderWrapper.vue.d.ts → top-bar/Header.vue.d.ts} +0 -0
- /package/dist/components/organisms/{header/RightSlot.vue.d.ts → top-bar/HeaderLeftSlot.vue.d.ts} +0 -0
- /package/dist/components/organisms/{header/ViewOptions.vue.d.ts → top-bar/HeaderMiddleSlot.vue.d.ts} +0 -0
- /package/dist/components/organisms/{header/LeftSlot.vue.d.ts → top-bar/HeaderRightSlot.vue.d.ts} +0 -0
- /package/dist/components/organisms/{header/version-history/RestoreButton.vue.d.ts → top-bar/HeaderViewOptions.vue.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -24,7 +24,6 @@ npm install @useinsider/guido
|
|
|
24
24
|
<div>
|
|
25
25
|
<Guido
|
|
26
26
|
:email-id="emailId"
|
|
27
|
-
:user-id="userId"
|
|
28
27
|
:guido-config="guidoConfig"
|
|
29
28
|
/>
|
|
30
29
|
</div>
|
|
@@ -40,7 +39,6 @@ export default {
|
|
|
40
39
|
data() {
|
|
41
40
|
return {
|
|
42
41
|
emailId: 'abc123',
|
|
43
|
-
userId: '12345',
|
|
44
42
|
guidoConfig: {
|
|
45
43
|
translationsPath: 'window.trans.en'
|
|
46
44
|
}
|
|
@@ -57,10 +55,6 @@ export default {
|
|
|
57
55
|
| Prop | Type | Required | Default | Description |
|
|
58
56
|
|------|------|----------|---------|-------------|
|
|
59
57
|
| `emailId` | `string` | ✅ | - | Unique identifier for the email draft |
|
|
60
|
-
| `userId` | `string` | ✅ | - | Unique identifier for the user draft |
|
|
61
|
-
| `username` | `string` | ⚪ | Guido User | User name |
|
|
62
|
-
| `partnerName` | `string` | ⚪ | Getting from URL host | Unique identifier for the partner draft |
|
|
63
|
-
| `productType` | `string` | ⚪ | Getting from URL path | Unique identifier for the product draft |
|
|
64
58
|
| `guidoConfig` | `GuidoConfig` | ✅ | - | Configuration object for the editor |
|
|
65
59
|
|
|
66
60
|
### GuidoConfig Interface
|
|
@@ -145,37 +139,24 @@ VITE_STRIPO_ROLE=your_role
|
|
|
145
139
|
```
|
|
146
140
|
src/
|
|
147
141
|
├── components/
|
|
148
|
-
│ ├── Guido.vue
|
|
142
|
+
│ ├── Guido.vue # Main component
|
|
149
143
|
│ └── organisms/
|
|
150
|
-
│ └──
|
|
151
|
-
│ └── version-history/ # Version History components
|
|
144
|
+
│ └── top-bar/ # Header components
|
|
152
145
|
...
|
|
153
146
|
├── composables/
|
|
154
|
-
│ ├── useStripo.ts
|
|
155
|
-
│ └── useTranslations.ts
|
|
147
|
+
│ ├── useStripo.ts # Stripo integration
|
|
148
|
+
│ └── useTranslations.ts # Translation management
|
|
156
149
|
├── @types/
|
|
157
|
-
│ ├── generic.ts
|
|
158
|
-
│ ├── stripo.d.ts
|
|
159
|
-
│ └── events.ts
|
|
150
|
+
│ ├── generic.ts # Generic types
|
|
151
|
+
│ ├── stripo.d.ts # Stripo-specific types
|
|
152
|
+
│ └── events.ts # Event types
|
|
160
153
|
├── static/
|
|
161
|
-
│ ├── editor.css
|
|
154
|
+
│ ├── editor.css # Custom editor styles
|
|
162
155
|
│ └── templates/
|
|
163
|
-
│ └── default/
|
|
164
|
-
└── library.ts
|
|
156
|
+
│ └── default/ # Default email template
|
|
157
|
+
└── library.ts # Main export for library
|
|
165
158
|
```
|
|
166
159
|
|
|
167
|
-
## 🌐 i18n
|
|
168
|
-
Before running the project, it sends to request to inone.useinsider.com/translations and writes the JSON file into - [trans.json](src/mock/responses/trans.json).
|
|
169
|
-
It allows to use production or local translations on your code. 🚀
|
|
170
|
-
Example usage:
|
|
171
|
-
```js
|
|
172
|
-
import { useTranslations } from '@@/Composables/useTranslations';
|
|
173
|
-
|
|
174
|
-
const trans = useTranslations();
|
|
175
|
-
|
|
176
|
-
// use everywhere like this:
|
|
177
|
-
trans('foo.bar')
|
|
178
|
-
```
|
|
179
160
|
|
|
180
161
|
## 📦 Build Output
|
|
181
162
|
|
|
@@ -199,6 +180,7 @@ The library builds to multiple formats:
|
|
|
199
180
|
}
|
|
200
181
|
```
|
|
201
182
|
|
|
183
|
+
|
|
202
184
|
## 🤝 Contributing
|
|
203
185
|
- PR Titles should be structured like `TASK-ID | 🔥 | Some Clear Task Descriptions`
|
|
204
186
|
- PR Labels should be filled.
|
|
@@ -218,12 +200,7 @@ ISC License
|
|
|
218
200
|
- [@useinsider/design-system-vue](https://github.com/useinsider/design-system-vue) - Insider's Vue design system
|
|
219
201
|
|
|
220
202
|
## 🎯 TODO:
|
|
221
|
-
-
|
|
203
|
+
- [editor.css](src/static/editor.css) should be optimized with variables & `sass-loader`.
|
|
222
204
|
- Master Version Generator should be fixed.
|
|
223
205
|
- Playwright integration
|
|
224
206
|
- Commitlint & Precommit Hooks integration
|
|
225
|
-
- We need to emit save event and we should return template config to it
|
|
226
|
-
- Default template should be same with production
|
|
227
|
-
- Open Guido with saved template
|
|
228
|
-
- Get User ID, Email and Unique Template ID as dynamic from props
|
|
229
|
-
- Get Pre-built display conditions from API
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { GuidoConfig } from '@@/Types/generic';
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
emailId: string;
|
|
4
|
-
userId: string;
|
|
5
|
-
partnerName?: string;
|
|
6
|
-
productType?: string;
|
|
7
|
-
username?: string;
|
|
8
4
|
guidoConfig: GuidoConfig;
|
|
9
5
|
};
|
|
10
6
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
@@ -3,16 +3,16 @@ import o from "./Guido.vue2.js";
|
|
|
3
3
|
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
5
|
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
6
|
-
return r("div", { staticClass: "guido-editor__wrapper" }, [r(t.
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper" }, [r(t.Header), r("div", { staticClass: "guido-editor__container", attrs: { id: "guido-editor" } })], 1);
|
|
7
7
|
}, _ = [], a = /* @__PURE__ */ i(
|
|
8
8
|
o,
|
|
9
9
|
s,
|
|
10
10
|
_,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"ef4897b1"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const p = a.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
p as default
|
|
18
18
|
};
|
|
@@ -1,43 +1,31 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
const h = /* @__PURE__ */ f({
|
|
1
|
+
import { defineComponent as n, onMounted as a } from "vue";
|
|
2
|
+
import { useStripo as m } from "../composables/useStripo.js";
|
|
3
|
+
import { useTemplates as p } from "../composables/useTemplates.js";
|
|
4
|
+
import { DefaultGuidoConfig as u } from "../enums/defaults.js";
|
|
5
|
+
import l from "./organisms/top-bar/Header.vue.js";
|
|
6
|
+
const _ = /* @__PURE__ */ n({
|
|
8
7
|
__name: "Guido",
|
|
9
8
|
props: {
|
|
10
9
|
emailId: null,
|
|
11
|
-
userId: null,
|
|
12
|
-
partnerName: null,
|
|
13
|
-
productType: null,
|
|
14
|
-
username: null,
|
|
15
10
|
guidoConfig: null
|
|
16
11
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const o =
|
|
19
|
-
emailId: n,
|
|
20
|
-
userId: i,
|
|
21
|
-
guidoConfig: a,
|
|
22
|
-
partnerName: u = r(),
|
|
23
|
-
productType: p = t(),
|
|
24
|
-
username: m = C
|
|
25
|
-
} = o;
|
|
12
|
+
setup(r) {
|
|
13
|
+
const o = r;
|
|
26
14
|
window.GuidoConfig = {
|
|
27
|
-
...
|
|
28
|
-
...
|
|
15
|
+
...u,
|
|
16
|
+
...o.guidoConfig
|
|
29
17
|
};
|
|
30
|
-
const { initPlugin:
|
|
31
|
-
return
|
|
18
|
+
const { initPlugin: i } = m(o.emailId), { getDefaultTemplate: e } = p();
|
|
19
|
+
return a(async () => {
|
|
32
20
|
try {
|
|
33
|
-
const
|
|
34
|
-
await
|
|
35
|
-
} catch (
|
|
36
|
-
console.error("Failed to initialize Stripo editor:",
|
|
21
|
+
const t = await e();
|
|
22
|
+
await i(t);
|
|
23
|
+
} catch (t) {
|
|
24
|
+
console.error("Failed to initialize Stripo editor:", t);
|
|
37
25
|
}
|
|
38
|
-
}), { __sfc: !0, props: o,
|
|
26
|
+
}), { __sfc: !0, props: o, initPlugin: i, getDefaultTemplate: e, Header: l };
|
|
39
27
|
}
|
|
40
28
|
});
|
|
41
29
|
export {
|
|
42
|
-
|
|
30
|
+
_ as default
|
|
43
31
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import t from "./
|
|
1
|
+
import t from "./Header.vue2.js";
|
|
2
2
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
3
|
+
var a = function() {
|
|
4
4
|
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
5
|
-
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.
|
|
6
|
-
},
|
|
5
|
+
return r(e.InContainer, { attrs: { border: "bor-w-0 bor-b-w-1 bor-s-s bor-c-6", "border-radius": "bor-r-0" } }, [r("div", { staticClass: "w-1 d-f a-i-c j-c-s-b p-3" }, [r(e.HeaderLeftSlot), r(e.HeaderMiddleSlot), r(e.HeaderRightSlot)], 1)]);
|
|
6
|
+
}, n = [], _ = /* @__PURE__ */ s(
|
|
7
7
|
t,
|
|
8
|
-
n,
|
|
9
8
|
a,
|
|
9
|
+
n,
|
|
10
10
|
!1,
|
|
11
11
|
null,
|
|
12
12
|
null
|
|
13
13
|
);
|
|
14
|
-
const
|
|
14
|
+
const c = _.exports;
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
c as default
|
|
17
17
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defineComponent as e } from "vue";
|
|
2
|
+
import { InContainer as r } from "@useinsider/design-system-vue";
|
|
3
|
+
import o from "./HeaderLeftSlot.vue.js";
|
|
4
|
+
import t from "./HeaderMiddleSlot.vue.js";
|
|
5
|
+
import m from "./HeaderRightSlot.vue.js";
|
|
6
|
+
const _ = /* @__PURE__ */ e({
|
|
7
|
+
__name: "Header",
|
|
8
|
+
setup(f) {
|
|
9
|
+
return { __sfc: !0, InContainer: r, HeaderLeftSlot: o, HeaderMiddleSlot: t, HeaderRightSlot: m };
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
export {
|
|
13
|
+
_ as default
|
|
14
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import n from "./HeaderLeftSlot.vue2.js";
|
|
2
|
+
import o from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var _ = function() {
|
|
4
|
+
var t = this, e = t._self._c, r = t._self._setupProxy;
|
|
5
|
+
return e("div", [e(r.InButtonV2, { attrs: { id: "guido__back-button", "label-text": "Back", "left-icon": "line-arrow-left", styling: "text", type: "secondary" } })], 1);
|
|
6
|
+
}, a = [], s = /* @__PURE__ */ o(
|
|
7
|
+
n,
|
|
8
|
+
_,
|
|
9
|
+
a,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const i = s.exports;
|
|
15
|
+
export {
|
|
16
|
+
i as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
import { InButtonV2 as e } from "@useinsider/design-system-vue";
|
|
3
|
+
const _ = /* @__PURE__ */ t({
|
|
4
|
+
__name: "HeaderLeftSlot",
|
|
5
|
+
setup(o) {
|
|
6
|
+
return { __sfc: !0, InButtonV2: e };
|
|
7
|
+
}
|
|
8
|
+
});
|
|
9
|
+
export {
|
|
10
|
+
_ as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import n from "./HeaderMiddleSlot.vue2.js";
|
|
2
|
+
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var i = function() {
|
|
4
|
+
var e = this, o = e._self._c, t = e._self._setupProxy;
|
|
5
|
+
return 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", "tooltip-text": "Email Preview", type: "secondary", "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__preview-button") } })], 1);
|
|
6
|
+
}, l = [], r = /* @__PURE__ */ s(
|
|
7
|
+
n,
|
|
8
|
+
i,
|
|
9
|
+
l,
|
|
10
|
+
!1,
|
|
11
|
+
null,
|
|
12
|
+
null
|
|
13
|
+
);
|
|
14
|
+
const _ = r.exports;
|
|
15
|
+
export {
|
|
16
|
+
_ as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { defineComponent as o } from "vue";
|
|
2
|
+
import { useEditorStore as e } from "../../../stores/editor.js";
|
|
3
|
+
import { InButtonV2 as i } from "@useinsider/design-system-vue";
|
|
4
|
+
const d = /* @__PURE__ */ o({
|
|
5
|
+
__name: "HeaderMiddleSlot",
|
|
6
|
+
setup(r) {
|
|
7
|
+
return { __sfc: !0, editorStore: e(), getTooltipOptions: (t) => ({
|
|
8
|
+
id: `${t}-tooltip`,
|
|
9
|
+
dynamicPosition: !1,
|
|
10
|
+
staticPosition: "bottom center",
|
|
11
|
+
iconStatus: !1
|
|
12
|
+
}), InButtonV2: i };
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export {
|
|
16
|
+
d as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import o from "./HeaderRightSlot.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
|
+
var s = this, t = s._self._c, e = s._self._setupProxy;
|
|
6
|
+
return t("div", { staticClass: "d-f header-right-slot" }, [t("div", { staticClass: "d-f" }, [t(e.HeaderViewOptions)], 1), t("div", { staticClass: "d-f" }, [t(e.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "label-text-status": !1 } }), t(e.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "label-text-status": !1 } }), t(e.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "label-text-status": !1 } }), t(e.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "label-text-status": !1 } })], 1), t(e.InButtonV2, { attrs: { id: "guido__save-button", "label-text": "Save" } })], 1);
|
|
7
|
+
}, i = [], r = /* @__PURE__ */ a(
|
|
8
|
+
o,
|
|
9
|
+
n,
|
|
10
|
+
i,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"94ef50f1"
|
|
14
|
+
);
|
|
15
|
+
const c = r.exports;
|
|
16
|
+
export {
|
|
17
|
+
c as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
import { InButtonV2 as e } from "@useinsider/design-system-vue";
|
|
3
|
+
import o from "./HeaderViewOptions.vue.js";
|
|
4
|
+
const i = /* @__PURE__ */ t({
|
|
5
|
+
__name: "HeaderRightSlot",
|
|
6
|
+
setup(r) {
|
|
7
|
+
return { __sfc: !0, InButtonV2: e, HeaderViewOptions: o };
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
export {
|
|
11
|
+
i as default
|
|
12
|
+
};
|
package/dist/components/organisms/{header/ViewOptions.vue.js → top-bar/HeaderViewOptions.vue.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import r from "./
|
|
2
|
-
/* empty css
|
|
1
|
+
import r from "./HeaderViewOptions.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
3
|
import s from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var n = function() {
|
|
5
5
|
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
@@ -10,9 +10,9 @@ var n = function() {
|
|
|
10
10
|
i,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"f67c82be"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = _.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|
package/dist/components/organisms/{header/ViewOptions.vue2.js → top-bar/HeaderViewOptions.vue2.js}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { defineComponent as e } from "vue";
|
|
2
2
|
import { useEditorStore as t } from "../../../stores/editor.js";
|
|
3
3
|
import { InSegments as o } from "@useinsider/design-system-vue";
|
|
4
|
-
const
|
|
5
|
-
__name: "
|
|
4
|
+
const a = /* @__PURE__ */ e({
|
|
5
|
+
__name: "HeaderViewOptions",
|
|
6
6
|
setup(n) {
|
|
7
7
|
return { __sfc: !0, editorStore: t(), segmentList: [
|
|
8
8
|
{ text: "", icon: "line-desktop", value: "desktop" },
|
|
@@ -11,5 +11,5 @@ const u = /* @__PURE__ */ e({
|
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
a as default
|
|
15
15
|
};
|
|
@@ -1,47 +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/wide-panel.css.js";
|
|
15
|
-
import h from "../static/styles/variables.css.js";
|
|
16
|
-
const w = [
|
|
17
|
-
h,
|
|
18
|
-
// Must be on top
|
|
19
|
-
S,
|
|
20
|
-
// Must be on top
|
|
21
|
-
e,
|
|
22
|
-
m,
|
|
23
|
-
i,
|
|
24
|
-
p,
|
|
25
|
-
n,
|
|
26
|
-
s,
|
|
27
|
-
C,
|
|
28
|
-
f,
|
|
29
|
-
a,
|
|
30
|
-
u,
|
|
31
|
-
c,
|
|
32
|
-
d,
|
|
33
|
-
l
|
|
34
|
-
].join(`
|
|
35
|
-
|
|
36
|
-
`), N = () => ({ importCss: () => {
|
|
37
|
-
const o = new CSSStyleSheet();
|
|
38
|
-
o.replaceSync(w);
|
|
39
|
-
const r = document.querySelector("ui-editor");
|
|
40
|
-
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)
|
|
41
7
|
return;
|
|
42
|
-
const
|
|
43
|
-
|
|
8
|
+
const o = t.shadowRoot;
|
|
9
|
+
o && (o.adoptedStyleSheets = [e]);
|
|
44
10
|
} });
|
|
45
11
|
export {
|
|
46
|
-
|
|
12
|
+
c as useCustomInterfaceAppearance
|
|
47
13
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare const useStripo: (
|
|
1
|
+
import type { Template } from '@@/Types/stripo';
|
|
2
|
+
export declare const useStripo: (emailId: string) => {
|
|
3
3
|
initPlugin: (template: Template) => Promise<void>;
|
|
4
4
|
};
|
|
@@ -1,99 +1,81 @@
|
|
|
1
|
-
import { useCustomInterfaceAppearance as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
...n,
|
|
22
|
-
active: !0
|
|
23
|
-
}));
|
|
24
|
-
} catch (t) {
|
|
25
|
-
return i(t, "Failed to fetch custom fonts"), [];
|
|
26
|
-
}
|
|
27
|
-
}, m = (t, r = []) => {
|
|
28
|
-
const n = w(), { html: e, css: s } = t;
|
|
1
|
+
import { useCustomInterfaceAppearance as u } from "./useCustomInterfaceAppearance.js";
|
|
2
|
+
import { useEditorStore as l } from "../stores/editor.js";
|
|
3
|
+
const g = (s) => {
|
|
4
|
+
const c = () => {
|
|
5
|
+
const t = new Headers();
|
|
6
|
+
t.append("Content-Type", "application/json");
|
|
7
|
+
const r = JSON.stringify({
|
|
8
|
+
pluginId: void 0,
|
|
9
|
+
secretKey: void 0,
|
|
10
|
+
role: void 0,
|
|
11
|
+
userId: s
|
|
12
|
+
});
|
|
13
|
+
return fetch("/v2/stripo/get-token", {
|
|
14
|
+
method: "POST",
|
|
15
|
+
headers: t,
|
|
16
|
+
body: r,
|
|
17
|
+
redirect: "follow"
|
|
18
|
+
}).then((o) => o.json());
|
|
19
|
+
}, d = (t) => {
|
|
20
|
+
const r = l(), n = t.html, o = t.css;
|
|
29
21
|
window.UIEditor.initEditor(
|
|
30
22
|
document.querySelector("#guido-editor"),
|
|
31
23
|
{
|
|
32
|
-
metadata:
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
metadata: {
|
|
25
|
+
emailId: s,
|
|
26
|
+
userId: "1",
|
|
27
|
+
username: "Plugin Demo User"
|
|
28
|
+
},
|
|
29
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
30
|
+
html: n,
|
|
31
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
32
|
+
css: o,
|
|
35
33
|
locale: "en",
|
|
36
34
|
undoButtonSelector: "#guido__undo-button",
|
|
37
35
|
redoButtonSelector: "#guido__redo-button",
|
|
38
36
|
mobileViewButtonSelector: ".guido__view-option-selection-mobile",
|
|
39
37
|
desktopViewButtonSelector: ".guido__view-option-selection-desktop",
|
|
38
|
+
versionHistoryButtonSelector: "#guido__history-button",
|
|
40
39
|
codeEditorButtonSelector: "#guido__code-button",
|
|
41
|
-
|
|
42
|
-
customConditionsEnabled: !0,
|
|
43
|
-
conditionCategories: h,
|
|
44
|
-
messageSettingsEnabled: !1,
|
|
45
|
-
editorFonts: {
|
|
46
|
-
showDefaultStandardFonts: !0,
|
|
47
|
-
showDefaultNotStandardFonts: !0,
|
|
48
|
-
customFonts: r
|
|
49
|
-
},
|
|
50
|
-
async onTokenRefreshRequest(o) {
|
|
40
|
+
async onTokenRefreshRequest(e) {
|
|
51
41
|
try {
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
} catch (
|
|
55
|
-
|
|
42
|
+
const i = await c();
|
|
43
|
+
e(i.token);
|
|
44
|
+
} catch (i) {
|
|
45
|
+
console.error("Failed to refresh token:", i);
|
|
56
46
|
}
|
|
57
47
|
},
|
|
58
48
|
onTemplateLoaded() {
|
|
59
49
|
try {
|
|
60
|
-
const { importCss:
|
|
61
|
-
|
|
62
|
-
} catch (
|
|
63
|
-
|
|
50
|
+
const { importCss: e } = u();
|
|
51
|
+
e();
|
|
52
|
+
} catch (e) {
|
|
53
|
+
console.error("Failed to load custom interface appearance:", e);
|
|
64
54
|
}
|
|
65
55
|
},
|
|
66
|
-
onCodeEditorVisibilityChanged(
|
|
67
|
-
|
|
68
|
-
},
|
|
69
|
-
onEditorVisualModeChanged(o) {
|
|
70
|
-
n.editorVisualMode = o.toLowerCase();
|
|
56
|
+
onCodeEditorVisibilityChanged(e) {
|
|
57
|
+
r.isCodeEditorOpen = e;
|
|
71
58
|
},
|
|
72
|
-
|
|
73
|
-
|
|
59
|
+
onEditorVisualModeChanged(e) {
|
|
60
|
+
r.editorVisualMode = e.toLowerCase();
|
|
74
61
|
}
|
|
75
62
|
}
|
|
76
63
|
);
|
|
77
|
-
}
|
|
64
|
+
};
|
|
65
|
+
return { initPlugin: (t) => new Promise((r, n) => {
|
|
78
66
|
if (document.getElementById("UiEditorScript")) {
|
|
79
|
-
t
|
|
67
|
+
d(t), r();
|
|
80
68
|
return;
|
|
81
69
|
}
|
|
82
|
-
const
|
|
83
|
-
|
|
84
|
-
t
|
|
85
|
-
},
|
|
86
|
-
const
|
|
87
|
-
n(
|
|
88
|
-
}, document.body.appendChild(
|
|
89
|
-
});
|
|
90
|
-
return { initPlugin: async (t) => {
|
|
91
|
-
await g(async () => {
|
|
92
|
-
const r = await p();
|
|
93
|
-
m(t, r);
|
|
94
|
-
});
|
|
95
|
-
} };
|
|
70
|
+
const o = document.createElement("script");
|
|
71
|
+
o.id = "UiEditorScript", o.type = "module", o.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", o.onload = () => {
|
|
72
|
+
d(t), r();
|
|
73
|
+
}, o.onerror = () => {
|
|
74
|
+
const e = new Error("Failed to load Stripo UIEditor script");
|
|
75
|
+
n(e);
|
|
76
|
+
}, document.body.appendChild(o);
|
|
77
|
+
}) };
|
|
96
78
|
};
|
|
97
79
|
export {
|
|
98
|
-
|
|
80
|
+
g as useStripo
|
|
99
81
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
interface TranslationValues {
|
|
2
2
|
[key: string]: string | number | boolean;
|
|
3
3
|
}
|
|
4
|
-
export declare const useTranslations: () =>
|
|
4
|
+
export declare const useTranslations: () => {
|
|
5
|
+
trans: ((key: string, params?: TranslationValues) => string) & import("lodash").MemoizedFunction;
|
|
6
|
+
};
|
|
5
7
|
export {};
|
package/dist/enums/defaults.d.ts
CHANGED
package/dist/enums/defaults.js
CHANGED
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
[data-v-f67c82be] .guido__view-option-selection-desktop svg,[data-v-f67c82be] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}.header-right-slot[data-v-94ef50f1]{gap:16px}.guido-editor__wrapper[data-v-ef4897b1],.guido-editor__container[data-v-ef4897b1]{width:100%;height:100vh}
|