@useinsider/guido 1.0.3-beta.e1adf59 → 1.0.3-beta.e517316
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/{src/@types → @types}/generic.d.ts +0 -9
- package/dist/{src/components → components}/Guido.vue.d.ts +2 -3
- package/dist/components/Guido.vue.js +5 -5
- package/dist/components/Guido.vue2.js +71 -99
- package/dist/{src/components → components}/wrappers/WpDrawer.vue.d.ts +4 -6
- package/dist/components/wrappers/WpDrawer.vue.js +4 -6
- package/dist/composables/useHttp.js +52 -89
- package/dist/composables/useStripo.js +63 -158
- package/dist/config/compiler/unsubscribeCompilerRules.js +29 -42
- package/dist/config/migrator/index.d.ts +1 -0
- package/dist/config/migrator/index.js +6 -7
- package/dist/enums/defaults.js +3 -6
- package/dist/enums/unsubscribe.d.ts +15 -0
- package/dist/enums/unsubscribe.js +6 -43
- package/dist/extensions/Blocks/Checkbox/control.js +53 -55
- package/dist/extensions/Blocks/RadioButton/control.js +42 -44
- package/dist/extensions/Blocks/Recommendation/block.js +1 -1
- package/dist/{src/extensions → extensions}/Blocks/Recommendation/control.d.ts +1 -2
- package/dist/extensions/Blocks/Recommendation/control.js +77 -91
- package/dist/{src/extensions → extensions}/Blocks/Recommendation/store/recommendation.d.ts +0 -8
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +15 -16
- package/dist/extensions/Blocks/Recommendation/template.js +26 -194
- package/dist/guido.css +1 -1
- package/dist/services/stripoApi.js +19 -49
- package/dist/stores/unsubscribe.d.ts +8 -0
- package/dist/stores/unsubscribe.js +6 -126
- package/dist/utils/templatePreparation.js +16 -17
- package/package.json +1 -6
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +0 -16
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue.js +0 -24
- package/dist/components/organisms/unsubscribe/UnsubscribePageSelection.vue2.js +0 -64
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +0 -107
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +0 -18
- package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue2.js +0 -12
- package/dist/composables/useApiErrorTracking.js +0 -120
- package/dist/composables/useErrorTracking.js +0 -98
- package/dist/composables/useStripoErrorCategory.js +0 -86
- package/dist/composables/useStripoSlackNotifier.js +0 -47
- package/dist/config/migrator/unsubscribeMigrator.js +0 -124
- package/dist/extensions/Blocks/Unsubscribe/block.js +0 -131
- package/dist/extensions/Blocks/Unsubscribe/control.js +0 -167
- package/dist/extensions/Blocks/Unsubscribe/elements/preview.js +0 -42
- package/dist/extensions/Blocks/Unsubscribe/extension.js +0 -21
- package/dist/extensions/Blocks/Unsubscribe/iconsRegistry.js +0 -21
- package/dist/extensions/Blocks/Unsubscribe/settingsPanel.js +0 -35
- package/dist/extensions/Blocks/Unsubscribe/styles.css.js +0 -42
- package/dist/extensions/Blocks/Unsubscribe/tagRegistry.js +0 -10
- package/dist/extensions/Blocks/Unsubscribe/template.js +0 -22
- package/dist/extensions/Blocks/Unsubscribe/utils/constants.js +0 -11
- package/dist/extensions/Blocks/Unsubscribe/utils/utils.js +0 -6
- package/dist/package.json.js +0 -7
- package/dist/services/slackNotificationService.js +0 -167
- package/dist/services/stripoErrorDeduplicationService.js +0 -91
- package/dist/services/unsubscribeApi.js +0 -16
- package/dist/src/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -2
- package/dist/src/components/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -2
- package/dist/src/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -2
- package/dist/src/components/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -2
- package/dist/src/composables/useApiErrorTracking.d.ts +0 -26
- package/dist/src/composables/useErrorTracking.d.ts +0 -30
- package/dist/src/composables/useStripoErrorCategory.d.ts +0 -26
- package/dist/src/composables/useStripoSlackNotifier.d.ts +0 -8
- package/dist/src/config/migrator/index.d.ts +0 -1
- package/dist/src/config/migrator/unsubscribeMigrator.d.ts +0 -1
- package/dist/src/enums/unsubscribe.d.ts +0 -38
- package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +0 -32
- package/dist/src/extensions/Blocks/Unsubscribe/control.d.ts +0 -29
- package/dist/src/extensions/Blocks/Unsubscribe/elements/preview.d.ts +0 -11
- package/dist/src/extensions/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/Unsubscribe/tagRegistry.d.ts +0 -4
- package/dist/src/extensions/Blocks/Unsubscribe/template.d.ts +0 -12
- package/dist/src/extensions/Blocks/Unsubscribe/utils/constants.d.ts +0 -9
- package/dist/src/extensions/Blocks/Unsubscribe/utils/utils.d.ts +0 -7
- package/dist/src/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +0 -4
- package/dist/src/extensions/DynamicContent/extension.d.ts +0 -2
- package/dist/src/services/slackNotificationService.d.ts +0 -110
- package/dist/src/services/stripoErrorDeduplicationService.d.ts +0 -75
- package/dist/src/services/unsubscribeApi.d.ts +0 -4
- package/dist/src/stores/config.d.ts +0 -96
- package/dist/src/stores/unsubscribe.d.ts +0 -256
- package/dist/stores/config.js +0 -17
- /package/dist/{src/@types → @types}/events.d.ts +0 -0
- /package/dist/{src/@types → @types}/save-as-template.d.ts +0 -0
- /package/dist/{src/App.vue.d.ts → App.vue.d.ts} +0 -0
- /package/dist/{src/components → components}/organisms/LoadingWrapper.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/base/Toaster.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/extensions/recommendation/Filters.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/header/LeftSlot.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/header/MiddleSlot.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/header/RightSlot.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/header/ViewOptions.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/onboarding/NewVersionPopup.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/onboarding/OnboardingWrapper.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/onboarding/TextBlockOnboarding.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/onboarding/VersionHistoryOnboarding.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -0
- /package/dist/{src/components → components}/wrappers/WpModal.vue.d.ts +0 -0
- /package/dist/{src/composables → composables}/useActionsApi.d.ts +0 -0
- /package/dist/{src/composables → composables}/useApiExample.d.ts +0 -0
- /package/dist/{src/composables → composables}/useCodeEditorApi.d.ts +0 -0
- /package/dist/{src/composables → composables}/useConfig.d.ts +0 -0
- /package/dist/{src/composables → composables}/useCustomInterfaceAppearance.d.ts +0 -0
- /package/dist/{src/composables → composables}/useDebounce.d.ts +0 -0
- /package/dist/{src/composables → composables}/useExport.d.ts +0 -0
- /package/dist/{src/composables → composables}/useGuidoActions.d.ts +0 -0
- /package/dist/{src/composables → composables}/useHtmlCompiler.d.ts +0 -0
- /package/dist/{src/composables → composables}/useHtmlValidator.d.ts +0 -0
- /package/dist/{src/composables → composables}/useHttp.d.ts +0 -0
- /package/dist/{src/composables → composables}/usePartner.d.ts +0 -0
- /package/dist/{src/composables → composables}/usePreviewMode.d.ts +0 -0
- /package/dist/{src/composables → composables}/useProvideInject.d.ts +0 -0
- /package/dist/{src/composables → composables}/useRecommendation.d.ts +0 -0
- /package/dist/{src/composables → composables}/useResponsivePreview.d.ts +0 -0
- /package/dist/{src/composables → composables}/useSave.d.ts +0 -0
- /package/dist/{src/composables → composables}/useStripo.d.ts +0 -0
- /package/dist/{src/composables → composables}/useStripoEventHandler.d.ts +0 -0
- /package/dist/{src/composables → composables}/useToaster.d.ts +0 -0
- /package/dist/{src/composables → composables}/useTranslations.d.ts +0 -0
- /package/dist/{src/composables → composables}/useValidation.d.ts +0 -0
- /package/dist/{src/composables → composables}/useVersionHistoryApi.d.ts +0 -0
- /package/dist/{src/composables → composables}/validators/saveAsTemplate.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/htmlCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/outlookCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/recommendationCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/socialCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/checkboxMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/couponBlockMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/radioButtonMigrator.d.ts +0 -0
- /package/dist/{src/enums → enums}/defaults.d.ts +0 -0
- /package/dist/{src/enums → enums}/displayConditions.d.ts +0 -0
- /package/dist/{src/enums → enums}/extensions/recommendationBlock.d.ts +0 -0
- /package/dist/{src/enums → enums}/html-validator.d.ts +0 -0
- /package/dist/{src/enums → enums}/onboarding.d.ts +0 -0
- /package/dist/{src/enums → enums}/preview.d.ts +0 -0
- /package/dist/{src/enums → enums}/recommendation.d.ts +0 -0
- /package/dist/{src/enums → enums}/toaster.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/block.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/control.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/block.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/block.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/control.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/block.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/filterUtil.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/block.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/control.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/Unsubscribe → extensions/Blocks/_Boilerplate}/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/Unsubscribe → extensions/Blocks/_Boilerplate}/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/common-control.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content-modal.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/DynamicContent/dynamic-content.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/_Boilerplate → extensions/DynamicContent}/extension.d.ts +0 -0
- /package/dist/{src/library.d.ts → library.d.ts} +0 -0
- /package/dist/{src/main.d.ts → main.d.ts} +0 -0
- /package/dist/{src/mock → mock}/api/auth.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/custom-fonts.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/default-template.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/recommendation.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/template-library.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/unsubscribe.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/user-modal-state.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/validator.d.ts +0 -0
- /package/dist/{src/mock → mock}/browser.d.ts +0 -0
- /package/dist/{src/mock → mock}/handlers.d.ts +0 -0
- /package/dist/{src/services → services}/onboardingApi.d.ts +0 -0
- /package/dist/{src/services → services}/recommendationApi.d.ts +0 -0
- /package/dist/{src/services → services}/stripoApi.d.ts +0 -0
- /package/dist/{src/services → services}/templateLibraryApi.d.ts +0 -0
- /package/dist/{src/stores → stores}/dynamic-content.d.ts +0 -0
- /package/dist/{src/stores → stores}/editor.d.ts +0 -0
- /package/dist/{src/stores → stores}/onboarding.d.ts +0 -0
- /package/dist/{src/stores → stores}/preview.d.ts +0 -0
- /package/dist/{src/stores → stores}/recommendation.d.ts +0 -0
- /package/dist/{src/stores → stores}/save-as-template.d.ts +0 -0
- /package/dist/{src/stores → stores}/toaster.d.ts +0 -0
- /package/dist/{src/stores → stores}/version-history.d.ts +0 -0
- /package/dist/{src/utils → utils}/arrayUtil.d.ts +0 -0
- /package/dist/{src/utils → utils}/base64.d.ts +0 -0
- /package/dist/{src/utils → utils}/dateUtil.d.ts +0 -0
- /package/dist/{src/utils → utils}/genericUtil.d.ts +0 -0
- /package/dist/{src/utils → utils}/htmlCompiler.d.ts +0 -0
- /package/dist/{src/utils → utils}/templatePreparation.d.ts +0 -0
- /package/dist/{src/utils → utils}/tooltipUtils.d.ts +0 -0
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import type { CompilerRule } from './html-compiler';
|
|
2
|
-
type Extensions = {
|
|
3
|
-
unsubscribe?: boolean;
|
|
4
|
-
};
|
|
5
2
|
type Features = {
|
|
6
3
|
dynamicContent?: boolean;
|
|
7
4
|
saveAsTemplate?: boolean;
|
|
@@ -19,14 +16,8 @@ export type GuidoConfig = {
|
|
|
19
16
|
useHeader?: boolean;
|
|
20
17
|
emailHeader: EmailHeader;
|
|
21
18
|
partner?: Partner;
|
|
22
|
-
extensions?: Extensions;
|
|
23
19
|
features?: Features;
|
|
24
20
|
};
|
|
25
|
-
export type TemplateConfig = {
|
|
26
|
-
preselectedDynamicContentList?: DynamicContent[];
|
|
27
|
-
selectedUnsubscribePages?: number[];
|
|
28
|
-
variationId?: string;
|
|
29
|
-
};
|
|
30
21
|
export type DynamicContent = {
|
|
31
22
|
value: string;
|
|
32
23
|
text: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DynamicContent, GuidoConfig
|
|
1
|
+
import type { DynamicContent, GuidoConfig } from '@@/Types/generic';
|
|
2
2
|
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
3
3
|
type __VLS_Props = {
|
|
4
4
|
templateId: string;
|
|
@@ -9,9 +9,8 @@ type __VLS_Props = {
|
|
|
9
9
|
username?: string;
|
|
10
10
|
html?: string;
|
|
11
11
|
css?: string;
|
|
12
|
+
preselectedDynamicContentList: DynamicContent[];
|
|
12
13
|
guidoConfig: GuidoConfig;
|
|
13
|
-
templateConfig?: TemplateConfig;
|
|
14
|
-
traceId?: string;
|
|
15
14
|
};
|
|
16
15
|
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
17
16
|
dynamicContent: {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var t = function() {
|
|
5
|
-
var
|
|
6
|
-
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) :
|
|
5
|
+
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper), r(e.LoadingWrapper)], 1);
|
|
7
7
|
}, s = [], d = /* @__PURE__ */ i(
|
|
8
|
-
|
|
8
|
+
a,
|
|
9
9
|
t,
|
|
10
10
|
s,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"05d5e64c"
|
|
14
14
|
);
|
|
15
15
|
const l = d.exports;
|
|
16
16
|
export {
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { provideGuidoActions as
|
|
3
|
-
import { usePartner as
|
|
4
|
-
import { useStripo as
|
|
5
|
-
import { migrate as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import
|
|
17
|
-
|
|
18
|
-
import { useUnsubscribeStore as ae } from "../stores/unsubscribe.js";
|
|
19
|
-
import ce from "../node_modules/lodash-es/merge.js";
|
|
20
|
-
const Pe = /* @__PURE__ */ M({
|
|
1
|
+
import { defineComponent as F, defineAsyncComponent as E, ref as H, computed as G, watch as R, onMounted as U, onUnmounted as x } from "vue";
|
|
2
|
+
import { provideGuidoActions as M } from "../composables/useGuidoActions.js";
|
|
3
|
+
import { usePartner as z } from "../composables/usePartner.js";
|
|
4
|
+
import { useStripo as B } from "../composables/useStripo.js";
|
|
5
|
+
import { migrate as I } from "../config/migrator/index.js";
|
|
6
|
+
import { DefaultUsername as K, DefaultMessageType as O, DefaultGuidoConfig as j } from "../enums/defaults.js";
|
|
7
|
+
import q from "./organisms/base/Toaster.vue.js";
|
|
8
|
+
import J from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
9
|
+
import Q from "./organisms/header/HeaderWrapper.vue.js";
|
|
10
|
+
import V from "./organisms/LoadingWrapper.vue.js";
|
|
11
|
+
import X from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
12
|
+
import { useStripoApi as Y } from "../services/stripoApi.js";
|
|
13
|
+
import { useDynamicContentStore as Z } from "../stores/dynamic-content.js";
|
|
14
|
+
import { useEditorStore as $ } from "../stores/editor.js";
|
|
15
|
+
import { usePreviewStore as ee } from "../stores/preview.js";
|
|
16
|
+
import oe from "../node_modules/lodash-es/merge.js";
|
|
17
|
+
const Ce = /* @__PURE__ */ F({
|
|
21
18
|
__name: "Guido",
|
|
22
19
|
props: {
|
|
23
20
|
templateId: null,
|
|
@@ -28,109 +25,84 @@ const Pe = /* @__PURE__ */ M({
|
|
|
28
25
|
username: null,
|
|
29
26
|
html: null,
|
|
30
27
|
css: null,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
traceId: null
|
|
28
|
+
preselectedDynamicContentList: null,
|
|
29
|
+
guidoConfig: null
|
|
34
30
|
},
|
|
35
31
|
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready"],
|
|
36
|
-
setup(
|
|
37
|
-
const
|
|
32
|
+
setup(P, { expose: L, emit: o }) {
|
|
33
|
+
const r = P, _ = E(
|
|
38
34
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
39
|
-
),
|
|
35
|
+
), W = E(
|
|
40
36
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
41
|
-
),
|
|
37
|
+
), l = H(), a = Z(), i = $(), k = ee(), t = G(() => i.hasChanges), s = r.preselectedDynamicContentList || [], { getPartnerName: p, getProductType: u, isTestPartner: A } = z(), g = () => {
|
|
42
38
|
var e;
|
|
43
|
-
return (e =
|
|
39
|
+
return (e = l.value) == null ? void 0 : e.handleSave(!0);
|
|
44
40
|
}, {
|
|
45
|
-
templateId:
|
|
46
|
-
userId:
|
|
47
|
-
guidoConfig:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
productType: u,
|
|
68
|
-
preselectedDynamicContentList: l,
|
|
41
|
+
templateId: c,
|
|
42
|
+
userId: f,
|
|
43
|
+
guidoConfig: y,
|
|
44
|
+
html: n = "",
|
|
45
|
+
css: v = "",
|
|
46
|
+
partnerName: d = p(),
|
|
47
|
+
productType: m = u(),
|
|
48
|
+
messageType: C = O,
|
|
49
|
+
username: h = K
|
|
50
|
+
} = r;
|
|
51
|
+
i.templateId = c, window.GuidoConfig = oe(j, y), window.GuidoConfig.partner = {
|
|
52
|
+
partnerName: d,
|
|
53
|
+
productType: m,
|
|
54
|
+
messageType: C
|
|
55
|
+
};
|
|
56
|
+
const { initPlugin: w } = B({
|
|
57
|
+
emailId: c,
|
|
58
|
+
userId: f,
|
|
59
|
+
username: h,
|
|
60
|
+
partnerName: d,
|
|
61
|
+
productType: m,
|
|
62
|
+
preselectedDynamicContentList: s,
|
|
69
63
|
onReady: () => {
|
|
70
|
-
console.debug("guido:ready"),
|
|
64
|
+
console.debug("guido:ready"), o("ready");
|
|
71
65
|
}
|
|
72
|
-
}), { getDefaultTemplate:
|
|
66
|
+
}), { getDefaultTemplate: S } = Y(), N = G(() => {
|
|
73
67
|
var e;
|
|
74
68
|
return !((e = window.GuidoConfig) != null && e.useHeader);
|
|
75
69
|
});
|
|
76
|
-
|
|
70
|
+
M({
|
|
77
71
|
onBack: () => {
|
|
78
|
-
console.debug("guido:back"),
|
|
72
|
+
console.debug("guido:back"), o("back");
|
|
79
73
|
},
|
|
80
74
|
onSaveStart: () => {
|
|
81
|
-
console.debug("guido:save:start"),
|
|
75
|
+
console.debug("guido:save:start"), o("save:start");
|
|
82
76
|
},
|
|
83
77
|
onSaveComplete: (e) => {
|
|
84
|
-
console.debug("guido:save:complete", e),
|
|
78
|
+
console.debug("guido:save:complete", e), o("save:complete", e);
|
|
85
79
|
}
|
|
86
80
|
});
|
|
87
|
-
const
|
|
88
|
-
console.debug("dynamic-content:close", e),
|
|
89
|
-
},
|
|
81
|
+
const D = (e) => {
|
|
82
|
+
console.debug("dynamic-content:close", e), a.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
83
|
+
}, b = () => {
|
|
90
84
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
91
85
|
};
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
}),
|
|
86
|
+
return R(() => t.value, () => {
|
|
87
|
+
o("on-change", t.value);
|
|
88
|
+
}), U(async () => {
|
|
95
89
|
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow");
|
|
96
90
|
try {
|
|
97
|
-
f.selectedUnsubscribePages = (o == null ? void 0 : o.selectedUnsubscribePages) || [];
|
|
98
91
|
let e = {
|
|
99
|
-
html:
|
|
100
|
-
css:
|
|
92
|
+
html: n && I(n),
|
|
93
|
+
css: v,
|
|
101
94
|
forceRecreate: !0
|
|
102
95
|
// TODO: It should be false for old templates. We will communicate with Stripo
|
|
103
96
|
};
|
|
104
|
-
e.html || (e = await
|
|
97
|
+
e.html || (e = await S(), e.html = I(e.html)), await w(e), a.selectedDynamicContentList = s;
|
|
105
98
|
} catch (e) {
|
|
106
|
-
console.error("Failed to initialize Stripo editor:", e)
|
|
107
|
-
tags: {
|
|
108
|
-
component: "guido-component",
|
|
109
|
-
operation: "mount"
|
|
110
|
-
},
|
|
111
|
-
contexts: {
|
|
112
|
-
guido: {
|
|
113
|
-
templateId: n,
|
|
114
|
-
userId: s,
|
|
115
|
-
traceId: r
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}), window.FS && window.FS("event", "guido_mount_error", {
|
|
119
|
-
// eslint-disable-next-line camelcase
|
|
120
|
-
errorMessage_str: e instanceof Error ? e.message : String(e),
|
|
121
|
-
// eslint-disable-next-line camelcase
|
|
122
|
-
templateId_str: n,
|
|
123
|
-
// eslint-disable-next-line camelcase
|
|
124
|
-
userId_str: s,
|
|
125
|
-
// eslint-disable-next-line camelcase
|
|
126
|
-
traceId_str: r || ""
|
|
127
|
-
});
|
|
99
|
+
console.error("Failed to initialize Stripo editor:", e);
|
|
128
100
|
}
|
|
129
101
|
document.addEventListener("dynamic-content:open", (e) => {
|
|
130
|
-
const
|
|
131
|
-
console.debug("dynamic-content:open",
|
|
102
|
+
const T = e;
|
|
103
|
+
console.debug("dynamic-content:open", T.detail), o("dynamic-content:open", T.detail);
|
|
132
104
|
});
|
|
133
|
-
}),
|
|
105
|
+
}), x(() => {
|
|
134
106
|
try {
|
|
135
107
|
window.UIEditor.removeEditor();
|
|
136
108
|
} catch {
|
|
@@ -138,14 +110,14 @@ const Pe = /* @__PURE__ */ M({
|
|
|
138
110
|
}
|
|
139
111
|
}), L({
|
|
140
112
|
dynamicContent: {
|
|
141
|
-
insert:
|
|
142
|
-
close:
|
|
113
|
+
insert: D,
|
|
114
|
+
close: b
|
|
143
115
|
},
|
|
144
|
-
hasChanges:
|
|
145
|
-
saveSilent:
|
|
146
|
-
}), { __sfc: !0, PreviewContainer:
|
|
116
|
+
hasChanges: t,
|
|
117
|
+
saveSilent: g
|
|
118
|
+
}), { __sfc: !0, PreviewContainer: _, OnboardingWrapper: W, headerWrapperRef: l, dynamicContentStore: a, props: r, editorStore: i, previewStore: k, hasChanges: t, preselectedDynamicContentList: s, getPartnerName: p, getProductType: u, isTestPartner: A, saveSilent: g, templateId: c, userId: f, guidoConfig: y, html: n, css: v, partnerName: d, productType: m, messageType: C, username: h, emit: o, initPlugin: w, getDefaultTemplate: S, noHeader: N, insertDynamicContent: D, closeDynamicContent: b, Toaster: q, FilterSelectionDrawer: J, HeaderWrapper: Q, LoadingWrapper: V, SaveAsTemplateDrawer: X };
|
|
147
119
|
}
|
|
148
120
|
});
|
|
149
121
|
export {
|
|
150
|
-
|
|
122
|
+
Ce as default
|
|
151
123
|
};
|
|
@@ -2,7 +2,7 @@ import type { FooterButtonGroupOptions } from '@@/Types/wrappers/wp-drawer';
|
|
|
2
2
|
interface Props {
|
|
3
3
|
id: string;
|
|
4
4
|
className?: string;
|
|
5
|
-
size?:
|
|
5
|
+
size?: string;
|
|
6
6
|
closeOnOutsideClick?: boolean;
|
|
7
7
|
descriptionStatus?: boolean;
|
|
8
8
|
descriptionText?: string;
|
|
@@ -10,11 +10,9 @@ interface Props {
|
|
|
10
10
|
status: boolean;
|
|
11
11
|
titleText: string;
|
|
12
12
|
}
|
|
13
|
-
declare var __VLS_12: {}
|
|
13
|
+
declare var __VLS_12: {};
|
|
14
14
|
type __VLS_Slots = {} & {
|
|
15
|
-
|
|
16
|
-
} & {
|
|
17
|
-
default?: (props: typeof __VLS_14) => any;
|
|
15
|
+
default?: (props: typeof __VLS_12) => any;
|
|
18
16
|
};
|
|
19
17
|
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
|
20
18
|
className: string;
|
|
@@ -34,7 +32,7 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
|
|
|
34
32
|
descriptionText: string;
|
|
35
33
|
}>>>, {
|
|
36
34
|
className: string;
|
|
37
|
-
size:
|
|
35
|
+
size: string;
|
|
38
36
|
closeOnOutsideClick: boolean;
|
|
39
37
|
descriptionStatus: boolean;
|
|
40
38
|
descriptionText: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import r from "./WpDrawer.vue2.js";
|
|
2
2
|
import s from "../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var
|
|
3
|
+
var i = function() {
|
|
4
4
|
var t = this, n = t._self._c, e = t._self._setupProxy;
|
|
5
5
|
return n(e.InDrawer, { class: t.className, attrs: { id: t.id, "footer-status": "", "close-on-outside-click": t.closeOnOutsideClick, "description-status": t.descriptionStatus, "description-text": t.descriptionText, "footer-button-group-options": t.footerButtonGroupOptions, size: t.size, status: t.status, "title-text": t.titleText }, on: { cancelOrBackButtonEvent: function(o) {
|
|
6
6
|
return e.emit("cancelOrBackButtonEvent");
|
|
@@ -8,15 +8,13 @@ var u = function() {
|
|
|
8
8
|
return e.emit("onCloseEvent");
|
|
9
9
|
}, primaryButtonEvent: function(o) {
|
|
10
10
|
return e.emit("primaryButtonEvent");
|
|
11
|
-
} }, scopedSlots: t._u([
|
|
12
|
-
return [t._t("headerBottomSlot")];
|
|
13
|
-
}, proxy: !0 } : null, { key: "contentSlot", fn: function() {
|
|
11
|
+
} }, scopedSlots: t._u([{ key: "contentSlot", fn: function() {
|
|
14
12
|
return [n("div", [t._t("default")], 2)];
|
|
15
13
|
}, proxy: !0 }], null, !0) });
|
|
16
|
-
},
|
|
14
|
+
}, u = [], c = /* @__PURE__ */ s(
|
|
17
15
|
r,
|
|
18
|
-
u,
|
|
19
16
|
i,
|
|
17
|
+
u,
|
|
20
18
|
!1,
|
|
21
19
|
null,
|
|
22
20
|
null
|
|
@@ -1,123 +1,86 @@
|
|
|
1
|
-
import { getCsrfToken as
|
|
2
|
-
import { ref as
|
|
3
|
-
|
|
4
|
-
const g =
|
|
5
|
-
if (!b)
|
|
6
|
-
try {
|
|
7
|
-
const { useApiErrorTracking: E } = await import("./useApiErrorTracking.js");
|
|
8
|
-
b = E();
|
|
9
|
-
} catch {
|
|
10
|
-
}
|
|
11
|
-
return b;
|
|
12
|
-
}, M = (E = {}) => {
|
|
13
|
-
const d = h(!1), i = h(null), l = h(null), P = w(() => d.value), k = w(() => i.value !== null), v = {
|
|
1
|
+
import { getCsrfToken as H } from "../utils/genericUtil.js";
|
|
2
|
+
import { ref as p, computed as T } from "vue";
|
|
3
|
+
const k = (b = {}) => {
|
|
4
|
+
const h = p(!1), a = p(null), u = p(null), g = T(() => h.value), y = T(() => a.value !== null), v = {
|
|
14
5
|
baseURL: "",
|
|
15
6
|
timeout: 1e4,
|
|
16
7
|
retry: 0,
|
|
17
8
|
retryDelay: 1e3,
|
|
18
9
|
headers: {
|
|
19
10
|
"Content-Type": "application/json",
|
|
20
|
-
"X-CSRF-TOKEN":
|
|
11
|
+
"X-CSRF-TOKEN": H()
|
|
21
12
|
},
|
|
22
|
-
...
|
|
23
|
-
},
|
|
24
|
-
if (
|
|
25
|
-
return
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
},
|
|
13
|
+
...b
|
|
14
|
+
}, w = (e, s) => {
|
|
15
|
+
if (e.startsWith("http://") || e.startsWith("https://"))
|
|
16
|
+
return e;
|
|
17
|
+
const t = s || v.baseURL || "";
|
|
18
|
+
return t.endsWith("/") && e.startsWith("/") ? `${t}${e.slice(1)}` : t.endsWith("/") || e.startsWith("/") ? `${t}${e}` : `${t}/${e}`;
|
|
19
|
+
}, P = (e) => new Promise((s, t) => {
|
|
29
20
|
setTimeout(() => {
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
}),
|
|
33
|
-
setTimeout(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const n = { ...v, ...L }, T = C(s, n.baseURL), m = {
|
|
39
|
-
method: t,
|
|
21
|
+
t(new Error("Request timeout"));
|
|
22
|
+
}, e);
|
|
23
|
+
}), x = (e) => new Promise((s) => {
|
|
24
|
+
setTimeout(s, e);
|
|
25
|
+
}), i = async (e, s, t, D = {}) => {
|
|
26
|
+
a.value = null, h.value = !0, u.value = new AbortController();
|
|
27
|
+
const n = { ...v, ...D }, L = w(s, n.baseURL), c = {
|
|
28
|
+
method: e,
|
|
40
29
|
headers: { ...n.headers },
|
|
41
|
-
signal:
|
|
30
|
+
signal: u.value.signal,
|
|
42
31
|
...n
|
|
43
32
|
};
|
|
44
|
-
|
|
45
|
-
const
|
|
33
|
+
t && ["POST", "PUT", "PATCH"].includes(e) && (t instanceof FormData ? (delete c.headers["Content-Type"], c.body = t) : c.body = JSON.stringify(t));
|
|
34
|
+
const E = async (m = 0) => {
|
|
46
35
|
try {
|
|
47
|
-
const o = [fetch(
|
|
48
|
-
n.timeout && o.push(
|
|
36
|
+
const o = [fetch(L, c)];
|
|
37
|
+
n.timeout && o.push(P(n.timeout));
|
|
49
38
|
const r = await Promise.race(o);
|
|
50
39
|
if (!r.ok) {
|
|
51
|
-
const O = `HTTP Error: ${r.status} ${r.statusText}`,
|
|
52
|
-
|
|
53
|
-
const x = await g();
|
|
54
|
-
throw x && x.captureHttpError(p, T, {
|
|
55
|
-
method: t,
|
|
56
|
-
statusCode: r.status,
|
|
57
|
-
statusText: r.statusText
|
|
58
|
-
}), p;
|
|
40
|
+
const O = `HTTP Error: ${r.status} ${r.statusText}`, d = new Error(O);
|
|
41
|
+
throw d.status = r.status, d.statusText = r.statusText, d.response = r, d;
|
|
59
42
|
}
|
|
60
|
-
let
|
|
61
|
-
const
|
|
62
|
-
return
|
|
63
|
-
data:
|
|
43
|
+
let f;
|
|
44
|
+
const l = r.headers.get("content-type");
|
|
45
|
+
return l != null && l.includes("application/json") ? f = await r.json() : l != null && l.includes("text/") ? f = await r.text() : f = await r.blob(), {
|
|
46
|
+
data: f,
|
|
64
47
|
status: r.status,
|
|
65
48
|
statusText: r.statusText,
|
|
66
49
|
headers: r.headers
|
|
67
50
|
};
|
|
68
51
|
} catch (o) {
|
|
69
52
|
const r = o instanceof Error && o.name === "AbortError";
|
|
70
|
-
if (
|
|
71
|
-
return await
|
|
72
|
-
|
|
73
|
-
if (o.name === "AbortError")
|
|
74
|
-
i.value = { message: "Request was cancelled" };
|
|
75
|
-
else {
|
|
76
|
-
i.value = { message: o.message };
|
|
77
|
-
const a = await g();
|
|
78
|
-
a && a.captureNetworkError(o, T, {
|
|
79
|
-
method: t,
|
|
80
|
-
attemptNumber: f + 1,
|
|
81
|
-
timeoutMs: n.timeout
|
|
82
|
-
});
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
i.value = o;
|
|
86
|
-
const a = await g();
|
|
87
|
-
a && o instanceof Error && a.captureNetworkError(o, T, {
|
|
88
|
-
method: t,
|
|
89
|
-
attemptNumber: f + 1
|
|
90
|
-
});
|
|
91
|
-
}
|
|
92
|
-
throw o;
|
|
53
|
+
if (m < (n.retry || 0) && !r)
|
|
54
|
+
return await x(n.retryDelay || 1e3), E(m + 1);
|
|
55
|
+
throw o instanceof Error ? o.name === "AbortError" ? a.value = { message: "Request was cancelled" } : a.value = { message: o.message } : a.value = o, o;
|
|
93
56
|
}
|
|
94
57
|
};
|
|
95
58
|
try {
|
|
96
|
-
return await
|
|
59
|
+
return await E();
|
|
97
60
|
} finally {
|
|
98
|
-
|
|
61
|
+
h.value = !1, u.value = null;
|
|
99
62
|
}
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
|
|
63
|
+
}, C = (e, s) => i("GET", e, void 0, s), $ = (e, s, t) => i("POST", e, s, t), R = (e, s, t) => i("PUT", e, s, t), U = (e, s, t) => i("PATCH", e, s, t), A = (e, s) => i("DELETE", e, void 0, s), W = (e) => {
|
|
64
|
+
u.value && u.value.abort(e);
|
|
65
|
+
}, q = () => {
|
|
66
|
+
a.value = null;
|
|
104
67
|
};
|
|
105
68
|
return {
|
|
106
69
|
// State
|
|
107
|
-
loading:
|
|
108
|
-
error:
|
|
109
|
-
hasError:
|
|
70
|
+
loading: g,
|
|
71
|
+
error: T(() => a.value),
|
|
72
|
+
hasError: y,
|
|
110
73
|
// Methods
|
|
111
|
-
request:
|
|
112
|
-
get:
|
|
113
|
-
post:
|
|
114
|
-
put:
|
|
115
|
-
patch:
|
|
116
|
-
delete:
|
|
117
|
-
cancel:
|
|
118
|
-
clearError:
|
|
74
|
+
request: i,
|
|
75
|
+
get: C,
|
|
76
|
+
post: $,
|
|
77
|
+
put: R,
|
|
78
|
+
patch: U,
|
|
79
|
+
delete: A,
|
|
80
|
+
cancel: W,
|
|
81
|
+
clearError: q
|
|
119
82
|
};
|
|
120
83
|
};
|
|
121
84
|
export {
|
|
122
|
-
|
|
85
|
+
k as useHttp
|
|
123
86
|
};
|