@useinsider/guido 3.11.0 → 3.12.0-beta.0c096f0
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/README.md +29 -0
- package/dist/@types/config/schemas.js +104 -84
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +1 -1
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +8 -8
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +5 -5
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +10 -10
- package/dist/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/HeaderWrapper.vue.js +3 -3
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +2 -0
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +1 -1
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +11 -10
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +6 -6
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +20 -23
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +8 -7
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +5 -5
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +2 -2
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +9 -9
- package/dist/composables/useModuleDynamicContentRepair.js +37 -0
- package/dist/composables/usePreviewInteractionGuard.js +36 -11
- package/dist/composables/useRecommendationPreview.js +61 -60
- package/dist/composables/useStripo.js +70 -67
- package/dist/config/compiler/outlookCompilerRules.js +21 -8
- package/dist/config/migrator/index.js +7 -6
- package/dist/config/migrator/socialIconMigrator.js +29 -0
- package/dist/enums/academy.js +1 -1
- package/dist/enums/date.js +3 -4
- package/dist/extensions/Blocks/Items/controls/price/formattedPrice.js +43 -41
- package/dist/extensions/Blocks/Recommendation/constants/controlIds.js +1 -1
- package/dist/extensions/Blocks/Recommendation/controls/blockBackground/index.js +10 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +23 -21
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +41 -40
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +3 -2
- package/dist/extensions/Blocks/controlFactories.js +125 -75
- package/dist/guido.css +1 -1
- package/dist/node_modules/valibot/dist/index.js +148 -112
- package/dist/services/stripoApi.js +18 -18
- package/dist/src/@types/config/schemas.d.ts +30 -0
- package/dist/src/@types/generic.d.ts +18 -0
- package/dist/src/composables/useConfig.d.ts +6 -0
- package/dist/src/composables/useModuleDynamicContentRepair.d.ts +18 -0
- package/dist/src/composables/usePreviewInteractionGuard.d.ts +1 -1
- package/dist/src/config/migrator/socialIconMigrator.d.ts +1 -0
- package/dist/src/enums/academy.d.ts +3 -3
- package/dist/src/extensions/Blocks/Recommendation/constants/controlIds.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +14 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +1 -0
- package/dist/src/extensions/Blocks/controlFactories.d.ts +36 -0
- package/dist/src/library.d.ts +1 -1
- package/dist/src/stores/config.d.ts +54 -0
- package/dist/src/utils/dynamicContentConverter.d.ts +27 -0
- package/dist/src/utils/environmentUtil.d.ts +5 -2
- package/dist/src/utils/genericUtil.d.ts +18 -1
- package/dist/src/utils/urlSchemes.d.ts +6 -0
- package/dist/static/styles/components/base-input.css.js +6 -7
- package/dist/utils/dateUtil.js +10 -23
- package/dist/utils/dynamicContentConverter.js +31 -0
- package/dist/utils/environmentUtil.js +3 -2
- package/dist/utils/genericUtil.js +42 -21
- package/dist/utils/urlSchemes.js +4 -0
- package/package.json +10 -1
- package/dist/src/composables/useHtmlValidator.test.d.ts +0 -1
- package/dist/src/config/compiler/utils/recommendationIgnoreUtils.test.d.ts +0 -1
|
@@ -1,47 +1,68 @@
|
|
|
1
|
-
const
|
|
2
|
-
const a =
|
|
3
|
-
text:
|
|
4
|
-
value:
|
|
1
|
+
const o = (l) => {
|
|
2
|
+
const a = l.value.match(/\{\{([^}]+)\}\}/)[1].split("|").map((t) => t.trim()), [c] = a, r = {
|
|
3
|
+
text: l.label,
|
|
4
|
+
value: c || ""
|
|
5
5
|
};
|
|
6
6
|
if (a.length >= 2) {
|
|
7
|
-
const [,
|
|
8
|
-
if (
|
|
9
|
-
let
|
|
10
|
-
|
|
7
|
+
const [, t, e] = a;
|
|
8
|
+
if (t.startsWith("default:")) {
|
|
9
|
+
let n = t.slice(8).trim();
|
|
10
|
+
n.startsWith('"') && n.endsWith('"') && (n = n.slice(1, -1)), r.fallback = n;
|
|
11
11
|
} else {
|
|
12
|
-
const
|
|
13
|
-
|
|
12
|
+
const n = t.includes("=") ? { key: t.split("=")[0].trim(), value: t.split("=")[1].trim() } : null;
|
|
13
|
+
n ? r.format = n : e || (r.fallback = t), e && (r.fallback = e);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
return
|
|
17
|
-
},
|
|
16
|
+
return r;
|
|
17
|
+
}, f = (l, s = !1) => l.map((a) => {
|
|
18
18
|
if (a.format)
|
|
19
19
|
return {
|
|
20
20
|
label: `${a.text} | ${a.format.key}=${a.format.value}`,
|
|
21
21
|
value: `{{${a.value}|${a.format.key}=${a.format.value}}}`
|
|
22
22
|
};
|
|
23
|
-
if (
|
|
23
|
+
if (s) {
|
|
24
24
|
if (!a.fallback)
|
|
25
25
|
return {
|
|
26
26
|
label: a.text,
|
|
27
27
|
value: `{{ ${a.value} }}`
|
|
28
28
|
};
|
|
29
|
-
const
|
|
29
|
+
const r = !Number.isNaN(Number(a.fallback)) && a.fallback.trim() !== "" ? a.fallback : `"${a.fallback}"`;
|
|
30
30
|
return {
|
|
31
31
|
label: `${a.text} | ${a.fallback}`,
|
|
32
|
-
value: `{{ ${a.value} | default: ${
|
|
32
|
+
value: `{{ ${a.value} | default: ${r} }}`
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
return {
|
|
36
36
|
label: a.fallback ? `${a.text} | ${a.fallback}` : a.text,
|
|
37
37
|
value: a.fallback ? `{{${a.value}|${a.fallback}}}` : `{{${a.value}}}`
|
|
38
38
|
};
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
}), b = (l) => {
|
|
40
|
+
const s = [], a = /* @__PURE__ */ new Set(), c = (t) => {
|
|
41
|
+
Array.isArray(t) && t.forEach((e) => {
|
|
42
|
+
const n = [...e.children ?? [], ...e.select_items ?? []];
|
|
43
|
+
if (n.length > 0) {
|
|
44
|
+
c(n);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const u = e.text || e.tag_text;
|
|
48
|
+
u && e.value && !a.has(e.value) && (a.add(e.value), s.push({ text: u, value: e.value }));
|
|
49
|
+
});
|
|
50
|
+
}, [r] = Object.values(l ?? {});
|
|
51
|
+
return c(r), s;
|
|
52
|
+
}, v = (l, s, a = !1) => {
|
|
53
|
+
const c = new Set(l.map((t) => t.value)), r = s.filter((t) => c.has(t.value) ? !1 : (c.add(t.value), !0));
|
|
54
|
+
return [
|
|
55
|
+
...f(l, a),
|
|
56
|
+
...f(r, a)
|
|
57
|
+
];
|
|
58
|
+
}, i = () => {
|
|
59
|
+
var l;
|
|
60
|
+
return ((l = document.head.querySelector('meta[name="csrf-token"]')) == null ? void 0 : l.getAttribute("content")) ?? "";
|
|
42
61
|
};
|
|
43
62
|
export {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
63
|
+
v as buildMergeTagEntries,
|
|
64
|
+
f as dynamicContentToMergeTags,
|
|
65
|
+
b as flattenDynamicContentList,
|
|
66
|
+
i as getCsrfToken,
|
|
67
|
+
o as mergeTagToDynamicContent
|
|
47
68
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@useinsider/guido",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.0-beta.0c096f0",
|
|
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
|
},
|
|
@@ -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",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|