@useinsider/guido 3.19.0-beta.c8d2be8 → 3.19.0-beta.cac604e
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/@types/config/schemas.js +104 -91
- package/dist/components/organisms/header/EditorActions.vue.js +4 -4
- package/dist/components/organisms/header/EditorActions.vue2.js +23 -25
- package/dist/composables/useActionsApi.js +52 -47
- package/dist/composables/useCodeEditorApi.js +23 -9
- package/dist/composables/useHttp.js +44 -55
- package/dist/composables/useTranslations.js +3 -2
- package/dist/composables/useVersionHistoryApi.js +33 -24
- package/dist/extensions/Blocks/Recommendation/block.js +88 -53
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +45 -38
- package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +72 -49
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +42 -22
- package/dist/extensions/Blocks/Recommendation/utils/partnerScope.js +26 -0
- package/dist/guido.css +1 -1
- package/dist/src/@types/config/schemas.d.ts +16 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/block.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +5 -0
- package/dist/src/extensions/Blocks/Recommendation/types/nodeConfig.d.ts +6 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/partnerScope.d.ts +27 -0
- package/dist/src/stores/config.d.ts +20 -0
- package/dist/src/utils/stripoEditorApi.d.ts +4 -0
- package/dist/static/styles/components/recommendation-strategy.css.js +9 -0
- package/dist/stores/unsubscribe.js +3 -3
- package/dist/utils/stripoEditorApi.js +11 -0
- package/package.json +2 -1
|
@@ -48,6 +48,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
48
48
|
selectedUnsubscribePages: number[];
|
|
49
49
|
forceRecreate: boolean;
|
|
50
50
|
trackIdCounter: number;
|
|
51
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
51
52
|
migration: {
|
|
52
53
|
recommendationConfigs: {
|
|
53
54
|
[x: string]: {
|
|
@@ -191,6 +192,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
191
192
|
selectedUnsubscribePages: number[];
|
|
192
193
|
forceRecreate: boolean;
|
|
193
194
|
trackIdCounter: number;
|
|
195
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
194
196
|
migration: {
|
|
195
197
|
recommendationConfigs: {
|
|
196
198
|
[x: string]: {
|
|
@@ -334,6 +336,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
334
336
|
selectedUnsubscribePages: number[];
|
|
335
337
|
forceRecreate: boolean;
|
|
336
338
|
trackIdCounter: number;
|
|
339
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
337
340
|
migration: {
|
|
338
341
|
recommendationConfigs: {
|
|
339
342
|
[x: string]: {
|
|
@@ -477,6 +480,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
477
480
|
selectedUnsubscribePages: number[];
|
|
478
481
|
forceRecreate: boolean;
|
|
479
482
|
trackIdCounter: number;
|
|
483
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
480
484
|
migration: {
|
|
481
485
|
recommendationConfigs: {
|
|
482
486
|
[x: string]: {
|
|
@@ -620,6 +624,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
620
624
|
selectedUnsubscribePages: number[];
|
|
621
625
|
forceRecreate: boolean;
|
|
622
626
|
trackIdCounter: number;
|
|
627
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
623
628
|
migration: {
|
|
624
629
|
recommendationConfigs: {
|
|
625
630
|
[x: string]: {
|
|
@@ -763,6 +768,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
763
768
|
selectedUnsubscribePages: number[];
|
|
764
769
|
forceRecreate: boolean;
|
|
765
770
|
trackIdCounter: number;
|
|
771
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
766
772
|
migration: {
|
|
767
773
|
recommendationConfigs: {
|
|
768
774
|
[x: string]: {
|
|
@@ -906,6 +912,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
906
912
|
selectedUnsubscribePages: number[];
|
|
907
913
|
forceRecreate: boolean;
|
|
908
914
|
trackIdCounter: number;
|
|
915
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
909
916
|
migration: {
|
|
910
917
|
recommendationConfigs: {
|
|
911
918
|
[x: string]: {
|
|
@@ -1049,6 +1056,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1049
1056
|
selectedUnsubscribePages: number[];
|
|
1050
1057
|
forceRecreate: boolean;
|
|
1051
1058
|
trackIdCounter: number;
|
|
1059
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
1052
1060
|
migration: {
|
|
1053
1061
|
recommendationConfigs: {
|
|
1054
1062
|
[x: string]: {
|
|
@@ -1192,6 +1200,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1192
1200
|
selectedUnsubscribePages: number[];
|
|
1193
1201
|
forceRecreate: boolean;
|
|
1194
1202
|
trackIdCounter: number;
|
|
1203
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
1195
1204
|
migration: {
|
|
1196
1205
|
recommendationConfigs: {
|
|
1197
1206
|
[x: string]: {
|
|
@@ -1335,6 +1344,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1335
1344
|
selectedUnsubscribePages: number[];
|
|
1336
1345
|
forceRecreate: boolean;
|
|
1337
1346
|
trackIdCounter: number;
|
|
1347
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
1338
1348
|
migration: {
|
|
1339
1349
|
recommendationConfigs: {
|
|
1340
1350
|
[x: string]: {
|
|
@@ -1478,6 +1488,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1478
1488
|
selectedUnsubscribePages: number[];
|
|
1479
1489
|
forceRecreate: boolean;
|
|
1480
1490
|
trackIdCounter: number;
|
|
1491
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
1481
1492
|
migration: {
|
|
1482
1493
|
recommendationConfigs: {
|
|
1483
1494
|
[x: string]: {
|
|
@@ -1621,6 +1632,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1621
1632
|
selectedUnsubscribePages: number[];
|
|
1622
1633
|
forceRecreate: boolean;
|
|
1623
1634
|
trackIdCounter: number;
|
|
1635
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
1624
1636
|
migration: {
|
|
1625
1637
|
recommendationConfigs: {
|
|
1626
1638
|
[x: string]: {
|
|
@@ -1764,6 +1776,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1764
1776
|
selectedUnsubscribePages: number[];
|
|
1765
1777
|
forceRecreate: boolean;
|
|
1766
1778
|
trackIdCounter: number;
|
|
1779
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
1767
1780
|
migration: {
|
|
1768
1781
|
recommendationConfigs: {
|
|
1769
1782
|
[x: string]: {
|
|
@@ -1907,6 +1920,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
1907
1920
|
selectedUnsubscribePages: number[];
|
|
1908
1921
|
forceRecreate: boolean;
|
|
1909
1922
|
trackIdCounter: number;
|
|
1923
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
1910
1924
|
migration: {
|
|
1911
1925
|
recommendationConfigs: {
|
|
1912
1926
|
[x: string]: {
|
|
@@ -2050,6 +2064,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2050
2064
|
selectedUnsubscribePages: number[];
|
|
2051
2065
|
forceRecreate: boolean;
|
|
2052
2066
|
trackIdCounter: number;
|
|
2067
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
2053
2068
|
migration: {
|
|
2054
2069
|
recommendationConfigs: {
|
|
2055
2070
|
[x: string]: {
|
|
@@ -2193,6 +2208,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2193
2208
|
selectedUnsubscribePages: number[];
|
|
2194
2209
|
forceRecreate: boolean;
|
|
2195
2210
|
trackIdCounter: number;
|
|
2211
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
2196
2212
|
migration: {
|
|
2197
2213
|
recommendationConfigs: {
|
|
2198
2214
|
[x: string]: {
|
|
@@ -2336,6 +2352,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2336
2352
|
selectedUnsubscribePages: number[];
|
|
2337
2353
|
forceRecreate: boolean;
|
|
2338
2354
|
trackIdCounter: number;
|
|
2355
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
2339
2356
|
migration: {
|
|
2340
2357
|
recommendationConfigs: {
|
|
2341
2358
|
[x: string]: {
|
|
@@ -2479,6 +2496,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2479
2496
|
selectedUnsubscribePages: number[];
|
|
2480
2497
|
forceRecreate: boolean;
|
|
2481
2498
|
trackIdCounter: number;
|
|
2499
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
2482
2500
|
migration: {
|
|
2483
2501
|
recommendationConfigs: {
|
|
2484
2502
|
[x: string]: {
|
|
@@ -2622,6 +2640,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2622
2640
|
selectedUnsubscribePages: number[];
|
|
2623
2641
|
forceRecreate: boolean;
|
|
2624
2642
|
trackIdCounter: number;
|
|
2643
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
2625
2644
|
migration: {
|
|
2626
2645
|
recommendationConfigs: {
|
|
2627
2646
|
[x: string]: {
|
|
@@ -2767,6 +2786,7 @@ export declare const useConfigStore: import("pinia").StoreDefinition<"guido-conf
|
|
|
2767
2786
|
selectedUnsubscribePages: number[];
|
|
2768
2787
|
forceRecreate: boolean;
|
|
2769
2788
|
trackIdCounter: number;
|
|
2789
|
+
recommendationCampaignUrls?: Record<string, unknown> | undefined;
|
|
2770
2790
|
migration: {
|
|
2771
2791
|
recommendationConfigs: {
|
|
2772
2792
|
[x: string]: {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StripoEditorApi } from '@@/Types/stripo';
|
|
2
|
+
export declare const EDITOR_NOT_READY_MESSAGE = "The editor is not ready yet. Please wait for it to load and try again.";
|
|
3
|
+
export declare const findEditorApi: () => StripoEditorApi | undefined;
|
|
4
|
+
export declare const getEditorApi: () => StripoEditorApi;
|
|
@@ -52,6 +52,15 @@ const n = `.strategy-control-header {
|
|
|
52
52
|
mask-size: 24px 24px;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
+
.strategy-control-notice--error {
|
|
56
|
+
border-color: var(--guido-color-border-onpage-message-error);
|
|
57
|
+
background-color: var(--guido-color-background-onpage-message-error);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.strategy-control-notice--error::before {
|
|
61
|
+
background-color: var(--guido-color-border-onpage-message-error);
|
|
62
|
+
}
|
|
63
|
+
|
|
55
64
|
.strategy-control-notice-text {
|
|
56
65
|
margin: 0;
|
|
57
66
|
padding: 4px 0;
|
|
@@ -39,16 +39,16 @@ const r = () => ({
|
|
|
39
39
|
});
|
|
40
40
|
},
|
|
41
41
|
isActiveTypeFirstInCollection: (e) => {
|
|
42
|
-
const t = i[e.selectedCollectionType];
|
|
42
|
+
const t = i[e.selectedCollectionType] ?? [];
|
|
43
43
|
return e.activeType === t[0];
|
|
44
44
|
},
|
|
45
45
|
isActiveTypeLastInCollection: (e) => {
|
|
46
|
-
const t = i[e.selectedCollectionType];
|
|
46
|
+
const t = i[e.selectedCollectionType] ?? [];
|
|
47
47
|
return e.activeType === t[t.length - 1];
|
|
48
48
|
},
|
|
49
49
|
hasTemplatesByCollectionType: (e) => {
|
|
50
50
|
const t = {};
|
|
51
|
-
return i[e.selectedCollectionType].forEach((s) => {
|
|
51
|
+
return (i[e.selectedCollectionType] ?? []).forEach((s) => {
|
|
52
52
|
t[s] = e.templates.some((c) => c.type === s);
|
|
53
53
|
}), t;
|
|
54
54
|
},
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const o = "The editor is not ready yet. Please wait for it to load and try again.", i = () => window.StripoEditorApi, r = () => {
|
|
2
|
+
const t = i();
|
|
3
|
+
if (!t)
|
|
4
|
+
throw new Error(o);
|
|
5
|
+
return t;
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
o as EDITOR_NOT_READY_MESSAGE,
|
|
9
|
+
i as findEditorApi,
|
|
10
|
+
r as getEditorApi
|
|
11
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.19.0-beta.
|
|
3
|
+
"version": "3.19.0-beta.cac604e",
|
|
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",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"test:e2e-mutation": "node scripts/e2e-mutation-check.mjs",
|
|
39
39
|
"type-check": "vue-tsc --noEmit --project tsconfig.config.json && vue-tsc --noEmit --project tsconfig.app.json",
|
|
40
40
|
"test": "vitest run --coverage",
|
|
41
|
+
"test:run": "vitest run",
|
|
41
42
|
"test:watch": "vitest",
|
|
42
43
|
"test:visual-update": "npx playwright test --update-snapshots --reporter html",
|
|
43
44
|
"test:e2e:coverage": "E2E_COVERAGE=true playwright test",
|