@flusys/ng-email 1.0.0-rc

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 { 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 constructor() {\n const http = inject(HttpClient);\n super('email/email-config', http);\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.baseUrl.replace('/email-config', '')}/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 {\n IEmailTemplate,\n ICreateEmailTemplateDto,\n IUpdateEmailTemplateDto,\n} from '../interfaces/email-template.interface';\nimport { firstValueFrom, 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 /**\n * Create a new email template\n * POST /email/email-template/insert\n * Uses ICreateEmailTemplateDto which has different required fields than update\n */\n createTemplate(dto: ICreateEmailTemplateDto): Observable<ISingleResponse<IEmailTemplate>> {\n return this.http.post<ISingleResponse<IEmailTemplate>>(`${this.baseUrl}/insert`, dto);\n }\n\n /**\n * Create a new email template (async/await version)\n * POST /email/email-template/insert\n */\n async createTemplateAsync(dto: ICreateEmailTemplateDto): Promise<ISingleResponse<IEmailTemplate>> {\n return firstValueFrom(this.createTemplate(dto));\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 ITestSendResult,\n} from '../interfaces/email-send.interface';\n\n/**\n * Email Send Service\n * Handles sending emails directly or using templates\n * Endpoint: POST /email/send/*\n *\n * Note: For testing configurations, use EmailConfigApiService.sendTest()\n */\n@Injectable({\n providedIn: 'root',\n})\nexport class EmailSendService {\n private readonly http = inject(HttpClient);\n private readonly baseUrl = `${inject(APP_CONFIG).apiBaseUrl}/email/send`;\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}/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}/template`,\n dto,\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 { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { AngularModule } from '@flusys/ng-shared';\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: [AngularModule],\n styles: `\n .scrollbar-hide {\n -ms-overflow-style: none;\n scrollbar-width: none;\n &::-webkit-scrollbar { display: none; }\n }\n `,\n template: `\n <div class=\"p-2 sm:p-4\">\n <div class=\"mb-4\">\n <h1 class=\"text-xl sm:text-2xl font-bold m-0\">Email</h1>\n <p class=\"text-sm text-muted-color mt-1\">Manage email templates and provider configurations</p>\n </div>\n\n <div class=\"scrollbar-hide flex gap-1 mb-4 border-b border-surface overflow-x-auto flex-nowrap -mx-2 sm:mx-0 px-2 sm:px-0\">\n @for (tab of tabs; track tab.id) {\n <a\n [routerLink]=\"tab.route\"\n routerLinkActive=\"tab-active\"\n [routerLinkActiveOptions]=\"{ exact: false }\"\n class=\"flex items-center gap-2 px-3 sm:px-4 py-2 rounded-t-lg cursor-pointer transition-colors text-muted-color no-underline border-b-2 border-transparent -mb-px hover:bg-surface-hover [&.tab-active]:text-primary [&.tab-active]:border-primary [&.tab-active]:bg-surface-ground whitespace-nowrap shrink-0 text-sm sm:text-base\">\n <i [class]=\"tab.icon\"></i>\n <span>{{ tab.label }}</span>\n </a>\n }\n </div>\n\n <router-outlet />\n </div>\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;AA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AI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC,CAAC,aAAa,CAAC,EAAA,QAAA,EAQd;;;;;;;;;;;;;;;;;;;;;;AAsBT,EAAA,CAAA,EAAA,MAAA,EAAA,CAAA,iHAAA,CAAA,EAAA;;;;;;;;AC/CH;AACA;AACA;AAEA;;ACJA;;AAEG;;;;"}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@flusys/ng-email",
3
+ "version": "1.0.0-rc",
4
+ "description": "Email management module for FLUSYS Angular applications",
5
+ "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.1-beta",
12
+ "@flusys/ng-layout": "^1.1.1-beta",
13
+ "@flusys/ng-shared": "^1.1.1-beta",
14
+ "@primeuix/themes": "^1.0.0",
15
+ "primeicons": "^7.0.0",
16
+ "primeng": "^21.0.0"
17
+ },
18
+ "sideEffects": false,
19
+ "module": "fesm2022/flusys-ng-email.mjs",
20
+ "typings": "types/flusys-ng-email.d.ts",
21
+ "exports": {
22
+ "./package.json": {
23
+ "default": "./package.json"
24
+ },
25
+ ".": {
26
+ "types": "./types/flusys-ng-email.d.ts",
27
+ "default": "./fesm2022/flusys-ng-email.mjs"
28
+ }
29
+ },
30
+ "dependencies": {
31
+ "tslib": "^2.3.0"
32
+ }
33
+ }
@@ -0,0 +1,455 @@
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 result
244
+ */
245
+ interface ITestSendResult {
246
+ success: boolean;
247
+ messageId?: string;
248
+ error?: string;
249
+ }
250
+ /**
251
+ * Send email request DTO
252
+ */
253
+ interface ISendEmailDto {
254
+ to: string | string[];
255
+ cc?: string | string[];
256
+ bcc?: string | string[];
257
+ subject: string;
258
+ html: string;
259
+ text?: string;
260
+ from?: string;
261
+ fromName?: string;
262
+ replyTo?: string;
263
+ emailConfigId?: string;
264
+ }
265
+ /**
266
+ * Send template email request DTO
267
+ */
268
+ interface ISendTemplateEmailDto {
269
+ templateId?: string;
270
+ templateSlug?: string;
271
+ to: string | string[];
272
+ cc?: string | string[];
273
+ bcc?: string | string[];
274
+ variables?: Record<string, any>;
275
+ from?: string;
276
+ fromName?: string;
277
+ replyTo?: string;
278
+ emailConfigId?: string;
279
+ }
280
+
281
+ /**
282
+ * Email Config API Service
283
+ * Handles email configuration CRUD operations
284
+ * Endpoint: POST /email/email-config/*
285
+ */
286
+ declare class EmailConfigApiService extends ApiResourceService<IUpdateEmailConfigDto, IEmailConfig> {
287
+ constructor();
288
+ /**
289
+ * Send test email to verify configuration
290
+ */
291
+ sendTest(configId: string, recipient: string): Observable<ISingleResponse<ITestSendResult>>;
292
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailConfigApiService, never>;
293
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EmailConfigApiService>;
294
+ }
295
+
296
+ /**
297
+ * Email Template API Service
298
+ * Handles email template CRUD operations
299
+ * Endpoint: POST /email/email-template/*
300
+ */
301
+ declare class EmailTemplateApiService extends ApiResourceService<IUpdateEmailTemplateDto, IEmailTemplate> {
302
+ constructor();
303
+ /**
304
+ * Get template by slug (POST-only RPC pattern)
305
+ */
306
+ getBySlug(slug: string): Observable<ISingleResponse<IEmailTemplate | null>>;
307
+ /**
308
+ * Create a new email template
309
+ * POST /email/email-template/insert
310
+ * Uses ICreateEmailTemplateDto which has different required fields than update
311
+ */
312
+ createTemplate(dto: ICreateEmailTemplateDto): Observable<ISingleResponse<IEmailTemplate>>;
313
+ /**
314
+ * Create a new email template (async/await version)
315
+ * POST /email/email-template/insert
316
+ */
317
+ createTemplateAsync(dto: ICreateEmailTemplateDto): Promise<ISingleResponse<IEmailTemplate>>;
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
+ * Endpoint: POST /email/send/*
326
+ *
327
+ * Note: For testing configurations, use EmailConfigApiService.sendTest()
328
+ */
329
+ declare class EmailSendService {
330
+ private readonly http;
331
+ private readonly baseUrl;
332
+ /**
333
+ * Send email directly (without template)
334
+ */
335
+ sendDirect(dto: ISendEmailDto): Observable<ISingleResponse<ITestSendResult>>;
336
+ /**
337
+ * Send email using template
338
+ */
339
+ sendTemplate(dto: ISendTemplateEmailDto): Observable<ISingleResponse<ITestSendResult>>;
340
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailSendService, never>;
341
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EmailSendService>;
342
+ }
343
+
344
+ /**
345
+ * Manages the email builder UI state including schema, selection, and UI toggles.
346
+ * Should be provided at the EmailBuilder component level (not root).
347
+ */
348
+ declare class EmailBuilderStateService {
349
+ private readonly _schema;
350
+ private readonly _isDirty;
351
+ private readonly _selectedSectionId;
352
+ private readonly _selectedBlockId;
353
+ private readonly _viewMode;
354
+ readonly schema: _angular_core.Signal<IEmailSchema>;
355
+ readonly isDirty: _angular_core.Signal<boolean>;
356
+ readonly selectedSectionId: _angular_core.Signal<string | null>;
357
+ readonly selectedBlockId: _angular_core.Signal<string | null>;
358
+ readonly viewMode: _angular_core.Signal<"html" | "visual">;
359
+ readonly sections: _angular_core.Signal<IEmailSection[]>;
360
+ readonly templateName: _angular_core.Signal<string>;
361
+ readonly subject: _angular_core.Signal<string>;
362
+ readonly settings: _angular_core.Signal<IEmailSettings>;
363
+ readonly variables: _angular_core.Signal<_flusys_ng_email.IEmailTemplateVariable[]>;
364
+ readonly headerSection: _angular_core.Signal<IEmailSection | null>;
365
+ readonly bodySection: _angular_core.Signal<IEmailSection | null>;
366
+ readonly footerSection: _angular_core.Signal<IEmailSection | null>;
367
+ readonly selectedSection: _angular_core.Signal<IEmailSection | null>;
368
+ readonly selectedBlock: _angular_core.Signal<IEmailBlock | null>;
369
+ readonly allBlocks: _angular_core.Signal<IEmailBlock[]>;
370
+ /**
371
+ * Load an existing schema into the builder
372
+ */
373
+ loadSchema(schema: IEmailSchema): void;
374
+ /**
375
+ * Create a new empty schema
376
+ */
377
+ createNewSchema(name?: string): void;
378
+ /**
379
+ * Update template metadata
380
+ */
381
+ updateSchemaMeta(updates: Partial<Pick<IEmailSchema, 'name' | 'subject' | 'preheader' | 'settings' | 'variables'>>): void;
382
+ /**
383
+ * Mark schema as saved (clears dirty flag)
384
+ */
385
+ markAsSaved(): void;
386
+ /**
387
+ * Set view mode (visual or html)
388
+ */
389
+ setViewMode(mode: 'visual' | 'html'): void;
390
+ /**
391
+ * Update section properties
392
+ */
393
+ updateSection(sectionId: string, updates: Partial<IEmailSection>): void;
394
+ /**
395
+ * Add a new block to a section
396
+ */
397
+ addBlock(sectionId: string, blockType: EmailBlockType, block?: Partial<IEmailBlock>): string | null;
398
+ /**
399
+ * Update block properties
400
+ */
401
+ updateBlock(sectionId: string, blockId: string, updates: Partial<IEmailBlock>): void;
402
+ /**
403
+ * Delete a block from a section
404
+ */
405
+ deleteBlock(sectionId: string, blockId: string): void;
406
+ /**
407
+ * Reorder blocks within a section
408
+ */
409
+ reorderBlocks(sectionId: string, fromIndex: number, toIndex: number): void;
410
+ /**
411
+ * Duplicate a block
412
+ */
413
+ duplicateBlock(sectionId: string, blockId: string): string | null;
414
+ /**
415
+ * Select a section
416
+ */
417
+ selectSection(sectionId: string | null): void;
418
+ /**
419
+ * Select a block
420
+ */
421
+ selectBlock(blockId: string | null): void;
422
+ /**
423
+ * Clear all selection
424
+ */
425
+ clearSelection(): void;
426
+ /**
427
+ * Get default content for a block type
428
+ */
429
+ private getDefaultContent;
430
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailBuilderStateService, never>;
431
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<EmailBuilderStateService>;
432
+ }
433
+
434
+ /**
435
+ * Email module routes
436
+ */
437
+ declare const EMAIL_ROUTES: Routes;
438
+
439
+ interface ITab {
440
+ id: string;
441
+ label: string;
442
+ icon: string;
443
+ route: string;
444
+ }
445
+ /**
446
+ * Email container component with tab navigation
447
+ */
448
+ declare class EmailContainerComponent {
449
+ readonly tabs: ITab[];
450
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EmailContainerComponent, never>;
451
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EmailContainerComponent, "lib-email-container", never, {}, {}, never, never, true, never>;
452
+ }
453
+
454
+ export { DEFAULT_EMAIL_SETTINGS, EMAIL_ROUTES, EmailBlockType, EmailBuilderStateService, EmailConfigApiService, EmailContainerComponent, EmailProviderEnum, EmailSendService, EmailTemplateApiService, createEmailSchema };
455
+ export type { IButtonBlockContent, ICreateEmailConfigDto, ICreateEmailTemplateDto, IDividerBlockContent, IEmailBlock, IEmailBlockStyle, IEmailConfig, IEmailSchema, IEmailSection, IEmailSectionStyle, IEmailSettings, IEmailTemplate, IEmailTemplateVariable, IHtmlBlockContent, IImageBlockContent, IMailgunConfig, ISendEmailDto, ISendGridConfig, ISendTemplateEmailDto, ISmtpConfig, ITestSendResult, ITextBlockContent, IUpdateEmailConfigDto, IUpdateEmailTemplateDto };