@useinsider/guido 3.19.0-beta.2854f4f → 3.19.0-beta.3906ea8

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.
Files changed (40) hide show
  1. package/README.md +21 -3
  2. package/dist/@types/config/schemas.js +59 -51
  3. package/dist/components/Guido.vue.js +4 -4
  4. package/dist/components/Guido.vue2.js +57 -55
  5. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +3 -3
  6. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +56 -52
  7. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.js +18 -0
  8. package/dist/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue2.js +25 -0
  9. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +18 -18
  10. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +28 -26
  11. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.js +21 -0
  12. package/dist/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue2.js +46 -0
  13. package/dist/composables/useCustomInterfaceAppearance.js +54 -50
  14. package/dist/composables/useLegacyStrategyConversion.js +61 -0
  15. package/dist/enums/extensions/recommendationBlock.js +34 -25
  16. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +73 -72
  17. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +81 -38
  18. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +169 -108
  19. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.js +42 -0
  20. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +10 -10
  21. package/dist/guido.css +1 -1
  22. package/dist/services/recommendationApi.js +46 -37
  23. package/dist/src/@types/config/schemas.d.ts +16 -0
  24. package/dist/src/components/organisms/extensions/recommendation/LegacyStrategyUpdatedModal.vue.d.ts +2 -0
  25. package/dist/src/components/organisms/onboarding/RecommendationLegacyStrategyOnboarding.vue.d.ts +2 -0
  26. package/dist/src/composables/useConfig.d.ts +4 -0
  27. package/dist/src/composables/useLegacyStrategyConversion.d.ts +3 -0
  28. package/dist/src/enums/extensions/recommendationBlock.d.ts +5 -1
  29. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +1 -0
  30. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +76 -1
  31. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMigration.d.ts +32 -0
  32. package/dist/src/services/recommendationApi.d.ts +2 -1
  33. package/dist/src/stores/config.d.ts +322 -0
  34. package/dist/src/stores/onboarding.d.ts +421 -0
  35. package/dist/static/assets/icons/filled-arrow-rising.svg.js +5 -0
  36. package/dist/static/assets/icons/line-info.svg.js +5 -0
  37. package/dist/static/styles/components/recommendation-strategy.css.js +70 -5
  38. package/dist/stores/config.js +74 -60
  39. package/dist/stores/onboarding.js +6 -1
  40. package/package.json +2 -2
@@ -1,8 +1,8 @@
1
1
  import "../@types/config/schemas.js";
2
2
  import "../@types/config/defaults.js";
3
3
  import { parseConfig as o } from "../@types/config/validator.js";
4
- import { defineStore as r } from "pinia";
5
- const f = r("guido-config", {
4
+ import { defineStore as a } from "pinia";
5
+ const s = a("guido-config", {
6
6
  state: () => ({
7
7
  initialized: !1,
8
8
  config: null
@@ -11,121 +11,135 @@ const f = r("guido-config", {
11
11
  /**
12
12
  * Get the identity configuration
13
13
  */
14
- identity: (i) => {
15
- var e;
16
- return ((e = i.config) == null ? void 0 : e.identity) ?? null;
14
+ identity: (e) => {
15
+ var i;
16
+ return ((i = e.config) == null ? void 0 : i.identity) ?? null;
17
17
  },
18
18
  /**
19
19
  * Get the partner configuration
20
20
  */
21
- partner: (i) => {
22
- var e;
23
- return ((e = i.config) == null ? void 0 : e.partner) ?? null;
21
+ partner: (e) => {
22
+ var i;
23
+ return ((i = e.config) == null ? void 0 : i.partner) ?? null;
24
24
  },
25
25
  /**
26
26
  * Get the template configuration
27
27
  */
28
- template: (i) => {
29
- var e;
30
- return ((e = i.config) == null ? void 0 : e.template) ?? null;
28
+ template: (e) => {
29
+ var i;
30
+ return ((i = e.config) == null ? void 0 : i.template) ?? null;
31
31
  },
32
32
  /**
33
33
  * Get the editor configuration
34
34
  */
35
- editor: (i) => {
36
- var e;
37
- return ((e = i.config) == null ? void 0 : e.editor) ?? null;
35
+ editor: (e) => {
36
+ var i;
37
+ return ((i = e.config) == null ? void 0 : i.editor) ?? null;
38
38
  },
39
39
  /**
40
40
  * Get the UI configuration
41
41
  */
42
- ui: (i) => {
43
- var e;
44
- return ((e = i.config) == null ? void 0 : e.ui) ?? null;
42
+ ui: (e) => {
43
+ var i;
44
+ return ((i = e.config) == null ? void 0 : i.ui) ?? null;
45
45
  },
46
46
  /**
47
47
  * Get the features configuration
48
48
  */
49
- features: (i) => {
50
- var e;
51
- return ((e = i.config) == null ? void 0 : e.features) ?? null;
49
+ features: (e) => {
50
+ var i;
51
+ return ((i = e.config) == null ? void 0 : i.features) ?? null;
52
52
  },
53
53
  /**
54
54
  * Get the blocks configuration
55
55
  */
56
- blocks: (i) => {
57
- var e;
58
- return ((e = i.config) == null ? void 0 : e.blocks) ?? null;
56
+ blocks: (e) => {
57
+ var i;
58
+ return ((i = e.config) == null ? void 0 : i.blocks) ?? null;
59
59
  },
60
60
  /**
61
61
  * Get the compiler configuration
62
62
  */
63
- compiler: (i) => {
64
- var e;
65
- return ((e = i.config) == null ? void 0 : e.compiler) ?? null;
63
+ compiler: (e) => {
64
+ var i;
65
+ return ((i = e.config) == null ? void 0 : i.compiler) ?? null;
66
66
  },
67
67
  /**
68
68
  * Get the callbacks configuration
69
69
  */
70
- callbacks: (i) => {
71
- var e;
72
- return ((e = i.config) == null ? void 0 : e.callbacks) ?? null;
70
+ callbacks: (e) => {
71
+ var i;
72
+ return ((i = e.config) == null ? void 0 : i.callbacks) ?? null;
73
73
  },
74
74
  /**
75
75
  * Get the template ID
76
76
  */
77
- templateId: (i) => {
78
- var e, n;
79
- return ((n = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : n.templateId) ?? "";
77
+ templateId: (e) => {
78
+ var i, t;
79
+ return ((t = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : t.templateId) ?? "";
80
80
  },
81
81
  /**
82
82
  * Get the user ID
83
83
  */
84
- userId: (i) => {
85
- var e, n;
86
- return ((n = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : n.userId) ?? "";
84
+ userId: (e) => {
85
+ var i, t;
86
+ return ((t = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : t.userId) ?? "";
87
87
  },
88
88
  /**
89
89
  * Get the variation ID
90
90
  */
91
- variationId: (i) => {
92
- var e, n;
93
- return ((n = (e = i.config) == null ? void 0 : e.identity) == null ? void 0 : n.variationId) ?? "";
91
+ variationId: (e) => {
92
+ var i, t;
93
+ return ((t = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : t.variationId) ?? "";
94
+ },
95
+ /**
96
+ * Get the campaign ID
97
+ */
98
+ campaignId: (e) => {
99
+ var i, t;
100
+ return ((t = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : t.campaignId) ?? "";
101
+ },
102
+ /**
103
+ * Get the template-library ID of the host template
104
+ */
105
+ templateLibraryId: (e) => {
106
+ var i, t;
107
+ return ((t = (i = e.config) == null ? void 0 : i.identity) == null ? void 0 : t.templateLibraryId) ?? "";
94
108
  },
95
109
  /**
96
110
  * Get the partner name
97
111
  */
98
- partnerName: (i) => {
99
- var e, n;
100
- return ((n = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : n.name) ?? "";
112
+ partnerName: (e) => {
113
+ var i, t;
114
+ return ((t = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : t.name) ?? "";
101
115
  },
102
116
  /**
103
117
  * Get the product type
104
118
  */
105
- productType: (i) => {
106
- var e, n;
107
- return ((n = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : n.productType) ?? 60;
119
+ productType: (e) => {
120
+ var i, t;
121
+ return ((t = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : t.productType) ?? 60;
108
122
  },
109
123
  /**
110
124
  * Get the message type
111
125
  */
112
- messageType: (i) => {
113
- var e, n;
114
- return ((n = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : n.messageType) ?? 1;
126
+ messageType: (e) => {
127
+ var i, t;
128
+ return ((t = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : t.messageType) ?? 1;
115
129
  },
116
130
  /**
117
131
  * Get the username
118
132
  */
119
- username: (i) => {
120
- var e, n;
121
- return ((n = (e = i.config) == null ? void 0 : e.partner) == null ? void 0 : n.username) ?? "Guido User";
133
+ username: (e) => {
134
+ var i, t;
135
+ return ((t = (i = e.config) == null ? void 0 : i.partner) == null ? void 0 : t.username) ?? "Guido User";
122
136
  },
123
137
  /**
124
138
  * Check if header should be shown
125
139
  */
126
- showHeader: (i) => {
127
- var e, n;
128
- return ((n = (e = i.config) == null ? void 0 : e.ui) == null ? void 0 : n.showHeader) ?? !0;
140
+ showHeader: (e) => {
141
+ var i, t;
142
+ return ((t = (i = e.config) == null ? void 0 : i.ui) == null ? void 0 : t.showHeader) ?? !0;
129
143
  },
130
144
  /**
131
145
  * Check if a specific feature is enabled.
@@ -133,18 +147,18 @@ const f = r("guido-config", {
133
147
  * flash on during loading, then disappear once config resolves.
134
148
  */
135
149
  // eslint-disable-next-line @stylistic/max-len
136
- isFeatureEnabled: (i) => (e) => {
137
- var n, t;
138
- return ((t = (n = i.config) == null ? void 0 : n.features) == null ? void 0 : t[e]) ?? !1;
150
+ isFeatureEnabled: (e) => (i) => {
151
+ var t, n;
152
+ return ((n = (t = e.config) == null ? void 0 : t.features) == null ? void 0 : n[i]) ?? !1;
139
153
  }
140
154
  },
141
155
  actions: {
142
156
  /**
143
157
  * Initialize the config store with validated configuration
144
158
  */
145
- init(i) {
146
- const e = o(i);
147
- this.config = e, this.initialized = !0;
159
+ init(e) {
160
+ const i = o(e);
161
+ this.config = i, this.initialized = !0;
148
162
  },
149
163
  /**
150
164
  * Reset the config store
@@ -155,5 +169,5 @@ const f = r("guido-config", {
155
169
  }
156
170
  });
157
171
  export {
158
- f as useConfigStore
172
+ s as useConfigStore
159
173
  };
@@ -12,7 +12,8 @@ const t = () => ({
12
12
  versionHistoryOnboarding: t(),
13
13
  ampOnboarding: t(),
14
14
  itemsOnboarding: t(),
15
- recommendationStrategyOnboarding: t()
15
+ recommendationStrategyOnboarding: t(),
16
+ recommendationLegacyStrategyOnboarding: t()
16
17
  },
17
18
  userModalState: {},
18
19
  isFetched: !1
@@ -49,6 +50,10 @@ const t = () => ({
49
50
  const { recommendationStrategyOnboarding: o } = n.onboardings;
50
51
  return o.config[o.cardIndex];
51
52
  },
53
+ getRecommendationLegacyStrategyCurrentCard: (n) => {
54
+ const { recommendationLegacyStrategyOnboarding: o } = n.onboardings;
55
+ return o.config[o.cardIndex];
56
+ },
52
57
  shouldShowOnboarding: (n) => (o) => {
53
58
  const i = n.userModalState.Guido;
54
59
  return o === "newVersionPopup" && (i != null && i.genericOnboarding) ? !1 : i ? !i[o] : !0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.19.0-beta.2854f4f",
3
+ "version": "3.19.0-beta.3906ea8",
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",
@@ -53,7 +53,7 @@
53
53
  "dependencies": {
54
54
  "@stripoinc/ui-editor-extensions": "3.10.0",
55
55
  "@useinsider/design-system-organisms": "0.0.3-beta.d816f06",
56
- "@useinsider/design-system-vue": "1.5.0",
56
+ "@useinsider/design-system-vue": "2.3.1",
57
57
  "@vueuse/core": "11.3.0",
58
58
  "lodash-es": "4.17.21",
59
59
  "pinia": "2.3.1",