@useinsider/guido 3.0.0-beta.2b566e0 → 3.0.0-beta.44c8fd5
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/dist/components/organisms/header/EditorActions.vue.js +10 -8
- package/dist/components/organisms/header/EditorActions.vue2.js +40 -30
- package/dist/components/organisms/header/MigrationConfirmModal.vue.js +17 -0
- package/dist/components/organisms/header/MigrationConfirmModal.vue2.js +39 -0
- package/dist/config/i18n/en/labels.json.js +8 -3
- package/dist/config/migrator/itemsBlockMigrator.js +135 -131
- package/dist/config/migrator/recommendationMigrator.js +58 -54
- package/dist/enums/block.js +4 -0
- package/dist/extensions/Blocks/Items/block.js +30 -21
- package/dist/extensions/Blocks/Items/iconsRegistry.js +7 -6
- package/dist/extensions/Blocks/Items/items.css.js +48 -0
- package/dist/extensions/Blocks/Recommendation/block.js +22 -13
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +5 -4
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +48 -0
- package/dist/extensions/Blocks/common-control.js +12 -4
- package/dist/guido.css +1 -1
- package/dist/src/@types/extensions/block.d.ts +2 -0
- package/dist/src/App.vue.d.ts +1 -0
- package/dist/src/components/Guido.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/MigrationConfirmModal.vue.d.ts +6 -0
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/components/wrappers/WpModal.vue.d.ts +2 -2
- package/dist/src/enums/block.d.ts +4 -0
- package/dist/src/extensions/Blocks/Items/block.d.ts +3 -1
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +3 -1
- package/dist/src/extensions/Blocks/common-control.d.ts +5 -0
- package/dist/src/main.d.ts +1 -3
- package/dist/src/stores/template.d.ts +29 -0
- package/dist/src/utils/migrationBannerHtml.d.ts +2 -0
- package/dist/static/assets/info.svg.js +5 -0
- package/dist/stores/template.js +15 -0
- package/dist/utils/migrationBannerHtml.js +21 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) =>
|
|
2
|
+
handleSave: (isSilent: boolean) => void;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) =>
|
|
2
|
+
handleSave: (isSilent: boolean) => void | undefined;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
+
open: () => void;
|
|
3
|
+
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
4
|
+
confirm: () => void;
|
|
5
|
+
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
6
|
+
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) =>
|
|
2
|
+
handleSave: (isSilent: boolean) => void | undefined;
|
|
3
3
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -3,7 +3,7 @@ type __VLS_Props = {
|
|
|
3
3
|
id: string;
|
|
4
4
|
title: string;
|
|
5
5
|
description?: string;
|
|
6
|
-
size?: 'small' | 'medium' | 'large';
|
|
6
|
+
size?: 'X-small' | 'small' | 'medium' | 'large';
|
|
7
7
|
footerButtonOptions?: FooterButtonGroup;
|
|
8
8
|
closeButtonStatus?: boolean;
|
|
9
9
|
closeOnOutsideClick?: boolean;
|
|
@@ -33,7 +33,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
33
33
|
footerStatus: boolean;
|
|
34
34
|
}>>>, {
|
|
35
35
|
description: string;
|
|
36
|
-
size: "small" | "medium" | "large";
|
|
36
|
+
size: "X-small" | "small" | "medium" | "large";
|
|
37
37
|
closeOnOutsideClick: boolean;
|
|
38
38
|
footerButtonOptions: FooterButtonGroup;
|
|
39
39
|
closeButtonStatus: boolean;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { BlockId } from '@@/Types/extensions/block';
|
|
1
2
|
import { Block, BlockCompositionType, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
2
|
-
export declare const BLOCK_ID
|
|
3
|
+
export declare const BLOCK_ID: BlockId;
|
|
3
4
|
/**
|
|
4
5
|
* Items Block extension for Stripo email editor.
|
|
5
6
|
*
|
|
@@ -20,6 +21,7 @@ export declare class ItemsBlock extends Block {
|
|
|
20
21
|
getBlockCompositionType(): BlockCompositionType;
|
|
21
22
|
getName(): string;
|
|
22
23
|
getDescription(): string;
|
|
24
|
+
getSettingsPanelTitleHtml(): string;
|
|
23
25
|
getTemplate(): string;
|
|
24
26
|
allowInnerBlocksDND(): boolean;
|
|
25
27
|
onCreated(node: ImmutableHtmlNode): void;
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* Handles block lifecycle including configuration initialization and migration.
|
|
6
6
|
* Supports multiple block instances with unique recommendation-id attributes.
|
|
7
7
|
*/
|
|
8
|
+
import type { BlockId } from '@@/Types/extensions/block';
|
|
8
9
|
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
9
10
|
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
10
|
-
export declare const BLOCK_ID
|
|
11
|
+
export declare const BLOCK_ID: BlockId;
|
|
11
12
|
export declare class RecommendationBlock extends Block {
|
|
12
13
|
/**
|
|
13
14
|
* Stores the ID generated in getTemplate() so onCreated() can reuse it.
|
|
@@ -20,6 +21,7 @@ export declare class RecommendationBlock extends Block {
|
|
|
20
21
|
getBlockCompositionType(): BlockCompositionType;
|
|
21
22
|
getName(): string;
|
|
22
23
|
getDescription(): string;
|
|
24
|
+
getSettingsPanelTitleHtml(): string;
|
|
23
25
|
/**
|
|
24
26
|
* Returns the template HTML for a new recommendation block.
|
|
25
27
|
* Generates a unique recommendation ID and embeds the instance class
|
|
@@ -11,6 +11,10 @@ interface LabelProps {
|
|
|
11
11
|
name?: string;
|
|
12
12
|
position?: 'top' | 'left';
|
|
13
13
|
}
|
|
14
|
+
interface IconProps {
|
|
15
|
+
src: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
14
18
|
interface IconButtonProps {
|
|
15
19
|
name: string;
|
|
16
20
|
icon: string;
|
|
@@ -89,6 +93,7 @@ export declare abstract class CommonControl extends Control {
|
|
|
89
93
|
}): string;
|
|
90
94
|
_GuRadioButton({ name, buttons, id }: RadioButtonProps): string;
|
|
91
95
|
_GuButton({ name, label, id }: ButtonProps): string;
|
|
96
|
+
_GuIcon({ src, className }: IconProps): string;
|
|
92
97
|
/**
|
|
93
98
|
*
|
|
94
99
|
* @param param0
|
package/dist/src/main.d.ts
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { BlockId } from '@@/Types/extensions/block';
|
|
2
|
+
export declare const useTemplateStore: import("pinia").StoreDefinition<"guidoTemplate", {
|
|
3
|
+
migrations: Partial<Record<BlockId, number>>;
|
|
4
|
+
}, {
|
|
5
|
+
hasMigrations: (state: {
|
|
6
|
+
migrations: {
|
|
7
|
+
"recommendation-block"?: number | undefined;
|
|
8
|
+
"items-block"?: number | undefined;
|
|
9
|
+
};
|
|
10
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
|
11
|
+
migrations: Partial<Record<BlockId, number>>;
|
|
12
|
+
}>) => boolean;
|
|
13
|
+
hasRecommendationMigrations: (state: {
|
|
14
|
+
migrations: {
|
|
15
|
+
"recommendation-block"?: number | undefined;
|
|
16
|
+
"items-block"?: number | undefined;
|
|
17
|
+
};
|
|
18
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
|
19
|
+
migrations: Partial<Record<BlockId, number>>;
|
|
20
|
+
}>) => boolean;
|
|
21
|
+
hasItemsMigrations: (state: {
|
|
22
|
+
migrations: {
|
|
23
|
+
"recommendation-block"?: number | undefined;
|
|
24
|
+
"items-block"?: number | undefined;
|
|
25
|
+
};
|
|
26
|
+
} & import("pinia").PiniaCustomStateProperties<{
|
|
27
|
+
migrations: Partial<Record<BlockId, number>>;
|
|
28
|
+
}>) => boolean;
|
|
29
|
+
}, {}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const a = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none"><g transform="translate(3, 2.5)"><path fill="#258DDE" d="M6.878.142c3.91-.723 7.802 1.369 9.323 5.022 1.533 3.683.231 7.927-3.11 10.138a8.47 8.47 0 0 1-10.563-.983l-.067-.065A8.318 8.318 0 0 1 0 8.343V8.25C.05 4.305 2.878.927 6.787.16l.092-.018Zm7.713 5.682c-1.216-2.92-4.342-4.582-7.467-3.97-3.125.614-5.378 3.331-5.382 6.491a6.597 6.597 0 0 0 1.952 4.688 6.718 6.718 0 0 0 8.43.83 6.595 6.595 0 0 0 2.467-8.039Z"/><path fill="#258DDE" d="M12.52 13.58a.876.876 0 0 1 1.215-.017l.016.015 3.993 3.946a.86.86 0 0 1 .002 1.222.876.876 0 0 1-1.232.002l-3.992-3.946-.016-.015a.86.86 0 0 1 .014-1.206ZM6.713 5.43a.876.876 0 0 0-1.232 0 .86.86 0 0 0 0 1.221l1.232-1.222Zm1.09 3.525a.876.876 0 0 0 1.232 0 .86.86 0 0 0 0-1.222L7.804 8.955Zm1.232-1.222a.876.876 0 0 0-1.231 0 .86.86 0 0 0 0 1.222l1.231-1.222Zm1.091 3.526a.876.876 0 0 0 1.232 0 .86.86 0 0 0 0-1.222l-1.232 1.222Zm-1.09-2.304a.86.86 0 0 0 0-1.222.876.876 0 0 0-1.232 0l1.231 1.222ZM5.48 10.037a.86.86 0 0 0 0 1.222.876.876 0 0 0 1.232 0L5.48 10.037Zm2.323-2.304a.86.86 0 0 0 0 1.222.876.876 0 0 0 1.231 0L7.804 7.733Zm3.554-1.082a.86.86 0 0 0 0-1.222.876.876 0 0 0-1.232 0l1.232 1.222Zm-5.877 0 2.323 2.304 1.231-1.222L6.713 5.43 5.48 6.651Zm2.323 2.304 2.322 2.304 1.232-1.222-2.323-2.304-1.231 1.222Zm0-1.222L5.48 10.037l1.232 1.222 2.322-2.304-1.231-1.222Zm1.231 1.222 2.323-2.304-1.232-1.222-2.322 2.304 1.231 1.222Z"/></g></svg>
|
|
2
|
+
`;
|
|
3
|
+
export {
|
|
4
|
+
a as default
|
|
5
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BlockId as e } from "../enums/block.js";
|
|
2
|
+
import { defineStore as i } from "pinia";
|
|
3
|
+
const a = i("guidoTemplate", {
|
|
4
|
+
state: () => ({
|
|
5
|
+
migrations: {}
|
|
6
|
+
}),
|
|
7
|
+
getters: {
|
|
8
|
+
hasMigrations: (t) => Object.values(t.migrations).some((o) => (o ?? 0) > 0),
|
|
9
|
+
hasRecommendationMigrations: (t) => (t.migrations[e.Recommendation] ?? 0) > 0,
|
|
10
|
+
hasItemsMigrations: (t) => (t.migrations[e.Items] ?? 0) > 0
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
export {
|
|
14
|
+
a as useTemplateStore
|
|
15
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useTemplateStore as o } from "../stores/template.js";
|
|
2
|
+
import { UIElementType as i, UEAttr as r } from "../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
3
|
+
function g(t, n, e) {
|
|
4
|
+
return (o().migrations[t] ?? 0) <= 0 ? "" : `<div>
|
|
5
|
+
<div style="display: flex; align-items: center;">
|
|
6
|
+
<span>${n}</span>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="${t}-migration-info">
|
|
9
|
+
<${i.ICON}
|
|
10
|
+
${r.ICON.src}="migration-info-icon"
|
|
11
|
+
class="${t}-migration-info__icon">
|
|
12
|
+
</${i.ICON}>
|
|
13
|
+
<p class="${t}-migration-info__text">
|
|
14
|
+
${e}
|
|
15
|
+
</p>
|
|
16
|
+
</div>
|
|
17
|
+
</div>`;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
g as getMigrationBannerHtml
|
|
21
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.44c8fd5",
|
|
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",
|