@useinsider/guido 3.13.1-beta.3ed2fcd → 3.13.1-beta.5ea31b5
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.
- package/dist/components/organisms/header/ViewOptions.vue.js +1 -1
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +1 -1
- package/dist/composables/useAllowlist.js +48 -30
- package/dist/config/compiler/htmlCompilerRules.js +18 -0
- package/dist/guido.css +1 -1
- package/package.json +2 -2
|
@@ -1,50 +1,68 @@
|
|
|
1
1
|
import { useAllowlistApi as A } from "../services/allowlistApi.js";
|
|
2
|
-
import { base64EncodeWithSpecialChars as
|
|
3
|
-
import { useTranslations as
|
|
4
|
-
import { useUserRole as
|
|
5
|
-
const
|
|
2
|
+
import { base64EncodeWithSpecialChars as f } from "../utils/base64.js";
|
|
3
|
+
import { useTranslations as D } from "./useTranslations.js";
|
|
4
|
+
import { useUserRole as E } from "./useUserRole.js";
|
|
5
|
+
const _ = /(?:https?:\/\/|www\.)[^\s"'<>()]+/gi, L = /"\/\//gi, w = "s3-eu-west-1.amazonaws.com", d = [
|
|
6
|
+
"insider-email",
|
|
7
|
+
"web-image.useinsider.com",
|
|
8
|
+
"image.useinsider.com",
|
|
9
|
+
"panel-assets.useinsider.com",
|
|
10
|
+
"stripo-editor-image"
|
|
11
|
+
], N = ({ hostname: r, pathname: l }) => {
|
|
12
|
+
const n = r.toLowerCase();
|
|
13
|
+
if (n === w) {
|
|
14
|
+
const i = l.split("/")[1].toLowerCase();
|
|
15
|
+
return d.includes(i);
|
|
16
|
+
}
|
|
17
|
+
return d.some((i) => n === `${i}.${w}`);
|
|
18
|
+
}, m = {
|
|
6
19
|
MANAGE: "journey-builder.domain-allowlist-warning",
|
|
7
20
|
NON_MANAGE: "settings.allow-list-warning-not-admin-architect",
|
|
8
21
|
ADD_BUTTON: "settings.allow-list-warning-add-button"
|
|
9
|
-
},
|
|
10
|
-
const { checkDomain:
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
const
|
|
22
|
+
}, g = /* @__PURE__ */ new Set(), O = (r) => `/settings?openAddModal=true&type=domain&values=${f(r)}#security`, C = () => {
|
|
23
|
+
const { checkDomain: r } = A(), { getIsManageUser: l } = E(), n = D(), i = (t, e) => {
|
|
24
|
+
const a = `${t || ""} ${e || ""}`.replace(L, "https://").match(_) || [], s = /* @__PURE__ */ new Set();
|
|
25
|
+
return a.forEach((c) => {
|
|
26
|
+
const h = /^https?:\/\//i.test(c) ? c : `https://${c}`;
|
|
14
27
|
try {
|
|
15
|
-
const
|
|
16
|
-
|
|
28
|
+
const u = new URL(h);
|
|
29
|
+
if (N(u))
|
|
30
|
+
return;
|
|
31
|
+
u.hostname && s.add(u.hostname.replace(/^www\./i, "").toLowerCase());
|
|
17
32
|
} catch {
|
|
18
33
|
}
|
|
19
|
-
}), [...
|
|
20
|
-
},
|
|
21
|
-
if (
|
|
34
|
+
}), [...s];
|
|
35
|
+
}, p = async (t) => {
|
|
36
|
+
if (g.has(t))
|
|
22
37
|
return !0;
|
|
23
38
|
try {
|
|
24
|
-
const
|
|
25
|
-
return
|
|
26
|
-
} catch (
|
|
27
|
-
return console.error("[GUIDO_ALLOWLIST] isDomainAllowlisted failed", t,
|
|
39
|
+
const e = await r(t);
|
|
40
|
+
return e && g.add(t), e;
|
|
41
|
+
} catch (e) {
|
|
42
|
+
return console.error("[GUIDO_ALLOWLIST] isDomainAllowlisted failed", t, e), !0;
|
|
28
43
|
}
|
|
29
44
|
};
|
|
30
|
-
return { getBlockedDomains: async (t,
|
|
45
|
+
return { getBlockedDomains: async (t, e) => {
|
|
31
46
|
try {
|
|
32
|
-
const o =
|
|
47
|
+
const o = i(t, e);
|
|
33
48
|
return o.length ? (await Promise.all(
|
|
34
|
-
o.map(async (
|
|
35
|
-
)).filter((
|
|
49
|
+
o.map(async (s) => ({ domain: s, allowlisted: await p(s) }))
|
|
50
|
+
)).filter((s) => !s.allowlisted).map((s) => s.domain) : [];
|
|
36
51
|
} catch (o) {
|
|
37
52
|
return console.error("[GUIDO_ALLOWLIST] getBlockedDomains failed", o), [];
|
|
38
53
|
}
|
|
39
|
-
}, resolveToast: async (t) =>
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
54
|
+
}, resolveToast: async (t) => {
|
|
55
|
+
const e = await l(), o = t.length ? ` (${t.join(", ")})` : "", a = (s) => `${s}${o}`;
|
|
56
|
+
return e ? {
|
|
57
|
+
message: a(n(m.MANAGE)),
|
|
58
|
+
actionButton: {
|
|
59
|
+
text: n(m.ADD_BUTTON),
|
|
60
|
+
onClick: () => window.open(O(t.join(",")), "_blank")
|
|
61
|
+
}
|
|
62
|
+
} : { message: a(n(m.NON_MANAGE)) };
|
|
63
|
+
} };
|
|
46
64
|
};
|
|
47
65
|
export {
|
|
48
66
|
O as buildAllowlistSettingsUrl,
|
|
49
|
-
|
|
67
|
+
C as useAllowlist
|
|
50
68
|
};
|
|
@@ -147,6 +147,24 @@ const d = [
|
|
|
147
147
|
replaceAll: !0,
|
|
148
148
|
priority: 41
|
|
149
149
|
},
|
|
150
|
+
{
|
|
151
|
+
id: "replace-s3-path-style-web-image-domain",
|
|
152
|
+
description: "Rewriting path-style S3 asset URLs to the web-image.useinsider.com domain",
|
|
153
|
+
type: "replace",
|
|
154
|
+
search: "s3-eu-west-1.amazonaws.com/web-image.useinsider.com",
|
|
155
|
+
replacement: "web-image.useinsider.com",
|
|
156
|
+
replaceAll: !0,
|
|
157
|
+
priority: 42
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
id: "replace-s3-path-style-image-domain",
|
|
161
|
+
description: "Rewriting path-style S3 asset URLs to the image.useinsider.com domain",
|
|
162
|
+
type: "replace",
|
|
163
|
+
search: "s3-eu-west-1.amazonaws.com/image.useinsider.com",
|
|
164
|
+
replacement: "image.useinsider.com",
|
|
165
|
+
replaceAll: !0,
|
|
166
|
+
priority: 43
|
|
167
|
+
},
|
|
150
168
|
{
|
|
151
169
|
id: "convert-rgb-to-hex",
|
|
152
170
|
// SD-142395: rgb()/6-digit hex are verbose; hex/3-digit shorthand is byte-identical
|
package/dist/guido.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.view-options-wrapper[data-v-
|
|
1
|
+
.gap-16[data-v-5553d071],.gap-16[data-v-0e1b0c54]{gap:16px}[data-v-73199fa4] .in-button-v2__wrapper{line-height:0}[data-v-22226124] .in-segments-wrapper__button_selected,[data-v-22226124] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb;color:#0010ac;border-color:#0010ac}[data-v-2cb418af] .in-progress-wrapper__progress p span:last-child{display:none!important}[data-v-2cb418af] .in-progress-description-status{display:none!important}.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}.editor-toolbar[data-v-173c3a40]{gap:4px}.version-history-item[data-v-ee4b9c3f]{flex-basis:200px}.version-history[data-v-fad98586]{gap:8px}.version-history__toolbar[data-v-fad98586]{gap:4px}.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}.auto-save-toggle[data-v-2c964af4]{position:relative}.auto-save-toggle__info-box[data-v-2c964af4]{position:absolute;top:100%;left:0;z-index:10;width:280px}.editor-actions[data-v-6e711fd7]{gap:4px}.header-wrapper[data-v-d11dd577]{min-width:1000px}.guido-loading__wrapper[data-v-07c4b2d8]{height:100%;top:75px!important;bottom:0!important}.guido-editor__wrapper[data-v-5079a1c8]{--ribbon-offset: 0px;position:relative;width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__container[data-v-5079a1c8]{width:100%;height:calc(100vh - 128px - var(--ribbon-offset))}.guido-editor__no-header[data-v-5079a1c8]{height:calc(100vh - 75px - var(--ribbon-offset))}[data-v-293f1c47] .in-breadcrumb-wrapper__links{cursor:pointer}.templates-wrapper[data-v-91a26acd]{gap:16px;grid-template-columns:repeat(3,1fr)}.templates-wrapper .template-wrapper[data-v-91a26acd]{cursor:pointer}.templates-wrapper .template-wrapper .template-container[data-v-91a26acd]{height:274px;padding:2px;transition:none}.templates-wrapper .template-wrapper .template-container.selected[data-v-91a26acd]{padding:1px}.templates-wrapper .template-wrapper .template-container .thumbnail[data-v-91a26acd]{object-fit:cover;transform:scale(1)}[data-v-b9a93c6e] .guido__verion-history-view-option-selection-desktop svg,[data-v-b9a93c6e] .guido__verion-history-view-option-selection-mobile svg{margin:0 0 0 2px}[data-v-b9a93c6e] .in-segments-wrapper__button_selected,[data-v-b9a93c6e] .in-segments-wrapper__button_selected:hover{background-color:#dae1fb}.error-list[data-v-c3fd5d4b]{gap:16px}.desktop-browser-header[data-v-d86c5af5]{height:79px;min-height:79px}.desktop-browser-header__left[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:378px}.desktop-browser-header__center[data-v-d86c5af5]{height:79px;background-repeat:repeat-x;background-size:auto 100%;background-position:left top}.desktop-browser-header__right[data-v-d86c5af5]{-webkit-user-drag:none;height:79px;width:112px}.desktop-preview[data-v-cf946232]{min-width:602px;height:70vh;min-height:583px;border-radius:10px}.desktop-preview iframe[data-v-cf946232]{min-height:504px}.iframe-wrapper[data-v-f255b2bb]{width:258px}.iframe-scaled[data-v-f255b2bb]{width:320px;height:124.0310077519%;transform:scale(.80625);transform-origin:top left}.cropped-text[data-v-eb3d05d7]{width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mobile-preview-wrapper__phone[data-v-3f472f96]{width:282px}.mobile-preview-wrapper__phone img[data-v-3f472f96]{object-fit:cover;border-radius:44px}.mobile-preview-wrapper__content[data-v-3f472f96]{width:258px;height:450px;left:12px}[data-v-6bcaca8a] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-f16f20f8] .vueperslides__bullets{pointer-events:none!important}[data-v-f16f20f8] .vueperslides__parallax-wrapper{padding-bottom:110px!important}[data-v-bb3cca55] .vueperslides__bullets{pointer-events:none!important}[data-v-bb3cca55] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-b09e80c4] .vueperslides__bullets{pointer-events:none!important}[data-v-b09e80c4] .vueperslides__parallax-wrapper{height:110px!important;padding-bottom:110px!important}[data-v-9bdef600] .vueperslides__parallax-wrapper{padding-bottom:110px!important}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.13.1-beta.
|
|
3
|
+
"version": "3.13.1-beta.5ea31b5",
|
|
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",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"license": "ISC",
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@stripoinc/ui-editor-extensions": "3.8.0",
|
|
47
|
-
"@useinsider/design-system-vue": "1.
|
|
47
|
+
"@useinsider/design-system-vue": "1.3.0",
|
|
48
48
|
"@vueuse/core": "11.3.0",
|
|
49
49
|
"lodash-es": "4.17.21",
|
|
50
50
|
"pinia": "2.3.1",
|