@useinsider/guido 3.14.0-beta.1e474dd → 3.14.0-beta.2bae355
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 -39
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +30 -28
- package/dist/{src/composables → composables}/useHtmlValidator.d.ts +2 -3
- package/dist/composables/useHtmlValidator.js +50 -50
- package/dist/{src/composables → composables}/useHttp.d.ts +6 -0
- package/dist/composables/useHttp.js +66 -59
- package/dist/config/i18n/en/labels.json.js +3 -7
- package/dist/config/migrator/recommendation/compositionMapper.js +23 -26
- package/dist/config/migrator/recommendation/htmlBuilder.js +155 -156
- package/dist/{src/config → config}/migrator/recommendation/types.d.ts +0 -1
- package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/index.d.ts +1 -1
- package/dist/{src/extensions → extensions}/Blocks/Recommendation/constants/selectors.d.ts +0 -4
- package/dist/extensions/Blocks/Recommendation/constants/selectors.js +13 -15
- package/dist/{src/extensions → extensions}/Blocks/Recommendation/controls/cardComposition/index.d.ts +5 -22
- package/dist/extensions/Blocks/Recommendation/controls/cardComposition/index.js +314 -346
- package/dist/extensions/Blocks/Recommendation/controls/main/utils.js +43 -44
- package/dist/extensions/Blocks/Recommendation/templates/grid/template.js +16 -16
- package/dist/extensions/Blocks/Recommendation/templates/list/template.js +16 -16
- package/dist/{src/extensions → extensions}/Blocks/Recommendation/templates/utils.d.ts +11 -12
- package/dist/extensions/Blocks/Recommendation/templates/utils.js +120 -120
- package/dist/extensions/Blocks/Recommendation/utils/captureStyleTemplates.js +54 -55
- package/dist/{src/extensions → extensions}/Blocks/common-control.d.ts +1 -3
- package/dist/extensions/Blocks/common-control.js +35 -42
- package/dist/guido.css +1 -1
- package/package.json +1 -1
- package/dist/extensions/Blocks/Recommendation/utils/compositionKeys.js +0 -89
- package/dist/src/extensions/Blocks/Recommendation/utils/compositionKeys.d.ts +0 -52
- /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}/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/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/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/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/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/layout.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/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/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/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}/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}/urlSchemes.d.ts +0 -0
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { ATTR_PRODUCT_PRICE as
|
|
2
|
-
import { useRecommendationExtensionStore as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const t = L(), { currencySettings: e } = t.recommendationConfigs;
|
|
1
|
+
import { ATTR_PRODUCT_PRICE as c, ATTR_PRODUCT_OLD_PRICE as l, ATTR_CUSTOM_PREFIX as a, PRODUCT_ATTRIBUTE_PREFIX as u, ATTR_PRODUCT_IMAGE as f, ATTR_PRODUCT_NAME as T, ATTR_PRODUCT_OMNIBUS_PRICE as C, ATTR_PRODUCT_OMNIBUS_DISCOUNT as p, ATTR_PRODUCT_BUTTON as _ } from "../constants/selectors.js";
|
|
2
|
+
import { useRecommendationExtensionStore as D } from "../store/recommendation.js";
|
|
3
|
+
import { formatPrice as O } from "../utils/priceFormatter.js";
|
|
4
|
+
function E() {
|
|
5
|
+
const t = D(), { currencySettings: e } = t.recommendationConfigs;
|
|
7
6
|
return {
|
|
8
7
|
code: e.value,
|
|
9
8
|
symbol: e.symbol,
|
|
@@ -13,136 +12,137 @@ function k() {
|
|
|
13
12
|
thousandSeparator: e.thousandSeparator
|
|
14
13
|
};
|
|
15
14
|
}
|
|
16
|
-
function
|
|
17
|
-
const
|
|
18
|
-
return
|
|
19
|
-
price:
|
|
20
|
-
currency:
|
|
15
|
+
function m(t, e = "price") {
|
|
16
|
+
const n = E(), o = t[e], r = (o == null ? void 0 : o[n.code]) ?? Object.values(o ?? {})[0] ?? 0;
|
|
17
|
+
return O({
|
|
18
|
+
price: r,
|
|
19
|
+
currency: n
|
|
21
20
|
});
|
|
22
21
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
22
|
+
function Y(t) {
|
|
23
|
+
return m(t, "price") === m(t, "original_price");
|
|
25
24
|
}
|
|
26
|
-
function
|
|
25
|
+
function I(t) {
|
|
27
26
|
return t.replace(/_/g, " ").replace(/\b\w/g, (e) => e.toUpperCase());
|
|
28
27
|
}
|
|
29
|
-
function
|
|
30
|
-
const e = t.indexOf(
|
|
28
|
+
function G(t) {
|
|
29
|
+
const e = t.indexOf(c), n = t.indexOf(l), o = n !== -1 && (e === -1 || n < e);
|
|
31
30
|
return {
|
|
32
|
-
originalFirst:
|
|
33
|
-
anchor:
|
|
34
|
-
skip:
|
|
31
|
+
originalFirst: o,
|
|
32
|
+
anchor: o ? l : c,
|
|
33
|
+
skip: o ? c : l
|
|
35
34
|
};
|
|
36
35
|
}
|
|
37
|
-
function
|
|
36
|
+
function $(t) {
|
|
38
37
|
const e = Array.isArray(t) ? t[t.length - 1] : t;
|
|
39
38
|
if (typeof e == "string")
|
|
40
39
|
return e;
|
|
41
40
|
if (typeof e == "number")
|
|
42
41
|
return String(e);
|
|
43
42
|
}
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
return (
|
|
43
|
+
function h(t, e) {
|
|
44
|
+
const n = Object.values(e).find((o) => o.attributeName === t);
|
|
45
|
+
return (n == null ? void 0 : n.type) === "defaultAttribute";
|
|
47
46
|
}
|
|
48
|
-
function
|
|
49
|
-
return
|
|
47
|
+
function L(t, e) {
|
|
48
|
+
return h(t, e) ? t : `${u}${t}`;
|
|
50
49
|
}
|
|
51
|
-
function
|
|
52
|
-
|
|
50
|
+
function j(t) {
|
|
51
|
+
const e = t.startsWith(u) ? t.substring(u.length) : t;
|
|
52
|
+
return `${a}${e}`;
|
|
53
53
|
}
|
|
54
|
-
const
|
|
55
|
-
function
|
|
56
|
-
const
|
|
57
|
-
if (!
|
|
54
|
+
const x = Symbol("customCellHtml");
|
|
55
|
+
function z(t, e, n = {}) {
|
|
56
|
+
const o = t[x];
|
|
57
|
+
if (!o)
|
|
58
58
|
return { ...t };
|
|
59
|
-
const
|
|
60
|
-
return e.filter((s) => s.startsWith(
|
|
61
|
-
const i =
|
|
62
|
-
|
|
63
|
-
var
|
|
64
|
-
const
|
|
65
|
-
return
|
|
59
|
+
const r = { ...t };
|
|
60
|
+
return e.filter((s) => s.startsWith(a) && !r[s]).forEach((s) => {
|
|
61
|
+
const i = s.substring(a.length), d = I(i), S = L(i, n), A = h(i, n);
|
|
62
|
+
r[s] = (g, R) => {
|
|
63
|
+
var b;
|
|
64
|
+
const P = A ? g[i] : (b = g.product_attributes) == null ? void 0 : b[i], U = $(P) ?? d;
|
|
65
|
+
return o(S, U, R);
|
|
66
66
|
};
|
|
67
|
-
}),
|
|
67
|
+
}), r;
|
|
68
68
|
}
|
|
69
|
-
function
|
|
70
|
-
|
|
69
|
+
function V(t, e) {
|
|
70
|
+
var n, o, r, s, i;
|
|
71
71
|
return {
|
|
72
72
|
cellPadding: e.cellPadding,
|
|
73
73
|
cardBackgroundColor: e.cardBackgroundColor,
|
|
74
|
-
cellBackgroundColor:
|
|
75
|
-
cellAlignment:
|
|
76
|
-
cellClasses:
|
|
77
|
-
omnibusText:
|
|
78
|
-
styleTemplate: i
|
|
74
|
+
cellBackgroundColor: (n = e.cellBackgroundColors) == null ? void 0 : n[t],
|
|
75
|
+
cellAlignment: (o = e.cellAlignments) == null ? void 0 : o[t],
|
|
76
|
+
cellClasses: (r = e.cellClasses) == null ? void 0 : r[t],
|
|
77
|
+
omnibusText: (s = e.omnibusTexts) == null ? void 0 : s[t],
|
|
78
|
+
styleTemplate: (i = e.styleTemplates) == null ? void 0 : i[t]
|
|
79
79
|
};
|
|
80
80
|
}
|
|
81
|
-
const
|
|
81
|
+
const X = {
|
|
82
82
|
TITLE: "You May Also Like!"
|
|
83
|
-
},
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
a,
|
|
83
|
+
}, K = [
|
|
84
|
+
f,
|
|
85
|
+
T,
|
|
87
86
|
l,
|
|
88
|
-
|
|
87
|
+
c,
|
|
88
|
+
C,
|
|
89
89
|
p,
|
|
90
|
-
|
|
91
|
-
],
|
|
92
|
-
[
|
|
93
|
-
[
|
|
90
|
+
_
|
|
91
|
+
], q = {
|
|
92
|
+
[f]: !0,
|
|
93
|
+
[T]: !0,
|
|
94
|
+
[c]: !0,
|
|
94
95
|
[l]: !0,
|
|
95
|
-
[
|
|
96
|
-
[_]: !1,
|
|
96
|
+
[C]: !1,
|
|
97
97
|
[p]: !1,
|
|
98
|
-
[
|
|
99
|
-
},
|
|
100
|
-
function
|
|
98
|
+
[_]: !0
|
|
99
|
+
}, B = 10;
|
|
100
|
+
function k(t = B) {
|
|
101
101
|
return `
|
|
102
102
|
<tr>
|
|
103
103
|
<td class="spacer" style="height: ${t}px;"></td>
|
|
104
104
|
</tr>
|
|
105
105
|
`;
|
|
106
106
|
}
|
|
107
|
-
const
|
|
108
|
-
function
|
|
107
|
+
const v = k();
|
|
108
|
+
function w(t, e) {
|
|
109
109
|
return e ? e.pStyle ?? "" : t;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
const
|
|
113
|
-
return `<p contenteditable="false" style="${
|
|
111
|
+
function J(t, e, n) {
|
|
112
|
+
const o = w(e.pStyle, n), r = n ? n.openTags ?? "" : e.openTags, s = n ? n.closeTags ?? "" : e.closeTags;
|
|
113
|
+
return `<p contenteditable="false" style="${o}">${r}${t}${s}</p>`;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
const
|
|
117
|
-
return t &&
|
|
115
|
+
function Q(t, e) {
|
|
116
|
+
const n = [];
|
|
117
|
+
return t && n.push(t), e && n.push(`background-color: ${e};`), n.join(" ");
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function N(t) {
|
|
120
120
|
return t ? ` background-color: ${t};` : "";
|
|
121
121
|
}
|
|
122
|
-
function
|
|
123
|
-
const e =
|
|
122
|
+
function Z(t) {
|
|
123
|
+
const e = N(t);
|
|
124
124
|
return e ? ` style="${e.trim()}"` : "";
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function tt(t, e = "") {
|
|
127
127
|
return {
|
|
128
128
|
before: (t == null ? void 0 : t.before) ?? e,
|
|
129
129
|
after: (t == null ? void 0 : t.after) ?? ""
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function et(t, e) {
|
|
133
133
|
return `${(e == null ? void 0 : e.openTags) ?? ""}${t}${(e == null ? void 0 : e.closeTags) ?? ""}`;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
135
|
+
function nt(t) {
|
|
136
136
|
return t != null && t.buttonFitToContainer ? "es-button-border es-fw" : "es-button-border";
|
|
137
137
|
}
|
|
138
|
-
const
|
|
139
|
-
function
|
|
140
|
-
return !t || typeof t != "string" || t.trim() === "" ?
|
|
138
|
+
const ot = "display: block; max-width: 100%; height: auto;", rt = "border-width: 1px; background: rgb(217, 234, 211); border-color: rgb(106, 168, 79);", st = "color: rgb(56, 118, 29); background: rgb(217, 234, 211); font-family: arial, 'helvetica neue', helvetica, sans-serif; font-size: 16px; font-weight: normal; line-height: 120%; mso-border-alt: 10px solid rgb(217, 234, 211); mso-padding-alt: 0;", y = "https://email-static.useinsider.com/stripo/modules/email-recommendation-v3/assets/images/image-placeholder.png";
|
|
139
|
+
function it(t) {
|
|
140
|
+
return !t || typeof t != "string" || t.trim() === "" ? y : t.startsWith("http://") ? t.replace("http://", "https://") : t;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function F(t) {
|
|
143
143
|
return {
|
|
144
144
|
name: "Product Name",
|
|
145
|
-
image_url:
|
|
145
|
+
image_url: y,
|
|
146
146
|
price: { USD: 18 },
|
|
147
147
|
original_price: { USD: 20 },
|
|
148
148
|
discount: { USD: 2 },
|
|
@@ -154,19 +154,19 @@ function G(t) {
|
|
|
154
154
|
category: []
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function ct(t = 6) {
|
|
158
158
|
return Array.from(
|
|
159
159
|
{ length: t },
|
|
160
|
-
(e,
|
|
160
|
+
(e, n) => F(String(n + 1))
|
|
161
161
|
);
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
const
|
|
165
|
-
data-layout="list"` : "",
|
|
163
|
+
function lt(t = "grid", e) {
|
|
164
|
+
const n = t === "list" ? `
|
|
165
|
+
data-layout="list"` : "", o = e ? ` ${e}` : "";
|
|
166
166
|
return `
|
|
167
167
|
<td
|
|
168
168
|
align="left"
|
|
169
|
-
class="${`recommendation-block-v2 esd-block-recommendation-v3-block es-p20${t === "list" ? " es-m-p0 ins-recommendation-list-layout" : ""}${
|
|
169
|
+
class="${`recommendation-block-v2 esd-block-recommendation-v3-block es-p20${t === "list" ? " es-m-p0 ins-recommendation-list-layout" : ""}${o}`}"${n}>
|
|
170
170
|
<table width="100%" cellpadding="0" cellspacing="0" border="0">
|
|
171
171
|
<tr>
|
|
172
172
|
<td align="center">
|
|
@@ -198,7 +198,7 @@ function Tt(t = "grid", e) {
|
|
|
198
198
|
</table>
|
|
199
199
|
</td>
|
|
200
200
|
</tr>
|
|
201
|
-
${
|
|
201
|
+
${v}
|
|
202
202
|
<tr>
|
|
203
203
|
<td>
|
|
204
204
|
<table
|
|
@@ -237,37 +237,37 @@ function Tt(t = "grid", e) {
|
|
|
237
237
|
`;
|
|
238
238
|
}
|
|
239
239
|
export {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
240
|
+
x as CUSTOM_CELL_HTML,
|
|
241
|
+
X as DEFAULTS,
|
|
242
|
+
st as DEFAULT_BUTTON_ANCHOR_STYLE,
|
|
243
|
+
rt as DEFAULT_BUTTON_BORDER_STYLE,
|
|
244
|
+
K as DEFAULT_CARD_COMPOSITION,
|
|
245
|
+
q as DEFAULT_CARD_VISIBILITY,
|
|
246
|
+
ot as DEFAULT_IMG_STYLE,
|
|
247
|
+
B as DEFAULT_ROW_SPACING_PX,
|
|
248
|
+
y as PLACEHOLDER_IMAGE,
|
|
249
|
+
N as bgColorFragment,
|
|
250
|
+
V as buildCellOptions,
|
|
251
|
+
z as buildElementRenderer,
|
|
252
|
+
k as buildSpacer,
|
|
253
|
+
Z as cellBgStyleAttr,
|
|
254
|
+
lt as createBlockTemplate,
|
|
255
|
+
m as formatProductPrice,
|
|
256
|
+
E as getCurrentCurrencyConfig,
|
|
257
|
+
ct as getDefaultProducts,
|
|
258
|
+
h as isDefaultAttribute,
|
|
259
|
+
Y as isSamePrice,
|
|
260
|
+
et as renderButtonLabel,
|
|
261
|
+
J as renderStyledParagraph,
|
|
262
|
+
nt as resolveButtonBorderClass,
|
|
263
|
+
G as resolveInlinePriceOrder,
|
|
264
|
+
tt as resolveOmnibusText,
|
|
265
|
+
w as resolvePStyle,
|
|
266
|
+
L as resolveProductAttrValue,
|
|
267
|
+
Q as resolveSegmentBgStyle,
|
|
268
|
+
it as sanitizeImageUrl,
|
|
269
|
+
v as spacer,
|
|
270
|
+
j as toCustomCompositionKey,
|
|
271
|
+
I as toDisplayName,
|
|
272
|
+
$ as toDisplayableAttributeValue
|
|
273
273
|
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { extractWrapperTags as C } from "../../../../utils/preserveTextStyles.js";
|
|
2
2
|
import { RecommendationBlockId as c } from "../constants/blockIds.js";
|
|
3
3
|
import { DESKTOP_CONTAINER_SELECTOR as S, ATTR_PRODUCT_NAME as E, ATTR_PRODUCT_PRICE as p, ATTR_PRODUCT_OLD_PRICE as y, ATTR_PRODUCT_OMNIBUS_PRICE as A, ATTR_PRODUCT_OMNIBUS_DISCOUNT as R, ATTR_PRODUCT_BUTTON as P, ATTR_PRODUCT_IMAGE as q, ATTR_PRODUCT_ATTR as x } from "../constants/selectors.js";
|
|
4
|
-
import { CSS_CLASS_TEXT_TRIM as
|
|
5
|
-
import { toCustomCompositionKey as
|
|
6
|
-
import {
|
|
7
|
-
import { hasQuerySelectorAll as _, hasGetAttribute as l, hasGetStyle as I, hasGetComputedStyle as N } from "./tagName.js";
|
|
4
|
+
import { CSS_CLASS_TEXT_TRIM as B } from "../controls/shared/textTrimCssRules.js";
|
|
5
|
+
import { toCustomCompositionKey as v } from "../templates/utils.js";
|
|
6
|
+
import { hasQuerySelectorAll as _, hasGetAttribute as l, hasGetStyle as I, hasGetComputedStyle as U } from "./tagName.js";
|
|
8
7
|
const s = [
|
|
9
8
|
"font-size",
|
|
10
9
|
"font-family",
|
|
@@ -14,14 +13,14 @@ const s = [
|
|
|
14
13
|
"text-align",
|
|
15
14
|
"line-height",
|
|
16
15
|
"text-decoration"
|
|
17
|
-
],
|
|
16
|
+
], N = [
|
|
18
17
|
"background",
|
|
19
18
|
"background-color",
|
|
20
19
|
"border-width",
|
|
21
20
|
"border-color",
|
|
22
21
|
"border-style",
|
|
23
22
|
"border-radius"
|
|
24
|
-
],
|
|
23
|
+
], M = [
|
|
25
24
|
...s,
|
|
26
25
|
"background",
|
|
27
26
|
"background-color",
|
|
@@ -32,14 +31,14 @@ const s = [
|
|
|
32
31
|
"width",
|
|
33
32
|
"mso-border-alt",
|
|
34
33
|
"mso-padding-alt"
|
|
35
|
-
],
|
|
34
|
+
], D = [
|
|
36
35
|
"display",
|
|
37
36
|
"width",
|
|
38
37
|
"height",
|
|
39
38
|
"max-width",
|
|
40
39
|
"border-radius",
|
|
41
40
|
"margin"
|
|
42
|
-
],
|
|
41
|
+
], b = /* @__PURE__ */ new Set(["transparent", "rgba(0, 0, 0, 0)"]), G = [
|
|
43
42
|
{ attrKey: E, blockId: c.NAME, kind: "text" },
|
|
44
43
|
{ attrKey: p, blockId: c.PRICE, kind: "text" },
|
|
45
44
|
{ attrKey: y, blockId: c.OLD_PRICE, kind: "text" },
|
|
@@ -51,7 +50,7 @@ const s = [
|
|
|
51
50
|
function O(t) {
|
|
52
51
|
return t && "getInnerHTML" in t && typeof t.getInnerHTML == "function" ? t.getInnerHTML().trim() : "";
|
|
53
52
|
}
|
|
54
|
-
function
|
|
53
|
+
function L(t) {
|
|
55
54
|
return t && "getInnerText" in t && typeof t.getInnerText == "function" ? t.getInnerText().trim() : "";
|
|
56
55
|
}
|
|
57
56
|
function a(t, e, r) {
|
|
@@ -67,20 +66,20 @@ function k(t) {
|
|
|
67
66
|
if (!t || !I(t))
|
|
68
67
|
return;
|
|
69
68
|
const e = t.getStyle("background-color") || t.getStyle("background");
|
|
70
|
-
return e && !
|
|
69
|
+
return e && !b.has(e) ? e : void 0;
|
|
71
70
|
}
|
|
72
|
-
function
|
|
71
|
+
function g(t, e) {
|
|
73
72
|
const r = {};
|
|
74
73
|
return a(r, t, e), h(r);
|
|
75
74
|
}
|
|
76
|
-
function
|
|
75
|
+
function w(t) {
|
|
77
76
|
const e = t.querySelector("p"), r = {};
|
|
78
77
|
a(r, t, s), a(r, e, s), a(r, t.querySelector("strong"), s), a(r, t.querySelector("em"), s), a(r, t.querySelector("s"), s);
|
|
79
78
|
const n = h(r), { openTags: o, closeTags: i } = C(O(e));
|
|
80
79
|
return !n && !o ? null : { pStyle: n || void 0, openTags: o, closeTags: i };
|
|
81
80
|
}
|
|
82
81
|
function $(t) {
|
|
83
|
-
const e = t.querySelector(".es-button-border"), r = t.querySelector("a.es-button") ?? t.querySelector("a"), n =
|
|
82
|
+
const e = t.querySelector(".es-button-border"), r = t.querySelector("a.es-button") ?? t.querySelector("a"), n = g(e, N), o = g(r, M), i = e && "getAttribute" in e ? e.getAttribute("class") ?? "" : "", u = /\bes-fw\b/.test(i), { openTags: T, closeTags: d } = C(O(r)), m = L(r);
|
|
84
83
|
return !n && !o && !u && !T && !m ? null : {
|
|
85
84
|
buttonBorderStyle: n || void 0,
|
|
86
85
|
buttonAnchorStyle: o || void 0,
|
|
@@ -90,18 +89,18 @@ function $(t) {
|
|
|
90
89
|
closeTags: d
|
|
91
90
|
};
|
|
92
91
|
}
|
|
93
|
-
function
|
|
94
|
-
const e =
|
|
92
|
+
function K(t) {
|
|
93
|
+
const e = g(t.querySelector("img"), D);
|
|
95
94
|
return e ? { imgStyle: e } : null;
|
|
96
95
|
}
|
|
97
|
-
function
|
|
98
|
-
return e === "button" ? $(t) : e === "image" ?
|
|
96
|
+
function H(t, e) {
|
|
97
|
+
return e === "button" ? $(t) : e === "image" ? K(t) : w(t);
|
|
99
98
|
}
|
|
100
99
|
function f(t, e) {
|
|
101
100
|
if (!t || !("querySelector" in t))
|
|
102
101
|
return;
|
|
103
102
|
const r = t.querySelector(S) ?? t;
|
|
104
|
-
if (
|
|
103
|
+
if (G.forEach(({ attrKey: i, blockId: u, kind: T }) => {
|
|
105
104
|
const d = r.querySelector(`[esd-extension-block-id="${u}"]`);
|
|
106
105
|
d && e(d, i, T);
|
|
107
106
|
}), !_(r))
|
|
@@ -111,46 +110,46 @@ function f(t, e) {
|
|
|
111
110
|
`[esd-extension-block-id="${c.CUSTOM_ATTRIBUTE}"]`
|
|
112
111
|
).forEach((i) => {
|
|
113
112
|
const u = l(i) ? i.getAttribute(x) : null;
|
|
114
|
-
!u || n.has(u) || (n.add(u), e(i,
|
|
113
|
+
!u || n.has(u) || (n.add(u), e(i, v(u), "text"));
|
|
115
114
|
});
|
|
116
115
|
}
|
|
117
|
-
function
|
|
116
|
+
function F(t) {
|
|
118
117
|
const e = {};
|
|
119
118
|
return f(t, (r, n, o) => {
|
|
120
119
|
if (!("querySelector" in r))
|
|
121
120
|
return;
|
|
122
|
-
const i =
|
|
121
|
+
const i = H(r, o);
|
|
123
122
|
i && (e[n] = i);
|
|
124
123
|
}), e;
|
|
125
124
|
}
|
|
126
|
-
function
|
|
125
|
+
function j(t) {
|
|
127
126
|
if (!t || !("querySelector" in t))
|
|
128
127
|
return;
|
|
129
128
|
const e = t.querySelector(S) ?? t, r = e.querySelector(".product-card-segment") ?? e.querySelector(".product-card-wrapper");
|
|
130
129
|
return k(r);
|
|
131
130
|
}
|
|
132
|
-
function
|
|
131
|
+
function X(t) {
|
|
133
132
|
if (!t)
|
|
134
133
|
return;
|
|
135
134
|
const e = l(t) ? t.getAttribute("bgcolor") : null;
|
|
136
|
-
if (e && !
|
|
135
|
+
if (e && !b.has(e))
|
|
137
136
|
return e;
|
|
138
137
|
const r = k(t);
|
|
139
138
|
if (r)
|
|
140
139
|
return r;
|
|
141
|
-
const n =
|
|
142
|
-
return n && !
|
|
140
|
+
const n = U(t) ? t.getComputedStyle("background-color") : void 0;
|
|
141
|
+
return n && !b.has(n) ? n : void 0;
|
|
143
142
|
}
|
|
144
|
-
function
|
|
143
|
+
function z(t) {
|
|
145
144
|
const e = {};
|
|
146
145
|
return f(t, (r, n, o) => {
|
|
147
146
|
if (o !== "text")
|
|
148
147
|
return;
|
|
149
|
-
const i =
|
|
148
|
+
const i = X(r);
|
|
150
149
|
i && (e[n] = i);
|
|
151
150
|
}), e;
|
|
152
151
|
}
|
|
153
|
-
function
|
|
152
|
+
function Q(t) {
|
|
154
153
|
const e = {};
|
|
155
154
|
return f(t, (r, n, o) => {
|
|
156
155
|
if (o === "image")
|
|
@@ -159,30 +158,30 @@ function V(t) {
|
|
|
159
158
|
i && (e[n] = i);
|
|
160
159
|
}), e;
|
|
161
160
|
}
|
|
162
|
-
const
|
|
163
|
-
function
|
|
161
|
+
const V = /^es-[pm]\d+[trbl]?$/;
|
|
162
|
+
function W(t) {
|
|
164
163
|
const e = l(t) ? t.getAttribute("class") : null;
|
|
165
164
|
if (!e)
|
|
166
165
|
return;
|
|
167
|
-
const r = e.split(/\s+/).filter((n) =>
|
|
166
|
+
const r = e.split(/\s+/).filter((n) => V.test(n) || n === B);
|
|
168
167
|
return r.length ? r.join(" ") : void 0;
|
|
169
168
|
}
|
|
170
|
-
function
|
|
169
|
+
function Y(t) {
|
|
171
170
|
if (!t || !("querySelector" in t))
|
|
172
171
|
return !1;
|
|
173
172
|
const e = t.querySelector(S) ?? t, r = (n) => !!(n && "querySelector" in n && n.querySelector(".product-price") && n.querySelector(".product-old-price"));
|
|
174
173
|
return r(e.querySelector(`[data-attribute-type="${p}"]`)) || r(e.querySelector(`[data-attribute-type="${y}"]`));
|
|
175
174
|
}
|
|
176
|
-
function
|
|
177
|
-
const e = {}, r =
|
|
175
|
+
function J(t) {
|
|
176
|
+
const e = {}, r = Y(t);
|
|
178
177
|
return f(t, (n, o, i) => {
|
|
179
178
|
if (i === "image" || r && (o === p || o === y))
|
|
180
179
|
return;
|
|
181
|
-
const u =
|
|
180
|
+
const u = W(n);
|
|
182
181
|
u && (e[o] = u);
|
|
183
182
|
}), e;
|
|
184
183
|
}
|
|
185
|
-
function
|
|
184
|
+
function Z(t) {
|
|
186
185
|
const e = {};
|
|
187
186
|
return f(t, (r, n) => {
|
|
188
187
|
if (n !== A && n !== R || !l(r))
|
|
@@ -191,7 +190,7 @@ function tt(t) {
|
|
|
191
190
|
(o != null || i != null) && (e[n] = { before: o ?? void 0, after: i ?? void 0 });
|
|
192
191
|
}), e;
|
|
193
192
|
}
|
|
194
|
-
function
|
|
193
|
+
function tt(t) {
|
|
195
194
|
const e = {};
|
|
196
195
|
if (!t || !("querySelector" in t))
|
|
197
196
|
return e;
|
|
@@ -199,28 +198,28 @@ function et(t) {
|
|
|
199
198
|
return _(r) && r.querySelectorAll(".recommendation-attribute-row").forEach((n) => {
|
|
200
199
|
if (!l(n))
|
|
201
200
|
return;
|
|
202
|
-
const o =
|
|
201
|
+
const o = n.getAttribute("data-attribute-type"), i = n.getAttribute("data-visibility");
|
|
203
202
|
o && i != null && (e[o] = i !== "0");
|
|
204
203
|
}), e;
|
|
205
204
|
}
|
|
206
|
-
function
|
|
205
|
+
function ct(t) {
|
|
207
206
|
return {
|
|
208
|
-
styleTemplates:
|
|
209
|
-
cardBackgroundColor:
|
|
210
|
-
cellBackgroundColors:
|
|
211
|
-
cellAlignments:
|
|
212
|
-
cellClasses:
|
|
213
|
-
omnibusTexts:
|
|
214
|
-
visibility:
|
|
207
|
+
styleTemplates: F(t),
|
|
208
|
+
cardBackgroundColor: j(t),
|
|
209
|
+
cellBackgroundColors: z(t),
|
|
210
|
+
cellAlignments: Q(t),
|
|
211
|
+
cellClasses: J(t),
|
|
212
|
+
omnibusTexts: Z(t),
|
|
213
|
+
visibility: tt(t)
|
|
215
214
|
};
|
|
216
215
|
}
|
|
217
216
|
export {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
217
|
+
F as captureAttributeStyleTemplates,
|
|
218
|
+
j as captureCardBackgroundColor,
|
|
219
|
+
Q as captureCellAlignments,
|
|
220
|
+
z as captureCellBackgroundColors,
|
|
221
|
+
J as captureCellClasses,
|
|
222
|
+
Z as captureOmnibusTexts,
|
|
223
|
+
ct as captureStyles,
|
|
224
|
+
tt as captureVisibility
|
|
226
225
|
};
|
|
@@ -34,8 +34,6 @@ interface SelectProps {
|
|
|
34
34
|
placeholder: string;
|
|
35
35
|
options: TextValueObject[];
|
|
36
36
|
className?: string;
|
|
37
|
-
/** Adds the picker's built-in search box. Worth it once the list gets long. */
|
|
38
|
-
searchable?: boolean;
|
|
39
37
|
}
|
|
40
38
|
interface CounterProps {
|
|
41
39
|
name: string;
|
|
@@ -107,7 +105,7 @@ export declare abstract class CommonControl extends Control {
|
|
|
107
105
|
text: string;
|
|
108
106
|
value: string;
|
|
109
107
|
}): string;
|
|
110
|
-
_GuSelect({ name, placeholder, options, className
|
|
108
|
+
_GuSelect({ name, placeholder, options, className }: SelectProps): string;
|
|
111
109
|
_GuTextInput({ name, placeholder, className, disabled }: TextInputProps): string;
|
|
112
110
|
_GuCounter({ name, maxValue, minValue, step }: CounterProps): string;
|
|
113
111
|
_GuRadioButtonItem({ text, value, icon }: {
|