@useinsider/guido 3.15.0-beta.360c5d6 → 3.15.0-beta.3794b87
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/components/organisms/header/EditorActions.vue.js +1 -1
- package/dist/components/organisms/header/EditorActions.vue2.js +47 -38
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +30 -28
- package/dist/{src/composables → composables}/useHttp.d.ts +6 -0
- package/dist/composables/useHttp.js +90 -57
- package/dist/extensions/Blocks/Items/block.js +42 -44
- package/dist/extensions/Blocks/Items/template.js +86 -86
- package/dist/guido.css +1 -1
- package/dist/stores/onboarding.js +25 -18
- package/dist/utils/pairProductVariables.js +92 -93
- package/package.json +1 -1
- /package/dist/{src/@types → @types}/config/defaults.d.ts +0 -0
- /package/dist/{src/@types → @types}/config/index.d.ts +0 -0
- /package/dist/{src/@types → @types}/config/schemas.d.ts +0 -0
- /package/dist/{src/@types → @types}/config/types.d.ts +0 -0
- /package/dist/{src/@types → @types}/config/validator.d.ts +0 -0
- /package/dist/{src/@types → @types}/events.d.ts +0 -0
- /package/dist/{src/@types → @types}/extensions/block.d.ts +0 -0
- /package/dist/{src/@types → @types}/generic.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}/Guido.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/AutoSaveController.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/DesktopBrowserHeader.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/AutoSaveToggle.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/header/EditorActions.vue.d.ts +0 -0
- /package/dist/{src/components → components}/organisms/header/EditorToolbar.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/MigrationConfirmModal.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/ItemsOnboarding.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}/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}/useAllowlist.d.ts +0 -0
- /package/dist/{src/composables → composables}/useAutoSave.d.ts +0 -0
- /package/dist/{src/composables → composables}/useBlocksConfig.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}/useCortexBlueprintBridge.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}/useEmailTemplateApplier.d.ts +0 -0
- /package/dist/{src/composables → composables}/useExport.d.ts +0 -0
- /package/dist/{src/composables → composables}/useFullStoryBridge.d.ts +0 -0
- /package/dist/{src/composables → composables}/useGuidoActions.d.ts +0 -0
- /package/dist/{src/composables → composables}/useGuidoStateBridge.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}/useModuleDynamicContentRepair.d.ts +0 -0
- /package/dist/{src/composables → composables}/usePartner.d.ts +0 -0
- /package/dist/{src/composables → composables}/usePreviewInteractionGuard.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}/useRecommendationPreview.d.ts +0 -0
- /package/dist/{src/composables → composables}/useResponsivePreview.d.ts +0 -0
- /package/dist/{src/composables → composables}/useRibbonOffset.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}/useStripoNotifications.d.ts +0 -0
- /package/dist/{src/composables → composables}/useSyncModuleExtractor.d.ts +0 -0
- /package/dist/{src/composables → composables}/useTimerClone.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}/useUserRole.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/composables → composables}/validators/useCouponBlockValidator.d.ts +0 -0
- /package/dist/{src/composables → composables}/validators/useLiquidValidator.d.ts +0 -0
- /package/dist/{src/composables → composables}/validators/useUnsubscribeBlockValidator.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/htmlCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/itemsCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/liquidCompilerRules.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}/compiler/utils/itemsCompilerUtils.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/utils/recommendationCompilerUtils.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/utils/recommendationIgnoreUtils.d.ts +0 -0
- /package/dist/{src/config → config}/i18n/en/index.d.ts +0 -0
- /package/dist/{src/config → config}/i18n/index.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/itemsBlockMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/productNameLinkMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/radioButtonMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/recommendation/compositionMapper.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/recommendation/extractors.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/recommendation/htmlBuilder.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/recommendation/parseLegacyConfig.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/recommendation/settingsMapper.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/recommendation/themeMapper.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/recommendation/types.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/recommendationMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/socialIconMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/textBlockMigration.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/unsubscribeMigrator.d.ts +0 -0
- /package/dist/{src/enums → enums}/academy.d.ts +0 -0
- /package/dist/{src/enums → enums}/block.d.ts +0 -0
- /package/dist/{src/enums → enums}/date.d.ts +0 -0
- /package/dist/{src/enums → enums}/defaults.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}/roles.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/constants.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/controls/index.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/Items/block.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/button/link.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/cardComposition.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/image/link.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/name/trimming.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/currencyLocation.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/currencySymbol.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/formattedPrice.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/hideDiscount.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/priceOrientation.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/price/singlePrice.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/controls/settingsControl.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/enums/controlEnums.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/enums/productEnums.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/enums/settingsEnums.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/utils/nameNode.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Items/utils/nodeConfigUtils.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/constants/blockIds.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/controlIds.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/defaultConfig.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/layout.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/selectors.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/blockBackground/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/button/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/cardBackground/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/cardComposition/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/customAttribute/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/customAttribute/textTrim.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/image/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/algorithm.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/currency.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/filters.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/layoutOrientation.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/locale.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/pricePlacement.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/productCount.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/productLayout.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/shuffle.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/main/utils.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/mobileLayout/cssRules.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/name/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/name/textTrim.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/oldPrice/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusDiscount/textAfter.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusDiscount/textBefore.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusPrice/textAfter.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/omnibusPrice/textBefore.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/price/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/shared/textTrimCssRules.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/spacing/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/syncInfoMessage.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/services/configService.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/services/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/store/recommendation.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/grid/elementRenderer.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/grid/migration.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/grid/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/list/elementRenderer.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/list/migration.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/list/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/utils.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/types/index.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/types/nodeConfig.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/useRecommendationBlockWarning.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/captureStyleTemplates.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/filterUtil.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/legacyStrategyMap.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/partnerCustomizations.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/priceFormatter.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/recommendationBlockCount.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/tagName.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/validation/filterSchema.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/validation/requiredFields.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 → extensions}/Blocks/Unsubscribe/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Unsubscribe/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions → 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 → 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/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}/Blocks/controlFactories.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 → extensions}/DynamicContent/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/ModulesTabIcons/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/settings.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}/allowlistApi.d.ts +0 -0
- /package/dist/{src/services → services}/blankTemplate.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/services → services}/unsubscribeApi.d.ts +0 -0
- /package/dist/{src/stores → stores}/autosave.d.ts +0 -0
- /package/dist/{src/stores → stores}/config.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}/guido-email-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}/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}/ampErrorFilter.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}/dynamicContentConverter.d.ts +0 -0
- /package/dist/{src/utils → utils}/environmentUtil.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}/htmlEscape.d.ts +0 -0
- /package/dist/{src/utils → utils}/migrationBannerHtml.d.ts +0 -0
- /package/dist/{src/utils → utils}/pairProductVariables.d.ts +0 -0
- /package/dist/{src/utils → utils}/preserveTextStyles.d.ts +0 -0
- /package/dist/{src/utils → utils}/registerUsedDynamicContent.d.ts +0 -0
- /package/dist/{src/utils → utils}/stripFontTags.d.ts +0 -0
- /package/dist/{src/utils → utils}/templatePreparation.d.ts +0 -0
- /package/dist/{src/utils → utils}/timeUtil.d.ts +0 -0
- /package/dist/{src/utils → utils}/tooltipUtils.d.ts +0 -0
- /package/dist/{src/utils → utils}/unwrapProductNameLink.d.ts +0 -0
- /package/dist/{src/utils → utils}/urlSchemes.d.ts +0 -0
|
@@ -1,66 +1,75 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useActionsApi as
|
|
1
|
+
import { defineComponent as q, ref as a, computed as h } from "vue";
|
|
2
|
+
import { useActionsApi as D } from "../../../composables/useActionsApi.js";
|
|
3
3
|
import { useConfig as b } from "../../../composables/useConfig.js";
|
|
4
4
|
import { useExport as k } from "../../../composables/useExport.js";
|
|
5
5
|
import { useTestEmailClick as B } from "../../../composables/useGuidoActions.js";
|
|
6
|
-
import { useHtmlCompiler as
|
|
7
|
-
import { useSave as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import K from "
|
|
17
|
-
|
|
6
|
+
import { useHtmlCompiler as F } from "../../../composables/useHtmlCompiler.js";
|
|
7
|
+
import { useSave as I } from "../../../composables/useSave.js";
|
|
8
|
+
import { useToaster as L } from "../../../composables/useToaster.js";
|
|
9
|
+
import { useTranslations as R } from "../../../composables/useTranslations.js";
|
|
10
|
+
import { useVersionHistoryApi as z } from "../../../composables/useVersionHistoryApi.js";
|
|
11
|
+
import { useLiquidValidator as G } from "../../../composables/validators/useLiquidValidator.js";
|
|
12
|
+
import { ToasterTypeOptions as P } from "../../../enums/toaster.js";
|
|
13
|
+
import { useEditorStore as U } from "../../../stores/editor.js";
|
|
14
|
+
import { useTemplateStore as j } from "../../../stores/template.js";
|
|
15
|
+
import { getTooltipOptions as J } from "../../../utils/tooltipUtils.js";
|
|
16
|
+
import { InButtonV2 as K } from "@useinsider/design-system-vue";
|
|
17
|
+
import { storeToRefs as N } from "pinia";
|
|
18
|
+
import Q from "./MigrationConfirmModal.vue.js";
|
|
19
|
+
const yo = /* @__PURE__ */ q({
|
|
18
20
|
__name: "EditorActions",
|
|
19
|
-
setup(
|
|
20
|
-
const { config:
|
|
21
|
+
setup(W, { expose: w }) {
|
|
22
|
+
const { config: n, isFeatureEnabled: l } = b(), { exportHtml: m } = k(), { save: c } = I(), { openVersionHistory: u, closeVersionHistory: p } = z(), { getCompiledEmail: f } = D(), { compileHtml: d } = F(), { validateLiquidSyntax: v } = G(), { showToaster: y } = L(), e = U(), g = j(), { hasMigrations: S } = N(g), r = R(), s = a(!1), i = a(!1), H = a(), T = B(), x = () => {
|
|
21
23
|
if (e.isVersionHistoryOpen) {
|
|
22
24
|
p();
|
|
23
25
|
return;
|
|
24
26
|
}
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
|
|
28
|
-
},
|
|
27
|
+
u();
|
|
28
|
+
}, _ = async () => {
|
|
29
|
+
s.value = !0, await m(), s.value = !1;
|
|
30
|
+
}, A = () => {
|
|
29
31
|
e.isSaveAsTemplateDrawerOpen = !0;
|
|
30
|
-
}, C = h(() => e.isVersionHistoryOpen ?
|
|
32
|
+
}, C = h(() => e.isVersionHistoryOpen ? r("newsletter.close-version-history") : r("newsletter.version-history")), O = h(
|
|
31
33
|
() => {
|
|
32
|
-
var
|
|
33
|
-
return ((
|
|
34
|
+
var o, t;
|
|
35
|
+
return ((t = (o = n.value) == null ? void 0 : o.features) == null ? void 0 : t.versionHistory) && !e.isPreviewModeOpen;
|
|
34
36
|
}
|
|
35
|
-
), V = async (
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
(o = S.value) == null || o.open();
|
|
37
|
+
), V = async (o) => {
|
|
38
|
+
i.value = !0, o || (e.loadingStatus = !0);
|
|
39
|
+
try {
|
|
40
|
+
const t = await c(o);
|
|
41
|
+
return !o && !t && (e.loadingStatus = !1), t;
|
|
42
|
+
} catch (t) {
|
|
43
|
+
console.error("[GUIDO_SAVE] save failed", t), o || (y({ type: P.Error, message: r("products.error-occurred") }), e.loadingStatus = !1);
|
|
43
44
|
return;
|
|
45
|
+
} finally {
|
|
46
|
+
i.value = !1;
|
|
44
47
|
}
|
|
45
|
-
|
|
48
|
+
}, E = (o) => {
|
|
49
|
+
var t;
|
|
50
|
+
if (!o && S.value) {
|
|
51
|
+
(t = H.value) == null || t.open();
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
return V(o);
|
|
46
55
|
}, M = async () => {
|
|
47
56
|
if (l("liquidSyntax")) {
|
|
48
57
|
e.loadingStatus = !0;
|
|
49
58
|
try {
|
|
50
|
-
const { html:
|
|
51
|
-
if (!await v(
|
|
59
|
+
const { html: o } = await f({ minimize: !0, resetDataSavedFlag: !1 }), { compiledHtml: t } = d(o);
|
|
60
|
+
if (!await v(t))
|
|
52
61
|
return;
|
|
53
62
|
} finally {
|
|
54
63
|
e.loadingStatus = !1;
|
|
55
64
|
}
|
|
56
65
|
}
|
|
57
|
-
|
|
66
|
+
T();
|
|
58
67
|
};
|
|
59
|
-
return
|
|
68
|
+
return w({
|
|
60
69
|
handleSave: E
|
|
61
|
-
}), { __sfc: !0, config:
|
|
70
|
+
}), { __sfc: !0, config: n, isFeatureEnabled: l, exportHtml: m, save: c, openVersionHistory: u, closeVersionHistory: p, getCompiledEmail: f, compileHtml: d, validateLiquidSyntax: v, showToaster: y, editorStore: e, templateStore: g, hasMigrations: S, trans: r, isExporting: s, isSaving: i, migrationModalRef: H, testEmailClick: T, handleVersionHistory: x, handleExport: _, handleSaveAs: A, versionHistoryTooltipText: C, isVersionHistoryButtonVisible: O, executeSave: V, handleSave: E, handleTestEmail: M, getTooltipOptions: J, InButtonV2: K, MigrationConfirmModal: Q };
|
|
62
71
|
}
|
|
63
72
|
});
|
|
64
73
|
export {
|
|
65
|
-
|
|
74
|
+
yo as default
|
|
66
75
|
};
|
|
@@ -1,46 +1,48 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as O, computed as e, onMounted as b, watch as t } from "vue";
|
|
2
2
|
import u from "./AMPOnboarding.vue.js";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { usePartner as
|
|
9
|
-
import { useEditorStore as
|
|
3
|
+
import l from "./GenericOnboarding.vue.js";
|
|
4
|
+
import v from "./ItemsOnboarding.vue.js";
|
|
5
|
+
import h from "./NewVersionPopup.vue.js";
|
|
6
|
+
import y from "./TextBlockOnboarding.vue.js";
|
|
7
|
+
import S from "./VersionHistoryOnboarding.vue.js";
|
|
8
|
+
import { usePartner as P } from "../../../composables/usePartner.js";
|
|
9
|
+
import { useEditorStore as w } from "../../../stores/editor.js";
|
|
10
10
|
import { useOnboardingStore as _ } from "../../../stores/onboarding.js";
|
|
11
11
|
import { usePreviewStore as A } from "../../../stores/preview.js";
|
|
12
|
-
const
|
|
12
|
+
const R = /* @__PURE__ */ O({
|
|
13
13
|
__name: "OnboardingWrapper",
|
|
14
14
|
emits: ["onboarding-finished"],
|
|
15
15
|
setup(H, { emit: f }) {
|
|
16
|
-
const
|
|
17
|
-
{ type: "newVersionPopup", component:
|
|
18
|
-
{ type: "genericOnboarding", component:
|
|
19
|
-
{ type: "textBlockOnboarding", component:
|
|
20
|
-
{ type: "versionHistoryOnboarding", component:
|
|
16
|
+
const r = _(), n = w(), s = A(), { isTestPartner: a } = P(), p = e(() => n.isStripoInitialized), d = e(() => a()), m = [
|
|
17
|
+
{ type: "newVersionPopup", component: h },
|
|
18
|
+
{ type: "genericOnboarding", component: l },
|
|
19
|
+
{ type: "textBlockOnboarding", component: y },
|
|
20
|
+
{ type: "versionHistoryOnboarding", component: S },
|
|
21
21
|
{ type: "ampOnboarding", component: u },
|
|
22
|
-
{ type: "itemsOnboarding", component:
|
|
23
|
-
], c = (
|
|
24
|
-
return
|
|
25
|
-
|
|
22
|
+
{ type: "itemsOnboarding", component: v }
|
|
23
|
+
], c = (o) => d.value || !p.value ? !1 : o === "newVersionPopup" ? r.shouldShowOnboarding(o) : r.isActive(o), g = e(() => m.filter((o) => c(o.type)));
|
|
24
|
+
return b(() => {
|
|
25
|
+
r.fetchUserModalState().catch((o) => {
|
|
26
|
+
console.error("[GUIDO_ONBOARDING] user modal state prefetch failed", o);
|
|
27
|
+
});
|
|
26
28
|
}), t(
|
|
27
|
-
() =>
|
|
28
|
-
(
|
|
29
|
-
|
|
29
|
+
() => n.isVersionHistoryOpen,
|
|
30
|
+
(o, i) => {
|
|
31
|
+
o && !i && r.shouldShowOnboarding("versionHistoryOnboarding") && r.start("versionHistoryOnboarding"), !o && i && r.isActive("versionHistoryOnboarding") && r.close("versionHistoryOnboarding");
|
|
30
32
|
}
|
|
31
33
|
), t(
|
|
32
34
|
() => s.emailFormat,
|
|
33
|
-
(
|
|
34
|
-
i !== "AMP" &&
|
|
35
|
+
(o, i) => {
|
|
36
|
+
i !== "AMP" && o === "AMP" && r.shouldShowOnboarding("ampOnboarding") && r.start("ampOnboarding");
|
|
35
37
|
}
|
|
36
38
|
), t(
|
|
37
|
-
() =>
|
|
38
|
-
(
|
|
39
|
-
!
|
|
39
|
+
() => n.isPreviewModeOpen,
|
|
40
|
+
(o) => {
|
|
41
|
+
!o && r.isActive("ampOnboarding") && r.close("ampOnboarding");
|
|
40
42
|
}
|
|
41
|
-
), { __sfc: !0, emit: f, onboardingStore:
|
|
43
|
+
), { __sfc: !0, emit: f, onboardingStore: r, editorStore: n, previewStore: s, isTestPartner: a, isStripoReady: p, isTestPartnerActive: d, onboardingConfigs: m, shouldShow: c, visibleOnboardings: g };
|
|
42
44
|
}
|
|
43
45
|
});
|
|
44
46
|
export {
|
|
45
|
-
|
|
47
|
+
R as default
|
|
46
48
|
};
|
|
@@ -17,6 +17,12 @@ export interface HttpError {
|
|
|
17
17
|
statusText?: string;
|
|
18
18
|
response?: Response;
|
|
19
19
|
}
|
|
20
|
+
export declare const TIMEOUT_ERROR_NAME = "TimeoutError";
|
|
21
|
+
export interface TimeoutErrorContext {
|
|
22
|
+
url: string;
|
|
23
|
+
method: HttpMethod;
|
|
24
|
+
timeout: number;
|
|
25
|
+
}
|
|
20
26
|
export declare const useHttp: (defaultOptions?: HttpOptions) => {
|
|
21
27
|
loading: import("vue").ComputedRef<boolean>;
|
|
22
28
|
error: import("vue").ComputedRef<{
|
|
@@ -1,86 +1,119 @@
|
|
|
1
|
-
import { getCsrfToken as
|
|
2
|
-
import { ref as
|
|
3
|
-
const
|
|
4
|
-
const
|
|
1
|
+
import { getCsrfToken as k } from "../utils/genericUtil.js";
|
|
2
|
+
import { ref as w, computed as C } from "vue";
|
|
3
|
+
const F = "TimeoutError", I = ($ = {}) => {
|
|
4
|
+
const T = w(!1), i = w(null), E = w(null), P = C(() => T.value), x = C(() => i.value !== null), A = {
|
|
5
5
|
baseURL: "",
|
|
6
6
|
timeout: 1e4,
|
|
7
7
|
retry: 0,
|
|
8
8
|
retryDelay: 1e3,
|
|
9
9
|
headers: {
|
|
10
10
|
"Content-Type": "application/json",
|
|
11
|
-
"X-CSRF-TOKEN":
|
|
11
|
+
"X-CSRF-TOKEN": k()
|
|
12
12
|
},
|
|
13
|
-
|
|
14
|
-
},
|
|
13
|
+
...$
|
|
14
|
+
}, L = (e, t) => {
|
|
15
15
|
if (e.startsWith("http://") || e.startsWith("https://"))
|
|
16
16
|
return e;
|
|
17
|
-
const
|
|
18
|
-
return
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
17
|
+
const r = t || A.baseURL || "";
|
|
18
|
+
return r.endsWith("/") && e.startsWith("/") ? `${r}${e.slice(1)}` : r.endsWith("/") || e.startsWith("/") ? `${r}${e}` : `${r}/${e}`;
|
|
19
|
+
}, O = (e, t, r, d) => {
|
|
20
|
+
let o;
|
|
21
|
+
return { promise: new Promise((m, a) => {
|
|
22
|
+
o = setTimeout(() => {
|
|
23
|
+
const l = new Error(
|
|
24
|
+
`Request timeout after ${e}ms: ${t} ${r.split("?")[0]}`
|
|
25
|
+
);
|
|
26
|
+
l.name = F, l.url = r, l.method = t, l.timeout = e, a(l), d.abort(l);
|
|
27
|
+
}, e);
|
|
28
|
+
}), clear: () => clearTimeout(o) };
|
|
29
|
+
}, b = (e) => {
|
|
30
|
+
if (e instanceof Error)
|
|
31
|
+
return e;
|
|
32
|
+
const t = new Error(typeof e == "string" ? e : "Request was cancelled");
|
|
33
|
+
return t.name = "AbortError", t;
|
|
34
|
+
}, U = (e, t) => {
|
|
35
|
+
let r;
|
|
36
|
+
return new Promise((d, o) => {
|
|
37
|
+
if (t.aborted) {
|
|
38
|
+
o(b(t.reason));
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const c = () => {
|
|
42
|
+
clearTimeout(r), o(b(t.reason));
|
|
43
|
+
};
|
|
44
|
+
r = setTimeout(() => {
|
|
45
|
+
t.removeEventListener("abort", c), d();
|
|
46
|
+
}, e), t.addEventListener("abort", c, { once: !0 });
|
|
47
|
+
});
|
|
48
|
+
}, u = async (e, t, r, d = {}) => {
|
|
49
|
+
i.value = null, T.value = !0;
|
|
50
|
+
const o = { ...A, ...d }, c = L(t, o.baseURL), m = {
|
|
28
51
|
method: e,
|
|
29
|
-
headers: { ...
|
|
30
|
-
|
|
31
|
-
...n
|
|
52
|
+
headers: { ...o.headers },
|
|
53
|
+
...o
|
|
32
54
|
};
|
|
33
|
-
|
|
34
|
-
const
|
|
55
|
+
r && ["POST", "PUT", "PATCH"].includes(e) && (r instanceof FormData ? (delete m.headers["Content-Type"], m.body = r) : m.body = JSON.stringify(r));
|
|
56
|
+
const a = new AbortController();
|
|
57
|
+
E.value = a;
|
|
58
|
+
const l = async (v = 0) => {
|
|
59
|
+
const h = new AbortController(), g = () => h.abort(a.signal.reason);
|
|
60
|
+
a.signal.aborted ? g() : a.signal.addEventListener("abort", g, { once: !0 });
|
|
61
|
+
const R = { ...m, signal: h.signal }, y = o.timeout ? O(o.timeout, e, c, h) : null;
|
|
35
62
|
try {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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;
|
|
63
|
+
const s = await (y ? Promise.race([fetch(c, R), y.promise]).finally(y.clear) : fetch(c, R));
|
|
64
|
+
if (!s.ok) {
|
|
65
|
+
const j = `HTTP Error: ${s.status} ${s.statusText}`, p = new Error(j);
|
|
66
|
+
throw p.status = s.status, p.statusText = s.statusText, p.response = s, p;
|
|
42
67
|
}
|
|
43
68
|
let f;
|
|
44
|
-
const
|
|
45
|
-
return
|
|
69
|
+
const n = s.headers.get("content-type");
|
|
70
|
+
return n != null && n.includes("application/json") ? f = await s.json() : n != null && n.includes("text/") ? f = await s.text() : f = await s.blob(), {
|
|
46
71
|
data: f,
|
|
47
|
-
status:
|
|
48
|
-
statusText:
|
|
49
|
-
headers:
|
|
72
|
+
status: s.status,
|
|
73
|
+
statusText: s.statusText,
|
|
74
|
+
headers: s.headers
|
|
50
75
|
};
|
|
51
|
-
} catch (
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
76
|
+
} catch (s) {
|
|
77
|
+
const f = s instanceof Error && s.name === "AbortError";
|
|
78
|
+
let n = s;
|
|
79
|
+
if (v < (o.retry || 0) && !f) {
|
|
80
|
+
if (await U(o.retryDelay || 1e3, a.signal).catch(() => {
|
|
81
|
+
}), !a.signal.aborted)
|
|
82
|
+
return await l(v + 1);
|
|
83
|
+
n = b(a.signal.reason);
|
|
84
|
+
}
|
|
85
|
+
throw n instanceof Error ? n.name === "AbortError" ? i.value = { message: "Request was cancelled" } : i.value = { message: n.message } : i.value = n, n;
|
|
86
|
+
} finally {
|
|
87
|
+
a.signal.removeEventListener("abort", g);
|
|
56
88
|
}
|
|
57
89
|
};
|
|
58
90
|
try {
|
|
59
|
-
return await
|
|
91
|
+
return await l();
|
|
60
92
|
} finally {
|
|
61
|
-
|
|
93
|
+
T.value = !1, E.value = null;
|
|
62
94
|
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
95
|
+
}, H = (e, t) => u("GET", e, void 0, t), W = (e, t, r) => u("POST", e, t, r), q = (e, t, r) => u("PUT", e, t, r), D = (e, t, r) => u("PATCH", e, t, r), S = (e, t) => u("DELETE", e, void 0, t), N = (e) => {
|
|
96
|
+
E.value && E.value.abort(b(e));
|
|
97
|
+
}, _ = () => {
|
|
98
|
+
i.value = null;
|
|
67
99
|
};
|
|
68
100
|
return {
|
|
69
101
|
// State
|
|
70
|
-
loading:
|
|
71
|
-
error:
|
|
72
|
-
hasError:
|
|
102
|
+
loading: P,
|
|
103
|
+
error: C(() => i.value),
|
|
104
|
+
hasError: x,
|
|
73
105
|
// Methods
|
|
74
|
-
request:
|
|
75
|
-
get:
|
|
76
|
-
post:
|
|
77
|
-
put:
|
|
78
|
-
patch:
|
|
79
|
-
delete:
|
|
80
|
-
cancel:
|
|
81
|
-
clearError:
|
|
106
|
+
request: u,
|
|
107
|
+
get: H,
|
|
108
|
+
post: W,
|
|
109
|
+
put: q,
|
|
110
|
+
patch: D,
|
|
111
|
+
delete: S,
|
|
112
|
+
cancel: N,
|
|
113
|
+
clearError: _
|
|
82
114
|
};
|
|
83
115
|
};
|
|
84
116
|
export {
|
|
85
|
-
|
|
117
|
+
F as TIMEOUT_ERROR_NAME,
|
|
118
|
+
I as useHttp
|
|
86
119
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { BlockId as
|
|
2
|
-
import { useOnboardingStore as
|
|
3
|
-
import { getMigrationBannerHtml as
|
|
4
|
-
import { Block as
|
|
5
|
-
import { SETTINGS_ENUMS as
|
|
6
|
-
import { getDefaultTemplate as
|
|
7
|
-
import { getItemsBlockContainer as
|
|
8
|
-
const p =
|
|
9
|
-
class
|
|
1
|
+
import { BlockId as f } from "../../../enums/block.js";
|
|
2
|
+
import { useOnboardingStore as g } from "../../../stores/onboarding.js";
|
|
3
|
+
import { getMigrationBannerHtml as y } from "../../../utils/migrationBannerHtml.js";
|
|
4
|
+
import { Block as I, BlockCompositionType as C, ModificationDescription as c } from "../../../node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js";
|
|
5
|
+
import { SETTINGS_ENUMS as d, DefaultConfigValues as m } from "./enums/settingsEnums.js";
|
|
6
|
+
import { getDefaultTemplate as b } from "./template.js";
|
|
7
|
+
import { getItemsBlockContainer as l, getItemsBlockConfig as u, deriveItemNumber as h, getDefaultItemsBlockConfig as N } from "./utils/nodeConfigUtils.js";
|
|
8
|
+
const p = f.Items;
|
|
9
|
+
class O extends I {
|
|
10
10
|
getId() {
|
|
11
11
|
return p;
|
|
12
12
|
}
|
|
@@ -14,7 +14,7 @@ class E extends C {
|
|
|
14
14
|
return "items-icon";
|
|
15
15
|
}
|
|
16
16
|
getBlockCompositionType() {
|
|
17
|
-
return
|
|
17
|
+
return C.CONTAINER;
|
|
18
18
|
}
|
|
19
19
|
getName() {
|
|
20
20
|
return this.api.translate("Items");
|
|
@@ -23,20 +23,20 @@ class E extends C {
|
|
|
23
23
|
return this.api.translate("Items lets you display personalized products based on user behavior.");
|
|
24
24
|
}
|
|
25
25
|
getSettingsPanelTitleHtml() {
|
|
26
|
-
return
|
|
26
|
+
return y(
|
|
27
27
|
p,
|
|
28
28
|
this.api.translate("Items"),
|
|
29
29
|
this.api.translate("This block is switched from the Old Version to the New Version. We recommend you check the Items block and test your message to ensure it works properly.")
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
getTemplate() {
|
|
33
|
-
return
|
|
34
|
-
orientation:
|
|
35
|
-
itemsType:
|
|
33
|
+
return b({
|
|
34
|
+
orientation: d.ORIENTATION.VERTICAL,
|
|
35
|
+
itemsType: d.ITEMS_TYPE.CART_ITEMS,
|
|
36
36
|
itemId: "{{Abandoned Cart Item (1) Url}}",
|
|
37
|
-
currencySymbol:
|
|
38
|
-
currencyLocation:
|
|
39
|
-
formattedPrice:
|
|
37
|
+
currencySymbol: m.productPriceCurrencySymbolControlValue,
|
|
38
|
+
currencyLocation: m.productPriceCurrencyLocationControlValue,
|
|
39
|
+
formattedPrice: m.productPriceFormattedControlValue === "1"
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
allowInnerBlocksDND() {
|
|
@@ -45,23 +45,23 @@ class E extends C {
|
|
|
45
45
|
canBeSavedAsModule() {
|
|
46
46
|
return !0;
|
|
47
47
|
}
|
|
48
|
-
onCreated(
|
|
49
|
-
const t = this.api.getDocumentModifier(),
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
if (!
|
|
48
|
+
onCreated(e) {
|
|
49
|
+
const t = this.api.getDocumentModifier(), o = this.api.getDocumentRootCssNode();
|
|
50
|
+
o.querySelector('[product-attr="imageSrc"] img') || t.modifyCss(o).appendRule('[product-attr="imageSrc"] img {object-fit: contain;}');
|
|
51
|
+
const i = l(e);
|
|
52
|
+
if (!i)
|
|
53
53
|
return;
|
|
54
|
-
const
|
|
55
|
-
if (
|
|
56
|
-
if (
|
|
57
|
-
|
|
54
|
+
const r = i.getNodeConfig(), s = r && Object.keys(r).length > 0, n = u(e);
|
|
55
|
+
if (n != null && n.initialized)
|
|
56
|
+
if (s)
|
|
57
|
+
n.blockInstanceId || this.api.getDocumentModifier().modifyHtml(i).setNodeConfig({ ...n, blockInstanceId: String(Date.now()) }).apply(new c("Assign block instance ID to block"));
|
|
58
58
|
else {
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const a = this.api.getDocumentModifier();
|
|
60
|
+
a.modifyHtml(i).setNodeConfig(n), this._stampProductTdDomAttributes(i, n, a), a.apply(new c("Migrate legacy config to nodeConfig"));
|
|
61
61
|
}
|
|
62
62
|
else {
|
|
63
|
-
const
|
|
64
|
-
|
|
63
|
+
const a = N();
|
|
64
|
+
this.api.getDocumentModifier().modifyHtml(i).setNodeConfig(a).apply(new c("Initialize Items block with default configuration")), g().startOnboarding("itemsOnboarding");
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
/**
|
|
@@ -70,18 +70,18 @@ class E extends C {
|
|
|
70
70
|
* into nodeConfig, so without this a reused module would reset to defaults.
|
|
71
71
|
* Guarded to the nodeConfig-empty case so it runs once and never loops.
|
|
72
72
|
*/
|
|
73
|
-
onDocumentChanged(
|
|
74
|
-
const t =
|
|
73
|
+
onDocumentChanged(e) {
|
|
74
|
+
const t = l(e);
|
|
75
75
|
if (!t)
|
|
76
76
|
return;
|
|
77
|
-
const
|
|
78
|
-
if (
|
|
77
|
+
const o = t.getNodeConfig();
|
|
78
|
+
if (o && Object.keys(o).length > 0)
|
|
79
79
|
return;
|
|
80
|
-
const
|
|
81
|
-
if (!(
|
|
80
|
+
const r = u(e);
|
|
81
|
+
if (!(r != null && r.initialized))
|
|
82
82
|
return;
|
|
83
|
-
const
|
|
84
|
-
|
|
83
|
+
const s = this.api.getDocumentModifier();
|
|
84
|
+
s.modifyHtml(t).setNodeConfig(r), this._stampProductTdDomAttributes(t, r, s), s.apply(new c("Recover Items block config from saved module"));
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
* Bakes the compiler-read DOM attributes (`data-type`, `data-number`, `data-nodup`) onto the
|
|
@@ -91,14 +91,12 @@ class E extends C {
|
|
|
91
91
|
* restored before export. The name `<a>` carries no data-type/data-number of its own and
|
|
92
92
|
* relies on this td-level fallback in pairProductVariables.
|
|
93
93
|
*/
|
|
94
|
-
_stampProductTdDomAttributes(
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
};
|
|
98
|
-
r("data-type", t.type), r("data-number", o), r("data-nodup", String(t.priceHideDiscount));
|
|
94
|
+
_stampProductTdDomAttributes(e, t, o) {
|
|
95
|
+
const i = h(t.itemsSelectValue, t.type);
|
|
96
|
+
o.modifyHtml(e).setAttribute("data-type", t.type), o.modifyHtml(e).setAttribute("data-number", i), o.modifyHtml(e).setAttribute("data-nodup", String(t.priceHideDiscount));
|
|
99
97
|
}
|
|
100
98
|
}
|
|
101
99
|
export {
|
|
102
100
|
p as BLOCK_ID,
|
|
103
|
-
|
|
101
|
+
O as ItemsBlock
|
|
104
102
|
};
|