@useinsider/guido 1.0.0-beta.08c336f → 1.0.0-beta.0c35e01
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 +34 -422
- package/dist/@types/generic.d.ts +0 -41
- package/dist/App.vue.d.ts +1 -1
- package/dist/components/Guido.vue.d.ts +3 -23
- package/dist/components/Guido.vue.js +8 -8
- package/dist/components/Guido.vue2.js +20 -88
- 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 +6 -10
- package/dist/components/organisms/header/MiddleSlot.vue.js +10 -10
- package/dist/components/organisms/header/MiddleSlot.vue2.js +15 -16
- package/dist/components/organisms/header/RightSlot.vue.js +11 -11
- package/dist/components/organisms/header/RightSlot.vue2.js +16 -30
- 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 +10 -30
- package/dist/components/organisms/header/version-history/VersionHistory.vue.d.ts +1 -13
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +9 -9
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +8 -12
- package/dist/components/organisms/header/version-history/ViewOptions.vue.d.ts +1 -1
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +1 -1
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +16 -34
- package/dist/composables/useActionsApi.d.ts +1 -5
- package/dist/composables/useActionsApi.js +31 -74
- package/dist/composables/useCustomInterfaceAppearance.js +9 -45
- package/dist/composables/useExport.d.ts +1 -1
- package/dist/composables/useExport.js +20 -35
- package/dist/composables/useStripo.d.ts +2 -2
- package/dist/composables/useStripo.js +55 -73
- package/dist/composables/useTemplates.d.ts +5 -0
- package/dist/composables/useTemplates.js +27 -0
- package/dist/composables/useToaster.d.ts +1 -2
- package/dist/composables/useToaster.js +13 -21
- package/dist/composables/useTranslations.js +2 -3
- package/dist/composables/useVersionHistoryApi.d.ts +0 -1
- package/dist/composables/useVersionHistoryApi.js +13 -31
- package/dist/enums/defaults.d.ts +0 -5
- package/dist/enums/defaults.js +3 -20
- package/dist/guido.css +1 -1
- package/dist/node_modules/lodash-es/_isMasked.js +2 -2
- package/dist/node_modules/pinia/dist/pinia.js +317 -0
- package/dist/node_modules/pinia/node_modules/vue-demi/lib/index.js +11 -0
- package/dist/static/editor.css.js +182 -0
- package/dist/static/templates/default/index.html.js +5 -0
- package/dist/static/templates/default/style.css.js +119 -0
- package/dist/stores/editor.d.ts +0 -3
- package/dist/stores/editor.js +4 -7
- package/dist/stores/version-history.d.ts +24 -80
- package/dist/stores/version-history.js +26 -24
- package/package.json +7 -8
- package/dist/@types/save-as-template.d.ts +0 -29
- package/dist/_virtual/AddCustomFont.js +0 -4
- package/dist/_virtual/AiAssistantValueType.js +0 -4
- package/dist/_virtual/BackgroundColorBuiltInControl.js +0 -4
- package/dist/_virtual/BackgroundImageBuiltInControl.js +0 -4
- package/dist/_virtual/Block.js +0 -4
- package/dist/_virtual/BlockAttributes.js +0 -4
- package/dist/_virtual/BlockCompositionType.js +0 -4
- package/dist/_virtual/BlockPaddingsBuiltInControl.js +0 -4
- package/dist/_virtual/BlockRenderer.js +0 -4
- package/dist/_virtual/BlockType.js +0 -4
- package/dist/_virtual/BlocksPanel.js +0 -4
- package/dist/_virtual/BuiltInControl.js +0 -4
- package/dist/_virtual/BuiltInControlTypes.js +0 -4
- package/dist/_virtual/ButtonBorderBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonColorBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonFontColorBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonInternalIndentsBuiltInControl.js +0 -4
- package/dist/_virtual/ButtonTextBuiltInControl.js +0 -4
- package/dist/_virtual/ContextAction.js +0 -4
- package/dist/_virtual/ContextActionType.js +0 -4
- package/dist/_virtual/Control.js +0 -4
- package/dist/_virtual/EditorStatePropertyType.js +0 -4
- package/dist/_virtual/Extension.js +0 -4
- package/dist/_virtual/ExtensionBuilder.js +0 -4
- package/dist/_virtual/FontFamilyBuiltInControl.js +0 -4
- package/dist/_virtual/LinkColorBuiltInControl.js +0 -4
- package/dist/_virtual/ModificationDescription.js +0 -4
- package/dist/_virtual/PanelPosition.js +0 -4
- package/dist/_virtual/PreviewDeviceMode.js +0 -4
- package/dist/_virtual/SettingsPanelRegistry.js +0 -4
- package/dist/_virtual/SettingsPanelTab.js +0 -4
- package/dist/_virtual/SettingsTab.js +0 -4
- package/dist/_virtual/StructureBorderBuiltInControl.js +0 -4
- package/dist/_virtual/StructurePaddingsBuiltInControl.js +0 -4
- package/dist/_virtual/TextColorBuiltInControl.js +0 -4
- package/dist/_virtual/TextLineSpacingBuiltInControl.js +0 -4
- package/dist/_virtual/TextSizeBuiltInControl.js +0 -4
- package/dist/_virtual/TextStyleBuiltInControl.js +0 -4
- package/dist/_virtual/UIElement.js +0 -4
- package/dist/_virtual/UIElementTagRegistry.js +0 -4
- package/dist/_virtual/UIElementType.js +0 -4
- package/dist/_virtual/UIElementsAttributes.js +0 -4
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/index2.js +0 -4
- package/dist/components/organisms/email-preview/PreviewContainer.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/PreviewContainer.vue.js +0 -19
- package/dist/components/organisms/email-preview/PreviewContainer.vue2.js +0 -19
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue.js +0 -22
- package/dist/components/organisms/email-preview/amp/AmpErrorModal.vue2.js +0 -30
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue.js +0 -19
- package/dist/components/organisms/email-preview/amp/AmpToggle.vue2.js +0 -29
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue.js +0 -22
- package/dist/components/organisms/email-preview/desktop-preview/DesktopPreview.vue2.js +0 -31
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue.js +0 -17
- package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +0 -20
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue.js +0 -18
- package/dist/components/organisms/email-preview/desktop-preview/EmailSizeIndicator.vue2.js +0 -25
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue.js +0 -19
- package/dist/components/organisms/email-preview/mobile-preview/ContentView.vue2.js +0 -23
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.d.ts +0 -4
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +0 -20
- package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +0 -21
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.d.ts +0 -2
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue.js +0 -17
- package/dist/components/organisms/email-preview/mobile-preview/MobilePreview.vue2.js +0 -22
- package/dist/components/organisms/header/version-history/RestoreButton.vue.d.ts +0 -2
- package/dist/components/organisms/header/version-history/RestoreButton.vue.js +0 -19
- package/dist/components/organisms/header/version-history/RestoreButton.vue2.js +0 -14
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.d.ts +0 -16
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue.js +0 -18
- package/dist/components/organisms/header/version-history/VersionHistoryItem.vue2.js +0 -16
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.d.ts +0 -2
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue.js +0 -20
- package/dist/components/organisms/save-as-template/SaveAsTemplateDrawer.vue2.js +0 -63
- package/dist/components/wrappers/WpDrawer.vue.d.ts +0 -63
- package/dist/components/wrappers/WpDrawer.vue.js +0 -25
- package/dist/components/wrappers/WpDrawer.vue2.js +0 -23
- package/dist/components/wrappers/WpModal.vue.d.ts +0 -65
- package/dist/components/wrappers/WpModal.vue.js +0 -27
- package/dist/components/wrappers/WpModal.vue2.js +0 -22
- package/dist/composables/useCodeEditorApi.d.ts +0 -4
- package/dist/composables/useCodeEditorApi.js +0 -11
- package/dist/composables/useConfig.d.ts +0 -4
- package/dist/composables/useConfig.js +0 -7
- package/dist/composables/useDebounce.d.ts +0 -4
- package/dist/composables/useDebounce.js +0 -12
- package/dist/composables/useGuidoActions.d.ts +0 -46
- package/dist/composables/useGuidoActions.js +0 -37
- package/dist/composables/useHtmlCompiler.d.ts +0 -4
- package/dist/composables/useHtmlCompiler.js +0 -17
- package/dist/composables/useHttp.js +0 -86
- package/dist/composables/usePartner.d.ts +0 -4
- package/dist/composables/usePartner.js +0 -11
- package/dist/composables/usePreviewMode.d.ts +0 -5
- package/dist/composables/usePreviewMode.js +0 -31
- package/dist/composables/useProvideInject.d.ts +0 -14
- package/dist/composables/useProvideInject.js +0 -17
- package/dist/composables/useResponsivePreview.d.ts +0 -5
- package/dist/composables/useResponsivePreview.js +0 -86
- package/dist/composables/useValidation.d.ts +0 -56
- package/dist/composables/useValidation.js +0 -19
- package/dist/composables/validators/saveAsTemplate.d.ts +0 -31
- package/dist/composables/validators/saveAsTemplate.js +0 -24
- package/dist/config/compiler/htmlCompilerRules.d.ts +0 -2
- package/dist/config/compiler/htmlCompilerRules.js +0 -145
- package/dist/config/compiler/outlookCompilerRules.d.ts +0 -0
- package/dist/enums/displayConditions.d.ts +0 -2
- package/dist/enums/displayConditions.js +0 -80
- package/dist/enums/preview.d.ts +0 -13
- package/dist/enums/preview.js +0 -23
- package/dist/extensions/DynamicContent/dynamic-content-modal.d.ts +0 -6
- package/dist/extensions/DynamicContent/dynamic-content-modal.js +0 -27
- package/dist/extensions/DynamicContent/dynamic-content.css.js +0 -24
- package/dist/extensions/DynamicContent/dynamic-content.d.ts +0 -16
- package/dist/extensions/DynamicContent/dynamic-content.js +0 -61
- package/dist/extensions/DynamicContent/extension.d.ts +0 -2
- package/dist/extensions/DynamicContent/extension.js +0 -11
- package/dist/mock/api/custom-fonts.d.ts +0 -2
- package/dist/mock/api/default-template.d.ts +0 -2
- package/dist/mock/api/template-library.d.ts +0 -2
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/Extension.js +0 -51
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ExtensionBuilder.js +0 -52
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/Block.js +0 -41
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlockRenderer.js +0 -18
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/BlocksPanel.js +0 -32
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/blocks/ContextAction.js +0 -18
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AddCustomFont.js +0 -8
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/AiAssistantValueType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockAttributes.js +0 -34
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockCompositionType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BlockType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/BuiltInControlTypes.js +0 -104
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/ContextActionType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/EditorStatePropertyType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PanelPosition.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/PreviewDeviceMode.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/SettingsTab.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementType.js +0 -13
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/constants/UIElementsAttributes.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundColorBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BackgroundImageBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BlockPaddingsBuiltInControl.js +0 -44
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/BuiltInControl.js +0 -22
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonBorderBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonColorBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonFontColorBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonInternalIndentsBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/ButtonTextBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/Control.js +0 -20
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/FontFamilyBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/LinkColorBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelRegistry.js +0 -18
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/SettingsPanelTab.js +0 -32
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructureBorderBuiltInControl.js +0 -46
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/StructurePaddingsBuiltInControl.js +0 -44
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextColorBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextLineSpacingBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextSizeBuiltInControl.js +0 -45
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/controls/TextStyleBuiltInControl.js +0 -43
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/index.js +0 -266
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/modifications/ModificationDescription.js +0 -26
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElement.js +0 -22
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/ui-elements/UIElementTagRegistry.js +0 -18
- package/dist/node_modules/@vueuse/shared/index.js +0 -45
- package/dist/node_modules/lodash-es/_Stack.js +0 -18
- package/dist/node_modules/lodash-es/_Uint8Array.js +0 -5
- package/dist/node_modules/lodash-es/_apply.js +0 -16
- package/dist/node_modules/lodash-es/_arrayLikeKeys.js +0 -19
- package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
- package/dist/node_modules/lodash-es/_assignValue.js +0 -10
- package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
- package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
- package/dist/node_modules/lodash-es/_baseFor.js +0 -5
- package/dist/node_modules/lodash-es/_baseIsArguments.js +0 -9
- package/dist/node_modules/lodash-es/_baseIsTypedArray.js +0 -12
- package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
- package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
- package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
- package/dist/node_modules/lodash-es/_baseRest.js +0 -9
- package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
- package/dist/node_modules/lodash-es/_baseTimes.js +0 -8
- package/dist/node_modules/lodash-es/_baseUnary.js +0 -8
- package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
- package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
- package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
- package/dist/node_modules/lodash-es/_copyArray.js +0 -9
- package/dist/node_modules/lodash-es/_copyObject.js +0 -14
- package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
- package/dist/node_modules/lodash-es/_createBaseFor.js +0 -13
- package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
- package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
- package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
- package/dist/node_modules/lodash-es/_isIndex.js +0 -8
- package/dist/node_modules/lodash-es/_isIterateeCall.js +0 -13
- package/dist/node_modules/lodash-es/_isPrototype.js +0 -8
- package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
- package/dist/node_modules/lodash-es/_nodeUtil.js +0 -11
- package/dist/node_modules/lodash-es/_overArg.js +0 -8
- package/dist/node_modules/lodash-es/_overRest.js +0 -15
- package/dist/node_modules/lodash-es/_safeGet.js +0 -7
- package/dist/node_modules/lodash-es/_setToString.js +0 -6
- package/dist/node_modules/lodash-es/_shortOut.js +0 -16
- package/dist/node_modules/lodash-es/_stackClear.js +0 -7
- package/dist/node_modules/lodash-es/_stackDelete.js +0 -7
- package/dist/node_modules/lodash-es/_stackGet.js +0 -6
- package/dist/node_modules/lodash-es/_stackHas.js +0 -6
- package/dist/node_modules/lodash-es/_stackSet.js +0 -17
- package/dist/node_modules/lodash-es/constant.js +0 -8
- package/dist/node_modules/lodash-es/identity.js +0 -6
- package/dist/node_modules/lodash-es/isArguments.js +0 -10
- package/dist/node_modules/lodash-es/isArray.js +0 -4
- package/dist/node_modules/lodash-es/isArrayLike.js +0 -8
- package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
- package/dist/node_modules/lodash-es/isBuffer.js +0 -6
- package/dist/node_modules/lodash-es/isLength.js +0 -7
- package/dist/node_modules/lodash-es/isObjectLike.js +0 -6
- package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
- package/dist/node_modules/lodash-es/isTypedArray.js +0 -7
- package/dist/node_modules/lodash-es/keysIn.js +0 -9
- package/dist/node_modules/lodash-es/merge.js +0 -8
- package/dist/node_modules/lodash-es/stubFalse.js +0 -6
- package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
- package/dist/node_modules/valibot/dist/index.js +0 -190
- package/dist/node_modules/vue-demi/lib/index.js +0 -7
- package/dist/services/stripoApi.d.ts +0 -8
- package/dist/services/stripoApi.js +0 -49
- package/dist/services/templateLibraryApi.d.ts +0 -7
- package/dist/services/templateLibraryApi.js +0 -87
- package/dist/static/assets/inbox-mockup.svg.js +0 -4
- package/dist/static/assets/phone-mockup.svg.js +0 -4
- package/dist/static/styles/base.css.js +0 -11
- package/dist/static/styles/components/alert-message.css.js +0 -39
- package/dist/static/styles/components/amp-block.css.js +0 -18
- package/dist/static/styles/components/base-input.css.js +0 -47
- package/dist/static/styles/components/button-group.css.js +0 -54
- package/dist/static/styles/components/button.css.js +0 -106
- package/dist/static/styles/components/combobox.css.js +0 -49
- package/dist/static/styles/components/counter.css.js +0 -42
- package/dist/static/styles/components/dropdown-menu.css.js +0 -52
- package/dist/static/styles/components/narrow-panel.css.js +0 -38
- package/dist/static/styles/components/switcher.css.js +0 -11
- package/dist/static/styles/components/tabs.css.js +0 -97
- package/dist/static/styles/components/tools.css.js +0 -23
- package/dist/static/styles/components/version-history.css.js +0 -30
- package/dist/static/styles/components/wide-panel.css.js +0 -135
- package/dist/static/styles/variables.css.js +0 -23
- package/dist/stores/dynamic-content.d.ts +0 -27
- package/dist/stores/dynamic-content.js +0 -23
- package/dist/stores/preview.d.ts +0 -46
- package/dist/stores/preview.js +0 -53
- package/dist/stores/save-as-template.d.ts +0 -73
- package/dist/stores/save-as-template.js +0 -48
- package/dist/utils/arrayUtil.d.ts +0 -1
- package/dist/utils/arrayUtil.js +0 -10
- package/dist/utils/base64.d.ts +0 -1
- package/dist/utils/base64.js +0 -7
- package/dist/utils/dateUtil.d.ts +0 -1
- package/dist/utils/dateUtil.js +0 -16
- package/dist/utils/genericUtil.d.ts +0 -3
- package/dist/utils/genericUtil.js +0 -11
- package/dist/utils/htmlCompiler.d.ts +0 -12
- package/dist/utils/htmlCompiler.js +0 -70
- package/dist/utils/templatePreparation.d.ts +0 -4
- package/dist/utils/templatePreparation.js +0 -33
- package/dist/utils/tooltipUtils.d.ts +0 -2
- package/dist/utils/tooltipUtils.js +0 -11
package/README.md
CHANGED
|
@@ -14,10 +14,7 @@ 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`
|
|
19
17
|
|
|
20
|
-
---
|
|
21
18
|
## 🚀 Usage
|
|
22
19
|
|
|
23
20
|
### Basic Usage
|
|
@@ -26,16 +23,8 @@ npm install @useinsider/guido
|
|
|
26
23
|
<template>
|
|
27
24
|
<div>
|
|
28
25
|
<Guido
|
|
29
|
-
|
|
30
|
-
:template-id="templateId"
|
|
31
|
-
:user-id="userId"
|
|
26
|
+
:email-id="emailId"
|
|
32
27
|
: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"
|
|
39
28
|
/>
|
|
40
29
|
</div>
|
|
41
30
|
</template>
|
|
@@ -49,60 +38,11 @@ export default {
|
|
|
49
38
|
},
|
|
50
39
|
data() {
|
|
51
40
|
return {
|
|
52
|
-
|
|
53
|
-
userId: 'user-456',
|
|
54
|
-
initialHtml: '<p>Initial HTML content</p>',
|
|
55
|
-
initialCss: 'p { color: #333; }',
|
|
41
|
+
emailId: 'abc123',
|
|
56
42
|
guidoConfig: {
|
|
57
|
-
translationsPath: 'window.trans.en'
|
|
58
|
-
|
|
59
|
-
ignoreDefaultHtmlCompilerRules: false,
|
|
60
|
-
features: {
|
|
61
|
-
dynamicContent: true,
|
|
62
|
-
saveAsTemplate: true,
|
|
63
|
-
versionHistory: true
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
dynamicContentModalVisible: false
|
|
43
|
+
translationsPath: 'window.trans.en'
|
|
44
|
+
}
|
|
67
45
|
};
|
|
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
|
-
}
|
|
106
46
|
}
|
|
107
47
|
};
|
|
108
48
|
</script>
|
|
@@ -114,69 +54,20 @@ export default {
|
|
|
114
54
|
|
|
115
55
|
| Prop | Type | Required | Default | Description |
|
|
116
56
|
|------|------|----------|---------|-------------|
|
|
117
|
-
| `
|
|
118
|
-
| `userId` | `string` | ✅ | - | Unique identifier for the user |
|
|
57
|
+
| `emailId` | `string` | ✅ | - | Unique identifier for the email draft |
|
|
119
58
|
| `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
|
-
|
|
135
|
-
### Guido Exposed Methods
|
|
136
|
-
```typescript
|
|
137
|
-
dynamicContent.insert(DynamicContent);
|
|
138
|
-
dynamicContent.close();
|
|
139
|
-
```
|
|
140
59
|
|
|
141
|
-
###
|
|
60
|
+
### GuidoConfig Interface
|
|
142
61
|
|
|
143
62
|
```typescript
|
|
144
63
|
interface GuidoConfig {
|
|
145
64
|
translationsPath: string;
|
|
146
|
-
htmlCompilerRules?: CompilerRule[];
|
|
147
|
-
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
148
|
-
features: {
|
|
149
|
-
dynamicContent: boolean;
|
|
150
|
-
saveAsTemplate: boolean;
|
|
151
|
-
versionHistory: boolean;
|
|
152
|
-
};
|
|
153
65
|
}
|
|
154
66
|
```
|
|
155
67
|
|
|
156
68
|
| Property | Type | Default | Description |
|
|
157
69
|
|----------|------|---------|-------------|
|
|
158
70
|
| `translationsPath` | `string` | `'window.trans.en'` | JavaScript path to the translations object |
|
|
159
|
-
| `htmlCompilerRules` | `CompilerRule[]` | `[]` | Additional compiler rules to apply to HTML content. See [HTML Compiler Rules](#-html-compiler-rules) section below |
|
|
160
|
-
| `ignoreDefaultHtmlCompilerRules` | `boolean` | `false` | Skip default compiler rules and only use custom rules. Default rules: `src/config/compiler/htmlCompilerRules.ts` |
|
|
161
|
-
| `features` | `Features` | `{ dynamicContent: true, saveAsTemplate: true, versionHistory: true }` | Feature flags to enable/disable editor functionality |
|
|
162
|
-
| `features.dynamicContent` | `boolean` | `true` | Enable dynamic content insertion feature |
|
|
163
|
-
| `features.saveAsTemplate` | `boolean` | `true` | Enable save as template feature |
|
|
164
|
-
| `features.versionHistory` | `boolean` | `true` | Enable version history feature |
|
|
165
|
-
|
|
166
|
-
```typescript
|
|
167
|
-
interface DynamicContent {
|
|
168
|
-
value: string;
|
|
169
|
-
text: string;
|
|
170
|
-
fallback?: string;
|
|
171
|
-
}
|
|
172
|
-
```
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
| Property | Type | Default | Description |
|
|
176
|
-
|----------|------|---------|-------------|
|
|
177
|
-
| `value` | `string` | '' | Value of the dynamic content |
|
|
178
|
-
| `text` | `string` | '' | Visible value of the dynamic content |
|
|
179
|
-
| `fallback?` | `string` | '' | Fallback value of the dynamic content. Optional |
|
|
180
71
|
|
|
181
72
|
### TypeScript Types
|
|
182
73
|
|
|
@@ -191,193 +82,17 @@ import type { GuidoConfig } from '@useinsider/guido';
|
|
|
191
82
|
import type { StripoEventType } from '@useinsider/guido';
|
|
192
83
|
```
|
|
193
84
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
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.
|
|
197
|
-
|
|
198
|
-
### Rule Types
|
|
199
|
-
|
|
200
|
-
There are 4 types of compiler rules:
|
|
201
|
-
|
|
202
|
-
#### 1. Replace Rule
|
|
203
|
-
Replace specific strings in HTML content.
|
|
204
|
-
|
|
205
|
-
```typescript
|
|
206
|
-
{
|
|
207
|
-
id: 'fix-encoding',
|
|
208
|
-
description: 'Fix URL encoding issues',
|
|
209
|
-
type: 'replace',
|
|
210
|
-
search: '{%22', // String to find
|
|
211
|
-
replacement: '%7B%22', // String to replace with
|
|
212
|
-
replaceAll: true, // Replace all occurrences (default: true)
|
|
213
|
-
priority: 10 // Execution priority (lower = earlier)
|
|
214
|
-
}
|
|
215
|
-
```
|
|
216
|
-
|
|
217
|
-
#### 2. Regex Rule
|
|
218
|
-
Use regular expressions for complex pattern matching and replacement.
|
|
219
|
-
|
|
220
|
-
```typescript
|
|
221
|
-
{
|
|
222
|
-
id: 'remove-comments',
|
|
223
|
-
description: 'Remove HTML comments',
|
|
224
|
-
type: 'regex',
|
|
225
|
-
pattern: '<!--.*?-->', // Regex pattern
|
|
226
|
-
replacement: '', // Replacement string
|
|
227
|
-
flags: 'g', // Regex flags (default: 'g')
|
|
228
|
-
priority: 20
|
|
229
|
-
}
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
#### 3. Remove Rule
|
|
233
|
-
Remove specific strings or patterns from HTML content.
|
|
234
|
-
|
|
235
|
-
```typescript
|
|
236
|
-
{
|
|
237
|
-
id: 'cleanup-scripts',
|
|
238
|
-
description: 'Remove unwanted script tags',
|
|
239
|
-
type: 'remove',
|
|
240
|
-
targets: [ // Array of strings or RegExp objects
|
|
241
|
-
'<script src="unwanted.js"></script>',
|
|
242
|
-
/onclick="[^"]*"/g
|
|
243
|
-
],
|
|
244
|
-
priority: 30
|
|
245
|
-
}
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
#### 4. Custom Rule
|
|
249
|
-
Define complex transformation logic with a custom processor function.
|
|
250
|
-
|
|
251
|
-
```typescript
|
|
252
|
-
{
|
|
253
|
-
id: 'add-meta-tags',
|
|
254
|
-
description: 'Add custom meta tags to head',
|
|
255
|
-
type: 'custom',
|
|
256
|
-
processor: (html: string): string => {
|
|
257
|
-
// Custom transformation logic
|
|
258
|
-
const metaTags = '<meta name="custom" content="value">';
|
|
259
|
-
return html.replace('</head>', `${metaTags}</head>`);
|
|
260
|
-
},
|
|
261
|
-
priority: 40
|
|
262
|
-
}
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
### Using HTML Compiler Rules
|
|
266
|
-
|
|
267
|
-
#### Basic Usage with Custom Rules
|
|
268
|
-
|
|
269
|
-
```typescript
|
|
270
|
-
const guidoConfig = {
|
|
271
|
-
translationsPath: 'window.trans.en',
|
|
272
|
-
features: {
|
|
273
|
-
dynamicContent: true,
|
|
274
|
-
saveAsTemplate: true,
|
|
275
|
-
versionHistory: false // Disable version history
|
|
276
|
-
},
|
|
277
|
-
htmlCompilerRules: [
|
|
278
|
-
{
|
|
279
|
-
id: 'replace-domain',
|
|
280
|
-
description: 'Replace old domain with new one',
|
|
281
|
-
type: 'replace',
|
|
282
|
-
search: 'old-domain.com',
|
|
283
|
-
replacement: 'new-domain.com',
|
|
284
|
-
replaceAll: true,
|
|
285
|
-
priority: 10
|
|
286
|
-
},
|
|
287
|
-
{
|
|
288
|
-
id: 'remove-tracking',
|
|
289
|
-
description: 'Remove tracking pixels',
|
|
290
|
-
type: 'regex',
|
|
291
|
-
pattern: '<img[^>]*tracking[^>]*>',
|
|
292
|
-
replacement: '',
|
|
293
|
-
flags: 'gi',
|
|
294
|
-
priority: 20
|
|
295
|
-
}
|
|
296
|
-
]
|
|
297
|
-
};
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
#### Ignoring Default Rules
|
|
301
|
-
|
|
302
|
-
```typescript
|
|
303
|
-
const guidoConfig = {
|
|
304
|
-
translationsPath: 'window.trans.en',
|
|
305
|
-
features: {
|
|
306
|
-
dynamicContent: true,
|
|
307
|
-
saveAsTemplate: true,
|
|
308
|
-
versionHistory: true
|
|
309
|
-
},
|
|
310
|
-
ignoreDefaultHtmlCompilerRules: true, // Skip all default rules
|
|
311
|
-
htmlCompilerRules: [
|
|
312
|
-
// Only your custom rules will be applied
|
|
313
|
-
{
|
|
314
|
-
id: 'custom-transformation',
|
|
315
|
-
type: 'replace',
|
|
316
|
-
search: 'old-text',
|
|
317
|
-
replacement: 'new-text',
|
|
318
|
-
priority: 1
|
|
319
|
-
}
|
|
320
|
-
]
|
|
321
|
-
};
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
### Rule Execution Order
|
|
325
|
-
|
|
326
|
-
Rules are executed in priority order (lower numbers first). Rules with the same priority are executed in array order.
|
|
327
|
-
|
|
328
|
-
- **Priority 1-99**: Reserved for critical transformations
|
|
329
|
-
- **Priority 100-999**: Standard transformations
|
|
330
|
-
- **Priority 1000+**: Additional custom rules (automatically assigned)
|
|
331
|
-
|
|
332
|
-
### Default Rules
|
|
333
|
-
|
|
334
|
-
Guido includes several default rules for common email HTML optimizations:
|
|
335
|
-
|
|
336
|
-
- **URL encoding fixes**: Fixes malformed URL encoding in dynamic content
|
|
337
|
-
- **Template tag restoration**: Restores `{{}}` template tags that got URL encoded
|
|
338
|
-
- **HTML entity decoding**: Converts `<` and `>` back to `<` and `>`
|
|
339
|
-
- **Cleanup rules**: Removes unwanted iframe and style elements
|
|
340
|
-
- **MSO conditions**: Manages Outlook-specific conditional comments
|
|
341
|
-
- **Domain replacement**: Updates old image domains to current ones
|
|
342
|
-
|
|
343
|
-
You can view all default rules in: `src/config/compiler/htmlCompilerRules.ts`
|
|
344
|
-
|
|
345
|
-
### CompilerRule Interface
|
|
85
|
+
### StripoEventType
|
|
346
86
|
|
|
347
87
|
```typescript
|
|
348
|
-
type
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
interface ReplaceRule extends BaseCompilerRule {
|
|
357
|
-
type: 'replace';
|
|
358
|
-
search: string;
|
|
359
|
-
replacement: string;
|
|
360
|
-
replaceAll?: boolean; // Default: true
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
interface RegexRule extends BaseCompilerRule {
|
|
364
|
-
type: 'regex';
|
|
365
|
-
pattern: string;
|
|
366
|
-
replacement: string;
|
|
367
|
-
flags?: string; // Default: 'g'
|
|
368
|
-
}
|
|
369
|
-
|
|
370
|
-
interface RemoveRule extends BaseCompilerRule {
|
|
371
|
-
type: 'remove';
|
|
372
|
-
targets: (string | RegExp)[]; // Array of strings or RegExp objects
|
|
373
|
-
}
|
|
374
|
-
|
|
375
|
-
interface CustomRule extends BaseCompilerRule {
|
|
376
|
-
type: 'custom';
|
|
377
|
-
processor: (html: string) => string;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
type CompilerRule = ReplaceRule | RegexRule | RemoveRule | CustomRule;
|
|
88
|
+
type StripoEventType =
|
|
89
|
+
| 'save'
|
|
90
|
+
| 'export'
|
|
91
|
+
| 'close'
|
|
92
|
+
| 'autosave'
|
|
93
|
+
| 'publish'
|
|
94
|
+
| 'export:requested'
|
|
95
|
+
| 'export:ready';
|
|
381
96
|
```
|
|
382
97
|
|
|
383
98
|
---
|
|
@@ -423,100 +138,26 @@ VITE_STRIPO_ROLE=your_role
|
|
|
423
138
|
|
|
424
139
|
```
|
|
425
140
|
src/
|
|
426
|
-
├── components/
|
|
427
|
-
├──
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
├──
|
|
433
|
-
├──
|
|
434
|
-
|
|
435
|
-
├──
|
|
436
|
-
|
|
141
|
+
├── components/
|
|
142
|
+
│ ├── Guido.vue # Main component
|
|
143
|
+
│ └── organisms/
|
|
144
|
+
│ └── header/ # Header components
|
|
145
|
+
│ └── version-history/ # Version History components
|
|
146
|
+
...
|
|
147
|
+
├── composables/
|
|
148
|
+
│ ├── useStripo.ts # Stripo integration
|
|
149
|
+
│ └── useTranslations.ts # Translation management
|
|
150
|
+
├── @types/
|
|
151
|
+
│ ├── generic.ts # Generic types
|
|
152
|
+
│ ├── stripo.d.ts # Stripo-specific types
|
|
153
|
+
│ └── events.ts # Event types
|
|
154
|
+
├── static/
|
|
155
|
+
│ ├── editor.css # Custom editor styles
|
|
156
|
+
│ └── templates/
|
|
157
|
+
│ └── default/ # Default email template
|
|
158
|
+
└── library.ts # Main export for library
|
|
437
159
|
```
|
|
438
160
|
|
|
439
|
-
## 🔌 Provide/Inject Utilities
|
|
440
|
-
|
|
441
|
-
Guido includes type-safe utilities for Vue's provide/inject system to facilitate dependency injection between components.
|
|
442
|
-
|
|
443
|
-
### useProvideInject
|
|
444
|
-
|
|
445
|
-
The `useProvideInject` composable provides two helper functions for type-safe dependency injection:
|
|
446
|
-
|
|
447
|
-
#### Basic Usage
|
|
448
|
-
|
|
449
|
-
```typescript
|
|
450
|
-
// Parent component
|
|
451
|
-
import { provideValue } from '@useinsider/guido';
|
|
452
|
-
import { InjectionKey } from 'vue';
|
|
453
|
-
|
|
454
|
-
// Define a typed injection key
|
|
455
|
-
const MyServiceKey: InjectionKey<MyService> = Symbol('MyService');
|
|
456
|
-
|
|
457
|
-
// Provide the value
|
|
458
|
-
const myService = new MyService();
|
|
459
|
-
provideValue(MyServiceKey, myService);
|
|
460
|
-
|
|
461
|
-
// Child component
|
|
462
|
-
import { useInjectedValue } from '@useinsider/guido';
|
|
463
|
-
|
|
464
|
-
// Inject the value with type safety
|
|
465
|
-
const myService = useInjectedValue(MyServiceKey);
|
|
466
|
-
```
|
|
467
|
-
|
|
468
|
-
#### With Default Value
|
|
469
|
-
|
|
470
|
-
```typescript
|
|
471
|
-
// Inject with a fallback value
|
|
472
|
-
const myService = useInjectedValue(MyServiceKey, new DefaultService());
|
|
473
|
-
```
|
|
474
|
-
|
|
475
|
-
#### Error Handling
|
|
476
|
-
|
|
477
|
-
The `useInjectedValue` function will throw a descriptive error if no provider is found and no default value is provided:
|
|
478
|
-
|
|
479
|
-
```typescript
|
|
480
|
-
// This will throw an error if no provider exists
|
|
481
|
-
try {
|
|
482
|
-
const myService = useInjectedValue(MyServiceKey);
|
|
483
|
-
} catch (error) {
|
|
484
|
-
console.error('No provider found for MyService');
|
|
485
|
-
}
|
|
486
|
-
```
|
|
487
|
-
|
|
488
|
-
### API Reference
|
|
489
|
-
|
|
490
|
-
#### `provideValue`
|
|
491
|
-
|
|
492
|
-
```typescript
|
|
493
|
-
provideValue<T>(key: InjectionKey<T>, value: T): void
|
|
494
|
-
```
|
|
495
|
-
|
|
496
|
-
Provides a value using Vue's provide system with type safety.
|
|
497
|
-
|
|
498
|
-
| Parameter | Type | Description |
|
|
499
|
-
|-----------|------|-------------|
|
|
500
|
-
| `key` | `InjectionKey<T>` | The typed injection key |
|
|
501
|
-
| `value` | `T` | The value to provide |
|
|
502
|
-
|
|
503
|
-
#### `useInjectedValue`
|
|
504
|
-
|
|
505
|
-
```typescript
|
|
506
|
-
useInjectedValue<T>(key: InjectionKey<T>, defaultValue?: T): T
|
|
507
|
-
```
|
|
508
|
-
|
|
509
|
-
Injects a value using Vue's inject system with type safety and error handling.
|
|
510
|
-
|
|
511
|
-
| Parameter | Type | Required | Description |
|
|
512
|
-
|-----------|------|----------|-------------|
|
|
513
|
-
| `key` | `InjectionKey<T>` | ✅ | The typed injection key |
|
|
514
|
-
| `defaultValue` | `T` | ⚪ | Optional fallback value |
|
|
515
|
-
|
|
516
|
-
**Returns:** `T` - The injected value
|
|
517
|
-
|
|
518
|
-
**Throws:** `Error` - When no provider is found and no default value is provided
|
|
519
|
-
|
|
520
161
|
## 🌐 i18n
|
|
521
162
|
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).
|
|
522
163
|
It allows to use production or local translations on your code. 🚀
|
|
@@ -530,34 +171,6 @@ const trans = useTranslations();
|
|
|
530
171
|
trans('foo.bar')
|
|
531
172
|
```
|
|
532
173
|
|
|
533
|
-
## 📦 Local Building (Recommended)
|
|
534
|
-
|
|
535
|
-
Run this commands if you want to test the package on your local before sending to NPM.
|
|
536
|
-
```sh
|
|
537
|
-
bun run build
|
|
538
|
-
```
|
|
539
|
-
|
|
540
|
-
Since bun does not have packaging yet, use npm here: 🥲
|
|
541
|
-
```sh
|
|
542
|
-
npm pack
|
|
543
|
-
```
|
|
544
|
-
|
|
545
|
-
It'll crate like `useinsider-guido-1.0.0.tgz` file.
|
|
546
|
-
|
|
547
|
-
Move this file to your project path like: `email-fe` via:
|
|
548
|
-
```sh
|
|
549
|
-
cp useinsider-guido-1.0.0.tgz ../email-fe
|
|
550
|
-
```
|
|
551
|
-
|
|
552
|
-
Install the file to your project:
|
|
553
|
-
```sh
|
|
554
|
-
npm i ./useinsider-guido-1.0.0.tgz
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
Then you just need to rebuild to your project or restart the Container. 🎉
|
|
558
|
-
|
|
559
|
-
For Future, we can create a shell script for it. Feel free to help 🙃
|
|
560
|
-
|
|
561
174
|
## 📦 Build Output
|
|
562
175
|
|
|
563
176
|
The library builds to multiple formats:
|
|
@@ -599,8 +212,7 @@ ISC License
|
|
|
599
212
|
- [@useinsider/design-system-vue](https://github.com/useinsider/design-system-vue) - Insider's Vue design system
|
|
600
213
|
|
|
601
214
|
## 🎯 TODO:
|
|
602
|
-
-
|
|
215
|
+
- [editor.css](src/static/editor.css) should be optimized with variables & `sass-loader`.
|
|
603
216
|
- Master Version Generator should be fixed.
|
|
604
217
|
- Playwright integration
|
|
605
218
|
- Commitlint & Precommit Hooks integration
|
|
606
|
-
- Get Pre-built display conditions from API
|
package/dist/@types/generic.d.ts
CHANGED
|
@@ -1,44 +1,3 @@
|
|
|
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
|
-
};
|
|
12
1
|
export type GuidoConfig = {
|
|
13
2
|
translationsPath: string;
|
|
14
|
-
htmlCompilerRules?: CompilerRule[];
|
|
15
|
-
ignoreDefaultHtmlCompilerRules?: boolean;
|
|
16
|
-
emailHeader: EmailHeader;
|
|
17
|
-
partner?: Partner;
|
|
18
|
-
features?: Features;
|
|
19
|
-
};
|
|
20
|
-
export type DynamicContent = {
|
|
21
|
-
value: string;
|
|
22
|
-
text: string;
|
|
23
|
-
fallback?: string;
|
|
24
|
-
};
|
|
25
|
-
export interface EmailHeader {
|
|
26
|
-
senderName: string;
|
|
27
|
-
subject: string;
|
|
28
|
-
}
|
|
29
|
-
export interface TooltipOptions {
|
|
30
|
-
id: string;
|
|
31
|
-
dynamicPosition: boolean;
|
|
32
|
-
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';
|
|
33
|
-
iconStatus: boolean;
|
|
34
|
-
offset?: {
|
|
35
|
-
x: number;
|
|
36
|
-
y: number;
|
|
37
|
-
};
|
|
38
|
-
preventXss?: boolean;
|
|
39
|
-
}
|
|
40
|
-
export type MergeTag = {
|
|
41
|
-
label: string;
|
|
42
|
-
value: string;
|
|
43
3
|
};
|
|
44
|
-
export {};
|
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
|
|
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<{}>>, {}>;
|
|
3
3
|
export default _default;
|
|
@@ -1,29 +1,9 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { SavedTemplateDetails } from '@@/Types/stripo';
|
|
1
|
+
import type { GuidoConfig } from '@@/Types/generic';
|
|
3
2
|
type __VLS_Props = {
|
|
4
|
-
|
|
5
|
-
userId: string;
|
|
6
|
-
messageType?: number;
|
|
7
|
-
partnerName?: string;
|
|
8
|
-
productType?: number;
|
|
9
|
-
username?: string;
|
|
10
|
-
html?: string;
|
|
11
|
-
css?: string;
|
|
12
|
-
preselectedDynamicContentList: DynamicContent[];
|
|
3
|
+
emailId: string;
|
|
13
4
|
guidoConfig: GuidoConfig;
|
|
14
5
|
};
|
|
15
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {
|
|
16
|
-
dynamicContent: {
|
|
17
|
-
insert: (data: DynamicContent) => void;
|
|
18
|
-
close: () => void;
|
|
19
|
-
};
|
|
20
|
-
hasChanges: import("vue").ComputedRef<boolean>;
|
|
21
|
-
}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {
|
|
22
|
-
"dynamic-content:open": (detail: DynamicContent | null) => void;
|
|
23
|
-
back: () => void;
|
|
24
|
-
"save:start": () => void;
|
|
25
|
-
"save:complete": (data: Omit<SavedTemplateDetails, "forceRecreate">) => void;
|
|
26
|
-
}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
6
|
+
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options").ComponentOptionsMixin, import("vue/types/v3-component-options").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
27
7
|
export default _default;
|
|
28
8
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
29
9
|
type __VLS_TypePropsToOption<T> = {
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import o from "./Guido.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
3
|
+
import i from "../_virtual/_plugin-vue2_normalizer.js";
|
|
4
4
|
var s = function() {
|
|
5
|
-
var
|
|
6
|
-
return
|
|
7
|
-
},
|
|
5
|
+
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
6
|
+
return r("div", { staticClass: "guido-editor__wrapper" }, [r(t.HeaderWrapper), r("div", { staticClass: "guido-editor__container", attrs: { id: "guido-editor" } })], 1);
|
|
7
|
+
}, _ = [], a = /* @__PURE__ */ i(
|
|
8
8
|
o,
|
|
9
9
|
s,
|
|
10
|
-
|
|
10
|
+
_,
|
|
11
11
|
!1,
|
|
12
12
|
null,
|
|
13
|
-
"
|
|
13
|
+
"3da1d904"
|
|
14
14
|
);
|
|
15
|
-
const
|
|
15
|
+
const f = a.exports;
|
|
16
16
|
export {
|
|
17
|
-
|
|
17
|
+
f as default
|
|
18
18
|
};
|