@useinsider/guido 3.10.1-beta.e36dd40 → 3.11.0-beta.04af241

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 (50) hide show
  1. package/dist/components/organisms/header/EditorActions.vue.js +1 -1
  2. package/dist/components/organisms/header/HeaderWrapper.vue.js +3 -3
  3. package/dist/components/organisms/header/HeaderWrapper.vue2.js +2 -0
  4. package/dist/components/organisms/header/version-history/VersionHistory.vue.js +1 -1
  5. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +5 -5
  6. package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +2 -2
  7. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
  8. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +9 -9
  9. package/dist/composables/useCortexBlueprintBridge.js +7 -7
  10. package/dist/composables/useCustomInterfaceAppearance.js +16 -18
  11. package/dist/composables/useEmailTemplateApplier.js +9 -9
  12. package/dist/composables/useExport.js +18 -18
  13. package/dist/composables/useHtmlValidator.js +90 -90
  14. package/dist/composables/useStripo.js +53 -51
  15. package/dist/composables/useStripoNotifications.js +26 -0
  16. package/dist/composables/useToaster.js +11 -11
  17. package/dist/composables/useVersionHistoryApi.js +2 -2
  18. package/dist/composables/validators/useLiquidValidator.js +1 -1
  19. package/dist/composables/validators/useUnsubscribeBlockValidator.js +10 -10
  20. package/dist/config/compiler/recommendationCompilerRules.js +55 -38
  21. package/dist/config/compiler/utils/recommendationCompilerUtils.js +88 -77
  22. package/dist/config/i18n/en/labels.json.js +4 -1
  23. package/dist/enums/toaster.js +2 -2
  24. package/dist/enums/unsubscribe.js +41 -36
  25. package/dist/extensions/Blocks/Checkbox/block.js +5 -3
  26. package/dist/extensions/Blocks/Checkbox/control.js +42 -28
  27. package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +43 -41
  28. package/dist/extensions/Blocks/RadioButton/block.js +9 -7
  29. package/dist/extensions/Blocks/RadioButton/control.js +64 -50
  30. package/dist/extensions/Blocks/Recommendation/useRecommendationBlockWarning.js +7 -7
  31. package/dist/extensions/Blocks/Recommendation/utils/legacyStrategyMap.js +2 -0
  32. package/dist/guido.css +1 -1
  33. package/dist/package.json.js +1 -1
  34. package/dist/services/blankTemplate.js +1 -1
  35. package/dist/services/templateLibraryApi.js +8 -7
  36. package/dist/src/composables/useStripoNotifications.d.ts +10 -0
  37. package/dist/src/enums/toaster.d.ts +2 -2
  38. package/dist/src/enums/unsubscribe.d.ts +2 -0
  39. package/dist/src/extensions/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +1 -0
  40. package/dist/src/stores/toaster.d.ts +2 -3
  41. package/dist/src/utils/environmentUtil.d.ts +5 -2
  42. package/dist/static/styles/components/dropdown-menu.css.js +12 -0
  43. package/dist/static/styles/components/wide-panel.css.js +7 -0
  44. package/dist/stores/toaster.js +10 -10
  45. package/dist/utils/environmentUtil.js +3 -2
  46. package/dist/utils/templatePreparation.js +20 -16
  47. package/package.json +12 -3
  48. package/dist/src/composables/useHtmlValidator.test.d.ts +0 -1
  49. package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +0 -1
  50. package/dist/static/styles/components/notification.css.js +0 -74
@@ -39,6 +39,18 @@ ue-dropdown .service-element.padding-t-3 {
39
39
  color: var(--guido-color-primary-500);
40
40
  }
41
41
 
42
+ /*
43
+ * SD-145233: the pixel-tracking preference dropdown has no native option groups,
44
+ * so its section titles are rendered as disabled items. Present them as
45
+ * non-interactive group headers instead of options: no hover/cursor affordance
46
+ * and a little extra vertical spacing.
47
+ */
48
+ .dropdown__menu .dropdown__item.disabled {
49
+ padding-top: 14px;
50
+ padding-bottom: 8px;
51
+ pointer-events: none;
52
+ }
53
+
42
54
  .menu {
43
55
  padding: 8px 0px;
44
56
  }
@@ -96,6 +96,13 @@ ue-control-panel,
96
96
  min-height: auto;
97
97
  }
98
98
 
99
+ /* Hide the "Press ESC to deselect" keyboard hint Stripo 2.69 adds to every block's settings
100
+ header (SD-145833) — no plugin option toggles it. The sibling close (X) is a <ue-button>,
101
+ so scoping to a bare <button> in .panel-close-hint leaves the close button intact. */
102
+ .control-panel-header .panel-close-hint > button {
103
+ display: none !important;
104
+ }
105
+
99
106
  .container.droppable-header-container ue-button:last-child {
100
107
  margin-right: 0;
101
108
  }
@@ -1,21 +1,21 @@
1
1
  import { ToasterTypeOptions as e } from "../enums/toaster.js";
2
- import { defineStore as i } from "pinia";
3
- const a = () => ({
2
+ import { defineStore as a } from "pinia";
3
+ const u = () => ({
4
4
  status: !1,
5
5
  type: e.Success,
6
6
  text: "",
7
- icon: "",
8
- withIcon: !0,
9
7
  withoutLeftMargin: !1,
8
+ autoHide: !0,
10
9
  actionButton: void 0
11
- }), n = i("guidoToaster", {
12
- state: () => a(),
10
+ }), h = a("guidoToaster", {
11
+ state: () => u(),
13
12
  getters: {
14
- shouldAutoHide: (t) => t.status && !!t.text
13
+ // A toast without auto-hide (e.g. Stripo `loader`) stays until hideToaster.
14
+ shouldAutoHide: (t) => t.status && !!t.text && t.autoHide
15
15
  },
16
16
  actions: {
17
- showToaster({ type: t = e.Success, message: s, actionButton: o }) {
18
- this.status = !0, this.text = s, this.type = t, this.actionButton = o;
17
+ showToaster({ type: t = e.Success, message: s, actionButton: o, autoHide: i = !0 }) {
18
+ this.status = !0, this.text = s, this.type = t, this.actionButton = o, this.autoHide = i;
19
19
  },
20
20
  hideToaster() {
21
21
  this.status = !1;
@@ -23,5 +23,5 @@ const a = () => ({
23
23
  }
24
24
  });
25
25
  export {
26
- n as useToasterStore
26
+ h as useToasterStore
27
27
  };
@@ -1,4 +1,5 @@
1
- const n = () => window.location.hostname.split(".")[2];
1
+ const n = "useinsider", o = () => window.location.hostname.split(".")[2] || n;
2
2
  export {
3
- n as getEnvironmentPrefix
3
+ n as DEFAULT_ENVIRONMENT_PREFIX,
4
+ o as getEnvironmentPrefix
4
5
  };
@@ -2,15 +2,16 @@ import { useActionsApi as P } from "../composables/useActionsApi.js";
2
2
  import { useHtmlCompiler as w } from "../composables/useHtmlCompiler.js";
3
3
  import { DEFAULT_CURRENCY as l, DEFAULT_NODE_CONFIG as i } from "../extensions/Blocks/Recommendation/constants/defaultConfig.js";
4
4
  import { useRecommendationExtensionStore as b } from "../extensions/Blocks/Recommendation/store/recommendation.js";
5
+ import { mapLegacyStrategy as E } from "../extensions/Blocks/Recommendation/utils/legacyStrategyMap.js";
5
6
  import { DATA_ATTRIBUTES as h } from "../extensions/Blocks/Unsubscribe/utils/constants.js";
6
- import { parsePageList as E } from "../extensions/Blocks/Unsubscribe/utils/utils.js";
7
- import { useDynamicContentStore as H } from "../stores/dynamic-content.js";
8
- import { useUnsubscribeStore as U } from "../stores/unsubscribe.js";
9
- function F(s) {
7
+ import { parsePageList as H } from "../extensions/Blocks/Unsubscribe/utils/utils.js";
8
+ import { useDynamicContentStore as U } from "../stores/dynamic-content.js";
9
+ import { useUnsubscribeStore as F } from "../stores/unsubscribe.js";
10
+ function L(s) {
10
11
  const o = new DOMParser().parseFromString(s, "text/html").querySelectorAll(`[${h.PAGE_LIST}]`), t = [];
11
- return o.forEach((n) => {
12
- const a = n.getAttribute(h.PAGE_LIST);
13
- a && t.push(...E(a));
12
+ return o.forEach((a) => {
13
+ const n = a.getAttribute(h.PAGE_LIST);
14
+ n && t.push(...H(n));
14
15
  }), [...new Set(t)];
15
16
  }
16
17
  async function R(s) {
@@ -20,8 +21,8 @@ async function R(s) {
20
21
  const o = b();
21
22
  m.forEach((t) => {
22
23
  var c, p, g, f, r;
23
- const n = t.getAttribute("recommendation-id"), a = n ? Number(n) : NaN;
24
- if (!Number.isFinite(a))
24
+ const a = t.getAttribute("recommendation-id"), n = a ? Number(a) : NaN;
25
+ if (!Number.isFinite(n))
25
26
  return;
26
27
  const d = t.getAttribute("esd-ext-config");
27
28
  if (!d)
@@ -35,7 +36,10 @@ async function R(s) {
35
36
  if (!e || typeof e != "object" || Array.isArray(e))
36
37
  return;
37
38
  const y = {
38
- strategy: e.strategy ?? i.strategy,
39
+ // Normalize legacy strategy keys (e.g. `mostViewed` → `mostPopular`) so
40
+ // already-saved blocks that never re-run the migrator don't emit a
41
+ // strategy-less campaign URL. `||` also catches '' / undefined (SD-144882).
42
+ strategy: E(e.strategy) || i.strategy,
39
43
  language: e.language ?? i.language,
40
44
  size: e.size ?? i.size,
41
45
  // Spread the default arrays so each block gets a fresh reference
@@ -49,7 +53,7 @@ async function R(s) {
49
53
  currencyDecimalSeparator: ((f = e.currency) == null ? void 0 : f.decimalSeparator) ?? l.decimalSeparator,
50
54
  currencyThousandSeparator: ((r = e.currency) == null ? void 0 : r.thousandSeparator) ?? l.thousandSeparator
51
55
  };
52
- o.seedBlockUrlConfig(a, y);
56
+ o.seedBlockUrlConfig(n, y);
53
57
  });
54
58
  try {
55
59
  await o.fetchRecommendationCreateData();
@@ -60,8 +64,8 @@ async function R(s) {
60
64
  );
61
65
  }
62
66
  }
63
- const v = () => {
64
- const s = H(), u = U(), { getCompiledEmail: m, getTemplateData: o } = P(), { compileHtml: t, compileAmpHtml: n } = w();
67
+ const G = () => {
68
+ const s = U(), u = F(), { getCompiledEmail: m, getTemplateData: o } = P(), { compileHtml: t, compileAmpHtml: a } = w();
65
69
  return {
66
70
  prepareTemplateDetails: async () => {
67
71
  const { html: d, ampHtml: e = "", ampErrors: y = [] } = await m({
@@ -69,7 +73,7 @@ const v = () => {
69
73
  resetDataSavedFlag: !1
70
74
  }), { html: c, css: p, syncModulesIds: g = [] } = await o();
71
75
  u.selectedUnsubscribePages.length && await u.fetchTemplates(), await R(c);
72
- const { compiledHtml: f, stats: r, appliedRules: A } = t(d), C = e && n(e).compiledHtml, T = s.getSelectedDynamicContentList, D = b(), S = F(c);
76
+ const { compiledHtml: f, stats: r, appliedRules: A } = t(d), C = e && a(e).compiledHtml, T = s.getSelectedDynamicContentList, D = b(), S = L(c);
73
77
  return console.debug("HTML Compilation Stats:", {
74
78
  originalSize: r.originalSize,
75
79
  compiledSize: r.compiledSize,
@@ -97,6 +101,6 @@ const v = () => {
97
101
  };
98
102
  };
99
103
  export {
100
- F as getHtmlReferencedUnsubscribePages,
101
- v as useTemplatePreparation
104
+ L as getHtmlReferencedUnsubscribePages,
105
+ G as useTemplatePreparation
102
106
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.10.1-beta.e36dd40",
3
+ "version": "3.11.0-beta.04af241",
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",
@@ -23,12 +23,19 @@
23
23
  "preview": "vite preview",
24
24
  "lint": "NODE_OPTIONS=--max-old-space-size=2048 eslint ./ && bun run type-check",
25
25
  "lint:fix": "NODE_OPTIONS=--max-old-space-size=2048 eslint --fix ./",
26
+ "lint:e2e-quality": "node scripts/lint-e2e-quality.mjs",
27
+ "lint:e2e-quality:ci": "node scripts/lint-e2e-quality.mjs --ci",
28
+ "lint:e2e-quality:update": "node scripts/lint-e2e-quality.mjs --update-baseline",
29
+ "lint:e2e-quality:baseline-growth": "node scripts/lint-e2e-quality.mjs --check-baseline-growth",
30
+ "test:e2e-mutation": "node scripts/e2e-mutation-check.mjs",
26
31
  "type-check": "vue-tsc --noEmit --project tsconfig.config.json && vue-tsc --noEmit --project tsconfig.app.json",
27
32
  "test": "vitest run --coverage",
28
33
  "test:watch": "vitest",
29
34
  "test:visual-update": "npx playwright test --update-snapshots --reporter html",
30
35
  "test:e2e:coverage": "E2E_COVERAGE=true playwright test",
31
36
  "coverage:e2e:report": "nyc report --reporter=lcov --reporter=text-summary --report-dir=coverage/e2e",
37
+ "test:mutation": "stryker run",
38
+ "test:mutation:since": "CHANGED=$(git diff --name-only --diff-filter=AMR origin/develop...HEAD -- 'src/**/*.ts' ':(glob)src/components/organisms/onboarding/**/*.vue' ':(glob)src/components/organisms/header/**/*.vue' ':(glob)src/components/organisms/unsubscribe/**/*.vue' ':(glob)src/components/organisms/save-as-template/**/*.vue' ':(glob)src/components/organisms/email-preview/**/*.vue' ':(glob)src/components/wrappers/**/*.vue' 'src/components/Guido.vue' ':(exclude)src/**/*.test.ts' ':(exclude)src/**/index.ts' ':(exclude)src/@types/**' ':(exclude)src/enums/**' ':(exclude)src/mock/**' ':(exclude)src/**/_Boilerplate/**' | paste -sd, -); if [ -n \"$CHANGED\" ]; then stryker run --incremental --mutate \"$CHANGED\"; else echo \"No changed mutatable src files vs origin/develop\"; fi",
32
39
  "prepare": "husky",
33
40
  "preinstall": "rm -rf ./node_modules/.vite"
34
41
  },
@@ -37,7 +44,7 @@
37
44
  "license": "ISC",
38
45
  "dependencies": {
39
46
  "@stripoinc/ui-editor-extensions": "3.8.0",
40
- "@useinsider/design-system-vue": "1.1.0-beta.73ec2fa",
47
+ "@useinsider/design-system-vue": "1.3.0",
41
48
  "@vueuse/core": "11.3.0",
42
49
  "lodash-es": "4.17.21",
43
50
  "pinia": "2.3.1",
@@ -52,6 +59,8 @@
52
59
  "@eslint/eslintrc": "3.3.0",
53
60
  "@eslint/js": "8.57.1",
54
61
  "@playwright/test": "1.57.0",
62
+ "@stryker-mutator/core": "9.6.1",
63
+ "@stryker-mutator/vitest-runner": "9.6.1",
55
64
  "@stylistic/eslint-plugin": "3.1.0",
56
65
  "@stylistic/eslint-plugin-migrate": "3.1.0",
57
66
  "@types/eslint": "8.56.12",
@@ -104,7 +113,7 @@
104
113
  },
105
114
  "guido": {
106
115
  "stripo": {
107
- "version": "2.68.0"
116
+ "version": "2.69.1"
108
117
  }
109
118
  }
110
119
  }
@@ -1 +0,0 @@
1
- export {};
@@ -1,74 +0,0 @@
1
- const n = `ue-notifications-container {
2
- left: 96px;
3
- margin: 0;
4
- bottom: 32px;
5
- top: unset;
6
- width: unset;
7
- position: fixed;
8
- }
9
-
10
- ue-notifications-container ue-message + ue-message {
11
- margin-bottom: 24px;
12
- }
13
-
14
- ue-notifications-container .alert-message-wrapper {
15
- box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.07);
16
- border: none;
17
- padding: 16px 24px;
18
- }
19
-
20
- ue-notifications-container .alert-message-wrapper.info,
21
- ue-notifications-container .alert-message-wrapper.loader {
22
- background-color: var(--guido-color-background-toaster-info) !important;
23
- color: inherit;
24
- }
25
-
26
- .alert-message-wrapper .alert-message-main {
27
- align-items: center;
28
- }
29
-
30
- ue-notifications-container ue-caption .caption {
31
- color: var(--guido-color-white) !important;
32
- }
33
-
34
- ue-block-thumb-hint {
35
- text-align: left;
36
- }
37
-
38
- ue-notifications-container .alert-message-wrapper .alert-message-main .alert-message-content {
39
- width: calc(100% - 64px);
40
- }
41
-
42
- ue-notifications-container .alert-message-wrapper .alert-message-main .alert-message-text {
43
- font-size: 15px;
44
- font-weight: 600;
45
- }
46
-
47
- ue-notifications-container .alert-message-text,
48
- ue-notifications-container .alert-message-wrapper ue-icon-component.icon,
49
- ue-notifications-container .alert-message-wrapper ue-icon-component.icon-button {
50
- color: var(--guido-color-white);
51
- }
52
-
53
- ue-notifications-container ue-message ue-button.close {
54
- margin: 0 0 0 16px;
55
- }
56
-
57
- ue-notifications-container .alert-message-wrapper.success {
58
- background: var(--guido-color-background-toaster-success);
59
- color: inherit;
60
- }
61
-
62
- ue-notifications-container .alert-message-wrapper.error {
63
- background: var(--guido-color-background-toaster-error);
64
- color: inherit;
65
- }
66
-
67
- ue-notifications-container .alert-message-wrapper.warn {
68
- background: var(--guido-color-background-toaster-warn);
69
- color: inherit;
70
- }
71
- `;
72
- export {
73
- n as default
74
- };