@useinsider/guido 1.0.0-beta.35d2ac4 → 1.0.0-beta.3af57f2
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 +82 -535
- package/dist/@types/generic.d.ts +4 -13
- package/dist/App.vue.d.ts +1 -1
- package/dist/components/Guido.vue.d.ts +2 -22
- package/dist/components/Guido.vue.js +7 -7
- package/dist/components/Guido.vue2.js +15 -74
- package/dist/components/organisms/{header/HeaderWrapper.vue.js → top-bar/Header.vue.js} +7 -7
- package/dist/components/organisms/top-bar/Header.vue2.js +14 -0
- package/dist/components/organisms/top-bar/HeaderLeftSlot.vue.d.ts +2 -0
- package/dist/components/organisms/top-bar/HeaderLeftSlot.vue.js +17 -0
- package/dist/components/organisms/top-bar/HeaderLeftSlot.vue2.js +11 -0
- package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.d.ts +2 -0
- package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue.js +17 -0
- package/dist/components/organisms/top-bar/HeaderMiddleSlot.vue2.js +11 -0
- package/dist/components/organisms/top-bar/HeaderRightSlot.vue.d.ts +2 -0
- package/dist/components/organisms/top-bar/HeaderRightSlot.vue.js +18 -0
- package/dist/components/organisms/top-bar/HeaderRightSlot.vue2.js +14 -0
- package/dist/composables/useCustomInterfaceAppearance.js +9 -45
- package/dist/composables/useStripo.d.ts +2 -2
- package/dist/composables/useStripo.js +50 -73
- package/dist/composables/useTemplates.d.ts +5 -0
- package/dist/composables/useTemplates.js +27 -0
- package/dist/composables/useToaster.d.ts +0 -1
- package/dist/composables/useTranslations.d.ts +3 -1
- package/dist/enums/defaults.enum.d.ts +18 -0
- package/dist/guido.css +1 -1
- package/dist/library.d.ts +0 -1
- 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/counter.d.ts +12 -0
- package/package.json +5 -6
- 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/design-preview/AmpErrorModal.vue.d.ts +0 -16
- package/dist/components/organisms/design-preview/AmpErrorModal.vue.js +0 -21
- package/dist/components/organisms/design-preview/AmpErrorModal.vue2.js +0 -30
- package/dist/components/organisms/design-preview/DesktopPreview.vue.d.ts +0 -16
- package/dist/components/organisms/design-preview/DesktopPreview.vue.js +0 -22
- package/dist/components/organisms/design-preview/DesktopPreview.vue2.js +0 -43
- package/dist/components/organisms/design-preview/EmailPreview.vue.d.ts +0 -16
- package/dist/components/organisms/design-preview/EmailPreview.vue.js +0 -17
- package/dist/components/organisms/design-preview/EmailPreview.vue2.js +0 -33
- package/dist/components/organisms/design-preview/EmailView.vue.d.ts +0 -18
- package/dist/components/organisms/design-preview/EmailView.vue.js +0 -19
- package/dist/components/organisms/design-preview/EmailView.vue2.js +0 -24
- package/dist/components/organisms/design-preview/InboxView.vue.d.ts +0 -17
- package/dist/components/organisms/design-preview/InboxView.vue.js +0 -19
- package/dist/components/organisms/design-preview/InboxView.vue2.js +0 -23
- package/dist/components/organisms/design-preview/MobilePreview.vue.d.ts +0 -17
- package/dist/components/organisms/design-preview/MobilePreview.vue.js +0 -17
- package/dist/components/organisms/design-preview/MobilePreview.vue2.js +0 -23
- package/dist/components/organisms/header/AmpToggle.vue.js +0 -17
- package/dist/components/organisms/header/AmpToggle.vue2.js +0 -48
- package/dist/components/organisms/header/HeaderWrapper.vue.d.ts +0 -2
- package/dist/components/organisms/header/HeaderWrapper.vue2.js +0 -14
- package/dist/components/organisms/header/LeftSlot.vue.d.ts +0 -2
- package/dist/components/organisms/header/LeftSlot.vue.js +0 -17
- package/dist/components/organisms/header/LeftSlot.vue2.js +0 -15
- package/dist/components/organisms/header/MiddleSlot.vue.d.ts +0 -2
- package/dist/components/organisms/header/MiddleSlot.vue.js +0 -17
- package/dist/components/organisms/header/MiddleSlot.vue2.js +0 -25
- package/dist/components/organisms/header/RightSlot.vue.d.ts +0 -2
- package/dist/components/organisms/header/RightSlot.vue.js +0 -17
- package/dist/components/organisms/header/RightSlot.vue2.js +0 -35
- package/dist/components/organisms/header/ViewOptions.vue.d.ts +0 -2
- package/dist/components/organisms/header/ViewOptions.vue.js +0 -18
- package/dist/components/organisms/header/ViewOptions.vue2.js +0 -15
- 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/VersionHistory.vue.d.ts +0 -14
- package/dist/components/organisms/header/version-history/VersionHistory.vue.js +0 -22
- package/dist/components/organisms/header/version-history/VersionHistory.vue2.js +0 -18
- 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/header/version-history/ViewOptions.vue.d.ts +0 -2
- package/dist/components/organisms/header/version-history/ViewOptions.vue.js +0 -18
- package/dist/components/organisms/header/version-history/ViewOptions.vue2.js +0 -23
- package/dist/composables/useActionsApi.d.ts +0 -7
- package/dist/composables/useActionsApi.js +0 -49
- package/dist/composables/useDebounce.d.ts +0 -4
- package/dist/composables/useDebounce.js +0 -12
- package/dist/composables/useExport.d.ts +0 -3
- package/dist/composables/useExport.js +0 -45
- 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 -16
- package/dist/composables/useHttp.js +0 -84
- package/dist/composables/useMobileGmailFit.d.ts +0 -5
- package/dist/composables/useMobileGmailFit.js +0 -69
- package/dist/composables/usePartner.d.ts +0 -4
- package/dist/composables/usePartner.js +0 -16
- package/dist/composables/useProvideInject.d.ts +0 -14
- package/dist/composables/useProvideInject.js +0 -17
- package/dist/composables/useToaster.js +0 -37
- package/dist/composables/useTranslations.js +0 -18
- package/dist/composables/useVersionHistoryApi.d.ts +0 -8
- package/dist/composables/useVersionHistoryApi.js +0 -53
- 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/defaults.d.ts +0 -4
- package/dist/enums/defaults.js +0 -8
- package/dist/enums/displayConditions.d.ts +0 -2
- package/dist/enums/displayConditions.js +0 -80
- package/dist/enums/emailPreview.d.ts +0 -3
- package/dist/enums/emailPreview.js +0 -6
- package/dist/enums/gmailMobilePreview.d.ts +0 -7
- package/dist/enums/gmailMobilePreview.js +0 -17
- 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 -63
- package/dist/extensions/DynamicContent/extension.d.ts +0 -2
- package/dist/extensions/DynamicContent/extension.js +0 -11
- package/dist/guido.png +0 -0
- package/dist/inbox-mockup.svg +0 -39
- package/dist/mock/api/custom-fonts.d.ts +0 -2
- package/dist/mock/api/default-template.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/lodash-es/_Hash.js +0 -20
- package/dist/node_modules/lodash-es/_ListCache.js +0 -20
- package/dist/node_modules/lodash-es/_Map.js +0 -6
- package/dist/node_modules/lodash-es/_MapCache.js +0 -20
- package/dist/node_modules/lodash-es/_Symbol.js +0 -5
- package/dist/node_modules/lodash-es/_assocIndexOf.js +0 -10
- package/dist/node_modules/lodash-es/_baseGetTag.js +0 -10
- package/dist/node_modules/lodash-es/_baseIsNative.js +0 -16
- package/dist/node_modules/lodash-es/_coreJsData.js +0 -5
- package/dist/node_modules/lodash-es/_freeGlobal.js +0 -4
- package/dist/node_modules/lodash-es/_getMapData.js +0 -8
- package/dist/node_modules/lodash-es/_getNative.js +0 -9
- package/dist/node_modules/lodash-es/_getRawTag.js +0 -15
- package/dist/node_modules/lodash-es/_getValue.js +0 -6
- package/dist/node_modules/lodash-es/_hashClear.js +0 -7
- package/dist/node_modules/lodash-es/_hashDelete.js +0 -7
- package/dist/node_modules/lodash-es/_hashGet.js +0 -13
- package/dist/node_modules/lodash-es/_hashHas.js +0 -9
- package/dist/node_modules/lodash-es/_hashSet.js +0 -9
- package/dist/node_modules/lodash-es/_isKeyable.js +0 -7
- package/dist/node_modules/lodash-es/_isMasked.js +0 -11
- package/dist/node_modules/lodash-es/_listCacheClear.js +0 -6
- package/dist/node_modules/lodash-es/_listCacheDelete.js +0 -12
- package/dist/node_modules/lodash-es/_listCacheGet.js +0 -8
- package/dist/node_modules/lodash-es/_listCacheHas.js +0 -7
- package/dist/node_modules/lodash-es/_listCacheSet.js +0 -8
- package/dist/node_modules/lodash-es/_mapCacheClear.js +0 -13
- package/dist/node_modules/lodash-es/_mapCacheDelete.js +0 -8
- package/dist/node_modules/lodash-es/_mapCacheGet.js +0 -7
- package/dist/node_modules/lodash-es/_mapCacheHas.js +0 -7
- package/dist/node_modules/lodash-es/_mapCacheSet.js +0 -8
- package/dist/node_modules/lodash-es/_nativeCreate.js +0 -5
- package/dist/node_modules/lodash-es/_objectToString.js +0 -7
- package/dist/node_modules/lodash-es/_root.js +0 -5
- package/dist/node_modules/lodash-es/_toSource.js +0 -17
- package/dist/node_modules/lodash-es/eq.js +0 -6
- package/dist/node_modules/lodash-es/isFunction.js +0 -12
- package/dist/node_modules/lodash-es/isObject.js +0 -7
- package/dist/node_modules/lodash-es/memoize.js +0 -18
- package/dist/phone-mockup.svg +0 -31
- package/dist/services/stripoApi.d.ts +0 -8
- package/dist/services/stripoApi.js +0 -49
- 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/editor.d.ts +0 -9
- package/dist/stores/editor.js +0 -15
- package/dist/stores/version-history.d.ts +0 -80
- package/dist/stores/version-history.js +0 -28
- package/dist/utils/dateUtil.d.ts +0 -1
- package/dist/utils/dateUtil.js +0 -16
- package/dist/utils/htmlCompiler.d.ts +0 -12
- package/dist/utils/htmlCompiler.js +0 -70
- /package/dist/components/organisms/{header/AmpToggle.vue.d.ts → top-bar/Header.vue.d.ts} +0 -0
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import o from "./RightSlot.vue2.js";
|
|
2
|
-
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var n = function() {
|
|
4
|
-
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
5
|
-
return e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__history-button", "left-icon": "line-architect-version-history", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isPreviewModeOpen, "label-text-status": !1, "selected-status": t.editorStore.isVersionHistoryOpen }, on: { click: t.handleVersionHistory } }), e(t.InButtonV2, { attrs: { id: "guido__export-button", "left-icon": "line-export", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 }, on: { click: t.exportHtml } }), e(t.InButtonV2, { attrs: { id: "guido__save-as-button", "left-icon": "line-newsletter-save-as-template", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { attrs: { id: "guido__test-button", "left-icon": "line-architect-test-journey", styling: "ghost", type: "secondary", "disabled-status": t.editorStore.isVersionHistoryOpen, "label-text-status": !1 } }), e(t.InButtonV2, { staticClass: "ml-3", attrs: { id: "guido__save-button", "label-text": "Save", "disabled-status": t.editorStore.isVersionHistoryOpen || t.editorStore.isPreviewModeOpen }, on: { click: t.handleSave } })], 1);
|
|
6
|
-
}, r = [], a = /* @__PURE__ */ i(
|
|
7
|
-
o,
|
|
8
|
-
n,
|
|
9
|
-
r,
|
|
10
|
-
!1,
|
|
11
|
-
null,
|
|
12
|
-
null
|
|
13
|
-
);
|
|
14
|
-
const c = a.exports;
|
|
15
|
-
export {
|
|
16
|
-
c as default
|
|
17
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { defineComponent as m } from "vue";
|
|
2
|
-
import { useActionsApi as p } from "../../../composables/useActionsApi.js";
|
|
3
|
-
import { useExport as c } from "../../../composables/useExport.js";
|
|
4
|
-
import { useSaveStart as l, useSaveComplete as f } from "../../../composables/useGuidoActions.js";
|
|
5
|
-
import { useVersionHistoryApi as u } from "../../../composables/useVersionHistoryApi.js";
|
|
6
|
-
import { useEditorStore as d } from "../../../stores/editor.js";
|
|
7
|
-
import { InButtonV2 as S } from "@useinsider/design-system-vue";
|
|
8
|
-
const E = /* @__PURE__ */ m({
|
|
9
|
-
__name: "RightSlot",
|
|
10
|
-
setup(h) {
|
|
11
|
-
const { exportHtml: a } = c(), { getCompiledEmail: t } = p(), e = l(), r = f(), { openVersionHistory: s, closeVersionHistory: n } = u(), i = d();
|
|
12
|
-
return { __sfc: !0, exportHtml: a, getCompiledEmail: t, saveStart: e, saveComplete: r, openVersionHistory: s, closeVersionHistory: n, editorStore: i, handleVersionHistory: () => {
|
|
13
|
-
if (i.isVersionHistoryOpen) {
|
|
14
|
-
n();
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
s();
|
|
18
|
-
}, handleSave: async () => {
|
|
19
|
-
e();
|
|
20
|
-
try {
|
|
21
|
-
const { html: o } = await t();
|
|
22
|
-
r({
|
|
23
|
-
html: o || "",
|
|
24
|
-
css: ""
|
|
25
|
-
// CSS is embedded in HTML from Stripo
|
|
26
|
-
});
|
|
27
|
-
} catch (o) {
|
|
28
|
-
console.error("Failed to get template data for save:", o);
|
|
29
|
-
}
|
|
30
|
-
}, InButtonV2: S };
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
export {
|
|
34
|
-
E as default
|
|
35
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
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<{}>>, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import r from "./ViewOptions.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import i from "../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var s = function() {
|
|
5
|
-
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
6
|
-
return o(e.InSegments, { attrs: { id: "guido__view-option-selection", "with-icon": "", disable: e.editorStore.isPreviewModeOpen, "segment-list": e.segmentList, selected: e.editorStore.editorVisualMode } });
|
|
7
|
-
}, n = [], _ = /* @__PURE__ */ i(
|
|
8
|
-
r,
|
|
9
|
-
s,
|
|
10
|
-
n,
|
|
11
|
-
!1,
|
|
12
|
-
null,
|
|
13
|
-
"f90d31ea"
|
|
14
|
-
);
|
|
15
|
-
const l = _.exports;
|
|
16
|
-
export {
|
|
17
|
-
l as default
|
|
18
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { defineComponent as e } from "vue";
|
|
2
|
-
import { useEditorStore as t } from "../../../stores/editor.js";
|
|
3
|
-
import { InSegments as o } from "@useinsider/design-system-vue";
|
|
4
|
-
const u = /* @__PURE__ */ e({
|
|
5
|
-
__name: "ViewOptions",
|
|
6
|
-
setup(n) {
|
|
7
|
-
return { __sfc: !0, editorStore: t(), segmentList: [
|
|
8
|
-
{ text: "", icon: "line-desktop", value: "desktop" },
|
|
9
|
-
{ text: "", icon: "line-menu-mobileapp", value: "mobile" }
|
|
10
|
-
], InSegments: o };
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
export {
|
|
14
|
-
u as default
|
|
15
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
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<{}>>, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import n from "./RestoreButton.vue2.js";
|
|
2
|
-
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
3
|
-
var s = function() {
|
|
4
|
-
var e = this, r = e._self._c, t = e._self._setupProxy;
|
|
5
|
-
return r(t.InButtonV2, { attrs: { id: "guido__restore-button", "label-text": "Restore", type: "subtle-primary" }, on: { click: function(a) {
|
|
6
|
-
return t.restoreVersion(t.versionHistoryStore.currentPatch.id);
|
|
7
|
-
} } });
|
|
8
|
-
}, _ = [], i = /* @__PURE__ */ o(
|
|
9
|
-
n,
|
|
10
|
-
s,
|
|
11
|
-
_,
|
|
12
|
-
!1,
|
|
13
|
-
null,
|
|
14
|
-
null
|
|
15
|
-
);
|
|
16
|
-
const f = i.exports;
|
|
17
|
-
export {
|
|
18
|
-
f as default
|
|
19
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { defineComponent as t } from "vue";
|
|
2
|
-
import { useVersionHistoryApi as e } from "../../../../composables/useVersionHistoryApi.js";
|
|
3
|
-
import { useVersionHistoryStore as s } from "../../../../stores/version-history.js";
|
|
4
|
-
import { InButtonV2 as n } from "@useinsider/design-system-vue";
|
|
5
|
-
const _ = /* @__PURE__ */ t({
|
|
6
|
-
__name: "RestoreButton",
|
|
7
|
-
setup(i) {
|
|
8
|
-
const { restoreVersion: o } = e(), r = s();
|
|
9
|
-
return { __sfc: !0, restoreVersion: o, versionHistoryStore: r, InButtonV2: n };
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
export {
|
|
13
|
-
_ as default
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
itemStatus?: boolean;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
5
|
-
export default _default;
|
|
6
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
7
|
-
type __VLS_TypePropsToOption<T> = {
|
|
8
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
9
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
10
|
-
} : {
|
|
11
|
-
type: import('vue').PropType<T[K]>;
|
|
12
|
-
required: true;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import o from "./VersionHistory.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var n = function() {
|
|
5
|
-
var s = this, e = s._self._c, t = s._self._setupProxy;
|
|
6
|
-
return e("div", { staticClass: "version-history-wrapper d-f a-i-c f-g-1 mx-3" }, [t.itemStatus ? e(t.VersionHistoryItem, { attrs: { "text-align": "right", date: t.versionHistoryStore.previousPatch.date, description: t.versionHistoryStore.previousPatch.description } }) : s._e(), e("div", { staticClass: "d-f" }, [e(t.InButtonV2, { attrs: { id: "guido__undo-button", "left-icon": "line-undo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasPreviousPatch, "label-text-status": !1 }, on: { click: function(r) {
|
|
7
|
-
return t.previewVersion(t.versionHistoryStore.previousPatch.id);
|
|
8
|
-
} } }), e(t.InButtonV2, { attrs: { id: "guido__redo-button", "left-icon": "line-redo", styling: "ghost", type: "secondary", "disabled-status": !t.versionHistoryStore.hasNextPatch, "label-text-status": !1 }, on: { click: function(r) {
|
|
9
|
-
return t.previewVersion(t.versionHistoryStore.nextPatch.id);
|
|
10
|
-
} } })], 1), t.itemStatus ? e(t.VersionHistoryItem, { attrs: { "text-align": "left", date: t.versionHistoryStore.nextPatch.date, description: t.versionHistoryStore.nextPatch.description } }) : s._e()], 1);
|
|
11
|
-
}, a = [], c = /* @__PURE__ */ i(
|
|
12
|
-
o,
|
|
13
|
-
n,
|
|
14
|
-
a,
|
|
15
|
-
!1,
|
|
16
|
-
null,
|
|
17
|
-
"52a77eec"
|
|
18
|
-
);
|
|
19
|
-
const _ = c.exports;
|
|
20
|
-
export {
|
|
21
|
-
_ as default
|
|
22
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { defineComponent as i } from "vue";
|
|
2
|
-
import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
|
|
3
|
-
import { useVersionHistoryStore as m } from "../../../../stores/version-history.js";
|
|
4
|
-
import { InButtonV2 as p } from "@useinsider/design-system-vue";
|
|
5
|
-
import f from "./VersionHistoryItem.vue.js";
|
|
6
|
-
const _ = /* @__PURE__ */ i({
|
|
7
|
-
__name: "VersionHistory",
|
|
8
|
-
props: {
|
|
9
|
-
itemStatus: { type: Boolean }
|
|
10
|
-
},
|
|
11
|
-
setup(t) {
|
|
12
|
-
const o = t, r = m(), { previewVersion: e } = n(), { itemStatus: s = !1 } = o;
|
|
13
|
-
return { __sfc: !0, versionHistoryStore: r, previewVersion: e, props: o, itemStatus: s, InButtonV2: p, VersionHistoryItem: f };
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
export {
|
|
17
|
-
_ as default
|
|
18
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
description: string;
|
|
3
|
-
date: number;
|
|
4
|
-
textAlign: string;
|
|
5
|
-
};
|
|
6
|
-
declare const _default: import("vue").DefineComponent<__VLS_TypePropsToOption<__VLS_Props>, {}, {}, {}, {}, import("vue/types/v3-component-options.js").ComponentOptionsMixin, import("vue/types/v3-component-options.js").ComponentOptionsMixin, {}, string, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToOption<__VLS_Props>>>, {}>;
|
|
7
|
-
export default _default;
|
|
8
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
9
|
-
type __VLS_TypePropsToOption<T> = {
|
|
10
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
11
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
12
|
-
} : {
|
|
13
|
-
type: import('vue').PropType<T[K]>;
|
|
14
|
-
required: true;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import e from "./VersionHistoryItem.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import o from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var i = function() {
|
|
5
|
-
var s = this, r = s._self._c, t = s._self._setupProxy;
|
|
6
|
-
return r("div", { staticClass: "version-history-item f-g-1" }, [t.props.description ? r("div", { staticClass: "d-f f-d-c", class: { "t-a-r": t.props.textAlign === "right" } }, [r("div", { staticClass: "t-o-e o-h w-s-n-w", domProps: { innerHTML: s._s(t.props.description) } }), r("div", { staticClass: "f-s-1" }, [s._v(" " + s._s(t.formatPatchDate(t.props.date)) + " ")])]) : s._e()]);
|
|
7
|
-
}, a = [], n = /* @__PURE__ */ o(
|
|
8
|
-
e,
|
|
9
|
-
i,
|
|
10
|
-
a,
|
|
11
|
-
!1,
|
|
12
|
-
null,
|
|
13
|
-
"ee4b9c3f"
|
|
14
|
-
);
|
|
15
|
-
const d = n.exports;
|
|
16
|
-
export {
|
|
17
|
-
d as default
|
|
18
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defineComponent as o } from "vue";
|
|
2
|
-
import { formatPatchDate as e } from "../../../../utils/dateUtil.js";
|
|
3
|
-
const s = /* @__PURE__ */ o({
|
|
4
|
-
__name: "VersionHistoryItem",
|
|
5
|
-
props: {
|
|
6
|
-
description: null,
|
|
7
|
-
date: null,
|
|
8
|
-
textAlign: null
|
|
9
|
-
},
|
|
10
|
-
setup(t) {
|
|
11
|
-
return { __sfc: !0, props: t, formatPatchDate: e };
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
export {
|
|
15
|
-
s as default
|
|
16
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
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<{}>>, {}>;
|
|
2
|
-
export default _default;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import s from "./ViewOptions.vue2.js";
|
|
2
|
-
/* empty css */
|
|
3
|
-
import i from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
-
var r = function() {
|
|
5
|
-
var t = this, o = t._self._c, e = t._self._setupProxy;
|
|
6
|
-
return o(e.InSegments, { attrs: { id: "guido__verion-history-view-option-selection", "with-icon": "", "segment-list": e.segmentList, selected: e.versionHistoryStore.editorVisualMode }, on: { click: e.changeVisualMode } });
|
|
7
|
-
}, n = [], _ = /* @__PURE__ */ i(
|
|
8
|
-
s,
|
|
9
|
-
r,
|
|
10
|
-
n,
|
|
11
|
-
!1,
|
|
12
|
-
null,
|
|
13
|
-
"6a2bde67"
|
|
14
|
-
);
|
|
15
|
-
const d = _.exports;
|
|
16
|
-
export {
|
|
17
|
-
d as default
|
|
18
|
-
};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { defineComponent as s } from "vue";
|
|
2
|
-
import { useVersionHistoryApi as n } from "../../../../composables/useVersionHistoryApi.js";
|
|
3
|
-
import { useVersionHistoryStore as r } from "../../../../stores/version-history.js";
|
|
4
|
-
import { InSegments as m } from "@useinsider/design-system-vue";
|
|
5
|
-
const d = /* @__PURE__ */ s({
|
|
6
|
-
__name: "ViewOptions",
|
|
7
|
-
setup(p) {
|
|
8
|
-
const e = r(), { switchToDesktopPreview: o, switchToMobilePreview: t } = n();
|
|
9
|
-
return { __sfc: !0, versionHistoryStore: e, switchToDesktopPreview: o, switchToMobilePreview: t, segmentList: [
|
|
10
|
-
{ text: "", icon: "line-desktop", value: "desktop" },
|
|
11
|
-
{ text: "", icon: "line-menu-mobileapp", value: "mobile" }
|
|
12
|
-
], changeVisualMode: (i) => {
|
|
13
|
-
if (e.editorVisualMode = i, i === "mobile") {
|
|
14
|
-
t();
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
o();
|
|
18
|
-
}, InSegments: m };
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
export {
|
|
22
|
-
d as default
|
|
23
|
-
};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { CompileEmailOptions } from '@@/Types/stripo';
|
|
2
|
-
import { GetCompiledEmailOptions, CompiledEmailResult } from '@@/Types/actions-api';
|
|
3
|
-
export declare const useActionsApi: () => {
|
|
4
|
-
getCompiledEmail: (options?: GetCompiledEmailOptions) => Promise<CompiledEmailResult>;
|
|
5
|
-
activateCustomViewStyles: (isActive?: boolean) => void;
|
|
6
|
-
getPreviewData: (options?: CompileEmailOptions) => Promise<CompiledEmailResult>;
|
|
7
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
const w = () => {
|
|
2
|
-
const a = (e = {}) => new Promise((t, s) => {
|
|
3
|
-
const m = { ...{
|
|
4
|
-
minimize: !0,
|
|
5
|
-
utmEntity: {
|
|
6
|
-
utmSource: "",
|
|
7
|
-
utmMedium: "",
|
|
8
|
-
utmCampaign: "",
|
|
9
|
-
utmContent: "",
|
|
10
|
-
utmTerm: "",
|
|
11
|
-
customUtms: [
|
|
12
|
-
{
|
|
13
|
-
name1: "val1",
|
|
14
|
-
name2: "val2"
|
|
15
|
-
}
|
|
16
|
-
]
|
|
17
|
-
},
|
|
18
|
-
mergeTags: ["Tag1", "Tag2"],
|
|
19
|
-
forseAmp: !1,
|
|
20
|
-
resetDataSavedFlag: !1,
|
|
21
|
-
disableLineHeightsReplace: !0
|
|
22
|
-
}, ...e }, o = {
|
|
23
|
-
callback: (i, n, l, r, c) => {
|
|
24
|
-
i ? s(i) : t({
|
|
25
|
-
html: n,
|
|
26
|
-
ampHtml: l,
|
|
27
|
-
ampErrors: r,
|
|
28
|
-
displayConditions: c
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
...m
|
|
32
|
-
};
|
|
33
|
-
window.StripoEditorApi.actionsApi.compileEmail(o);
|
|
34
|
-
});
|
|
35
|
-
return { getCompiledEmail: a, activateCustomViewStyles: (e = !0) => {
|
|
36
|
-
window.StripoEditorApi.actionsApi.activateCustomViewStyles(e);
|
|
37
|
-
}, getPreviewData: async (e) => {
|
|
38
|
-
const t = await a({ minimize: !1, resetDataSavedFlag: !1, ...e });
|
|
39
|
-
return {
|
|
40
|
-
html: t.html,
|
|
41
|
-
ampHtml: t.ampHtml ?? "",
|
|
42
|
-
ampErrors: t.ampErrors ?? null,
|
|
43
|
-
displayConditions: t.displayConditions
|
|
44
|
-
};
|
|
45
|
-
} };
|
|
46
|
-
};
|
|
47
|
-
export {
|
|
48
|
-
w as useActionsApi
|
|
49
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ref as c } from "vue";
|
|
2
|
-
const r = () => {
|
|
3
|
-
const e = c(void 0);
|
|
4
|
-
return { debounce: (o, u = 150) => {
|
|
5
|
-
e.value && window.clearTimeout(e.value), e.value = window.setTimeout(o, u);
|
|
6
|
-
}, clearDebounce: () => {
|
|
7
|
-
e.value && (window.clearTimeout(e.value), e.value = void 0);
|
|
8
|
-
} };
|
|
9
|
-
};
|
|
10
|
-
export {
|
|
11
|
-
r as useDebounce
|
|
12
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { useActionsApi as l } from "./useActionsApi.js";
|
|
2
|
-
import { useHtmlCompiler as m } from "./useHtmlCompiler.js";
|
|
3
|
-
import { useToaster as d } from "./useToaster.js";
|
|
4
|
-
const h = () => {
|
|
5
|
-
const a = (s, o, r) => {
|
|
6
|
-
const i = new Blob([s], { type: r }), t = URL.createObjectURL(i), e = document.createElement("a");
|
|
7
|
-
e.href = t, e.download = o, document.body.appendChild(e), e.click(), document.body.removeChild(e), URL.revokeObjectURL(t);
|
|
8
|
-
}, c = (s) => {
|
|
9
|
-
const o = /* @__PURE__ */ new Date(), r = String(o.getDate()).padStart(2, "0"), i = String(o.getMonth() + 1).padStart(2, "0"), t = o.getFullYear(), e = String(o.getHours()).padStart(2, "0"), n = String(o.getMinutes()).padStart(2, "0");
|
|
10
|
-
return `${s}_${r}-${i}-${t}_${e}-${n}.html`;
|
|
11
|
-
};
|
|
12
|
-
return { exportHtml: async (s = !0) => {
|
|
13
|
-
const { getCompiledEmail: o } = l(), { showToaster: r } = d(), { compileHtml: i } = m();
|
|
14
|
-
try {
|
|
15
|
-
const { html: t } = await o();
|
|
16
|
-
if (t) {
|
|
17
|
-
let e = t;
|
|
18
|
-
if (s) {
|
|
19
|
-
const n = i(t);
|
|
20
|
-
e = n.compiledHtml, console.debug("HTML Compilation Stats:", {
|
|
21
|
-
originalSize: n.stats.originalSize,
|
|
22
|
-
compiledSize: n.stats.compiledSize,
|
|
23
|
-
reduction: `${n.stats.reductionPercentage.toFixed(2)}%`,
|
|
24
|
-
appliedRules: n.appliedRules,
|
|
25
|
-
executionTime: `${n.stats.executionTime.toFixed(2)}ms`
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
a(e, c("HTML"), "text/html");
|
|
29
|
-
} else
|
|
30
|
-
r({
|
|
31
|
-
type: "error",
|
|
32
|
-
message: "No HTML content to download"
|
|
33
|
-
});
|
|
34
|
-
} catch (t) {
|
|
35
|
-
const e = t instanceof Error ? t.message : String(t);
|
|
36
|
-
r({
|
|
37
|
-
type: "error",
|
|
38
|
-
message: `Error compiling email: ${e}`
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
} };
|
|
42
|
-
};
|
|
43
|
-
export {
|
|
44
|
-
h as useExport
|
|
45
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { Template } from '@@/Types/stripo';
|
|
2
|
-
import type { InjectionKey } from 'vue';
|
|
3
|
-
export type BackHandler = () => void;
|
|
4
|
-
export type SaveStartHandler = () => void;
|
|
5
|
-
export type SaveCompleteHandler = (template: Omit<Template, 'forceRecreate'>) => void;
|
|
6
|
-
export declare const BACK_KEY: InjectionKey<BackHandler>;
|
|
7
|
-
export declare const SAVE_START_KEY: InjectionKey<SaveStartHandler>;
|
|
8
|
-
export declare const SAVE_COMPLETE_KEY: InjectionKey<SaveCompleteHandler>;
|
|
9
|
-
/**
|
|
10
|
-
* Provides Guido action handlers to child components
|
|
11
|
-
*/
|
|
12
|
-
export declare const provideGuidoActions: (actions: {
|
|
13
|
-
onBack: BackHandler;
|
|
14
|
-
onSaveStart: SaveStartHandler;
|
|
15
|
-
onSaveComplete: SaveCompleteHandler;
|
|
16
|
-
}) => void;
|
|
17
|
-
/**
|
|
18
|
-
* Provides individual Guido action handlers
|
|
19
|
-
*/
|
|
20
|
-
export declare const provideBackHandler: (handler: BackHandler) => void;
|
|
21
|
-
export declare const provideSaveStartHandler: (handler: SaveStartHandler) => void;
|
|
22
|
-
export declare const provideSaveCompleteHandler: (handler: SaveCompleteHandler) => void;
|
|
23
|
-
/**
|
|
24
|
-
* Hook to use the back navigation handler
|
|
25
|
-
* @returns Back navigation function
|
|
26
|
-
*/
|
|
27
|
-
export declare const useBack: () => BackHandler;
|
|
28
|
-
/**
|
|
29
|
-
* Hook to use the save start handler
|
|
30
|
-
* @returns Save start function
|
|
31
|
-
*/
|
|
32
|
-
export declare const useSaveStart: () => SaveStartHandler;
|
|
33
|
-
/**
|
|
34
|
-
* Hook to use the save complete handler
|
|
35
|
-
* @returns Save complete function
|
|
36
|
-
*/
|
|
37
|
-
export declare const useSaveComplete: () => SaveCompleteHandler;
|
|
38
|
-
/**
|
|
39
|
-
* Convenience hook to get all Guido actions
|
|
40
|
-
* @returns Object containing all action handlers
|
|
41
|
-
*/
|
|
42
|
-
export declare const useGuidoActions: () => {
|
|
43
|
-
back: BackHandler;
|
|
44
|
-
saveStart: SaveStartHandler;
|
|
45
|
-
saveComplete: SaveCompleteHandler;
|
|
46
|
-
};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { provideValue as o, useInjectedValue as t } from "./useProvideInject.js";
|
|
2
|
-
const r = Symbol.for("guido.back"), n = Symbol.for("guido.save.start"), a = Symbol.for("guido.save.complete"), s = (e) => {
|
|
3
|
-
o(r, e.onBack), o(n, e.onSaveStart), o(a, e.onSaveComplete);
|
|
4
|
-
}, u = () => {
|
|
5
|
-
try {
|
|
6
|
-
return t(r);
|
|
7
|
-
} catch {
|
|
8
|
-
throw new Error(
|
|
9
|
-
"useBack: No back handler provided. Make sure Guido component is in the component tree."
|
|
10
|
-
);
|
|
11
|
-
}
|
|
12
|
-
}, d = () => {
|
|
13
|
-
try {
|
|
14
|
-
return t(n);
|
|
15
|
-
} catch {
|
|
16
|
-
throw new Error(
|
|
17
|
-
"useSaveStart: No save start handler provided. Make sure Guido component is in the component tree."
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
}, i = () => {
|
|
21
|
-
try {
|
|
22
|
-
return t(a);
|
|
23
|
-
} catch {
|
|
24
|
-
throw new Error(
|
|
25
|
-
"useSaveComplete: No save complete handler provided. Make sure Guido component is in the component tree."
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export {
|
|
30
|
-
r as BACK_KEY,
|
|
31
|
-
a as SAVE_COMPLETE_KEY,
|
|
32
|
-
n as SAVE_START_KEY,
|
|
33
|
-
s as provideGuidoActions,
|
|
34
|
-
u as useBack,
|
|
35
|
-
i as useSaveComplete,
|
|
36
|
-
d as useSaveStart
|
|
37
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { defaultHtmlCompilerRules as r } from "../config/compiler/htmlCompilerRules.js";
|
|
2
|
-
import { createHtmlCompiler as p } from "../utils/htmlCompiler.js";
|
|
3
|
-
const a = () => {
|
|
4
|
-
const e = typeof window < "u" ? window.GuidoConfig : void 0, l = (e == null ? void 0 : e.htmlCompilerRules) || [], t = [
|
|
5
|
-
...!!(e != null && e.ignoreDefaultHtmlCompilerRules) ? [] : r,
|
|
6
|
-
...l.map((o, m) => ({
|
|
7
|
-
...o,
|
|
8
|
-
priority: o.priority + 1e3 + m
|
|
9
|
-
// Ensure additional rules run after default rules
|
|
10
|
-
}))
|
|
11
|
-
], i = p(t);
|
|
12
|
-
return { compileHtml: (o) => i.compile(o) };
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
a as useHtmlCompiler
|
|
16
|
-
};
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { ref as p, computed as v } from "vue";
|
|
2
|
-
const j = (y = {}) => {
|
|
3
|
-
const h = p(!1), a = p(null), u = p(null), E = v(() => h.value), g = v(() => a.value !== null), T = {
|
|
4
|
-
baseURL: "",
|
|
5
|
-
timeout: 1e4,
|
|
6
|
-
retry: 0,
|
|
7
|
-
retryDelay: 1e3,
|
|
8
|
-
headers: {
|
|
9
|
-
"Content-Type": "application/json"
|
|
10
|
-
},
|
|
11
|
-
...y
|
|
12
|
-
}, w = (e, s) => {
|
|
13
|
-
if (e.startsWith("http://") || e.startsWith("https://"))
|
|
14
|
-
return e;
|
|
15
|
-
const t = s || T.baseURL || "";
|
|
16
|
-
return t.endsWith("/") && e.startsWith("/") ? `${t}${e.slice(1)}` : t.endsWith("/") || e.startsWith("/") ? `${t}${e}` : `${t}/${e}`;
|
|
17
|
-
}, P = (e) => new Promise((s, t) => {
|
|
18
|
-
setTimeout(() => {
|
|
19
|
-
t(new Error("Request timeout"));
|
|
20
|
-
}, e);
|
|
21
|
-
}), x = (e) => new Promise((s) => {
|
|
22
|
-
setTimeout(s, e);
|
|
23
|
-
}), i = async (e, s, t, D = {}) => {
|
|
24
|
-
a.value = null, h.value = !0, u.value = new AbortController();
|
|
25
|
-
const n = { ...T, ...D }, L = w(s, n.baseURL), c = {
|
|
26
|
-
method: e,
|
|
27
|
-
headers: { ...n.headers },
|
|
28
|
-
signal: u.value.signal,
|
|
29
|
-
...n
|
|
30
|
-
};
|
|
31
|
-
t && ["POST", "PUT", "PATCH"].includes(e) && (t instanceof FormData ? (delete c.headers["Content-Type"], c.body = t) : c.body = JSON.stringify(t));
|
|
32
|
-
const b = async (m = 0) => {
|
|
33
|
-
try {
|
|
34
|
-
const o = [fetch(L, c)];
|
|
35
|
-
n.timeout && o.push(P(n.timeout));
|
|
36
|
-
const r = await Promise.race(o);
|
|
37
|
-
if (!r.ok) {
|
|
38
|
-
const H = `HTTP Error: ${r.status} ${r.statusText}`, d = new Error(H);
|
|
39
|
-
throw d.status = r.status, d.statusText = r.statusText, d.response = r, d;
|
|
40
|
-
}
|
|
41
|
-
let f;
|
|
42
|
-
const l = r.headers.get("content-type");
|
|
43
|
-
return l != null && l.includes("application/json") ? f = await r.json() : l != null && l.includes("text/") ? f = await r.text() : f = await r.blob(), {
|
|
44
|
-
data: f,
|
|
45
|
-
status: r.status,
|
|
46
|
-
statusText: r.statusText,
|
|
47
|
-
headers: r.headers
|
|
48
|
-
};
|
|
49
|
-
} catch (o) {
|
|
50
|
-
const r = o instanceof Error && o.name === "AbortError";
|
|
51
|
-
if (m < (n.retry || 0) && !r)
|
|
52
|
-
return await x(n.retryDelay || 1e3), b(m + 1);
|
|
53
|
-
throw o instanceof Error ? o.name === "AbortError" ? a.value = { message: "Request was cancelled" } : a.value = { message: o.message } : a.value = o, o;
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
try {
|
|
57
|
-
return await b();
|
|
58
|
-
} finally {
|
|
59
|
-
h.value = !1, u.value = null;
|
|
60
|
-
}
|
|
61
|
-
}, $ = (e, s) => i("GET", e, void 0, s), C = (e, s, t) => i("POST", e, s, t), U = (e, s, t) => i("PUT", e, s, t), A = (e, s, t) => i("PATCH", e, s, t), R = (e, s) => i("DELETE", e, void 0, s), W = (e) => {
|
|
62
|
-
u.value && u.value.abort(e);
|
|
63
|
-
}, q = () => {
|
|
64
|
-
a.value = null;
|
|
65
|
-
};
|
|
66
|
-
return {
|
|
67
|
-
// State
|
|
68
|
-
loading: E,
|
|
69
|
-
error: v(() => a.value),
|
|
70
|
-
hasError: g,
|
|
71
|
-
// Methods
|
|
72
|
-
request: i,
|
|
73
|
-
get: $,
|
|
74
|
-
post: C,
|
|
75
|
-
put: U,
|
|
76
|
-
patch: A,
|
|
77
|
-
delete: R,
|
|
78
|
-
cancel: W,
|
|
79
|
-
clearError: q
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
export {
|
|
83
|
-
j as useHttp
|
|
84
|
-
};
|