@useinsider/guido 1.0.3-beta.dbf4a88 → 1.0.3-beta.df46976
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 +4 -0
- package/dist/{src/@types → @types}/generic.d.ts +5 -0
- package/dist/{src/components → components}/Guido.vue.d.ts +1 -0
- package/dist/components/Guido.vue.js +11 -9
- package/dist/components/Guido.vue2.js +38 -37
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.d.ts +19 -0
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue.js +28 -0
- package/dist/components/organisms/extensions/recommendation/FilterItem.vue2.js +38 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/FilterSelectionDrawer.vue2.js +37 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue.js +20 -0
- package/dist/components/organisms/extensions/recommendation/Filters.vue2.js +44 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +16 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue.js +17 -0
- package/dist/components/organisms/extensions/recommendation/LogicAdapter.vue2.js +27 -0
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.d.ts +4 -0
- package/dist/components/organisms/onboarding/NewVersionPopup.vue.js +9 -9
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +29 -17
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.d.ts +4 -0
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +12 -10
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +19 -18
- package/dist/composables/useStripo.js +37 -36
- package/dist/enums/date.d.ts +13 -0
- package/dist/enums/date.js +16 -0
- package/dist/enums/defaults.js +4 -3
- package/dist/enums/extensions/recommendationBlock.d.ts +16 -0
- package/dist/enums/extensions/recommendationBlock.js +80 -0
- package/dist/extensions/Blocks/RadioButton/template.js +6 -6
- package/dist/extensions/Blocks/Recommendation/block.d.ts +10 -0
- package/dist/extensions/Blocks/Recommendation/block.js +27 -0
- package/dist/extensions/Blocks/Recommendation/control.d.ts +29 -0
- package/dist/extensions/Blocks/Recommendation/control.js +277 -0
- package/dist/extensions/Blocks/Recommendation/extension.js +10 -0
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.d.ts +4 -0
- package/dist/extensions/Blocks/Recommendation/iconsRegistry.js +51 -0
- package/dist/extensions/Blocks/Recommendation/recommendation.css.js +19 -0
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +32 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.d.ts +555 -0
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +266 -0
- package/dist/extensions/Blocks/Recommendation/template.d.ts +6 -0
- package/dist/extensions/Blocks/Recommendation/template.js +200 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.d.ts +7 -0
- package/dist/extensions/Blocks/Recommendation/utils/filterUtil.js +28 -0
- package/dist/extensions/Blocks/_Boilerplate/settingsPanel.d.ts +4 -0
- package/dist/extensions/Blocks/common-control.d.ts +66 -0
- package/dist/extensions/Blocks/common-control.js +102 -0
- package/dist/extensions/DynamicContent/extension.d.ts +2 -0
- package/dist/guido.css +1 -1
- package/dist/mock/api/validator.d.ts +2 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +83 -72
- package/dist/services/recommendationApi.d.ts +6 -0
- package/dist/services/recommendationApi.js +43 -0
- package/dist/{src/stores → stores}/config.d.ts +1 -0
- package/dist/{src/stores → stores}/editor.d.ts +21 -0
- package/dist/stores/editor.js +2 -1
- package/dist/utils/dateUtil.d.ts +2 -0
- package/dist/utils/dateUtil.js +7 -12
- package/dist/{src/utils → utils}/genericUtil.d.ts +1 -0
- package/dist/utils/genericUtil.js +8 -7
- package/package.json +2 -7
- package/dist/package.json.js +0 -7
- package/dist/src/utils/dateUtil.d.ts +0 -1
- /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/organisms/header/LeftSlot.vue.d.ts → components/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts} +0 -0
- /package/dist/{src/components/organisms/header/MiddleSlot.vue.d.ts → components/organisms/extensions/recommendation/Filters.vue.d.ts} +0 -0
- /package/dist/{src/components → components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
- /package/dist/{src/components/organisms/header/ViewOptions.vue.d.ts → components/organisms/header/LeftSlot.vue.d.ts} +0 -0
- /package/dist/{src/components/organisms/header/version-history/RestoreButton.vue.d.ts → 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/organisms/header/version-history → components/organisms/header}/ViewOptions.vue.d.ts +0 -0
- /package/dist/{src/components/organisms/onboarding/AMPOnboarding.vue.d.ts → 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/organisms/onboarding/GenericOnboarding.vue.d.ts → components/organisms/header/version-history/ViewOptions.vue.d.ts} +0 -0
- /package/dist/{src/components/organisms/onboarding/NewVersionPopup.vue.d.ts → components/organisms/onboarding/AMPOnboarding.vue.d.ts} +0 -0
- /package/dist/{src/components/organisms/onboarding/OnboardingWrapper.vue.d.ts → components/organisms/onboarding/GenericOnboarding.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}/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/unsubscribe/UnsubscribePageSelection.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/unsubscribe/UnsubscribeTypeSelection.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/unsubscribe/UnsubscribeWrapper.vue.d.ts +0 -0
- /package/dist/{src/components → components}/wrappers/WpDrawer.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/index.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/radioButtonMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/unsubscribeMigrator.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}/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/enums → enums}/unsubscribe.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/Blocks/Unsubscribe → extensions/Blocks/Recommendation}/extension.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/Unsubscribe → extensions/Blocks/Recommendation}/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/block.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/control.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/elements/preview.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/_Boilerplate → extensions/Blocks/Unsubscribe}/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions/Blocks/_Boilerplate → extensions/Blocks/Unsubscribe}/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/tagRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/utils/constants.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/utils/utils.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/DynamicContent → extensions/Blocks/_Boilerplate}/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/_Boilerplate/template.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/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/api/template-library.d.ts → mock/api/recommendation.d.ts} +0 -0
- /package/dist/{src/mock/api/unsubscribe.d.ts → mock/api/template-library.d.ts} +0 -0
- /package/dist/{src/mock/api/user-modal-state.d.ts → mock/api/unsubscribe.d.ts} +0 -0
- /package/dist/{src/mock/api/validator.d.ts → mock/api/user-modal-state.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}/stripoApi.d.ts +0 -0
- /package/dist/{src/services → services}/templateLibraryApi.d.ts +0 -0
- /package/dist/{src/services → services}/unsubscribeApi.d.ts +0 -0
- /package/dist/{src/stores → stores}/dynamic-content.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}/unsubscribe.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}/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,19 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import t from "./OnboardingWrapper.vue2.js";
|
|
2
|
+
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
3
|
var s = function() {
|
|
4
|
-
var n = this, e = n._self._c,
|
|
5
|
-
return e("div", n._l(
|
|
6
|
-
return e(
|
|
4
|
+
var n = this, e = n._self._c, r = n._self._setupProxy;
|
|
5
|
+
return e("div", n._l(r.visibleOnboardings, function(o) {
|
|
6
|
+
return e(o.component, { key: o.type, tag: "component", on: { "onboarding-finished": function(p) {
|
|
7
|
+
return r.emit("onboarding-finished");
|
|
8
|
+
} } });
|
|
7
9
|
}), 1);
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
+
}, _ = [], a = /* @__PURE__ */ i(
|
|
11
|
+
t,
|
|
10
12
|
s,
|
|
11
|
-
|
|
13
|
+
_,
|
|
12
14
|
!1,
|
|
13
15
|
null,
|
|
14
16
|
null
|
|
15
17
|
);
|
|
16
|
-
const
|
|
18
|
+
const d = a.exports;
|
|
17
19
|
export {
|
|
18
|
-
|
|
20
|
+
d as default
|
|
19
21
|
};
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePartner as
|
|
3
|
-
import { useEditorStore as
|
|
4
|
-
import { useOnboardingStore as
|
|
5
|
-
import { usePreviewStore as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import { defineComponent as b, computed as e, onMounted as O, watch as t } from "vue";
|
|
2
|
+
import { usePartner as u } from "../../../composables/usePartner.js";
|
|
3
|
+
import { useEditorStore as v } from "../../../stores/editor.js";
|
|
4
|
+
import { useOnboardingStore as l } from "../../../stores/onboarding.js";
|
|
5
|
+
import { usePreviewStore as y } from "../../../stores/preview.js";
|
|
6
|
+
import S from "./AMPOnboarding.vue.js";
|
|
7
|
+
import h from "./GenericOnboarding.vue.js";
|
|
8
8
|
import w from "./NewVersionPopup.vue.js";
|
|
9
9
|
import P from "./TextBlockOnboarding.vue.js";
|
|
10
|
-
import
|
|
11
|
-
const
|
|
10
|
+
import _ from "./VersionHistoryOnboarding.vue.js";
|
|
11
|
+
const F = /* @__PURE__ */ b({
|
|
12
12
|
__name: "OnboardingWrapper",
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
emits: ["onboarding-finished"],
|
|
14
|
+
setup(A, { emit: f }) {
|
|
15
|
+
const o = l(), r = v(), s = y(), { isTestPartner: a } = u(), p = e(() => r.isStripoInitialized), d = e(() => a()), m = [
|
|
15
16
|
{ type: "newVersionPopup", component: w },
|
|
16
|
-
{ type: "genericOnboarding", component:
|
|
17
|
+
{ type: "genericOnboarding", component: h },
|
|
17
18
|
{ type: "textBlockOnboarding", component: P },
|
|
18
|
-
{ type: "versionHistoryOnboarding", component:
|
|
19
|
-
{ type: "ampOnboarding", component:
|
|
20
|
-
], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n),
|
|
21
|
-
return
|
|
19
|
+
{ type: "versionHistoryOnboarding", component: _ },
|
|
20
|
+
{ type: "ampOnboarding", component: S }
|
|
21
|
+
], c = (n) => d.value || !p.value ? !1 : n === "newVersionPopup" ? o.shouldShowOnboarding(n) : o.isActive(n), g = e(() => m.filter((n) => c(n.type)));
|
|
22
|
+
return O(async () => {
|
|
22
23
|
await o.fetchUserModalState();
|
|
23
24
|
}), t(
|
|
24
25
|
() => r.isVersionHistoryOpen,
|
|
@@ -35,9 +36,9 @@ const E = /* @__PURE__ */ g({
|
|
|
35
36
|
(n) => {
|
|
36
37
|
!n && o.isActive("ampOnboarding") && o.close("ampOnboarding");
|
|
37
38
|
}
|
|
38
|
-
), { __sfc: !0, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings:
|
|
39
|
+
), { __sfc: !0, emit: f, onboardingStore: o, editorStore: r, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
|
|
39
40
|
}
|
|
40
41
|
});
|
|
41
42
|
export {
|
|
42
|
-
|
|
43
|
+
F as default
|
|
43
44
|
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { useActionsApi as f } from "./useActionsApi.js";
|
|
2
|
-
import { useCustomInterfaceAppearance as
|
|
3
|
-
import { useStripoEventHandler as
|
|
2
|
+
import { useCustomInterfaceAppearance as E } from "./useCustomInterfaceAppearance.js";
|
|
3
|
+
import { useStripoEventHandler as S } from "./useStripoEventHandler.js";
|
|
4
4
|
import { useToaster as C } from "./useToaster.js";
|
|
5
5
|
import { displayConditions as y } from "../enums/displayConditions.js";
|
|
6
6
|
import h from "../extensions/Blocks/Checkbox/extension.js";
|
|
7
7
|
import w from "../extensions/Blocks/CouponBlock/extension.js";
|
|
8
8
|
import b from "../extensions/Blocks/RadioButton/extension.js";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
9
|
+
import _ from "../extensions/Blocks/Recommendation/extension.js";
|
|
10
|
+
import k from "../extensions/Blocks/Unsubscribe/extension.js";
|
|
11
|
+
import B from "../extensions/DynamicContent/extension.js";
|
|
12
|
+
import { useStripoApi as V } from "../services/stripoApi.js";
|
|
13
|
+
import x from "../static/styles/customEditorStyle.css.js";
|
|
13
14
|
import { useEditorStore as F } from "../stores/editor.js";
|
|
14
|
-
import { dynamicContentToMergeTags as
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const t = F(), { html: n, css: c, forceRecreate: s } = r;
|
|
15
|
+
import { dynamicContentToMergeTags as A } from "../utils/genericUtil.js";
|
|
16
|
+
const G = (s) => {
|
|
17
|
+
const { handleError: d } = C(), { getToken: c, getCustomFonts: u } = V(), { handleEvent: m } = S(), l = (r, i = []) => {
|
|
18
|
+
const t = F(), { html: e, css: a, forceRecreate: g } = r;
|
|
19
19
|
window.UIEditor.initEditor(
|
|
20
20
|
document.querySelector("#guido-editor"),
|
|
21
21
|
{
|
|
22
|
-
metadata:
|
|
23
|
-
html:
|
|
24
|
-
css:
|
|
25
|
-
forceRecreate:
|
|
22
|
+
metadata: s,
|
|
23
|
+
html: e,
|
|
24
|
+
css: a,
|
|
25
|
+
forceRecreate: g,
|
|
26
26
|
locale: "en",
|
|
27
27
|
undoButtonSelector: "#guido__undo-button",
|
|
28
28
|
redoButtonSelector: "#guido__redo-button",
|
|
@@ -32,7 +32,7 @@ const N = (a) => {
|
|
|
32
32
|
customAppearanceMergetags: !0,
|
|
33
33
|
customAppearanceMergetagsBorderColor: "#f1f3fe",
|
|
34
34
|
customAppearanceMergetagsBackgroundColor: "#f1f3fe",
|
|
35
|
-
customViewStyles:
|
|
35
|
+
customViewStyles: x,
|
|
36
36
|
conditionsEnabled: !0,
|
|
37
37
|
customConditionsEnabled: !0,
|
|
38
38
|
conditionCategories: y,
|
|
@@ -46,21 +46,21 @@ const N = (a) => {
|
|
|
46
46
|
},
|
|
47
47
|
mergeTags: [
|
|
48
48
|
{
|
|
49
|
-
entries:
|
|
49
|
+
entries: A(s.preselectedDynamicContentList)
|
|
50
50
|
}
|
|
51
51
|
],
|
|
52
52
|
async onTokenRefreshRequest(o) {
|
|
53
53
|
try {
|
|
54
|
-
const
|
|
55
|
-
o(
|
|
56
|
-
} catch (
|
|
57
|
-
d(
|
|
54
|
+
const n = await c();
|
|
55
|
+
o(n);
|
|
56
|
+
} catch (n) {
|
|
57
|
+
d(n, "Failed to refresh token");
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
onTemplateLoaded() {
|
|
61
61
|
try {
|
|
62
|
-
const { importCss: o } =
|
|
63
|
-
o(),
|
|
62
|
+
const { importCss: o } = E(), { activateCustomViewStyles: n } = f();
|
|
63
|
+
o(), n(), s.onReady(), t.isStripoInitialized = !0, t.loadingStatus = !1, setTimeout(() => {
|
|
64
64
|
t.hasChanges = !1;
|
|
65
65
|
}, 1e3);
|
|
66
66
|
} catch (o) {
|
|
@@ -79,41 +79,42 @@ const N = (a) => {
|
|
|
79
79
|
onDataChanged() {
|
|
80
80
|
t.hasChanges = !0;
|
|
81
81
|
},
|
|
82
|
-
onEvent:
|
|
82
|
+
onEvent: m,
|
|
83
83
|
ignoreClickOutsideSelectors: [
|
|
84
84
|
"#guido-dynamic-content-modal",
|
|
85
85
|
".in-on-board-wrapper",
|
|
86
86
|
".in-drawer__container"
|
|
87
87
|
],
|
|
88
88
|
extensions: [
|
|
89
|
-
|
|
89
|
+
B,
|
|
90
90
|
h,
|
|
91
91
|
b,
|
|
92
|
-
|
|
92
|
+
_,
|
|
93
|
+
k,
|
|
93
94
|
w
|
|
94
95
|
]
|
|
95
96
|
}
|
|
96
97
|
);
|
|
97
|
-
},
|
|
98
|
-
var e;
|
|
98
|
+
}, p = (r) => new Promise((i, t) => {
|
|
99
99
|
if (document.getElementById("UiEditorScript")) {
|
|
100
100
|
r(), i();
|
|
101
101
|
return;
|
|
102
102
|
}
|
|
103
|
-
const
|
|
104
|
-
|
|
103
|
+
const e = document.createElement("script");
|
|
104
|
+
e.id = "UiEditorScript", e.type = "module", e.src = "https://plugins.stripo.email/resources/uieditor/latest/UIEditor.js", e.onload = () => {
|
|
105
105
|
r(), i();
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
|
|
106
|
+
}, e.onerror = () => {
|
|
107
|
+
const a = new Error("Failed to load Stripo UIEditor script");
|
|
108
|
+
t(a);
|
|
109
|
+
}, document.body.appendChild(e);
|
|
109
110
|
});
|
|
110
111
|
return { initPlugin: async (r) => {
|
|
111
|
-
await
|
|
112
|
-
const i = await
|
|
112
|
+
await p(async () => {
|
|
113
|
+
const i = await u();
|
|
113
114
|
l(r, i);
|
|
114
115
|
});
|
|
115
116
|
} };
|
|
116
117
|
};
|
|
117
118
|
export {
|
|
118
|
-
|
|
119
|
+
G as useStripo
|
|
119
120
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare const DEFAULT_DATE_FORMAT_OPTIONS: {
|
|
2
|
+
readonly month: "short";
|
|
3
|
+
readonly day: "numeric";
|
|
4
|
+
readonly hour: "2-digit";
|
|
5
|
+
readonly minute: "2-digit";
|
|
6
|
+
readonly second: "2-digit";
|
|
7
|
+
readonly hour12: false;
|
|
8
|
+
};
|
|
9
|
+
export declare const DATE_FORMAT_DD_MM_YYYY: {
|
|
10
|
+
readonly day: "2-digit";
|
|
11
|
+
readonly month: "2-digit";
|
|
12
|
+
readonly year: "numeric";
|
|
13
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const i = {
|
|
2
|
+
month: "short",
|
|
3
|
+
day: "numeric",
|
|
4
|
+
hour: "2-digit",
|
|
5
|
+
minute: "2-digit",
|
|
6
|
+
second: "2-digit",
|
|
7
|
+
hour12: !1
|
|
8
|
+
}, t = {
|
|
9
|
+
day: "2-digit",
|
|
10
|
+
month: "2-digit",
|
|
11
|
+
year: "numeric"
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
t as DATE_FORMAT_DD_MM_YYYY,
|
|
15
|
+
i as DEFAULT_DATE_FORMAT_OPTIONS
|
|
16
|
+
};
|
package/dist/enums/defaults.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const a = {
|
|
2
2
|
translationsPath: "window.trans.en",
|
|
3
|
+
migrationDate: 1759696858,
|
|
3
4
|
emailHeader: {
|
|
4
5
|
senderName: "",
|
|
5
6
|
subject: ""
|
|
@@ -16,7 +17,7 @@ const a = {
|
|
|
16
17
|
}, t = {
|
|
17
18
|
promotional: 1,
|
|
18
19
|
transactional: 2
|
|
19
|
-
}, e = "email", o = "Guido User", n = t.promotional,
|
|
20
|
+
}, e = "email", o = "Guido User", n = t.promotional, i = 2, s = {
|
|
20
21
|
email: 60,
|
|
21
22
|
architect: 49
|
|
22
23
|
}, u = [
|
|
@@ -56,8 +57,8 @@ export {
|
|
|
56
57
|
n as DefaultMessageType,
|
|
57
58
|
e as DefaultProductType,
|
|
58
59
|
o as DefaultUsername,
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
i as EditorType,
|
|
61
|
+
s as ProductIds,
|
|
61
62
|
u as TEST_PARTNER_LIST,
|
|
62
63
|
t as TemplateTypes
|
|
63
64
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TextValueObject } from '@@/Types/generic';
|
|
2
|
+
import type { RecommendationFeedItem } from '@@/Types/recommendation';
|
|
3
|
+
export declare const URLS: {
|
|
4
|
+
RECOMMENDATION_API_URL: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const RecommendationFeedSourceMaps: RecommendationFeedItem[];
|
|
7
|
+
export declare const PriceAttributes: string[];
|
|
8
|
+
export declare const currencyLocationMaps: TextValueObject[];
|
|
9
|
+
export declare const currencyOperators: TextValueObject[];
|
|
10
|
+
export declare const currencyDecimalCounts: TextValueObject[];
|
|
11
|
+
export declare const operatorOptionsForStrings: TextValueObject[];
|
|
12
|
+
export declare const operatorOptionsForArrayOfStrings: TextValueObject[];
|
|
13
|
+
export declare const operatorOptionsForNumbers: TextValueObject[];
|
|
14
|
+
export declare const operatorOptionsForDates: TextValueObject[];
|
|
15
|
+
export declare const operatorOptionsForBooleans: TextValueObject[];
|
|
16
|
+
export declare const getOperatorOptions: (type?: string) => TextValueObject[];
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
const s = {
|
|
2
|
+
RECOMMENDATION_API_URL: "http://recommendationv2.api.useinsider.com"
|
|
3
|
+
}, i = [
|
|
4
|
+
{ id: 11, key: "similarViewed", name: "Viewed Together", path: "viewed-together" },
|
|
5
|
+
{ id: 12, key: "similarBought", name: "Purchased Together", path: "purchased-together" },
|
|
6
|
+
{ id: 13, key: "userBased", name: "User Based", path: "user-based" },
|
|
7
|
+
{ id: 36, key: "highestDiscounted", name: "Highest Discounted Items", path: "highest-discounted" },
|
|
8
|
+
{ id: 38, key: "manualMerchandising", name: "Manual Merchandising", path: "manual-merchandising" },
|
|
9
|
+
{ id: 39, key: "newArrivals", name: "New Arrivals", path: "new-arrivals" },
|
|
10
|
+
{ id: 40, key: "trendingProducts", name: "Trending Products", path: "trending" },
|
|
11
|
+
{ id: 46, key: "mostValuableOfPartner", name: "Most Valuable Products", path: "most-valuable" },
|
|
12
|
+
{ id: 61, key: "mostPopular", name: "Most Popular Items", path: "most-popular" },
|
|
13
|
+
{ id: 62, key: "mostPurchased", name: "Top Sellers", path: "top-sellers" }
|
|
14
|
+
], u = ["discount", "omnibus_price", "omnibus_discount", "price", "original_price"], l = [
|
|
15
|
+
{ text: "after the amount", value: "1" },
|
|
16
|
+
{ text: "before the amount", value: "0" }
|
|
17
|
+
], c = [
|
|
18
|
+
{ text: "dot(.)", value: "." },
|
|
19
|
+
{ text: "comma(,)", value: "," }
|
|
20
|
+
], d = [
|
|
21
|
+
{ text: "0", value: "0" },
|
|
22
|
+
{ text: "1", value: "1" },
|
|
23
|
+
{ text: "2", value: "2" },
|
|
24
|
+
{ text: "3", value: "3" },
|
|
25
|
+
{ text: "4", value: "4" },
|
|
26
|
+
{ text: "5", value: "5" }
|
|
27
|
+
], e = [
|
|
28
|
+
{ text: "is exactly", value: "=" },
|
|
29
|
+
{ text: "contains", value: "~" },
|
|
30
|
+
{ text: "does not contain", value: "!~" },
|
|
31
|
+
{ text: "any of", value: "||" }
|
|
32
|
+
], a = [
|
|
33
|
+
{ text: "is exactly", value: "=" },
|
|
34
|
+
{ text: "is not exactly", value: "!==" },
|
|
35
|
+
{ text: "contains", value: "~" },
|
|
36
|
+
{ text: "does not contain", value: "!~" },
|
|
37
|
+
{ text: "any of", value: "||" }
|
|
38
|
+
], r = [
|
|
39
|
+
{ text: "is equal to", value: "=" },
|
|
40
|
+
{ text: "is greater than", value: ">" },
|
|
41
|
+
{ text: "is less than", value: "<" }
|
|
42
|
+
], o = [
|
|
43
|
+
{ text: "is equal to", value: "=" },
|
|
44
|
+
{ text: "after", value: ">" },
|
|
45
|
+
{ text: "before", value: "<" }
|
|
46
|
+
], n = [
|
|
47
|
+
{ text: "true", value: "==" },
|
|
48
|
+
{ text: "false", value: "!=" }
|
|
49
|
+
], p = (t) => {
|
|
50
|
+
if (!t)
|
|
51
|
+
return e;
|
|
52
|
+
switch (t) {
|
|
53
|
+
case "Boolean":
|
|
54
|
+
return n;
|
|
55
|
+
case "Date":
|
|
56
|
+
return o;
|
|
57
|
+
case "Number":
|
|
58
|
+
return r;
|
|
59
|
+
case "String":
|
|
60
|
+
return e;
|
|
61
|
+
case "Strings":
|
|
62
|
+
return a;
|
|
63
|
+
default:
|
|
64
|
+
return e;
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
export {
|
|
68
|
+
u as PriceAttributes,
|
|
69
|
+
i as RecommendationFeedSourceMaps,
|
|
70
|
+
s as URLS,
|
|
71
|
+
d as currencyDecimalCounts,
|
|
72
|
+
l as currencyLocationMaps,
|
|
73
|
+
c as currencyOperators,
|
|
74
|
+
p as getOperatorOptions,
|
|
75
|
+
a as operatorOptionsForArrayOfStrings,
|
|
76
|
+
n as operatorOptionsForBooleans,
|
|
77
|
+
o as operatorOptionsForDates,
|
|
78
|
+
r as operatorOptionsForNumbers,
|
|
79
|
+
e as operatorOptionsForStrings
|
|
80
|
+
};
|
|
@@ -12,12 +12,12 @@ const e = {
|
|
|
12
12
|
<td align="left" width="70%" style="vertical-align: top;">
|
|
13
13
|
<table cellpadding="0" cellspacing="0" role="presentation" width="100%">
|
|
14
14
|
<tbody>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
<${t.BLOCK_TEXT}>
|
|
16
|
+
{-{-TITLE-}-}
|
|
17
|
+
</${t.BLOCK_TEXT}>
|
|
18
|
+
<${t.BLOCK_TEXT}>
|
|
19
|
+
{-{-DESCRIPTION-}-}
|
|
20
|
+
</${t.BLOCK_TEXT}>
|
|
21
21
|
</tbody>
|
|
22
22
|
</table>
|
|
23
23
|
</td>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Block, BlockCompositionType } from '@stripoinc/ui-editor-extensions';
|
|
2
|
+
export declare const BLOCK_ID = "recommendation-block";
|
|
3
|
+
export declare class RecommendationBlock extends Block {
|
|
4
|
+
getId(): string;
|
|
5
|
+
getIcon(): string;
|
|
6
|
+
getBlockCompositionType(): BlockCompositionType;
|
|
7
|
+
getName(): string;
|
|
8
|
+
getDescription(): string;
|
|
9
|
+
getTemplate(): string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Block as e, BlockCompositionType as t } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
2
|
+
import { getDefaultTemplate as o } from "./template.js";
|
|
3
|
+
const n = "recommendation-block";
|
|
4
|
+
class c extends e {
|
|
5
|
+
getId() {
|
|
6
|
+
return n;
|
|
7
|
+
}
|
|
8
|
+
getIcon() {
|
|
9
|
+
return "recommendation-icon";
|
|
10
|
+
}
|
|
11
|
+
getBlockCompositionType() {
|
|
12
|
+
return t.CONTAINER;
|
|
13
|
+
}
|
|
14
|
+
getName() {
|
|
15
|
+
return this.api.translate("Recommendation Block");
|
|
16
|
+
}
|
|
17
|
+
getDescription() {
|
|
18
|
+
return this.api.translate("Recommendation Block Title Description");
|
|
19
|
+
}
|
|
20
|
+
getTemplate() {
|
|
21
|
+
return o();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
n as BLOCK_ID,
|
|
26
|
+
c as RecommendationBlock
|
|
27
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CommonControl } from '../common-control';
|
|
2
|
+
export declare const CONTROL_BLOCK_ID = "ui-elements-recommendation-block";
|
|
3
|
+
export declare class RecommendationBlockControl extends CommonControl {
|
|
4
|
+
private store;
|
|
5
|
+
private storeUnsubscription;
|
|
6
|
+
private addFilterListener;
|
|
7
|
+
private addFilterButton;
|
|
8
|
+
getId(): string;
|
|
9
|
+
getTemplate(): string;
|
|
10
|
+
onRender(): Promise<void>;
|
|
11
|
+
onDestroy(): void;
|
|
12
|
+
_setFormValues(): void;
|
|
13
|
+
_initializeSelectItems(): void;
|
|
14
|
+
_getAlgorithms(): string;
|
|
15
|
+
_getLanguages(): string;
|
|
16
|
+
_getCurrency(): string;
|
|
17
|
+
_getProductLayout(): string;
|
|
18
|
+
_getFilterStatus(): string;
|
|
19
|
+
_getShuffleProducts(): string;
|
|
20
|
+
_getResponsive(): string;
|
|
21
|
+
_onFilterChange(value: boolean): void;
|
|
22
|
+
_onFilterSelectClick(): void;
|
|
23
|
+
_onDataChange(item: string, value: string | number | string[]): void;
|
|
24
|
+
_onCurrencyConfigChange(item: string, value: string | number): void;
|
|
25
|
+
_onCurrencyChange(value: string): void;
|
|
26
|
+
_setProductIdsVisibility(): void;
|
|
27
|
+
_listenToFormUpdates(): void;
|
|
28
|
+
_listenStateUpdates(): void;
|
|
29
|
+
}
|