@useinsider/guido 3.18.2-beta.dfce34a → 3.18.2-beta.ec1fd57

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 (51) hide show
  1. package/dist/components/Guido.vue.js +3 -3
  2. package/dist/components/Guido.vue2.js +30 -30
  3. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue.js +11 -13
  4. package/dist/components/organisms/extensions/recommendation/AssignStrategyDrawer.vue2.js +52 -76
  5. package/dist/components/organisms/extensions/recommendation/RemoveStrategyModal.vue2.js +37 -23
  6. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +18 -20
  7. package/dist/composables/useCustomInterfaceAppearance.js +46 -56
  8. package/dist/composables/useHtmlValidator.js +82 -87
  9. package/dist/composables/useRecommendation.js +35 -40
  10. package/dist/composables/useStripo.js +30 -30
  11. package/dist/config/migrator/itemsBlockMigrator.js +257 -167
  12. package/dist/enums/extensions/recommendationBlock.js +31 -38
  13. package/dist/extensions/Blocks/Items/constants/cardLayout.js +20 -0
  14. package/dist/extensions/Blocks/Items/controls/name/trimming.js +18 -17
  15. package/dist/extensions/Blocks/Items/controls/settingsControl.js +114 -105
  16. package/dist/extensions/Blocks/Items/enums/productEnums.js +14 -9
  17. package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +11 -9
  18. package/dist/extensions/Blocks/Items/template.js +219 -204
  19. package/dist/extensions/Blocks/Recommendation/block.js +42 -61
  20. package/dist/extensions/Blocks/Recommendation/constants/defaultConfig.js +20 -21
  21. package/dist/extensions/Blocks/Recommendation/controls/main/index.js +35 -40
  22. package/dist/extensions/Blocks/Recommendation/controls/main/strategy.js +52 -84
  23. package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +74 -74
  24. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +140 -254
  25. package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +16 -26
  26. package/dist/extensions/Blocks/Recommendation/validation/requiredFields.js +12 -21
  27. package/dist/guido.css +1 -1
  28. package/dist/src/enums/extensions/recommendationBlock.d.ts +0 -2
  29. package/dist/src/extensions/Blocks/Items/constants/cardLayout.d.ts +44 -0
  30. package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +3 -0
  31. package/dist/src/extensions/Blocks/Items/template.d.ts +19 -0
  32. package/dist/src/extensions/Blocks/Recommendation/block.d.ts +0 -10
  33. package/dist/src/extensions/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -1
  34. package/dist/src/extensions/Blocks/Recommendation/constants/index.d.ts +1 -1
  35. package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +0 -2
  36. package/dist/src/extensions/Blocks/Recommendation/controls/main/strategy.d.ts +0 -9
  37. package/dist/src/extensions/Blocks/Recommendation/controls/main/utils.d.ts +2 -7
  38. package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +0 -86
  39. package/dist/src/extensions/Blocks/Recommendation/validation/requiredFields.d.ts +0 -4
  40. package/dist/src/stores/onboarding.d.ts +0 -377
  41. package/dist/static/styles/components/recommendation-strategy.css.js +4 -34
  42. package/dist/stores/onboarding.js +36 -41
  43. package/dist/utils/pairProductVariables.js +71 -71
  44. package/dist/utils/templatePreparation.js +55 -55
  45. package/package.json +1 -1
  46. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.js +0 -21
  47. package/dist/components/organisms/onboarding/RecommendationStrategyOnboarding.vue2.js +0 -47
  48. package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +0 -24
  49. package/dist/src/components/organisms/onboarding/RecommendationStrategyOnboarding.vue.d.ts +0 -2
  50. package/dist/src/extensions/Blocks/Recommendation/utils/strategyCommit.d.ts +0 -14
  51. package/dist/static/styles/components/skeleton.css.js +0 -23
@@ -1,23 +1,23 @@
1
- import { useActionsApi as O } from "./useActionsApi.js";
2
- import { useBlocksConfig as q } from "./useBlocksConfig.js";
3
- import { useConfig as H } from "./useConfig.js";
4
- import { useCustomInterfaceAppearance as w } from "./useCustomInterfaceAppearance.js";
1
+ import { useActionsApi as L } from "./useActionsApi.js";
2
+ import { useBlocksConfig as O } from "./useBlocksConfig.js";
3
+ import { useConfig as q } from "./useConfig.js";
4
+ import { useCustomInterfaceAppearance as H } from "./useCustomInterfaceAppearance.js";
5
5
  import { useFullStoryBridge as N } from "./useFullStoryBridge.js";
6
6
  import { useModuleRepair as j } from "./useModuleRepair.js";
7
7
  import { useStripoEventHandler as z } from "./useStripoEventHandler.js";
8
8
  import { useStripoNotifications as $ } from "./useStripoNotifications.js";
9
9
  import { useToaster as G } from "./useToaster.js";
10
10
  import { localePatch as J } from "../config/i18n/index.js";
11
- import { en as b } from "../config/i18n/en/index.js";
11
+ import { en as w } from "../config/i18n/en/index.js";
12
12
  import { ToasterTypeOptions as X } from "../enums/toaster.js";
13
13
  import { useStripoApi as K } from "../services/stripoApi.js";
14
14
  import Q from "../static/styles/customEditorStyle.css.js";
15
- import { useEditorStore as k } from "../stores/editor.js";
15
+ import { useEditorStore as b } from "../stores/editor.js";
16
16
  import { buildMergeTagEntries as W, flattenDynamicContentList as Y } from "../utils/genericUtil.js";
17
17
  import Z from "../package.json.js";
18
18
  let n = null;
19
- const he = () => {
20
- const { features: c, template: u, isFeatureEnabled: m } = H(), { handleError: p, showToaster: B } = G(), { getToken: M, getCustomFonts: T, getSyncModulesStatus: v } = K(), { handleEvent: F } = z(), { handleModuleAdd: A } = j(), { getStripoBlocksConfig: V } = q(), { getStripoNotifications: _ } = $(), f = () => n || (n = new Promise((i, s) => {
19
+ const Ce = () => {
20
+ const { features: c, template: u, isFeatureEnabled: m } = q(), { handleError: p, showToaster: k } = G(), { getToken: B, getCustomFonts: M, getSyncModulesStatus: T } = K(), { handleEvent: v } = z(), { handleModuleAdd: F } = j(), { getStripoBlocksConfig: A } = O(), { getStripoNotifications: V } = $(), f = () => n || (n = new Promise((i, s) => {
21
21
  var d;
22
22
  if (document.getElementById("UiEditorScript")) {
23
23
  i();
@@ -29,16 +29,16 @@ const he = () => {
29
29
  }, document.body.appendChild(e);
30
30
  }), n.catch(() => {
31
31
  n = null;
32
- }), n), D = async (i, s, o, a = [], r = !1) => {
32
+ }), n), _ = async (i, s, o, a = [], r = !1) => {
33
33
  var y, E, h, C;
34
- const e = k(), { html: d, css: R } = i, { baseBlocks: g, extensions: P } = await V(), S = ((y = c.value) == null ? void 0 : y.displayConditions) ?? !0, U = ((E = c.value) == null ? void 0 : E.modulesDisabled) ?? !1, I = !!d || (((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1), x = "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com";
35
- w().importCss(), await window.UIEditor.initEditor(
34
+ const e = b(), { html: d, css: D } = i, { baseBlocks: g, extensions: R } = await A(), S = ((y = c.value) == null ? void 0 : y.displayConditions) ?? !0, P = ((E = c.value) == null ? void 0 : E.modulesDisabled) ?? !1, U = !!d || (((h = u.value) == null ? void 0 : h.forceRecreate) ?? !1);
35
+ await window.UIEditor.initEditor(
36
36
  document.querySelector("#guido-editor"),
37
37
  {
38
38
  metadata: s,
39
39
  html: d,
40
- css: R,
41
- forceRecreate: I,
40
+ css: D,
41
+ forceRecreate: U,
42
42
  locale: "en",
43
43
  undoButtonSelector: "#guido__undo-button",
44
44
  redoButtonSelector: "#guido__redo-button",
@@ -52,7 +52,7 @@ const he = () => {
52
52
  conditionsEnabled: S,
53
53
  customConditionsEnabled: S,
54
54
  enableXSSSecurity: !0,
55
- modulesDisabled: U,
55
+ modulesDisabled: P,
56
56
  syncModulesEnabled: r,
57
57
  messageSettingsEnabled: !0,
58
58
  displayGmailAnnotations: !0,
@@ -62,7 +62,7 @@ const he = () => {
62
62
  displayUTM: !1,
63
63
  selectElementAfterDrop: !0,
64
64
  sameFontSizeForOutlook: !0,
65
- allowedScriptSourceDomains: x,
65
+ allowedScriptSourceDomains: "https://email-static.useinsider.com https://edge.fullstory.com https://rs.fullstory.com",
66
66
  ...g ? { baseBlocks: g } : {},
67
67
  editorFonts: {
68
68
  showDefaultStandardFonts: !0,
@@ -80,7 +80,7 @@ const he = () => {
80
80
  ],
81
81
  async onTokenRefreshRequest(t) {
82
82
  try {
83
- const l = await M();
83
+ const l = await B();
84
84
  t(l);
85
85
  } catch (l) {
86
86
  p(l, "Failed to refresh token");
@@ -88,8 +88,8 @@ const he = () => {
88
88
  },
89
89
  onTemplateLoaded() {
90
90
  try {
91
- const { activateCustomViewStyles: t, updateTimerInClonedTemplate: l } = O(), { injectFullStory: L } = N();
92
- w().importCss(), t(), L(), l(), o.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
91
+ const { importCss: t } = H(), { activateCustomViewStyles: l, updateTimerInClonedTemplate: I } = L(), { injectFullStory: x } = N();
92
+ t(), l(), x(), I(), o.onReady(), e.isStripoInitialized = !0, e.loadingStatus = !1, setTimeout(() => {
93
93
  e.hasChanges = !1;
94
94
  }, 1e3);
95
95
  } catch (t) {
@@ -108,34 +108,34 @@ const he = () => {
108
108
  onDataChanged() {
109
109
  e.hasChanges = !0;
110
110
  },
111
- onEvent: F,
112
- onModuleAdd: A,
113
- notifications: _(),
111
+ onEvent: v,
112
+ onModuleAdd: F,
113
+ notifications: V(),
114
114
  ignoreClickOutsideSelectors: [
115
115
  "#guido-dynamic-content-modal",
116
116
  ".in-on-board-wrapper",
117
117
  ".in-drawer__container"
118
118
  ],
119
- extensions: P,
119
+ extensions: R,
120
120
  localePatch: J
121
121
  }
122
122
  );
123
123
  };
124
124
  return { initPlugin: async (i, s, o) => {
125
- const a = k();
125
+ const a = b();
126
126
  try {
127
127
  await f();
128
128
  const [r, e] = await Promise.all([
129
- T(),
130
- v()
129
+ M(),
130
+ T()
131
131
  ]);
132
- a.syncModulesEnabled = e, await D(i, s, o, r, e);
132
+ a.syncModulesEnabled = e, await _(i, s, o, r, e);
133
133
  } catch {
134
- a.loadingStatus = !1, B({
134
+ a.loadingStatus = !1, k({
135
135
  type: X.Error,
136
- message: b["An error has occurred. Please report the error code to support."],
136
+ message: w["An error has occurred. Please report the error code to support."],
137
137
  actionButton: {
138
- text: b["Reload page"],
138
+ text: w["Reload page"],
139
139
  onClick: () => window.location.reload()
140
140
  }
141
141
  });
@@ -146,5 +146,5 @@ const he = () => {
146
146
  } };
147
147
  };
148
148
  export {
149
- he as useStripo
149
+ Ce as useStripo
150
150
  };