@useinsider/guido 3.0.0-beta.a32411b → 3.0.0-beta.b2b28fa
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/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +91 -81
- package/dist/components/organisms/header/EditorActions.vue.js +8 -10
- package/dist/components/organisms/header/EditorActions.vue2.js +30 -40
- package/dist/config/i18n/en/labels.json.js +3 -8
- package/dist/config/migrator/itemsBlockMigrator.js +131 -135
- package/dist/config/migrator/recommendationMigrator.js +54 -58
- package/dist/extensions/Blocks/Items/block.js +21 -30
- package/dist/extensions/Blocks/Items/iconsRegistry.js +6 -7
- package/dist/extensions/Blocks/Items/items.css.js +0 -48
- package/dist/extensions/Blocks/Recommendation/block.js +13 -22
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +4 -5
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +0 -48
- package/dist/extensions/Blocks/common-control.js +4 -12
- package/dist/guido.css +1 -1
- package/dist/src/App.vue.d.ts +3 -1
- 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/RightSlot.vue.d.ts +1 -1
- package/dist/src/components/wrappers/WpModal.vue.d.ts +2 -2
- package/dist/src/extensions/Blocks/Items/block.d.ts +1 -3
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +1 -3
- package/dist/src/extensions/Blocks/common-control.d.ts +0 -5
- package/package.json +1 -1
- package/dist/components/organisms/header/MigrationConfirmModal.vue.js +0 -17
- package/dist/components/organisms/header/MigrationConfirmModal.vue2.js +0 -39
- package/dist/enums/block.js +0 -4
- package/dist/src/@types/extensions/block.d.ts +0 -2
- package/dist/src/components/organisms/header/MigrationConfirmModal.vue.d.ts +0 -6
- package/dist/src/enums/block.d.ts +0 -4
- package/dist/src/stores/template.d.ts +0 -29
- package/dist/src/utils/migrationBannerHtml.d.ts +0 -2
- package/dist/static/assets/info.svg.js +0 -5
- package/dist/stores/template.js +0 -15
- package/dist/utils/migrationBannerHtml.js +0 -21
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const c = g.Items;
|
|
9
|
-
class E extends u {
|
|
1
|
+
import { useOnboardingStore as d } from "../../../stores/onboarding.js";
|
|
2
|
+
import { Block as g, BlockCompositionType as f, ModificationDescription as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
3
|
+
import { SETTINGS_ENUMS as c, DefaultConfigValues as i } from "./enums/settingsEnums.js";
|
|
4
|
+
import { getDefaultTemplate as p } from "./template.js";
|
|
5
|
+
import { getItemsBlockContainer as u, getItemsBlockConfig as C, getDefaultItemsBlockConfig as I } from "./utils/nodeConfigUtils.js";
|
|
6
|
+
const y = "items-block";
|
|
7
|
+
class B extends g {
|
|
10
8
|
getId() {
|
|
11
|
-
return
|
|
9
|
+
return y;
|
|
12
10
|
}
|
|
13
11
|
getIcon() {
|
|
14
12
|
return "items-icon";
|
|
15
13
|
}
|
|
16
14
|
getBlockCompositionType() {
|
|
17
|
-
return
|
|
15
|
+
return f.CONTAINER;
|
|
18
16
|
}
|
|
19
17
|
getName() {
|
|
20
18
|
return this.api.translate("Items");
|
|
@@ -22,17 +20,10 @@ class E extends u {
|
|
|
22
20
|
getDescription() {
|
|
23
21
|
return this.api.translate("Items lets you display personalized products based on user behavior.");
|
|
24
22
|
}
|
|
25
|
-
getSettingsPanelTitleHtml() {
|
|
26
|
-
return f(
|
|
27
|
-
c,
|
|
28
|
-
this.api.translate("Items"),
|
|
29
|
-
this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly.")
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
23
|
getTemplate() {
|
|
33
|
-
return
|
|
34
|
-
orientation:
|
|
35
|
-
itemsType:
|
|
24
|
+
return p({
|
|
25
|
+
orientation: c.ORIENTATION.VERTICAL,
|
|
26
|
+
itemsType: c.ITEMS_TYPE.CART_ITEMS,
|
|
36
27
|
itemId: "{{Abandoned Cart Item (1) Url}}",
|
|
37
28
|
currencySymbol: i.productPriceCurrencySymbolControlValue,
|
|
38
29
|
currencyLocation: i.productPriceCurrencyLocationControlValue,
|
|
@@ -43,21 +34,21 @@ class E extends u {
|
|
|
43
34
|
return !1;
|
|
44
35
|
}
|
|
45
36
|
onCreated(n) {
|
|
46
|
-
const
|
|
47
|
-
r.querySelector('[product-attr="imageSrc"] img') ||
|
|
48
|
-
const e =
|
|
37
|
+
const s = this.api.getDocumentModifier(), r = this.api.getDocumentRootCssNode();
|
|
38
|
+
r.querySelector('[product-attr="imageSrc"] img') || s.modifyCss(r).appendRule('[product-attr="imageSrc"] img {object-fit: contain;}');
|
|
39
|
+
const e = u(n);
|
|
49
40
|
if (!e)
|
|
50
41
|
return;
|
|
51
|
-
const
|
|
42
|
+
const a = e.getNodeConfig(), l = a && Object.keys(a).length > 0, t = C(n);
|
|
52
43
|
if (t != null && t.initialized)
|
|
53
|
-
|
|
44
|
+
l ? t.blockInstanceId || this.api.getDocumentModifier().modifyHtml(e).setNodeConfig({ ...t, blockInstanceId: String(Date.now()) }).apply(new o("Assign block instance ID to block")) : this.api.getDocumentModifier().modifyHtml(e).setNodeConfig(t).apply(new o("Migrate legacy config to nodeConfig"));
|
|
54
45
|
else {
|
|
55
|
-
const
|
|
56
|
-
this.api.getDocumentModifier().modifyHtml(e).setNodeConfig(
|
|
46
|
+
const m = I();
|
|
47
|
+
this.api.getDocumentModifier().modifyHtml(e).setNodeConfig(m).apply(new o("Initialize Items block with default configuration")), d().startOnboarding("itemsOnboarding");
|
|
57
48
|
}
|
|
58
49
|
}
|
|
59
50
|
}
|
|
60
51
|
export {
|
|
61
|
-
|
|
62
|
-
|
|
52
|
+
y as BLOCK_ID,
|
|
53
|
+
B as ItemsBlock
|
|
63
54
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import o from "../../../
|
|
2
|
-
|
|
3
|
-
class s extends r {
|
|
1
|
+
import { IconsRegistry as o } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
class i extends o {
|
|
4
3
|
registerIconsSvg(t) {
|
|
5
4
|
t["items-icon"] = `
|
|
6
5
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -20,14 +19,14 @@ class s extends r {
|
|
|
20
19
|
</svg>
|
|
21
20
|
`, t["horizontal-orientation"] = `
|
|
22
21
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
|
|
23
|
-
<path d="M10 19H4C3.44772 19 3 18.5523 3 18V2C3 1.44772 3.44772 1 4 1H10V19Z" stroke="currentColor"
|
|
22
|
+
<path d="M10 19H4C3.44772 19 3 18.5523 3 18V2C3 1.44772 3.44772 1 4 1H10V19Z" stroke="currentColor"
|
|
24
23
|
stroke-width="2" fill="none"/>
|
|
25
|
-
<path d="M17 2V18C17 18.5523 16.5523 19 16 19H10V1H16C16.5523 1 17 1.44772 17 2Z" stroke="currentColor"
|
|
24
|
+
<path d="M17 2V18C17 18.5523 16.5523 19 16 19H10V1H16C16.5523 1 17 1.44772 17 2Z" stroke="currentColor"
|
|
26
25
|
stroke-width="2" fill="none"/>
|
|
27
26
|
</svg>
|
|
28
|
-
|
|
27
|
+
`;
|
|
29
28
|
}
|
|
30
29
|
}
|
|
31
30
|
export {
|
|
32
|
-
|
|
31
|
+
i as ItemsIconsRegistry
|
|
33
32
|
};
|
|
@@ -17,54 +17,6 @@ const n = `/* Utils */
|
|
|
17
17
|
.container:has(.items-controls-container) {
|
|
18
18
|
padding: 0
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
/* ─── Migration Info Box ─────────────────────────────────────────────── */
|
|
22
|
-
/* Shown in the settings panel title when a block was migrated from legacy */
|
|
23
|
-
|
|
24
|
-
/* Layout variables for positioning the absolutely-placed info box */
|
|
25
|
-
:host {
|
|
26
|
-
--items-migration-padding: 16px;
|
|
27
|
-
--items-migration-title-height: 61px;
|
|
28
|
-
--items-migration-box-height: 98px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* Push tabs down when info box is present inside the control panel header */
|
|
32
|
-
.control-panel-header:has(.items-block-migration-info) {
|
|
33
|
-
position: relative;
|
|
34
|
-
margin-bottom: calc(2 * var(--items-migration-padding) + var(--items-migration-box-height));
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
/* Info box container */
|
|
38
|
-
.items-block-migration-info {
|
|
39
|
-
display: flex;
|
|
40
|
-
align-items: flex-start;
|
|
41
|
-
gap: 8px;
|
|
42
|
-
padding: 12px;
|
|
43
|
-
background: var(--guido-color-background-onpage-message-info);
|
|
44
|
-
border: 1px solid var(--guido-color-border-onpage-message-info);
|
|
45
|
-
border-radius: 4px;
|
|
46
|
-
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
|
|
47
|
-
position: absolute;
|
|
48
|
-
left: var(--items-migration-padding);
|
|
49
|
-
right: var(--items-migration-padding);
|
|
50
|
-
top: calc(var(--items-migration-padding) + var(--items-migration-title-height));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/* Icon — 18x19 icon inside a 24x24 bounding box (matches Figma) */
|
|
54
|
-
.items-block-migration-info__icon {
|
|
55
|
-
flex-shrink: 0;
|
|
56
|
-
width: 24px;
|
|
57
|
-
height: 24px;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
/* Text content */
|
|
61
|
-
.items-block-migration-info__text {
|
|
62
|
-
margin: 4px 0;
|
|
63
|
-
white-space: normal;
|
|
64
|
-
font-size: 13px;
|
|
65
|
-
font-weight: 400;
|
|
66
|
-
line-height: 16px;
|
|
67
|
-
}
|
|
68
20
|
`;
|
|
69
21
|
export {
|
|
70
22
|
n as default
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var g = (r, o, t) =>
|
|
4
|
-
import {
|
|
5
|
-
import { getMigrationBannerHtml as k } from "../../../utils/migrationBannerHtml.js";
|
|
6
|
-
import { Block as B, BlockCompositionType as _, ModificationDescription as R } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
1
|
+
var p = Object.defineProperty;
|
|
2
|
+
var f = (r, o, t) => o in r ? p(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;
|
|
3
|
+
var g = (r, o, t) => f(r, typeof o != "symbol" ? o + "" : o, t);
|
|
4
|
+
import { Block as h, BlockCompositionType as I, ModificationDescription as _ } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
7
5
|
import { ensureMobileCssRulesExist as d } from "./controls/mobileLayout/cssRules.js";
|
|
8
6
|
import { RecommendationConfigService as s } from "./services/configService.js";
|
|
9
7
|
import { useRecommendationExtensionStore as u } from "./store/recommendation.js";
|
|
10
|
-
import { getDefaultTemplate as
|
|
11
|
-
const
|
|
12
|
-
class
|
|
8
|
+
import { getDefaultTemplate as k } from "./templates/grid/template.js";
|
|
9
|
+
const B = "recommendation-block", c = "recommendation-block-v2", a = "recommendation-id";
|
|
10
|
+
class y extends h {
|
|
13
11
|
constructor() {
|
|
14
12
|
super();
|
|
15
13
|
/**
|
|
@@ -19,13 +17,13 @@ class T extends B {
|
|
|
19
17
|
g(this, "_pendingBlockId", null);
|
|
20
18
|
}
|
|
21
19
|
getId() {
|
|
22
|
-
return
|
|
20
|
+
return B;
|
|
23
21
|
}
|
|
24
22
|
getIcon() {
|
|
25
23
|
return "recommendation-icon";
|
|
26
24
|
}
|
|
27
25
|
getBlockCompositionType() {
|
|
28
|
-
return
|
|
26
|
+
return I.CONTAINER;
|
|
29
27
|
}
|
|
30
28
|
getName() {
|
|
31
29
|
return this.api.translate("Recommendation Block");
|
|
@@ -33,13 +31,6 @@ class T extends B {
|
|
|
33
31
|
getDescription() {
|
|
34
32
|
return this.api.translate("Recommendation Block Title Description");
|
|
35
33
|
}
|
|
36
|
-
getSettingsPanelTitleHtml() {
|
|
37
|
-
return k(
|
|
38
|
-
p,
|
|
39
|
-
this.api.translate("Recommendation Block"),
|
|
40
|
-
this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Recommendation block and test your message to ensure it works properly.")
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
34
|
/**
|
|
44
35
|
* Returns the template HTML for a new recommendation block.
|
|
45
36
|
* Generates a unique recommendation ID and embeds the instance class
|
|
@@ -49,7 +40,7 @@ class T extends B {
|
|
|
49
40
|
*/
|
|
50
41
|
getTemplate() {
|
|
51
42
|
const t = this._generateNextId();
|
|
52
|
-
return this._pendingBlockId = t,
|
|
43
|
+
return this._pendingBlockId = t, k(t);
|
|
53
44
|
}
|
|
54
45
|
/**
|
|
55
46
|
* Called when a new block is dropped into the template
|
|
@@ -124,7 +115,7 @@ class T extends B {
|
|
|
124
115
|
if (!n)
|
|
125
116
|
return;
|
|
126
117
|
const i = this.api.getDocumentModifier();
|
|
127
|
-
i.modifyHtml(n).setAttribute(a, e.toString()), i.apply(new
|
|
118
|
+
i.modifyHtml(n).setAttribute(a, e.toString()), i.apply(new _(`Assign recommendation ID ${e}`));
|
|
128
119
|
}
|
|
129
120
|
/**
|
|
130
121
|
* Gets the recommendation-id from a block node
|
|
@@ -158,6 +149,6 @@ class T extends B {
|
|
|
158
149
|
}
|
|
159
150
|
}
|
|
160
151
|
export {
|
|
161
|
-
|
|
162
|
-
|
|
152
|
+
B as BLOCK_ID,
|
|
153
|
+
y as RecommendationBlock
|
|
163
154
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import r from "../../../
|
|
2
|
-
|
|
3
|
-
class h extends t {
|
|
1
|
+
import { IconsRegistry as r } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
class o extends r {
|
|
4
3
|
registerIconsSvg(C) {
|
|
5
4
|
C["recommendation-icon"] = `
|
|
6
5
|
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
@@ -60,9 +59,9 @@ class h extends t {
|
|
|
60
59
|
<circle cx="3" cy="16" r="1" stroke="currentColor" stroke-width="1"/>
|
|
61
60
|
<rect x="7" y="15" width="11" height="2" rx="1"/>
|
|
62
61
|
</svg>
|
|
63
|
-
|
|
62
|
+
`;
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
export {
|
|
67
|
-
|
|
66
|
+
o as RecommendationIconsRegistry
|
|
68
67
|
};
|
|
@@ -22,54 +22,6 @@ const n = `/* Utils */
|
|
|
22
22
|
ue-orderable.orderable-disabled .droppable-icon {
|
|
23
23
|
display: none;
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
/* ─── Migration Info Box ─────────────────────────────────────────────── */
|
|
27
|
-
/* Shown in the settings panel title when a block was migrated from legacy */
|
|
28
|
-
|
|
29
|
-
/* Layout variables for positioning the absolutely-placed info box */
|
|
30
|
-
:host {
|
|
31
|
-
--rec-migration-padding: 16px;
|
|
32
|
-
--rec-migration-title-height: 61px;
|
|
33
|
-
--rec-migration-box-height: 98px;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* Push tabs down when info box is present inside the control panel header */
|
|
37
|
-
.control-panel-header:has(.recommendation-block-migration-info) {
|
|
38
|
-
position: relative;
|
|
39
|
-
margin-bottom: calc(2 * var(--rec-migration-padding) + var(--rec-migration-box-height));
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/* Info box container */
|
|
43
|
-
.recommendation-block-migration-info {
|
|
44
|
-
display: flex;
|
|
45
|
-
align-items: flex-start;
|
|
46
|
-
gap: 8px;
|
|
47
|
-
padding: 12px;
|
|
48
|
-
background: var(--guido-color-background-onpage-message-info);
|
|
49
|
-
border: 1px solid var(--guido-color-border-onpage-message-info);
|
|
50
|
-
border-radius: 4px;
|
|
51
|
-
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
|
|
52
|
-
position: absolute;
|
|
53
|
-
left: var(--rec-migration-padding);
|
|
54
|
-
right: var(--rec-migration-padding);
|
|
55
|
-
top: calc(var(--rec-migration-padding) + var(--rec-migration-title-height));
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/* Icon — 18x19 icon inside a 24x24 bounding box (matches Figma) */
|
|
59
|
-
.recommendation-block-migration-info__icon {
|
|
60
|
-
flex-shrink: 0;
|
|
61
|
-
width: 24px;
|
|
62
|
-
height: 24px;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
/* Text content */
|
|
66
|
-
.recommendation-block-migration-info__text {
|
|
67
|
-
margin: 4px 0;
|
|
68
|
-
white-space: normal;
|
|
69
|
-
font-size: 13px;
|
|
70
|
-
font-weight: 400;
|
|
71
|
-
line-height: 16px;
|
|
72
|
-
}
|
|
73
25
|
`;
|
|
74
26
|
export {
|
|
75
27
|
n as default
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var O = (T, r, e) => r in T ?
|
|
1
|
+
var I = Object.defineProperty;
|
|
2
|
+
var O = (T, r, e) => r in T ? I(T, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : T[r] = e;
|
|
3
3
|
var u = (T, r, e) => O(T, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { Control as c, UIElementType as n, UEAttr as $ } from "../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
5
|
class _ extends c {
|
|
@@ -129,14 +129,6 @@ class _ extends c {
|
|
|
129
129
|
</${n.BUTTON}>
|
|
130
130
|
`;
|
|
131
131
|
}
|
|
132
|
-
_GuIcon({ src: e, className: t = "" }) {
|
|
133
|
-
return `
|
|
134
|
-
<${n.ICON}
|
|
135
|
-
${$.ICON.src}="${e}"
|
|
136
|
-
${t ? `class="${t}"` : ""}>
|
|
137
|
-
</${n.ICON}>
|
|
138
|
-
`;
|
|
139
|
-
}
|
|
140
132
|
/**
|
|
141
133
|
*
|
|
142
134
|
* @param param0
|
|
@@ -175,9 +167,9 @@ class _ extends c {
|
|
|
175
167
|
_GuOrderable(e, t) {
|
|
176
168
|
let E = "";
|
|
177
169
|
t.forEach((a) => {
|
|
178
|
-
const
|
|
170
|
+
const l = $.ORDERABLE_ITEM && "name" in $.ORDERABLE_ITEM ? $.ORDERABLE_ITEM.name : "name";
|
|
179
171
|
E += `
|
|
180
|
-
<${n.ORDERABLE_ITEM} ${
|
|
172
|
+
<${n.ORDERABLE_ITEM} ${l}="${a.key}">
|
|
181
173
|
${a.content}
|
|
182
174
|
</${n.ORDERABLE_ITEM}>
|
|
183
175
|
`;
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-079d2bf7] .in-progress-wrapper__progress p span:last-child{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-
|
|
1
|
+
.gap-16[data-v-3b53a736],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-cd76c125] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-079d2bf7] .in-progress-wrapper__progress p span:last-child{display:none!important}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-64c52560]{gap:8px}.version-history__toolbar[data-v-64c52560]{gap:4px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.editor-actions[data-v-17dd4d8b]{gap:4px}.header-wrapper[data-v-5c02dcc7]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-25780af6]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-25780af6]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-25780af6]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-df672485]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-df672485]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-df672485]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-df672485]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-df672485]{object-fit:cover;transform:scale(1)}[data-v-43c617a7] .guido__verion-history-view-option-selection-desktop svg,[data-v-43c617a7] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-43c617a7] .in-segments-wrapper__button_selected,[data-v-43c617a7] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-988f8da6]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-988f8da6]{min-height:504px}.iframe-wrapper[data-v-e0424e99]{width:258px}.iframe-scaled[data-v-e0424e99]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-d3c52b44] .vueperslides__bullets,[data-v-dd1a237a] .vueperslides__bullets{pointer-events:none!important}[data-v-dd1a237a] .vueperslides__parallax-wrapper{height:110px!important}[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
|
package/dist/src/App.vue.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import '@useinsider/design-system-vue/style';
|
|
2
|
+
import '@useinsider/design-system-vue/fonts.css';
|
|
3
|
+
import '@useinsider/design-system-vue/utilities.css';
|
|
2
4
|
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<{}>>, {}>;
|
|
3
5
|
export default _default;
|
|
@@ -11,7 +11,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
11
11
|
close: () => void;
|
|
12
12
|
};
|
|
13
13
|
hasChanges: import("vue").ComputedRef<boolean>;
|
|
14
|
-
saveSilent: () =>
|
|
14
|
+
saveSilent: () => Promise<Omit<SavedTemplateDetails, "metadata"> | undefined> | undefined;
|
|
15
15
|
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
16
16
|
"dynamic-content:open": (detail: {
|
|
17
17
|
text: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) =>
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo").SavedTemplateDetails, "metadata"> | 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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) =>
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata"> | undefined> | 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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
handleSave: (isSilent: boolean) =>
|
|
2
|
+
handleSave: (isSilent: boolean) => Promise<Omit<import("../../../@types/stripo.js").SavedTemplateDetails, "metadata"> | undefined> | 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?: '
|
|
6
|
+
size?: '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: "
|
|
36
|
+
size: "small" | "medium" | "large";
|
|
37
37
|
closeOnOutsideClick: boolean;
|
|
38
38
|
footerButtonOptions: FooterButtonGroup;
|
|
39
39
|
closeButtonStatus: boolean;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import type { BlockId } from '@@/Types/extensions/block';
|
|
2
1
|
import { Block, BlockCompositionType, ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
3
|
-
export declare const BLOCK_ID
|
|
2
|
+
export declare const BLOCK_ID = "items-block";
|
|
4
3
|
/**
|
|
5
4
|
* Items Block extension for Stripo email editor.
|
|
6
5
|
*
|
|
@@ -21,7 +20,6 @@ export declare class ItemsBlock extends Block {
|
|
|
21
20
|
getBlockCompositionType(): BlockCompositionType;
|
|
22
21
|
getName(): string;
|
|
23
22
|
getDescription(): string;
|
|
24
|
-
getSettingsPanelTitleHtml(): string;
|
|
25
23
|
getTemplate(): string;
|
|
26
24
|
allowInnerBlocksDND(): boolean;
|
|
27
25
|
onCreated(node: ImmutableHtmlNode): void;
|
|
@@ -5,10 +5,9 @@
|
|
|
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';
|
|
9
8
|
import type { ImmutableHtmlNode } from '@stripoinc/ui-editor-extensions';
|
|
10
9
|
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
11
|
-
export declare const BLOCK_ID
|
|
10
|
+
export declare const BLOCK_ID = "recommendation-block";
|
|
12
11
|
export declare class RecommendationBlock extends Block {
|
|
13
12
|
/**
|
|
14
13
|
* Stores the ID generated in getTemplate() so onCreated() can reuse it.
|
|
@@ -21,7 +20,6 @@ export declare class RecommendationBlock extends Block {
|
|
|
21
20
|
getBlockCompositionType(): BlockCompositionType;
|
|
22
21
|
getName(): string;
|
|
23
22
|
getDescription(): string;
|
|
24
|
-
getSettingsPanelTitleHtml(): string;
|
|
25
23
|
/**
|
|
26
24
|
* Returns the template HTML for a new recommendation block.
|
|
27
25
|
* Generates a unique recommendation ID and embeds the instance class
|
|
@@ -11,10 +11,6 @@ interface LabelProps {
|
|
|
11
11
|
name?: string;
|
|
12
12
|
position?: 'top' | 'left';
|
|
13
13
|
}
|
|
14
|
-
interface IconProps {
|
|
15
|
-
src: string;
|
|
16
|
-
className?: string;
|
|
17
|
-
}
|
|
18
14
|
interface IconButtonProps {
|
|
19
15
|
name: string;
|
|
20
16
|
icon: string;
|
|
@@ -93,7 +89,6 @@ export declare abstract class CommonControl extends Control {
|
|
|
93
89
|
}): string;
|
|
94
90
|
_GuRadioButton({ name, buttons, id }: RadioButtonProps): string;
|
|
95
91
|
_GuButton({ name, label, id }: ButtonProps): string;
|
|
96
|
-
_GuIcon({ src, className }: IconProps): string;
|
|
97
92
|
/**
|
|
98
93
|
*
|
|
99
94
|
* @param param0
|
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.b2b28fa",
|
|
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,17 +0,0 @@
|
|
|
1
|
-
import n from "./MigrationConfirmModal.vue2.js";
|
|
2
|
-
import t from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var i = function() {
|
|
4
|
-
var e = this, r = e._self._c, o = e._self._setupProxy;
|
|
5
|
-
return o.isVisible ? r(o.WpModal, { attrs: { id: "migration-confirm-modal", size: "X-small", "close-on-outside-click": !1, "footer-button-options": o.footerButtonOptions, title: o.trans("email-editor.migration-confirm-save") }, on: { close: o.close, "primary-action": o.handleConfirm } }, [r("p", { domProps: { innerHTML: e._s(o.confirmMessage) } })]) : e._e();
|
|
6
|
-
}, s = [], a = /* @__PURE__ */ t(
|
|
7
|
-
n,
|
|
8
|
-
i,
|
|
9
|
-
s,
|
|
10
|
-
!1,
|
|
11
|
-
null,
|
|
12
|
-
null
|
|
13
|
-
);
|
|
14
|
-
const c = a.exports;
|
|
15
|
-
export {
|
|
16
|
-
c as default
|
|
17
|
-
};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, ref as m, computed as s } from "vue";
|
|
2
|
-
import _ from "../../wrappers/WpModal.vue.js";
|
|
3
|
-
import { useTranslations as b } from "../../../composables/useTranslations.js";
|
|
4
|
-
import { useTemplateStore as M } from "../../../stores/template.js";
|
|
5
|
-
const k = /* @__PURE__ */ g({
|
|
6
|
-
__name: "MigrationConfirmModal",
|
|
7
|
-
emits: ["confirm"],
|
|
8
|
-
setup(y, { expose: c, emit: n }) {
|
|
9
|
-
const t = m(!1), o = M(), e = b(), l = m({
|
|
10
|
-
cancelOrBackButton: {
|
|
11
|
-
type: "secondary",
|
|
12
|
-
labelText: e("campaign-builder.cancel"),
|
|
13
|
-
styling: "ghost"
|
|
14
|
-
},
|
|
15
|
-
primaryButton: {
|
|
16
|
-
type: "primary",
|
|
17
|
-
labelText: e("email-editor.migration-confirm-save")
|
|
18
|
-
}
|
|
19
|
-
}), i = s(() => {
|
|
20
|
-
if (o.hasRecommendationMigrations && o.hasItemsMigrations) {
|
|
21
|
-
const d = e("email-recommendation.recommendation"), u = e("email-editor.items");
|
|
22
|
-
return `${d} ${e("campaign-builder.or")} ${u}`;
|
|
23
|
-
}
|
|
24
|
-
return o.hasItemsMigrations ? e("email-editor.items") : e("email-recommendation.recommendation");
|
|
25
|
-
}), f = s(() => e("email-editor.migration-confirm-message", {
|
|
26
|
-
blockNames: i.value
|
|
27
|
-
})), r = () => {
|
|
28
|
-
t.value = !0;
|
|
29
|
-
}, a = () => {
|
|
30
|
-
t.value = !1;
|
|
31
|
-
}, p = () => {
|
|
32
|
-
a(), n("confirm");
|
|
33
|
-
};
|
|
34
|
-
return c({ open: r }), { __sfc: !0, emit: n, isVisible: t, templateStore: o, trans: e, footerButtonOptions: l, blockNames: i, confirmMessage: f, open: r, close: a, handleConfirm: p, WpModal: _ };
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
export {
|
|
38
|
-
k as default
|
|
39
|
-
};
|
package/dist/enums/block.js
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
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,29 +0,0 @@
|
|
|
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
|
-
}, {}>;
|
|
@@ -1,5 +0,0 @@
|
|
|
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
|
-
};
|