@useinsider/guido 3.18.2-beta.62fc024 → 3.18.2-beta.687c399

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 (57) hide show
  1. package/dist/@types/config/schemas.js +14 -13
  2. package/dist/components/Guido.vue.js +7 -7
  3. package/dist/components/Guido.vue2.js +55 -48
  4. package/dist/components/organisms/AutoSaveController.vue2.js +10 -8
  5. package/dist/components/organisms/header/AutoSaveStatus.vue.js +17 -0
  6. package/dist/components/organisms/header/AutoSaveStatus.vue2.js +25 -0
  7. package/dist/components/organisms/header/EditorActions.vue.js +13 -13
  8. package/dist/components/organisms/header/EditorActions.vue2.js +36 -52
  9. package/dist/components/organisms/header/EditorActionsMenu.vue.js +20 -0
  10. package/dist/components/organisms/header/EditorActionsMenu.vue2.js +98 -0
  11. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  12. package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -17
  13. package/dist/components/organisms/header/LeftSlot.vue.js +5 -5
  14. package/dist/components/organisms/header/LeftSlot.vue2.js +32 -23
  15. package/dist/components/organisms/header/MiddleSlot.vue.js +4 -4
  16. package/dist/components/organisms/header/MiddleSlot.vue2.js +8 -7
  17. package/dist/components/organisms/header/RightSlot.vue.js +9 -8
  18. package/dist/components/organisms/header/RightSlot.vue2.js +13 -18
  19. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue.js +18 -0
  20. package/dist/components/organisms/header/accessibility/AccessibilityToolbar.vue2.js +37 -0
  21. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue.js +22 -0
  22. package/dist/components/organisms/header/accessibility/ColorVisionSelect.vue2.js +48 -0
  23. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue.js +19 -0
  24. package/dist/components/organisms/onboarding/EditorTabBarOnboarding.vue2.js +90 -0
  25. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -12
  26. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +54 -36
  27. package/dist/composables/useAccessibilityApi.js +35 -0
  28. package/dist/composables/useCustomInterfaceAppearance.js +29 -28
  29. package/dist/config/i18n/en/labels.json.js +36 -4
  30. package/dist/config/i18n/en/tooltips.json.js +2 -1
  31. package/dist/guido.css +1 -1
  32. package/dist/sprite.svg +6 -0
  33. package/dist/src/@types/config/schemas.d.ts +2 -0
  34. package/dist/src/components/organisms/AutoSaveController.vue.d.ts +3 -1
  35. package/dist/src/components/organisms/header/EditorActionsMenu.vue.d.ts +2 -0
  36. package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
  37. package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -3
  38. package/dist/src/components/organisms/header/accessibility/AccessibilityToolbar.vue.d.ts +2 -0
  39. package/dist/src/components/organisms/header/accessibility/ColorVisionSelect.vue.d.ts +2 -0
  40. package/dist/src/components/organisms/onboarding/EditorTabBarOnboarding.vue.d.ts +2 -0
  41. package/dist/src/composables/useAccessibilityApi.d.ts +15 -0
  42. package/dist/src/composables/useActionsApi.d.ts +2 -2
  43. package/dist/src/composables/useConfig.d.ts +2 -0
  44. package/dist/src/stores/config.d.ts +18 -0
  45. package/dist/src/stores/editor.d.ts +107 -0
  46. package/dist/src/stores/onboarding.d.ts +717 -2
  47. package/dist/src/stores/version-history.d.ts +1 -1
  48. package/dist/src/utils/timeUtil.d.ts +5 -0
  49. package/dist/static/styles/components/accessibility.css.js +234 -0
  50. package/dist/static/styles/variables.css.js +2 -0
  51. package/dist/stores/editor.js +7 -4
  52. package/dist/stores/onboarding.js +68 -46
  53. package/dist/utils/timeUtil.js +6 -17
  54. package/package.json +1 -5
  55. package/dist/components/organisms/header/AutoSaveToggle.vue.js +0 -22
  56. package/dist/components/organisms/header/AutoSaveToggle.vue2.js +0 -19
  57. /package/dist/src/components/organisms/header/{AutoSaveToggle.vue.d.ts → AutoSaveStatus.vue.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- import type { VersionHistoryState } from '@@/Types/version-history-api';
1
+ import type { VersionHistoryState } from '@@/Types/api/version-history-api';
2
2
  export interface StoreState extends VersionHistoryState {
3
3
  editorVisualMode: 'desktop' | 'mobile';
4
4
  }
@@ -6,3 +6,8 @@
6
6
  * @example formatLocalTime(date, true) -> 12:20:02 (UTC+3 Istanbul)
7
7
  */
8
8
  export declare const formatLocalTime: (date: Date, useTimezone?: boolean) => string;
9
+ export declare const autoSaveTimestamp: (date: Date, now?: Date) => {
10
+ isToday: boolean;
11
+ time: string;
12
+ date: string;
13
+ };
@@ -0,0 +1,234 @@
1
+ const n = `
2
+ ue-ui-simple-panel.accessibility-panel,
3
+ ue-accessibility-panel {
4
+ height: 100%;
5
+ }
6
+
7
+ ue-accessibility-panel .header-control-panel-right {
8
+ min-width: 50px;
9
+ min-height: 50px;
10
+ }
11
+
12
+ ue-accessibility-panel .tabs-header .accent {
13
+ min-width: 21px;
14
+ margin-left: 8px;
15
+ padding: 3px 5px;
16
+ border: 1px solid var(--guido-color-gray-300);
17
+ border-radius: 4px;
18
+ background-color: var(--guido-color-white);
19
+ color: var(--guido-color-gray-800);
20
+ font-size: 13px;
21
+ font-weight: 400;
22
+ line-height: 16px;
23
+ }
24
+
25
+ ue-accessibility-panel .tabs-header button.checked .accent {
26
+ border-color: var(--guido-color-primary-500);
27
+ color: var(--guido-color-primary-500);
28
+ }
29
+
30
+ ue-accessibility-panel .issue-card-surface {
31
+ border-radius: 8px;
32
+ outline: 1px solid var(--guido-color-gray-300);
33
+ outline-offset: -1px;
34
+ }
35
+
36
+ ue-accessibility-panel .issue-card-surface--active {
37
+ outline-color: var(--guido-color-primary-500);
38
+ }
39
+
40
+ ue-accessibility-panel .issue-card-title {
41
+ color: var(--guido-color-gray-800);
42
+ }
43
+
44
+ ue-accessibility-panel .issue-card-header-row .icon-help {
45
+ display: inline-flex;
46
+ align-items: center;
47
+ justify-content: center;
48
+ width: 24px;
49
+ height: 24px;
50
+ color: var(--guido-color-gray-600);
51
+ }
52
+
53
+ ue-accessibility-panel .issue-card-header-row .icon-help svg {
54
+ width: 14px;
55
+ height: 14px;
56
+ }
57
+
58
+ ue-accessibility-panel .issue-card-header-row ue-icon-component.danger {
59
+ color: var(--guido-color-danger-500);
60
+ }
61
+
62
+ ue-accessibility-panel .issue-card-header-row ue-icon-component.warning {
63
+ color: var(--guido-color-warning-500);
64
+ }
65
+
66
+ ue-accessibility-panel .issue-card-header-row ue-icon-component.info {
67
+ color: var(--guido-color-primary-500);
68
+ }
69
+
70
+ ue-accessibility-passed-tab input,
71
+ ue-accessibility-passed-tab ue-select .toggle-select-button {
72
+ opacity: 0.6;
73
+ cursor: not-allowed;
74
+ }
75
+
76
+ ue-accessibility-panel .controls-separator-line:has(.fit-to-color) {
77
+ padding: 10px;
78
+ }
79
+
80
+ ue-accessibility-passed-tab .controls-separator-line:has(.fit-to-color) {
81
+ padding-bottom: 34px;
82
+ }
83
+
84
+ ue-accessibility-panel .controls-separator-line:has(.fit-to-color) .sub-container.two-columns {
85
+ box-sizing: border-box;
86
+ min-height: 50px;
87
+ padding: 5px 16px;
88
+ align-items: center;
89
+ }
90
+
91
+ ue-accessibility-panel .controls-list.fit-to-color {
92
+ justify-content: flex-end;
93
+ align-items: center;
94
+ gap: 0;
95
+ font-size: 13px;
96
+ line-height: 16px;
97
+ }
98
+
99
+ ue-accessibility-panel .controls-list.fit-to-color ue-icon-component {
100
+ align-items: center;
101
+ justify-content: center;
102
+ width: 24px;
103
+ height: 24px;
104
+ margin: 0;
105
+ }
106
+
107
+ ue-accessibility-panel .controls-list.fit-to-color ue-icon-component svg {
108
+ width: 16px;
109
+ height: 16px;
110
+ }
111
+
112
+ ue-accessibility-panel .controls-list.fit-to-color ue-icon-component.warning {
113
+ color: var(--guido-color-warning-500);
114
+ }
115
+
116
+ ue-accessibility-panel {
117
+ --ue-accessibility-image-width: 240px;
118
+ --ue-accessibility-image-height: 240px;
119
+ }
120
+
121
+ ue-accessibility-panel ue-scrollable-container:has(.accessibility-list-empty, ue-accessibility-passed-tab:empty) {
122
+ flex-grow: 1;
123
+ }
124
+
125
+ ue-accessibility-panel ue-scrollable-container:has(.accessibility-list-empty, ue-accessibility-passed-tab:empty) .ue-scrollable {
126
+ height: 100%;
127
+ }
128
+
129
+ ue-accessibility-panel .ue-scrollable-content:has(.accessibility-list-empty, ue-accessibility-passed-tab:empty) {
130
+ display: flex;
131
+ flex-direction: column;
132
+ justify-content: center;
133
+ min-height: 100%;
134
+ }
135
+
136
+ ue-accessibility-panel .accessibility-list-empty.light-theme.failed-list,
137
+ ue-accessibility-panel .accessibility-list-empty.light-theme.ignored-list,
138
+ ue-accessibility-passed-tab:empty::before {
139
+ display: block;
140
+ height: auto;
141
+ margin: 0;
142
+ padding: 248px 16px 0;
143
+ background: url("https://image.useinsider.com/insider-design-system/img/speacial/no-personalization.svg") no-repeat center top / 240px 240px;
144
+ color: var(--guido-color-neutral-500);
145
+ font-size: 15px;
146
+ line-height: 24px;
147
+ text-align: center;
148
+ white-space: pre-line;
149
+ }
150
+
151
+ ue-accessibility-passed-tab:empty {
152
+ display: block;
153
+ }
154
+
155
+ ue-accessibility-passed-tab:empty::before {
156
+ content: "No Passed Items\\A You have no passed items.";
157
+ }
158
+
159
+ ue-accessibility-panel .accessibility-list-empty::first-line,
160
+ ue-accessibility-passed-tab:empty::first-line {
161
+ color: var(--guido-color-neutral-700);
162
+ font-size: 18px;
163
+ line-height: 40px;
164
+ }
165
+
166
+ ue-accessibility-panel .e2e-ignore-button > .button,
167
+ ue-accessibility-panel .e2e-unignore-button > .button,
168
+ ue-accessibility-panel .e2e-auto-tune-button > .button {
169
+ border: none;
170
+ background-color: var(--guido-color-neutral-200);
171
+ color: var(--guido-color-neutral-800);
172
+ }
173
+
174
+ ue-accessibility-panel .e2e-ignore-button > .button .icon-button,
175
+ ue-accessibility-panel .e2e-unignore-button > .button .icon-button,
176
+ ue-accessibility-panel .e2e-auto-tune-button > .button .icon-button {
177
+ color: var(--guido-color-neutral-800);
178
+ }
179
+
180
+ ue-accessibility-panel .e2e-ignore-button > .button:hover:not(:disabled,.disabled),
181
+ ue-accessibility-panel .e2e-unignore-button > .button:hover:not(:disabled,.disabled),
182
+ ue-accessibility-panel .e2e-auto-tune-button > .button:hover:not(:disabled,.disabled) {
183
+ background-color: var(--guido-color-neutral-100);
184
+ }
185
+
186
+ ue-accessibility-panel .e2e-apply-button > .button {
187
+ border: none;
188
+ background-color: var(--guido-color-primary-100);
189
+ color: var(--guido-color-primary-500);
190
+ }
191
+
192
+ ue-accessibility-panel .e2e-apply-button > .button .icon-button {
193
+ color: var(--guido-color-primary-500);
194
+ }
195
+
196
+ ue-accessibility-panel .e2e-apply-button > .button:hover:not(:disabled,.disabled) {
197
+ background-color: var(--guido-color-primary-0);
198
+ }
199
+
200
+ .e2e-accessibility-refresh .icon-button {
201
+ color: var(--guido-color-primary-500);
202
+ }
203
+
204
+ .ue-popover.dark,
205
+ .ue-popover.dark-tiny {
206
+ border-radius: 4px;
207
+ background: var(--guido-color-gray-800);
208
+ box-shadow: 0 15px 17.5px rgb(0 0 0 / 10%), 0 8px 5px rgb(0 0 0 / 10%);
209
+ color: var(--guido-color-white);
210
+ font-size: 13px;
211
+ line-height: 16px;
212
+ }
213
+
214
+ .ue-popover.dark .popup-pointer ue-icon-component svg,
215
+ .ue-popover.dark-tiny .popup-pointer ue-icon-component svg {
216
+ fill: var(--guido-color-gray-800);
217
+ }
218
+
219
+ .ue-popover.dark a,
220
+ .ue-popover.dark-tiny a,
221
+ .ue-popover.dark ue-description a,
222
+ .ue-popover.dark-tiny ue-description a {
223
+ color: var(--guido-color-white);
224
+ text-decoration: underline;
225
+ }
226
+
227
+ .ue-popover ue-description a[href^="https://act-rules.github.io/"],
228
+ .ue-popover ue-description a[href^="https://dequeuniversity.com/"] {
229
+ display: inline;
230
+ }
231
+ `;
232
+ export {
233
+ n as default
234
+ };
@@ -14,8 +14,10 @@ const o = `:host {
14
14
  --guido-color-gray-0: #F9F9F9;
15
15
  --guido-color-neutral-800: #222938;
16
16
  --guido-color-neutral-700: #2C3546;
17
+ --guido-color-neutral-500: #5D6980;
17
18
  --guido-color-neutral-200: #DCDFE6;
18
19
  --guido-color-neutral-100: #EFF2F4;
20
+ --guido-color-warning-500: #FFBF00;
19
21
  --guido-color-danger-300: #e84342;
20
22
  --guido-color-danger-500: #DC2A2A;
21
23
  --guido-box-shadow: 0 4px 12px 0 rgba(44,53,70,0.15);
@@ -6,6 +6,9 @@ const o = e("guidoEditor", {
6
6
  isSaveAsTemplateDrawerOpen: !1,
7
7
  isVersionHistoryOpen: !1,
8
8
  isPreviewModeOpen: !1,
9
+ isAccessibilityTestingOpen: !1,
10
+ imagesHidden: !1,
11
+ colorVisionDeficiency: "",
9
12
  editorVisualMode: "desktop",
10
13
  hasChanges: !1,
11
14
  isStripoInitialized: !1,
@@ -17,20 +20,20 @@ const o = e("guidoEditor", {
17
20
  }),
18
21
  getters: {
19
22
  // Middle Slot
20
- isEditorToolbarVisible: (i) => !i.isVersionHistoryOpen && !i.isPreviewModeOpen,
23
+ isEditorToolbarVisible: (i) => !i.isVersionHistoryOpen && !i.isPreviewModeOpen && !i.isAccessibilityTestingOpen,
21
24
  isUndoButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
22
25
  isRedoButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
23
26
  isCodeEditorButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
24
27
  isPreviewButtonDisabled: (i) => i.loadingStatus,
25
28
  isViewOptionsDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
26
29
  // Right Slot
30
+ isNormalMode: (i) => !i.isVersionHistoryOpen && !i.isAccessibilityTestingOpen,
27
31
  isVersionHistoryButtonDisabled: (i) => i.loadingStatus || i.isPreviewModeOpen,
28
32
  isExportButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen,
29
33
  isSaveAsButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen,
30
34
  isTestButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen,
31
- isSaveButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen || i.isPreviewModeOpen,
32
- // Autosave
33
- isInSaveableState: (i) => !i.loadingStatus && !i.isVersionHistoryOpen && !i.isPreviewModeOpen && !i.isCodeEditorOpen
35
+ isSaveButtonDisabled: (i) => i.loadingStatus || i.isVersionHistoryOpen || i.isPreviewModeOpen || i.isAccessibilityTestingOpen,
36
+ isInSaveableState: (i) => !i.loadingStatus && !i.isVersionHistoryOpen && !i.isPreviewModeOpen && !i.isCodeEditorOpen && !i.isAccessibilityTestingOpen
34
37
  }
35
38
  });
36
39
  export {
@@ -1,59 +1,73 @@
1
- import { useOnboardingApi as s } from "../services/onboardingApi.js";
1
+ import { useOnboardingApi as t } from "../services/onboardingApi.js";
2
2
  import { defineStore as e } from "pinia";
3
- const t = () => ({
3
+ const r = () => ({
4
4
  cardIndex: 0,
5
5
  isActive: !1,
6
- config: []
6
+ config: [],
7
+ cardOffset: 0
7
8
  }), a = () => ({
8
9
  onboardings: {
9
- newVersionPopup: t(),
10
- genericOnboarding: t(),
11
- textBlockOnboarding: t(),
12
- versionHistoryOnboarding: t(),
13
- ampOnboarding: t(),
14
- itemsOnboarding: t()
10
+ newVersionPopup: r(),
11
+ genericOnboarding: r(),
12
+ textBlockOnboarding: r(),
13
+ versionHistoryOnboarding: r(),
14
+ ampOnboarding: r(),
15
+ itemsOnboarding: r(),
16
+ editorTabBarOnboarding: r()
15
17
  },
16
18
  userModalState: {},
17
- isFetched: !1
18
- }), c = e("guidoOnboarding", {
19
+ isFetched: !1,
20
+ closedThisSession: []
21
+ }), g = e("guidoOnboarding", {
19
22
  state: () => a(),
20
23
  getters: {
21
- getOnboarding: (n) => (i) => n.onboardings[i],
22
- isActive: (n) => (i) => n.onboardings[i].isActive,
23
- getCurrentCard: (n) => (i) => {
24
- const o = n.onboardings[i];
25
- return o.config[o.cardIndex];
24
+ getOnboarding: (n) => (o) => n.onboardings[o],
25
+ isActive: (n) => (o) => n.onboardings[o].isActive,
26
+ getCurrentCard: (n) => (o) => {
27
+ const i = n.onboardings[o];
28
+ return i.config[i.cardIndex];
26
29
  },
27
30
  getGenericCurrentCard: (n) => {
28
- const { genericOnboarding: i } = n.onboardings;
29
- return i.config[i.cardIndex];
31
+ const { genericOnboarding: o } = n.onboardings;
32
+ return o.config[o.cardIndex];
30
33
  },
31
34
  getTextBlockCurrentCard: (n) => {
32
- const { textBlockOnboarding: i } = n.onboardings;
33
- return i.config[i.cardIndex];
35
+ const { textBlockOnboarding: o } = n.onboardings;
36
+ return o.config[o.cardIndex];
34
37
  },
35
38
  getVersionHistoryCurrentCard: (n) => {
36
- const { versionHistoryOnboarding: i } = n.onboardings;
37
- return i.config[i.cardIndex];
39
+ const { versionHistoryOnboarding: o } = n.onboardings;
40
+ return o.config[o.cardIndex];
38
41
  },
39
42
  getAmpCurrentCard: (n) => {
40
- const { ampOnboarding: i } = n.onboardings;
41
- return i.config[i.cardIndex];
43
+ const { ampOnboarding: o } = n.onboardings;
44
+ return o.config[o.cardIndex];
42
45
  },
43
46
  getItemsCurrentCard: (n) => {
44
- const { itemsOnboarding: i } = n.onboardings;
45
- return i.config[i.cardIndex];
47
+ const { itemsOnboarding: o } = n.onboardings;
48
+ return o.config[o.cardIndex];
49
+ },
50
+ getEditorTabBarCurrentCard: (n) => {
51
+ const { editorTabBarOnboarding: o } = n.onboardings;
52
+ return o.config[o.cardIndex];
46
53
  },
47
- shouldShowOnboarding: (n) => (i) => {
48
- const o = n.userModalState.Guido;
49
- return i === "newVersionPopup" && (o != null && o.genericOnboarding) ? !1 : o ? !o[i] : !0;
54
+ isEditorActionsMenuPinned: (n) => {
55
+ const { editorTabBarOnboarding: o } = n.onboardings, i = o.config[o.cardIndex];
56
+ return o.isActive && !!(i != null && i.pinsMenu);
57
+ },
58
+ shouldShowOnboarding: (n) => (o) => {
59
+ const i = n.userModalState.Guido;
60
+ return o === "newVersionPopup" && (i != null && i.genericOnboarding) ? !1 : i ? !i[o] : !0;
50
61
  }
51
62
  },
52
63
  actions: {
53
64
  closeOtherOnboardings(n) {
54
- Object.keys(this.onboardings).forEach((i) => {
55
- const o = i;
56
- o !== n && this.onboardings[o].isActive && (this.onboardings[o].isActive = !1, this.onboardings[o].cardIndex = 0, this.onboardings[o].config = []);
65
+ Object.keys(this.onboardings).forEach((o) => {
66
+ const i = o;
67
+ if (i !== n && this.onboardings[i].isActive) {
68
+ const s = this.onboardings[i];
69
+ s.cardOffset += s.cardIndex, s.isActive = !1, s.cardIndex = 0, s.config = [];
70
+ }
57
71
  });
58
72
  },
59
73
  start(n) {
@@ -62,8 +76,16 @@ const t = () => ({
62
76
  startOnboarding(n) {
63
77
  this.shouldShowOnboarding(n) && !this.isActive(n) && this.start(n);
64
78
  },
79
+ closeForSession(n) {
80
+ this.closedThisSession.includes(n) || this.closedThisSession.push(n), this.onboardings[n].isActive = !1, this.onboardings[n].cardIndex = 0, this.onboardings[n].config = [], this.onboardings[n].cardOffset = 0;
81
+ },
65
82
  async close(n) {
66
- await this.setUserModalState(n, "true", "Guido"), this.onboardings[n].isActive = !1, this.onboardings[n].cardIndex = 0, this.onboardings[n].config = [];
83
+ this.closeForSession(n);
84
+ try {
85
+ await this.setUserModalState(n, "true", "Guido");
86
+ } catch (o) {
87
+ console.warn("guido:onboarding:close-not-persisted", n, o);
88
+ }
67
89
  },
68
90
  next(n) {
69
91
  this.onboardings[n].cardIndex < this.onboardings[n].config.length - 1 && this.onboardings[n].cardIndex++;
@@ -71,15 +93,15 @@ const t = () => ({
71
93
  previous(n) {
72
94
  this.onboardings[n].cardIndex > 0 && this.onboardings[n].cardIndex--;
73
95
  },
74
- updateCardPosition(n, i, o) {
75
- const r = this.onboardings[n].config[i];
76
- r && (r.top = o.top, r.position = o.position);
96
+ updateCardPosition(n, o, i) {
97
+ const s = this.onboardings[n].config[o];
98
+ s && (s.top = i.top, s.position = i.position);
77
99
  },
78
- setConfig(n, i) {
79
- this.onboardings[n].config = i ?? [], this.onboardings[n].cardIndex >= this.onboardings[n].config.length && (this.onboardings[n].cardIndex = 0);
100
+ setConfig(n, o, i = 0) {
101
+ this.onboardings[n].config = o ?? [], this.onboardings[n].cardOffset = i, this.onboardings[n].cardIndex >= this.onboardings[n].config.length && (this.onboardings[n].cardIndex = 0);
80
102
  },
81
103
  async onDiscoverNowClicked() {
82
- await this.setUserModalState("newVersionPopup", "true", "Guido"), await this.setUserModalState("genericOnboarding", "true", "Guido"), this.start("genericOnboarding");
104
+ this.start("genericOnboarding"), await this.setUserModalState("newVersionPopup", "true", "Guido"), await this.setUserModalState("genericOnboarding", "true", "Guido");
83
105
  },
84
106
  onRemindMeLater() {
85
107
  sessionStorage.setItem("newVersionPopupDismissed", "true");
@@ -93,19 +115,19 @@ const t = () => ({
93
115
  async fetchUserModalState() {
94
116
  if (this.isFetched)
95
117
  return;
96
- const { fetchUserModalState: n } = s();
118
+ const { fetchUserModalState: n } = t();
97
119
  try {
98
- const i = await n();
99
- this.userModalState = i, this.isFetched = !0;
120
+ const o = await n();
121
+ this.userModalState = o, this.isFetched = !0;
100
122
  } catch {
101
123
  }
102
124
  },
103
- async setUserModalState(n, i, o) {
104
- const { setUserModalState: r } = s();
105
- await r(n, i, o), this.isFetched = !1, await this.fetchUserModalState();
125
+ async setUserModalState(n, o, i) {
126
+ const { setUserModalState: s } = t();
127
+ await s(n, o, i), this.isFetched = !1, await this.fetchUserModalState();
106
128
  }
107
129
  }
108
130
  });
109
131
  export {
110
- c as useOnboardingStore
132
+ g as useOnboardingStore
111
133
  };
@@ -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.2-beta.62fc024",
3
+ "version": "3.18.2-beta.687c399",
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",
@@ -31,10 +31,6 @@
31
31
  "lint:e2e-quality:ci": "node scripts/lint-e2e-quality.mjs --ci",
32
32
  "lint:e2e-quality:update": "node scripts/lint-e2e-quality.mjs --update-baseline",
33
33
  "lint:e2e-quality:baseline-growth": "node scripts/lint-e2e-quality.mjs --check-baseline-growth",
34
- "lint:parity": "node scripts/lint-parity.mjs",
35
- "lint:parity:ci": "node scripts/lint-parity.mjs --ci",
36
- "lint:parity:check-map": "node scripts/lint-parity.mjs --check-map",
37
- "lint:parity:table": "node scripts/lint-parity.mjs --table",
38
34
  "test:e2e-mutation": "node scripts/e2e-mutation-check.mjs",
39
35
  "type-check": "vue-tsc --noEmit --project tsconfig.config.json && vue-tsc --noEmit --project tsconfig.app.json",
40
36
  "test": "vitest run --coverage",
@@ -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
- };