@useinsider/guido 3.18.3-beta.ec88281 → 3.19.0-beta.0a1f92f

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 (74) hide show
  1. package/README.md +20 -0
  2. package/dist/@types/config/schemas.js +14 -13
  3. package/dist/components/Guido.vue.js +7 -7
  4. package/dist/components/Guido.vue2.js +55 -48
  5. package/dist/components/organisms/AutoSaveController.vue2.js +10 -8
  6. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  7. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
  8. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  9. package/dist/components/organisms/header/EditorActions.vue2.js +36 -52
  10. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  11. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +98 -0
  12. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  13. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
  14. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  15. package/dist/components/organisms/header/LeftSlot.vue2.js +32 -23
  16. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  17. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  18. package/dist/components/organisms/header/RightSlot.vue.js +9 -8
  19. package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
  20. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  21. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  22. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
  23. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  24. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
  25. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
  26. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  27. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +54 -36
  28. package/dist/composables/useAccessibilityApi.js +35 -0
  29. package/dist/composables/useCustomInterfaceAppearance.js +29 -28
  30. package/dist/composables/useGuidoStateBridge.js +29 -24
  31. package/dist/composables/useStripo.js +7 -7
  32. package/dist/config/i18n/en/labels.json.js +36 -4
  33. package/dist/config/i18n/en/tooltips.json.js +2 -1
  34. package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +4 -4
  35. package/dist/extensions/Blocks/Recommendation/recommendation.css.js +6 -3
  36. package/dist/guido.css +1 -1
  37. package/dist/library.js +15 -13
  38. package/dist/package.json.js +1 -1
  39. package/dist/public/editorState.js +4 -0
  40. package/dist/sprite.svg +6 -0
  41. package/dist/src/@types/config/schemas.d.ts +2 -0
  42. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +3 -1
  43. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  44. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
  45. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -3
  46. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  47. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  48. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  49. package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
  50. package/dist/src/composables/useActionsApi.d.ts +2 -2
  51. package/dist/src/composables/useConfig.d.ts +2 -0
  52. package/dist/src/composables/useGuidoStateBridge.d.ts +11 -7
  53. package/dist/src/library.d.ts +2 -0
  54. package/dist/src/public/editorState.d.ts +14 -0
  55. package/dist/src/public/trackingIds.d.ts +6 -2
  56. package/dist/src/stores/config.d.ts +18 -0
  57. package/dist/src/stores/editor.d.ts +134 -0
  58. package/dist/src/stores/guido-email-editor.d.ts +27 -27
  59. package/dist/src/stores/onboarding.d.ts +717 -2
  60. package/dist/src/stores/version-history.d.ts +1 -1
  61. package/dist/src/utils/liquidDynamicContent.d.ts +20 -0
  62. package/dist/src/utils/timeUtil.d.ts +5 -0
  63. package/dist/static/styles/components/accessibility.css.js +234 -0
  64. package/dist/static/styles/variables.css.js +2 -0
  65. package/dist/stores/editor.js +11 -4
  66. package/dist/stores/guido-email-editor.js +0 -4
  67. package/dist/stores/onboarding.js +68 -46
  68. package/dist/utils/genericUtil.js +64 -61
  69. package/dist/utils/liquidDynamicContent.js +15 -0
  70. package/dist/utils/timeUtil.js +6 -17
  71. package/package.json +10 -6
  72. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  73. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  74. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
@@ -1,19 +1,8 @@
1
- const r = (t) => {
2
- const e = -t.getTimezoneOffset(), o = e >= 0 ? "+" : "-", n = Math.abs(e), s = Math.floor(n / 60), i = n % 60;
3
- return i === 0 ? `UTC${o}${s}` : `UTC${o}${s}:${String(i).padStart(2, "0")}`;
4
- }, a = () => {
5
- var e;
6
- const { timeZone: t } = new Intl.DateTimeFormat().resolvedOptions();
7
- return ((e = t.split("/").pop()) == null ? void 0 : e.replace(/_/g, " ")) ?? t;
8
- }, c = (t, e = !1) => {
9
- const o = t.toLocaleTimeString([], {
10
- hour: "2-digit",
11
- hour12: !1,
12
- minute: "2-digit",
13
- second: "2-digit"
14
- });
15
- return e ? `${o} (${r(t)} ${a()})` : o;
16
- };
1
+ const a = (t) => String(t).padStart(2, "0"), g = (t, e) => t.getFullYear() === e.getFullYear() && t.getMonth() === e.getMonth() && t.getDate() === e.getDate(), i = (t, e = /* @__PURE__ */ new Date()) => ({
2
+ isToday: g(t, e),
3
+ time: `${a(t.getHours())}:${a(t.getMinutes())}`,
4
+ date: t.toLocaleDateString([], { day: "2-digit", month: "2-digit", year: "numeric" })
5
+ });
17
6
  export {
18
- c as formatLocalTime
7
+ i as autoSaveTimestamp
19
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@useinsider/guido",
3
- "version": "3.18.3-beta.ec88281",
3
+ "version": "3.19.0-beta.0a1f92f",
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",
@@ -18,6 +18,10 @@
18
18
  "types": "./dist/src/public/trackingIds.d.ts",
19
19
  "import": "./dist/public/trackingIds.js"
20
20
  },
21
+ "./editor-state": {
22
+ "types": "./dist/src/public/editorState.d.ts",
23
+ "import": "./dist/public/editorState.js"
24
+ },
21
25
  "./style": "./dist/guido.css"
22
26
  },
23
27
  "scripts": {
@@ -77,7 +81,7 @@
77
81
  "@typescript-eslint/parser": "7.18.0",
78
82
  "@useinsider/eslint-config": "1.5.3",
79
83
  "@vitejs/plugin-vue2": "2.3.1",
80
- "@vitest/coverage-v8": "2.1.9",
84
+ "@vitest/coverage-v8": "4.1.11",
81
85
  "eslint": "8.57.1",
82
86
  "eslint-config-airbnb-base": "15.0.0",
83
87
  "eslint-config-airbnb-typescript": "18.0.0",
@@ -90,17 +94,17 @@
90
94
  "happy-dom": "15.11.7",
91
95
  "husky": "9.1.7",
92
96
  "msw": "2.10.3",
93
- "nyc": "17.1.0",
97
+ "nyc": "18.0.0",
94
98
  "sass": "1.69.7",
95
99
  "typescript": "5.5.4",
96
100
  "typescript-eslint": "8.26.0",
97
101
  "vite-plugin-dts": "4.5.4",
98
102
  "vite-plugin-istanbul": "7.0.0",
99
- "vitest": "2.1.9",
103
+ "vitest": "4.1.11",
100
104
  "vue-tsc": "2.2.10"
101
105
  },
102
106
  "overrides": {
103
- "axios": "1.8.2",
107
+ "axios": "1.20.0",
104
108
  "flatted": "3.4.2",
105
109
  "micromatch": "4.0.8",
106
110
  "path-to-regexp": "6.3.0"
@@ -118,7 +122,7 @@
118
122
  },
119
123
  "guido": {
120
124
  "stripo": {
121
- "version": "2.76.0"
125
+ "version": "2.77.0"
122
126
  }
123
127
  }
124
128
  }
@@ -1,22 +0,0 @@
1
- import o from "./AutoSaveToggle.vue2.js";
2
- /* empty css */
3
- import i from "../../../_virtual/_plugin-vue2_normalizer.js";
4
- var n = function() {
5
- var e = this, a = e._self._c, t = e._self._setupProxy;
6
- return t.isFeatureEnabled("autosave") ? a("div", { staticClass: "d-f a-i-c mr-3 auto-save-toggle", on: { mouseenter: function(s) {
7
- t.isHovered = !0;
8
- }, mouseleave: function(s) {
9
- t.isHovered = !1;
10
- } } }, [a(t.InToggle, { attrs: { id: "guido__autosave-toggle", name: "guido-autosave-toggle", checked: t.autosaveStore.isOn, disable: t.editorStore.loadingStatus }, on: { click: t.toggle } }), a("span", { staticClass: "ml-2 auto-save-toggle__label t-c-55" }, [e._v(" " + e._s(t.trans("email-editor.auto-save")) + " ")]), t.autosaveStore.status === t.AUTOSAVE_STATUS.SAVING ? a("span", { staticClass: "ml-2 d-f a-i-c f-s-1" }, [a(t.InLoading, { attrs: { "color-class": "i-c-53", size: "16" } }), a("span", { staticClass: "ml-1 t-c-53" }, [e._v(" " + e._s(t.trans("newsletter.saving")) + " ")])], 1) : t.lastSavedLabel ? a("span", { staticClass: "ml-2 f-s-1 t-c-53" }, [e._v(" " + e._s(t.lastSavedLabel) + " ")]) : e._e(), t.isHovered ? a(t.InInfoBox, { staticClass: "auto-save-toggle__info-box", attrs: { id: "guido__autosave-info-box", size: "small", variant: "information", "description-text": t.trans("email-editor.auto-save-description"), "title-text": t.trans("email-editor.auto-save-title") } }) : e._e()], 1) : e._e();
11
- }, l = [], r = /* @__PURE__ */ i(
12
- o,
13
- n,
14
- l,
15
- !1,
16
- null,
17
- "2c964af4"
18
- );
19
- const d = r.exports;
20
- export {
21
- d as default
22
- };
@@ -1,19 +0,0 @@
1
- import { defineComponent as i, ref as f, computed as u } from "vue";
2
- import { useConfig as l } from "../../../composables/useConfig.js";
3
- import { useTranslations as p } from "../../../composables/useTranslations.js";
4
- import { useAutosaveStore as c, AUTOSAVE_STATUS as t } from "../../../stores/autosave.js";
5
- import { useEditorStore as S } from "../../../stores/editor.js";
6
- import { formatLocalTime as d } from "../../../utils/timeUtil.js";
7
- import { InToggle as g, InLoading as _, InInfoBox as A } from "@useinsider/design-system-vue";
8
- const U = /* @__PURE__ */ i({
9
- __name: "AutoSaveToggle",
10
- setup(v) {
11
- const { isFeatureEnabled: e } = l(), r = S(), o = c(), s = p(), n = f(!1), a = u(() => o.status !== t.SAVED || !o.lastSavedAt ? "" : d(o.lastSavedAt));
12
- return { __sfc: !0, isFeatureEnabled: e, editorStore: r, autosaveStore: o, trans: s, isHovered: n, lastSavedLabel: a, toggle: (m) => {
13
- o.isOn = m;
14
- }, AUTOSAVE_STATUS: t, InInfoBox: A, InLoading: _, InToggle: g };
15
- }
16
- });
17
- export {
18
- U as default
19
- };