@useinsider/guido 1.0.3-beta.552f8c9 → 1.0.3-beta.57a0e76
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 +3 -32
- package/dist/components/Guido.vue.js +1 -1
- package/dist/components/Guido.vue2.js +49 -48
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +4 -4
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +44 -41
- package/dist/composables/useActionsApi.js +43 -26
- package/dist/composables/useHtmlCompiler.js +15 -13
- package/dist/composables/useHtmlValidator.js +36 -35
- package/dist/composables/useStripo.js +41 -37
- package/dist/composables/useTimerClone.js +53 -0
- package/dist/config/compiler/itemsCompilerRules.js +14 -0
- package/dist/enums/onboarding.js +3 -2
- package/dist/enums/unsubscribe.js +27 -26
- package/dist/extensions/Blocks/Checkbox/control.js +15 -14
- package/dist/extensions/Blocks/Checkbox/template.js +14 -9
- package/dist/extensions/Blocks/Items/block.js +26 -26
- package/dist/extensions/Blocks/Items/controls/cardComposition.js +151 -57
- package/dist/extensions/Blocks/Items/controls/name/trimming.js +2 -2
- package/dist/extensions/Blocks/Items/controls/settingsControl.js +149 -117
- package/dist/extensions/Blocks/Items/enums/productEnums.js +83 -5
- package/dist/extensions/Blocks/Items/enums/settingsEnums.js +7 -1
- package/dist/extensions/Blocks/Items/layouts/horizontal.html.js +57 -56
- package/dist/extensions/Blocks/Items/layouts/vertical.html.js +54 -55
- package/dist/extensions/Blocks/Items/settingsPanel.js +56 -31
- package/dist/extensions/Blocks/Items/template.js +138 -59
- package/dist/extensions/Blocks/RadioButton/control.js +18 -17
- package/dist/extensions/Blocks/RadioButton/template.js +18 -9
- package/dist/extensions/Blocks/Unsubscribe/block.js +27 -27
- package/dist/guido.css +1 -1
- package/dist/node_modules/lodash-es/_DataView.js +6 -0
- package/dist/node_modules/lodash-es/_Promise.js +6 -0
- package/dist/node_modules/lodash-es/_Set.js +6 -0
- package/dist/node_modules/lodash-es/_SetCache.js +13 -0
- package/dist/node_modules/lodash-es/_WeakMap.js +6 -0
- package/dist/node_modules/lodash-es/_arrayFilter.js +10 -0
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +13 -12
- package/dist/node_modules/lodash-es/_arrayMap.js +8 -0
- package/dist/node_modules/lodash-es/_arrayPush.js +8 -0
- package/dist/node_modules/lodash-es/_arraySome.js +9 -0
- package/dist/node_modules/lodash-es/_baseEach.js +6 -0
- package/dist/node_modules/lodash-es/_baseFlatten.js +13 -0
- package/dist/node_modules/lodash-es/_baseForOwn.js +8 -0
- package/dist/node_modules/lodash-es/_baseGet.js +11 -0
- package/dist/node_modules/lodash-es/_baseGetAllKeys.js +9 -0
- package/dist/node_modules/lodash-es/_baseHasIn.js +6 -0
- package/dist/node_modules/lodash-es/_baseIsEqual.js +8 -0
- package/dist/node_modules/lodash-es/_baseIsEqualDeep.js +32 -0
- package/dist/node_modules/lodash-es/_baseIsMatch.js +29 -0
- package/dist/node_modules/lodash-es/_baseIteratee.js +11 -0
- package/dist/node_modules/lodash-es/_baseKeys.js +14 -0
- package/dist/node_modules/lodash-es/_baseMap.js +11 -0
- package/dist/node_modules/lodash-es/_baseMatches.js +12 -0
- package/dist/node_modules/lodash-es/_baseMatchesProperty.js +17 -0
- package/dist/node_modules/lodash-es/_baseProperty.js +8 -0
- package/dist/node_modules/lodash-es/_basePropertyDeep.js +9 -0
- package/dist/node_modules/lodash-es/_baseRange.js +9 -0
- package/dist/node_modules/lodash-es/_baseToString.js +18 -0
- package/dist/node_modules/lodash-es/_baseTrim.js +8 -0
- package/dist/node_modules/lodash-es/_cacheHas.js +6 -0
- package/dist/node_modules/lodash-es/_castPath.js +10 -0
- package/dist/node_modules/lodash-es/_createBaseEach.js +15 -0
- package/dist/node_modules/lodash-es/_createRange.js +11 -0
- package/dist/node_modules/lodash-es/_equalArrays.js +40 -0
- package/dist/node_modules/lodash-es/_equalByTag.js +45 -0
- package/dist/node_modules/lodash-es/_equalObjects.js +36 -0
- package/dist/node_modules/lodash-es/_getAllKeys.js +9 -0
- package/dist/node_modules/lodash-es/_getMatchData.js +12 -0
- package/dist/node_modules/lodash-es/_getSymbols.js +10 -0
- package/dist/node_modules/lodash-es/_getTag.js +28 -0
- package/dist/node_modules/lodash-es/_hasPath.js +19 -0
- package/dist/node_modules/lodash-es/_isFlattenable.js +10 -0
- package/dist/node_modules/lodash-es/_isKey.js +12 -0
- package/dist/node_modules/lodash-es/_isStrictComparable.js +7 -0
- package/dist/node_modules/lodash-es/_mapToArray.js +9 -0
- package/dist/node_modules/lodash-es/_matchesStrictComparable.js +8 -0
- package/dist/node_modules/lodash-es/_memoizeCapped.js +11 -0
- package/dist/node_modules/lodash-es/_nativeKeys.js +5 -0
- package/dist/node_modules/lodash-es/_setCacheAdd.js +7 -0
- package/dist/node_modules/lodash-es/_setCacheHas.js +6 -0
- package/dist/node_modules/lodash-es/_setToArray.js +9 -0
- package/dist/node_modules/lodash-es/_stringToPath.js +10 -0
- package/dist/node_modules/lodash-es/_toKey.js +10 -0
- package/dist/node_modules/lodash-es/_trimmedEndIndex.js +9 -0
- package/dist/node_modules/lodash-es/flatMap.js +8 -0
- package/dist/node_modules/lodash-es/get.js +8 -0
- package/dist/node_modules/lodash-es/hasIn.js +8 -0
- package/dist/node_modules/lodash-es/isSymbol.js +9 -0
- package/dist/node_modules/lodash-es/keys.js +9 -0
- package/dist/node_modules/lodash-es/keysIn.js +3 -3
- package/dist/node_modules/lodash-es/map.js +11 -0
- package/dist/node_modules/lodash-es/property.js +10 -0
- package/dist/node_modules/lodash-es/range.js +5 -0
- package/dist/node_modules/lodash-es/stubArray.js +6 -0
- package/dist/node_modules/lodash-es/toFinite.js +14 -0
- package/dist/node_modules/lodash-es/toNumber.js +22 -0
- package/dist/node_modules/lodash-es/toString.js +7 -0
- package/dist/src/composables/useActionsApi.d.ts +2 -0
- package/dist/src/composables/useTimerClone.d.ts +6 -0
- package/dist/src/config/compiler/itemsCompilerRules.d.ts +2 -0
- package/dist/src/enums/onboarding.d.ts +1 -0
- package/dist/src/extensions/Blocks/Checkbox/template.d.ts +1 -1
- package/dist/src/extensions/Blocks/Items/block.d.ts +14 -0
- package/dist/src/extensions/Blocks/Items/controls/cardComposition.d.ts +20 -7
- package/dist/src/extensions/Blocks/Items/controls/settingsControl.d.ts +8 -2
- package/dist/src/extensions/Blocks/Items/enums/productEnums.d.ts +8 -0
- package/dist/src/extensions/Blocks/Items/enums/settingsEnums.d.ts +6 -0
- package/dist/src/extensions/Blocks/Items/template.d.ts +9 -1
- package/dist/src/extensions/Blocks/RadioButton/template.d.ts +1 -1
- package/dist/src/utils/environmentUtil.d.ts +5 -0
- package/dist/src/utils/pairProductVariables.d.ts +7 -0
- package/dist/utils/environmentUtil.js +4 -0
- package/dist/utils/pairProductVariables.js +136 -0
- package/package.json +3 -10
package/README.md
CHANGED
|
@@ -600,6 +600,9 @@ Create a `.env` file with the following variables: (You can get env variables fr
|
|
|
600
600
|
VITE_STRIPO_PLUGIN_ID=your_plugin_id
|
|
601
601
|
VITE_STRIPO_SECRET_KEY=your_secret_key
|
|
602
602
|
VITE_STRIPO_ROLE=your_role
|
|
603
|
+
|
|
604
|
+
# Playwright Test Configuration (Optional - for local debugging only)
|
|
605
|
+
HEADED=false # Set to 'true' to run tests with visible browser
|
|
603
606
|
```
|
|
604
607
|
|
|
605
608
|
### Project Structure
|
|
@@ -787,35 +790,3 @@ ISC License
|
|
|
787
790
|
- Playwright integrationBoilerplate/control.ts
|
|
788
791
|
- Commitlint & Precommit Hooks integration
|
|
789
792
|
- Get Pre-built display conditions from API
|
|
790
|
-
|
|
791
|
-
Recommendation Block:
|
|
792
|
-
- [ ] Validations for Filters
|
|
793
|
-
- [ ] DOM Rerender after Filters change
|
|
794
|
-
- [ ] Change currencySymbol as Input Type
|
|
795
|
-
- [ ] Apply filter query to request
|
|
796
|
-
- [ ] Drawer loading bug
|
|
797
|
-
- [ ] Drawer send request when apply filters
|
|
798
|
-
- [ ] Clear all feature for Drawer
|
|
799
|
-
- [ ] Stripo's controls should be effect specific DOM item -- Try extending CommonControl class
|
|
800
|
-
- [ ] Show toaster message if uses multiple recommendation blocks in same template
|
|
801
|
-
- [ ] Change filter button text as Change Filters
|
|
802
|
-
- [ ] Migration template for Recommendation Block
|
|
803
|
-
- [ ] Recommendation Algorithm default value should be mostPopular
|
|
804
|
-
- [ ] Default fields for empty template like currency, title etc.
|
|
805
|
-
- [ ] Recommendation Block Icon Registry should be updated
|
|
806
|
-
- [ ] AMP Block Icon should be updated
|
|
807
|
-
- [ ] Padding feature for between Product Rows
|
|
808
|
-
|
|
809
|
-
Items Block Phase 2:
|
|
810
|
-
[ ] Writing configs to esd-config-data DOM.
|
|
811
|
-
[ ] Build on save feature should be working
|
|
812
|
-
[ ] Data Migration feature should be working
|
|
813
|
-
|
|
814
|
-
Tech Debts:
|
|
815
|
-
[ ] Merge Custom Blocks into a single File
|
|
816
|
-
[ ] Move Custom Blocks names to an enum file
|
|
817
|
-
[ ] Template Replacement should be optimized for version history
|
|
818
|
-
[ ] Code Optimization for Items Block inner blocks reordering
|
|
819
|
-
[ ] Image Size & Margins controls has an error on console
|
|
820
|
-
[ ] Feed Text Trimming feature to toggle settings
|
|
821
|
-
[ ] Formatted Price feature to toggle settings
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import Z from "
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
|
|
1
|
+
import { defineComponent as z, defineAsyncComponent as L, ref as K, computed as W, watch as j, onMounted as q, onUnmounted as J } from "vue";
|
|
2
|
+
import { provideGuidoActions as Q } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as V } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as X } from "../composables/useStripo.js";
|
|
5
|
+
import { useTimerClone as Y } from "../composables/useTimerClone.js";
|
|
6
|
+
import { migrate as _ } from "../config/migrator/index.js";
|
|
7
|
+
import { DefaultUsername as Z, DefaultMessageType as $, DefaultGuidoConfig as ee } from "../enums/defaults.js";
|
|
8
|
+
import oe from "./organisms/base/Toaster.vue.js";
|
|
9
|
+
import te from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
10
|
+
import ne from "./organisms/header/HeaderWrapper.vue.js";
|
|
11
|
+
import re from "./organisms/LoadingWrapper.vue.js";
|
|
12
|
+
import ie from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
13
|
+
import se from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
14
|
+
import { useStripoApi as ae } from "../services/stripoApi.js";
|
|
15
|
+
import { useConfigStore as ce } from "../stores/config.js";
|
|
16
|
+
import { useDynamicContentStore as me } from "../stores/dynamic-content.js";
|
|
17
|
+
import { useEditorStore as de } from "../stores/editor.js";
|
|
18
|
+
import { usePreviewStore as le } from "../stores/preview.js";
|
|
19
|
+
import { useUnsubscribeStore as ue } from "../stores/unsubscribe.js";
|
|
20
|
+
import pe from "../node_modules/lodash-es/merge.js";
|
|
21
|
+
const Ae = /* @__PURE__ */ z({
|
|
21
22
|
__name: "Guido",
|
|
22
23
|
props: {
|
|
23
24
|
templateId: null,
|
|
@@ -32,34 +33,34 @@ const Ue = /* @__PURE__ */ O({
|
|
|
32
33
|
templateConfig: null
|
|
33
34
|
},
|
|
34
35
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
35
|
-
setup(
|
|
36
|
-
const u =
|
|
36
|
+
setup(A, { expose: N, emit: o }) {
|
|
37
|
+
const u = A, F = L(
|
|
37
38
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
38
|
-
),
|
|
39
|
+
), H = L(
|
|
39
40
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
40
|
-
), p =
|
|
41
|
+
), p = K(), i = me(), g = ue(), f = ce(), s = de(), O = le(), n = W(() => s.hasChanges), { getPartnerName: y, getProductType: v, isTestPartner: R } = V(), h = () => {
|
|
41
42
|
var e;
|
|
42
43
|
return (e = p.value) == null ? void 0 : e.handleSave(!0);
|
|
43
44
|
}, {
|
|
44
45
|
templateId: a,
|
|
45
|
-
userId:
|
|
46
|
-
guidoConfig:
|
|
46
|
+
userId: b,
|
|
47
|
+
guidoConfig: C,
|
|
47
48
|
templateConfig: t,
|
|
48
49
|
html: r = "",
|
|
49
50
|
css: S = "",
|
|
50
51
|
partnerName: c = y(),
|
|
51
52
|
productType: m = v(),
|
|
52
|
-
messageType: w =
|
|
53
|
-
username: D =
|
|
53
|
+
messageType: w = $,
|
|
54
|
+
username: D = Z
|
|
54
55
|
} = u, d = (t == null ? void 0 : t.preselectedDynamicContentList) || [];
|
|
55
|
-
s.templateId = a, window.GuidoConfig =
|
|
56
|
+
s.templateId = a, window.GuidoConfig = pe(ee, C), window.GuidoConfig.partner = {
|
|
56
57
|
partnerName: c,
|
|
57
58
|
productType: m,
|
|
58
59
|
messageType: w
|
|
59
60
|
}, f.templateConfig = t;
|
|
60
|
-
const { initPlugin:
|
|
61
|
+
const { initPlugin: T } = X({
|
|
61
62
|
emailId: a,
|
|
62
|
-
userId:
|
|
63
|
+
userId: b,
|
|
63
64
|
username: D,
|
|
64
65
|
partnerName: c,
|
|
65
66
|
productType: m,
|
|
@@ -67,11 +68,11 @@ const Ue = /* @__PURE__ */ O({
|
|
|
67
68
|
onReady: () => {
|
|
68
69
|
console.debug("guido:ready"), o("ready");
|
|
69
70
|
}
|
|
70
|
-
}), { getDefaultTemplate:
|
|
71
|
+
}), { getDefaultTemplate: E } = ae(), { cloneTimersOnSave: k, hasTimerBlocks: P } = Y(), x = W(() => {
|
|
71
72
|
var e;
|
|
72
73
|
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
73
74
|
});
|
|
74
|
-
|
|
75
|
+
Q({
|
|
75
76
|
onBack: () => {
|
|
76
77
|
console.debug("guido:back"), o("back");
|
|
77
78
|
},
|
|
@@ -85,50 +86,50 @@ const Ue = /* @__PURE__ */ O({
|
|
|
85
86
|
console.debug("guido:test-email:click"), o("test-email:click");
|
|
86
87
|
}
|
|
87
88
|
});
|
|
88
|
-
const
|
|
89
|
+
const G = (e) => {
|
|
89
90
|
console.debug("dynamic-content:close", e), i.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
90
|
-
},
|
|
91
|
+
}, I = () => {
|
|
91
92
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
92
93
|
};
|
|
93
|
-
|
|
94
|
+
j(() => n.value, () => {
|
|
94
95
|
o("on-change", n.value);
|
|
95
96
|
});
|
|
96
97
|
const l = (e) => {
|
|
97
|
-
const
|
|
98
|
-
console.debug("dynamic-content:open",
|
|
98
|
+
const U = e, { attribute: B, position: M } = U.detail;
|
|
99
|
+
console.debug("dynamic-content:open", U.detail), o("dynamic-content:open", B, M);
|
|
99
100
|
};
|
|
100
|
-
return
|
|
101
|
+
return q(async () => {
|
|
101
102
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
102
103
|
try {
|
|
103
104
|
g.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
|
|
104
105
|
let e = {
|
|
105
|
-
html: r && await
|
|
106
|
+
html: r && await _(r),
|
|
106
107
|
css: S,
|
|
107
108
|
forceRecreate: !0
|
|
108
109
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
109
110
|
};
|
|
110
|
-
e.html || (e = await
|
|
111
|
+
e.html || (e = await E(), e.html = await _(e.html)), P(e.html) && (e.html = await k(e.html)), await T(e), i.selectedDynamicContentList = d;
|
|
111
112
|
} catch (e) {
|
|
112
113
|
console.error("Failed to initialize Stripo editor:", e);
|
|
113
114
|
}
|
|
114
115
|
document.addEventListener("dynamic-content:open", l);
|
|
115
|
-
}),
|
|
116
|
+
}), J(() => {
|
|
116
117
|
document.removeEventListener("dynamic-content:open", l);
|
|
117
118
|
try {
|
|
118
119
|
window.UIEditor.removeEditor();
|
|
119
120
|
} catch {
|
|
120
121
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
121
122
|
}
|
|
122
|
-
}),
|
|
123
|
+
}), N({
|
|
123
124
|
dynamicContent: {
|
|
124
|
-
insert:
|
|
125
|
-
close:
|
|
125
|
+
insert: G,
|
|
126
|
+
close: I
|
|
126
127
|
},
|
|
127
128
|
hasChanges: n,
|
|
128
|
-
saveSilent:
|
|
129
|
-
}), { __sfc: !0, PreviewContainer:
|
|
129
|
+
saveSilent: h
|
|
130
|
+
}), { __sfc: !0, PreviewContainer: F, OnboardingWrapper: H, headerWrapperRef: p, dynamicContentStore: i, unsubscribeStore: g, props: u, configStore: f, editorStore: s, previewStore: O, hasChanges: n, getPartnerName: y, getProductType: v, isTestPartner: R, saveSilent: h, templateId: a, userId: b, guidoConfig: C, templateConfig: t, html: r, css: S, partnerName: c, productType: m, messageType: w, username: D, preselectedDynamicContentList: d, emit: o, initPlugin: T, getDefaultTemplate: E, cloneTimersOnSave: k, hasTimerBlocks: P, noHeader: x, insertDynamicContent: G, closeDynamicContent: I, handleDynamicContentOpen: l, Toaster: oe, FilterSelectionDrawer: te, HeaderWrapper: ne, LoadingWrapper: re, SaveAsTemplateDrawer: ie, UnsubscribeWrapper: se };
|
|
130
131
|
}
|
|
131
132
|
});
|
|
132
133
|
export {
|
|
133
|
-
|
|
134
|
+
Ae as default
|
|
134
135
|
};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import g from "./ItemsOnboarding.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import m from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var
|
|
4
|
+
var l = function() {
|
|
5
5
|
var e, n, r, i, s, a;
|
|
6
6
|
var o = this, d = o._self._c, t = o._self._setupProxy;
|
|
7
7
|
return t.isVisible ? d(t.InOnboard, { key: "guido__items-onboard", staticClass: "w-21-s p-a z-11", class: (e = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__items-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : r.left, "pages-config": t.onboardingStore.onboardings.itemsOnboarding.config, "pointer-position": (i = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : i.position, "right-position": (s = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : s.right, "top-position": (a = t.onboardingStore.getItemsCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: t.handleBack, close: function(b) {
|
|
8
8
|
return t.onboardingStore.close("itemsOnboarding");
|
|
9
9
|
}, nextButtonClick: t.handleNext } }) : o._e();
|
|
10
|
-
},
|
|
10
|
+
}, c = [], p = /* @__PURE__ */ m(
|
|
11
11
|
g,
|
|
12
|
-
c,
|
|
13
12
|
l,
|
|
13
|
+
c,
|
|
14
14
|
!1,
|
|
15
15
|
null,
|
|
16
|
-
"
|
|
16
|
+
"dd1a237a"
|
|
17
17
|
);
|
|
18
18
|
const I = p.exports;
|
|
19
19
|
export {
|
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useTranslations as
|
|
3
|
-
import { UI_EDITOR_SELECTOR as
|
|
4
|
-
import { useOnboardingStore as
|
|
5
|
-
import { InOnboard as
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as l, computed as a, watch as u } from "vue";
|
|
2
|
+
import { useTranslations as x } from "../../../composables/useTranslations.js";
|
|
3
|
+
import { RIBBON_SELECTOR as T, UI_EDITOR_SELECTOR as O, CARD_COMPOSITION_TAB_SELECTOR as B, SETTINGS_TAB_SELECTOR as f } from "../../../enums/onboarding.js";
|
|
4
|
+
import { useOnboardingStore as C } from "../../../stores/onboarding.js";
|
|
5
|
+
import { InOnboard as k } from "@useinsider/design-system-vue";
|
|
6
|
+
const E = /* @__PURE__ */ l({
|
|
7
7
|
__name: "ItemsOnboarding",
|
|
8
|
-
setup(
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
8
|
+
setup(_) {
|
|
9
|
+
const e = x(), o = C(), c = a(() => {
|
|
10
|
+
const t = document.querySelector(T);
|
|
11
|
+
return (t == null ? void 0 : t.offsetHeight) ?? 0;
|
|
12
|
+
}), n = (t) => `${t + c.value}px`, r = (t) => {
|
|
13
|
+
const i = document.querySelector(O);
|
|
14
|
+
if (!(i != null && i.shadowRoot))
|
|
12
15
|
return;
|
|
13
|
-
const { shadowRoot:
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
+
const { shadowRoot: s } = i, m = s.querySelector(t);
|
|
17
|
+
m && m.click();
|
|
18
|
+
}, d = a(() => [
|
|
16
19
|
{
|
|
17
20
|
classes: "guido-items-onboarding-card-1",
|
|
18
21
|
right: "426px",
|
|
19
|
-
top:
|
|
22
|
+
top: n(90),
|
|
20
23
|
position: "Right Top",
|
|
21
|
-
title:
|
|
22
|
-
description:
|
|
24
|
+
title: e("email-editor.onboarding-items-title"),
|
|
25
|
+
description: e("email-editor.onboarding-items-description"),
|
|
23
26
|
imageSource: "",
|
|
24
27
|
backButtonClick: () => {
|
|
25
28
|
},
|
|
26
29
|
nextButtonType: "text",
|
|
27
|
-
nextButtonText:
|
|
30
|
+
nextButtonText: e("products.next"),
|
|
28
31
|
nextButtonClick: () => {
|
|
29
32
|
o.next("itemsOnboarding");
|
|
30
33
|
}
|
|
@@ -32,18 +35,18 @@ const I = /* @__PURE__ */ u({
|
|
|
32
35
|
{
|
|
33
36
|
classes: "guido-items-onboarding-card-2",
|
|
34
37
|
right: "426px",
|
|
35
|
-
top:
|
|
38
|
+
top: n(218),
|
|
36
39
|
position: "Right Top",
|
|
37
|
-
title:
|
|
38
|
-
description:
|
|
40
|
+
title: e("email-editor.onboarding-items-item-type-title"),
|
|
41
|
+
description: e("email-editor.onboarding-items-item-type-description"),
|
|
39
42
|
imageSource: "",
|
|
40
43
|
backButtonType: "text",
|
|
41
|
-
backButtonText:
|
|
44
|
+
backButtonText: e("ds-steps.back"),
|
|
42
45
|
backButtonClick: () => {
|
|
43
46
|
o.previous("itemsOnboarding");
|
|
44
47
|
},
|
|
45
48
|
nextButtonType: "text",
|
|
46
|
-
nextButtonText:
|
|
49
|
+
nextButtonText: e("products.next"),
|
|
47
50
|
nextButtonClick: () => {
|
|
48
51
|
o.next("itemsOnboarding");
|
|
49
52
|
}
|
|
@@ -51,46 +54,46 @@ const I = /* @__PURE__ */ u({
|
|
|
51
54
|
{
|
|
52
55
|
classes: "guido-items-onboarding-card-3",
|
|
53
56
|
right: "426px",
|
|
54
|
-
top:
|
|
57
|
+
top: n(140),
|
|
55
58
|
position: "Right Top",
|
|
56
|
-
title:
|
|
57
|
-
description:
|
|
59
|
+
title: e("email-editor.onboarding-items-composition-title"),
|
|
60
|
+
description: e("email-editor.onboarding-items-composition-description"),
|
|
58
61
|
imageSource: "",
|
|
59
62
|
backButtonType: "text",
|
|
60
|
-
backButtonText:
|
|
63
|
+
backButtonText: e("ds-steps.back"),
|
|
61
64
|
backButtonClick: () => {
|
|
62
65
|
o.previous("itemsOnboarding");
|
|
63
66
|
},
|
|
64
67
|
nextButtonType: "text",
|
|
65
|
-
nextButtonText:
|
|
68
|
+
nextButtonText: e("action-builder.ok"),
|
|
66
69
|
nextButtonClick: () => {
|
|
67
70
|
o.close("itemsOnboarding");
|
|
68
71
|
}
|
|
69
72
|
}
|
|
70
|
-
]),
|
|
71
|
-
var t,
|
|
72
|
-
(
|
|
73
|
-
},
|
|
74
|
-
var t,
|
|
75
|
-
(
|
|
73
|
+
]), g = a(() => o.onboardings.itemsOnboarding.config.length > 0 && o.onboardings.itemsOnboarding.isActive), p = () => {
|
|
74
|
+
var t, i;
|
|
75
|
+
(i = (t = o.getItemsCurrentCard) == null ? void 0 : t.nextButtonClick) == null || i.call(t);
|
|
76
|
+
}, b = () => {
|
|
77
|
+
var t, i;
|
|
78
|
+
(i = (t = o.getItemsCurrentCard) == null ? void 0 : t.backButtonClick) == null || i.call(t);
|
|
76
79
|
};
|
|
77
|
-
return
|
|
80
|
+
return u(
|
|
78
81
|
() => o.isActive("itemsOnboarding"),
|
|
79
82
|
(t) => {
|
|
80
|
-
t && o.setConfig("itemsOnboarding",
|
|
83
|
+
t && o.setConfig("itemsOnboarding", d.value);
|
|
81
84
|
},
|
|
82
85
|
{ immediate: !0 }
|
|
83
|
-
),
|
|
86
|
+
), u(
|
|
84
87
|
() => o.onboardings.itemsOnboarding.cardIndex,
|
|
85
|
-
(t,
|
|
88
|
+
(t, i) => {
|
|
86
89
|
if (!o.isActive("itemsOnboarding"))
|
|
87
90
|
return;
|
|
88
|
-
const
|
|
89
|
-
|
|
91
|
+
const s = `${i}-${t}`;
|
|
92
|
+
s === "1-2" && r(B), s === "2-1" && r(f);
|
|
90
93
|
}
|
|
91
|
-
), { __sfc: !0, trans:
|
|
94
|
+
), { __sfc: !0, trans: e, onboardingStore: o, ribbonOffset: c, getTopPosition: n, switchTab: r, onboardingCardsConfig: d, isVisible: g, handleNext: p, handleBack: b, InOnboard: k };
|
|
92
95
|
}
|
|
93
96
|
});
|
|
94
97
|
export {
|
|
95
|
-
|
|
98
|
+
E as default
|
|
96
99
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { useToaster as
|
|
2
|
-
const
|
|
3
|
-
const { handleError: l } =
|
|
4
|
-
const
|
|
1
|
+
import { useToaster as w } from "./useToaster.js";
|
|
2
|
+
const S = () => {
|
|
3
|
+
const { handleError: l } = w(), s = (t = {}) => new Promise((e, i) => {
|
|
4
|
+
const n = { ...{
|
|
5
5
|
minimize: !0,
|
|
6
6
|
utmEntity: {
|
|
7
7
|
utmSource: "",
|
|
@@ -17,32 +17,32 @@ const A = () => {
|
|
|
17
17
|
]
|
|
18
18
|
},
|
|
19
19
|
mergeTags: ["Tag1", "Tag2"],
|
|
20
|
-
|
|
20
|
+
forceAmp: !1,
|
|
21
21
|
resetDataSavedFlag: !1,
|
|
22
22
|
disableLineHeightsReplace: !0
|
|
23
23
|
}, ...t }, m = {
|
|
24
|
-
callback: (
|
|
25
|
-
|
|
26
|
-
html:
|
|
27
|
-
ampHtml:
|
|
28
|
-
ampErrors:
|
|
29
|
-
displayConditions:
|
|
24
|
+
callback: (o, p, d, c, u) => {
|
|
25
|
+
o ? i(o) : e({
|
|
26
|
+
html: p,
|
|
27
|
+
ampHtml: d,
|
|
28
|
+
ampErrors: c,
|
|
29
|
+
displayConditions: u
|
|
30
30
|
});
|
|
31
31
|
},
|
|
32
|
-
...
|
|
32
|
+
...n
|
|
33
33
|
};
|
|
34
34
|
window.StripoEditorApi.actionsApi.compileEmail(m);
|
|
35
35
|
});
|
|
36
36
|
return {
|
|
37
|
-
getCompiledEmail:
|
|
37
|
+
getCompiledEmail: s,
|
|
38
38
|
getTemplateData: () => new Promise((t) => {
|
|
39
|
-
const e = ({ html:
|
|
40
|
-
html:
|
|
41
|
-
css:
|
|
42
|
-
width:
|
|
39
|
+
const e = ({ html: i, css: a, width: n, height: r, utmParams: m, syncModulesIds: o }) => t({
|
|
40
|
+
html: i,
|
|
41
|
+
css: a,
|
|
42
|
+
width: n,
|
|
43
43
|
height: r,
|
|
44
44
|
utmParams: m,
|
|
45
|
-
syncModulesIds:
|
|
45
|
+
syncModulesIds: o
|
|
46
46
|
});
|
|
47
47
|
window.StripoEditorApi.actionsApi.getTemplateData(e);
|
|
48
48
|
}),
|
|
@@ -53,15 +53,15 @@ const A = () => {
|
|
|
53
53
|
try {
|
|
54
54
|
const {
|
|
55
55
|
html: e,
|
|
56
|
-
displayConditions:
|
|
57
|
-
ampHtml:
|
|
58
|
-
ampErrors:
|
|
59
|
-
} = await
|
|
56
|
+
displayConditions: i,
|
|
57
|
+
ampHtml: a = "",
|
|
58
|
+
ampErrors: n = []
|
|
59
|
+
} = await s({ minimize: !1, resetDataSavedFlag: !1, ...t });
|
|
60
60
|
return {
|
|
61
61
|
html: e,
|
|
62
|
-
ampHtml:
|
|
63
|
-
ampErrors:
|
|
64
|
-
displayConditions:
|
|
62
|
+
ampHtml: a,
|
|
63
|
+
ampErrors: n,
|
|
64
|
+
displayConditions: i
|
|
65
65
|
};
|
|
66
66
|
} catch (e) {
|
|
67
67
|
return l(e, "Error loading preview"), {
|
|
@@ -71,9 +71,26 @@ const A = () => {
|
|
|
71
71
|
displayConditions: []
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
+
},
|
|
75
|
+
updateTimerInClonedTemplate: () => new Promise((t) => {
|
|
76
|
+
var e, i;
|
|
77
|
+
if (typeof ((i = (e = window.StripoEditorApi) == null ? void 0 : e.actionsApi) == null ? void 0 : i.updateTimerInClonedTemplate) != "function") {
|
|
78
|
+
t(null);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
try {
|
|
82
|
+
window.StripoEditorApi.actionsApi.updateTimerInClonedTemplate((a, n) => {
|
|
83
|
+
a ? (l(a, "Failed to update timer in cloned template"), t(null)) : t(n || null);
|
|
84
|
+
});
|
|
85
|
+
} catch (a) {
|
|
86
|
+
l(a, "Failed to call updateTimerInClonedTemplate"), t(null);
|
|
87
|
+
}
|
|
88
|
+
}),
|
|
89
|
+
updateHtmlAndCss: (t, e) => {
|
|
90
|
+
window.StripoEditorApi.actionsApi.updateHtmlAndCss(t, e);
|
|
74
91
|
}
|
|
75
92
|
};
|
|
76
93
|
};
|
|
77
94
|
export {
|
|
78
|
-
|
|
95
|
+
S as useActionsApi
|
|
79
96
|
};
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { defaultHtmlCompilerRules as t } from "../config/compiler/htmlCompilerRules.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { itemsCompilerRules as p } from "../config/compiler/itemsCompilerRules.js";
|
|
3
|
+
import { outlookCompilerRules as s } from "../config/compiler/outlookCompilerRules.js";
|
|
4
|
+
import { recommendationCompilerRules as u } from "../config/compiler/recommendationCompilerRules.js";
|
|
5
|
+
import { socialCompilerRules as n } from "../config/compiler/socialCompilerRules.js";
|
|
6
|
+
import { unsubscribeCompilerRules as c } from "../config/compiler/unsubscribeCompilerRules.js";
|
|
7
|
+
import { createHtmlCompiler as f } from "../utils/htmlCompiler.js";
|
|
8
|
+
import { useConfig as R } from "./useConfig.js";
|
|
9
|
+
const x = () => {
|
|
10
|
+
const { config: e } = R(), m = e.htmlCompilerRules || [], l = [
|
|
10
11
|
...!!e.ignoreDefaultHtmlCompilerRules ? [] : t,
|
|
12
|
+
...u,
|
|
13
|
+
...c,
|
|
14
|
+
...p,
|
|
11
15
|
...s,
|
|
12
16
|
...n,
|
|
13
|
-
...
|
|
14
|
-
...u,
|
|
15
|
-
...l.map((o, i) => ({
|
|
17
|
+
...m.map((o, i) => ({
|
|
16
18
|
...o,
|
|
17
19
|
priority: o.priority + 1e3 + i
|
|
18
20
|
// Ensure additional rules run after default rules
|
|
19
21
|
}))
|
|
20
|
-
], r =
|
|
22
|
+
], r = f(l);
|
|
21
23
|
return { compileHtml: (o) => r.compile(o) };
|
|
22
24
|
};
|
|
23
25
|
export {
|
|
24
|
-
|
|
26
|
+
x as useHtmlCompiler
|
|
25
27
|
};
|