@useinsider/guido 3.2.0-beta.8209d6d → 3.2.0-beta.8220f9d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@types/config/schemas.js +38 -36
- package/dist/components/Guido.vue.js +4 -4
- package/dist/components/Guido.vue2.js +82 -71
- package/dist/components/organisms/chat/blueprint/BlueprintCard.vue.js +20 -0
- package/dist/components/organisms/chat/blueprint/BlueprintCard.vue2.js +20 -0
- package/dist/components/organisms/chat/blueprint/EmailTemplateBlueprintCard.vue.js +23 -0
- package/dist/components/organisms/chat/blueprint/EmailTemplateBlueprintCard.vue2.js +18 -0
- package/dist/components/organisms/chat/chatbox/ChatboxContainer.vue.js +18 -0
- package/dist/components/organisms/chat/chatbox/ChatboxContainer.vue2.js +16 -0
- package/dist/components/organisms/chat/chatbox/ChatboxPanel.vue.js +20 -0
- package/dist/components/organisms/chat/chatbox/ChatboxPanel.vue2.js +19 -0
- package/dist/components/organisms/chat/conversation/ChatConversation.vue.js +28 -0
- package/dist/components/organisms/chat/conversation/ChatConversation.vue2.js +20 -0
- package/dist/components/organisms/chat/conversation/ChatWelcome.vue.js +18 -0
- package/dist/components/organisms/chat/conversation/ChatWelcome.vue2.js +11 -0
- package/dist/components/organisms/chat/conversation/QuickActionChips.vue.js +22 -0
- package/dist/components/organisms/chat/conversation/QuickActionChips.vue2.js +42 -0
- package/dist/components/organisms/chat/input/ChatInput.vue.js +29 -0
- package/dist/components/organisms/chat/input/ChatInput.vue2.js +39 -0
- package/dist/components/organisms/chat/input/GuidoAgentSelector.vue.js +22 -0
- package/dist/components/organisms/chat/input/GuidoAgentSelector.vue2.js +29 -0
- package/dist/components/organisms/chat/messages/AiMessage.vue.js +26 -0
- package/dist/components/organisms/chat/messages/AiMessage.vue2.js +41 -0
- package/dist/components/organisms/chat/messages/AiMessageActions.vue.js +18 -0
- package/dist/components/organisms/chat/messages/AiMessageActions.vue2.js +27 -0
- package/dist/components/organisms/chat/messages/ChatLoading.vue.js +18 -0
- package/dist/components/organisms/chat/messages/ChatLoading.vue2.js +30 -0
- package/dist/components/organisms/chat/messages/ChatMessages.vue.js +26 -0
- package/dist/components/organisms/chat/messages/ChatMessages.vue2.js +67 -0
- package/dist/components/organisms/chat/messages/UserMessage.vue.js +18 -0
- package/dist/components/organisms/chat/messages/UserMessage.vue2.js +26 -0
- package/dist/components/organisms/onboarding/AMPOnboarding.vue2.js +51 -31
- package/dist/components/organisms/onboarding/GenericOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/GenericOnboarding.vue2.js +23 -22
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue.js +1 -1
- package/dist/components/organisms/onboarding/ItemsOnboarding.vue2.js +37 -39
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue.js +3 -3
- package/dist/components/organisms/onboarding/TextBlockOnboarding.vue2.js +30 -41
- package/dist/components/organisms/onboarding/VersionHistoryOnboarding.vue2.js +15 -14
- package/dist/composables/useChatState.js +130 -0
- package/dist/composables/useChatStreaming.js +191 -0
- package/dist/composables/useConversationEvents.js +37 -0
- package/dist/composables/useEmailTemplateApplier.js +41 -0
- package/dist/composables/useRibbonOffset.js +21 -0
- package/dist/config/compiler/unsubscribeCompilerRules.js +40 -37
- package/dist/enums/onboarding.js +7 -2
- package/dist/enums/unsubscribe.js +34 -27
- package/dist/guido.css +1 -1
- package/dist/node_modules/@vueuse/core/index.js +127 -0
- package/dist/node_modules/@vueuse/shared/index.js +68 -27
- package/dist/node_modules/dompurify/dist/purify.es.js +595 -0
- package/dist/node_modules/marked/lib/marked.esm.js +1152 -0
- package/dist/services/chatService.js +163 -0
- package/dist/services/templateLibraryApi.js +5 -4
- package/dist/src/@types/chat.d.ts +138 -0
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/components/Guido.vue.d.ts +4 -0
- package/dist/src/components/organisms/chat/blueprint/BlueprintCard.vue.d.ts +38 -0
- package/dist/src/components/organisms/chat/blueprint/EmailTemplateBlueprintCard.vue.d.ts +35 -0
- package/dist/src/components/organisms/chat/chatbox/ChatboxContainer.vue.d.ts +4 -0
- package/dist/src/components/organisms/chat/chatbox/ChatboxPanel.vue.d.ts +4 -0
- package/dist/src/components/organisms/chat/conversation/ChatConversation.vue.d.ts +31 -0
- package/dist/src/components/organisms/chat/conversation/ChatWelcome.vue.d.ts +2 -0
- package/dist/src/components/organisms/chat/conversation/QuickActionChips.vue.d.ts +30 -0
- package/dist/src/components/organisms/chat/input/ChatInput.vue.d.ts +37 -0
- package/dist/src/components/organisms/chat/input/GuidoAgentSelector.vue.d.ts +2 -0
- package/dist/src/components/organisms/chat/messages/AiMessage.vue.d.ts +33 -0
- package/dist/src/components/organisms/chat/messages/AiMessageActions.vue.d.ts +18 -0
- package/dist/src/components/organisms/chat/messages/ChatLoading.vue.d.ts +32 -0
- package/dist/src/components/organisms/chat/messages/ChatMessages.vue.d.ts +37 -0
- package/dist/src/components/organisms/chat/messages/UserMessage.vue.d.ts +35 -0
- package/dist/src/composables/useChatState.d.ts +26 -0
- package/dist/src/composables/useChatStreaming.d.ts +26 -0
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useConversationEvents.d.ts +19 -0
- package/dist/src/composables/useEmailTemplateApplier.d.ts +21 -0
- package/dist/src/composables/useRibbonOffset.d.ts +4 -0
- package/dist/src/enums/onboarding.d.ts +6 -0
- package/dist/src/enums/unsubscribe.d.ts +5 -0
- package/dist/src/services/chatService.d.ts +16 -0
- package/dist/src/stores/chat.d.ts +323 -0
- package/dist/src/stores/config.d.ts +18 -0
- package/dist/src/stores/editor.d.ts +23 -0
- package/dist/src/stores/onboarding.d.ts +4 -0
- package/dist/src/utils/generateId.d.ts +1 -0
- package/dist/src/utils/markdown.d.ts +1 -0
- package/dist/static/templates/empty/style.css.js +1 -0
- package/dist/stores/chat.js +26 -0
- package/dist/stores/editor.js +1 -0
- package/dist/stores/onboarding.js +4 -0
- package/dist/utils/generateId.js +7 -0
- package/dist/utils/markdown.js +21 -0
- package/dist/utils/pairProductVariables.js +89 -88
- package/package.json +4 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ModuleFolderDefaults as b } from "../../enums/defaults.js";
|
|
2
|
-
import { object as
|
|
2
|
+
import { object as a, number as p, optional as e, string as t, pipe as u, picklist as n, minLength as d, custom as S, boolean as o, array as c, literal as l, variant as k } from "../../node_modules/valibot/dist/index.js";
|
|
3
3
|
const m = {
|
|
4
4
|
/** Promotional/marketing emails */
|
|
5
5
|
PROMOTIONAL: 1,
|
|
@@ -12,7 +12,7 @@ const m = {
|
|
|
12
12
|
ARCHITECT: 49,
|
|
13
13
|
/** Unsubscribe page builder */
|
|
14
14
|
UNSUBSCRIBE_PAGES: 97
|
|
15
|
-
}, h =
|
|
15
|
+
}, h = a({
|
|
16
16
|
/** Unique identifier for the template being edited */
|
|
17
17
|
templateId: u(
|
|
18
18
|
t(),
|
|
@@ -25,12 +25,12 @@ const m = {
|
|
|
25
25
|
),
|
|
26
26
|
/** Optional variation ID for A/B testing */
|
|
27
27
|
variationId: e(t())
|
|
28
|
-
}),
|
|
28
|
+
}), f = a({
|
|
29
29
|
/** Fallback font name (e.g., "Georgia") */
|
|
30
30
|
name: t(),
|
|
31
31
|
/** Fallback font family (e.g., "serif" or "sans-serif") */
|
|
32
32
|
family: t()
|
|
33
|
-
}),
|
|
33
|
+
}), y = a({
|
|
34
34
|
/** Partner/organization name (required) */
|
|
35
35
|
name: u(
|
|
36
36
|
t(),
|
|
@@ -53,8 +53,8 @@ const m = {
|
|
|
53
53
|
/** Display name for the current user */
|
|
54
54
|
username: e(t(), "Guido User"),
|
|
55
55
|
/** Fallback font settings from partner settings — used to match backend size calculation */
|
|
56
|
-
fallbackFont: e(
|
|
57
|
-
}), A =
|
|
56
|
+
fallbackFont: e(f)
|
|
57
|
+
}), A = a({
|
|
58
58
|
/** Display text for the dynamic content */
|
|
59
59
|
text: t(),
|
|
60
60
|
/** Template variable value (e.g., {{username}}) */
|
|
@@ -63,12 +63,12 @@ const m = {
|
|
|
63
63
|
fallback: e(t()),
|
|
64
64
|
/** Optional formatting options */
|
|
65
65
|
format: e(
|
|
66
|
-
|
|
66
|
+
a({
|
|
67
67
|
key: t(),
|
|
68
68
|
value: t()
|
|
69
69
|
})
|
|
70
70
|
)
|
|
71
|
-
}), R =
|
|
71
|
+
}), R = a({
|
|
72
72
|
/** Initial HTML content */
|
|
73
73
|
html: e(t(), ""),
|
|
74
74
|
/** Initial CSS content */
|
|
@@ -83,13 +83,13 @@ const m = {
|
|
|
83
83
|
/** Selected unsubscribe page IDs */
|
|
84
84
|
selectedUnsubscribePages: e(c(p()), []),
|
|
85
85
|
/** Force recreate template in Stripo storage (use true when updating externally modified templates) */
|
|
86
|
-
forceRecreate: e(
|
|
87
|
-
}), C =
|
|
86
|
+
forceRecreate: e(o(), !1)
|
|
87
|
+
}), C = a({
|
|
88
88
|
/** Sender display name */
|
|
89
89
|
senderName: e(t(), ""),
|
|
90
90
|
/** Email subject line */
|
|
91
91
|
subject: e(t(), "")
|
|
92
|
-
}), T =
|
|
92
|
+
}), T = a({
|
|
93
93
|
/** Locale for the editor UI */
|
|
94
94
|
locale: e(t(), "en"),
|
|
95
95
|
/** Path to translations object */
|
|
@@ -102,28 +102,30 @@ const m = {
|
|
|
102
102
|
savedModulesFolderName: e(t(), b.SAVED_MODULES),
|
|
103
103
|
/** Folder name for default/prebuilt modules (used by Stripo plugin panel for path construction) */
|
|
104
104
|
defaultModulesFolderName: e(t(), b.DEFAULT_MODULES)
|
|
105
|
-
}), I =
|
|
105
|
+
}), I = a({
|
|
106
106
|
/** Whether to show the header bar */
|
|
107
|
-
showHeader: e(
|
|
107
|
+
showHeader: e(o(), !0),
|
|
108
108
|
/** Custom label for back button (if shown) */
|
|
109
109
|
backButtonLabel: e(t())
|
|
110
|
-
}), E =
|
|
110
|
+
}), E = a({
|
|
111
111
|
/** Enable dynamic content insertion */
|
|
112
|
-
dynamicContent: e(
|
|
112
|
+
dynamicContent: e(o(), !0),
|
|
113
113
|
/** Enable save as template functionality */
|
|
114
|
-
saveAsTemplate: e(
|
|
114
|
+
saveAsTemplate: e(o(), !0),
|
|
115
115
|
/** Enable version history */
|
|
116
|
-
versionHistory: e(
|
|
116
|
+
versionHistory: e(o(), !0),
|
|
117
117
|
/** Enable test message sending */
|
|
118
|
-
testMessage: e(
|
|
118
|
+
testMessage: e(o(), !0),
|
|
119
119
|
/** Enable display conditions */
|
|
120
|
-
displayConditions: e(
|
|
120
|
+
displayConditions: e(o(), !0),
|
|
121
121
|
/** Enable unsubscribe block */
|
|
122
|
-
unsubscribe: e(
|
|
122
|
+
unsubscribe: e(o(), !0),
|
|
123
123
|
/** Disable modules panel in the editor */
|
|
124
|
-
modulesDisabled: e(
|
|
124
|
+
modulesDisabled: e(o(), !1),
|
|
125
125
|
/** Enable Liquid template syntax */
|
|
126
|
-
liquidSyntax: e(
|
|
126
|
+
liquidSyntax: e(o(), !1),
|
|
127
|
+
/** Enable AI assistant chat panel (cortex-style chatbot) */
|
|
128
|
+
aiAssistant: e(o(), !1)
|
|
127
129
|
}), g = n([
|
|
128
130
|
"amp-accordion",
|
|
129
131
|
"amp-carousel",
|
|
@@ -146,7 +148,7 @@ const m = {
|
|
|
146
148
|
"unsubscribe-block",
|
|
147
149
|
"coupon-block",
|
|
148
150
|
"items-block"
|
|
149
|
-
]), L =
|
|
151
|
+
]), L = a({
|
|
150
152
|
/** Default blocks to exclude from the editor */
|
|
151
153
|
excludeDefaults: e(
|
|
152
154
|
c(g),
|
|
@@ -157,14 +159,14 @@ const m = {
|
|
|
157
159
|
c(O),
|
|
158
160
|
[]
|
|
159
161
|
)
|
|
160
|
-
}), r =
|
|
162
|
+
}), r = a({
|
|
161
163
|
/** Unique identifier for the rule */
|
|
162
164
|
id: t(),
|
|
163
165
|
/** Human-readable description */
|
|
164
166
|
description: e(t()),
|
|
165
167
|
/** Priority for rule ordering (lower = earlier) */
|
|
166
168
|
priority: p()
|
|
167
|
-
}), M =
|
|
169
|
+
}), M = a({
|
|
168
170
|
...r.entries,
|
|
169
171
|
type: l("replace"),
|
|
170
172
|
/** String to search for */
|
|
@@ -172,8 +174,8 @@ const m = {
|
|
|
172
174
|
/** Replacement string */
|
|
173
175
|
replacement: t(),
|
|
174
176
|
/** Replace all occurrences (default: false) */
|
|
175
|
-
replaceAll: e(
|
|
176
|
-
}), N =
|
|
177
|
+
replaceAll: e(o())
|
|
178
|
+
}), N = a({
|
|
177
179
|
...r.entries,
|
|
178
180
|
type: l("regex"),
|
|
179
181
|
/** Regex pattern string */
|
|
@@ -182,12 +184,12 @@ const m = {
|
|
|
182
184
|
replacement: t(),
|
|
183
185
|
/** Regex flags (e.g., 'gi') */
|
|
184
186
|
flags: e(t())
|
|
185
|
-
}), D =
|
|
187
|
+
}), D = a({
|
|
186
188
|
...r.entries,
|
|
187
189
|
type: l("remove"),
|
|
188
190
|
/** Strings or patterns to remove */
|
|
189
191
|
targets: c(t())
|
|
190
|
-
}), v =
|
|
192
|
+
}), v = a({
|
|
191
193
|
...r.entries,
|
|
192
194
|
type: l("custom"),
|
|
193
195
|
/** Custom processor function */
|
|
@@ -200,12 +202,12 @@ const m = {
|
|
|
200
202
|
N,
|
|
201
203
|
D,
|
|
202
204
|
v
|
|
203
|
-
]), U =
|
|
205
|
+
]), U = a({
|
|
204
206
|
/** Custom compiler rules to apply */
|
|
205
207
|
customRules: e(c(x), []),
|
|
206
208
|
/** Skip default compiler rules */
|
|
207
|
-
ignoreDefaultRules: e(
|
|
208
|
-
}), B =
|
|
209
|
+
ignoreDefaultRules: e(o(), !1)
|
|
210
|
+
}), B = a({
|
|
209
211
|
/**
|
|
210
212
|
* External validation handler called before save completes.
|
|
211
213
|
* Return false to cancel the save operation.
|
|
@@ -216,12 +218,12 @@ const m = {
|
|
|
216
218
|
"externalValidation must be a function"
|
|
217
219
|
)
|
|
218
220
|
)
|
|
219
|
-
}), H =
|
|
221
|
+
}), H = a({
|
|
220
222
|
// Required sections
|
|
221
223
|
/** Identity configuration (required) */
|
|
222
224
|
identity: h,
|
|
223
225
|
/** Partner configuration (required) */
|
|
224
|
-
partner:
|
|
226
|
+
partner: y,
|
|
225
227
|
// Optional sections (with defaults)
|
|
226
228
|
/** Template content and presets */
|
|
227
229
|
template: e(R, {}),
|
|
@@ -249,12 +251,12 @@ export {
|
|
|
249
251
|
A as DynamicContentSchema,
|
|
250
252
|
T as EditorSchema,
|
|
251
253
|
C as EmailHeaderSchema,
|
|
252
|
-
|
|
254
|
+
f as FallbackFontSchema,
|
|
253
255
|
E as FeaturesSchema,
|
|
254
256
|
H as GuidoConfigSchema,
|
|
255
257
|
h as IdentitySchema,
|
|
256
258
|
m as MessageType,
|
|
257
|
-
|
|
259
|
+
y as PartnerSchema,
|
|
258
260
|
s as ProductType,
|
|
259
261
|
N as RegexRuleSchema,
|
|
260
262
|
D as RemoveRuleSchema,
|
|
@@ -5,16 +5,16 @@ var t = function() {
|
|
|
5
5
|
var o = this, r = o._self._c, e = o._self._setupProxy;
|
|
6
6
|
return r("div", { ref: "wrapperRef", staticClass: "guido-editor__wrapper", class: { "guido-editor__no-header": e.noHeader } }, [r(e.HeaderWrapper, { ref: "headerWrapperRef" }), e.editorStore.isPreviewModeOpen ? r(e.PreviewContainer) : o._e(), r("div", { directives: [{ name: "show", rawName: "v-show", value: !e.previewStore.isLoaded, expression: "!previewStore.isLoaded" }], staticClass: "guido-editor__container", class: { "guido-editor__no-header": e.noHeader }, attrs: { id: "guido-editor" } }), r(e.Toaster), r(e.FilterSelectionDrawer), r(e.SaveAsTemplateDrawer), e.isTestPartner() ? o._e() : r(e.OnboardingWrapper, { on: { "onboarding-finished": function(p) {
|
|
7
7
|
return e.emit("onboarding:finished");
|
|
8
|
-
} } }), r(e.UnsubscribeWrapper), r(e.LoadingWrapper)], 1);
|
|
8
|
+
} } }), r(e.UnsubscribeWrapper), e.isAiAssistantEnabled && e.editorStore.isChatPanelOpen ? r(e.ChatboxContainer, { on: { close: e.closeChatPanel } }) : o._e(), r(e.LoadingWrapper)], 1);
|
|
9
9
|
}, n = [], s = /* @__PURE__ */ a(
|
|
10
10
|
i,
|
|
11
11
|
t,
|
|
12
12
|
n,
|
|
13
13
|
!1,
|
|
14
14
|
null,
|
|
15
|
-
"
|
|
15
|
+
"ec575441"
|
|
16
16
|
);
|
|
17
|
-
const
|
|
17
|
+
const f = s.exports;
|
|
18
18
|
export {
|
|
19
|
-
|
|
19
|
+
f as default
|
|
20
20
|
};
|
|
@@ -1,65 +1,68 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
|
|
1
|
+
import { defineComponent as ee, defineAsyncComponent as G, ref as z, computed as S, watch as te, onMounted as oe, onUnmounted as ne } from "vue";
|
|
2
|
+
import { useChatState as se, resetChatModuleState as re } from "../composables/useChatState.js";
|
|
3
|
+
import { provideGuidoActions as ae } from "../composables/useGuidoActions.js";
|
|
4
|
+
import { usePartner as ce } from "../composables/usePartner.js";
|
|
5
|
+
import { useStripo as ie } from "../composables/useStripo.js";
|
|
6
|
+
import { useTimerClone as le } from "../composables/useTimerClone.js";
|
|
7
|
+
import { migrate as q } from "../config/migrator/index.js";
|
|
8
|
+
import { ModuleFolderDefaults as K } from "../enums/defaults.js";
|
|
9
|
+
import { RIBBON_SELECTOR as me } from "../enums/onboarding.js";
|
|
10
|
+
import de from "./organisms/base/Toaster.vue.js";
|
|
11
|
+
import pe from "./organisms/chat/chatbox/ChatboxContainer.vue.js";
|
|
12
|
+
import ue from "./organisms/extensions/recommendation/FilterSelectionDrawer.vue.js";
|
|
13
|
+
import he from "./organisms/header/HeaderWrapper.vue.js";
|
|
14
|
+
import fe from "./organisms/LoadingWrapper.vue.js";
|
|
15
|
+
import ve from "./organisms/save-as-template/SaveAsTemplateDrawer.vue.js";
|
|
16
|
+
import ye from "./organisms/unsubscribe/UnsubscribeWrapper.vue.js";
|
|
17
|
+
import { useStripoApi as be } from "../services/stripoApi.js";
|
|
18
|
+
import { useConfigStore as Se } from "../stores/config.js";
|
|
19
|
+
import { useDynamicContentStore as ge } from "../stores/dynamic-content.js";
|
|
20
|
+
import { useEditorStore as Ce } from "../stores/editor.js";
|
|
21
|
+
import { usePreviewStore as Ee } from "../stores/preview.js";
|
|
22
|
+
import { useUnsubscribeStore as we } from "../stores/unsubscribe.js";
|
|
23
|
+
const Ve = /* @__PURE__ */ ee({
|
|
22
24
|
__name: "Guido",
|
|
23
25
|
props: {
|
|
24
26
|
config: null
|
|
25
27
|
},
|
|
26
|
-
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click"],
|
|
27
|
-
setup(
|
|
28
|
-
const
|
|
28
|
+
emits: ["dynamic-content:open", "back", "save:start", "save:complete", "on-change", "ready", "onboarding:finished", "test-email:click", "chat:open", "chat:close"],
|
|
29
|
+
setup(V, { expose: $, emit: s }) {
|
|
30
|
+
const g = V, j = G(
|
|
29
31
|
() => import("./organisms/email-preview/PreviewContainer.vue.js")
|
|
30
|
-
),
|
|
32
|
+
), J = G(
|
|
31
33
|
() => import("./organisms/onboarding/OnboardingWrapper.vue.js")
|
|
32
|
-
),
|
|
33
|
-
|
|
34
|
-
const u =
|
|
34
|
+
), C = z(), d = z(), p = ge(), E = we(), c = Se();
|
|
35
|
+
c.init(g.config);
|
|
36
|
+
const u = Ce(), Q = Ee(), i = S(() => u.hasChanges), { isTestPartner: X } = ce(), w = () => {
|
|
35
37
|
var e;
|
|
36
|
-
return (e =
|
|
38
|
+
return (e = C.value) == null ? void 0 : e.handleSave(!0);
|
|
37
39
|
}, {
|
|
38
|
-
templateId:
|
|
39
|
-
userId:
|
|
40
|
-
partnerName:
|
|
41
|
-
username:
|
|
40
|
+
templateId: h,
|
|
41
|
+
userId: D,
|
|
42
|
+
partnerName: T,
|
|
43
|
+
username: P,
|
|
42
44
|
template: t,
|
|
43
|
-
editor: r
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
editor: r,
|
|
46
|
+
features: l
|
|
47
|
+
} = c, m = (t == null ? void 0 : t.html) || "", k = (t == null ? void 0 : t.css) || "", f = (t == null ? void 0 : t.preselectedDynamicContent) || [], A = (r == null ? void 0 : r.savedModulesFolderName) || K.SAVED_MODULES, F = (r == null ? void 0 : r.defaultModulesFolderName) || K.DEFAULT_MODULES;
|
|
48
|
+
u.templateId = h;
|
|
49
|
+
const { openChat: L, closeChat: M } = se(), U = S(() => !!(l != null && l.aiAssistant)), v = {
|
|
50
|
+
emailId: h,
|
|
51
|
+
userId: D,
|
|
52
|
+
username: P,
|
|
53
|
+
partnerName: T,
|
|
54
|
+
savedModulesFolderName: A,
|
|
52
55
|
defaultModulesFolderName: F
|
|
53
|
-
},
|
|
56
|
+
}, _ = {
|
|
54
57
|
preselectedDynamicContentList: f,
|
|
55
58
|
onReady: () => {
|
|
56
59
|
console.debug("guido:ready"), s("ready");
|
|
57
60
|
}
|
|
58
|
-
}, { initPlugin:
|
|
61
|
+
}, { initPlugin: O } = ie(v, _), { getDefaultTemplate: N } = be(), { cloneTimersOnSave: R, hasTimerBlocks: I } = le(), Y = S(() => {
|
|
59
62
|
var e;
|
|
60
|
-
return !((e =
|
|
63
|
+
return !((e = c.ui) != null && e.showHeader);
|
|
61
64
|
});
|
|
62
|
-
|
|
65
|
+
ae({
|
|
63
66
|
onBack: () => {
|
|
64
67
|
console.debug("guido:back"), s("back");
|
|
65
68
|
},
|
|
@@ -74,58 +77,66 @@ const Re = /* @__PURE__ */ j({
|
|
|
74
77
|
console.debug("guido:test-email:click"), s("test-email:click");
|
|
75
78
|
}
|
|
76
79
|
});
|
|
77
|
-
const
|
|
78
|
-
console.debug("dynamic-content:close", e),
|
|
79
|
-
},
|
|
80
|
+
const W = (e) => {
|
|
81
|
+
console.debug("dynamic-content:close", e), p.setSelectedDynamicContent(e), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: e }));
|
|
82
|
+
}, B = () => {
|
|
80
83
|
console.debug("dynamic-content:close", "Without Data"), document.dispatchEvent(new CustomEvent("dynamic-content:close", { detail: { text: "", value: "" } }));
|
|
81
84
|
};
|
|
82
|
-
|
|
85
|
+
te(() => i.value, () => {
|
|
83
86
|
s("on-change", i.value);
|
|
84
87
|
});
|
|
85
88
|
const y = (e) => {
|
|
86
|
-
const n = e, { attribute: o, position:
|
|
87
|
-
console.debug("dynamic-content:open", n.detail), s("dynamic-content:open", o,
|
|
89
|
+
const n = e, { attribute: o, position: Z } = n.detail;
|
|
90
|
+
console.debug("dynamic-content:open", n.detail), s("dynamic-content:open", o, Z);
|
|
88
91
|
};
|
|
89
|
-
let
|
|
90
|
-
const
|
|
92
|
+
let a = null;
|
|
93
|
+
const b = () => {
|
|
91
94
|
var n;
|
|
92
|
-
const e = document.querySelector(
|
|
95
|
+
const e = document.querySelector(me);
|
|
93
96
|
(n = d.value) == null || n.style.setProperty("--ribbon-offset", `${(e == null ? void 0 : e.offsetHeight) ?? 0}px`);
|
|
94
97
|
};
|
|
95
|
-
|
|
98
|
+
oe(async () => {
|
|
96
99
|
var n;
|
|
97
|
-
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"),
|
|
100
|
+
console.debug("Guido says happy coding 🎉"), console.debug("🚗 Ka-Chow"), b();
|
|
98
101
|
const e = (n = d.value) == null ? void 0 : n.parentElement;
|
|
99
|
-
e && (
|
|
102
|
+
e && (a = new ResizeObserver(b), a.observe(e));
|
|
100
103
|
try {
|
|
101
|
-
|
|
104
|
+
E.selectedUnsubscribePages = (t == null ? void 0 : t.selectedUnsubscribePages) || [];
|
|
102
105
|
let o = {
|
|
103
|
-
html: m && await
|
|
104
|
-
css:
|
|
106
|
+
html: m && await q(m),
|
|
107
|
+
css: k
|
|
105
108
|
};
|
|
106
|
-
o.html || (o = await
|
|
109
|
+
o.html || (o = await N(), o.html = await q(o.html)), I(o.html) && (o.html = await R(o.html)), await O(o), p.selectedDynamicContentList = f;
|
|
107
110
|
} catch (o) {
|
|
108
111
|
console.error("Failed to initialize Stripo editor:", o);
|
|
109
112
|
}
|
|
110
113
|
document.addEventListener("dynamic-content:open", y);
|
|
111
|
-
}),
|
|
112
|
-
|
|
114
|
+
}), ne(() => {
|
|
115
|
+
a == null || a.disconnect(), document.removeEventListener("dynamic-content:open", y);
|
|
113
116
|
try {
|
|
114
117
|
window.UIEditor.removeEditor();
|
|
115
118
|
} catch {
|
|
116
119
|
console.debug("Failed to remove Stripo editor: No editor found");
|
|
117
120
|
}
|
|
118
|
-
|
|
119
|
-
})
|
|
121
|
+
c.reset(), re();
|
|
122
|
+
});
|
|
123
|
+
const x = () => {
|
|
124
|
+
U.value && (L(), s("chat:open"));
|
|
125
|
+
}, H = () => {
|
|
126
|
+
M(), s("chat:close");
|
|
127
|
+
};
|
|
128
|
+
return $({
|
|
120
129
|
dynamicContent: {
|
|
121
|
-
insert:
|
|
122
|
-
close:
|
|
130
|
+
insert: W,
|
|
131
|
+
close: B
|
|
123
132
|
},
|
|
124
133
|
hasChanges: i,
|
|
125
|
-
saveSilent: w
|
|
126
|
-
|
|
134
|
+
saveSilent: w,
|
|
135
|
+
openChatPanel: x,
|
|
136
|
+
closeChatPanel: H
|
|
137
|
+
}), { __sfc: !0, PreviewContainer: j, OnboardingWrapper: J, headerWrapperRef: C, wrapperRef: d, dynamicContentStore: p, unsubscribeStore: E, props: g, configStore: c, editorStore: u, previewStore: Q, hasChanges: i, isTestPartner: X, saveSilent: w, templateId: h, userId: D, partnerName: T, username: P, templateConfig: t, editorConfig: r, features: l, html: m, css: k, preselectedDynamicContentList: f, savedModulesFolderName: A, defaultModulesFolderName: F, emit: s, openChat: L, closeChat: M, isAiAssistantEnabled: U, metadata: v, options: _, initPlugin: O, getDefaultTemplate: N, cloneTimersOnSave: R, hasTimerBlocks: I, noHeader: Y, insertDynamicContent: W, closeDynamicContent: B, handleDynamicContentOpen: y, ribbonObserver: a, updateRibbonOffset: b, openChatPanel: x, closeChatPanel: H, Toaster: de, ChatboxContainer: pe, FilterSelectionDrawer: ue, HeaderWrapper: he, LoadingWrapper: fe, SaveAsTemplateDrawer: ve, UnsubscribeWrapper: ye };
|
|
127
138
|
}
|
|
128
139
|
});
|
|
129
140
|
export {
|
|
130
|
-
|
|
141
|
+
Ve as default
|
|
131
142
|
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import n from "./BlueprintCard.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import e from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var a = function() {
|
|
5
|
+
var t = this, s = t._self._c, r = t._self._setupProxy;
|
|
6
|
+
return s("button", { staticClass: "blueprint-card", attrs: { type: "button" }, on: { click: function(o) {
|
|
7
|
+
return t.$emit("click");
|
|
8
|
+
} } }, [s("span", { staticClass: "blueprint-card__icon-box" }, [s(r.InIcons, { attrs: { name: "line-smart-sirius-ai", size: "24" } })], 1), s("span", { staticClass: "blueprint-card__body" }, [s("span", { staticClass: "blueprint-card__title" }, [t._v(t._s(r.titleWithVersion))]), s("span", { staticClass: "blueprint-card__date" }, [t._v(t._s(r.formattedDate))])]), s(r.InIcons, { staticClass: "blueprint-card__chevron", attrs: { name: "line-chevron-right", size: "24" } })], 1);
|
|
9
|
+
}, i = [], c = /* @__PURE__ */ e(
|
|
10
|
+
n,
|
|
11
|
+
a,
|
|
12
|
+
i,
|
|
13
|
+
!1,
|
|
14
|
+
null,
|
|
15
|
+
"28b88292"
|
|
16
|
+
);
|
|
17
|
+
const m = c.exports;
|
|
18
|
+
export {
|
|
19
|
+
m as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { defineComponent as d, computed as n } from "vue";
|
|
2
|
+
import { InIcons as l } from "@useinsider/design-system-vue";
|
|
3
|
+
const f = /* @__PURE__ */ d({
|
|
4
|
+
__name: "BlueprintCard",
|
|
5
|
+
props: {
|
|
6
|
+
title: { default: "" },
|
|
7
|
+
version: { default: 1 }
|
|
8
|
+
},
|
|
9
|
+
emits: ["click"],
|
|
10
|
+
setup(o) {
|
|
11
|
+
const t = o, r = n(() => `${t.title} (v${t.version})`), s = n(() => {
|
|
12
|
+
const a = Date.now(), e = new Date(a), i = String(e.getDate()).padStart(2, "0"), c = String(e.getMonth() + 1).padStart(2, "0"), p = String(e.getFullYear()).slice(2);
|
|
13
|
+
return `${i}.${c}.${p}`;
|
|
14
|
+
});
|
|
15
|
+
return { __sfc: !0, props: t, titleWithVersion: r, formattedDate: s, InIcons: l };
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
export {
|
|
19
|
+
f as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import s from "./EmailTemplateBlueprintCard.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import l from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var i = function() {
|
|
5
|
+
var a = this, e = a._self._c, t = a._self._setupProxy;
|
|
6
|
+
return e("div", { staticClass: "email-template-card", class: {
|
|
7
|
+
"email-template-card--applied": t.isApplied,
|
|
8
|
+
"email-template-card--failed": t.isFailed
|
|
9
|
+
} }, [e("span", { staticClass: "email-template-card__icon-box" }, [e(t.InIcons, { attrs: { size: "24", name: t.statusIcon } })], 1), e("span", { staticClass: "email-template-card__body" }, [e("span", { staticClass: "email-template-card__title" }, [a._v(" " + a._s(t.trans("newsletter.ai-template-generated-card")) + " ")]), e("span", { staticClass: "email-template-card__meta" }, [a._v(" " + a._s(t.versionLabel) + " ")])]), e("button", { staticClass: "email-template-card__action", attrs: { type: "button", disabled: t.isApplying }, on: { click: function(_) {
|
|
10
|
+
return t.emit("apply");
|
|
11
|
+
} } }, [a._v(" " + a._s(t.buttonLabel) + " ")])]);
|
|
12
|
+
}, n = [], r = /* @__PURE__ */ l(
|
|
13
|
+
s,
|
|
14
|
+
i,
|
|
15
|
+
n,
|
|
16
|
+
!1,
|
|
17
|
+
null,
|
|
18
|
+
"2853740d"
|
|
19
|
+
);
|
|
20
|
+
const d = r.exports;
|
|
21
|
+
export {
|
|
22
|
+
d as default
|
|
23
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { defineComponent as m, computed as e } from "vue";
|
|
2
|
+
import { useTranslations as c } from "../../../../composables/useTranslations.js";
|
|
3
|
+
import { InIcons as f } from "@useinsider/design-system-vue";
|
|
4
|
+
const _ = /* @__PURE__ */ m({
|
|
5
|
+
__name: "EmailTemplateBlueprintCard",
|
|
6
|
+
props: {
|
|
7
|
+
version: { default: 1 },
|
|
8
|
+
status: { default: "pending" }
|
|
9
|
+
},
|
|
10
|
+
emits: ["apply"],
|
|
11
|
+
setup(i, { emit: l }) {
|
|
12
|
+
const t = i, s = c(), n = e(() => t.status === "applied"), r = e(() => t.status === "applying"), a = e(() => t.status === "failed"), p = e(() => r.value ? s("newsletter.ai-template-applying") : n.value ? s("newsletter.ai-template-reapply") : a.value ? s("newsletter.ai-template-retry") : s("newsletter.ai-template-apply")), u = e(() => `v${t.version}`), o = e(() => n.value ? "line-success-status" : a.value ? "line-alert-triangle" : "line-smart-sirius-ai");
|
|
13
|
+
return { __sfc: !0, props: t, emit: l, trans: s, isApplied: n, isApplying: r, isFailed: a, buttonLabel: p, versionLabel: u, statusIcon: o, InIcons: f };
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
export {
|
|
17
|
+
_ as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import a from "./ChatboxContainer.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var r = function() {
|
|
5
|
+
var e = this, t = e._self._c, o = e._self._setupProxy;
|
|
6
|
+
return t("div", { staticClass: "chatbox-container" }, [t("div", { staticClass: "chatbox-container__shell" }, [t(o.ChatboxPanel, { on: { close: o.handleClose } })], 1)]);
|
|
7
|
+
}, s = [], _ = /* @__PURE__ */ n(
|
|
8
|
+
a,
|
|
9
|
+
r,
|
|
10
|
+
s,
|
|
11
|
+
!1,
|
|
12
|
+
null,
|
|
13
|
+
"a5430681"
|
|
14
|
+
);
|
|
15
|
+
const m = _.exports;
|
|
16
|
+
export {
|
|
17
|
+
m as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { defineComponent as t } from "vue";
|
|
2
|
+
import { useChatState as s } from "../../../../composables/useChatState.js";
|
|
3
|
+
import n from "./ChatboxPanel.vue.js";
|
|
4
|
+
const p = /* @__PURE__ */ t({
|
|
5
|
+
__name: "ChatboxContainer",
|
|
6
|
+
emits: ["close"],
|
|
7
|
+
setup(a, { emit: o }) {
|
|
8
|
+
const { closeChat: e } = s();
|
|
9
|
+
return { __sfc: !0, emit: o, closeChat: e, handleClose: () => {
|
|
10
|
+
e(), o("close");
|
|
11
|
+
}, ChatboxPanel: n };
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
p as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import a from "./ChatboxPanel.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import n from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var o = function() {
|
|
5
|
+
var s = this, t = s._self._c, e = s._self._setupProxy;
|
|
6
|
+
return t("div", { staticClass: "chatbox-panel d-f f-d-c" }, [t("div", { staticClass: "chatbox-panel__gradient" }), t(e.ChatConversation, { attrs: { "is-loading": e.isLoading, messages: e.messages }, on: { "copy-message": e.handleCopyMessage, retry: e.handleRetry, send: e.handleSend, stop: e.handleStop }, scopedSlots: s._u([{ key: "header", fn: function() {
|
|
7
|
+
return [t("div", { staticClass: "chatbox-panel__header d-f a-i-c j-c-s-b" }, [t("span", { staticClass: "chatbox-panel__title" }, [s._v(" " + s._s(e.trans("newsletter.ai-assistant")) + " ")]), t("button", { staticClass: "chatbox-panel__close", attrs: { type: "button", title: e.trans("newsletter.ai-close") }, on: { click: e.onClose } }, [t(e.InIcons, { attrs: { name: "line-close", size: "24" } })], 1)])];
|
|
8
|
+
}, proxy: !0 }]) })], 1);
|
|
9
|
+
}, r = [], l = /* @__PURE__ */ n(
|
|
10
|
+
a,
|
|
11
|
+
o,
|
|
12
|
+
r,
|
|
13
|
+
!1,
|
|
14
|
+
null,
|
|
15
|
+
"26934e62"
|
|
16
|
+
);
|
|
17
|
+
const p = l.exports;
|
|
18
|
+
export {
|
|
19
|
+
p as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defineComponent as i } from "vue";
|
|
2
|
+
import { useChatState as p } from "../../../../composables/useChatState.js";
|
|
3
|
+
import { useConversationEvents as l } from "../../../../composables/useConversationEvents.js";
|
|
4
|
+
import { useTranslations as c } from "../../../../composables/useTranslations.js";
|
|
5
|
+
import f from "../conversation/ChatConversation.vue.js";
|
|
6
|
+
import { InIcons as C } from "@useinsider/design-system-vue";
|
|
7
|
+
const y = /* @__PURE__ */ i({
|
|
8
|
+
__name: "ChatboxPanel",
|
|
9
|
+
emits: ["close"],
|
|
10
|
+
setup(d, { emit: o }) {
|
|
11
|
+
const e = c(), { isLoading: s } = p(), { messages: n, handleSend: t, handleStop: r, handleRetry: a, handleCopyMessage: m } = l();
|
|
12
|
+
return { __sfc: !0, emit: o, trans: e, isLoading: s, messages: n, handleSend: t, handleStop: r, handleRetry: a, handleCopyMessage: m, onClose: () => {
|
|
13
|
+
o("close");
|
|
14
|
+
}, ChatConversation: f, InIcons: C };
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export {
|
|
18
|
+
y as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import a from "./ChatConversation.vue2.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import r from "../../../../_virtual/_plugin-vue2_normalizer.js";
|
|
4
|
+
var o = function() {
|
|
5
|
+
var t = this, e = t._self._c, n = t._self._setupProxy;
|
|
6
|
+
return e("div", { ref: "scrollContainerRef", staticClass: "chat-conversation" }, [e("div", { staticClass: "chat-conversation__header w-1" }, [t._t("header")], 2), e("div", { staticClass: "chat-conversation__messages" }, [t.messages.length > 0 ? e(n.ChatMessages, { attrs: { "auto-scroll": "", messages: t.messages }, on: { "copy-message": function(s) {
|
|
7
|
+
return t.$emit("copy-message", s);
|
|
8
|
+
}, retry: function(s) {
|
|
9
|
+
return t.$emit("retry");
|
|
10
|
+
} } }) : e("div", { staticClass: "chat-conversation__empty" }, [e(n.ChatWelcome), e(n.QuickActionChips, { attrs: { compact: "" }, on: { "chip-click": function(s) {
|
|
11
|
+
return t.$emit("send", s);
|
|
12
|
+
} } })], 1)], 1), e("div", { staticClass: "chat-conversation__input" }, [e(n.ChatInput, { attrs: { "is-loading": t.isLoading }, on: { send: function(s) {
|
|
13
|
+
return t.$emit("send", s);
|
|
14
|
+
}, stop: function(s) {
|
|
15
|
+
return t.$emit("stop");
|
|
16
|
+
} } })], 1)]);
|
|
17
|
+
}, i = [], c = /* @__PURE__ */ r(
|
|
18
|
+
a,
|
|
19
|
+
o,
|
|
20
|
+
i,
|
|
21
|
+
!1,
|
|
22
|
+
null,
|
|
23
|
+
"5a25bfc5"
|
|
24
|
+
);
|
|
25
|
+
const p = c.exports;
|
|
26
|
+
export {
|
|
27
|
+
p as default
|
|
28
|
+
};
|