@dev.smartpricing/message-composer-layer 1.0.1
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 +75 -0
- package/app/api/ai.ts +28 -0
- package/app/api/brands.ts +54 -0
- package/app/api/client.ts +56 -0
- package/app/api/compilation.ts +34 -0
- package/app/api/dynamicValues.ts +11 -0
- package/app/api/index.ts +11 -0
- package/app/api/languages.ts +6 -0
- package/app/api/media.ts +26 -0
- package/app/api/messageGroups.ts +49 -0
- package/app/api/messages.ts +22 -0
- package/app/api/meta.ts +18 -0
- package/app/api/tracking.ts +9 -0
- package/app/components/Brand/BrandDrawer.vue +281 -0
- package/app/components/Brand/BrandPreview.vue +137 -0
- package/app/components/Brand/Steps/BrandStepGeneral.vue +37 -0
- package/app/components/Brand/Steps/BrandStepSocials.vue +48 -0
- package/app/components/Brand/Steps/BrandStepVisual.vue +214 -0
- package/app/components/Common/BrandColorSwatches.vue +37 -0
- package/app/components/Common/ColorInput.vue +144 -0
- package/app/components/Common/EmojiPickerButton.vue +35 -0
- package/app/components/Common/FontFamilySelect.vue +39 -0
- package/app/components/Common/HtmlPreviewIframe.vue +68 -0
- package/app/components/Common/IncompleteTranslationsDialog.vue +97 -0
- package/app/components/Common/LanguageList.vue +356 -0
- package/app/components/Common/LoadingOverlay.vue +12 -0
- package/app/components/Common/MediaUploadOrSelect.vue +299 -0
- package/app/components/Common/MessagePreviewSlideover.vue +88 -0
- package/app/components/Common/MonacoEditor.vue +110 -0
- package/app/components/Common/PhoneInput.vue +804 -0
- package/app/components/Common/SectionHeader.vue +26 -0
- package/app/components/Common/TranslationActionBar.vue +139 -0
- package/app/components/Common/ViewLessMore.vue +40 -0
- package/app/components/CreateTemplateButton.vue +59 -0
- package/app/components/DynamicDataButton.vue +75 -0
- package/app/components/DynamicDataSlideover.vue +149 -0
- package/app/components/Editor/AiGenerateSlideover.vue +292 -0
- package/app/components/Editor/EditorLinkPopover.vue +154 -0
- package/app/components/Editor/RichTextEditor.vue +495 -0
- package/app/components/Email/Editor/BlockLibrary.vue +89 -0
- package/app/components/Email/Editor/BlockSettings.vue +60 -0
- package/app/components/Email/Editor/Blocks/ButtonBlock.vue +117 -0
- package/app/components/Email/Editor/Blocks/ButtonSettings.vue +228 -0
- package/app/components/Email/Editor/Blocks/DiscountCodeBlock.vue +74 -0
- package/app/components/Email/Editor/Blocks/DiscountCodeSettings.vue +162 -0
- package/app/components/Email/Editor/Blocks/DividerBlock.vue +31 -0
- package/app/components/Email/Editor/Blocks/DividerSettings.vue +108 -0
- package/app/components/Email/Editor/Blocks/FooterBlock.vue +61 -0
- package/app/components/Email/Editor/Blocks/FooterSettings.vue +123 -0
- package/app/components/Email/Editor/Blocks/GridBlock.vue +128 -0
- package/app/components/Email/Editor/Blocks/GridSettings.vue +109 -0
- package/app/components/Email/Editor/Blocks/HTMLBlock.vue +31 -0
- package/app/components/Email/Editor/Blocks/HTMLSettings.vue +85 -0
- package/app/components/Email/Editor/Blocks/HeaderBlock.vue +53 -0
- package/app/components/Email/Editor/Blocks/HeaderSettings.vue +113 -0
- package/app/components/Email/Editor/Blocks/HeadingBlock.vue +61 -0
- package/app/components/Email/Editor/Blocks/HeadingSettings.vue +156 -0
- package/app/components/Email/Editor/Blocks/ImageBlock.vue +49 -0
- package/app/components/Email/Editor/Blocks/ImageSettings.vue +53 -0
- package/app/components/Email/Editor/Blocks/IndexBlock.vue +155 -0
- package/app/components/Email/Editor/Blocks/ParagraphBlock.vue +61 -0
- package/app/components/Email/Editor/Blocks/ParagraphSettings.vue +157 -0
- package/app/components/Email/Editor/Blocks/SocialsBlock.vue +63 -0
- package/app/components/Email/Editor/Blocks/SocialsSettings.vue +117 -0
- package/app/components/Email/Editor/Blocks/SpacerBlock.vue +37 -0
- package/app/components/Email/Editor/Blocks/SpacerSettings.vue +95 -0
- package/app/components/Email/Editor/Blocks/TopProductsBlock.vue +47 -0
- package/app/components/Email/Editor/Blocks/TopProductsSettings.vue +87 -0
- package/app/components/Email/Editor/Blocks/UnsubscribeLinkBlock.vue +61 -0
- package/app/components/Email/Editor/Blocks/UnsubscribeLinkSettings.vue +123 -0
- package/app/components/Email/Editor/Canvas.vue +143 -0
- package/app/components/Email/Editor/GeneralStyleSettings.vue +125 -0
- package/app/components/Email/Editor/Index.vue +77 -0
- package/app/components/Email/Editor/LeftSidebar.vue +95 -0
- package/app/components/Email/InlinePreview.vue +124 -0
- package/app/components/Email/Preview.vue +126 -0
- package/app/components/Email/PreviewPanel.vue +57 -0
- package/app/components/Email/SendTestEmailModal.vue +121 -0
- package/app/components/Email/TranslationEditor.vue +198 -0
- package/app/components/Email/Translator/Button.vue +101 -0
- package/app/components/Email/Translator/Discount.vue +60 -0
- package/app/components/Email/Translator/Footer.vue +66 -0
- package/app/components/Email/Translator/Grid.vue +127 -0
- package/app/components/Email/Translator/Header.vue +90 -0
- package/app/components/Email/Translator/Heading.vue +66 -0
- package/app/components/Email/Translator/Image.vue +91 -0
- package/app/components/Email/Translator/Index.vue +138 -0
- package/app/components/Email/Translator/Paragraph.vue +66 -0
- package/app/components/Email/Translator/RawHtml.vue +64 -0
- package/app/components/Email/Translator/UnsubscribeLink.vue +59 -0
- package/app/components/TemplateList/BaseTable.vue +354 -0
- package/app/components/TemplateList/StatusCell.vue +67 -0
- package/app/components/Whatsapp/CategoryChanger.vue +63 -0
- package/app/components/Whatsapp/Editor/Body.vue +53 -0
- package/app/components/Whatsapp/Editor/Buttons.vue +341 -0
- package/app/components/Whatsapp/Editor/Footer.vue +70 -0
- package/app/components/Whatsapp/Editor/Header.vue +156 -0
- package/app/components/Whatsapp/Editor/Index.vue +89 -0
- package/app/components/Whatsapp/Editor/SyncWrapper.vue +166 -0
- package/app/components/Whatsapp/Preview.vue +197 -0
- package/app/components/Whatsapp/PreviewPanel.vue +24 -0
- package/app/components/Whatsapp/TranslationEditor.vue +150 -0
- package/app/components/Whatsapp/Translator/Body.vue +61 -0
- package/app/components/Whatsapp/Translator/Button.vue +209 -0
- package/app/components/Whatsapp/Translator/Footer.vue +56 -0
- package/app/components/Whatsapp/Translator/Header.vue +61 -0
- package/app/components/Whatsapp/Translator/HeaderMedia.vue +117 -0
- package/app/components/Whatsapp/Translator/Index.vue +159 -0
- package/app/composables/composerContext.ts +35 -0
- package/app/composables/useAutoTranslate.ts +242 -0
- package/app/composables/useAutoTranslateEmail.ts +294 -0
- package/app/composables/useChangeTracking.ts +212 -0
- package/app/composables/useChangeTrackingEmail.ts +227 -0
- package/app/composables/useChannels.ts +36 -0
- package/app/composables/useEmailBlockContext.ts +43 -0
- package/app/composables/useExitConfirmation.ts +39 -0
- package/app/composables/useGoBack.ts +15 -0
- package/app/composables/useIncompleteTranslations.ts +55 -0
- package/app/composables/useIncompleteTranslationsEmail.ts +56 -0
- package/app/composables/useMediaLimits.ts +42 -0
- package/app/composables/useTemplateFormValidation.ts +109 -0
- package/app/composables/useTemplateOperations.ts +147 -0
- package/app/composables/useTracking.ts +39 -0
- package/app/composables/useTranslationFilters.ts +176 -0
- package/app/composables/useTranslationFiltersEmail.ts +244 -0
- package/app/composables/useWhatsappTemplateBehaviors.ts +58 -0
- package/app/middleware/channel-guard.ts +13 -0
- package/app/pages/brands.vue +195 -0
- package/app/pages/images.vue +141 -0
- package/app/pages/index.vue +198 -0
- package/app/pages/preview/[id].vue +47 -0
- package/app/pages/template/email/[id].vue +596 -0
- package/app/pages/template/email/create.vue +562 -0
- package/app/pages/template/whatsapp/[id].vue +561 -0
- package/app/pages/template/whatsapp/create.vue +468 -0
- package/app/plugins/admin-shortcut.client.ts +7 -0
- package/app/plugins/tracking.client.ts +12 -0
- package/app/queries/ai.ts +20 -0
- package/app/queries/brands.ts +75 -0
- package/app/queries/compilation.ts +37 -0
- package/app/queries/dynamicValues.ts +13 -0
- package/app/queries/index.ts +9 -0
- package/app/queries/languages.ts +10 -0
- package/app/queries/media.ts +27 -0
- package/app/queries/messageGroups.ts +112 -0
- package/app/queries/messages.ts +42 -0
- package/app/queries/meta.ts +13 -0
- package/app/stores/adminStore.ts +50 -0
- package/app/stores/appContext.ts +99 -0
- package/app/stores/emailEditor.ts +220 -0
- package/app/stores/main.ts +3 -0
- package/app/stores/metaSubmission.ts +116 -0
- package/app/types/app-config.d.ts +14 -0
- package/app/types/hooks.d.ts +9 -0
- package/app/types/tracking.ts +148 -0
- package/app/utils/locale.ts +17 -0
- package/app/utils/notifyParent.ts +7 -0
- package/app/utils/resolveDefaultLanguage.ts +14 -0
- package/app/utils/socialDefaults.ts +42 -0
- package/app/utils/testIds.const.ts +728 -0
- package/app.config.ts +5 -0
- package/i18n/check-translations.ts +56 -0
- package/i18n/locales/de.ts +834 -0
- package/i18n/locales/en.ts +826 -0
- package/i18n/locales/es.ts +833 -0
- package/i18n/locales/fr.ts +837 -0
- package/i18n/locales/it.ts +831 -0
- package/nuxt.config.ts +65 -0
- package/package.json +64 -0
package/nuxt.config.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export default defineNuxtConfig({
|
|
2
|
+
compatibilityDate: '2025-07-15',
|
|
3
|
+
ssr: false,
|
|
4
|
+
experimental: {
|
|
5
|
+
viteEnvironmentApi: true,
|
|
6
|
+
},
|
|
7
|
+
devtools: { enabled: true },
|
|
8
|
+
modules: ['@pinia/nuxt', '@nuxtjs/i18n', '@pinia/colada-nuxt'],
|
|
9
|
+
imports: {
|
|
10
|
+
dirs: ['stores'],
|
|
11
|
+
},
|
|
12
|
+
extends: ['nuxt-ui-layer'],
|
|
13
|
+
i18n: {
|
|
14
|
+
strategy: 'no_prefix',
|
|
15
|
+
locales: [
|
|
16
|
+
{
|
|
17
|
+
code: 'en',
|
|
18
|
+
name: 'English',
|
|
19
|
+
dir: 'ltr',
|
|
20
|
+
file: 'en.ts',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
code: 'it',
|
|
24
|
+
name: 'Italiano',
|
|
25
|
+
dir: 'ltr',
|
|
26
|
+
file: 'it.ts',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
code: 'de',
|
|
30
|
+
name: 'Deutsch',
|
|
31
|
+
dir: 'ltr',
|
|
32
|
+
file: 'de.ts',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
code: 'fr',
|
|
36
|
+
name: 'Français',
|
|
37
|
+
dir: 'ltr',
|
|
38
|
+
file: 'fr.ts',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
code: 'es',
|
|
42
|
+
name: 'Español',
|
|
43
|
+
dir: 'ltr',
|
|
44
|
+
file: 'es.ts',
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
detectBrowserLanguage: {
|
|
48
|
+
useCookie: true,
|
|
49
|
+
cookieKey: 'i18n_redirected',
|
|
50
|
+
fallbackLocale: 'en',
|
|
51
|
+
cookieDomain: process.env.NUXT_PUBLIC_COOKIE_DOMAIN || undefined,
|
|
52
|
+
cookieCrossOrigin: true,
|
|
53
|
+
cookieSecure: false,
|
|
54
|
+
},
|
|
55
|
+
defaultLocale: 'en',
|
|
56
|
+
compilation: {
|
|
57
|
+
strictMessage: false,
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
runtimeConfig: {
|
|
61
|
+
public: {
|
|
62
|
+
COMPOSER_API_URL: '',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
})
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@dev.smartpricing/message-composer-layer",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"app",
|
|
8
|
+
"i18n",
|
|
9
|
+
"shared",
|
|
10
|
+
"nuxt.config.ts",
|
|
11
|
+
"app.config.ts"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "nuxt build",
|
|
15
|
+
"dev": "nuxt dev",
|
|
16
|
+
"lint": "eslint app/ --fix",
|
|
17
|
+
"format": "prettier --write app/",
|
|
18
|
+
"postinstall": "nuxt prepare",
|
|
19
|
+
"test:e2e": "playwright test",
|
|
20
|
+
"test:e2e:debug": "playwright test --debug",
|
|
21
|
+
"test:e2e:ui": "playwright test --ui",
|
|
22
|
+
"cleanup": "nuxt cleanup && rm -rf node_modules pnpm-lock.yaml"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@formkit/drag-and-drop": "^0.5.3",
|
|
26
|
+
"@nuxtjs/i18n": "^10.3.0",
|
|
27
|
+
"@pinia/colada": "^1.2.1",
|
|
28
|
+
"@pinia/colada-nuxt": "^1.0.0",
|
|
29
|
+
"@pinia/nuxt": "^0.11.3",
|
|
30
|
+
"@dev.smartpricing/message-composer-utils": "workspace:*",
|
|
31
|
+
"@tiptap/extension-character-count": "^3.22.5",
|
|
32
|
+
"@tiptap/extension-emoji": "^3.22.5",
|
|
33
|
+
"@tiptap/extension-link": "^3.22.5",
|
|
34
|
+
"@tiptap/extension-mention": "^3.22.5",
|
|
35
|
+
"@tiptap/extension-text-align": "^3.22.5",
|
|
36
|
+
"@tiptap/extension-underline": "^3.22.5",
|
|
37
|
+
"@tiptap/extensions": "^3.22.5",
|
|
38
|
+
"@tiptap/pm": "^3.22.5",
|
|
39
|
+
"@tiptap/starter-kit": "^3.22.5",
|
|
40
|
+
"@tiptap/vue-3": "^3.22.5",
|
|
41
|
+
"@vueuse/core": "^14.2.1",
|
|
42
|
+
"@vueuse/nuxt": "^14.2.1",
|
|
43
|
+
"jwt-decode": "^4.0.0",
|
|
44
|
+
"monaco-editor": "^0.55.1",
|
|
45
|
+
"colorthief": "^2.4.0",
|
|
46
|
+
"nuxt": "^4.4.2",
|
|
47
|
+
"ofetch": "^1.5.1",
|
|
48
|
+
"typescript": "^6.0.3",
|
|
49
|
+
"vue": "^3.5.33",
|
|
50
|
+
"vue-router": "^5.0.6",
|
|
51
|
+
"vue3-emoji-picker": "^1.1.8",
|
|
52
|
+
"zod": "^4.4.1"
|
|
53
|
+
},
|
|
54
|
+
"devDependencies": {
|
|
55
|
+
"@nuxt/eslint": "^1.15.2",
|
|
56
|
+
"@nuxt/test-utils": "^4.0.3",
|
|
57
|
+
"@playwright/test": "^1.59.1",
|
|
58
|
+
"dotenv": "^17.4.2",
|
|
59
|
+
"nuxt-ui-layer": "git+ssh://git@github.com:smartpricing/smartness-nuxt-ui#v1.5.4"
|
|
60
|
+
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"nuxt-ui-layer": ">=1.3.0"
|
|
63
|
+
}
|
|
64
|
+
}
|