@useinsider/guido 1.0.3-beta.d74964e → 1.0.3-beta.d929d15
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 +3 -137
- package/dist/components/Guido.vue.js +3 -3
- package/dist/components/Guido.vue2.js +75 -79
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +15 -16
- package/dist/components/organisms/header/RightSlot.vue.js +11 -11
- package/dist/composables/useStripo.js +50 -39
- package/dist/enums/defaults.js +9 -15
- package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
- package/dist/extensions/Blocks/CouponBlock/extension.js +2 -2
- package/dist/extensions/Blocks/Recommendation/extension.js +4 -4
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +4 -4
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +17 -23
- package/dist/extensions/DynamicContent/dynamic-content.js +31 -151
- package/dist/guido.css +1 -1
- package/dist/services/stripoApi.js +1 -1
- package/dist/src/@types/generic.d.ts +6 -35
- package/dist/src/components/Guido.vue.d.ts +2 -2
- package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
- package/dist/src/extensions/DynamicContent/dynamic-content-modal.d.ts +2 -9
- package/dist/src/extensions/DynamicContent/dynamic-content.d.ts +2 -56
- package/dist/src/stores/config.d.ts +1 -7
- package/dist/src/stores/dynamic-content.d.ts +2 -2
- package/dist/static/styles/components/narrow-panel.css.js +0 -10
- package/dist/stores/dynamic-content.js +1 -1
- package/package.json +1 -1
- package/dist/composables/useBlocksConfig.js +0 -49
- package/dist/src/composables/useBlocksConfig.d.ts +0 -11
|
@@ -6,21 +6,21 @@ export declare const useDynamicContentStore: import("pinia").StoreDefinition<"dy
|
|
|
6
6
|
getSelectedDynamicContentList: (state: {
|
|
7
7
|
selectedDynamicContent: {
|
|
8
8
|
value: string;
|
|
9
|
+
text: string;
|
|
9
10
|
fallback?: string | undefined;
|
|
10
11
|
format?: {
|
|
11
12
|
key: string;
|
|
12
13
|
value: string;
|
|
13
14
|
} | undefined;
|
|
14
|
-
text: string;
|
|
15
15
|
};
|
|
16
16
|
selectedDynamicContentList: {
|
|
17
17
|
value: string;
|
|
18
|
+
text: string;
|
|
18
19
|
fallback?: string | undefined;
|
|
19
20
|
format?: {
|
|
20
21
|
key: string;
|
|
21
22
|
value: string;
|
|
22
23
|
} | undefined;
|
|
23
|
-
text: string;
|
|
24
24
|
}[];
|
|
25
25
|
} & import("pinia").PiniaCustomStateProperties<{
|
|
26
26
|
selectedDynamicContent: DynamicContent;
|
|
@@ -32,16 +32,6 @@ ue-stripe-thumb:hover:not(.disabled),
|
|
|
32
32
|
padding: 0 16px 16px;
|
|
33
33
|
grid-row-gap: 16px;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
/* TODO: will be removed after we find another way to hide stripo custom modules */
|
|
37
|
-
#moduleTab_tab1,
|
|
38
|
-
button[aria-label="Default Modules"],
|
|
39
|
-
button[aria-controls="moduleTab_tab1_content"],
|
|
40
|
-
#moduleTab_tab2,
|
|
41
|
-
button[aria-label="Pre-Built AMP"],
|
|
42
|
-
button[aria-controls="moduleTab_tab2_content"] {
|
|
43
|
-
display: none !important;
|
|
44
|
-
}
|
|
45
35
|
`;
|
|
46
36
|
export {
|
|
47
37
|
o as default
|
|
@@ -2,7 +2,7 @@ import { removeDuplicatesFromArray as n } from "../utils/arrayUtil.js";
|
|
|
2
2
|
import { defineStore as a } from "pinia";
|
|
3
3
|
const s = a("dynamicContent", {
|
|
4
4
|
state: () => ({
|
|
5
|
-
selectedDynamicContent: { text: "", value: "" },
|
|
5
|
+
selectedDynamicContent: { text: "", value: "", fallback: "" },
|
|
6
6
|
selectedDynamicContentList: []
|
|
7
7
|
}),
|
|
8
8
|
actions: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "1.0.3-beta.
|
|
3
|
+
"version": "1.0.3-beta.d929d15",
|
|
4
4
|
"description": "Guido is a Vue + TypeScript wrapper for Email Plugin. Easily embed the email editor in your Vue applications.",
|
|
5
5
|
"main": "./dist/guido.umd.cjs",
|
|
6
6
|
"module": "./dist/library.js",
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
const l = {
|
|
2
|
-
"amp-accordion": "ampAccordionEnabled",
|
|
3
|
-
"amp-carousel": "ampCarouselEnabled",
|
|
4
|
-
"amp-form-controls": "ampFormControlsEnabled",
|
|
5
|
-
"banner-block": "bannerEnabled",
|
|
6
|
-
"button-block": "buttonEnabled",
|
|
7
|
-
"html-block": "htmlEnabled",
|
|
8
|
-
"image-block": "imageEnabled",
|
|
9
|
-
"menu-block": "menuEnabled",
|
|
10
|
-
"social-block": "socialNetEnabled",
|
|
11
|
-
"spacer-block": "spacerEnabled",
|
|
12
|
-
"text-block": "textEnabled",
|
|
13
|
-
"timer-block": "timerEnabled",
|
|
14
|
-
"video-block": "videoEnabled"
|
|
15
|
-
}, c = {
|
|
16
|
-
"dynamic-content": () => import("../extensions/DynamicContent/extension.js"),
|
|
17
|
-
"checkbox-block": () => import("../extensions/Blocks/Checkbox/extension.js"),
|
|
18
|
-
"radio-button-block": () => import("../extensions/Blocks/RadioButton/extension.js"),
|
|
19
|
-
"recommendation-block": () => import("../extensions/Blocks/Recommendation/extension.js"),
|
|
20
|
-
"unsubscribe-block": () => import("../extensions/Blocks/Unsubscribe/extension.js"),
|
|
21
|
-
"coupon-block": () => import("../extensions/Blocks/CouponBlock/extension.js"),
|
|
22
|
-
"items-block": null
|
|
23
|
-
// TODO: Add ItemsBlock extension when available
|
|
24
|
-
}, a = (n) => {
|
|
25
|
-
if (!n || !n.length)
|
|
26
|
-
return {};
|
|
27
|
-
const o = {};
|
|
28
|
-
return n.forEach((e) => {
|
|
29
|
-
const t = l[e];
|
|
30
|
-
t && (o[t] = !1);
|
|
31
|
-
}), o;
|
|
32
|
-
}, r = async (n) => !n || !n.length ? [] : (await Promise.all(
|
|
33
|
-
n.map(async (e) => {
|
|
34
|
-
const t = c[e];
|
|
35
|
-
return t ? (await t()).default : null;
|
|
36
|
-
})
|
|
37
|
-
)).filter((e) => e !== null), s = () => ({
|
|
38
|
-
getStripoBlocksConfig: async () => {
|
|
39
|
-
var e;
|
|
40
|
-
const o = (e = window.GuidoConfig) == null ? void 0 : e.blocks;
|
|
41
|
-
return {
|
|
42
|
-
baseBlocks: a(o == null ? void 0 : o.excludeDefaults),
|
|
43
|
-
extensions: await r(o == null ? void 0 : o.includeCustoms)
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
export {
|
|
48
|
-
s as useBlocksConfig
|
|
49
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { Extension } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
/**
|
|
3
|
-
* Composable for managing Guido blocks configuration
|
|
4
|
-
* Converts GuidoConfig blocks settings to Stripo-compatible format
|
|
5
|
-
*/
|
|
6
|
-
export declare const useBlocksConfig: () => {
|
|
7
|
-
getStripoBlocksConfig: () => Promise<{
|
|
8
|
-
baseBlocks: Record<string, boolean>;
|
|
9
|
-
extensions: Extension[];
|
|
10
|
-
}>;
|
|
11
|
-
};
|