@useinsider/guido 1.0.3-beta.846c08e → 1.0.3-beta.84f8509
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -141
- package/dist/{src/@types → @types}/generic.d.ts +0 -14
- package/dist/{src/components → components}/Guido.vue.d.ts +1 -1
- package/dist/components/Guido.vue.js +11 -11
- package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
- package/dist/components/organisms/header/LeftSlot.vue2.js +15 -16
- package/dist/components/organisms/header/RightSlot.vue.js +11 -11
- package/dist/{src/components → components}/organisms/onboarding/NewVersionPopup.vue.d.ts +1 -1
- package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +26 -28
- package/dist/{src/components → components}/organisms/onboarding/OnboardingWrapper.vue.d.ts +1 -1
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue.js +3 -5
- package/dist/components/organisms/onboarding/OnboardingWrapper.vue2.js +31 -29
- package/dist/composables/useStripo.js +55 -49
- package/dist/config/migrator/index.js +6 -7
- package/dist/enums/date.d.ts +13 -0
- package/dist/enums/date.js +14 -4
- package/dist/enums/defaults.js +9 -15
- package/dist/enums/onboarding.d.ts +1 -0
- package/dist/enums/onboarding.js +1 -2
- package/dist/extensions/Blocks/Checkbox/extension.js +2 -2
- package/dist/extensions/Blocks/CouponBlock/extension.js +2 -2
- package/dist/{src/extensions → extensions}/Blocks/Recommendation/block.d.ts +0 -1
- package/dist/extensions/Blocks/Recommendation/block.js +3 -6
- package/dist/{src/extensions → extensions}/Blocks/Recommendation/control.d.ts +2 -11
- package/dist/extensions/Blocks/Recommendation/control.js +65 -109
- package/dist/extensions/Blocks/Recommendation/extension.js +6 -15
- package/dist/extensions/Blocks/Recommendation/settingsPanel.js +21 -151
- package/dist/extensions/Blocks/Recommendation/template.d.ts +6 -0
- package/dist/extensions/Blocks/Recommendation/template.js +200 -0
- package/dist/{src/extensions → extensions}/Blocks/common-control.d.ts +0 -21
- package/dist/extensions/Blocks/common-control.js +43 -125
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +100 -307
- package/dist/services/stripoApi.js +1 -1
- package/dist/static/styles/components/narrow-panel.css.js +0 -10
- package/dist/static/styles/components/wide-panel.css.js +4 -0
- package/dist/static/styles/customEditorStyle.css.js +0 -19
- package/dist/{src/stores → stores}/config.d.ts +0 -6
- package/dist/utils/dateUtil.d.ts +4 -0
- package/dist/utils/dateUtil.js +7 -33
- package/package.json +2 -7
- package/dist/composables/useBlocksConfig.js +0 -49
- package/dist/config/migrator/recommendationMigrator.js +0 -293
- package/dist/extensions/Blocks/Recommendation/cardCompositionControl.js +0 -187
- package/dist/extensions/Blocks/Recommendation/constants.js +0 -13
- package/dist/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.js +0 -68
- package/dist/extensions/Blocks/Recommendation/controls/index.js +0 -245
- package/dist/extensions/Blocks/Recommendation/controls/nameTextTrimControl.js +0 -74
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.js +0 -71
- package/dist/extensions/Blocks/Recommendation/controls/spacingControl.js +0 -188
- package/dist/extensions/Blocks/Recommendation/templates/blockTemplate.js +0 -181
- package/dist/extensions/Blocks/Recommendation/templates/migrationTemplate.js +0 -189
- package/dist/extensions/Blocks/Recommendation/templates/templateUtils.js +0 -209
- package/dist/extensions/Blocks/Recommendation/utils/preserveTextStyles.js +0 -25
- package/dist/extensions/Blocks/controlFactories.js +0 -223
- package/dist/package.json.js +0 -7
- package/dist/src/composables/useBlocksConfig.d.ts +0 -11
- package/dist/src/config/migrator/recommendationMigrator.d.ts +0 -1
- package/dist/src/enums/date.d.ts +0 -4
- package/dist/src/enums/onboarding.d.ts +0 -2
- package/dist/src/extensions/Blocks/Recommendation/cardCompositionControl.d.ts +0 -75
- package/dist/src/extensions/Blocks/Recommendation/constants.d.ts +0 -83
- package/dist/src/extensions/Blocks/Recommendation/controls/cardBackgroundColorControl.d.ts +0 -25
- package/dist/src/extensions/Blocks/Recommendation/controls/index.d.ts +0 -64
- package/dist/src/extensions/Blocks/Recommendation/controls/nameTextTrimControl.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextAfterControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscountTextBeforeControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextAfterControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPriceTextBeforeControl.d.ts +0 -15
- package/dist/src/extensions/Blocks/Recommendation/controls/spacingControl.d.ts +0 -60
- package/dist/src/extensions/Blocks/Recommendation/templates/blockTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/migrationTemplate.d.ts +0 -16
- package/dist/src/extensions/Blocks/Recommendation/templates/templateUtils.d.ts +0 -52
- package/dist/src/extensions/Blocks/Recommendation/utils/preserveTextStyles.d.ts +0 -19
- package/dist/src/extensions/Blocks/controlFactories.d.ts +0 -91
- package/dist/src/utils/dateUtil.d.ts +0 -22
- package/dist/{src/@types → @types}/events.d.ts +0 -0
- package/dist/{src/@types → @types}/save-as-template.d.ts +0 -0
- package/dist/{src/App.vue.d.ts → App.vue.d.ts} +0 -0
- package/dist/{src/components → components}/organisms/LoadingWrapper.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/base/Toaster.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/PreviewContainer.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/extensions/recommendation/FilterItem.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/extensions/recommendation/FilterSelectionDrawer.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/extensions/recommendation/Filters.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/extensions/recommendation/LogicAdapter.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/HeaderWrapper.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/LeftSlot.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/MiddleSlot.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/RightSlot.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/ViewOptions.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/version-history/RestoreButton.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/version-history/VersionHistory.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/header/version-history/ViewOptions.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/onboarding/AMPOnboarding.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/onboarding/GenericOnboarding.vue.d.ts +0 -0
- package/dist/{src/components → components}/organisms/onboarding/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 +1 -1
- /package/dist/{src/composables → composables}/useActionsApi.d.ts +0 -0
- /package/dist/{src/composables → composables}/useApiExample.d.ts +0 -0
- /package/dist/{src/composables → composables}/useCodeEditorApi.d.ts +0 -0
- /package/dist/{src/composables → composables}/useConfig.d.ts +0 -0
- /package/dist/{src/composables → composables}/useCustomInterfaceAppearance.d.ts +0 -0
- /package/dist/{src/composables → composables}/useDebounce.d.ts +0 -0
- /package/dist/{src/composables → composables}/useExport.d.ts +0 -0
- /package/dist/{src/composables → composables}/useGuidoActions.d.ts +0 -0
- /package/dist/{src/composables → composables}/useHtmlCompiler.d.ts +0 -0
- /package/dist/{src/composables → composables}/useHtmlValidator.d.ts +0 -0
- /package/dist/{src/composables → composables}/useHttp.d.ts +0 -0
- /package/dist/{src/composables → composables}/usePartner.d.ts +0 -0
- /package/dist/{src/composables → composables}/usePreviewMode.d.ts +0 -0
- /package/dist/{src/composables → composables}/useProvideInject.d.ts +0 -0
- /package/dist/{src/composables → composables}/useRecommendation.d.ts +0 -0
- /package/dist/{src/composables → composables}/useResponsivePreview.d.ts +0 -0
- /package/dist/{src/composables → composables}/useSave.d.ts +0 -0
- /package/dist/{src/composables → composables}/useStripo.d.ts +0 -0
- /package/dist/{src/composables → composables}/useStripoEventHandler.d.ts +0 -0
- /package/dist/{src/composables → composables}/useToaster.d.ts +0 -0
- /package/dist/{src/composables → composables}/useTranslations.d.ts +0 -0
- /package/dist/{src/composables → composables}/useValidation.d.ts +0 -0
- /package/dist/{src/composables → composables}/useVersionHistoryApi.d.ts +0 -0
- /package/dist/{src/composables → composables}/validators/saveAsTemplate.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/htmlCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/outlookCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/recommendationCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/socialCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/compiler/unsubscribeCompilerRules.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/checkboxMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/couponBlockMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/index.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/radioButtonMigrator.d.ts +0 -0
- /package/dist/{src/config → config}/migrator/unsubscribeMigrator.d.ts +0 -0
- /package/dist/{src/enums → enums}/defaults.d.ts +0 -0
- /package/dist/{src/enums → enums}/displayConditions.d.ts +0 -0
- /package/dist/{src/enums → enums}/extensions/recommendationBlock.d.ts +0 -0
- /package/dist/{src/enums → enums}/html-validator.d.ts +0 -0
- /package/dist/{src/enums → enums}/preview.d.ts +0 -0
- /package/dist/{src/enums → enums}/recommendation.d.ts +0 -0
- /package/dist/{src/enums → enums}/toaster.d.ts +0 -0
- /package/dist/{src/enums → enums}/unsubscribe.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/block.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/control.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Checkbox/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/block.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/CouponBlock/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/block.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/control.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/RadioButton/template.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/extension.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/iconsRegistry.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/settingsPanel.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/store/recommendation.d.ts +0 -0
- /package/dist/{src/extensions → extensions}/Blocks/Recommendation/utils/filterUtil.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}/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/library.d.ts → library.d.ts} +0 -0
- /package/dist/{src/main.d.ts → main.d.ts} +0 -0
- /package/dist/{src/mock → mock}/api/auth.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/custom-fonts.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/default-template.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/recommendation.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/template-library.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/unsubscribe.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/user-modal-state.d.ts +0 -0
- /package/dist/{src/mock → mock}/api/validator.d.ts +0 -0
- /package/dist/{src/mock → mock}/browser.d.ts +0 -0
- /package/dist/{src/mock → mock}/handlers.d.ts +0 -0
- /package/dist/{src/services → services}/onboardingApi.d.ts +0 -0
- /package/dist/{src/services → services}/recommendationApi.d.ts +0 -0
- /package/dist/{src/services → services}/stripoApi.d.ts +0 -0
- /package/dist/{src/services → services}/templateLibraryApi.d.ts +0 -0
- /package/dist/{src/services → services}/unsubscribeApi.d.ts +0 -0
- /package/dist/{src/stores → stores}/dynamic-content.d.ts +0 -0
- /package/dist/{src/stores → stores}/editor.d.ts +0 -0
- /package/dist/{src/stores → stores}/onboarding.d.ts +0 -0
- /package/dist/{src/stores → stores}/preview.d.ts +0 -0
- /package/dist/{src/stores → stores}/recommendation.d.ts +0 -0
- /package/dist/{src/stores → stores}/save-as-template.d.ts +0 -0
- /package/dist/{src/stores → stores}/toaster.d.ts +0 -0
- /package/dist/{src/stores → stores}/unsubscribe.d.ts +0 -0
- /package/dist/{src/stores → stores}/version-history.d.ts +0 -0
- /package/dist/{src/utils → utils}/arrayUtil.d.ts +0 -0
- /package/dist/{src/utils → utils}/base64.d.ts +0 -0
- /package/dist/{src/utils → utils}/genericUtil.d.ts +0 -0
- /package/dist/{src/utils → utils}/htmlCompiler.d.ts +0 -0
- /package/dist/{src/utils → utils}/templatePreparation.d.ts +0 -0
- /package/dist/{src/utils → utils}/tooltipUtils.d.ts +0 -0
package/README.md
CHANGED
|
@@ -52,7 +52,6 @@ npm install @useinsider/guido
|
|
|
52
52
|
ref="guidoEditor"
|
|
53
53
|
:template-id="templateId"
|
|
54
54
|
:user-id="userId"
|
|
55
|
-
:migration-date="migrationDate"
|
|
56
55
|
:guido-config="guidoConfig"
|
|
57
56
|
:html="initialHtml"
|
|
58
57
|
:css="initialCss"
|
|
@@ -75,19 +74,16 @@ export default {
|
|
|
75
74
|
return {
|
|
76
75
|
templateId: 'template-123',
|
|
77
76
|
userId: 'user-456',
|
|
78
|
-
migrationDate: 1699488000,
|
|
79
77
|
initialHtml: '<p>Initial HTML content</p>',
|
|
80
78
|
initialCss: 'p { color: #333; }',
|
|
81
79
|
guidoConfig: {
|
|
82
80
|
translationsPath: 'window.trans.en',
|
|
83
81
|
htmlCompilerRules: [],
|
|
84
82
|
ignoreDefaultHtmlCompilerRules: false,
|
|
85
|
-
backButtonLabel?: "Back to Design",
|
|
86
83
|
features: {
|
|
87
84
|
dynamicContent: true,
|
|
88
85
|
saveAsTemplate: true,
|
|
89
|
-
versionHistory: true
|
|
90
|
-
testMessage: true
|
|
86
|
+
versionHistory: true
|
|
91
87
|
}
|
|
92
88
|
},
|
|
93
89
|
dynamicContentModalVisible: false
|
|
@@ -149,7 +145,6 @@ export default {
|
|
|
149
145
|
| `templateId` | `string` | ✅ | - | Unique identifier for the email template |
|
|
150
146
|
| `userId` | `string` | ✅ | - | Unique identifier for the user |
|
|
151
147
|
| `guidoConfig` | `GuidoConfig` | ✅ | - | Configuration object for the editor |
|
|
152
|
-
| `migrationDate` | `number` | ✅ | - | Stripo migration date in Unix timestamp (seconds). Retrieved from backend `/partner-settings` endpoint as `migrationDate`. Used for onboarding process |
|
|
153
148
|
| `partnerName` | `string` | ⚪ | From URL host | Partner identifier |
|
|
154
149
|
| `productType` | `string` | ⚪ | From URL path | Product type identifier |
|
|
155
150
|
| `username` | `string` | ⚪ | `'Guido User'` | Display name for the user |
|
|
@@ -166,7 +161,6 @@ export default {
|
|
|
166
161
|
| `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
|
|
167
162
|
| `on-change` | void | It Fires once for managing leave modal etc. |
|
|
168
163
|
| `ready` | void | Fired when the editor is ready and template is loaded |
|
|
169
|
-
| `onboarding-finished` | void | Fired when the onboarding popup is dismissed or completed, allowing parent applications to track onboarding state |
|
|
170
164
|
|
|
171
165
|
### Guido Exposed Methods
|
|
172
166
|
```typescript
|
|
@@ -196,11 +190,6 @@ interface GuidoConfig {
|
|
|
196
190
|
dynamicContent: boolean;
|
|
197
191
|
saveAsTemplate: boolean;
|
|
198
192
|
versionHistory: boolean;
|
|
199
|
-
testMessage: boolean;
|
|
200
|
-
};
|
|
201
|
-
blocks?: {
|
|
202
|
-
excludeDefaults?: GuidoBlockType[];
|
|
203
|
-
includeCustoms?: GuidoCustomBlockType[];
|
|
204
193
|
};
|
|
205
194
|
}
|
|
206
195
|
```
|
|
@@ -215,9 +204,6 @@ interface GuidoConfig {
|
|
|
215
204
|
| `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
|
|
216
205
|
| `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
|
|
217
206
|
| `features.versionHistory` | `boolean` | `true` | Enable version history feature |
|
|
218
|
-
| `blocks` | `BlocksConfig` | `{ excludeDefaults: [], includeCustoms: [] }` | Block configuration for excluding default blocks and including custom blocks. See [Blocks Configuration](#-blocks-configuration) section below |
|
|
219
|
-
| `blocks.excludeDefaults` | `GuidoBlockType[]` | `[]` | Array of default Stripo blocks to exclude from the editor |
|
|
220
|
-
| `blocks.includeCustoms` | `GuidoCustomBlockType[]` | `[]` | Array of custom blocks to include in the editor |
|
|
221
207
|
|
|
222
208
|
```typescript
|
|
223
209
|
interface DynamicContent {
|
|
@@ -234,128 +220,6 @@ interface DynamicContent {
|
|
|
234
220
|
| `text` | `string` | '' | Visible value of the dynamic content |
|
|
235
221
|
| `fallback?` | `string` | '' | Fallback value of the dynamic content. Optional |
|
|
236
222
|
|
|
237
|
-
## 🧱 Blocks Configuration
|
|
238
|
-
|
|
239
|
-
Guido allows you to customize which blocks are available in the editor. You can exclude default Stripo blocks and selectively include custom blocks to create tailored editing experiences for different product types.
|
|
240
|
-
|
|
241
|
-
### Block Types
|
|
242
|
-
|
|
243
|
-
#### Default Blocks (GuidoBlockType)
|
|
244
|
-
|
|
245
|
-
These are the standard Stripo email editor blocks that can be excluded:
|
|
246
|
-
|
|
247
|
-
```typescript
|
|
248
|
-
type GuidoBlockType =
|
|
249
|
-
| 'amp-accordion' // AMP accordion component
|
|
250
|
-
| 'amp-carousel' // AMP image carousel
|
|
251
|
-
| 'amp-form-controls' // AMP form elements
|
|
252
|
-
| 'banner-block' // Banner/hero section
|
|
253
|
-
| 'button-block' // Call-to-action buttons
|
|
254
|
-
| 'html-block' // Custom HTML
|
|
255
|
-
| 'image-block' // Image elements
|
|
256
|
-
| 'menu-block' // Navigation menu
|
|
257
|
-
| 'social-block' // Social media links
|
|
258
|
-
| 'spacer-block' // Vertical spacing
|
|
259
|
-
| 'text-block' // Text content
|
|
260
|
-
| 'timer-block' // Countdown timer
|
|
261
|
-
| 'video-block' // Video embeds
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
#### Custom Blocks (GuidoCustomBlockType)
|
|
265
|
-
|
|
266
|
-
These are custom blocks that can be selectively included:
|
|
267
|
-
|
|
268
|
-
```typescript
|
|
269
|
-
type GuidoCustomBlockType =
|
|
270
|
-
| 'dynamic-content' // Dynamic content merge tags
|
|
271
|
-
| 'checkbox-block' // Checkbox form input
|
|
272
|
-
| 'radio-button-block' // Radio button form input
|
|
273
|
-
| 'recommendation-block' // Product recommendations
|
|
274
|
-
| 'unsubscribe-block' // Unsubscribe link
|
|
275
|
-
| 'coupon-block' // Coupon/promo code
|
|
276
|
-
| 'items-block' // Cart items display
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
### Configuration Examples
|
|
280
|
-
|
|
281
|
-
#### Example 1: Exclude Specific Default Blocks
|
|
282
|
-
|
|
283
|
-
Disable button, image, and video blocks while keeping all custom blocks:
|
|
284
|
-
|
|
285
|
-
```typescript
|
|
286
|
-
const guidoConfig = {
|
|
287
|
-
translationsPath: 'window.trans.en',
|
|
288
|
-
features: {
|
|
289
|
-
dynamicContent: true,
|
|
290
|
-
saveAsTemplate: true,
|
|
291
|
-
versionHistory: true,
|
|
292
|
-
testMessage: true
|
|
293
|
-
},
|
|
294
|
-
blocks: {
|
|
295
|
-
excludeDefaults: ['button-block', 'image-block', 'video-block']
|
|
296
|
-
}
|
|
297
|
-
};
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
**Result:**
|
|
301
|
-
- Button, Image, Video blocks disabled
|
|
302
|
-
- All other default blocks enabled
|
|
303
|
-
- All custom blocks are disabled.
|
|
304
|
-
|
|
305
|
-
#### Example 2: Include Only Specific Custom Blocks
|
|
306
|
-
|
|
307
|
-
Enable only coupon and recommendation blocks:
|
|
308
|
-
|
|
309
|
-
```typescript
|
|
310
|
-
const guidoConfig = {
|
|
311
|
-
translationsPath: 'window.trans.en',
|
|
312
|
-
features: {
|
|
313
|
-
dynamicContent: true,
|
|
314
|
-
saveAsTemplate: true,
|
|
315
|
-
versionHistory: true,
|
|
316
|
-
testMessage: true
|
|
317
|
-
},
|
|
318
|
-
blocks: {
|
|
319
|
-
includeCustoms: ['coupon-block', 'recommendation-block']
|
|
320
|
-
}
|
|
321
|
-
};
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
**Result:**
|
|
325
|
-
- All default blocks enabled
|
|
326
|
-
- Only Coupon and Recommendation extensions enabled.
|
|
327
|
-
- Other custom blocks are disabled
|
|
328
|
-
|
|
329
|
-
### Default Behavior
|
|
330
|
-
|
|
331
|
-
When `blocks` is not provided or is `undefined`:
|
|
332
|
-
|
|
333
|
-
```typescript
|
|
334
|
-
const guidoConfig = {
|
|
335
|
-
translationsPath: 'window.trans.en',
|
|
336
|
-
features: {
|
|
337
|
-
dynamicContent: true,
|
|
338
|
-
saveAsTemplate: true,
|
|
339
|
-
versionHistory: true,
|
|
340
|
-
testMessage: true
|
|
341
|
-
},
|
|
342
|
-
// No blocks config
|
|
343
|
-
};
|
|
344
|
-
```
|
|
345
|
-
|
|
346
|
-
**Result:**
|
|
347
|
-
- All 13 default Stripo blocks enabled
|
|
348
|
-
- All custom blocks are disabled.
|
|
349
|
-
|
|
350
|
-
### Block Configuration Interface
|
|
351
|
-
|
|
352
|
-
```typescript
|
|
353
|
-
interface BlocksConfig {
|
|
354
|
-
excludeDefaults?: GuidoBlockType[];
|
|
355
|
-
includeCustoms?: GuidoCustomBlockType[];
|
|
356
|
-
}
|
|
357
|
-
```
|
|
358
|
-
|
|
359
223
|
### TypeScript Types
|
|
360
224
|
|
|
361
225
|
The library exports the following TypeScript types:
|
|
@@ -450,8 +314,7 @@ const guidoConfig = {
|
|
|
450
314
|
features: {
|
|
451
315
|
dynamicContent: true,
|
|
452
316
|
saveAsTemplate: true,
|
|
453
|
-
versionHistory: false
|
|
454
|
-
testMessage: true
|
|
317
|
+
versionHistory: false // Disable version history
|
|
455
318
|
},
|
|
456
319
|
htmlCompilerRules: [
|
|
457
320
|
{
|
|
@@ -484,8 +347,7 @@ const guidoConfig = {
|
|
|
484
347
|
features: {
|
|
485
348
|
dynamicContent: true,
|
|
486
349
|
saveAsTemplate: true,
|
|
487
|
-
versionHistory: true
|
|
488
|
-
testMessage: true
|
|
350
|
+
versionHistory: true
|
|
489
351
|
},
|
|
490
352
|
ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
|
|
491
353
|
htmlCompilerRules: [
|
|
@@ -6,19 +6,12 @@ type Features = {
|
|
|
6
6
|
dynamicContent?: boolean;
|
|
7
7
|
saveAsTemplate?: boolean;
|
|
8
8
|
versionHistory?: boolean;
|
|
9
|
-
testMessage?: boolean;
|
|
10
9
|
};
|
|
11
10
|
type Partner = {
|
|
12
11
|
partnerName: string;
|
|
13
12
|
productType: number;
|
|
14
13
|
messageType: number;
|
|
15
14
|
};
|
|
16
|
-
export type GuidoBlockType = 'amp-accordion' | 'amp-carousel' | 'amp-form-controls' | 'banner-block' | 'button-block' | 'html-block' | 'image-block' | 'menu-block' | 'social-block' | 'spacer-block' | 'text-block' | 'timer-block' | 'video-block';
|
|
17
|
-
export type GuidoCustomBlockType = 'dynamic-content' | 'checkbox-block' | 'radio-button-block' | 'recommendation-block' | 'unsubscribe-block' | 'coupon-block' | 'items-block';
|
|
18
|
-
type BlocksConfig = {
|
|
19
|
-
excludeDefaults?: GuidoBlockType[];
|
|
20
|
-
includeCustoms?: GuidoCustomBlockType[];
|
|
21
|
-
};
|
|
22
15
|
export type GuidoConfig = {
|
|
23
16
|
translationsPath: string;
|
|
24
17
|
htmlCompilerRules?: CompilerRule[];
|
|
@@ -29,8 +22,6 @@ export type GuidoConfig = {
|
|
|
29
22
|
partner?: Partner;
|
|
30
23
|
extensions?: Extensions;
|
|
31
24
|
features?: Features;
|
|
32
|
-
blocks?: BlocksConfig;
|
|
33
|
-
backButtonLabel?: string;
|
|
34
25
|
};
|
|
35
26
|
export type TemplateConfig = {
|
|
36
27
|
preselectedDynamicContentList?: DynamicContent[];
|
|
@@ -69,9 +60,4 @@ export type TextValueObject = {
|
|
|
69
60
|
text: string;
|
|
70
61
|
value: string;
|
|
71
62
|
};
|
|
72
|
-
export interface L10n {
|
|
73
|
-
locale?: string;
|
|
74
|
-
timezone?: string;
|
|
75
|
-
time?: number;
|
|
76
|
-
}
|
|
77
63
|
export {};
|
|
@@ -26,7 +26,7 @@ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__
|
|
|
26
26
|
"save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
|
|
27
27
|
"on-change": (hasChanges: boolean) => void;
|
|
28
28
|
ready: () => void;
|
|
29
|
-
"onboarding:finished": () => void;
|
|
29
|
+
"onboarding:finished": (action: "close" | "discover" | "remind-later") => void;
|
|
30
30
|
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
31
31
|
export default _default;
|
|
32
32
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
var
|
|
3
|
+
import t from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var n = function() {
|
|
5
5
|
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
6
|
-
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(
|
|
7
|
-
return e.emit("onboarding:finished");
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(i) {
|
|
7
|
+
return e.emit("onboarding:finished", i);
|
|
8
8
|
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
9
|
-
},
|
|
10
|
-
|
|
11
|
-
t,
|
|
9
|
+
}, s = [], d = /* @__PURE__ */ t(
|
|
10
|
+
a,
|
|
12
11
|
n,
|
|
12
|
+
s,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"05d04ac2"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const f = d.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
f as default
|
|
20
20
|
};
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { usePreviewMode as f } from "../../../composables/usePreviewMode.js";
|
|
1
|
+
import { defineComponent as s, computed as c } from "vue";
|
|
2
|
+
import { useBack as m } from "../../../composables/useGuidoActions.js";
|
|
3
|
+
import { usePreviewMode as a } from "../../../composables/usePreviewMode.js";
|
|
5
4
|
import { useTranslations as p } from "../../../composables/useTranslations.js";
|
|
6
|
-
import { useVersionHistoryApi as
|
|
7
|
-
import { useEditorStore as
|
|
8
|
-
import { InButtonV2 as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
5
|
+
import { useVersionHistoryApi as u } from "../../../composables/useVersionHistoryApi.js";
|
|
6
|
+
import { useEditorStore as d } from "../../../stores/editor.js";
|
|
7
|
+
import { InButtonV2 as f } from "@useinsider/design-system-vue";
|
|
8
|
+
import l from "./version-history/RestoreButton.vue.js";
|
|
9
|
+
const O = /* @__PURE__ */ s({
|
|
11
10
|
__name: "LeftSlot",
|
|
12
|
-
setup(
|
|
13
|
-
const o =
|
|
14
|
-
return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory:
|
|
11
|
+
setup(k) {
|
|
12
|
+
const o = d(), r = m(), { closeVersionHistory: t } = u(), { closePreviewMode: i } = a(), e = p(), n = c(() => o.isVersionHistoryOpen || o.isPreviewModeOpen ? e("email-editor.back-to-editor") : e("email-editor.back-to-design"));
|
|
13
|
+
return { __sfc: !0, editorStore: o, handleBack: r, closeVersionHistory: t, closePreviewMode: i, trans: e, backButtonLabel: n, handleBackClick: () => {
|
|
15
14
|
if (o.isVersionHistoryOpen) {
|
|
16
|
-
|
|
15
|
+
t();
|
|
17
16
|
return;
|
|
18
17
|
}
|
|
19
18
|
if (o.isPreviewModeOpen) {
|
|
20
|
-
|
|
19
|
+
i();
|
|
21
20
|
return;
|
|
22
21
|
}
|
|
23
22
|
r();
|
|
24
|
-
}, InButtonV2:
|
|
23
|
+
}, InButtonV2: f, RestoreButton: l };
|
|
25
24
|
}
|
|
26
25
|
});
|
|
27
26
|
export {
|
|
28
|
-
|
|
27
|
+
O as default
|
|
29
28
|
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
return e("div", { staticClass: "d-f" }, [(
|
|
1
|
+
import n from "./RightSlot.vue2.js";
|
|
2
|
+
import a from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
+
var l = function() {
|
|
4
|
+
var s, i;
|
|
5
|
+
var o = this, e = o._self._c, t = o._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "d-f" }, [(s = t.config.features) != null && s.versionHistory ? e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryButtonDisabled, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen, "tooltip-options": t.getTooltipOptions("guido__history-button"), "tooltip-text": t.versionHistoryTooltipText }, on: { click: t.handleVersionHistory } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isExportButtonDisabled, "label-text-status": !1, "loading-status": t.isExporting, "tooltip-options": t.getTooltipOptions("guido__export-button"), "tooltip-text": t.trans("newsletter.export") }, on: { click: t.handleExport } }), (i = t.config.features) != null && i.saveAsTemplate ? e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isSaveAsButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__save-as-button"), "tooltip-text": t.trans("newsletter.save-templates") }, on: { click: t.handleSaveAs } }) : o._e(), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isTestButtonDisabled, "label-text-status": !1, "tooltip-options": t.getTooltipOptions("guido__test-button"), "tooltip-text": t.trans("newsletter.test-email") } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": !t.isSaving && t.editorStore.isSaveButtonDisabled, "loading-status": t.isSaving }, on: { click: function(p) {
|
|
7
7
|
return t.handleSave(!1);
|
|
8
8
|
} } })], 1);
|
|
9
|
-
},
|
|
10
|
-
|
|
9
|
+
}, r = [], d = /* @__PURE__ */ a(
|
|
10
|
+
n,
|
|
11
|
+
l,
|
|
11
12
|
r,
|
|
12
|
-
u,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
15
|
null
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const g = d.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
g as default
|
|
20
20
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
2
|
-
"onboarding-finished": () => void;
|
|
2
|
+
"onboarding-finished": (action: "close" | "discover" | "remind-later") => void;
|
|
3
3
|
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -1,43 +1,41 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import { useConfig as
|
|
4
|
-
import { useTranslations as
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { useOnboardingStore as
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
1
|
+
import { defineComponent as c, ref as f, computed as o } from "vue";
|
|
2
|
+
import g from "../../wrappers/WpModal.vue.js";
|
|
3
|
+
import { useConfig as v } from "../../../composables/useConfig.js";
|
|
4
|
+
import { useTranslations as b } from "../../../composables/useTranslations.js";
|
|
5
|
+
import { DATE_FORMAT_DD_MM_YYYY as D } from "../../../enums/date.js";
|
|
6
|
+
import _ from "../../../static/assets/onboarding-img.svg.js";
|
|
7
|
+
import { useOnboardingStore as h } from "../../../stores/onboarding.js";
|
|
8
|
+
import { formatDate as T } from "../../../utils/dateUtil.js";
|
|
9
|
+
const V = /* @__PURE__ */ c({
|
|
10
10
|
__name: "NewVersionPopup",
|
|
11
11
|
emits: ["onboarding-finished"],
|
|
12
|
-
setup(w, { emit:
|
|
13
|
-
const e =
|
|
14
|
-
i.value
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
})),
|
|
12
|
+
setup(w, { emit: n }) {
|
|
13
|
+
const e = b(), t = h(), r = f(!0), { config: s } = v(), i = o(() => s.migrationDate), a = o(() => i.value ? Math.floor(Date.now() / 1e3) >= i.value : !1), l = o(() => T(
|
|
14
|
+
i.value || 0,
|
|
15
|
+
D,
|
|
16
|
+
"seconds",
|
|
17
|
+
"en-GB"
|
|
18
|
+
)), p = o(() => a.value ? e("email-editor.onboarding-popup-sunsetted-title") : e("email-editor.onboarding-title")), u = o(() => a.value ? e("email-editor.onboarding-popup-sunsetted-description", {
|
|
19
|
+
sunsetDate: l.value
|
|
20
|
+
}) : e("email-editor.onboarding-description")), d = o(() => a.value ? e("products.cancel") : e("products.remind-me-later")), m = o(() => ({
|
|
21
21
|
primaryButton: {
|
|
22
22
|
type: "primary",
|
|
23
23
|
labelText: e("left-menu.discover-now")
|
|
24
24
|
},
|
|
25
25
|
secondaryButton: {
|
|
26
26
|
type: "subtle-primary",
|
|
27
|
-
labelText:
|
|
27
|
+
labelText: d.value
|
|
28
28
|
}
|
|
29
|
-
}))
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
return { __sfc: !0, emit: a, trans: e, onboardingStore: t, isVisible: s, config: p, migrationDate: i, isAfterMigrationDate: n, formattedSunsetDate: d, popupTitle: m, popupDescription: c, secondaryButtonLabel: u, footerButtonOptions: f, closePopup: r, handleDiscoverNow: () => {
|
|
33
|
-
t.onDiscoverNowClicked(), r();
|
|
29
|
+
}));
|
|
30
|
+
return { __sfc: !0, emit: n, trans: e, onboardingStore: t, isVisible: r, config: s, migrationDate: i, isAfterMigrationDate: a, formattedSunsetDate: l, popupTitle: p, popupDescription: u, secondaryButtonLabel: d, footerButtonOptions: m, handleDiscoverNow: () => {
|
|
31
|
+
t.onDiscoverNowClicked(), r.value = !1, n("onboarding-finished", "discover");
|
|
34
32
|
}, handleRemindLater: () => {
|
|
35
|
-
t.onRemindMeLater(), r();
|
|
33
|
+
t.onRemindMeLater(), r.value = !1, n("onboarding-finished", "remind-later");
|
|
36
34
|
}, handleClose: () => {
|
|
37
|
-
t.onNewVersionPopupClose(), r();
|
|
38
|
-
}, WpModal:
|
|
35
|
+
t.onNewVersionPopupClose(), r.value = !1, n("onboarding-finished", "close");
|
|
36
|
+
}, WpModal: g, onboardingImageSvg: _ };
|
|
39
37
|
}
|
|
40
38
|
});
|
|
41
39
|
export {
|
|
42
|
-
|
|
40
|
+
V as default
|
|
43
41
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
2
|
-
"onboarding-finished": () => void;
|
|
2
|
+
"onboarding-finished": (action: "close" | "discover" | "remind-later") => void;
|
|
3
3
|
}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
4
4
|
export default _default;
|
|
@@ -3,9 +3,7 @@ import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
|
3
3
|
var s = function() {
|
|
4
4
|
var n = this, e = n._self._c, r = n._self._setupProxy;
|
|
5
5
|
return e("div", n._l(r.visibleOnboardings, function(o) {
|
|
6
|
-
return e(o.component, { key: o.type, tag: "component", on: { "onboarding-finished":
|
|
7
|
-
return r.emit("onboarding-finished");
|
|
8
|
-
} } });
|
|
6
|
+
return e(o.component, { key: o.type, tag: "component", on: { "onboarding-finished": r.handleOnboardingFinished } });
|
|
9
7
|
}), 1);
|
|
10
8
|
}, _ = [], a = /* @__PURE__ */ i(
|
|
11
9
|
t,
|
|
@@ -15,7 +13,7 @@ var s = function() {
|
|
|
15
13
|
null,
|
|
16
14
|
null
|
|
17
15
|
);
|
|
18
|
-
const
|
|
16
|
+
const c = a.exports;
|
|
19
17
|
export {
|
|
20
|
-
|
|
18
|
+
c as default
|
|
21
19
|
};
|
|
@@ -1,44 +1,46 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { usePartner as
|
|
3
|
-
import { useEditorStore as
|
|
4
|
-
import { useOnboardingStore as
|
|
1
|
+
import { defineComponent as O, computed as e, onMounted as u, watch as t } from "vue";
|
|
2
|
+
import { usePartner as v } from "../../../composables/usePartner.js";
|
|
3
|
+
import { useEditorStore as l } from "../../../stores/editor.js";
|
|
4
|
+
import { useOnboardingStore as h } from "../../../stores/onboarding.js";
|
|
5
5
|
import { usePreviewStore as y } from "../../../stores/preview.js";
|
|
6
6
|
import S from "./AMPOnboarding.vue.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const
|
|
7
|
+
import w from "./GenericOnboarding.vue.js";
|
|
8
|
+
import P from "./NewVersionPopup.vue.js";
|
|
9
|
+
import _ from "./TextBlockOnboarding.vue.js";
|
|
10
|
+
import A from "./VersionHistoryOnboarding.vue.js";
|
|
11
|
+
const G = /* @__PURE__ */ O({
|
|
12
12
|
__name: "OnboardingWrapper",
|
|
13
13
|
emits: ["onboarding-finished"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
{ type: "newVersionPopup", component:
|
|
17
|
-
{ type: "genericOnboarding", component:
|
|
18
|
-
{ type: "textBlockOnboarding", component:
|
|
19
|
-
{ type: "versionHistoryOnboarding", component:
|
|
14
|
+
setup(H, { emit: s }) {
|
|
15
|
+
const n = h(), i = l(), a = y(), { isTestPartner: d } = v(), p = e(() => i.isStripoInitialized), m = e(() => d()), c = [
|
|
16
|
+
{ type: "newVersionPopup", component: P },
|
|
17
|
+
{ type: "genericOnboarding", component: w },
|
|
18
|
+
{ type: "textBlockOnboarding", component: _ },
|
|
19
|
+
{ type: "versionHistoryOnboarding", component: A },
|
|
20
20
|
{ type: "ampOnboarding", component: S }
|
|
21
|
-
],
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
], f = (o) => m.value || !p.value ? !1 : o === "newVersionPopup" ? n.shouldShowOnboarding(o) : n.isActive(o), g = e(() => c.filter((o) => f(o.type))), b = (o) => {
|
|
22
|
+
s("onboarding-finished", o);
|
|
23
|
+
};
|
|
24
|
+
return u(async () => {
|
|
25
|
+
await n.fetchUserModalState();
|
|
24
26
|
}), t(
|
|
25
|
-
() =>
|
|
26
|
-
(
|
|
27
|
-
|
|
27
|
+
() => i.isVersionHistoryOpen,
|
|
28
|
+
(o, r) => {
|
|
29
|
+
o && !r && n.shouldShowOnboarding("versionHistoryOnboarding") && n.start("versionHistoryOnboarding"), !o && r && n.isActive("versionHistoryOnboarding") && n.close("versionHistoryOnboarding");
|
|
28
30
|
}
|
|
29
31
|
), t(
|
|
30
|
-
() =>
|
|
31
|
-
(
|
|
32
|
-
|
|
32
|
+
() => a.emailFormat,
|
|
33
|
+
(o, r) => {
|
|
34
|
+
r !== "AMP" && o === "AMP" && n.shouldShowOnboarding("ampOnboarding") && n.start("ampOnboarding");
|
|
33
35
|
}
|
|
34
36
|
), t(
|
|
35
|
-
() =>
|
|
36
|
-
(
|
|
37
|
-
!
|
|
37
|
+
() => i.isPreviewModeOpen,
|
|
38
|
+
(o) => {
|
|
39
|
+
!o && n.isActive("ampOnboarding") && n.close("ampOnboarding");
|
|
38
40
|
}
|
|
39
|
-
), { __sfc: !0, emit:
|
|
41
|
+
), { __sfc: !0, emit: s, onboardingStore: n, editorStore: i, previewStore: a, isTestPartner: d, isStripoReady: p, isTestPartnerActive: m, onboardingConfigs: c, shouldShow: f, visibleOnboardings: g, handleOnboardingFinished: b };
|
|
40
42
|
}
|
|
41
43
|
});
|
|
42
44
|
export {
|
|
43
|
-
|
|
45
|
+
G as default
|
|
44
46
|
};
|