@flusys/ng-email 1.1.0-beta

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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flusys-ng-email.mjs","sources":["../../../projects/ng-email/enums/email-provider.enum.ts","../../../projects/ng-email/enums/email-block-type.enum.ts","../../../projects/ng-email/interfaces/email-schema.interface.ts","../../../projects/ng-email/services/email-config-api.service.ts","../../../projects/ng-email/services/email-template-api.service.ts","../../../projects/ng-email/services/email-send.service.ts","../../../projects/ng-email/services/email-builder-state.service.ts","../../../projects/ng-email/routes/email.routes.ts","../../../projects/ng-email/pages/email-container/email-container.component.ts","../../../projects/ng-email/public-api.ts","../../../projects/ng-email/flusys-ng-email.ts"],"sourcesContent":["/**\n * Supported email provider types\n */\nexport enum EmailProviderEnum {\n SMTP = 'smtp',\n SENDGRID = 'sendgrid',\n MAILGUN = 'mailgun',\n}\n","/**\n * Email content block types\n */\nexport enum EmailBlockType {\n TEXT = 'text',\n IMAGE = 'image',\n BUTTON = 'button',\n DIVIDER = 'divider',\n HTML = 'html',\n}\n","import { EmailBlockType } from '../enums/email-block-type.enum';\n\n/**\n * Email template variable definition\n */\nexport interface IEmailTemplateVariable {\n name: string;\n type: 'string' | 'number' | 'boolean' | 'date';\n required?: boolean;\n defaultValue?: string;\n description?: string;\n}\n\n/**\n * Email section style\n */\nexport interface IEmailSectionStyle {\n backgroundColor?: string;\n padding?: string;\n maxWidth?: string;\n}\n\n/**\n * Email block style\n */\nexport interface IEmailBlockStyle {\n textAlign?: 'left' | 'center' | 'right';\n padding?: string;\n margin?: string;\n backgroundColor?: string;\n}\n\n/**\n * Text block content\n */\nexport interface ITextBlockContent {\n text: string;\n html?: string;\n}\n\n/**\n * Image block content\n */\nexport interface IImageBlockContent {\n src: string;\n alt?: string;\n link?: string;\n width?: string;\n height?: string;\n}\n\n/**\n * Button block content\n */\nexport interface IButtonBlockContent {\n text: string;\n link: string;\n backgroundColor?: string;\n textColor?: string;\n borderRadius?: string;\n}\n\n/**\n * Divider block content\n */\nexport interface IDividerBlockContent {\n height?: string;\n color?: string;\n style?: 'solid' | 'dashed' | 'dotted';\n}\n\n/**\n * HTML block content\n */\nexport interface IHtmlBlockContent {\n html: string;\n}\n\n/**\n * Email content block\n */\nexport interface IEmailBlock {\n id: string;\n type: EmailBlockType;\n order: number;\n content: ITextBlockContent | IImageBlockContent | IButtonBlockContent | IDividerBlockContent | IHtmlBlockContent;\n style?: IEmailBlockStyle;\n}\n\n/**\n * Email section (header, body, footer)\n */\nexport interface IEmailSection {\n id: string;\n type: 'header' | 'body' | 'footer';\n name: string;\n blocks: IEmailBlock[];\n order: number;\n style?: IEmailSectionStyle;\n}\n\n/**\n * Email schema settings\n */\nexport interface IEmailSettings {\n maxWidth?: string;\n backgroundColor?: string;\n fontFamily?: string;\n baseTextColor?: string;\n}\n\n/**\n * Full email schema structure\n */\nexport interface IEmailSchema {\n id: string;\n version: string;\n name: string;\n subject: string;\n preheader?: string;\n sections: IEmailSection[];\n variables?: IEmailTemplateVariable[];\n settings?: IEmailSettings;\n}\n\n/**\n * Default email settings\n */\nexport const DEFAULT_EMAIL_SETTINGS: IEmailSettings = {\n maxWidth: '600px',\n backgroundColor: '#f5f5f5',\n fontFamily: 'Arial, sans-serif',\n baseTextColor: '#333333',\n};\n\n/**\n * Create a new email schema\n */\nexport function createEmailSchema(partial: Partial<IEmailSchema> = {}): IEmailSchema {\n return {\n id: crypto.randomUUID(),\n version: '1.0.0',\n name: partial.name || 'Untitled Template',\n subject: partial.subject || '',\n sections: partial.sections || [\n { id: crypto.randomUUID(), type: 'header', name: 'Header', blocks: [], order: 0 },\n { id: crypto.randomUUID(), type: 'body', name: 'Body', blocks: [], order: 1 },\n { id: crypto.randomUUID(), type: 'footer', name: 'Footer', blocks: [], order: 2 },\n ],\n settings: { ...DEFAULT_EMAIL_SETTINGS, ...partial.settings },\n variables: partial.variables || [],\n ...partial,\n };\n}\n","import { inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { APP_CONFIG } from '@flusys/ng-core';\nimport { ApiResourceService, ISingleResponse } from '@flusys/ng-shared';\nimport { IEmailConfig, IUpdateEmailConfigDto } from '../interfaces/email-config.interface';\nimport { Observable } from 'rxjs';\nimport { ITestSendResult } from '../interfaces/email-send.interface';\n\n/**\n * Email Config API Service\n * Handles email configuration CRUD operations\n * Endpoint: POST /email/email-config/*\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class EmailConfigApiService extends ApiResourceService<\n IUpdateEmailConfigDto,\n IEmailConfig\n> {\n private readonly apiBaseUrl: string;\n\n constructor() {\n const http = inject(HttpClient);\n super('email/email-config', http);\n this.apiBaseUrl = inject(APP_CONFIG).apiBaseUrl;\n }\n\n /**\n * Send test email to verify configuration\n */\n sendTest(configId: string, recipient: string): Observable<ISingleResponse<ITestSendResult>> {\n return this.http.post<ISingleResponse<ITestSendResult>>(\n `${this.apiBaseUrl}/email/send/test`,\n { emailConfigId: configId, recipient },\n );\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { ApiResourceService, ISingleResponse } from '@flusys/ng-shared';\nimport { IEmailTemplate, IUpdateEmailTemplateDto } from '../interfaces/email-template.interface';\nimport { Observable } from 'rxjs';\n\n/**\n * Email Template API Service\n * Handles email template CRUD operations\n * Endpoint: POST /email/email-template/*\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class EmailTemplateApiService extends ApiResourceService<\n IUpdateEmailTemplateDto,\n IEmailTemplate\n> {\n constructor() {\n const http = inject(HttpClient);\n super('email/email-template', http);\n }\n\n /**\n * Get template by slug (POST-only RPC pattern)\n */\n getBySlug(slug: string): Observable<ISingleResponse<IEmailTemplate | null>> {\n return this.http.post<ISingleResponse<IEmailTemplate | null>>(\n `${this.baseUrl}/get-by-slug`,\n { slug },\n );\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { HttpClient } from '@angular/common/http';\nimport { APP_CONFIG } from '@flusys/ng-core';\nimport { ISingleResponse } from '@flusys/ng-shared';\nimport { Observable } from 'rxjs';\nimport {\n ISendEmailDto,\n ISendTemplateEmailDto,\n ITestSendDto,\n ITestSendResult,\n} from '../interfaces/email-send.interface';\n\n/**\n * Email Send Service\n * Handles sending emails directly or using templates\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class EmailSendService {\n private readonly http = inject(HttpClient);\n private readonly baseUrl = inject(APP_CONFIG).apiBaseUrl;\n\n /**\n * Send email directly (without template)\n */\n sendDirect(dto: ISendEmailDto): Observable<ISingleResponse<ITestSendResult>> {\n return this.http.post<ISingleResponse<ITestSendResult>>(\n `${this.baseUrl}/email/send/direct`,\n dto,\n );\n }\n\n /**\n * Send email using template\n */\n sendTemplate(dto: ISendTemplateEmailDto): Observable<ISingleResponse<ITestSendResult>> {\n return this.http.post<ISingleResponse<ITestSendResult>>(\n `${this.baseUrl}/email/send/template`,\n dto,\n );\n }\n\n /**\n * Send test email (for testing configuration)\n */\n sendTest(dto: ITestSendDto): Observable<ISingleResponse<ITestSendResult>> {\n return this.http.post<ISingleResponse<ITestSendResult>>(\n `${this.baseUrl}/email/send/test`,\n { emailConfigId: dto.configId, recipient: dto.recipient },\n );\n }\n}\n","import { Injectable, signal, computed } from '@angular/core';\nimport {\n IEmailSchema,\n IEmailSection,\n IEmailBlock,\n IEmailSettings,\n createEmailSchema,\n DEFAULT_EMAIL_SETTINGS,\n} from '../interfaces/email-schema.interface';\nimport { EmailBlockType } from '../enums/email-block-type.enum';\n\n/**\n * Manages the email builder UI state including schema, selection, and UI toggles.\n * Should be provided at the EmailBuilder component level (not root).\n */\n@Injectable()\nexport class EmailBuilderStateService {\n // Schema state\n private readonly _schema = signal<IEmailSchema>(createEmailSchema());\n private readonly _isDirty = signal(false);\n\n // Selection state\n private readonly _selectedSectionId = signal<string | null>(null);\n private readonly _selectedBlockId = signal<string | null>(null);\n\n // View mode\n private readonly _viewMode = signal<'visual' | 'html'>('visual');\n\n // Public readonly signals\n readonly schema = this._schema.asReadonly();\n readonly isDirty = this._isDirty.asReadonly();\n readonly selectedSectionId = this._selectedSectionId.asReadonly();\n readonly selectedBlockId = this._selectedBlockId.asReadonly();\n readonly viewMode = this._viewMode.asReadonly();\n\n // Computed signals\n readonly sections = computed(() => this._schema().sections);\n readonly templateName = computed(() => this._schema().name);\n readonly subject = computed(() => this._schema().subject);\n readonly settings = computed(() => this._schema().settings ?? DEFAULT_EMAIL_SETTINGS);\n readonly variables = computed(() => this._schema().variables ?? []);\n\n readonly headerSection = computed((): IEmailSection | null => {\n return this.sections().find((s) => s.type === 'header') ?? null;\n });\n\n readonly bodySection = computed((): IEmailSection | null => {\n return this.sections().find((s) => s.type === 'body') ?? null;\n });\n\n readonly footerSection = computed((): IEmailSection | null => {\n return this.sections().find((s) => s.type === 'footer') ?? null;\n });\n\n readonly selectedSection = computed((): IEmailSection | null => {\n const sectionId = this._selectedSectionId();\n if (!sectionId) return null;\n return this.sections().find((s) => s.id === sectionId) ?? null;\n });\n\n readonly selectedBlock = computed((): IEmailBlock | null => {\n const blockId = this._selectedBlockId();\n if (!blockId) return null;\n for (const section of this.sections()) {\n const block = section.blocks.find((b) => b.id === blockId);\n if (block) return block;\n }\n return null;\n });\n\n readonly allBlocks = computed((): IEmailBlock[] => {\n return this.sections().flatMap((s) => s.blocks);\n });\n\n // =========================================\n // Schema Operations\n // =========================================\n\n /**\n * Load an existing schema into the builder\n */\n loadSchema(schema: IEmailSchema): void {\n const cloned = structuredClone(schema);\n this._schema.set(cloned);\n this._isDirty.set(false);\n this._selectedSectionId.set(null);\n this._selectedBlockId.set(null);\n }\n\n /**\n * Create a new empty schema\n */\n createNewSchema(name: string = 'Untitled Template'): void {\n this._schema.set(createEmailSchema({ name }));\n this._isDirty.set(true);\n this._selectedSectionId.set(null);\n this._selectedBlockId.set(null);\n }\n\n /**\n * Update template metadata\n */\n updateSchemaMeta(\n updates: Partial<Pick<IEmailSchema, 'name' | 'subject' | 'preheader' | 'settings' | 'variables'>>,\n ): void {\n this._schema.update((schema) => ({\n ...schema,\n ...updates,\n }));\n this._isDirty.set(true);\n }\n\n /**\n * Mark schema as saved (clears dirty flag)\n */\n markAsSaved(): void {\n this._isDirty.set(false);\n }\n\n /**\n * Set view mode (visual or html)\n */\n setViewMode(mode: 'visual' | 'html'): void {\n this._viewMode.set(mode);\n }\n\n // =========================================\n // Section Operations\n // =========================================\n\n /**\n * Update section properties\n */\n updateSection(sectionId: string, updates: Partial<IEmailSection>): void {\n this._schema.update((schema) => ({\n ...schema,\n sections: schema.sections.map((s) =>\n s.id === sectionId ? { ...s, ...updates } : s,\n ),\n }));\n this._isDirty.set(true);\n }\n\n // =========================================\n // Block Operations\n // =========================================\n\n /**\n * Add a new block to a section\n */\n addBlock(\n sectionId: string,\n blockType: EmailBlockType,\n block?: Partial<IEmailBlock>,\n ): string | null {\n const newBlock: IEmailBlock = {\n id: crypto.randomUUID(),\n type: blockType,\n order: 0,\n content: this.getDefaultContent(blockType),\n ...block,\n };\n\n this._schema.update((schema) => ({\n ...schema,\n sections: schema.sections.map((s) => {\n if (s.id !== sectionId) return s;\n const blocks = [...s.blocks, newBlock];\n // Update order\n blocks.forEach((b, i) => (b.order = i));\n return { ...s, blocks };\n }),\n }));\n\n this._isDirty.set(true);\n return newBlock.id;\n }\n\n /**\n * Update block properties\n */\n updateBlock(sectionId: string, blockId: string, updates: Partial<IEmailBlock>): void {\n this._schema.update((schema) => ({\n ...schema,\n sections: schema.sections.map((s) => {\n if (s.id !== sectionId) return s;\n return {\n ...s,\n blocks: s.blocks.map((b) => (b.id === blockId ? { ...b, ...updates } : b)),\n };\n }),\n }));\n this._isDirty.set(true);\n }\n\n /**\n * Delete a block from a section\n */\n deleteBlock(sectionId: string, blockId: string): void {\n this._schema.update((schema) => ({\n ...schema,\n sections: schema.sections.map((s) => {\n if (s.id !== sectionId) return s;\n const blocks = s.blocks.filter((b) => b.id !== blockId);\n // Update order\n blocks.forEach((b, i) => (b.order = i));\n return { ...s, blocks };\n }),\n }));\n this._isDirty.set(true);\n\n // Clear selection if deleted block was selected\n if (this._selectedBlockId() === blockId) {\n this._selectedBlockId.set(null);\n }\n }\n\n /**\n * Reorder blocks within a section\n */\n reorderBlocks(sectionId: string, fromIndex: number, toIndex: number): void {\n this._schema.update((schema) => ({\n ...schema,\n sections: schema.sections.map((s) => {\n if (s.id !== sectionId) return s;\n const blocks = [...s.blocks];\n const [removed] = blocks.splice(fromIndex, 1);\n blocks.splice(toIndex, 0, removed);\n // Update order\n blocks.forEach((b, i) => (b.order = i));\n return { ...s, blocks };\n }),\n }));\n this._isDirty.set(true);\n }\n\n /**\n * Duplicate a block\n */\n duplicateBlock(sectionId: string, blockId: string): string | null {\n const section = this.sections().find((s) => s.id === sectionId);\n const block = section?.blocks.find((b) => b.id === blockId);\n if (!block) return null;\n\n const newBlock: IEmailBlock = {\n ...structuredClone(block),\n id: crypto.randomUUID(),\n };\n\n this._schema.update((schema) => ({\n ...schema,\n sections: schema.sections.map((s) => {\n if (s.id !== sectionId) return s;\n const blockIndex = s.blocks.findIndex((b) => b.id === blockId);\n const blocks = [...s.blocks];\n blocks.splice(blockIndex + 1, 0, newBlock);\n // Update order\n blocks.forEach((b, i) => (b.order = i));\n return { ...s, blocks };\n }),\n }));\n\n this._isDirty.set(true);\n return newBlock.id;\n }\n\n // =========================================\n // Selection Operations\n // =========================================\n\n /**\n * Select a section\n */\n selectSection(sectionId: string | null): void {\n this._selectedSectionId.set(sectionId);\n this._selectedBlockId.set(null);\n }\n\n /**\n * Select a block\n */\n selectBlock(blockId: string | null): void {\n if (blockId) {\n // Find the section containing this block\n for (const section of this.sections()) {\n if (section.blocks.some((b) => b.id === blockId)) {\n this._selectedSectionId.set(section.id);\n break;\n }\n }\n }\n this._selectedBlockId.set(blockId);\n }\n\n /**\n * Clear all selection\n */\n clearSelection(): void {\n this._selectedSectionId.set(null);\n this._selectedBlockId.set(null);\n }\n\n // =========================================\n // Helper Methods\n // =========================================\n\n /**\n * Get default content for a block type\n */\n private getDefaultContent(type: EmailBlockType): Record<string, any> {\n switch (type) {\n case EmailBlockType.TEXT:\n return { text: 'Enter your text here...', html: '<p>Enter your text here...</p>' };\n case EmailBlockType.IMAGE:\n return { src: '', alt: 'Image' };\n case EmailBlockType.BUTTON:\n return {\n text: 'Click Here',\n link: 'https://',\n backgroundColor: '#007bff',\n textColor: '#ffffff',\n borderRadius: '4px',\n };\n case EmailBlockType.DIVIDER:\n return { height: '1px', color: '#cccccc', style: 'solid' };\n case EmailBlockType.HTML:\n return { html: '<!-- Custom HTML -->' };\n default:\n return {};\n }\n }\n}\n","import { Routes } from '@angular/router';\n\n/**\n * Email module routes\n */\nexport const EMAIL_ROUTES: Routes = [\n {\n path: '',\n loadComponent: () =>\n import('../pages/email-container/email-container.component').then(\n (m) => m.EmailContainerComponent,\n ),\n children: [\n // Templates\n {\n path: 'templates',\n children: [\n {\n path: '',\n loadComponent: () =>\n import('../pages/template/template-list.component').then(\n (m) => m.TemplateListComponent,\n ),\n },\n {\n path: 'new',\n loadComponent: () =>\n import('../pages/template/template-form.component').then(\n (m) => m.TemplateFormComponent,\n ),\n },\n {\n path: ':id',\n loadComponent: () =>\n import('../pages/template/template-form.component').then(\n (m) => m.TemplateFormComponent,\n ),\n },\n ],\n },\n // Configs\n {\n path: 'configs',\n children: [\n {\n path: '',\n loadComponent: () =>\n import('../pages/config/email-config-list.component').then(\n (m) => m.EmailConfigListComponent,\n ),\n },\n {\n path: 'new',\n loadComponent: () =>\n import('../pages/config/email-config-form.component').then(\n (m) => m.EmailConfigFormComponent,\n ),\n },\n {\n path: ':id',\n loadComponent: () =>\n import('../pages/config/email-config-form.component').then(\n (m) => m.EmailConfigFormComponent,\n ),\n },\n ],\n },\n // Default redirect\n {\n path: '',\n redirectTo: 'templates',\n pathMatch: 'full',\n },\n ],\n },\n];\n","import { Component, ChangeDetectionStrategy } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RouterLink, RouterLinkActive, RouterOutlet } from '@angular/router';\n\ninterface ITab {\n id: string;\n label: string;\n icon: string;\n route: string;\n}\n\n/**\n * Email container component with tab navigation\n */\n@Component({\n selector: 'lib-email-container',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CommonModule, RouterOutlet, RouterLink, RouterLinkActive],\n template: `\n <div class=\"email-page p-4\">\n <div class=\"email-header mb-4\">\n <h1 class=\"text-2xl font-bold m-0\">Email</h1>\n <p class=\"text-gray-500 mt-1\">Manage email templates and provider configurations</p>\n </div>\n\n <div class=\"email-tabs flex gap-1 mb-4 border-b border-gray-200\">\n @for (tab of tabs; track tab.id) {\n <a\n [routerLink]=\"tab.route\"\n routerLinkActive=\"active\"\n class=\"tab-link flex items-center gap-2 px-4 py-2 rounded-t-lg cursor-pointer transition-colors\">\n <i [class]=\"tab.icon\"></i>\n <span>{{ tab.label }}</span>\n </a>\n }\n </div>\n\n <div class=\"email-content\">\n <router-outlet />\n </div>\n </div>\n `,\n styles: [\n `\n .tab-link {\n color: var(--text-color-secondary, #6b7280);\n text-decoration: none;\n border-bottom: 2px solid transparent;\n margin-bottom: -1px;\n }\n .tab-link.active {\n color: var(--primary-color, #3b82f6);\n border-bottom-color: var(--primary-color, #3b82f6);\n background-color: var(--surface-ground, #f9fafb);\n }\n .tab-link:hover:not(.active) {\n background-color: var(--surface-hover, #f3f4f6);\n }\n `,\n ],\n})\nexport class EmailContainerComponent {\n readonly tabs: ITab[] = [\n { id: 'templates', label: 'Templates', icon: 'pi pi-file', route: 'templates' },\n { id: 'configs', label: 'Configurations', icon: 'pi pi-cog', route: 'configs' },\n ];\n}\n","// =============================================================================\n// @flusys/ng-email - Email Package\n// =============================================================================\n\n// Enums\nexport * from './enums/public-api';\n\n// Interfaces\nexport * from './interfaces/public-api';\n\n// Services\nexport { EmailConfigApiService } from './services/email-config-api.service';\nexport { EmailTemplateApiService } from './services/email-template-api.service';\nexport { EmailSendService } from './services/email-send.service';\nexport { EmailBuilderStateService } from './services/email-builder-state.service';\n\n// Routes\nexport { EMAIL_ROUTES } from './routes/email.routes';\n\n// Components\nexport { EmailContainerComponent } from './pages/email-container/email-container.component';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;AAEG;IACS;AAAZ,CAAA,UAAY,iBAAiB,EAAA;AAC3B,IAAA,iBAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,iBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,iBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EAJW,iBAAiB,KAAjB,iBAAiB,GAAA,EAAA,CAAA,CAAA;;ACH7B;;AAEG;IACS;AAAZ,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,cAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,cAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,cAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EANW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;;AC0H1B;;AAEG;AACI,MAAM,sBAAsB,GAAmB;AACpD,IAAA,QAAQ,EAAE,OAAO;AACjB,IAAA,eAAe,EAAE,SAAS;AAC1B,IAAA,UAAU,EAAE,mBAAmB;AAC/B,IAAA,aAAa,EAAE,SAAS;;AAG1B;;AAEG;AACG,SAAU,iBAAiB,CAAC,OAAA,GAAiC,EAAE,EAAA;IACnE,OAAO;AACL,QAAA,EAAE,EAAE,MAAM,CAAC,UAAU,EAAE;AACvB,QAAA,OAAO,EAAE,OAAO;AAChB,QAAA,IAAI,EAAE,OAAO,CAAC,IAAI,IAAI,mBAAmB;AACzC,QAAA,OAAO,EAAE,OAAO,CAAC,OAAO,IAAI,EAAE;AAC9B,QAAA,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"license": "MIT",
6
+ "peerDependencies": {
7
+ "@angular/common": "^21.0.0",
8
+ "@angular/core": "^21.0.0",
9
+ "@angular/forms": "^21.0.0",
10
+ "@angular/router": "^21.0.0",
11
+ "@flusys/ng-core": "^1.1.0-beta",
12
+ "@flusys/ng-shared": "^1.1.0-beta",
13
+ "@primeuix/themes": "^1.0.0",
14
+ "primeicons": "^7.0.0",
15
+ "primeng": "^21.0.0"
16
+ },
17
+ "sideEffects": false,
18
+ "module": "fesm2022/flusys-ng-email.mjs",
19
+ "typings": "types/flusys-ng-email.d.ts",
20
+ "exports": {
21
+ "./package.json": {
22
+ "default": "./package.json"
23
+ },
24
+ ".": {
25
+ "types": "./types/flusys-ng-email.d.ts",
26
+ "default": "./fesm2022/flusys-ng-email.mjs"
27
+ }
28
+ },
29
+ "dependencies": {
30
+ "tslib": "^2.3.0"
31
+ }
32
+ }
@@ -0,0 +1,456 @@
1
+ import { IBaseEntity, ApiResourceService, ISingleResponse } from '@flusys/ng-shared';
2
+ import { Observable } from 'rxjs';
3
+ import * as _angular_core from '@angular/core';
4
+ import * as _flusys_ng_email from '@flusys/ng-email';
5
+ import { Routes } from '@angular/router';
6
+
7
+ /**
8
+ * Supported email provider types
9
+ */
10
+ declare enum EmailProviderEnum {
11
+ SMTP = "smtp",
12
+ SENDGRID = "sendgrid",
13
+ MAILGUN = "mailgun"
14
+ }
15
+
16
+ /**
17
+ * Email content block types
18
+ */
19
+ declare enum EmailBlockType {
20
+ TEXT = "text",
21
+ IMAGE = "image",
22
+ BUTTON = "button",
23
+ DIVIDER = "divider",
24
+ HTML = "html"
25
+ }
26
+
27
+ /**
28
+ * Email configuration interface
29
+ */
30
+ interface IEmailConfig extends IBaseEntity {
31
+ name: string;
32
+ provider: EmailProviderEnum;
33
+ config: Record<string, any>;
34
+ fromEmail: string | null;
35
+ fromName: string | null;
36
+ isActive: boolean;
37
+ isDefault: boolean;
38
+ companyId?: string | null;
39
+ }
40
+ /**
41
+ * Create email config DTO
42
+ */
43
+ interface ICreateEmailConfigDto {
44
+ name: string;
45
+ provider: EmailProviderEnum;
46
+ config: Record<string, any>;
47
+ fromEmail?: string;
48
+ fromName?: string;
49
+ isActive?: boolean;
50
+ isDefault?: boolean;
51
+ }
52
+ /**
53
+ * Update email config DTO
54
+ */
55
+ interface IUpdateEmailConfigDto extends Partial<ICreateEmailConfigDto> {
56
+ id: string;
57
+ }
58
+ /**
59
+ * SMTP provider configuration
60
+ */
61
+ interface ISmtpConfig {
62
+ host: string;
63
+ port: number;
64
+ secure?: boolean;
65
+ username: string;
66
+ password: string;
67
+ }
68
+ /**
69
+ * SendGrid provider configuration
70
+ */
71
+ interface ISendGridConfig {
72
+ apiKey: string;
73
+ }
74
+ /**
75
+ * Mailgun provider configuration
76
+ */
77
+ interface IMailgunConfig {
78
+ apiKey: string;
79
+ domain: string;
80
+ region?: 'us' | 'eu';
81
+ }
82
+
83
+ /**
84
+ * Email template variable definition
85
+ */
86
+ interface IEmailTemplateVariable {
87
+ name: string;
88
+ type: 'string' | 'number' | 'boolean' | 'date';
89
+ required?: boolean;
90
+ defaultValue?: string;
91
+ description?: string;
92
+ }
93
+ /**
94
+ * Email section style
95
+ */
96
+ interface IEmailSectionStyle {
97
+ backgroundColor?: string;
98
+ padding?: string;
99
+ maxWidth?: string;
100
+ }
101
+ /**
102
+ * Email block style
103
+ */
104
+ interface IEmailBlockStyle {
105
+ textAlign?: 'left' | 'center' | 'right';
106
+ padding?: string;
107
+ margin?: string;
108
+ backgroundColor?: string;
109
+ }
110
+ /**
111
+ * Text block content
112
+ */
113
+ interface ITextBlockContent {
114
+ text: string;
115
+ html?: string;
116
+ }
117
+ /**
118
+ * Image block content
119
+ */
120
+ interface IImageBlockContent {
121
+ src: string;
122
+ alt?: string;
123
+ link?: string;
124
+ width?: string;
125
+ height?: string;
126
+ }
127
+ /**
128
+ * Button block content
129
+ */
130
+ interface IButtonBlockContent {
131
+ text: string;
132
+ link: string;
133
+ backgroundColor?: string;
134
+ textColor?: string;
135
+ borderRadius?: string;
136
+ }
137
+ /**
138
+ * Divider block content
139
+ */
140
+ interface IDividerBlockContent {
141
+ height?: string;
142
+ color?: string;
143
+ style?: 'solid' | 'dashed' | 'dotted';
144
+ }
145
+ /**
146
+ * HTML block content
147
+ */
148
+ interface IHtmlBlockContent {
149
+ html: string;
150
+ }
151
+ /**
152
+ * Email content block
153
+ */
154
+ interface IEmailBlock {
155
+ id: string;
156
+ type: EmailBlockType;
157
+ order: number;
158
+ content: ITextBlockContent | IImageBlockContent | IButtonBlockContent | IDividerBlockContent | IHtmlBlockContent;
159
+ style?: IEmailBlockStyle;
160
+ }
161
+ /**
162
+ * Email section (header, body, footer)
163
+ */
164
+ interface IEmailSection {
165
+ id: string;
166
+ type: 'header' | 'body' | 'footer';
167
+ name: string;
168
+ blocks: IEmailBlock[];
169
+ order: number;
170
+ style?: IEmailSectionStyle;
171
+ }
172
+ /**
173
+ * Email schema settings
174
+ */
175
+ interface IEmailSettings {
176
+ maxWidth?: string;
177
+ backgroundColor?: string;
178
+ fontFamily?: string;
179
+ baseTextColor?: string;
180
+ }
181
+ /**
182
+ * Full email schema structure
183
+ */
184
+ interface IEmailSchema {
185
+ id: string;
186
+ version: string;
187
+ name: string;
188
+ subject: string;
189
+ preheader?: string;
190
+ sections: IEmailSection[];
191
+ variables?: IEmailTemplateVariable[];
192
+ settings?: IEmailSettings;
193
+ }
194
+ /**
195
+ * Default email settings
196
+ */
197
+ declare const DEFAULT_EMAIL_SETTINGS: IEmailSettings;
198
+ /**
199
+ * Create a new email schema
200
+ */
201
+ declare function createEmailSchema(partial?: Partial<IEmailSchema>): IEmailSchema;
202
+
203
+ /**
204
+ * Email template interface
205
+ */
206
+ interface IEmailTemplate extends IBaseEntity {
207
+ name: string;
208
+ slug: string;
209
+ description: string | null;
210
+ subject: string;
211
+ schema: IEmailSchema;
212
+ htmlContent: string;
213
+ textContent: string | null;
214
+ schemaVersion: number;
215
+ isActive: boolean;
216
+ isHtml: boolean;
217
+ metadata: Record<string, unknown> | null;
218
+ companyId?: string | null;
219
+ }
220
+ /**
221
+ * Create email template DTO
222
+ */
223
+ interface ICreateEmailTemplateDto {
224
+ name: string;
225
+ slug: string;
226
+ description?: string;
227
+ subject: string;
228
+ schema: IEmailSchema;
229
+ htmlContent: string;
230
+ textContent?: string;
231
+ isActive?: boolean;
232
+ isHtml?: boolean;
233
+ metadata?: Record<string, unknown>;
234
+ }
235
+ /**
236
+ * Update email template DTO
237
+ */
238
+ interface IUpdateEmailTemplateDto extends Partial<ICreateEmailTemplateDto> {
239
+ id: string;
240
+ }
241
+
242
+ /**
243
+ * Test send request DTO
244
+ */
245
+ interface ITestSendDto {
246
+ templateId: string;
247
+ configId: string;
248
+ recipient: string;
249
+ subject?: string;
250
+ variables?: Record<string, string>;
251
+ }
252
+ /**
253
+ * Test send result
254
+ */
255
+ interface ITestSendResult {
256
+ success: boolean;
257
+ messageId?: string;
258
+ error?: string;
259
+ }
260
+ /**
261
+ * Send email request DTO
262
+ */
263
+ interface ISendEmailDto {
264
+ to: string | string[];
265
+ cc?: string | string[];
266
+ bcc?: string | string[];
267
+ subject: string;
268
+ html: string;
269
+ text?: string;
270
+ from?: string;
271
+ fromName?: string;
272
+ replyTo?: string;
273
+ emailConfigId?: string;
274
+ }
275
+ /**
276
+ * Send template email request DTO
277
+ */
278
+ interface ISendTemplateEmailDto {
279
+ templateId?: string;
280
+ templateSlug?: string;
281
+ to: string | string[];
282
+ cc?: string | string[];
283
+ bcc?: string | string[];
284
+ variables?: Record<string, any>;
285
+ from?: string;
286
+ fromName?: string;
287
+ replyTo?: string;
288
+ emailConfigId?: string;
289
+ }
290
+
291
+ /**
292
+ * Email Config API Service
293
+ * Handles email configuration CRUD operations
294
+ * Endpoint: POST /email/email-config/*
295
+ */
296
+ declare class EmailConfigApiService extends ApiResourceService<IUpdateEmailConfigDto, IEmailConfig> {
297
+ private readonly apiBaseUrl;
298
+ constructor();
299
+ /**
300
+ * Send test email to verify configuration
301
+ */
302
+ sendTest(configId: string, recipient: string): Observable<ISingleResponse<ITestSendResult>>;
303
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailConfigApiService, never>;
304
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EmailConfigApiService>;
305
+ }
306
+
307
+ /**
308
+ * Email Template API Service
309
+ * Handles email template CRUD operations
310
+ * Endpoint: POST /email/email-template/*
311
+ */
312
+ declare class EmailTemplateApiService extends ApiResourceService<IUpdateEmailTemplateDto, IEmailTemplate> {
313
+ constructor();
314
+ /**
315
+ * Get template by slug (POST-only RPC pattern)
316
+ */
317
+ getBySlug(slug: string): Observable<ISingleResponse<IEmailTemplate | null>>;
318
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailTemplateApiService, never>;
319
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EmailTemplateApiService>;
320
+ }
321
+
322
+ /**
323
+ * Email Send Service
324
+ * Handles sending emails directly or using templates
325
+ */
326
+ declare class EmailSendService {
327
+ private readonly http;
328
+ private readonly baseUrl;
329
+ /**
330
+ * Send email directly (without template)
331
+ */
332
+ sendDirect(dto: ISendEmailDto): Observable<ISingleResponse<ITestSendResult>>;
333
+ /**
334
+ * Send email using template
335
+ */
336
+ sendTemplate(dto: ISendTemplateEmailDto): Observable<ISingleResponse<ITestSendResult>>;
337
+ /**
338
+ * Send test email (for testing configuration)
339
+ */
340
+ sendTest(dto: ITestSendDto): Observable<ISingleResponse<ITestSendResult>>;
341
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailSendService, never>;
342
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EmailSendService>;
343
+ }
344
+
345
+ /**
346
+ * Manages the email builder UI state including schema, selection, and UI toggles.
347
+ * Should be provided at the EmailBuilder component level (not root).
348
+ */
349
+ declare class EmailBuilderStateService {
350
+ private readonly _schema;
351
+ private readonly _isDirty;
352
+ private readonly _selectedSectionId;
353
+ private readonly _selectedBlockId;
354
+ private readonly _viewMode;
355
+ readonly schema: _angular_core.Signal<IEmailSchema>;
356
+ readonly isDirty: _angular_core.Signal<boolean>;
357
+ readonly selectedSectionId: _angular_core.Signal<string | null>;
358
+ readonly selectedBlockId: _angular_core.Signal<string | null>;
359
+ readonly viewMode: _angular_core.Signal<"html" | "visual">;
360
+ readonly sections: _angular_core.Signal<IEmailSection[]>;
361
+ readonly templateName: _angular_core.Signal<string>;
362
+ readonly subject: _angular_core.Signal<string>;
363
+ readonly settings: _angular_core.Signal<IEmailSettings>;
364
+ readonly variables: _angular_core.Signal<_flusys_ng_email.IEmailTemplateVariable[]>;
365
+ readonly headerSection: _angular_core.Signal<IEmailSection | null>;
366
+ readonly bodySection: _angular_core.Signal<IEmailSection | null>;
367
+ readonly footerSection: _angular_core.Signal<IEmailSection | null>;
368
+ readonly selectedSection: _angular_core.Signal<IEmailSection | null>;
369
+ readonly selectedBlock: _angular_core.Signal<IEmailBlock | null>;
370
+ readonly allBlocks: _angular_core.Signal<IEmailBlock[]>;
371
+ /**
372
+ * Load an existing schema into the builder
373
+ */
374
+ loadSchema(schema: IEmailSchema): void;
375
+ /**
376
+ * Create a new empty schema
377
+ */
378
+ createNewSchema(name?: string): void;
379
+ /**
380
+ * Update template metadata
381
+ */
382
+ updateSchemaMeta(updates: Partial<Pick<IEmailSchema, 'name' | 'subject' | 'preheader' | 'settings' | 'variables'>>): void;
383
+ /**
384
+ * Mark schema as saved (clears dirty flag)
385
+ */
386
+ markAsSaved(): void;
387
+ /**
388
+ * Set view mode (visual or html)
389
+ */
390
+ setViewMode(mode: 'visual' | 'html'): void;
391
+ /**
392
+ * Update section properties
393
+ */
394
+ updateSection(sectionId: string, updates: Partial<IEmailSection>): void;
395
+ /**
396
+ * Add a new block to a section
397
+ */
398
+ addBlock(sectionId: string, blockType: EmailBlockType, block?: Partial<IEmailBlock>): string | null;
399
+ /**
400
+ * Update block properties
401
+ */
402
+ updateBlock(sectionId: string, blockId: string, updates: Partial<IEmailBlock>): void;
403
+ /**
404
+ * Delete a block from a section
405
+ */
406
+ deleteBlock(sectionId: string, blockId: string): void;
407
+ /**
408
+ * Reorder blocks within a section
409
+ */
410
+ reorderBlocks(sectionId: string, fromIndex: number, toIndex: number): void;
411
+ /**
412
+ * Duplicate a block
413
+ */
414
+ duplicateBlock(sectionId: string, blockId: string): string | null;
415
+ /**
416
+ * Select a section
417
+ */
418
+ selectSection(sectionId: string | null): void;
419
+ /**
420
+ * Select a block
421
+ */
422
+ selectBlock(blockId: string | null): void;
423
+ /**
424
+ * Clear all selection
425
+ */
426
+ clearSelection(): void;
427
+ /**
428
+ * Get default content for a block type
429
+ */
430
+ private getDefaultContent;
431
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailBuilderStateService, never>;
432
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EmailBuilderStateService>;
433
+ }
434
+
435
+ /**
436
+ * Email module routes
437
+ */
438
+ declare const EMAIL_ROUTES: Routes;
439
+
440
+ interface ITab {
441
+ id: string;
442
+ label: string;
443
+ icon: string;
444
+ route: string;
445
+ }
446
+ /**
447
+ * Email container component with tab navigation
448
+ */
449
+ declare class EmailContainerComponent {
450
+ readonly tabs: ITab[];
451
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailContainerComponent, never>;
452
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EmailContainerComponent, "lib-email-container", never, {}, {}, never, never, true, never>;
453
+ }
454
+
455
+ export { DEFAULT_EMAIL_SETTINGS, EMAIL_ROUTES, EmailBlockType, EmailBuilderStateService, EmailConfigApiService, EmailContainerComponent, EmailProviderEnum, EmailSendService, EmailTemplateApiService, createEmailSchema };
456
+ export type { IButtonBlockContent, ICreateEmailConfigDto, ICreateEmailTemplateDto, IDividerBlockContent, IEmailBlock, IEmailBlockStyle, IEmailConfig, IEmailSchema, IEmailSection, IEmailSectionStyle, IEmailSettings, IEmailTemplate, IEmailTemplateVariable, IHtmlBlockContent, IImageBlockContent, IMailgunConfig, ISendEmailDto, ISendGridConfig, ISendTemplateEmailDto, ISmtpConfig, ITestSendDto, ITestSendResult, ITextBlockContent, IUpdateEmailConfigDto, IUpdateEmailTemplateDto };