@useinsider/guido 1.0.0-beta.f7c239e → 1.0.1-beta.0168eae
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 +422 -21
- package/dist/@types/generic.d.ts +39 -23
- package/dist/@types/save-as-template.d.ts +29 -0
- package/dist/App.vue.d.ts +1 -1
- package/dist/_virtual/AddCustomFont.js +4 -0
- package/dist/_virtual/AiAssistantValueType.js +4 -0
- package/dist/_virtual/BackgroundColorBuiltInControl.js +4 -0
- package/dist/_virtual/BackgroundImageBuiltInControl.js +4 -0
- package/dist/_virtual/Block.js +4 -0
- package/dist/_virtual/BlockAttributes.js +4 -0
- package/dist/_virtual/BlockCompositionType.js +4 -0
- package/dist/_virtual/BlockPaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/BlockRenderer.js +4 -0
- package/dist/_virtual/BlockType.js +4 -0
- package/dist/_virtual/BlocksPanel.js +4 -0
- package/dist/_virtual/BuiltInControl.js +4 -0
- package/dist/_virtual/BuiltInControlTypes.js +4 -0
- package/dist/_virtual/ButtonBorderBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonFontColorBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +4 -0
- package/dist/_virtual/ButtonTextBuiltInControl.js +4 -0
- package/dist/_virtual/ContextAction.js +4 -0
- package/dist/_virtual/ContextActionType.js +4 -0
- package/dist/_virtual/Control.js +4 -0
- package/dist/_virtual/EditorStatePropertyType.js +4 -0
- package/dist/_virtual/Extension.js +4 -0
- package/dist/_virtual/ExtensionBuilder.js +4 -0
- package/dist/_virtual/FontFamilyBuiltInControl.js +4 -0
- package/dist/_virtual/LinkColorBuiltInControl.js +4 -0
- package/dist/_virtual/ModificationDescription.js +4 -0
- package/dist/_virtual/PanelPosition.js +4 -0
- package/dist/_virtual/PreviewDeviceMode.js +4 -0
- package/dist/_virtual/SettingsPanelRegistry.js +4 -0
- package/dist/_virtual/SettingsPanelTab.js +4 -0
- package/dist/_virtual/SettingsTab.js +4 -0
- package/dist/_virtual/StructureBorderBuiltInControl.js +4 -0
- package/dist/_virtual/StructurePaddingsBuiltInControl.js +4 -0
- package/dist/_virtual/TextColorBuiltInControl.js +4 -0
- package/dist/_virtual/TextLineSpacingBuiltInControl.js +4 -0
- package/dist/_virtual/TextSizeBuiltInControl.js +4 -0
- package/dist/_virtual/TextStyleBuiltInControl.js +4 -0
- package/dist/_virtual/UIElement.js +4 -0
- package/dist/_virtual/UIElementTagRegistry.js +4 -0
- package/dist/_virtual/UIElementType.js +4 -0
- package/dist/_virtual/UIElementsAttributes.js +4 -0
- package/dist/_virtual/index.js +5 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/components/Guido.vue.d.ts +21 -4
- package/dist/components/Guido.vue.js +12 -12
- package/dist/components/Guido.vue2.js +89 -25
- package/dist/components/organisms/base/Toaster.vue.d.ts +2 -0
- package/dist/components/organisms/base/Toaster.vue.js +17 -0
- package/dist/components/organisms/base/Toaster.vue2.js +15 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +19 -0
- package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +19 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +22 -0
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +30 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +19 -0
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +29 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +22 -0
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +31 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +17 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +20 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +18 -0
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +25 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +19 -0
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +23 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +4 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +20 -0
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +21 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +2 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +17 -0
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +22 -0
- package/dist/components/organisms/header/LeftSlot.vue.d.ts +1 -1
- package/dist/components/organisms/header/LeftSlot.vue.js +9 -9
- package/dist/components/organisms/header/LeftSlot.vue2.js +10 -6
- package/dist/components/organisms/header/MiddleSlot.vue.js +10 -10
- package/dist/components/organisms/header/MiddleSlot.vue2.js +16 -15
- package/dist/components/organisms/header/RightSlot.vue.js +12 -14
- package/dist/components/organisms/header/RightSlot.vue2.js +30 -17
- package/dist/components/organisms/header/ViewOptions.vue.d.ts +1 -1
- package/dist/components/organisms/header/ViewOptions.vue.js +8 -8
- package/dist/components/organisms/header/ViewOptions.vue2.js +30 -10
- package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +2 -0
- package/dist/components/organisms/header/version-history/RestoreButton.vue.js +19 -0
- package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +14 -0
- package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +13 -1
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +7 -7
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +13 -10
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +1 -1
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +1 -1
- package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +3 -3
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +34 -16
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +2 -0
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +20 -0
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +63 -0
- package/dist/components/wrappers/WpDrawer.vue.d.ts +63 -0
- package/dist/components/wrappers/WpDrawer.vue.js +25 -0
- package/dist/components/wrappers/WpDrawer.vue2.js +23 -0
- package/dist/components/wrappers/WpModal.vue.d.ts +65 -0
- package/dist/components/wrappers/WpModal.vue.js +27 -0
- package/dist/components/wrappers/WpModal.vue2.js +22 -0
- package/dist/composables/useActionsApi.d.ts +5 -1
- package/dist/composables/useActionsApi.js +74 -31
- package/dist/composables/useApiExample.d.ts +6 -4
- package/dist/composables/useCodeEditorApi.d.ts +4 -0
- package/dist/composables/useCodeEditorApi.js +11 -0
- package/dist/composables/useConfig.d.ts +4 -0
- package/dist/composables/useConfig.js +7 -0
- package/dist/composables/useCustomInterfaceAppearance.js +45 -9
- package/dist/composables/useDebounce.d.ts +4 -0
- package/dist/composables/useDebounce.js +12 -0
- package/dist/composables/useExport.d.ts +1 -1
- package/dist/composables/useExport.js +38 -22
- package/dist/composables/useGuidoActions.d.ts +46 -0
- package/dist/composables/useGuidoActions.js +37 -0
- package/dist/composables/useHtmlCompiler.d.ts +4 -0
- package/dist/composables/useHtmlCompiler.js +17 -0
- package/dist/composables/useHttp.d.ts +19 -1
- package/dist/composables/useHttp.js +23 -21
- package/dist/composables/usePartner.d.ts +1 -1
- package/dist/composables/usePartner.js +9 -14
- package/dist/composables/usePreviewMode.d.ts +5 -0
- package/dist/composables/usePreviewMode.js +31 -0
- package/dist/composables/useProvideInject.d.ts +14 -0
- package/dist/composables/useProvideInject.js +17 -0
- package/dist/composables/useResponsivePreview.d.ts +5 -0
- package/dist/composables/useResponsivePreview.js +86 -0
- package/dist/composables/useStripo.js +66 -40
- package/dist/composables/useToaster.d.ts +1 -8
- package/dist/composables/useToaster.js +24 -30
- package/dist/composables/useTranslations.d.ts +4 -1
- package/dist/composables/useTranslations.js +3 -2
- package/dist/composables/useValidation.d.ts +56 -0
- package/dist/composables/useValidation.js +19 -0
- package/dist/composables/useVersionHistoryApi.js +11 -10
- package/dist/composables/validators/saveAsTemplate.d.ts +31 -0
- package/dist/composables/validators/saveAsTemplate.js +24 -0
- package/dist/config/compiler/htmlCompilerRules.d.ts +2 -0
- package/dist/config/compiler/htmlCompilerRules.js +145 -0
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
- package/dist/enums/defaults.d.ts +4 -1
- package/dist/enums/defaults.js +22 -6
- package/dist/enums/displayConditions.d.ts +2 -0
- package/dist/enums/displayConditions.js +80 -0
- package/dist/enums/preview.d.ts +13 -0
- package/dist/enums/preview.js +23 -0
- package/dist/enums/toaster.d.ts +5 -0
- package/dist/enums/toaster.js +4 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +6 -0
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +27 -0
- package/dist/extensions/DynamicContent/dynamic-content.css.js +24 -0
- package/dist/extensions/DynamicContent/dynamic-content.d.ts +16 -0
- package/dist/extensions/DynamicContent/dynamic-content.js +61 -0
- package/dist/extensions/DynamicContent/extension.d.ts +2 -0
- package/dist/extensions/DynamicContent/extension.js +11 -0
- package/dist/guido.css +1 -1
- package/dist/mock/api/default-template.d.ts +2 -0
- package/dist/mock/api/template-library.d.ts +2 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +51 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +52 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +41 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +32 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +8 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +34 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +104 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +13 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +20 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +18 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +32 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +46 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +44 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +45 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +43 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +266 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +26 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +22 -0
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +18 -0
- package/dist/node_modules/@vueuse/shared/index.js +45 -0
- package/dist/node_modules/lodash-es/_Stack.js +18 -0
- package/dist/node_modules/lodash-es/_Uint8Array.js +5 -0
- package/dist/node_modules/lodash-es/_apply.js +16 -0
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +19 -0
- package/dist/node_modules/lodash-es/_assignMergeValue.js +8 -0
- package/dist/node_modules/lodash-es/_assignValue.js +10 -0
- package/dist/node_modules/lodash-es/_baseAssignValue.js +12 -0
- package/dist/node_modules/lodash-es/_baseCreate.js +17 -0
- package/dist/node_modules/lodash-es/_baseFor.js +5 -0
- package/dist/node_modules/lodash-es/_baseIsArguments.js +9 -0
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +12 -0
- package/dist/node_modules/lodash-es/_baseKeysIn.js +15 -0
- package/dist/node_modules/lodash-es/_baseMerge.js +20 -0
- package/dist/node_modules/lodash-es/_baseMergeDeep.js +31 -0
- package/dist/node_modules/lodash-es/_baseRest.js +9 -0
- package/dist/node_modules/lodash-es/_baseSetToString.js +14 -0
- package/dist/node_modules/lodash-es/_baseTimes.js +8 -0
- package/dist/node_modules/lodash-es/_baseUnary.js +8 -0
- package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +8 -0
- package/dist/node_modules/lodash-es/_cloneBuffer.js +9 -0
- package/dist/node_modules/lodash-es/_cloneTypedArray.js +8 -0
- package/dist/node_modules/lodash-es/_copyArray.js +9 -0
- package/dist/node_modules/lodash-es/_copyObject.js +14 -0
- package/dist/node_modules/lodash-es/_createAssigner.js +15 -0
- package/dist/node_modules/lodash-es/_createBaseFor.js +13 -0
- package/dist/node_modules/lodash-es/_defineProperty.js +11 -0
- package/dist/node_modules/lodash-es/_getPrototype.js +5 -0
- package/dist/node_modules/lodash-es/_initCloneObject.js +9 -0
- package/dist/node_modules/lodash-es/_isIndex.js +8 -0
- package/dist/node_modules/lodash-es/_isIterateeCall.js +13 -0
- package/dist/node_modules/lodash-es/_isMasked.js +2 -2
- package/dist/node_modules/lodash-es/_isPrototype.js +8 -0
- package/dist/node_modules/lodash-es/_nativeKeysIn.js +10 -0
- package/dist/node_modules/lodash-es/_nodeUtil.js +11 -0
- package/dist/node_modules/lodash-es/_overArg.js +8 -0
- package/dist/node_modules/lodash-es/_overRest.js +15 -0
- package/dist/node_modules/lodash-es/_safeGet.js +7 -0
- package/dist/node_modules/lodash-es/_setToString.js +6 -0
- package/dist/node_modules/lodash-es/_shortOut.js +16 -0
- package/dist/node_modules/lodash-es/_stackClear.js +7 -0
- package/dist/node_modules/lodash-es/_stackDelete.js +7 -0
- package/dist/node_modules/lodash-es/_stackGet.js +6 -0
- package/dist/node_modules/lodash-es/_stackHas.js +6 -0
- package/dist/node_modules/lodash-es/_stackSet.js +17 -0
- package/dist/node_modules/lodash-es/constant.js +8 -0
- package/dist/node_modules/lodash-es/identity.js +6 -0
- package/dist/node_modules/lodash-es/isArguments.js +10 -0
- package/dist/node_modules/lodash-es/isArray.js +4 -0
- package/dist/node_modules/lodash-es/isArrayLike.js +8 -0
- package/dist/node_modules/lodash-es/isArrayLikeObject.js +8 -0
- package/dist/node_modules/lodash-es/isBuffer.js +6 -0
- package/dist/node_modules/lodash-es/isLength.js +7 -0
- package/dist/node_modules/lodash-es/isObjectLike.js +6 -0
- package/dist/node_modules/lodash-es/isPlainObject.js +16 -0
- package/dist/node_modules/lodash-es/isTypedArray.js +7 -0
- package/dist/node_modules/lodash-es/keysIn.js +9 -0
- package/dist/node_modules/lodash-es/merge.js +8 -0
- package/dist/node_modules/lodash-es/stubFalse.js +6 -0
- package/dist/node_modules/lodash-es/toPlainObject.js +8 -0
- package/dist/node_modules/valibot/dist/index.js +190 -0
- package/dist/node_modules/vue-demi/lib/index.js +7 -0
- package/dist/services/stripoApi.d.ts +6 -7
- package/dist/services/stripoApi.js +44 -23
- package/dist/services/templateLibraryApi.d.ts +7 -0
- package/dist/services/templateLibraryApi.js +87 -0
- package/dist/static/assets/inbox-mockup.svg.js +4 -0
- package/dist/static/assets/phone-mockup.svg.js +4 -0
- package/dist/static/styles/base.css.js +11 -0
- package/dist/static/styles/components/alert-message.css.js +39 -0
- package/dist/static/styles/components/amp-block.css.js +18 -0
- package/dist/static/styles/components/base-input.css.js +47 -0
- package/dist/static/styles/components/button-group.css.js +54 -0
- package/dist/static/styles/components/button.css.js +106 -0
- package/dist/static/styles/components/combobox.css.js +49 -0
- package/dist/static/styles/components/counter.css.js +42 -0
- package/dist/static/styles/components/dropdown-menu.css.js +52 -0
- package/dist/static/styles/components/narrow-panel.css.js +38 -0
- package/dist/static/styles/components/switcher.css.js +11 -0
- package/dist/static/styles/components/tabs.css.js +97 -0
- package/dist/static/styles/components/tools.css.js +23 -0
- package/dist/static/styles/components/version-history.css.js +30 -0
- package/dist/static/styles/components/wide-panel.css.js +144 -0
- package/dist/static/styles/customEditorStyle.css.js +18 -0
- package/dist/static/styles/variables.css.js +23 -0
- package/dist/stores/dynamic-content.d.ts +27 -0
- package/dist/stores/dynamic-content.js +23 -0
- package/dist/stores/editor.d.ts +3 -0
- package/dist/stores/editor.js +6 -3
- package/dist/stores/preview.d.ts +46 -0
- package/dist/stores/preview.js +53 -0
- package/dist/stores/save-as-template.d.ts +73 -0
- package/dist/stores/save-as-template.js +48 -0
- package/dist/stores/toaster.d.ts +18 -0
- package/dist/stores/toaster.js +27 -0
- package/dist/utils/arrayUtil.d.ts +1 -0
- package/dist/utils/arrayUtil.js +10 -0
- package/dist/utils/base64.d.ts +1 -0
- package/dist/utils/base64.js +7 -0
- package/dist/utils/genericUtil.d.ts +3 -0
- package/dist/utils/genericUtil.js +11 -0
- package/dist/utils/htmlCompiler.d.ts +12 -0
- package/dist/utils/htmlCompiler.js +70 -0
- package/dist/utils/templatePreparation.d.ts +4 -0
- package/dist/utils/templatePreparation.js +33 -0
- package/dist/utils/tooltipUtils.d.ts +2 -0
- package/dist/utils/tooltipUtils.js +11 -0
- package/package.json +8 -7
- package/dist/@types/http.d.ts +0 -19
- package/dist/composables/useTemplates.d.ts +0 -5
- package/dist/composables/useTemplates.js +0 -27
- package/dist/static/editor.css.js +0 -232
- package/dist/static/templates/default/index.html.js +0 -5
- package/dist/static/templates/default/style.css.js +0 -119
package/README.md
CHANGED
|
@@ -14,7 +14,10 @@ Guido is a Vue 2 + TypeScript wrapper for the Stripo Email Editor plugin. Easily
|
|
|
14
14
|
```bash
|
|
15
15
|
npm install @useinsider/guido
|
|
16
16
|
```
|
|
17
|
+
### Prerequisites
|
|
18
|
+
🍍 Your project should have `pinia`
|
|
17
19
|
|
|
20
|
+
---
|
|
18
21
|
## 🚀 Usage
|
|
19
22
|
|
|
20
23
|
### Basic Usage
|
|
@@ -23,9 +26,16 @@ npm install @useinsider/guido
|
|
|
23
26
|
<template>
|
|
24
27
|
<div>
|
|
25
28
|
<Guido
|
|
26
|
-
|
|
29
|
+
ref="guidoEditor"
|
|
30
|
+
:template-id="templateId"
|
|
27
31
|
:user-id="userId"
|
|
28
32
|
:guido-config="guidoConfig"
|
|
33
|
+
:html="initialHtml"
|
|
34
|
+
:css="initialCss"
|
|
35
|
+
@dynamic-content:open="handleDynamicContentOpen"
|
|
36
|
+
@back="handleBack"
|
|
37
|
+
@save:start="handleSaveStart"
|
|
38
|
+
@save:complete="handleSaveComplete"
|
|
29
39
|
/>
|
|
30
40
|
</div>
|
|
31
41
|
</template>
|
|
@@ -39,12 +49,60 @@ export default {
|
|
|
39
49
|
},
|
|
40
50
|
data() {
|
|
41
51
|
return {
|
|
42
|
-
|
|
43
|
-
userId: '
|
|
52
|
+
templateId: 'template-123',
|
|
53
|
+
userId: 'user-456',
|
|
54
|
+
initialHtml: '<p>Initial HTML content</p>',
|
|
55
|
+
initialCss: 'p { color: #333; }',
|
|
44
56
|
guidoConfig: {
|
|
45
|
-
translationsPath: 'window.trans.en'
|
|
46
|
-
|
|
57
|
+
translationsPath: 'window.trans.en',
|
|
58
|
+
htmlCompilerRules: [],
|
|
59
|
+
ignoreDefaultHtmlCompilerRules: false,
|
|
60
|
+
features: {
|
|
61
|
+
dynamicContent: true,
|
|
62
|
+
saveAsTemplate: true,
|
|
63
|
+
versionHistory: true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
dynamicContentModalVisible: false
|
|
47
67
|
};
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
methods: {
|
|
71
|
+
handleDynamicContentOpen(detail) {
|
|
72
|
+
console.log('Dynamic content requested:', detail);
|
|
73
|
+
this.dynamicContentModalVisible = true;
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
handleBack() {
|
|
77
|
+
console.log('User clicked back button');
|
|
78
|
+
// Handle navigation back
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
handleSaveStart() {
|
|
82
|
+
console.log('Save process started');
|
|
83
|
+
// Show loading indicator
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
handleSaveComplete(template) {
|
|
87
|
+
console.log('Save completed:', template);
|
|
88
|
+
// Handle saved template data
|
|
89
|
+
},
|
|
90
|
+
|
|
91
|
+
// ⚠️ Your own Dynamic Content Modal should have this id: #guido-dynamic-content-modal
|
|
92
|
+
handleDynamicContentInsert() {
|
|
93
|
+
this.$refs.guidoEditor?.dynamicContent.insert({
|
|
94
|
+
text: 'Display Text',
|
|
95
|
+
value: 'actual-value',
|
|
96
|
+
fallback: 'Fallback Text'
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
this.dynamicContentModalVisible = false;
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
// ⚠️ It's mandatory. There is no way to understand if user closes the modal without selection.
|
|
103
|
+
handleDynamicContentClose() {
|
|
104
|
+
this.$refs.guidoEditor?.dynamicContent.close();
|
|
105
|
+
}
|
|
48
106
|
}
|
|
49
107
|
};
|
|
50
108
|
</script>
|
|
@@ -56,24 +114,81 @@ export default {
|
|
|
56
114
|
|
|
57
115
|
| Prop | Type | Required | Default | Description |
|
|
58
116
|
|------|------|----------|---------|-------------|
|
|
59
|
-
| `
|
|
60
|
-
| `userId` | `string` | ✅ | - | Unique identifier for the user
|
|
61
|
-
| `username` | `string` | ⚪ | Guido User | User name |
|
|
62
|
-
| `partnerName` | `string` | ⚪ | Getting from URL host | Unique identifier for the partner draft |
|
|
63
|
-
| `productType` | `string` | ⚪ | Getting from URL path | Unique identifier for the product draft |
|
|
117
|
+
| `templateId` | `string` | ✅ | - | Unique identifier for the email template |
|
|
118
|
+
| `userId` | `string` | ✅ | - | Unique identifier for the user |
|
|
64
119
|
| `guidoConfig` | `GuidoConfig` | ✅ | - | Configuration object for the editor |
|
|
120
|
+
| `partnerName` | `string` | ⚪ | From URL host | Partner identifier |
|
|
121
|
+
| `productType` | `string` | ⚪ | From URL path | Product type identifier |
|
|
122
|
+
| `username` | `string` | ⚪ | `'Guido User'` | Display name for the user |
|
|
123
|
+
| `html` | `string` | ⚪ | `''` | Initial HTML content for the template |
|
|
124
|
+
| `css` | `string` | ⚪ | `''` | Initial CSS styles for the template |
|
|
125
|
+
|
|
126
|
+
### Guido Component Events
|
|
127
|
+
|
|
128
|
+
| Event | Payload | Description |
|
|
129
|
+
|-------|---------|-------------|
|
|
130
|
+
| `dynamic-content:open` | `DynamicContent \| null` | Fired when user requests to insert dynamic content |
|
|
131
|
+
| `back` | - | Fired when user clicks the back button |
|
|
132
|
+
| `save:start` | - | Fired when the save process begins |
|
|
133
|
+
| `save:complete` | `Omit<Template, 'forceRecreate'>` | Fired when template is successfully saved |
|
|
134
|
+
| `on-change` | void | It Fires once for managing leave modal etc. |
|
|
135
|
+
|
|
136
|
+
### Guido Exposed Methods
|
|
137
|
+
```typescript
|
|
138
|
+
dynamicContent.insert(DynamicContent);
|
|
139
|
+
dynamicContent.close();
|
|
140
|
+
```
|
|
65
141
|
|
|
66
|
-
###
|
|
142
|
+
### Guido Interfaces
|
|
67
143
|
|
|
68
144
|
```typescript
|
|
69
145
|
interface GuidoConfig {
|
|
70
146
|
translationsPath: string;
|
|
147
|
+
htmlCompilerRules?: CompilerRule[];
|
|
148
|
+
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
149
|
+
useHeader: boolean
|
|
150
|
+
emailHeader: {
|
|
151
|
+
senderName: string;
|
|
152
|
+
subject: string;
|
|
153
|
+
};
|
|
154
|
+
partner: {
|
|
155
|
+
partnerName: string;
|
|
156
|
+
productType: number;
|
|
157
|
+
messageType: number;
|
|
158
|
+
};
|
|
159
|
+
features: {
|
|
160
|
+
dynamicContent: boolean;
|
|
161
|
+
saveAsTemplate: boolean;
|
|
162
|
+
versionHistory: boolean;
|
|
163
|
+
};
|
|
71
164
|
}
|
|
72
165
|
```
|
|
73
166
|
|
|
74
167
|
| Property | Type | Default | Description |
|
|
75
168
|
|----------|------|---------|-------------|
|
|
76
169
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
170
|
+
| `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
|
|
171
|
+
| `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
|
|
172
|
+
| `useHeader` | `boolean` | `true` | Adds extra spaces to height for adjusting. If you don't use Inone Page header, override as `false` |
|
|
173
|
+
| `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
|
|
174
|
+
| `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
|
|
175
|
+
| `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
|
|
176
|
+
| `features.versionHistory` | `boolean` | `true` | Enable version history feature |
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
interface DynamicContent {
|
|
180
|
+
value: string;
|
|
181
|
+
text: string;
|
|
182
|
+
fallback?: string;
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
| Property | Type | Default | Description |
|
|
188
|
+
|----------|------|---------|-------------|
|
|
189
|
+
| `value` | `string` | '' | Value of the dynamic content |
|
|
190
|
+
| `text` | `string` | '' | Visible value of the dynamic content |
|
|
191
|
+
| `fallback?` | `string` | '' | Fallback value of the dynamic content. Optional |
|
|
77
192
|
|
|
78
193
|
### TypeScript Types
|
|
79
194
|
|
|
@@ -88,17 +203,193 @@ import type { GuidoConfig } from '@useinsider/guido';
|
|
|
88
203
|
import type { StripoEventType } from '@useinsider/guido';
|
|
89
204
|
```
|
|
90
205
|
|
|
91
|
-
|
|
206
|
+
## 🔨 HTML Compiler Rules
|
|
207
|
+
|
|
208
|
+
Guido includes a powerful HTML compiler system that allows you to transform HTML content with custom rules. You can define additional rules and optionally ignore the default rules.
|
|
209
|
+
|
|
210
|
+
### Rule Types
|
|
211
|
+
|
|
212
|
+
There are 4 types of compiler rules:
|
|
213
|
+
|
|
214
|
+
#### 1. Replace Rule
|
|
215
|
+
Replace specific strings in HTML content.
|
|
216
|
+
|
|
217
|
+
```typescript
|
|
218
|
+
{
|
|
219
|
+
id: 'fix-encoding',
|
|
220
|
+
description: 'Fix URL encoding issues',
|
|
221
|
+
type: 'replace',
|
|
222
|
+
search: '{%22', // String to find
|
|
223
|
+
replacement: '%7B%22', // String to replace with
|
|
224
|
+
replaceAll: true, // Replace all occurrences (default: true)
|
|
225
|
+
priority: 10 // Execution priority (lower = earlier)
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
#### 2. Regex Rule
|
|
230
|
+
Use regular expressions for complex pattern matching and replacement.
|
|
231
|
+
|
|
232
|
+
```typescript
|
|
233
|
+
{
|
|
234
|
+
id: 'remove-comments',
|
|
235
|
+
description: 'Remove HTML comments',
|
|
236
|
+
type: 'regex',
|
|
237
|
+
pattern: '<!--.*?-->', // Regex pattern
|
|
238
|
+
replacement: '', // Replacement string
|
|
239
|
+
flags: 'g', // Regex flags (default: 'g')
|
|
240
|
+
priority: 20
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
#### 3. Remove Rule
|
|
245
|
+
Remove specific strings or patterns from HTML content.
|
|
246
|
+
|
|
247
|
+
```typescript
|
|
248
|
+
{
|
|
249
|
+
id: 'cleanup-scripts',
|
|
250
|
+
description: 'Remove unwanted script tags',
|
|
251
|
+
type: 'remove',
|
|
252
|
+
targets: [ // Array of strings or RegExp objects
|
|
253
|
+
'<script src="unwanted.js"></script>',
|
|
254
|
+
/onclick="[^"]*"/g
|
|
255
|
+
],
|
|
256
|
+
priority: 30
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
#### 4. Custom Rule
|
|
261
|
+
Define complex transformation logic with a custom processor function.
|
|
262
|
+
|
|
263
|
+
```typescript
|
|
264
|
+
{
|
|
265
|
+
id: 'add-meta-tags',
|
|
266
|
+
description: 'Add custom meta tags to head',
|
|
267
|
+
type: 'custom',
|
|
268
|
+
processor: (html: string): string => {
|
|
269
|
+
// Custom transformation logic
|
|
270
|
+
const metaTags = '<meta name="custom" content="value">';
|
|
271
|
+
return html.replace('</head>', `${metaTags}</head>`);
|
|
272
|
+
},
|
|
273
|
+
priority: 40
|
|
274
|
+
}
|
|
275
|
+
```
|
|
276
|
+
|
|
277
|
+
### Using HTML Compiler Rules
|
|
278
|
+
|
|
279
|
+
#### Basic Usage with Custom Rules
|
|
280
|
+
|
|
281
|
+
```typescript
|
|
282
|
+
const guidoConfig = {
|
|
283
|
+
translationsPath: 'window.trans.en',
|
|
284
|
+
features: {
|
|
285
|
+
dynamicContent: true,
|
|
286
|
+
saveAsTemplate: true,
|
|
287
|
+
versionHistory: false // Disable version history
|
|
288
|
+
},
|
|
289
|
+
htmlCompilerRules: [
|
|
290
|
+
{
|
|
291
|
+
id: 'replace-domain',
|
|
292
|
+
description: 'Replace old domain with new one',
|
|
293
|
+
type: 'replace',
|
|
294
|
+
search: 'old-domain.com',
|
|
295
|
+
replacement: 'new-domain.com',
|
|
296
|
+
replaceAll: true,
|
|
297
|
+
priority: 10
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
id: 'remove-tracking',
|
|
301
|
+
description: 'Remove tracking pixels',
|
|
302
|
+
type: 'regex',
|
|
303
|
+
pattern: '<img[^>]*tracking[^>]*>',
|
|
304
|
+
replacement: '',
|
|
305
|
+
flags: 'gi',
|
|
306
|
+
priority: 20
|
|
307
|
+
}
|
|
308
|
+
]
|
|
309
|
+
};
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
#### Ignoring Default Rules
|
|
313
|
+
|
|
314
|
+
```typescript
|
|
315
|
+
const guidoConfig = {
|
|
316
|
+
translationsPath: 'window.trans.en',
|
|
317
|
+
features: {
|
|
318
|
+
dynamicContent: true,
|
|
319
|
+
saveAsTemplate: true,
|
|
320
|
+
versionHistory: true
|
|
321
|
+
},
|
|
322
|
+
ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
|
|
323
|
+
htmlCompilerRules: [
|
|
324
|
+
// Only your custom rules will be applied
|
|
325
|
+
{
|
|
326
|
+
id: 'custom-transformation',
|
|
327
|
+
type: 'replace',
|
|
328
|
+
search: 'old-text',
|
|
329
|
+
replacement: 'new-text',
|
|
330
|
+
priority: 1
|
|
331
|
+
}
|
|
332
|
+
]
|
|
333
|
+
};
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Rule Execution Order
|
|
337
|
+
|
|
338
|
+
Rules are executed in priority order (lower numbers first). Rules with the same priority are executed in array order.
|
|
339
|
+
|
|
340
|
+
- **Priority 1-99**: Reserved for critical transformations
|
|
341
|
+
- **Priority 100-999**: Standard transformations
|
|
342
|
+
- **Priority 1000+**: Additional custom rules (automatically assigned)
|
|
343
|
+
|
|
344
|
+
### Default Rules
|
|
345
|
+
|
|
346
|
+
Guido includes several default rules for common email HTML optimizations:
|
|
347
|
+
|
|
348
|
+
- **URL encoding fixes**: Fixes malformed URL encoding in dynamic content
|
|
349
|
+
- **Template tag restoration**: Restores `{{}}` template tags that got URL encoded
|
|
350
|
+
- **HTML entity decoding**: Converts `<` and `>` back to `<` and `>`
|
|
351
|
+
- **Cleanup rules**: Removes unwanted iframe and style elements
|
|
352
|
+
- **MSO conditions**: Manages Outlook-specific conditional comments
|
|
353
|
+
- **Domain replacement**: Updates old image domains to current ones
|
|
354
|
+
|
|
355
|
+
You can view all default rules in: `src/config/compiler/htmlCompilerRules.ts`
|
|
356
|
+
|
|
357
|
+
### CompilerRule Interface
|
|
92
358
|
|
|
93
359
|
```typescript
|
|
94
|
-
type
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
360
|
+
type CompilerRuleType = 'replace' | 'regex' | 'remove' | 'custom';
|
|
361
|
+
|
|
362
|
+
interface BaseCompilerRule {
|
|
363
|
+
id: string;
|
|
364
|
+
description?: string;
|
|
365
|
+
priority: number;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
interface ReplaceRule extends BaseCompilerRule {
|
|
369
|
+
type: 'replace';
|
|
370
|
+
search: string;
|
|
371
|
+
replacement: string;
|
|
372
|
+
replaceAll?: boolean; // Default: true
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
interface RegexRule extends BaseCompilerRule {
|
|
376
|
+
type: 'regex';
|
|
377
|
+
pattern: string;
|
|
378
|
+
replacement: string;
|
|
379
|
+
flags?: string; // Default: 'g'
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
interface RemoveRule extends BaseCompilerRule {
|
|
383
|
+
type: 'remove';
|
|
384
|
+
targets: (string | RegExp)[]; // Array of strings or RegExp objects
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
interface CustomRule extends BaseCompilerRule {
|
|
388
|
+
type: 'custom';
|
|
389
|
+
processor: (html: string) => string;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
type CompilerRule = ReplaceRule | RegexRule | RemoveRule | CustomRule;
|
|
102
393
|
```
|
|
103
394
|
|
|
104
395
|
---
|
|
@@ -157,6 +448,87 @@ src/
|
|
|
157
448
|
└── library.ts # Main export
|
|
158
449
|
```
|
|
159
450
|
|
|
451
|
+
## 🔌 Provide/Inject Utilities
|
|
452
|
+
|
|
453
|
+
Guido includes type-safe utilities for Vue's provide/inject system to facilitate dependency injection between components.
|
|
454
|
+
|
|
455
|
+
### useProvideInject
|
|
456
|
+
|
|
457
|
+
The `useProvideInject` composable provides two helper functions for type-safe dependency injection:
|
|
458
|
+
|
|
459
|
+
#### Basic Usage
|
|
460
|
+
|
|
461
|
+
```typescript
|
|
462
|
+
// Parent component
|
|
463
|
+
import { provideValue } from '@useinsider/guido';
|
|
464
|
+
import { InjectionKey } from 'vue';
|
|
465
|
+
|
|
466
|
+
// Define a typed injection key
|
|
467
|
+
const MyServiceKey: InjectionKey<MyService> = Symbol('MyService');
|
|
468
|
+
|
|
469
|
+
// Provide the value
|
|
470
|
+
const myService = new MyService();
|
|
471
|
+
provideValue(MyServiceKey, myService);
|
|
472
|
+
|
|
473
|
+
// Child component
|
|
474
|
+
import { useInjectedValue } from '@useinsider/guido';
|
|
475
|
+
|
|
476
|
+
// Inject the value with type safety
|
|
477
|
+
const myService = useInjectedValue(MyServiceKey);
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
#### With Default Value
|
|
481
|
+
|
|
482
|
+
```typescript
|
|
483
|
+
// Inject with a fallback value
|
|
484
|
+
const myService = useInjectedValue(MyServiceKey, new DefaultService());
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
#### Error Handling
|
|
488
|
+
|
|
489
|
+
The `useInjectedValue` function will throw a descriptive error if no provider is found and no default value is provided:
|
|
490
|
+
|
|
491
|
+
```typescript
|
|
492
|
+
// This will throw an error if no provider exists
|
|
493
|
+
try {
|
|
494
|
+
const myService = useInjectedValue(MyServiceKey);
|
|
495
|
+
} catch (error) {
|
|
496
|
+
console.error('No provider found for MyService');
|
|
497
|
+
}
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### API Reference
|
|
501
|
+
|
|
502
|
+
#### `provideValue`
|
|
503
|
+
|
|
504
|
+
```typescript
|
|
505
|
+
provideValue<T>(key: InjectionKey<T>, value: T): void
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
Provides a value using Vue's provide system with type safety.
|
|
509
|
+
|
|
510
|
+
| Parameter | Type | Description |
|
|
511
|
+
|-----------|------|-------------|
|
|
512
|
+
| `key` | `InjectionKey<T>` | The typed injection key |
|
|
513
|
+
| `value` | `T` | The value to provide |
|
|
514
|
+
|
|
515
|
+
#### `useInjectedValue`
|
|
516
|
+
|
|
517
|
+
```typescript
|
|
518
|
+
useInjectedValue<T>(key: InjectionKey<T>, defaultValue?: T): T
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
Injects a value using Vue's inject system with type safety and error handling.
|
|
522
|
+
|
|
523
|
+
| Parameter | Type | Required | Description |
|
|
524
|
+
|-----------|------|----------|-------------|
|
|
525
|
+
| `key` | `InjectionKey<T>` | ✅ | The typed injection key |
|
|
526
|
+
| `defaultValue` | `T` | ⚪ | Optional fallback value |
|
|
527
|
+
|
|
528
|
+
**Returns:** `T` - The injected value
|
|
529
|
+
|
|
530
|
+
**Throws:** `Error` - When no provider is found and no default value is provided
|
|
531
|
+
|
|
160
532
|
## 🌐 i18n
|
|
161
533
|
Before running the project, it sends to request to inone.useinsider.com/translations and writes the JSON file into - [trans.json](src/mock/responses/trans.json).
|
|
162
534
|
It allows to use production or local translations on your code. 🚀
|
|
@@ -170,6 +542,34 @@ const trans = useTranslations();
|
|
|
170
542
|
trans('foo.bar')
|
|
171
543
|
```
|
|
172
544
|
|
|
545
|
+
## 📦 Local Building (Recommended)
|
|
546
|
+
|
|
547
|
+
Run this commands if you want to test the package on your local before sending to NPM.
|
|
548
|
+
```sh
|
|
549
|
+
bun run build
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
Since bun does not have packaging yet, use npm here: 🥲
|
|
553
|
+
```sh
|
|
554
|
+
npm pack
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
It'll crate like `useinsider-guido-1.0.0.tgz` file.
|
|
558
|
+
|
|
559
|
+
Move this file to your project path like: `email-fe` via:
|
|
560
|
+
```sh
|
|
561
|
+
cp useinsider-guido-1.0.0.tgz ../email-fe
|
|
562
|
+
```
|
|
563
|
+
|
|
564
|
+
Install the file to your project:
|
|
565
|
+
```sh
|
|
566
|
+
npm i ./useinsider-guido-1.0.0.tgz
|
|
567
|
+
```
|
|
568
|
+
|
|
569
|
+
Then you just need to rebuild to your project or restart the Container. 🎉
|
|
570
|
+
|
|
571
|
+
For Future, we can create a shell script for it. Feel free to help 🙃
|
|
572
|
+
|
|
173
573
|
## 📦 Build Output
|
|
174
574
|
|
|
175
575
|
The library builds to multiple formats:
|
|
@@ -211,7 +611,8 @@ ISC License
|
|
|
211
611
|
- [@useinsider/design-system-vue](https://github.com/useinsider/design-system-vue) - Insider's Vue design system
|
|
212
612
|
|
|
213
613
|
## 🎯 TODO:
|
|
214
|
-
-
|
|
614
|
+
- CSS part should be optimized with variables & `sass-loader`.
|
|
215
615
|
- Master Version Generator should be fixed.
|
|
216
616
|
- Playwright integration
|
|
217
617
|
- Commitlint & Precommit Hooks integration
|
|
618
|
+
- Get Pre-built display conditions from API
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -1,29 +1,45 @@
|
|
|
1
|
+
import type { CompilerRule } from './html-compiler';
|
|
2
|
+
type Features = {
|
|
3
|
+
dynamicContent?: boolean;
|
|
4
|
+
saveAsTemplate?: boolean;
|
|
5
|
+
versionHistory?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type Partner = {
|
|
8
|
+
partnerName: string;
|
|
9
|
+
productType: number;
|
|
10
|
+
messageType: number;
|
|
11
|
+
};
|
|
1
12
|
export type GuidoConfig = {
|
|
2
13
|
translationsPath: string;
|
|
14
|
+
htmlCompilerRules?: CompilerRule[];
|
|
15
|
+
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
16
|
+
useHeader?: boolean;
|
|
17
|
+
emailHeader: EmailHeader;
|
|
18
|
+
partner?: Partner;
|
|
19
|
+
features?: Features;
|
|
3
20
|
};
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
name: string;
|
|
7
|
-
email: string;
|
|
8
|
-
}
|
|
9
|
-
export interface ApiResponse<T> {
|
|
10
|
-
data: T;
|
|
11
|
-
message: string;
|
|
12
|
-
success: boolean;
|
|
13
|
-
}
|
|
14
|
-
export type ToasterType = 'success' | 'error' | 'info' | 'warning';
|
|
15
|
-
export interface ToasterActionButton {
|
|
21
|
+
export type DynamicContent = {
|
|
22
|
+
value: string;
|
|
16
23
|
text: string;
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
export interface
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
actionButton?: ToasterActionButton;
|
|
23
|
-
}
|
|
24
|
-
export interface Translations {
|
|
25
|
-
[key: string]: string;
|
|
24
|
+
fallback?: string;
|
|
25
|
+
};
|
|
26
|
+
export interface EmailHeader {
|
|
27
|
+
senderName: string;
|
|
28
|
+
subject: string;
|
|
26
29
|
}
|
|
27
|
-
export interface
|
|
28
|
-
|
|
30
|
+
export interface TooltipOptions {
|
|
31
|
+
id: string;
|
|
32
|
+
dynamicPosition: boolean;
|
|
33
|
+
staticPosition: 'top center' | 'top left' | 'top right' | 'bottom center' | 'bottom left' | 'bottom right' | 'right center' | 'right top' | 'right bottom' | 'left center' | 'left top' | 'left bottom';
|
|
34
|
+
iconStatus: boolean;
|
|
35
|
+
offset?: {
|
|
36
|
+
x: number;
|
|
37
|
+
y: number;
|
|
38
|
+
};
|
|
39
|
+
preventXss?: boolean;
|
|
29
40
|
}
|
|
41
|
+
export type MergeTag = {
|
|
42
|
+
label: string;
|
|
43
|
+
value: string;
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface MappedCategory {
|
|
2
|
+
value: string;
|
|
3
|
+
text: string;
|
|
4
|
+
}
|
|
5
|
+
export interface Category {
|
|
6
|
+
id: number;
|
|
7
|
+
name: string;
|
|
8
|
+
partnerId: number;
|
|
9
|
+
isStripo: boolean;
|
|
10
|
+
templatesCount: number;
|
|
11
|
+
}
|
|
12
|
+
export interface RecommendationCampaignUrls {
|
|
13
|
+
[key: string]: string;
|
|
14
|
+
}
|
|
15
|
+
export interface CreateTemplateRequest {
|
|
16
|
+
name: string;
|
|
17
|
+
categories: number[];
|
|
18
|
+
productId: number;
|
|
19
|
+
editorType: number;
|
|
20
|
+
messageType?: number;
|
|
21
|
+
content: string;
|
|
22
|
+
css?: string;
|
|
23
|
+
stripoConfig: string;
|
|
24
|
+
recommendationConfigs?: string;
|
|
25
|
+
recommendationCampaignUrls?: string;
|
|
26
|
+
unsubscriptionPreferencePages: number[];
|
|
27
|
+
unsubscriptionPreferencePageStatus: boolean;
|
|
28
|
+
isGuido: boolean;
|
|
29
|
+
}
|
package/dist/App.vue.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import '../node_modules/@useinsider/design-system-vue/dist/design-system-vue.css';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
2
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
3
3
|
export default _default;
|