@useinsider/guido 1.0.2-beta.4dd4c2c → 1.0.2-beta.4e8474b

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 (87) hide show
  1. package/README.md +43 -1
  2. package/dist/@types/events.d.ts +6 -0
  3. package/dist/@types/generic.d.ts +5 -0
  4. package/dist/components/Guido.vue.d.ts +3 -0
  5. package/dist/components/Guido.vue.js +10 -10
  6. package/dist/components/Guido.vue2.js +80 -63
  7. package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
  8. package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +3 -2
  9. package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +14 -15
  10. package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +3 -1
  11. package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
  12. package/dist/components/organisms/header/HeaderWrapper.vue2.js +15 -9
  13. package/dist/components/organisms/header/RightSlot.vue.d.ts +3 -1
  14. package/dist/components/organisms/header/RightSlot.vue.js +5 -3
  15. package/dist/components/organisms/header/RightSlot.vue2.js +25 -27
  16. package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
  17. package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
  18. package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
  19. package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
  20. package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +13 -13
  21. package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +21 -23
  22. package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +14 -14
  23. package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +26 -28
  24. package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +1 -1
  25. package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +11 -9
  26. package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +37 -14
  27. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +13 -13
  28. package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +38 -28
  29. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +14 -14
  30. package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +21 -23
  31. package/dist/components/wrappers/WpDrawer.vue.d.ts +1 -1
  32. package/dist/components/wrappers/WpModal.vue.d.ts +1 -1
  33. package/dist/composables/useCustomInterfaceAppearance.js +22 -18
  34. package/dist/composables/useHtmlCompiler.js +17 -9
  35. package/dist/composables/useHtmlValidator.d.ts +3 -0
  36. package/dist/composables/useHtmlValidator.js +120 -0
  37. package/dist/composables/usePartner.d.ts +1 -0
  38. package/dist/composables/usePartner.js +16 -9
  39. package/dist/composables/usePreviewMode.js +14 -15
  40. package/dist/composables/useRecommendation.d.ts +19 -0
  41. package/dist/composables/useRecommendation.js +27 -0
  42. package/dist/composables/useSave.d.ts +4 -0
  43. package/dist/composables/useSave.js +15 -0
  44. package/dist/composables/useStripo.js +32 -31
  45. package/dist/composables/useStripoEventHandler.js +8 -8
  46. package/dist/composables/useToaster.js +17 -17
  47. package/dist/config/compiler/outlookCompilerRules.d.ts +2 -0
  48. package/dist/config/compiler/outlookCompilerRules.js +36 -0
  49. package/dist/config/compiler/recommendationCompilerRules.d.ts +2 -0
  50. package/dist/config/compiler/recommendationCompilerRules.js +83 -0
  51. package/dist/config/compiler/socialCompilerRules.d.ts +2 -0
  52. package/dist/config/compiler/socialCompilerRules.js +21 -0
  53. package/dist/config/compiler/unsubscribeCompilerRules.d.ts +2 -0
  54. package/dist/config/compiler/unsubscribeCompilerRules.js +64 -0
  55. package/dist/enums/defaults.d.ts +6 -1
  56. package/dist/enums/defaults.js +47 -10
  57. package/dist/enums/html-validator.d.ts +6 -0
  58. package/dist/enums/html-validator.js +7 -0
  59. package/dist/enums/recommendation.d.ts +54 -0
  60. package/dist/enums/recommendation.js +56 -0
  61. package/dist/enums/unsubscribe.d.ts +15 -0
  62. package/dist/enums/unsubscribe.js +17 -0
  63. package/dist/guido.css +1 -1
  64. package/dist/mock/api/validator.d.ts +2 -0
  65. package/dist/services/onboardingApi.d.ts +4 -0
  66. package/dist/services/onboardingApi.js +23 -0
  67. package/dist/static/styles/components/alert-message.css.js +32 -2
  68. package/dist/static/styles/components/button.css.js +32 -2
  69. package/dist/static/styles/components/notification.css.js +55 -0
  70. package/dist/static/styles/components/popup.css.js +68 -0
  71. package/dist/static/styles/components/wide-panel.css.js +13 -0
  72. package/dist/static/styles/customEditorStyle.css.js +24 -0
  73. package/dist/static/styles/variables.css.js +10 -0
  74. package/dist/stores/dynamic-content.d.ts +12 -0
  75. package/dist/stores/dynamic-content.js +7 -6
  76. package/dist/stores/onboarding.d.ts +98 -1028
  77. package/dist/stores/onboarding.js +54 -67
  78. package/dist/stores/preview.js +6 -14
  79. package/dist/stores/recommendation.d.ts +10 -0
  80. package/dist/stores/recommendation.js +9 -0
  81. package/dist/stores/unsubscribe.d.ts +8 -0
  82. package/dist/stores/unsubscribe.js +9 -0
  83. package/dist/utils/genericUtil.js +9 -6
  84. package/dist/utils/templatePreparation.js +21 -14
  85. package/package.json +4 -2
  86. package/dist/composables/useOnboardingApi.d.ts +0 -4
  87. package/dist/composables/useOnboardingApi.js +0 -23
@@ -1,31 +1,31 @@
1
- import { ToasterTypeOptions as u } from "../enums/toaster.js";
2
- import { useToasterStore as T } from "../stores/toaster.js";
3
- import { watch as c, onUnmounted as l } from "vue";
4
- const p = () => {
5
- const t = T();
6
- let s = null;
7
- const o = () => {
8
- s && (clearTimeout(s), s = null);
1
+ import { ToasterTypeOptions as T } from "../enums/toaster.js";
2
+ import { useToasterStore as u } from "../stores/toaster.js";
3
+ import { watch as c } from "vue";
4
+ const d = () => {
5
+ const t = u();
6
+ let o = null;
7
+ const s = () => {
8
+ o && (clearTimeout(o), o = null);
9
9
  };
10
10
  function r(e = { message: "" }) {
11
- o(), t.hideToaster(), t.showToaster(e);
11
+ s(), t.hideToaster(), t.showToaster(e);
12
12
  }
13
- function n() {
14
- o(), t.hideToaster();
13
+ function i() {
14
+ s(), t.hideToaster();
15
15
  }
16
- function i(e, a) {
16
+ function a(e, n) {
17
17
  const m = e instanceof Error ? e.message : String(e);
18
- r({ type: u.Alert, message: `${a}: ${m}` });
18
+ r({ type: T.Alert, message: `${n}: ${m}` });
19
19
  }
20
20
  return c(
21
21
  () => t.shouldAutoHide,
22
22
  (e) => {
23
- o(), e && (s = setTimeout(() => {
24
- t.hideToaster(), o();
23
+ s(), e && (o = setTimeout(() => {
24
+ t.hideToaster(), s();
25
25
  }, 6e3));
26
26
  }
27
- ), l(o), { showToaster: r, hideToaster: n, handleError: i };
27
+ ), { showToaster: r, hideToaster: i, handleError: a };
28
28
  };
29
29
  export {
30
- p as useToaster
30
+ d as useToaster
31
31
  };
@@ -0,0 +1,2 @@
1
+ import type { CompilerRule } from '@@/Types/html-compiler';
2
+ export declare const outlookCompilerRules: CompilerRule[];
@@ -0,0 +1,36 @@
1
+ const c = `
2
+ <!--[if gte mso 9]>
3
+ <xml>
4
+ <o:OfficeDocumentSettings>
5
+ <o:AllowPNG></o:AllowPNG>
6
+ <o:PixelsPerInch>96</o:PixelsPerInch>
7
+ </o:OfficeDocumentSettings>
8
+ </xml>
9
+ <![endif]-->`, s = {
10
+ xmlns: "http://www.w3.org/1999/xhtml",
11
+ "xmlns:o": "urn:schemas-microsoft-com:office:office"
12
+ }, r = [
13
+ {
14
+ id: "append-office-xml",
15
+ description: "Appending office XML into the head if it does not exist.",
16
+ type: "custom",
17
+ processor: (e) => e.includes("<o:OfficeDocumentSettings>") ? e : e.replace("</head>", `${c}</head>`),
18
+ priority: 70
19
+ },
20
+ {
21
+ id: "set-html-attributes",
22
+ description: "Appending office XML into the head if it does not exist.",
23
+ type: "custom",
24
+ processor: (e) => {
25
+ let t = e;
26
+ return Object.entries(s).forEach(([o, i]) => {
27
+ const n = new RegExp(`${o}="[^"]*"`);
28
+ t.search(n) === -1 && (t = t.replace("<html", `<html ${o}="${i}"`));
29
+ }), t;
30
+ },
31
+ priority: 71
32
+ }
33
+ ];
34
+ export {
35
+ r as outlookCompilerRules
36
+ };
@@ -0,0 +1,2 @@
1
+ import type { CompilerRule } from '@@/Types/html-compiler';
2
+ export declare const recommendationCompilerRules: CompilerRule[];
@@ -0,0 +1,83 @@
1
+ import { useRecommendation as u } from "../../composables/useRecommendation.js";
2
+ import { DUMMY_IMAGE_MAPPINGS as P, REGEX as i, CSS as e, CONDITIONS as E, ATTRIBUTES as r, HTML as h } from "../../enums/recommendation.js";
3
+ const H = [
4
+ {
5
+ id: "replace-images-with-variable-names",
6
+ description: "Replacing dummy images with variable names in recommendation module",
7
+ type: "custom",
8
+ processor: (a) => {
9
+ let t = a;
10
+ return Object.entries(P).forEach(([, n]) => {
11
+ Object.entries(n).forEach(([s, o]) => {
12
+ t = t.replaceAll(o, `{{${s}}}`);
13
+ });
14
+ }), t;
15
+ },
16
+ priority: 50
17
+ },
18
+ {
19
+ id: "replace-recommendation-button-span-css",
20
+ description: "Replacing recommendation button span css",
21
+ type: "replace",
22
+ search: ".ext-product-button span,",
23
+ replacement: ".ext-product-button,",
24
+ replaceAll: !0,
25
+ priority: 51
26
+ },
27
+ {
28
+ id: "add-recommendation-unresponsive-css",
29
+ description: "Adding recommendation unresponsive css",
30
+ type: "custom",
31
+ processor: (a) => {
32
+ const { getRecommendationCampaignData: t } = u();
33
+ let n = a;
34
+ const s = n.match(i.ID);
35
+ if (s) {
36
+ const o = [];
37
+ if (s.forEach((c) => {
38
+ const m = c.slice(35, c.length - 1).trim();
39
+ t(m);
40
+ }), o.length) {
41
+ const c = `width:${Math.min(...o)}px!important;`;
42
+ n = n.replace(e.REGULAR_NAME_HEIGHT, `${e.TRIMMED_NAME_HEIGHT} ${c} ${e.ELLIPSIS}`).replace(e.REGULAR_NAME_CONTAINER_HEIGHT, e.TRIMMED_NAME_CONTAINER_CSS).replace(e.RESPONSIVE_NAME_SIZE, `${e.RESPONSIVE_NAME_HEIGHT} ${c} ${e.ELLIPSIS}`).replace(e.RESPONSIVE_NAME_CONTAINER_HEIGHT, e.TRIMMED_RESPONSIVE_NAME_CONTAINER_CSS);
43
+ }
44
+ }
45
+ return n;
46
+ },
47
+ priority: 52
48
+ },
49
+ // TODO: prepareRecommendations
50
+ // TODO: addRecommendationCustomFields
51
+ {
52
+ id: "add-discount-conditions",
53
+ description: "Adding discount conditions to the recommendation block",
54
+ type: "custom",
55
+ processor: (a) => {
56
+ let t = a;
57
+ const n = t.match(i.ATTRIBUTE_PARAGRAPH), { getRecommendationCampaignData: s } = u();
58
+ return n !== null && n.forEach((o) => {
59
+ const c = o.match(i.CUSTOM_FIELD);
60
+ if (!c)
61
+ return;
62
+ const [m] = c, p = m.match(i.CUSTOM_FIELD_INDEXES_PART), A = m.match(i.CUSTOM_FIELD_NAME_PART), _ = o.match(i.ATTRIBUTE_PARAGRAPH_START_TAG);
63
+ if (!p || !A || !_)
64
+ return;
65
+ const [l] = p, [T] = A, [d] = _, N = T.substring(1, T.length - 2), R = d.match(i.COMPOSITION) !== null;
66
+ let O = m;
67
+ if (R) {
68
+ const M = l.substring(2, l.length - 3);
69
+ s(M);
70
+ }
71
+ const I = l.substring(2);
72
+ let S = "";
73
+ N in E.IF && (S = E.IF[N].replaceAll(`{${r.DISCOUNT}}`, `${I}${r.DISCOUNT}`).replaceAll(`{${r.OMNIBUS_DISCOUNT}}`, `${I}${r.OMNIBUS_DISCOUNT}`).replaceAll(`{${r.OMNIBUS_PRICE}}`, `${I}${r.OMNIBUS_PRICE}`));
74
+ const $ = `${d}${O}${h.PARAGRAPH_END_TAG}`, C = `${S}${R ? $ : o}${E.ELSE}${d}${h.PARAGRAPH_END_TAG}${E.END_IF}`;
75
+ t = t.replace(o, C);
76
+ }), t;
77
+ },
78
+ priority: 53
79
+ }
80
+ ];
81
+ export {
82
+ H as recommendationCompilerRules
83
+ };
@@ -0,0 +1,2 @@
1
+ import type { CompilerRule } from '@@/Types/html-compiler';
2
+ export declare const socialCompilerRules: CompilerRule[];
@@ -0,0 +1,21 @@
1
+ const a = [
2
+ {
3
+ id: "fix-custom-social-block",
4
+ description: "Fixing custom social block.",
5
+ type: "custom",
6
+ processor: (e) => {
7
+ let c = e;
8
+ const s = c.match(/<table[^>]*?class="[^>]*?es-social[^>]*?"[\S\s]*?<\/table>/gm);
9
+ return s && s.forEach((o) => {
10
+ if (o.match(/<img[^>]*?height="[0-9]+?"/gm)) {
11
+ const i = o.replace(/<img[^>]*?height="[0-9]+?"/gm, (t) => t.replace("height", "width"));
12
+ c = c.replace(o, i);
13
+ }
14
+ }), c;
15
+ },
16
+ priority: 80
17
+ }
18
+ ];
19
+ export {
20
+ a as socialCompilerRules
21
+ };
@@ -0,0 +1,2 @@
1
+ import type { CompilerRule } from '@@/Types/html-compiler';
2
+ export declare const unsubscribeCompilerRules: CompilerRule[];
@@ -0,0 +1,64 @@
1
+ import { usePartner as m } from "../../composables/usePartner.js";
2
+ import { LINK_REGEXES as c, LINK_TYPES as p, URLS as E } from "../../enums/unsubscribe.js";
3
+ import { useUnsubscribeStore as b } from "../../stores/unsubscribe.js";
4
+ const S = [
5
+ {
6
+ id: "add-unsubscribe-link-values",
7
+ description: "Adding unsubscribe link values",
8
+ type: "custom",
9
+ processor: (n) => {
10
+ var a, u;
11
+ const { getPartnerName: i } = m(), t = b();
12
+ let e = n;
13
+ const o = `/${i()}/email/0?user={{iid}}`, r = (a = t.selectedUnsubscribePages) == null ? void 0 : a.find((l) => l.type === p.UNSUBSCRIBE_LINK_TYPE), s = (u = t.selectedUnsubscribePages) == null ? void 0 : u.find((l) => l.type === p.PREFERENCES_LINK_TYPE);
14
+ return r && (e = e.replace(
15
+ c.GLOBAL_UNSUBSCRIBE_LINK_REGEX,
16
+ E.UNSUBSCRIBE_URL + o
17
+ )), s && (e = e.replace(
18
+ c.PREFERENCES_UNSUBSCRIBE_LINK_REGEX,
19
+ E.PREFERENCES_URL + o
20
+ )), e.replace(c.UNSUBSCRIBE_LINK_REGEX, "");
21
+ },
22
+ priority: 60
23
+ },
24
+ {
25
+ id: "remove-data-ogsb-button-styles",
26
+ description: "Removing styles like [data-ogsb] .es-button.es-button-123 { background: red; }",
27
+ type: "regex",
28
+ pattern: c.DATA_OGSB_BUTTON_CSS_REGEX,
29
+ replacement: "",
30
+ flags: "g",
31
+ priority: 61
32
+ },
33
+ {
34
+ id: "format-comment-braces",
35
+ description: "Adding spaces around comment braces for proper formatting",
36
+ type: "custom",
37
+ processor: (n) => n.replace(/{#/g, "{ #").replace(/#}/g, "# }"),
38
+ priority: 62
39
+ },
40
+ {
41
+ id: "add-universal-link-flags",
42
+ description: "Adding universal link flags",
43
+ type: "custom",
44
+ processor: (n) => {
45
+ let i = n;
46
+ const t = i.match(/<a[^>]+>(.*?)<\/a>/gm);
47
+ return t && t.forEach((e) => {
48
+ if (e.includes("insEmail=1"))
49
+ return;
50
+ if (e.match(/<a\s+(?:[^>]*?\s+)?href=(["'`”])(.*?)\1\s+(?:[^>]*?\s+)?universal=(["'`”])true\3/gm)) {
51
+ const o = e.replace(/href=(["'`”])(.*?)\1/gm, (r) => {
52
+ const s = r.slice(6, r.length - 1).trim();
53
+ return r.includes("?") || r.includes("#") ? s.slice(-1) === "&" ? r.replace(s, `${s}insEmail=1`) : r.replace(s, `${s}&insEmail=1`) : r.replace(s, `${s}?insEmail=1`);
54
+ });
55
+ i = i.replace(e, o);
56
+ }
57
+ }), i;
58
+ },
59
+ priority: 63
60
+ }
61
+ ];
62
+ export {
63
+ S as unsubscribeCompilerRules
64
+ };
@@ -1,7 +1,12 @@
1
1
  import type { GuidoConfig } from '@@/Types/generic';
2
2
  export declare const DefaultGuidoConfig: GuidoConfig;
3
+ export declare const TemplateTypes: {
4
+ promotional: number;
5
+ transactional: number;
6
+ };
3
7
  export declare const DefaultProductType = "email";
4
8
  export declare const DefaultUsername = "Guido User";
5
- export declare const DefaultMessageType = 1;
9
+ export declare const DefaultMessageType: number;
6
10
  export declare const EditorType: number;
7
11
  export declare const ProductIds: Record<string, number>;
12
+ export declare const TEST_PARTNER_LIST: string[];
@@ -1,4 +1,4 @@
1
- const e = {
1
+ const a = {
2
2
  translationsPath: "window.trans.en",
3
3
  emailHeader: {
4
4
  senderName: "",
@@ -8,16 +8,53 @@ const e = {
8
8
  dynamicContent: !0,
9
9
  saveAsTemplate: !0,
10
10
  versionHistory: !0
11
- }
12
- }, t = "email", s = "Guido User", a = 1, n = 2, o = {
11
+ },
12
+ useHeader: !0
13
+ }, t = {
14
+ promotional: 1,
15
+ transactional: 2
16
+ }, e = "email", o = "Guido User", n = t.promotional, i = 2, s = {
13
17
  email: 60,
14
18
  architect: 49
15
- };
19
+ }, u = [
20
+ "alfredtesting",
21
+ "electio",
22
+ "eurekatest",
23
+ "gachapontestpart",
24
+ "gluautomation1",
25
+ "gluautomation2",
26
+ "gluautomation3",
27
+ "gluautomation4",
28
+ "inone",
29
+ "inshoppingcart",
30
+ "krakentest",
31
+ "leeroy",
32
+ "newsletteruat",
33
+ "ozaspava",
34
+ "piratesquad",
35
+ "qaautomation1",
36
+ "qaautomation2",
37
+ "qaautomation3",
38
+ "qaautomation4",
39
+ "roiautomation",
40
+ "seleniumautomation",
41
+ "seleniumautomation1",
42
+ "seleniumautomation2",
43
+ "seleniumautomation3",
44
+ "shopbagg",
45
+ "shopifytest",
46
+ "singlepageqa",
47
+ "testqa",
48
+ "vikingsankara",
49
+ "stripoeditorlivetest"
50
+ ];
16
51
  export {
17
- e as DefaultGuidoConfig,
18
- a as DefaultMessageType,
19
- t as DefaultProductType,
20
- s as DefaultUsername,
21
- n as EditorType,
22
- o as ProductIds
52
+ a as DefaultGuidoConfig,
53
+ n as DefaultMessageType,
54
+ e as DefaultProductType,
55
+ o as DefaultUsername,
56
+ i as EditorType,
57
+ s as ProductIds,
58
+ u as TEST_PARTNER_LIST,
59
+ t as TemplateTypes
23
60
  };
@@ -0,0 +1,6 @@
1
+ export declare const CanNotMakeAnyChangesForRunningKey = "newsletter.already-in-progress";
2
+ export declare const CanNotMakeAnyChangesKey = "newsletter.can-not-make-any-changes";
3
+ export declare const CampaignCouldNotBeSavedKey = "newsletter.campaign-could-not-be-saved";
4
+ export declare const DISPLAY_CONDITIONS_REGEX: RegExp;
5
+ export declare const DISPLAY_CONDITIONS_EXCEPTIONS_REGEX: RegExp;
6
+ export declare const REMOVE_CONDITIONS_REGEX: RegExp;
@@ -0,0 +1,7 @@
1
+ const e = "newsletter.already-in-progress", n = "newsletter.campaign-could-not-be-saved", o = / (==|<=|>=|!=|>|<|in) | (if|elif|endif|else|and|or) |("[\S ]+")|('[\S ]+')|([^”\s\n]+)|(({%)|( %}))/gm, a = /{%( )*now( )(".*")( )*%}/gm;
2
+ export {
3
+ n as CampaignCouldNotBeSavedKey,
4
+ e as CanNotMakeAnyChangesForRunningKey,
5
+ a as DISPLAY_CONDITIONS_EXCEPTIONS_REGEX,
6
+ o as DISPLAY_CONDITIONS_REGEX
7
+ };
@@ -0,0 +1,54 @@
1
+ export declare const DefaultPadding = 20;
2
+ export declare const MinDeviceViewport = 320;
3
+ export declare const VerticalOrientation = "vertical";
4
+ export declare const DUMMY_IMAGE_MAPPINGS: {
5
+ CART_ABANDONMENT: {
6
+ ins_apr_img_1: string;
7
+ ins_apr_img_2: string;
8
+ ins_apr_img_3: string;
9
+ ins_apr_img_4: string;
10
+ };
11
+ BROWSE_ABANDONMENT: {
12
+ browsed_item_img_1: string;
13
+ browsed_item_img_2: string;
14
+ browsed_item_img_3: string;
15
+ browsed_item_img_4: string;
16
+ };
17
+ };
18
+ export declare const ATTRIBUTES: {
19
+ DISCOUNT: string;
20
+ OMNIBUS_DISCOUNT: string;
21
+ OMNIBUS_PRICE: string;
22
+ };
23
+ export declare const CONDITIONS: {
24
+ IF: {
25
+ discount: string;
26
+ omnibus_discount: string;
27
+ omnibus_price: string;
28
+ };
29
+ ELSE: string;
30
+ END_IF: string;
31
+ };
32
+ export declare const REGEX: {
33
+ ID: RegExp;
34
+ ATTRIBUTE_PARAGRAPH: RegExp;
35
+ ATTRIBUTE_PARAGRAPH_START_TAG: RegExp;
36
+ COMPOSITION: RegExp;
37
+ CUSTOM_FIELD: RegExp;
38
+ CUSTOM_FIELD_INDEXES_PART: RegExp;
39
+ CUSTOM_FIELD_NAME_PART: RegExp;
40
+ };
41
+ export declare const HTML: {
42
+ PARAGRAPH_END_TAG: string;
43
+ };
44
+ export declare const CSS: {
45
+ REGULAR_NAME_HEIGHT: string;
46
+ TRIMMED_NAME_HEIGHT: string;
47
+ ELLIPSIS: string;
48
+ REGULAR_NAME_CONTAINER_HEIGHT: string;
49
+ TRIMMED_NAME_CONTAINER_CSS: string;
50
+ RESPONSIVE_NAME_SIZE: string;
51
+ RESPONSIVE_NAME_HEIGHT: string;
52
+ RESPONSIVE_NAME_CONTAINER_HEIGHT: string;
53
+ TRIMMED_RESPONSIVE_NAME_CONTAINER_CSS: string;
54
+ };
@@ -0,0 +1,56 @@
1
+ const s = 20, e = 320, t = {
2
+ CART_ABANDONMENT: {
3
+ ins_apr_img_1: "https://s3-eu-west-1.amazonaws.com/web-image.useinsider.com/email-assets/dummyImages/ins_apr_img_1.png",
4
+ ins_apr_img_2: "https://s3-eu-west-1.amazonaws.com/web-image.useinsider.com/email-assets/dummyImages/ins_apr_img_2.png",
5
+ ins_apr_img_3: "https://s3-eu-west-1.amazonaws.com/web-image.useinsider.com/email-assets/dummyImages/ins_apr_img_3.png",
6
+ ins_apr_img_4: "https://s3-eu-west-1.amazonaws.com/web-image.useinsider.com/email-assets/dummyImages/ins_apr_img_4.png"
7
+ },
8
+ BROWSE_ABANDONMENT: {
9
+ browsed_item_img_1: "https://s3-eu-west-1.amazonaws.com/web-image.useinsider.com/email-assets/dummyImages/browsed_item_img_1.jpg",
10
+ browsed_item_img_2: "https://s3-eu-west-1.amazonaws.com/web-image.useinsider.com/email-assets/dummyImages/browsed_item_img_2.jpg",
11
+ browsed_item_img_3: "https://s3-eu-west-1.amazonaws.com/web-image.useinsider.com/email-assets/dummyImages/browsed_item_img_3.jpg",
12
+ browsed_item_img_4: "https://s3-eu-west-1.amazonaws.com/web-image.useinsider.com/email-assets/dummyImages/browsed_item_img_4.jpg"
13
+ }
14
+ }, i = {
15
+ DISCOUNT: "discount",
16
+ OMNIBUS_DISCOUNT: "omnibus_discount",
17
+ OMNIBUS_PRICE: "omnibus_price"
18
+ }, m = {
19
+ IF: {
20
+ discount: `{% if {${i.DISCOUNT}} != "0%" and {${i.DISCOUNT}} != "" %}`,
21
+ omnibus_discount: `{% if {${i.DISCOUNT}} != "0%" and {${i.DISCOUNT}} != "" and {${i.OMNIBUS_DISCOUNT}} != "0%" and {${i.OMNIBUS_DISCOUNT}} != "" %}`,
22
+ omnibus_price: `{% if {${i.DISCOUNT}} != "0%" and {${i.DISCOUNT}} != "" and {${i.OMNIBUS_PRICE}} != "" %}`
23
+ },
24
+ ELSE: "{% else %}",
25
+ END_IF: "{% endif %}"
26
+ }, _ = {
27
+ ID: /ins-recommendation-v3-campaign-id="(.*?)"/gi,
28
+ ATTRIBUTE_PARAGRAPH: /<p[^>]*?product-attr="(discount|omnibus_discount|omnibus_price)">[\S\s]*?<\/p>/gm,
29
+ ATTRIBUTE_PARAGRAPH_START_TAG: /<p[^>]*?product-attr="(discount|omnibus_discount|omnibus_price)">/gm,
30
+ COMPOSITION: /composition="true"/gm,
31
+ CUSTOM_FIELD: /{{[0-9]+_[0-8]_(discount|omnibus_discount|omnibus_price)}}/gm,
32
+ CUSTOM_FIELD_INDEXES_PART: /{{[0-9]+_[0-8]_/gm,
33
+ CUSTOM_FIELD_NAME_PART: /_(discount|omnibus_discount|omnibus_price)}}/gm
34
+ }, a = {
35
+ PARAGRAPH_END_TAG: "</p>"
36
+ }, n = {
37
+ REGULAR_NAME_HEIGHT: ".ext-product-name.ins-vertical p { height:90px!important;",
38
+ TRIMMED_NAME_HEIGHT: ".ext-product-name.ins-vertical p { height:18px!important;",
39
+ ELLIPSIS: "text-overflow:ellipsis!important; white-space:nowrap!important;",
40
+ REGULAR_NAME_CONTAINER_HEIGHT: ".ext-product-name.ins-vertical { height:100px!important",
41
+ TRIMMED_NAME_CONTAINER_CSS: ".ext-product-name.ins-vertical { height:38px!important; padding:0px!important",
42
+ RESPONSIVE_NAME_SIZE: ".ext-product-name p { height:unset!important; width:100%!important;",
43
+ RESPONSIVE_NAME_HEIGHT: ".ext-product-name p { height:24px!important;",
44
+ RESPONSIVE_NAME_CONTAINER_HEIGHT: ".ext-product-name { height:unset!important",
45
+ TRIMMED_RESPONSIVE_NAME_CONTAINER_CSS: ".ext-product-name { height:44px!important; padding:0px!important"
46
+ };
47
+ export {
48
+ i as ATTRIBUTES,
49
+ m as CONDITIONS,
50
+ n as CSS,
51
+ t as DUMMY_IMAGE_MAPPINGS,
52
+ s as DefaultPadding,
53
+ a as HTML,
54
+ e as MinDeviceViewport,
55
+ _ as REGEX
56
+ };
@@ -0,0 +1,15 @@
1
+ export declare const LINK_TYPES: {
2
+ UNSUBSCRIBE_LINK_TYPE: number;
3
+ PREFERENCES_LINK_TYPE: number;
4
+ };
5
+ export declare const LINK_REGEXES: {
6
+ UNSUBSCRIBE_LINK_REGEX: RegExp;
7
+ DATA_OGSB_BUTTON_CSS_REGEX: string;
8
+ GLOBAL_UNSUBSCRIBE_LINK_REGEX: RegExp;
9
+ PREFERENCES_UNSUBSCRIBE_LINK_REGEX: RegExp;
10
+ };
11
+ export declare const URLS: {
12
+ UNSUBSCRIBE_URL: string;
13
+ PREFERENCES_URL: string;
14
+ };
15
+ export declare const INSIDER_ID = "iid";
@@ -0,0 +1,17 @@
1
+ const E = {
2
+ UNSUBSCRIBE_LINK_TYPE: 1,
3
+ PREFERENCES_LINK_TYPE: 3
4
+ }, s = {
5
+ UNSUBSCRIBE_LINK_REGEX: /{{ins-unsubscribe-link}}/g,
6
+ DATA_OGSB_BUTTON_CSS_REGEX: "\\[data-ogsb\\]\\s*\\.es-button\\.es-button-[0-9]+\\s*\\{(?:[^\\}]*)\\}",
7
+ GLOBAL_UNSUBSCRIBE_LINK_REGEX: /{{ins-global-unsubscribe-link}}/g,
8
+ PREFERENCES_UNSUBSCRIBE_LINK_REGEX: /{{ins-preferences-unsubscribe-link}}/g
9
+ }, _ = {
10
+ UNSUBSCRIBE_URL: "https://mail.useinsider.com/user/v1/unsub",
11
+ PREFERENCES_URL: "https://mail.useinsider.com/user/v1/prefs"
12
+ };
13
+ export {
14
+ s as LINK_REGEXES,
15
+ E as LINK_TYPES,
16
+ _ as URLS
17
+ };
package/dist/guido.css CHANGED
@@ -1 +1 @@
1
- [data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}[data-v-421ffc13] .guido__verion-history-view-option-selection-desktop svg,[data-v-421ffc13] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-421ffc13] .in-segments-wrapper__button_selected,[data-v-421ffc13] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-421ffc13] .in-tooltip-wrapper__icon{cursor:pointer}[data-v-ad3cf7cc] .guido__view-option-selection-desktop svg,[data-v-ad3cf7cc] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-ad3cf7cc] .in-segments-wrapper__button_selected,[data-v-ad3cf7cc] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-ad3cf7cc] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-2d4cd446]{height:calc(100% - 75px);top:75px}[data-v-9521080b] .vueperslides__bullets,[data-v-6a5e254d] .vueperslides__bullets{pointer-events:none!important}.guido-editor__wrapper[data-v-649c8c66],.guido-editor__container[data-v-649c8c66]{width:100%;height:calc(100vh - 75px)}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
1
+ [data-v-a18ac2d3] .in-button-v2__wrapper{line-height:0}[data-v-b5997368] .in-segments-wrapper .in-tooltip-wrapper__box{text-align:left}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history-wrapper[data-v-52a77eec]{gap:8px}.view-options-wrapper[data-v-d405ca59]{position:relative;display:inline-block}.new-tag[data-v-d405ca59]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-d405ca59] .guido__verion-history-view-option-selection-desktop svg,[data-v-d405ca59] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-d405ca59] .in-segments-wrapper__button_selected,[data-v-d405ca59] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-d405ca59] .in-tooltip-wrapper__icon{cursor:pointer}.view-options-wrapper[data-v-195ab6d4]{position:relative;display:inline-block}.new-tag[data-v-195ab6d4]{position:absolute;top:-8px;right:-16px;z-index:10}[data-v-195ab6d4] .guido__view-option-selection-desktop svg,[data-v-195ab6d4] .guido__view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-195ab6d4] .in-segments-wrapper__button_selected,[data-v-195ab6d4] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}[data-v-195ab6d4] .in-tooltip-wrapper__icon{cursor:pointer}.guido-loading__wrapper[data-v-dced5582]{height:100%;top:75px}.guido-editor__wrapper[data-v-cebb8ab0],.guido-editor__container[data-v-cebb8ab0]{width:100%;height:calc(100vh - 128px)}.guido-editor__no-header[data-v-cebb8ab0]{height:calc(100vh - 75px)}.error-list[data-v-7a09985c]{gap:16px}[data-v-c2adc57d] .in-progress-wrapper__progress p span:last-child{display:none!important}.desktop-preview-container[data-v-2dd60b0c],[data-v-2dd60b0c] .desktop-preview-container .in-container{min-height:720px!important;height:100%}.cropped-text[data-v-f20b3a9b]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}[data-v-d3c52b44] .vueperslides__bullets,[data-v-a408dcea] .vueperslides__bullets{pointer-events:none!important}[data-v-a408dcea] .vueperslides__parallax-wrapper{height:110px!important}
@@ -0,0 +1,2 @@
1
+ declare const _default: import("msw").HttpHandler[];
2
+ export default _default;
@@ -0,0 +1,4 @@
1
+ export declare const useOnboardingApi: () => {
2
+ fetchUserModalState: () => Promise<unknown>;
3
+ setUserModalState: (modal: string, state: string, page: string) => Promise<unknown>;
4
+ };
@@ -0,0 +1,23 @@
1
+ import { useHttp as a } from "../composables/useHttp.js";
2
+ const l = () => {
3
+ const { get: r } = a();
4
+ return {
5
+ fetchUserModalState: async () => {
6
+ try {
7
+ return (await r("/user-modal-state/get")).data;
8
+ } catch (t) {
9
+ throw console.error("fetchUserModalState error:", t), t;
10
+ }
11
+ },
12
+ setUserModalState: async (t, o, s) => {
13
+ try {
14
+ return (await r(`/user-modal-state/set?modal=${t}&state=${o}&page=${s}`)).data;
15
+ } catch (e) {
16
+ throw console.error("setUserModalState error:", e), e;
17
+ }
18
+ }
19
+ };
20
+ };
21
+ export {
22
+ l as useOnboardingApi
23
+ };
@@ -1,4 +1,4 @@
1
- const n = `.alert-message-wrapper {
1
+ const r = `.alert-message-wrapper {
2
2
  box-shadow: none;
3
3
  border: 1px solid var(--guido-color-gray-300);
4
4
  color: var(--guido-color-gray-600);
@@ -16,6 +16,36 @@ const n = `.alert-message-wrapper {
16
16
  color: var(--guido-color-border-onpage-message-info);
17
17
  }
18
18
 
19
+ .alert-message-wrapper.warn {
20
+ background: var(--guido-color-background-onpage-message-warn);
21
+ border-color: var(--guido-color-border-onpage-message-warn);
22
+ color: inherit;
23
+ }
24
+
25
+ .alert-message-wrapper.warn ue-icon-component.icon {
26
+ color: var(--guido-color-border-onpage-message-warn);
27
+ }
28
+
29
+ .alert-message-wrapper.success {
30
+ background: var(--guido-color-background-onpage-message-success);
31
+ border-color: var(--guido-color-border-onpage-message-success);
32
+ color: inherit;
33
+ }
34
+
35
+ .alert-message-wrapper.success ue-icon-component.icon {
36
+ color: var(--guido-color-border-onpage-message-success);
37
+ }
38
+
39
+ .alert-message-wrapper.error {
40
+ background: var(--guido-color-background-onpage-message-error);
41
+ border-color: var(--guido-color-border-onpage-message-error);
42
+ color: inherit;
43
+ }
44
+
45
+ .alert-message-wrapper.error ue-icon-component.icon {
46
+ color: var(--guido-color-border-onpage-message-error);
47
+ }
48
+
19
49
  .alert-message-wrapper ue-button {
20
50
  padding: 0;
21
51
  }
@@ -35,5 +65,5 @@ const n = `.alert-message-wrapper {
35
65
  }
36
66
  `;
37
67
  export {
38
- n as default
68
+ r as default
39
69
  };
@@ -60,8 +60,28 @@ const o = `.control-shadow-wrapper:has(.button) {
60
60
  color: var(--guido-color-primary-500);
61
61
  }
62
62
 
63
- .flat-white > .button:hover:not(:disabled,.disabled) {
64
- color: var(--guido-color-primary-500);
63
+ .primary > .button {
64
+ border: none;
65
+ background-color: var(--guido-color-neutral-200);
66
+ color: var(--guido-color-neutral-800);
67
+ }
68
+
69
+ .primary > .button .icon-button {
70
+ color: var(--guido-color-neutral-800);
71
+ }
72
+
73
+ .primary > .button:hover:not(:disabled,.disabled) {
74
+ background-color: var(--guido-color-neutral-100);
75
+ }
76
+
77
+ .danger > .button {
78
+ background-color: var(--guido-color-danger-500);
79
+ color: var(--guido-color-white);
80
+ border: none;
81
+ }
82
+
83
+ .danger > .button:hover:not(:disabled,.disabled) {
84
+ background-color: var(--guido-color-danger-300);
65
85
  }
66
86
 
67
87
  ue-check-button.checked:not(.flat-white) input:checked + label {
@@ -100,6 +120,16 @@ ue-color {
100
120
  ue-color .base-input {
101
121
  width: 100%;
102
122
  }
123
+
124
+ ue-select-text-input .select-text-input-toggle {
125
+ top: 0;
126
+ right: 0;
127
+ }
128
+
129
+ ue-select-text-input .select-text-input-toggle .button {
130
+ justify-content: center;
131
+ background-color: transparent !important;
132
+ }
103
133
  `;
104
134
  export {
105
135
  o as default