@useinsider/guido 1.0.2-beta.bfb23c2 → 1.0.2-beta.c3f86dc
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 +2 -40
- package/dist/@types/events.d.ts +0 -6
- package/dist/@types/generic.d.ts +0 -4
- package/dist/_virtual/AddCustomFont.js +4 -0
- package/dist/_virtual/AiAssistantValueType.js +4 -0
- package/dist/_virtual/BackgroundColorBuiltInControl.js +4 -0
- package/dist/_virtual/BackgroundImageBuiltInControl.js +4 -0
- package/dist/_virtual/Block.js +4 -0
- package/dist/_virtual/BlockAttributes.js +4 -0
- package/dist/_virtual/BlockCompositionType.js +4 -0
- package/dist/_virtual/BlockPaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/BlockRenderer.js +4 -0
- package/dist/_virtual/BlockType.js +4 -0
- package/dist/_virtual/BlocksPanel.js +4 -0
- package/dist/_virtual/BuiltInControl.js +4 -0
- package/dist/_virtual/BuiltInControlTypes.js +4 -0
- package/dist/_virtual/ButtonBorderBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonFontColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonTextBuiltInControl.js +4 -0
- package/dist/_virtual/ContextAction.js +4 -0
- package/dist/_virtual/ContextActionType.js +4 -0
- package/dist/_virtual/Control.js +4 -0
- package/dist/_virtual/EditorStatePropertyType.js +4 -0
- package/dist/_virtual/Extension.js +4 -0
- package/dist/_virtual/ExtensionBuilder.js +4 -0
- package/dist/_virtual/FontFamilyBuiltInControl.js +4 -0
- package/dist/_virtual/LinkColorBuiltInControl.js +4 -0
- package/dist/_virtual/ModificationDescription.js +4 -0
- package/dist/_virtual/PanelPosition.js +4 -0
- package/dist/_virtual/PreviewDeviceMode.js +4 -0
- package/dist/_virtual/SettingsPanelRegistry.js +4 -0
- package/dist/_virtual/SettingsPanelTab.js +4 -0
- package/dist/_virtual/SettingsTab.js +4 -0
- package/dist/_virtual/StructureBorderBuiltInControl.js +4 -0
- package/dist/_virtual/StructurePaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/TextColorBuiltInControl.js +4 -0
- package/dist/_virtual/TextLineSpacingBuiltInControl.js +4 -0
- package/dist/_virtual/TextSizeBuiltInControl.js +4 -0
- package/dist/_virtual/TextStyleBuiltInControl.js +4 -0
- package/dist/_virtual/UIElement.js +4 -0
- package/dist/_virtual/UIElementTagRegistry.js +4 -0
- package/dist/_virtual/UIElementType.js +4 -0
- package/dist/_virtual/UIElementsAttributes.js +4 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/components/Guido.vue.d.ts +1 -3
- package/dist/components/Guido.vue.js +5 -5
- package/dist/components/Guido.vue2.js +59 -73
- package/dist/components/organisms/LoadingWrapper.vue.js +1 -1
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +2 -3
- package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +1 -3
- package/dist/components/organisms/header/HeaderWrapper.vue.js +6 -6
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +9 -15
- package/dist/components/organisms/header/RightSlot.vue.d.ts +1 -3
- package/dist/components/organisms/header/RightSlot.vue.js +3 -5
- package/dist/components/organisms/header/RightSlot.vue2.js +27 -26
- package/dist/components/organisms/header/ViewOptions.vue.js +11 -11
- package/dist/components/organisms/header/ViewOptions.vue2.js +5 -5
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +11 -11
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +5 -5
- package/dist/composables/useCustomInterfaceAppearance.js +18 -22
- package/dist/composables/useHtmlCompiler.js +9 -17
- package/dist/composables/usePartner.d.ts +0 -1
- package/dist/composables/usePartner.js +9 -16
- package/dist/composables/useStripo.js +39 -49
- package/dist/composables/useToaster.js +17 -17
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -2
- package/dist/enums/defaults.d.ts +1 -6
- package/dist/enums/defaults.js +9 -45
- package/dist/extensions/DynamicContent/dynamic-content.js +27 -41
- package/dist/extensions/DynamicContent/extension.js +6 -18
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +48 -72
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +49 -74
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +38 -120
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +101 -116
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +11 -5
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +43 -22
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +17 -21
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +15 -8
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +29 -30
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +23 -19
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +19 -37
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +15 -2
- package/dist/static/styles/components/alert-message.css.js +2 -32
- package/dist/static/styles/components/button.css.js +2 -32
- package/dist/static/styles/components/wide-panel.css.js +1 -5
- package/dist/static/styles/customEditorStyle.css.js +0 -6
- package/dist/static/styles/variables.css.js +0 -10
- package/dist/stores/dynamic-content.d.ts +0 -12
- package/dist/stores/dynamic-content.js +6 -7
- package/dist/stores/editor.d.ts +0 -21
- package/dist/stores/editor.js +1 -2
- package/dist/utils/genericUtil.js +6 -9
- package/dist/utils/templatePreparation.js +14 -21
- package/package.json +3 -5
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/AMPOnboarding.vue.js +0 -20
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +0 -37
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +0 -83
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +0 -17
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +0 -30
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +0 -19
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +0 -43
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +0 -21
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +0 -74
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -2
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue.js +0 -20
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +0 -37
- package/dist/composables/useHtmlValidator.d.ts +0 -4
- package/dist/composables/useHtmlValidator.js +0 -148
- package/dist/composables/useRecommendation.d.ts +0 -19
- package/dist/composables/useRecommendation.js +0 -27
- package/dist/composables/useSave.d.ts +0 -4
- package/dist/composables/useSave.js +0 -15
- package/dist/composables/useStripoEventHandler.d.ts +0 -3
- package/dist/composables/useStripoEventHandler.js +0 -20
- package/dist/config/compiler/outlookCompilerRules.js +0 -36
- package/dist/config/compiler/recommendationCompilerRules.d.ts +0 -2
- package/dist/config/compiler/recommendationCompilerRules.js +0 -83
- package/dist/config/compiler/socialCompilerRules.d.ts +0 -2
- package/dist/config/compiler/socialCompilerRules.js +0 -21
- package/dist/config/compiler/unsubscribeCompilerRules.d.ts +0 -2
- package/dist/config/compiler/unsubscribeCompilerRules.js +0 -64
- package/dist/config/migrator/checkboxMigrator.d.ts +0 -1
- package/dist/config/migrator/checkboxMigrator.js +0 -83
- package/dist/config/migrator/index.d.ts +0 -1
- package/dist/config/migrator/index.js +0 -9
- package/dist/config/migrator/radioButtonMigrator.d.ts +0 -1
- package/dist/config/migrator/radioButtonMigrator.js +0 -86
- package/dist/enums/html-validator.d.ts +0 -6
- package/dist/enums/html-validator.js +0 -7
- package/dist/enums/onboarding.d.ts +0 -1
- package/dist/enums/onboarding.js +0 -8
- package/dist/enums/recommendation.d.ts +0 -54
- package/dist/enums/recommendation.js +0 -56
- package/dist/enums/unsubscribe.d.ts +0 -15
- package/dist/enums/unsubscribe.js +0 -17
- package/dist/extensions/Blocks/Checkbox/block.d.ts +0 -10
- package/dist/extensions/Blocks/Checkbox/block.js +0 -39
- package/dist/extensions/Blocks/Checkbox/control.d.ts +0 -22
- package/dist/extensions/Blocks/Checkbox/control.js +0 -104
- package/dist/extensions/Blocks/Checkbox/extension.d.ts +0 -2
- package/dist/extensions/Blocks/Checkbox/extension.js +0 -20
- package/dist/extensions/Blocks/Checkbox/settingsPanel.d.ts +0 -4
- package/dist/extensions/Blocks/Checkbox/settingsPanel.js +0 -38
- package/dist/extensions/Blocks/Checkbox/template.d.ts +0 -6
- package/dist/extensions/Blocks/Checkbox/template.js +0 -75
- package/dist/extensions/Blocks/RadioButton/block.d.ts +0 -10
- package/dist/extensions/Blocks/RadioButton/block.js +0 -39
- package/dist/extensions/Blocks/RadioButton/control.d.ts +0 -17
- package/dist/extensions/Blocks/RadioButton/control.js +0 -104
- package/dist/extensions/Blocks/RadioButton/extension.d.ts +0 -2
- package/dist/extensions/Blocks/RadioButton/extension.js +0 -20
- package/dist/extensions/Blocks/RadioButton/settingsPanel.d.ts +0 -4
- package/dist/extensions/Blocks/RadioButton/settingsPanel.js +0 -39
- package/dist/extensions/Blocks/RadioButton/template.d.ts +0 -6
- package/dist/extensions/Blocks/RadioButton/template.js +0 -160
- package/dist/extensions/Blocks/_Boilerplate/block.d.ts +0 -10
- package/dist/extensions/Blocks/_Boilerplate/control.d.ts +0 -17
- package/dist/extensions/Blocks/_Boilerplate/extension.d.ts +0 -2
- package/dist/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
- package/dist/extensions/Blocks/_Boilerplate/template.d.ts +0 -6
- package/dist/mock/api/unsubscribe.d.ts +0 -2
- package/dist/mock/api/user-modal-state.d.ts +0 -2
- package/dist/mock/api/validator.d.ts +0 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockName.js +0 -12
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/Popover.js +0 -12
- package/dist/services/onboardingApi.d.ts +0 -4
- package/dist/services/onboardingApi.js +0 -23
- package/dist/static/assets/onboarding-img.svg.js +0 -4
- package/dist/static/styles/components/notification.css.js +0 -55
- package/dist/static/styles/components/popup.css.js +0 -68
- package/dist/stores/onboarding.d.ts +0 -1068
- package/dist/stores/onboarding.js +0 -95
- package/dist/stores/recommendation.d.ts +0 -10
- package/dist/stores/recommendation.js +0 -9
- package/dist/stores/unsubscribe.d.ts +0 -8
- package/dist/stores/unsubscribe.js +0 -9
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import o from "./OnboardingWrapper.vue2.js";
|
|
2
|
-
import _ from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var s = function() {
|
|
4
|
-
var n = this, e = n._self._c, t = n._self._setupProxy;
|
|
5
|
-
return e("div", n._l(t.visibleOnboardings, function(r) {
|
|
6
|
-
return e(r.component, { key: r.type, tag: "component" });
|
|
7
|
-
}), 1);
|
|
8
|
-
}, a = [], p = /* @__PURE__ */ _(
|
|
9
|
-
o,
|
|
10
|
-
s,
|
|
11
|
-
a,
|
|
12
|
-
!1,
|
|
13
|
-
null,
|
|
14
|
-
null
|
|
15
|
-
);
|
|
16
|
-
const m = p.exports;
|
|
17
|
-
export {
|
|
18
|
-
m as default
|
|
19
|
-
};
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { defineComponent as g, computed as e, onMounted as b, watch as t } from "vue";
|
|
2
|
-
import { usePartner as O } from "../../../composables/usePartner.js";
|
|
3
|
-
import { useEditorStore as u } from "../../../stores/editor.js";
|
|
4
|
-
import { useOnboardingStore as v } from "../../../stores/onboarding.js";
|
|
5
|
-
import { usePreviewStore as l } from "../../../stores/preview.js";
|
|
6
|
-
import y from "./AMPOnboarding.vue.js";
|
|
7
|
-
import S from "./GenericOnboarding.vue.js";
|
|
8
|
-
import w from "./NewVersionPopup.vue.js";
|
|
9
|
-
import P from "./TextBlockOnboarding.vue.js";
|
|
10
|
-
import h from "./VersionHistoryOnboarding.vue.js";
|
|
11
|
-
const E = /* @__PURE__ */ g({
|
|
12
|
-
__name: "OnboardingWrapper",
|
|
13
|
-
setup(_) {
|
|
14
|
-
const o = v(), r = u(), s = l(), { isTestPartner: a } = O(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
|
|
15
|
-
{ type: "newVersionPopup", component: w },
|
|
16
|
-
{ type: "genericOnboarding", component: S },
|
|
17
|
-
{ type: "textBlockOnboarding", component: P },
|
|
18
|
-
{ type: "versionHistoryOnboarding", component: h },
|
|
19
|
-
{ type: "ampOnboarding", component: y }
|
|
20
|
-
], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), f = e(() => m.filter((n) => c(n.type)));
|
|
21
|
-
return b(async () => {
|
|
22
|
-
await o.fetchUserModalState();
|
|
23
|
-
}), t(
|
|
24
|
-
() => r.isVersionHistoryOpen,
|
|
25
|
-
(n, i) => {
|
|
26
|
-
n && !i && o.shouldShowOnboarding("versionHistoryOnboarding") && o.start("versionHistoryOnboarding"), !n && i && o.isActive("versionHistoryOnboarding") && o.close("versionHistoryOnboarding");
|
|
27
|
-
}
|
|
28
|
-
), t(
|
|
29
|
-
() => s.emailFormat,
|
|
30
|
-
(n, i) => {
|
|
31
|
-
i !== "AMP" && n === "AMP" && o.shouldShowOnboarding("ampOnboarding") && o.start("ampOnboarding");
|
|
32
|
-
}
|
|
33
|
-
), t(
|
|
34
|
-
() => r.isPreviewModeOpen,
|
|
35
|
-
(n) => {
|
|
36
|
-
!n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
|
|
37
|
-
}
|
|
38
|
-
), { __sfc: !0, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: f };
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
export {
|
|
42
|
-
E as default
|
|
43
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import l from "./TextBlockOnboarding.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import d from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var g = function() {
|
|
5
|
-
var e, n, r, i, a, s;
|
|
6
|
-
var t = this, c = t._self._c, o = t._self._setupProxy;
|
|
7
|
-
return o.isVisible ? c(o.InOnboard, { key: "guido__text-block-onboard", staticClass: "w-21-s p-a z-11", class: (e = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : e.classes, attrs: { id: "guido__text-block-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (n = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : n.bottom, "left-position": (r = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : r.left, "pages-config": o.onboardingStore.onboardings.textBlockOnboarding.config, "pointer-position": (i = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : i.position, "right-position": (a = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : a.right, "top-position": (s = o.onboardingStore.getTextBlockCurrentCard) == null ? void 0 : s.top }, on: { backButtonClick: o.handleBack, close: function(u) {
|
|
8
|
-
return o.onboardingStore.close("textBlockOnboarding");
|
|
9
|
-
}, nextButtonClick: o.handleNext } }) : t._e();
|
|
10
|
-
}, b = [], p = /* @__PURE__ */ d(
|
|
11
|
-
l,
|
|
12
|
-
g,
|
|
13
|
-
b,
|
|
14
|
-
!1,
|
|
15
|
-
null,
|
|
16
|
-
"a408dcea"
|
|
17
|
-
);
|
|
18
|
-
const f = p.exports;
|
|
19
|
-
export {
|
|
20
|
-
f as default
|
|
21
|
-
};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { defineComponent as u, computed as a, watch as b } from "vue";
|
|
2
|
-
import { useTranslations as m } from "../../../composables/useTranslations.js";
|
|
3
|
-
import { useOnboardingStore as k } from "../../../stores/onboarding.js";
|
|
4
|
-
import { InOnboard as B } from "@useinsider/design-system-vue";
|
|
5
|
-
const y = /* @__PURE__ */ u({
|
|
6
|
-
__name: "TextBlockOnboarding",
|
|
7
|
-
setup(h) {
|
|
8
|
-
const i = m(), o = k(), e = a(() => {
|
|
9
|
-
const n = window.innerHeight - 128, r = Math.max(90, n * 0.15), s = Math.max(490, n * 0.71), d = 200, g = 40;
|
|
10
|
-
return {
|
|
11
|
-
settings: {
|
|
12
|
-
top: `${r}px`,
|
|
13
|
-
position: r + d + g > n ? "Right Bottom" : "Right Top"
|
|
14
|
-
},
|
|
15
|
-
dynamic: {
|
|
16
|
-
top: `${s}px`,
|
|
17
|
-
position: s + d + g > n ? "Right Bottom" : "Right Top"
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
}), c = a(() => [
|
|
21
|
-
{
|
|
22
|
-
classes: "guido-text-block-onboarding-settings",
|
|
23
|
-
right: "450px",
|
|
24
|
-
top: e.value.settings.top,
|
|
25
|
-
position: e.value.settings.position,
|
|
26
|
-
title: i("email-editor.onboarding-text-block-title"),
|
|
27
|
-
description: i("email-editor.onboarding-text-block-description"),
|
|
28
|
-
imageSource: "",
|
|
29
|
-
backButtonClick: () => {
|
|
30
|
-
},
|
|
31
|
-
nextButtonType: "text",
|
|
32
|
-
nextButtonText: i("products.next"),
|
|
33
|
-
nextButtonClick: () => {
|
|
34
|
-
o.next("textBlockOnboarding");
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
classes: "guido-text-block-onboarding-dynamic",
|
|
39
|
-
right: "450px",
|
|
40
|
-
top: e.value.dynamic.top,
|
|
41
|
-
position: e.value.dynamic.position,
|
|
42
|
-
title: i("email-editor.onboarding-dynamic-content-title"),
|
|
43
|
-
description: i("email-editor.onboarding-dynamic-content-description"),
|
|
44
|
-
imageSource: "",
|
|
45
|
-
backButtonType: "text",
|
|
46
|
-
backButtonText: i("ds-steps.back"),
|
|
47
|
-
backButtonClick: () => {
|
|
48
|
-
o.previous("textBlockOnboarding");
|
|
49
|
-
},
|
|
50
|
-
nextButtonType: "text",
|
|
51
|
-
nextButtonText: i("action-builder.ok"),
|
|
52
|
-
nextButtonClick: () => {
|
|
53
|
-
o.close("textBlockOnboarding");
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
]), l = a(() => o.onboardings.textBlockOnboarding.config.length > 0 && o.onboardings.textBlockOnboarding.isActive), p = () => {
|
|
57
|
-
var t, n;
|
|
58
|
-
(n = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.nextButtonClick) == null || n.call(t);
|
|
59
|
-
}, x = () => {
|
|
60
|
-
var t, n;
|
|
61
|
-
(n = (t = o.getTextBlockCurrentCard) == null ? void 0 : t.backButtonClick) == null || n.call(t);
|
|
62
|
-
};
|
|
63
|
-
return b(
|
|
64
|
-
() => o.isActive("textBlockOnboarding"),
|
|
65
|
-
(t) => {
|
|
66
|
-
t && o.setConfig("textBlockOnboarding", c.value);
|
|
67
|
-
},
|
|
68
|
-
{ immediate: !0 }
|
|
69
|
-
), { __sfc: !0, trans: i, onboardingStore: o, dynamicPosition: e, onboardingCardsConfig: c, isVisible: l, handleNext: p, handleBack: x, InOnboard: B };
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
export {
|
|
73
|
-
y as default
|
|
74
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import g from "./VersionHistoryOnboarding.vue2.js";
|
|
2
|
-
import l from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var c = function() {
|
|
4
|
-
var n, t, i, e, s, a;
|
|
5
|
-
var r = this, d = r._self._c, o = r._self._setupProxy;
|
|
6
|
-
return o.isVisible ? d(o.InOnboard, { key: "guido__version-history-onboard", staticClass: "w-21-s p-a z-11", class: (n = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : n.classes, attrs: { id: "guido__version-history-onboard", "is-multiple-page": "", visible: "", "image-source": "", title: "", "bottom-position": (t = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : t.bottom, "left-position": (i = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : i.left, "pages-config": o.onboardingStore.onboardings.versionHistoryOnboarding.config, "pointer-position": (e = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : e.position, "right-position": (s = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : s.right, "top-position": (a = o.onboardingStore.getVersionHistoryCurrentCard) == null ? void 0 : a.top }, on: { backButtonClick: o.handleBack, close: function(b) {
|
|
7
|
-
return o.onboardingStore.close("versionHistoryOnboarding");
|
|
8
|
-
}, nextButtonClick: o.handleNext } }) : r._e();
|
|
9
|
-
}, _ = [], p = /* @__PURE__ */ l(
|
|
10
|
-
g,
|
|
11
|
-
c,
|
|
12
|
-
_,
|
|
13
|
-
!1,
|
|
14
|
-
null,
|
|
15
|
-
null
|
|
16
|
-
);
|
|
17
|
-
const m = p.exports;
|
|
18
|
-
export {
|
|
19
|
-
m as default
|
|
20
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { defineComponent as c, computed as e, watch as g } from "vue";
|
|
2
|
-
import { useTranslations as b } from "../../../composables/useTranslations.js";
|
|
3
|
-
import { useOnboardingStore as u } from "../../../stores/onboarding.js";
|
|
4
|
-
import { InOnboard as l } from "@useinsider/design-system-vue";
|
|
5
|
-
const C = /* @__PURE__ */ c({
|
|
6
|
-
__name: "VersionHistoryOnboarding",
|
|
7
|
-
setup(p) {
|
|
8
|
-
const t = b(), n = u(), r = e(() => [
|
|
9
|
-
{
|
|
10
|
-
classes: "guido-version-history-onboarding",
|
|
11
|
-
left: "409px",
|
|
12
|
-
top: "192px",
|
|
13
|
-
position: "Left Top",
|
|
14
|
-
title: t("email-editor.onboarding-version-history-title"),
|
|
15
|
-
description: t("email-editor.onboarding-version-history-description"),
|
|
16
|
-
imageSource: "",
|
|
17
|
-
backButtonClick: () => {
|
|
18
|
-
},
|
|
19
|
-
nextButtonType: "text",
|
|
20
|
-
nextButtonText: t("action-builder.ok"),
|
|
21
|
-
nextButtonClick: () => void n.close("versionHistoryOnboarding")
|
|
22
|
-
}
|
|
23
|
-
]), s = e(() => n.onboardings.versionHistoryOnboarding.config.length > 0 && n.onboardings.versionHistoryOnboarding.isActive), a = () => {
|
|
24
|
-
var o, i;
|
|
25
|
-
(i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.nextButtonClick) == null || i.call(o);
|
|
26
|
-
}, d = () => {
|
|
27
|
-
var o, i;
|
|
28
|
-
(i = (o = n.getVersionHistoryCurrentCard) == null ? void 0 : o.backButtonClick) == null || i.call(o);
|
|
29
|
-
};
|
|
30
|
-
return g(() => n.onboardings.versionHistoryOnboarding.isActive, (o) => {
|
|
31
|
-
o && n.setConfig("versionHistoryOnboarding", r.value);
|
|
32
|
-
}, { immediate: !0 }), { __sfc: !0, trans: t, onboardingStore: n, onboardingCardsConfig: r, isVisible: s, handleNext: a, handleBack: d, InOnboard: l };
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
export {
|
|
36
|
-
C as default
|
|
37
|
-
};
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
import { useConfig as H } from "./useConfig.js";
|
|
2
|
-
import { TemplateTypes as V } from "../enums/defaults.js";
|
|
3
|
-
import { DISPLAY_CONDITIONS_REGEX as D, DISPLAY_CONDITIONS_EXCEPTIONS_REGEX as P, CampaignCouldNotBeSavedKey as R, CanNotMakeAnyChangesForRunningKey as _ } from "../enums/html-validator.js";
|
|
4
|
-
import { ToasterTypeOptions as l } from "../enums/toaster.js";
|
|
5
|
-
import { useRecommendationStore as G } from "../stores/recommendation.js";
|
|
6
|
-
import { base64EncodeWithSpecialChars as $ } from "../utils/base64.js";
|
|
7
|
-
import { useHttp as j } from "./useHttp.js";
|
|
8
|
-
import { useToaster as q } from "./useToaster.js";
|
|
9
|
-
import { useTranslations as M } from "./useTranslations.js";
|
|
10
|
-
const se = () => {
|
|
11
|
-
var d;
|
|
12
|
-
const { showToaster: c } = q(), { post: y } = j(), { config: h } = H(), a = M(), m = G(), u = ((d = h.partner) == null ? void 0 : d.messageType) === V.transactional, v = async (e) => {
|
|
13
|
-
const t = await y(
|
|
14
|
-
"/newsletter/template-library/check-template-html-body",
|
|
15
|
-
{ html: $(e) }
|
|
16
|
-
), { status: n, message: r } = t.data;
|
|
17
|
-
return n || c({
|
|
18
|
-
type: l.Alert,
|
|
19
|
-
message: n === void 0 ? r : a("newsletter.invalid-url-link-for-toaster")
|
|
20
|
-
}), a(R), r === a(_) && c({
|
|
21
|
-
type: l.Alert,
|
|
22
|
-
message: a("newsletter.already-in-progress")
|
|
23
|
-
}), n;
|
|
24
|
-
}, C = (e) => !["if", "endif", "else", "elif", "now"].includes(e.toLowerCase()), w = (e) => ["if", "endif"].includes(e.toLowerCase()), S = (e, s) => {
|
|
25
|
-
const t = e.match(/({%(.*?)%})/g);
|
|
26
|
-
let n = !0;
|
|
27
|
-
return t !== null && !u && t.forEach((r) => {
|
|
28
|
-
const o = r.slice(2, -2).trim().match(/(".*?"|[^"\s]+)(?=\s*|\s*$)/g);
|
|
29
|
-
if (o && o.length > 0) {
|
|
30
|
-
const [i] = o;
|
|
31
|
-
C(i) && !s.includes(i) && (c({
|
|
32
|
-
type: l.Warning,
|
|
33
|
-
message: a("custom-fields.invalid-custom-fields")
|
|
34
|
-
}), n = !1);
|
|
35
|
-
}
|
|
36
|
-
}), n;
|
|
37
|
-
}, b = async (e, s, t) => {
|
|
38
|
-
const n = t ? await v(e) : !0;
|
|
39
|
-
return S(e, s) && n;
|
|
40
|
-
}, E = (e) => e.length > 0 ? !0 : (c({
|
|
41
|
-
type: l.Warning,
|
|
42
|
-
message: a("newsletter.html-content-is-empty")
|
|
43
|
-
}), !1), A = (e) => {
|
|
44
|
-
const s = (e.match(/{/gm) || []).length, t = (e.match(/}/gm) || []).length;
|
|
45
|
-
return s > t && c({
|
|
46
|
-
type: l.Warning,
|
|
47
|
-
message: a("custom-fields.missing-closing-braces")
|
|
48
|
-
}), s < t && c({
|
|
49
|
-
type: l.Warning,
|
|
50
|
-
message: a("custom-fields.missing-opening-braces")
|
|
51
|
-
}), s === t;
|
|
52
|
-
}, x = (e) => {
|
|
53
|
-
const s = e.match(/{{\s*(\w+\s+((\w+\|\w+)|(\w+)))\s*}}/gm) === null;
|
|
54
|
-
return s || c({
|
|
55
|
-
type: l.Warning,
|
|
56
|
-
message: a("custom-fields.invalid-custom-fields")
|
|
57
|
-
}), s;
|
|
58
|
-
}, k = (e, s) => {
|
|
59
|
-
const t = e.match(/{{([a-zA-Z0-9_\s]*)}}/gm);
|
|
60
|
-
if (t && !u) {
|
|
61
|
-
const n = new Set(s.map((o) => o.toLowerCase())), r = [];
|
|
62
|
-
if (t.forEach((o) => {
|
|
63
|
-
const i = o.slice(2, -2).trim().toLowerCase();
|
|
64
|
-
(!n.has(i) || i === "") && r.push(i);
|
|
65
|
-
}), r.length > 0) {
|
|
66
|
-
const o = `
|
|
67
|
-
<ul>
|
|
68
|
-
${r.map((i) => `<li>${i}</li>`).join("")}
|
|
69
|
-
</ul>
|
|
70
|
-
`;
|
|
71
|
-
return c({
|
|
72
|
-
type: l.Alert,
|
|
73
|
-
message: a("custom-fields.invalid-custom-fields") + o
|
|
74
|
-
}), !1;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
return !0;
|
|
78
|
-
}, T = (e) => {
|
|
79
|
-
const s = e.match(/{%(.*?)%}/g), t = [];
|
|
80
|
-
let n = !0;
|
|
81
|
-
if (s && s.forEach((r) => {
|
|
82
|
-
const o = r.match(D), i = r.match(P), B = (o == null ? void 0 : o.join("")) || "";
|
|
83
|
-
(!o || r !== B) && !i && (c({
|
|
84
|
-
type: l.Alert,
|
|
85
|
-
message: a("newsletter.display-conditions-invalid-syntax")
|
|
86
|
-
}), n = !1), o && o.forEach((f) => {
|
|
87
|
-
f.trim() === "=" && (c({
|
|
88
|
-
type: l.Alert,
|
|
89
|
-
message: a("custom-conditions.wrong-equality-operators")
|
|
90
|
-
}), n = !1);
|
|
91
|
-
const g = f.match(/^[a-zA-Z]*$/g);
|
|
92
|
-
g && g.forEach((p) => {
|
|
93
|
-
w(p) && t.push(p);
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
}), t.length) {
|
|
97
|
-
const r = t.filter((i) => i === "if"), o = t.filter((i) => i === "endif");
|
|
98
|
-
r.length !== o.length && (c({
|
|
99
|
-
type: l.Alert,
|
|
100
|
-
message: a("custom-conditions.missing-if-endif-tag")
|
|
101
|
-
}), n = !1);
|
|
102
|
-
}
|
|
103
|
-
return n;
|
|
104
|
-
}, F = (e) => {
|
|
105
|
-
const s = (e.match(/{% /gm) || []).length, t = (e.match(/ %}/gm) || []).length, n = s === t;
|
|
106
|
-
return n || c({
|
|
107
|
-
type: l.Warning,
|
|
108
|
-
message: a("custom-conditions.no-space-after-braces")
|
|
109
|
-
}), n;
|
|
110
|
-
}, I = (e) => (e.match(/({%(.*?)%})/g) || []).filter((t) => t.includes("if")).map((t) => (t.match(/{{.*}}/gm) || []).length).reduce((t, n) => t + n, 0) > 0 ? (c({
|
|
111
|
-
type: l.Warning,
|
|
112
|
-
message: a("custom-conditions.no-braces-inside-if-tag")
|
|
113
|
-
}), !1) : !0, W = () => m.recommendationConfigs && Object.values(m.recommendationConfigs).find((s) => s.filters.find((t) => t.value === "")) !== void 0 ? (c({
|
|
114
|
-
type: l.Alert,
|
|
115
|
-
message: a("newsletter.fill-all-necessary-fields")
|
|
116
|
-
}), !1) : !0, L = (e) => {
|
|
117
|
-
const s = /src="[^"]*\.(svg|pst)"/gm;
|
|
118
|
-
return e.match(s) === null ? !0 : (c({
|
|
119
|
-
type: l.Alert,
|
|
120
|
-
message: a("newsletter.invalid-image-type")
|
|
121
|
-
}), !1);
|
|
122
|
-
}, N = (e) => {
|
|
123
|
-
const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".checkbox-block-v2");
|
|
124
|
-
return Array.from(n).find((o) => {
|
|
125
|
-
var i;
|
|
126
|
-
return !((i = o.id) != null && i.trim());
|
|
127
|
-
}) ? (c({
|
|
128
|
-
type: l.Alert,
|
|
129
|
-
message: a("unsubscribe-templates.select-checkbox-groups")
|
|
130
|
-
}), !1) : !0;
|
|
131
|
-
}, O = (e) => {
|
|
132
|
-
const n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(".radio-button-v2");
|
|
133
|
-
return Array.from(n).find((o) => {
|
|
134
|
-
var i;
|
|
135
|
-
return !((i = o.id) != null && i.trim());
|
|
136
|
-
}) ? (c({
|
|
137
|
-
type: l.Alert,
|
|
138
|
-
message: a("unsubscribe-templates.select-radio-button-groups")
|
|
139
|
-
}), !1) : !0;
|
|
140
|
-
};
|
|
141
|
-
return { validateHtml: async (e, s, t = !1) => {
|
|
142
|
-
const n = s.map((o) => o.value);
|
|
143
|
-
return await b(e, n, t) && E(e) && A(e) && x(e) && k(e, n) && T(e) && F(e) && I(e) && W() && L(e) && N(e) && O(e);
|
|
144
|
-
} };
|
|
145
|
-
};
|
|
146
|
-
export {
|
|
147
|
-
se as useHtmlValidator
|
|
148
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
type CardWidthParams = {
|
|
2
|
-
mobileLeftPadding: number;
|
|
3
|
-
mobileRightPadding: number;
|
|
4
|
-
cardsInRow: number;
|
|
5
|
-
unresponsive: boolean;
|
|
6
|
-
};
|
|
7
|
-
interface CampaignData extends CardWidthParams {
|
|
8
|
-
textTrimming: boolean;
|
|
9
|
-
orientation: string;
|
|
10
|
-
priceBeforeTextValue: string;
|
|
11
|
-
priceAfterTextValue: string;
|
|
12
|
-
discountBeforeTextValue: string;
|
|
13
|
-
discountAfterTextValue: string;
|
|
14
|
-
}
|
|
15
|
-
export declare const useRecommendation: () => {
|
|
16
|
-
calculateCardWidth: ({ mobileLeftPadding, mobileRightPadding, cardsInRow, unresponsive, }: CardWidthParams) => number;
|
|
17
|
-
getRecommendationCampaignData: (id: string) => CampaignData;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { MinDeviceViewport as r, DefaultPadding as c } from "../enums/recommendation.js";
|
|
2
|
-
const m = () => ({
|
|
3
|
-
calculateCardWidth: ({
|
|
4
|
-
mobileLeftPadding: e,
|
|
5
|
-
mobileRightPadding: a,
|
|
6
|
-
cardsInRow: n,
|
|
7
|
-
unresponsive: i
|
|
8
|
-
}) => {
|
|
9
|
-
const t = i ? n : 1, o = e + a + (t - 1) * c;
|
|
10
|
-
return (r - o) / t;
|
|
11
|
-
},
|
|
12
|
-
getRecommendationCampaignData: (e) => (console.debug(e), {
|
|
13
|
-
textTrimming: !1,
|
|
14
|
-
orientation: "vertical",
|
|
15
|
-
mobileLeftPadding: 0,
|
|
16
|
-
mobileRightPadding: 0,
|
|
17
|
-
cardsInRow: 2,
|
|
18
|
-
unresponsive: !1,
|
|
19
|
-
priceBeforeTextValue: "",
|
|
20
|
-
priceAfterTextValue: "",
|
|
21
|
-
discountBeforeTextValue: "",
|
|
22
|
-
discountAfterTextValue: ""
|
|
23
|
-
})
|
|
24
|
-
});
|
|
25
|
-
export {
|
|
26
|
-
m as useRecommendation
|
|
27
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { useSaveStart as i, useSaveComplete as m } from "./useGuidoActions.js";
|
|
2
|
-
import { useTemplatePreparation as n } from "../utils/templatePreparation.js";
|
|
3
|
-
import { useHtmlValidator as l } from "./useHtmlValidator.js";
|
|
4
|
-
const f = () => {
|
|
5
|
-
const e = i(), a = m(), { validateHtml: s } = l();
|
|
6
|
-
return { save: async (o = !1) => {
|
|
7
|
-
e();
|
|
8
|
-
const { prepareTemplateDetails: r } = n(), t = await r();
|
|
9
|
-
if (await s(t.compiledHtml, t.dynamicContentList, !0))
|
|
10
|
-
return o || a(t), t;
|
|
11
|
-
} };
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
f as useSave
|
|
15
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { useOnboardingStore as i } from "../stores/onboarding.js";
|
|
2
|
-
const c = () => {
|
|
3
|
-
const e = {
|
|
4
|
-
block_dropped: ({ blockName: t }) => {
|
|
5
|
-
if (t === "BLOCK_TEXT") {
|
|
6
|
-
const n = i(), o = !n.shouldShowOnboarding("textBlockOnboarding"), r = n.isActive("textBlockOnboarding");
|
|
7
|
-
if (o || r)
|
|
8
|
-
return;
|
|
9
|
-
n.start("textBlockOnboarding");
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
return { handleEvent: async (t, n) => {
|
|
14
|
-
const o = e[t];
|
|
15
|
-
o && await o(n);
|
|
16
|
-
} };
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
c as useStripoEventHandler
|
|
20
|
-
};
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,83 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
-
};
|