@acorex-platform/module-content-management-client 0.0.58 → 0.0.60
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/fesm2022/acorex-platform-module-content-management-client-contracts.mjs +6 -0
- package/fesm2022/acorex-platform-module-content-management-client-contracts.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-h5ING7pF.mjs → acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-B1Q4_HTa.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-h5ING7pF.mjs.map → acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-B1Q4_HTa.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-content-management-client.mjs +1 -1
- package/package.json +1 -1
- package/types/acorex-platform-module-content-management-client-contracts.d.ts +6 -0
|
@@ -627,6 +627,12 @@ const AXM_TEXT_TEMPLATE_IDS = {
|
|
|
627
627
|
entityChangeUserHistory: 'c7100012-0001-4111-b111-121212121212',
|
|
628
628
|
/** Daily AU/NZ field-mission weather briefing emailed to tenant admins. */
|
|
629
629
|
weatherDailyForecastDigest: 'c7100013-0001-4111-b111-131313131313',
|
|
630
|
+
/** Public tenant-creation request — confirmation to the requester. */
|
|
631
|
+
tenantRequestReceived: 'c7100014-0001-4111-b111-141414141414',
|
|
632
|
+
/** Public tenant-creation request — notify platform console admins. */
|
|
633
|
+
tenantRequestAdminNotify: 'c7100015-0001-4111-b111-151515151515',
|
|
634
|
+
/** Public tenant-creation request — approved; sent to the requester. */
|
|
635
|
+
tenantRequestApproved: 'c7100016-0001-4111-b111-161616161616',
|
|
630
636
|
};
|
|
631
637
|
//#endregion
|
|
632
638
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-content-management-client-contracts.mjs","sources":["../../../../libs/modules/content-management/contracts/src/menu.keys.ts","../../../../libs/modules/content-management/contracts/src/permission.keys.ts","../../../../libs/modules/content-management/contracts/src/root-config.ts","../../../../libs/modules/content-management/contracts/src/manifest.ts","../../../../libs/modules/content-management/contracts/src/entities/text-template/text-template-locale-format.util.ts","../../../../libs/modules/content-management/contracts/src/entities/text-template/text-template.types.ts","../../../../libs/modules/content-management/contracts/src/entities/text-template/text-template-placeholder.util.ts","../../../../libs/modules/content-management/contracts/src/entities/text-template/text-template-render.types.ts","../../../../libs/modules/content-management/contracts/src/entities/text-template/text-template.ids.ts","../../../../libs/modules/content-management/contracts/src/index.ts","../../../../libs/modules/content-management/contracts/src/acorex-platform-module-content-management-client-contracts.ts"],"sourcesContent":["export const AXPContentManagementMenuKeys = {\n Root: 'content-management:menu',\n HelpRoot: 'app:help',\n Promotions: 'content-management:menu:promotions',\n TextTemplates: 'content-management:menu:text-templates',\n Glossary: 'content-management:menu:glossary',\n HelpCenter: 'app:help:center',\n Tutorials: 'app:help:tutorials',\n About: 'app:about',\n} as const;\n\n","/**\n * Content & Documents capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPContentDocumentsPermissionKeys = {\n Access: 'ContentDocuments:Permission:Access',\n MaintainDocuments: 'ContentDocuments:Permission:MaintainDocuments',\n MaintainContent: 'ContentDocuments:Permission:MaintainContent',\n MaintainFormTemplates: 'ContentDocuments:Permission:MaintainFormTemplates',\n Setup: 'ContentDocuments:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPContentDocumentsPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMPermissionsKeys = {\n ContentManagement: {\n Management: AXPContentDocumentsPermissionKeys.MaintainContent,\n Promotion: {\n Management: AXPContentDocumentsPermissionKeys.MaintainContent,\n View: AXPContentDocumentsPermissionKeys.MaintainContent,\n Edit: AXPContentDocumentsPermissionKeys.MaintainContent,\n Delete: AXPContentDocumentsPermissionKeys.MaintainContent,\n Create: AXPContentDocumentsPermissionKeys.MaintainContent,\n },\n TextTemplate: {\n Management: AXPContentDocumentsPermissionKeys.MaintainContent,\n View: AXPContentDocumentsPermissionKeys.MaintainContent,\n Edit: AXPContentDocumentsPermissionKeys.MaintainContent,\n Delete: AXPContentDocumentsPermissionKeys.MaintainContent,\n Create: AXPContentDocumentsPermissionKeys.MaintainContent,\n },\n },\n} as const;\n","const config = {\n i18n: 'content-management',\n};\nexport const RootConfig = {\n config,\n module: {\n module: 'ContentManagement',\n name: 'ContentManagement',\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-file-invoice',\n },\n entities: {\n promotion: {\n name: 'Promotion',\n title: `@${config.i18n}:promotions.entities.promotion.title`,\n titlePlural: `@${config.i18n}:promotions.entities.promotion.plural`,\n icon: 'fa-light fa-megaphone',\n },\n glossary: {\n name: 'Glossary', \n title: `@${config.i18n}:glossaries.entities.glossary.title`,\n titlePlural: `@${config.i18n}:glossaries.entities.glossary.plural`,\n icon: 'fa-light fa-file',\n },\n textTemplate: {\n name: 'TextTemplate',\n title: `@${config.i18n}:templates.entities.text-template.title`,\n titlePlural: `@${config.i18n}:templates.entities.text-template.plural`,\n icon: 'fa-light fa-envelope',\n },\n },\n} as const;\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Content Management Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const ContentManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n\n type: 'domain',\n domain: 'content-documents',\n // Module dependencies (optional)\n};\n\n//#endregion\n\n","//#region ----- Types -----\n\nexport type AXMTextTemplateTokenFormatMeta = {\n dataType?: string;\n format?: string;\n};\n\n/** Calendar system for date tokens (`solar-hijri` = Jalali / Persian). */\nexport type AXMTextTemplateCalendarSystem = 'gregory' | 'solar-hijri';\n\nexport type AXMTextTemplateRegionalFormatContext = {\n locale: string;\n shortDate: string;\n shortTime: string;\n timeZone: string;\n /** When omitted, inferred from locale (`fa-*` → solar-hijri). */\n calendar?: AXMTextTemplateCalendarSystem | string;\n};\n\n//#endregion\n\n//#region ----- Locale defaults -----\n\n/**\n * Default short-date pattern when settings do not provide ShortDate.\n * Aligns with locale-management profiles (en-US / en-AU / en-NZ / fa-IR).\n */\nexport function defaultShortDatePatternForLocale(locale: string): string {\n const code = normalizeLocale(locale);\n if (code === 'en-us') {\n return 'MM/DD/YYYY';\n }\n if (code.startsWith('fa')) {\n return 'YYYY/MM/DD';\n }\n // en-AU, en-NZ, en-GB, and most other locales\n return 'DD/MM/YYYY';\n}\n\nexport function defaultShortTimePatternForLocale(_locale: string): string {\n return 'HH:mm';\n}\n\n/**\n * Resolves calendar: settings value, else `solar-hijri` for `fa-*`, else Gregorian.\n */\nexport function resolveTextTemplateCalendar(\n locale: string,\n calendarSetting?: string | null,\n): AXMTextTemplateCalendarSystem {\n const setting = (calendarSetting ?? '').trim().toLowerCase();\n if (\n setting === 'solar-hijri' ||\n setting === 'jalali' ||\n setting === 'persian' ||\n setting === 'hijri-shamsi'\n ) {\n return 'solar-hijri';\n }\n if (setting === 'gregory' || setting === 'gregorian') {\n return 'gregory';\n }\n return normalizeLocale(locale).startsWith('fa') ? 'solar-hijri' : 'gregory';\n}\n\n//#endregion\n\n//#region ----- Date / number formatting (Nest-safe) -----\n\n/**\n * Parses ISO / `YYYY-MM-DD` / Date-like merge values into a Date.\n * Date-only keys are treated as UTC midnight to avoid off-by-one shifts.\n */\nexport function parseTextTemplateDateValue(value: unknown): Date | null {\n if (value == null || value === '') {\n return null;\n }\n if (value instanceof Date) {\n return Number.isNaN(value.getTime()) ? null : value;\n }\n if (typeof value === 'number' && Number.isFinite(value)) {\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? null : date;\n }\n if (typeof value !== 'string') {\n return null;\n }\n const trimmed = value.trim();\n if (!trimmed) {\n return null;\n }\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(trimmed)) {\n const date = new Date(`${trimmed}T00:00:00.000Z`);\n return Number.isNaN(date.getTime()) ? null : date;\n }\n const date = new Date(trimmed);\n return Number.isNaN(date.getTime()) ? null : date;\n}\n\n/**\n * Formats a date with regional patterns (`DD/MM/YYYY`, `D MMMM YYYY`, `HH:mm`, …)\n * using the active locale for month names, digits, and calendar (Jalali for fa-IR).\n */\nexport function formatTextTemplateDate(\n value: unknown,\n pattern: string,\n timeZone = 'UTC',\n locale = 'en-US',\n calendar?: AXMTextTemplateCalendarSystem | string,\n): string {\n const date = parseTextTemplateDateValue(value);\n if (!date) {\n return value == null ? '' : String(value);\n }\n\n const resolvedLocale = locale?.trim() || 'en-US';\n const resolvedCalendar = resolveTextTemplateCalendar(resolvedLocale, calendar);\n const intlCalendar = resolvedCalendar === 'solar-hijri' ? 'persian' : 'gregory';\n const parts = getZonedCalendarParts(date, timeZone || 'UTC', resolvedLocale, intlCalendar);\n const monthLong = getLocalizedMonthName(date, resolvedLocale, intlCalendar, timeZone || 'UTC', 'long');\n const monthShort = getLocalizedMonthName(date, resolvedLocale, intlCalendar, timeZone || 'UTC', 'short');\n\n let out = pattern?.trim() || defaultShortDatePatternForLocale(resolvedLocale);\n // Longer tokens first.\n out = out.replace(/YYYY/g, formatLocaleInteger(parts.year, resolvedLocale, 4));\n out = out.replace(/MMMM/g, monthLong);\n out = out.replace(/MMM/g, monthShort);\n out = out.replace(/MM/g, formatLocaleInteger(parts.month, resolvedLocale, 2));\n out = out.replace(/\\bM\\b/g, formatLocaleInteger(parts.month, resolvedLocale, 0));\n out = out.replace(/DD/g, formatLocaleInteger(parts.day, resolvedLocale, 2));\n out = out.replace(/\\bD\\b/g, formatLocaleInteger(parts.day, resolvedLocale, 0));\n out = out.replace(/HH/g, formatLocaleInteger(parts.hour, resolvedLocale, 2));\n out = out.replace(/mm/g, formatLocaleInteger(parts.minute, resolvedLocale, 2));\n out = out.replace(/ss/g, formatLocaleInteger(parts.second, resolvedLocale, 2));\n return out;\n}\n\nexport function formatTextTemplateNumber(\n value: unknown,\n locale: string,\n options: { style?: 'decimal' | 'integer' | 'currency' | 'percent'; currency?: string } = {},\n): string {\n const num = coerceNumber(value);\n if (num == null) {\n return value == null ? '' : String(value);\n }\n const resolvedLocale = locale?.trim() || 'en-US';\n const style = options.style ?? 'decimal';\n try {\n if (style === 'integer') {\n return new Intl.NumberFormat(resolvedLocale, {\n maximumFractionDigits: 0,\n }).format(num);\n }\n if (style === 'percent') {\n return new Intl.NumberFormat(resolvedLocale, {\n style: 'percent',\n maximumFractionDigits: 2,\n }).format(num);\n }\n if (style === 'currency') {\n return new Intl.NumberFormat(resolvedLocale, {\n style: 'currency',\n currency: options.currency?.trim() || defaultCurrencyForLocale(resolvedLocale),\n }).format(num);\n }\n return new Intl.NumberFormat(resolvedLocale, {\n maximumFractionDigits: 6,\n }).format(num);\n } catch {\n return String(num);\n }\n}\n\n/**\n * Formats merge values using PlatformManagement.Token `dataType` / `format` metadata.\n * Unknown tokens and non-typed strings are left unchanged.\n */\nexport function formatTextTemplateMergeValues(\n merge: Record<string, string>,\n metaByName: Record<string, AXMTextTemplateTokenFormatMeta>,\n regional: AXMTextTemplateRegionalFormatContext,\n): Record<string, string> {\n const out: Record<string, string> = { ...merge };\n const locale = regional.locale?.trim() || 'en-US';\n const shortDate =\n regional.shortDate?.trim() || defaultShortDatePatternForLocale(locale);\n const shortTime =\n regional.shortTime?.trim() || defaultShortTimePatternForLocale(locale);\n const timeZone = regional.timeZone?.trim() || 'UTC';\n const calendar = resolveTextTemplateCalendar(locale, regional.calendar);\n\n for (const [name, raw] of Object.entries(merge)) {\n const meta = metaByName[name];\n if (!meta) {\n continue;\n }\n const dataType = (meta.dataType ?? 'String').trim();\n const format = (meta.format ?? 'None').trim();\n\n if (dataType === 'DateTime') {\n const pattern = `${shortDate} ${shortTime}`.trim();\n const dateOnly = looksLikeDateOnly(raw);\n out[name] = formatTextTemplateDate(\n raw,\n dateOnly ? shortDate : pattern,\n timeZone,\n locale,\n calendar,\n );\n continue;\n }\n\n if (dataType === 'Integer') {\n out[name] = formatTextTemplateNumber(raw, locale, { style: 'integer' });\n continue;\n }\n\n if (dataType === 'Decimal' || format === 'Currency' || format === 'Percent') {\n const style =\n format === 'Currency' ? 'currency' : format === 'Percent' ? 'percent' : 'decimal';\n out[name] = formatTextTemplateNumber(raw, locale, { style });\n }\n }\n\n return out;\n}\n\n//#endregion\n\n//#region ----- Helpers -----\n\nfunction normalizeLocale(locale: string): string {\n return (locale ?? 'en-US').trim().toLowerCase() || 'en-us';\n}\n\nfunction defaultCurrencyForLocale(locale: string): string {\n const code = normalizeLocale(locale);\n if (code === 'en-au') return 'AUD';\n if (code === 'en-nz') return 'NZD';\n if (code.startsWith('fa') || code === 'en-ir') return 'IRR';\n if (code === 'en-gb') return 'GBP';\n return 'USD';\n}\n\nfunction coerceNumber(value: unknown): number | null {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim()) {\n const num = Number(value.trim());\n return Number.isFinite(num) ? num : null;\n }\n return null;\n}\n\nfunction looksLikeDateOnly(value: string): boolean {\n const trimmed = value.trim();\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(trimmed)) {\n return true;\n }\n return /^\\d{4}-\\d{2}-\\d{2}T00:00:00(?:\\.0+)?Z$/i.test(trimmed);\n}\n\nfunction formatLocaleInteger(value: number, locale: string, minDigits: number): string {\n const abs = Math.trunc(Math.abs(value));\n const padded = minDigits > 0 ? String(abs).padStart(minDigits, '0') : String(abs);\n try {\n // Format digit-by-digit so padding zeros stay and locale digits apply (fa-IR → ۰۱۲…).\n return padded\n .split('')\n .map((ch) => new Intl.NumberFormat(locale, { useGrouping: false }).format(Number(ch)))\n .join('');\n } catch {\n return padded;\n }\n}\n\nfunction getLocalizedMonthName(\n date: Date,\n locale: string,\n calendar: 'persian' | 'gregory',\n timeZone: string,\n width: 'long' | 'short',\n): string {\n try {\n return new Intl.DateTimeFormat(locale, {\n timeZone,\n calendar,\n month: width,\n }).format(date);\n } catch {\n try {\n return new Intl.DateTimeFormat('en-US', {\n timeZone,\n calendar: 'gregory',\n month: width,\n }).format(date);\n } catch {\n return String(date.getUTCMonth() + 1);\n }\n }\n}\n\nfunction getZonedCalendarParts(\n date: Date,\n timeZone: string,\n locale: string,\n calendar: 'persian' | 'gregory',\n): { year: number; month: number; day: number; hour: number; minute: number; second: number } {\n try {\n const formatter = new Intl.DateTimeFormat(locale, {\n timeZone: timeZone || 'UTC',\n calendar,\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n // Keep part extraction numeric-stable; display digits are localized later.\n numberingSystem: 'latn',\n });\n const parts = formatter.formatToParts(date);\n const read = (type: Intl.DateTimeFormatPartTypes): number => {\n const value = parts.find((part) => part.type === type)?.value;\n return value ? Number(value) : 0;\n };\n let hour = read('hour');\n // Some engines emit 24:00 for midnight.\n if (hour === 24) {\n hour = 0;\n }\n return {\n year: read('year'),\n month: read('month'),\n day: read('day'),\n hour,\n minute: read('minute'),\n second: read('second'),\n };\n } catch {\n return {\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n hour: date.getUTCHours(),\n minute: date.getUTCMinutes(),\n second: date.getUTCSeconds(),\n };\n }\n}\n\n//#endregion\n","import { AXPCategoryListItem, AXPMultiLanguageString, type AXPPlatformScopeKey } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#region ----- Types -----\n\n/** Stored value: { email: { subject?, body }, sms: { body }, ... } */\nexport interface AXMTextTemplateChannelsValue {\n [channelName: string]: {\n subject?: AXPMultiLanguageString;\n body: AXPMultiLanguageString;\n };\n}\n\nexport type AXMTextTemplateChannelEditorType = 'plain' | 'rich';\n\nexport interface AXMTextTemplateChannelConfigureSettings {\n /** Settings definition section name (e.g. `smtp-settings`). */\n section: string;\n /** Optional parent group when section names are not unique. */\n group?: string;\n scope: AXPPlatformScopeKey;\n}\n\nexport interface AXMTextTemplateChannelDefinition {\n name: string;\n title: string;\n type: AXMTextTemplateChannelEditorType;\n hasSubject?: boolean;\n communicationChannelKey?: string;\n requiredSettingKeys?: string[];\n configureSettings?: AXMTextTemplateChannelConfigureSettings;\n notConfiguredMessageKey?: string;\n}\n\nexport interface AXMTextTemplateChannelDefinitionProvider {\n getChannels(): AXMTextTemplateChannelDefinition[];\n}\n\n/** Template kind: content (leaf message) or master (layout shell with `[content]`). */\nexport const AXM_TEXT_TEMPLATE_KIND = {\n Content: 'content',\n Master: 'master',\n} as const;\n\nexport type AXMTextTemplateKind = (typeof AXM_TEXT_TEMPLATE_KIND)[keyof typeof AXM_TEXT_TEMPLATE_KIND];\n\n/** Print / PDF channel key on `channels` (rich body, no subject). */\nexport const AXM_TEXT_TEMPLATE_PRINT_CHANNEL = 'print' as const;\n\n/** Reserved body slot for child template body injection (not a `{{token}}` variable). */\nexport const AXM_TEXT_TEMPLATE_CONTENT_SLOT = '[content]' as const;\n\n/** Max `parentId` chain length (leaf → … → root), including the leaf. */\nexport const AXM_TEXT_TEMPLATE_MAX_PARENT_DEPTH = 5;\n\nexport interface AXMTextTemplateEntityModel extends AXPEntityModel<string> {\n title?: AXPMultiLanguageString;\n /** `content` (default) or `master` layout template. */\n kind?: AXMTextTemplateKind;\n /** Optional parent master template id (multi-level nesting supported). */\n parentId?: string | null;\n /** Join snapshot for `parentId` lookup. */\n parent?: { id?: string; title?: AXPMultiLanguageString | string } | null;\n channels?: AXMTextTemplateChannelsValue;\n categoryIds?: string[];\n categories?: AXPCategoryListItem[];\n}\n\n//#endregion\n","import type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { resolveMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport {\n collectPathRootsFromSource,\n createTextTemplateEngine,\n} from '@acorex-platform/framework-shared/text-template';\nimport {\n defaultShortDatePatternForLocale,\n defaultShortTimePatternForLocale,\n resolveTextTemplateCalendar,\n} from './text-template-locale-format.util';\nimport {\n AXM_TEXT_TEMPLATE_CONTENT_SLOT,\n AXM_TEXT_TEMPLATE_KIND,\n AXM_TEXT_TEMPLATE_MAX_PARENT_DEPTH,\n type AXMTextTemplateChannelsValue,\n type AXMTextTemplateKind,\n} from './text-template.types';\n\n//#region ----- Placeholder replacement -----\n\nconst previewEngine = createTextTemplateEngine();\n\n/**\n * Collects unique root paths from template source (`{{ employee.name }}`, `{{#table users as user}}`).\n */\nexport function collectTextTemplatePlaceholderNames(text: string): string[] {\n return collectPathRootsFromSource(text ?? '');\n}\n\nfunction previewContext(data: Record<string, unknown>, slotContent = '') {\n const locale = 'en-US';\n return {\n channel: 'email',\n locale,\n data,\n regional: {\n locale,\n shortDate: defaultShortDatePatternForLocale(locale),\n shortTime: defaultShortTimePatternForLocale(locale),\n timeZone: 'UTC',\n calendar: resolveTextTemplateCalendar(locale),\n },\n tokenMeta: {},\n slotContent,\n };\n}\n\n/**\n * Interpolates `{{ path | pipe }}` using typed `data` (and optional `[content]`).\n * Does not parse block tags (`{{#table}}`, …) — use {@link renderTextTemplateSource} for bodies.\n */\nexport function replaceTextTemplatePlaceholders(\n text: string,\n data: Record<string, unknown> = {},\n): string {\n return previewEngine.interpolate(text ?? '', previewContext(data));\n}\n\n/**\n * Parses source to blocks and renders for the email channel (local preview / compose fallback).\n */\nexport function renderTextTemplateSource(\n source: string,\n data: Record<string, unknown> = {},\n slotContent = '',\n): string {\n return previewEngine.render(source ?? '', previewContext(data, slotContent));\n}\n\n/**\n * Resolves a template channel field (plain string or per-locale map) for the active locale.\n */\nexport function resolveTextTemplateLocalizedString(\n value: AXPMultiLanguageString | string | undefined | null,\n locale: string,\n): string {\n if (value == null || value === '') {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n return resolveMultiLanguageString(value, locale);\n}\n\n/**\n * Returns true when `text` contains the reserved `[content]` slot.\n */\nexport function textTemplateContainsContentSlot(text: string | null | undefined): boolean {\n if (text == null || text === '') {\n return false;\n }\n return text.includes(AXM_TEXT_TEMPLATE_CONTENT_SLOT);\n}\n\n/**\n * Injects child body into every `[content]` occurrence in a master body.\n */\nexport function replaceTextTemplateContentSlot(masterBody: string, content: string): string {\n if (!masterBody.includes(AXM_TEXT_TEMPLATE_CONTENT_SLOT)) {\n return masterBody;\n }\n return masterBody.split(AXM_TEXT_TEMPLATE_CONTENT_SLOT).join(content);\n}\n\n/**\n * Composes a body chain: leaf first, then parents toward root.\n * Injects `[content]` only — callers interpolate or {@link renderTextTemplateSource} afterward.\n */\nexport function composeTextTemplateBodyChain(bodiesLeafToRoot: string[]): string {\n if (!bodiesLeafToRoot.length) {\n return '';\n }\n let body = bodiesLeafToRoot[0] ?? '';\n for (let i = 1; i < bodiesLeafToRoot.length; i++) {\n body = replaceTextTemplateContentSlot(bodiesLeafToRoot[i] ?? '', body);\n }\n return body;\n}\n\n//#endregion\n\n//#region ----- Validation helpers -----\n\nfunction collectLocalizedBodyStrings(body: AXPMultiLanguageString | string | undefined | null): string[] {\n if (body == null || body === '') {\n return [];\n }\n if (typeof body === 'string') {\n return body.trim() ? [body] : [];\n }\n return Object.values(body).filter((v): v is string => typeof v === 'string' && v.trim().length > 0);\n}\n\n/**\n * Master templates: every non-empty channel body locale must include `[content]`.\n * Content templates: no channel body may include `[content]`.\n */\nexport function validateTextTemplateContentSlots(input: {\n kind: AXMTextTemplateKind | string | undefined | null;\n channels: AXMTextTemplateChannelsValue | undefined | null;\n}): { ok: true } | { ok: false; error: string } {\n const kind = (input.kind ?? AXM_TEXT_TEMPLATE_KIND.Content) as string;\n const channels = input.channels ?? {};\n const channelEntries = Object.entries(channels);\n\n if (kind === AXM_TEXT_TEMPLATE_KIND.Master) {\n if (!channelEntries.length) {\n return { ok: false, error: 'Master templates must define at least one channel with a [content] slot.' };\n }\n for (const [channelName, channel] of channelEntries) {\n const bodies = collectLocalizedBodyStrings(channel?.body);\n if (!bodies.length) {\n return {\n ok: false,\n error: `Master template channel \"${channelName}\" must include a body with the [content] slot.`,\n };\n }\n for (const body of bodies) {\n if (!textTemplateContainsContentSlot(body)) {\n return {\n ok: false,\n error: `Master template channel \"${channelName}\" body must include the [content] slot.`,\n };\n }\n }\n }\n return { ok: true };\n }\n\n for (const [channelName, channel] of channelEntries) {\n for (const body of collectLocalizedBodyStrings(channel?.body)) {\n if (textTemplateContainsContentSlot(body)) {\n return {\n ok: false,\n error: `Content template channel \"${channelName}\" must not include the reserved [content] slot.`,\n };\n }\n }\n }\n return { ok: true };\n}\n\nexport interface AXMTextTemplateParentChainNode {\n id: string;\n kind?: string | null;\n parentId?: string | null;\n}\n\n/**\n * Validates parent reference and walks the parent chain for kind, cycles, and max depth.\n * `loadParent` should return the next parent row (or null when missing).\n */\nexport async function validateTextTemplateParentChain(input: {\n id?: string | null;\n parentId?: string | null;\n maxDepth?: number;\n loadParent: (id: string) => Promise<AXMTextTemplateParentChainNode | null>;\n}): Promise<{ ok: true } | { ok: false; error: string }> {\n const parentId = input.parentId?.trim() || null;\n if (!parentId) {\n return { ok: true };\n }\n\n const selfId = input.id?.trim() || null;\n if (selfId && parentId === selfId) {\n return { ok: false, error: 'A text template cannot be its own parent.' };\n }\n\n const maxDepth = input.maxDepth ?? AXM_TEXT_TEMPLATE_MAX_PARENT_DEPTH;\n const visited = new Set<string>();\n if (selfId) {\n visited.add(selfId);\n }\n\n let currentId: string | null = parentId;\n let depth = 1;\n\n while (currentId) {\n if (visited.has(currentId)) {\n return { ok: false, error: 'Text template parent chain contains a cycle.' };\n }\n if (depth > maxDepth) {\n return {\n ok: false,\n error: `Text template parent chain exceeds the maximum depth of ${maxDepth}.`,\n };\n }\n\n visited.add(currentId);\n const parent = await input.loadParent(currentId);\n if (!parent) {\n return { ok: false, error: `Parent text template not found (id: ${currentId}).` };\n }\n if ((parent.kind ?? AXM_TEXT_TEMPLATE_KIND.Content) !== AXM_TEXT_TEMPLATE_KIND.Master) {\n return { ok: false, error: 'Parent text template must be a master template.' };\n }\n\n currentId = parent.parentId?.trim() || null;\n depth += 1;\n }\n\n return { ok: true };\n}\n\n//#endregion\n","import type { AXMTextTemplateChannelsValue } from './text-template.types';\n\n//#region ----- Text template render contracts -----\n\n/** Server + client command key for rendering a text template channel. */\nexport const AXM_TEXT_TEMPLATE_RENDER_COMMAND_KEY = 'ContentManagement:TextTemplate:Render' as const;\n\n/**\n * Request to render a persisted text template channel with typed domain/event data.\n * Walks optional `parentId` masters and injects child body into `[content]`.\n */\nexport interface AXMTextTemplateRenderRequest {\n textTemplateId: string;\n /**\n * When set, `textTemplateId` may be a canonical seed id; the render engine\n * remaps it with tenantMasterId(`content`, tenantId, id) for the tenant copy.\n * Also used for settings cascade (tenant Language / ShortDate / …).\n */\n tenantId?: string;\n /**\n * Optional recipient / actor user id. When set, User Language and regional\n * patterns are preferred over tenant/platform settings.\n */\n userId?: string;\n /** Channel key on `channels`, e.g. `email`, `sms`. Defaults to `email`. */\n channel?: string;\n /**\n * Explicit locale override for MLS subject/body and number formatting.\n * When omitted, resolved from settings: User Language → Tenant Language →\n * Platform Language → `en-US`.\n */\n locale?: string;\n /**\n * Event tokens and domain graphs (`users`, `workOrders`, …).\n * Context/Computed tokens (`companyName`, …) are filled from PlatformManagement.Tokens.\n */\n data?: Record<string, unknown>;\n}\n\n/**\n * Rendered subject/body for one channel after engine render and parent composition.\n */\nexport interface AXMTextTemplateRenderResult {\n textTemplateId: string;\n channel: string;\n subject?: string;\n body: string;\n}\n\n//#endregion\n\n//#region ----- Text template draft preview contracts -----\n\n/** Server command key for previewing unsaved draft text template content. */\nexport const AXM_TEXT_TEMPLATE_PREVIEW_COMMAND_KEY = 'ContentManagement:TextTemplate:Preview' as const;\n\n/**\n * Request to preview draft channel content with optional parent masters.\n * Uses the same composition / Context token fill as render, then fills Event samples.\n */\nexport interface AXMTextTemplatePreviewRequest {\n /** Draft channel map from the editor (not persisted). */\n channels: AXMTextTemplateChannelsValue;\n /** Optional persisted master parent id to walk for `[content]` shells. */\n parentId?: string | null;\n /** Template kind from the host form (`content` | `master`). Informational. */\n kind?: string;\n /** Channel key on `channels`, e.g. `email`, `sms`. Defaults to `email`. */\n channel?: string;\n /**\n * Locale for MLS fields and number formatting. Defaults to active UI language on the client,\n * or `en-US` when omitted on the server.\n */\n locale?: string;\n /** Optional data overrides (applied before Context resolve and Event samples). */\n data?: Record<string, unknown>;\n}\n\n/**\n * Preview subject/body for one channel after engine render and parent composition.\n */\nexport interface AXMTextTemplatePreviewResult {\n channel: string;\n subject?: string;\n body: string;\n}\n\n//#endregion\n","//#region ----- Seeded text template ids -----\n\n/**\n * Namespace for {@link tenantMasterId} when cloning text templates per tenant\n * (`packs` SetupTenant → `content-management.common-setup`).\n */\nexport const AXM_TEXT_TEMPLATE_TENANT_MASTER_NAMESPACE = 'content' as const;\n\n/**\n * Canonical ContentManagement.TextTemplate ids used as SetupTenant clone keys\n * and runtime lookups (resolve via tenantMasterId + tenantId).\n * Keep aligned with packs `text-template.mock.ids.ts`.\n *\n * Prefix `c71000` — same as `mockStableUuid('c71000', seq)`.\n */\nexport const AXM_TEXT_TEMPLATE_IDS = {\n emailCompanyMaster: 'c7100001-0001-4111-b111-010101010101',\n passwordReset: 'c7100002-0001-4111-b111-020202020202',\n emailVerification: 'c7100003-0001-4111-b111-030303030303',\n passwordChanged: 'c7100004-0001-4111-b111-040404040404',\n ticketReceived: 'c7100005-0001-4111-b111-050505050505',\n ticketResolved: 'c7100006-0001-4111-b111-060606060606',\n employeeHappyBirthday: 'c7100007-0001-4111-b111-070707070707',\n employeeJoiningCompany: 'c7100008-0001-4111-b111-080808080808',\n /** Combined document expiration digest (expired + near) — daily notifier (email + in-app). */\n documentExpired: 'c7100009-0001-4111-b111-090909090909',\n /** Legacy near-expiry template id; same digest body as documentExpired. */\n documentNearExpiry: 'c710000a-0001-4111-b111-0a0a0a0a0a0a',\n /** Company print master — header, border, footer around `[content]`. */\n printCompanyMaster: 'c710000b-0001-4111-b111-0b0b0b0b0b0b',\n /** Default questionnaire print child (title, date, `{{sessionBody}}`). */\n questionnairePrint: 'c710000c-0001-4111-b111-0c0c0c0c0c0c',\n /** Daily list of employees with a birthday today — emailed to account holders. */\n employeeBirthdayDigest: 'c710000d-0001-4111-b111-0d0d0d0d0d0d',\n /** Daily list of employees whose hire date is today — emailed to account holders. */\n employeeJoiningDigest: 'c710000e-0001-4111-b111-0e0e0e0e0e0e',\n /** List of tenants with no login in the last 30 days. */\n tenantLoginDigest: 'c710000f-0001-4111-b111-0f0f0f0f0f0f',\n /** Tenant admin invites a user by email (accept link). */\n userInvitation: 'c7100010-0001-4111-b111-101010101010',\n /** Staff History digest — Employee + Person profile changes (email). */\n entityChangeStaffHistory: 'c7100011-0001-4111-b111-111111111111',\n /** User History digest — User account profile changes (email). */\n entityChangeUserHistory: 'c7100012-0001-4111-b111-121212121212',\n /** Daily AU/NZ field-mission weather briefing emailed to tenant admins. */\n weatherDailyForecastDigest: 'c7100013-0001-4111-b111-131313131313',\n} as const;\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './menu.keys';\nexport * from './permission.keys';\n\nexport * from './root-config';\nexport * from './manifest';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAO,MAAM,4BAA4B,GAAG;AAC1C,IAAA,IAAI,EAAE,yBAAyB;AAC/B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,UAAU,EAAE,oCAAoC;AAChD,IAAA,aAAa,EAAE,wCAAwC;AACvD,IAAA,QAAQ,EAAE,kCAAkC;AAC5C,IAAA,UAAU,EAAE,iBAAiB;AAC7B,IAAA,SAAS,EAAE,oBAAoB;AAC/B,IAAA,KAAK,EAAE,WAAW;;;ACRpB;;;AAGG;AACI,MAAM,iCAAiC,GAAG;AAC/C,IAAA,MAAM,EAAE,oCAAoC;AAC5C,IAAA,iBAAiB,EAAE,+CAA+C;AAClE,IAAA,eAAe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sC;;AAE1D,IAAA,kBAAkB,EAAE,sCAAsC;;AAE1D,IAAA,sBAAsB,EAAE,sCAAsC;;AAE9D,IAAA,qBAAqB,EAAE,sCAAsC;;AAE7D,IAAA,iBAAiB,EAAE,sCAAsC;;AAEzD,IAAA,cAAc,EAAE,sCAAsC;;AAEtD,IAAA,wBAAwB,EAAE,sCAAsC;;AAEhE,IAAA,uBAAuB,EAAE,sCAAsC;;AAE/D,IAAA,0BAA0B,EAAE,sCAAsC;;AAGpE;;AChDA;;ACAA;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-content-management-client-contracts.mjs","sources":["../../../../libs/modules/content-management/contracts/src/menu.keys.ts","../../../../libs/modules/content-management/contracts/src/permission.keys.ts","../../../../libs/modules/content-management/contracts/src/root-config.ts","../../../../libs/modules/content-management/contracts/src/manifest.ts","../../../../libs/modules/content-management/contracts/src/entities/text-template/text-template-locale-format.util.ts","../../../../libs/modules/content-management/contracts/src/entities/text-template/text-template.types.ts","../../../../libs/modules/content-management/contracts/src/entities/text-template/text-template-placeholder.util.ts","../../../../libs/modules/content-management/contracts/src/entities/text-template/text-template-render.types.ts","../../../../libs/modules/content-management/contracts/src/entities/text-template/text-template.ids.ts","../../../../libs/modules/content-management/contracts/src/index.ts","../../../../libs/modules/content-management/contracts/src/acorex-platform-module-content-management-client-contracts.ts"],"sourcesContent":["export const AXPContentManagementMenuKeys = {\n Root: 'content-management:menu',\n HelpRoot: 'app:help',\n Promotions: 'content-management:menu:promotions',\n TextTemplates: 'content-management:menu:text-templates',\n Glossary: 'content-management:menu:glossary',\n HelpCenter: 'app:help:center',\n Tutorials: 'app:help:tutorials',\n About: 'app:about',\n} as const;\n\n","/**\n * Content & Documents capabilities used by this module.\n * Domain capability keys for this module. Root groups live in `AXPCommonPermissionGroupKeys` (common contracts).\n */\nexport const AXPContentDocumentsPermissionKeys = {\n Access: 'ContentDocuments:Permission:Access',\n MaintainDocuments: 'ContentDocuments:Permission:MaintainDocuments',\n MaintainContent: 'ContentDocuments:Permission:MaintainContent',\n MaintainFormTemplates: 'ContentDocuments:Permission:MaintainFormTemplates',\n Setup: 'ContentDocuments:Permission:Setup',\n} as const;\n\n/**\n * @deprecated Prefer {@link AXPContentDocumentsPermissionKeys}.\n * Legacy nested shape kept so existing imports compile during migration.\n */\nexport const AXMPermissionsKeys = {\n ContentManagement: {\n Management: AXPContentDocumentsPermissionKeys.MaintainContent,\n Promotion: {\n Management: AXPContentDocumentsPermissionKeys.MaintainContent,\n View: AXPContentDocumentsPermissionKeys.MaintainContent,\n Edit: AXPContentDocumentsPermissionKeys.MaintainContent,\n Delete: AXPContentDocumentsPermissionKeys.MaintainContent,\n Create: AXPContentDocumentsPermissionKeys.MaintainContent,\n },\n TextTemplate: {\n Management: AXPContentDocumentsPermissionKeys.MaintainContent,\n View: AXPContentDocumentsPermissionKeys.MaintainContent,\n Edit: AXPContentDocumentsPermissionKeys.MaintainContent,\n Delete: AXPContentDocumentsPermissionKeys.MaintainContent,\n Create: AXPContentDocumentsPermissionKeys.MaintainContent,\n },\n },\n} as const;\n","const config = {\n i18n: 'content-management',\n};\nexport const RootConfig = {\n config,\n module: {\n module: 'ContentManagement',\n name: 'ContentManagement',\n title: `@${config.i18n}:module.title`,\n icon: 'fa-light fa-file-invoice',\n },\n entities: {\n promotion: {\n name: 'Promotion',\n title: `@${config.i18n}:promotions.entities.promotion.title`,\n titlePlural: `@${config.i18n}:promotions.entities.promotion.plural`,\n icon: 'fa-light fa-megaphone',\n },\n glossary: {\n name: 'Glossary', \n title: `@${config.i18n}:glossaries.entities.glossary.title`,\n titlePlural: `@${config.i18n}:glossaries.entities.glossary.plural`,\n icon: 'fa-light fa-file',\n },\n textTemplate: {\n name: 'TextTemplate',\n title: `@${config.i18n}:templates.entities.text-template.title`,\n titlePlural: `@${config.i18n}:templates.entities.text-template.plural`,\n icon: 'fa-light fa-envelope',\n },\n },\n} as const;\n","//#region ---- Imports ----\n\nimport { AXPModuleManifest } from '@acorex-platform/framework-shared/core';\nimport { RootConfig } from './root-config';\n\n//#endregion\n\n//#region ---- Manifest Definition ----\n\n/**\n * Content Management Module Manifest.\n * Defines module metadata, features, and provider references.\n */\nexport const ContentManagementManifest: AXPModuleManifest = {\n name: RootConfig.module.name,\n version: '1.0.0',\n title: RootConfig.module.title,\n icon: RootConfig.module.icon,\n i18n: RootConfig.config.i18n,\n\n type: 'domain',\n domain: 'content-documents',\n // Module dependencies (optional)\n};\n\n//#endregion\n\n","//#region ----- Types -----\n\nexport type AXMTextTemplateTokenFormatMeta = {\n dataType?: string;\n format?: string;\n};\n\n/** Calendar system for date tokens (`solar-hijri` = Jalali / Persian). */\nexport type AXMTextTemplateCalendarSystem = 'gregory' | 'solar-hijri';\n\nexport type AXMTextTemplateRegionalFormatContext = {\n locale: string;\n shortDate: string;\n shortTime: string;\n timeZone: string;\n /** When omitted, inferred from locale (`fa-*` → solar-hijri). */\n calendar?: AXMTextTemplateCalendarSystem | string;\n};\n\n//#endregion\n\n//#region ----- Locale defaults -----\n\n/**\n * Default short-date pattern when settings do not provide ShortDate.\n * Aligns with locale-management profiles (en-US / en-AU / en-NZ / fa-IR).\n */\nexport function defaultShortDatePatternForLocale(locale: string): string {\n const code = normalizeLocale(locale);\n if (code === 'en-us') {\n return 'MM/DD/YYYY';\n }\n if (code.startsWith('fa')) {\n return 'YYYY/MM/DD';\n }\n // en-AU, en-NZ, en-GB, and most other locales\n return 'DD/MM/YYYY';\n}\n\nexport function defaultShortTimePatternForLocale(_locale: string): string {\n return 'HH:mm';\n}\n\n/**\n * Resolves calendar: settings value, else `solar-hijri` for `fa-*`, else Gregorian.\n */\nexport function resolveTextTemplateCalendar(\n locale: string,\n calendarSetting?: string | null,\n): AXMTextTemplateCalendarSystem {\n const setting = (calendarSetting ?? '').trim().toLowerCase();\n if (\n setting === 'solar-hijri' ||\n setting === 'jalali' ||\n setting === 'persian' ||\n setting === 'hijri-shamsi'\n ) {\n return 'solar-hijri';\n }\n if (setting === 'gregory' || setting === 'gregorian') {\n return 'gregory';\n }\n return normalizeLocale(locale).startsWith('fa') ? 'solar-hijri' : 'gregory';\n}\n\n//#endregion\n\n//#region ----- Date / number formatting (Nest-safe) -----\n\n/**\n * Parses ISO / `YYYY-MM-DD` / Date-like merge values into a Date.\n * Date-only keys are treated as UTC midnight to avoid off-by-one shifts.\n */\nexport function parseTextTemplateDateValue(value: unknown): Date | null {\n if (value == null || value === '') {\n return null;\n }\n if (value instanceof Date) {\n return Number.isNaN(value.getTime()) ? null : value;\n }\n if (typeof value === 'number' && Number.isFinite(value)) {\n const date = new Date(value);\n return Number.isNaN(date.getTime()) ? null : date;\n }\n if (typeof value !== 'string') {\n return null;\n }\n const trimmed = value.trim();\n if (!trimmed) {\n return null;\n }\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(trimmed)) {\n const date = new Date(`${trimmed}T00:00:00.000Z`);\n return Number.isNaN(date.getTime()) ? null : date;\n }\n const date = new Date(trimmed);\n return Number.isNaN(date.getTime()) ? null : date;\n}\n\n/**\n * Formats a date with regional patterns (`DD/MM/YYYY`, `D MMMM YYYY`, `HH:mm`, …)\n * using the active locale for month names, digits, and calendar (Jalali for fa-IR).\n */\nexport function formatTextTemplateDate(\n value: unknown,\n pattern: string,\n timeZone = 'UTC',\n locale = 'en-US',\n calendar?: AXMTextTemplateCalendarSystem | string,\n): string {\n const date = parseTextTemplateDateValue(value);\n if (!date) {\n return value == null ? '' : String(value);\n }\n\n const resolvedLocale = locale?.trim() || 'en-US';\n const resolvedCalendar = resolveTextTemplateCalendar(resolvedLocale, calendar);\n const intlCalendar = resolvedCalendar === 'solar-hijri' ? 'persian' : 'gregory';\n const parts = getZonedCalendarParts(date, timeZone || 'UTC', resolvedLocale, intlCalendar);\n const monthLong = getLocalizedMonthName(date, resolvedLocale, intlCalendar, timeZone || 'UTC', 'long');\n const monthShort = getLocalizedMonthName(date, resolvedLocale, intlCalendar, timeZone || 'UTC', 'short');\n\n let out = pattern?.trim() || defaultShortDatePatternForLocale(resolvedLocale);\n // Longer tokens first.\n out = out.replace(/YYYY/g, formatLocaleInteger(parts.year, resolvedLocale, 4));\n out = out.replace(/MMMM/g, monthLong);\n out = out.replace(/MMM/g, monthShort);\n out = out.replace(/MM/g, formatLocaleInteger(parts.month, resolvedLocale, 2));\n out = out.replace(/\\bM\\b/g, formatLocaleInteger(parts.month, resolvedLocale, 0));\n out = out.replace(/DD/g, formatLocaleInteger(parts.day, resolvedLocale, 2));\n out = out.replace(/\\bD\\b/g, formatLocaleInteger(parts.day, resolvedLocale, 0));\n out = out.replace(/HH/g, formatLocaleInteger(parts.hour, resolvedLocale, 2));\n out = out.replace(/mm/g, formatLocaleInteger(parts.minute, resolvedLocale, 2));\n out = out.replace(/ss/g, formatLocaleInteger(parts.second, resolvedLocale, 2));\n return out;\n}\n\nexport function formatTextTemplateNumber(\n value: unknown,\n locale: string,\n options: { style?: 'decimal' | 'integer' | 'currency' | 'percent'; currency?: string } = {},\n): string {\n const num = coerceNumber(value);\n if (num == null) {\n return value == null ? '' : String(value);\n }\n const resolvedLocale = locale?.trim() || 'en-US';\n const style = options.style ?? 'decimal';\n try {\n if (style === 'integer') {\n return new Intl.NumberFormat(resolvedLocale, {\n maximumFractionDigits: 0,\n }).format(num);\n }\n if (style === 'percent') {\n return new Intl.NumberFormat(resolvedLocale, {\n style: 'percent',\n maximumFractionDigits: 2,\n }).format(num);\n }\n if (style === 'currency') {\n return new Intl.NumberFormat(resolvedLocale, {\n style: 'currency',\n currency: options.currency?.trim() || defaultCurrencyForLocale(resolvedLocale),\n }).format(num);\n }\n return new Intl.NumberFormat(resolvedLocale, {\n maximumFractionDigits: 6,\n }).format(num);\n } catch {\n return String(num);\n }\n}\n\n/**\n * Formats merge values using PlatformManagement.Token `dataType` / `format` metadata.\n * Unknown tokens and non-typed strings are left unchanged.\n */\nexport function formatTextTemplateMergeValues(\n merge: Record<string, string>,\n metaByName: Record<string, AXMTextTemplateTokenFormatMeta>,\n regional: AXMTextTemplateRegionalFormatContext,\n): Record<string, string> {\n const out: Record<string, string> = { ...merge };\n const locale = regional.locale?.trim() || 'en-US';\n const shortDate =\n regional.shortDate?.trim() || defaultShortDatePatternForLocale(locale);\n const shortTime =\n regional.shortTime?.trim() || defaultShortTimePatternForLocale(locale);\n const timeZone = regional.timeZone?.trim() || 'UTC';\n const calendar = resolveTextTemplateCalendar(locale, regional.calendar);\n\n for (const [name, raw] of Object.entries(merge)) {\n const meta = metaByName[name];\n if (!meta) {\n continue;\n }\n const dataType = (meta.dataType ?? 'String').trim();\n const format = (meta.format ?? 'None').trim();\n\n if (dataType === 'DateTime') {\n const pattern = `${shortDate} ${shortTime}`.trim();\n const dateOnly = looksLikeDateOnly(raw);\n out[name] = formatTextTemplateDate(\n raw,\n dateOnly ? shortDate : pattern,\n timeZone,\n locale,\n calendar,\n );\n continue;\n }\n\n if (dataType === 'Integer') {\n out[name] = formatTextTemplateNumber(raw, locale, { style: 'integer' });\n continue;\n }\n\n if (dataType === 'Decimal' || format === 'Currency' || format === 'Percent') {\n const style =\n format === 'Currency' ? 'currency' : format === 'Percent' ? 'percent' : 'decimal';\n out[name] = formatTextTemplateNumber(raw, locale, { style });\n }\n }\n\n return out;\n}\n\n//#endregion\n\n//#region ----- Helpers -----\n\nfunction normalizeLocale(locale: string): string {\n return (locale ?? 'en-US').trim().toLowerCase() || 'en-us';\n}\n\nfunction defaultCurrencyForLocale(locale: string): string {\n const code = normalizeLocale(locale);\n if (code === 'en-au') return 'AUD';\n if (code === 'en-nz') return 'NZD';\n if (code.startsWith('fa') || code === 'en-ir') return 'IRR';\n if (code === 'en-gb') return 'GBP';\n return 'USD';\n}\n\nfunction coerceNumber(value: unknown): number | null {\n if (typeof value === 'number' && Number.isFinite(value)) {\n return value;\n }\n if (typeof value === 'string' && value.trim()) {\n const num = Number(value.trim());\n return Number.isFinite(num) ? num : null;\n }\n return null;\n}\n\nfunction looksLikeDateOnly(value: string): boolean {\n const trimmed = value.trim();\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(trimmed)) {\n return true;\n }\n return /^\\d{4}-\\d{2}-\\d{2}T00:00:00(?:\\.0+)?Z$/i.test(trimmed);\n}\n\nfunction formatLocaleInteger(value: number, locale: string, minDigits: number): string {\n const abs = Math.trunc(Math.abs(value));\n const padded = minDigits > 0 ? String(abs).padStart(minDigits, '0') : String(abs);\n try {\n // Format digit-by-digit so padding zeros stay and locale digits apply (fa-IR → ۰۱۲…).\n return padded\n .split('')\n .map((ch) => new Intl.NumberFormat(locale, { useGrouping: false }).format(Number(ch)))\n .join('');\n } catch {\n return padded;\n }\n}\n\nfunction getLocalizedMonthName(\n date: Date,\n locale: string,\n calendar: 'persian' | 'gregory',\n timeZone: string,\n width: 'long' | 'short',\n): string {\n try {\n return new Intl.DateTimeFormat(locale, {\n timeZone,\n calendar,\n month: width,\n }).format(date);\n } catch {\n try {\n return new Intl.DateTimeFormat('en-US', {\n timeZone,\n calendar: 'gregory',\n month: width,\n }).format(date);\n } catch {\n return String(date.getUTCMonth() + 1);\n }\n }\n}\n\nfunction getZonedCalendarParts(\n date: Date,\n timeZone: string,\n locale: string,\n calendar: 'persian' | 'gregory',\n): { year: number; month: number; day: number; hour: number; minute: number; second: number } {\n try {\n const formatter = new Intl.DateTimeFormat(locale, {\n timeZone: timeZone || 'UTC',\n calendar,\n year: 'numeric',\n month: '2-digit',\n day: '2-digit',\n hour: '2-digit',\n minute: '2-digit',\n second: '2-digit',\n hour12: false,\n // Keep part extraction numeric-stable; display digits are localized later.\n numberingSystem: 'latn',\n });\n const parts = formatter.formatToParts(date);\n const read = (type: Intl.DateTimeFormatPartTypes): number => {\n const value = parts.find((part) => part.type === type)?.value;\n return value ? Number(value) : 0;\n };\n let hour = read('hour');\n // Some engines emit 24:00 for midnight.\n if (hour === 24) {\n hour = 0;\n }\n return {\n year: read('year'),\n month: read('month'),\n day: read('day'),\n hour,\n minute: read('minute'),\n second: read('second'),\n };\n } catch {\n return {\n year: date.getUTCFullYear(),\n month: date.getUTCMonth() + 1,\n day: date.getUTCDate(),\n hour: date.getUTCHours(),\n minute: date.getUTCMinutes(),\n second: date.getUTCSeconds(),\n };\n }\n}\n\n//#endregion\n","import { AXPCategoryListItem, AXPMultiLanguageString, type AXPPlatformScopeKey } from '@acorex-platform/framework-shared/core';\nimport { AXPEntityModel } from '@acorex-platform/framework-shared/entity';\n\n//#region ----- Types -----\n\n/** Stored value: { email: { subject?, body }, sms: { body }, ... } */\nexport interface AXMTextTemplateChannelsValue {\n [channelName: string]: {\n subject?: AXPMultiLanguageString;\n body: AXPMultiLanguageString;\n };\n}\n\nexport type AXMTextTemplateChannelEditorType = 'plain' | 'rich';\n\nexport interface AXMTextTemplateChannelConfigureSettings {\n /** Settings definition section name (e.g. `smtp-settings`). */\n section: string;\n /** Optional parent group when section names are not unique. */\n group?: string;\n scope: AXPPlatformScopeKey;\n}\n\nexport interface AXMTextTemplateChannelDefinition {\n name: string;\n title: string;\n type: AXMTextTemplateChannelEditorType;\n hasSubject?: boolean;\n communicationChannelKey?: string;\n requiredSettingKeys?: string[];\n configureSettings?: AXMTextTemplateChannelConfigureSettings;\n notConfiguredMessageKey?: string;\n}\n\nexport interface AXMTextTemplateChannelDefinitionProvider {\n getChannels(): AXMTextTemplateChannelDefinition[];\n}\n\n/** Template kind: content (leaf message) or master (layout shell with `[content]`). */\nexport const AXM_TEXT_TEMPLATE_KIND = {\n Content: 'content',\n Master: 'master',\n} as const;\n\nexport type AXMTextTemplateKind = (typeof AXM_TEXT_TEMPLATE_KIND)[keyof typeof AXM_TEXT_TEMPLATE_KIND];\n\n/** Print / PDF channel key on `channels` (rich body, no subject). */\nexport const AXM_TEXT_TEMPLATE_PRINT_CHANNEL = 'print' as const;\n\n/** Reserved body slot for child template body injection (not a `{{token}}` variable). */\nexport const AXM_TEXT_TEMPLATE_CONTENT_SLOT = '[content]' as const;\n\n/** Max `parentId` chain length (leaf → … → root), including the leaf. */\nexport const AXM_TEXT_TEMPLATE_MAX_PARENT_DEPTH = 5;\n\nexport interface AXMTextTemplateEntityModel extends AXPEntityModel<string> {\n title?: AXPMultiLanguageString;\n /** `content` (default) or `master` layout template. */\n kind?: AXMTextTemplateKind;\n /** Optional parent master template id (multi-level nesting supported). */\n parentId?: string | null;\n /** Join snapshot for `parentId` lookup. */\n parent?: { id?: string; title?: AXPMultiLanguageString | string } | null;\n channels?: AXMTextTemplateChannelsValue;\n categoryIds?: string[];\n categories?: AXPCategoryListItem[];\n}\n\n//#endregion\n","import type { AXPMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport { resolveMultiLanguageString } from '@acorex-platform/framework-shared/core';\nimport {\n collectPathRootsFromSource,\n createTextTemplateEngine,\n} from '@acorex-platform/framework-shared/text-template';\nimport {\n defaultShortDatePatternForLocale,\n defaultShortTimePatternForLocale,\n resolveTextTemplateCalendar,\n} from './text-template-locale-format.util';\nimport {\n AXM_TEXT_TEMPLATE_CONTENT_SLOT,\n AXM_TEXT_TEMPLATE_KIND,\n AXM_TEXT_TEMPLATE_MAX_PARENT_DEPTH,\n type AXMTextTemplateChannelsValue,\n type AXMTextTemplateKind,\n} from './text-template.types';\n\n//#region ----- Placeholder replacement -----\n\nconst previewEngine = createTextTemplateEngine();\n\n/**\n * Collects unique root paths from template source (`{{ employee.name }}`, `{{#table users as user}}`).\n */\nexport function collectTextTemplatePlaceholderNames(text: string): string[] {\n return collectPathRootsFromSource(text ?? '');\n}\n\nfunction previewContext(data: Record<string, unknown>, slotContent = '') {\n const locale = 'en-US';\n return {\n channel: 'email',\n locale,\n data,\n regional: {\n locale,\n shortDate: defaultShortDatePatternForLocale(locale),\n shortTime: defaultShortTimePatternForLocale(locale),\n timeZone: 'UTC',\n calendar: resolveTextTemplateCalendar(locale),\n },\n tokenMeta: {},\n slotContent,\n };\n}\n\n/**\n * Interpolates `{{ path | pipe }}` using typed `data` (and optional `[content]`).\n * Does not parse block tags (`{{#table}}`, …) — use {@link renderTextTemplateSource} for bodies.\n */\nexport function replaceTextTemplatePlaceholders(\n text: string,\n data: Record<string, unknown> = {},\n): string {\n return previewEngine.interpolate(text ?? '', previewContext(data));\n}\n\n/**\n * Parses source to blocks and renders for the email channel (local preview / compose fallback).\n */\nexport function renderTextTemplateSource(\n source: string,\n data: Record<string, unknown> = {},\n slotContent = '',\n): string {\n return previewEngine.render(source ?? '', previewContext(data, slotContent));\n}\n\n/**\n * Resolves a template channel field (plain string or per-locale map) for the active locale.\n */\nexport function resolveTextTemplateLocalizedString(\n value: AXPMultiLanguageString | string | undefined | null,\n locale: string,\n): string {\n if (value == null || value === '') {\n return '';\n }\n if (typeof value === 'string') {\n return value;\n }\n return resolveMultiLanguageString(value, locale);\n}\n\n/**\n * Returns true when `text` contains the reserved `[content]` slot.\n */\nexport function textTemplateContainsContentSlot(text: string | null | undefined): boolean {\n if (text == null || text === '') {\n return false;\n }\n return text.includes(AXM_TEXT_TEMPLATE_CONTENT_SLOT);\n}\n\n/**\n * Injects child body into every `[content]` occurrence in a master body.\n */\nexport function replaceTextTemplateContentSlot(masterBody: string, content: string): string {\n if (!masterBody.includes(AXM_TEXT_TEMPLATE_CONTENT_SLOT)) {\n return masterBody;\n }\n return masterBody.split(AXM_TEXT_TEMPLATE_CONTENT_SLOT).join(content);\n}\n\n/**\n * Composes a body chain: leaf first, then parents toward root.\n * Injects `[content]` only — callers interpolate or {@link renderTextTemplateSource} afterward.\n */\nexport function composeTextTemplateBodyChain(bodiesLeafToRoot: string[]): string {\n if (!bodiesLeafToRoot.length) {\n return '';\n }\n let body = bodiesLeafToRoot[0] ?? '';\n for (let i = 1; i < bodiesLeafToRoot.length; i++) {\n body = replaceTextTemplateContentSlot(bodiesLeafToRoot[i] ?? '', body);\n }\n return body;\n}\n\n//#endregion\n\n//#region ----- Validation helpers -----\n\nfunction collectLocalizedBodyStrings(body: AXPMultiLanguageString | string | undefined | null): string[] {\n if (body == null || body === '') {\n return [];\n }\n if (typeof body === 'string') {\n return body.trim() ? [body] : [];\n }\n return Object.values(body).filter((v): v is string => typeof v === 'string' && v.trim().length > 0);\n}\n\n/**\n * Master templates: every non-empty channel body locale must include `[content]`.\n * Content templates: no channel body may include `[content]`.\n */\nexport function validateTextTemplateContentSlots(input: {\n kind: AXMTextTemplateKind | string | undefined | null;\n channels: AXMTextTemplateChannelsValue | undefined | null;\n}): { ok: true } | { ok: false; error: string } {\n const kind = (input.kind ?? AXM_TEXT_TEMPLATE_KIND.Content) as string;\n const channels = input.channels ?? {};\n const channelEntries = Object.entries(channels);\n\n if (kind === AXM_TEXT_TEMPLATE_KIND.Master) {\n if (!channelEntries.length) {\n return { ok: false, error: 'Master templates must define at least one channel with a [content] slot.' };\n }\n for (const [channelName, channel] of channelEntries) {\n const bodies = collectLocalizedBodyStrings(channel?.body);\n if (!bodies.length) {\n return {\n ok: false,\n error: `Master template channel \"${channelName}\" must include a body with the [content] slot.`,\n };\n }\n for (const body of bodies) {\n if (!textTemplateContainsContentSlot(body)) {\n return {\n ok: false,\n error: `Master template channel \"${channelName}\" body must include the [content] slot.`,\n };\n }\n }\n }\n return { ok: true };\n }\n\n for (const [channelName, channel] of channelEntries) {\n for (const body of collectLocalizedBodyStrings(channel?.body)) {\n if (textTemplateContainsContentSlot(body)) {\n return {\n ok: false,\n error: `Content template channel \"${channelName}\" must not include the reserved [content] slot.`,\n };\n }\n }\n }\n return { ok: true };\n}\n\nexport interface AXMTextTemplateParentChainNode {\n id: string;\n kind?: string | null;\n parentId?: string | null;\n}\n\n/**\n * Validates parent reference and walks the parent chain for kind, cycles, and max depth.\n * `loadParent` should return the next parent row (or null when missing).\n */\nexport async function validateTextTemplateParentChain(input: {\n id?: string | null;\n parentId?: string | null;\n maxDepth?: number;\n loadParent: (id: string) => Promise<AXMTextTemplateParentChainNode | null>;\n}): Promise<{ ok: true } | { ok: false; error: string }> {\n const parentId = input.parentId?.trim() || null;\n if (!parentId) {\n return { ok: true };\n }\n\n const selfId = input.id?.trim() || null;\n if (selfId && parentId === selfId) {\n return { ok: false, error: 'A text template cannot be its own parent.' };\n }\n\n const maxDepth = input.maxDepth ?? AXM_TEXT_TEMPLATE_MAX_PARENT_DEPTH;\n const visited = new Set<string>();\n if (selfId) {\n visited.add(selfId);\n }\n\n let currentId: string | null = parentId;\n let depth = 1;\n\n while (currentId) {\n if (visited.has(currentId)) {\n return { ok: false, error: 'Text template parent chain contains a cycle.' };\n }\n if (depth > maxDepth) {\n return {\n ok: false,\n error: `Text template parent chain exceeds the maximum depth of ${maxDepth}.`,\n };\n }\n\n visited.add(currentId);\n const parent = await input.loadParent(currentId);\n if (!parent) {\n return { ok: false, error: `Parent text template not found (id: ${currentId}).` };\n }\n if ((parent.kind ?? AXM_TEXT_TEMPLATE_KIND.Content) !== AXM_TEXT_TEMPLATE_KIND.Master) {\n return { ok: false, error: 'Parent text template must be a master template.' };\n }\n\n currentId = parent.parentId?.trim() || null;\n depth += 1;\n }\n\n return { ok: true };\n}\n\n//#endregion\n","import type { AXMTextTemplateChannelsValue } from './text-template.types';\n\n//#region ----- Text template render contracts -----\n\n/** Server + client command key for rendering a text template channel. */\nexport const AXM_TEXT_TEMPLATE_RENDER_COMMAND_KEY = 'ContentManagement:TextTemplate:Render' as const;\n\n/**\n * Request to render a persisted text template channel with typed domain/event data.\n * Walks optional `parentId` masters and injects child body into `[content]`.\n */\nexport interface AXMTextTemplateRenderRequest {\n textTemplateId: string;\n /**\n * When set, `textTemplateId` may be a canonical seed id; the render engine\n * remaps it with tenantMasterId(`content`, tenantId, id) for the tenant copy.\n * Also used for settings cascade (tenant Language / ShortDate / …).\n */\n tenantId?: string;\n /**\n * Optional recipient / actor user id. When set, User Language and regional\n * patterns are preferred over tenant/platform settings.\n */\n userId?: string;\n /** Channel key on `channels`, e.g. `email`, `sms`. Defaults to `email`. */\n channel?: string;\n /**\n * Explicit locale override for MLS subject/body and number formatting.\n * When omitted, resolved from settings: User Language → Tenant Language →\n * Platform Language → `en-US`.\n */\n locale?: string;\n /**\n * Event tokens and domain graphs (`users`, `workOrders`, …).\n * Context/Computed tokens (`companyName`, …) are filled from PlatformManagement.Tokens.\n */\n data?: Record<string, unknown>;\n}\n\n/**\n * Rendered subject/body for one channel after engine render and parent composition.\n */\nexport interface AXMTextTemplateRenderResult {\n textTemplateId: string;\n channel: string;\n subject?: string;\n body: string;\n}\n\n//#endregion\n\n//#region ----- Text template draft preview contracts -----\n\n/** Server command key for previewing unsaved draft text template content. */\nexport const AXM_TEXT_TEMPLATE_PREVIEW_COMMAND_KEY = 'ContentManagement:TextTemplate:Preview' as const;\n\n/**\n * Request to preview draft channel content with optional parent masters.\n * Uses the same composition / Context token fill as render, then fills Event samples.\n */\nexport interface AXMTextTemplatePreviewRequest {\n /** Draft channel map from the editor (not persisted). */\n channels: AXMTextTemplateChannelsValue;\n /** Optional persisted master parent id to walk for `[content]` shells. */\n parentId?: string | null;\n /** Template kind from the host form (`content` | `master`). Informational. */\n kind?: string;\n /** Channel key on `channels`, e.g. `email`, `sms`. Defaults to `email`. */\n channel?: string;\n /**\n * Locale for MLS fields and number formatting. Defaults to active UI language on the client,\n * or `en-US` when omitted on the server.\n */\n locale?: string;\n /** Optional data overrides (applied before Context resolve and Event samples). */\n data?: Record<string, unknown>;\n}\n\n/**\n * Preview subject/body for one channel after engine render and parent composition.\n */\nexport interface AXMTextTemplatePreviewResult {\n channel: string;\n subject?: string;\n body: string;\n}\n\n//#endregion\n","//#region ----- Seeded text template ids -----\n\n/**\n * Namespace for {@link tenantMasterId} when cloning text templates per tenant\n * (`packs` SetupTenant → `content-management.common-setup`).\n */\nexport const AXM_TEXT_TEMPLATE_TENANT_MASTER_NAMESPACE = 'content' as const;\n\n/**\n * Canonical ContentManagement.TextTemplate ids used as SetupTenant clone keys\n * and runtime lookups (resolve via tenantMasterId + tenantId).\n * Keep aligned with packs `text-template.mock.ids.ts`.\n *\n * Prefix `c71000` — same as `mockStableUuid('c71000', seq)`.\n */\nexport const AXM_TEXT_TEMPLATE_IDS = {\n emailCompanyMaster: 'c7100001-0001-4111-b111-010101010101',\n passwordReset: 'c7100002-0001-4111-b111-020202020202',\n emailVerification: 'c7100003-0001-4111-b111-030303030303',\n passwordChanged: 'c7100004-0001-4111-b111-040404040404',\n ticketReceived: 'c7100005-0001-4111-b111-050505050505',\n ticketResolved: 'c7100006-0001-4111-b111-060606060606',\n employeeHappyBirthday: 'c7100007-0001-4111-b111-070707070707',\n employeeJoiningCompany: 'c7100008-0001-4111-b111-080808080808',\n /** Combined document expiration digest (expired + near) — daily notifier (email + in-app). */\n documentExpired: 'c7100009-0001-4111-b111-090909090909',\n /** Legacy near-expiry template id; same digest body as documentExpired. */\n documentNearExpiry: 'c710000a-0001-4111-b111-0a0a0a0a0a0a',\n /** Company print master — header, border, footer around `[content]`. */\n printCompanyMaster: 'c710000b-0001-4111-b111-0b0b0b0b0b0b',\n /** Default questionnaire print child (title, date, `{{sessionBody}}`). */\n questionnairePrint: 'c710000c-0001-4111-b111-0c0c0c0c0c0c',\n /** Daily list of employees with a birthday today — emailed to account holders. */\n employeeBirthdayDigest: 'c710000d-0001-4111-b111-0d0d0d0d0d0d',\n /** Daily list of employees whose hire date is today — emailed to account holders. */\n employeeJoiningDigest: 'c710000e-0001-4111-b111-0e0e0e0e0e0e',\n /** List of tenants with no login in the last 30 days. */\n tenantLoginDigest: 'c710000f-0001-4111-b111-0f0f0f0f0f0f',\n /** Tenant admin invites a user by email (accept link). */\n userInvitation: 'c7100010-0001-4111-b111-101010101010',\n /** Staff History digest — Employee + Person profile changes (email). */\n entityChangeStaffHistory: 'c7100011-0001-4111-b111-111111111111',\n /** User History digest — User account profile changes (email). */\n entityChangeUserHistory: 'c7100012-0001-4111-b111-121212121212',\n /** Daily AU/NZ field-mission weather briefing emailed to tenant admins. */\n weatherDailyForecastDigest: 'c7100013-0001-4111-b111-131313131313',\n /** Public tenant-creation request — confirmation to the requester. */\n tenantRequestReceived: 'c7100014-0001-4111-b111-141414141414',\n /** Public tenant-creation request — notify platform console admins. */\n tenantRequestAdminNotify: 'c7100015-0001-4111-b111-151515151515',\n /** Public tenant-creation request — approved; sent to the requester. */\n tenantRequestApproved: 'c7100016-0001-4111-b111-161616161616',\n} as const;\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './menu.keys';\nexport * from './permission.keys';\n\nexport * from './root-config';\nexport * from './manifest';\n\n//#endregion\n\nexport * from './entities';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAAO,MAAM,4BAA4B,GAAG;AAC1C,IAAA,IAAI,EAAE,yBAAyB;AAC/B,IAAA,QAAQ,EAAE,UAAU;AACpB,IAAA,UAAU,EAAE,oCAAoC;AAChD,IAAA,aAAa,EAAE,wCAAwC;AACvD,IAAA,QAAQ,EAAE,kCAAkC;AAC5C,IAAA,UAAU,EAAE,iBAAiB;AAC7B,IAAA,SAAS,EAAE,oBAAoB;AAC/B,IAAA,KAAK,EAAE,WAAW;;;ACRpB;;;AAGG;AACI,MAAM,iCAAiC,GAAG;AAC/C,IAAA,MAAM,EAAE,oCAAoC;AAC5C,IAAA,iBAAiB,EAAE,+CAA+C;AAClE,IAAA,eAAe,EAAE,6CAA6C;AAC9D,IAAA,qBAAqB,EAAE,mDAAmD;AAC1E,IAAA,KAAK,EAAE,mCAAmC;;AAG5C;;;AAGG;AACI,MAAM,kBAAkB,GAAG;AAChC,IAAA,iBAAiB,EAAE;QACjB,UAAU,EAAE,iCAAiC,CAAC,eAAe;AAC7D,QAAA,SAAS,EAAE;YACT,UAAU,EAAE,iCAAiC,CAAC,eAAe;YAC7D,IAAI,EAAE,iCAAiC,CAAC,eAAe;YACvD,IAAI,EAAE,iCAAiC,CAAC,eAAe;YACvD,MAAM,EAAE,iCAAiC,CAAC,eAAe;YACzD,MAAM,EAAE,iCAAiC,CAAC,eAAe;AAC1D,SAAA;AACD,QAAA,YAAY,EAAE;YACZ,UAAU,EAAE,iCAAiC,CAAC,eAAe;YAC7D,IAAI,EAAE,iCAAiC,CAAC,eAAe;YACvD,IAAI,EAAE,iCAAiC,CAAC,eAAe;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
|
|
793
793
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTemplateContentEditorWidgetEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
794
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMTemplateContentEditorWidgetEditComponent, isStandalone: true, selector: "axm-template-content-editor-widget-edit", viewQueries: [{ propertyName: "editorRef", first: true, predicate: ["editorRef"], descendants: true, isSignal: true }, { propertyName: "bodyTextareaRef", first: true, predicate: ["bodyTextarea"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Template Content Editor: Channel tabs and content per channel -->\n<div class=\"flex flex-col gap-4 w-full\">\n <!-- Channel tabs navigation -->\n <div class=\"flex items-center gap-2 flex-wrap\">\n <ax-tabs\n [look]=\"'with-line'\"\n (onActiveTabChanged)=\"onChannelTabChanged($event.index)\"\n class=\"flex-1 min-w-0\"\n >\n @for (ch of availableChannels(); track ch.name; let i = $index) {\n <ax-tab-item\n [text]=\"(ch.title | translate | async) ?? ch.name\"\n [key]=\"i.toString()\"\n [active]=\"activeTabIndex() === i\"\n ></ax-tab-item>\n }\n </ax-tabs>\n </div>\n\n @if (activeChannel(); as ch) {\n <!-- Channel content area: Edit mode or Preview mode -->\n <div class=\"mb-4 p-4\">\n @if (!isChannelConfigured(ch.name) && ch.notConfiguredMessageKey) {\n <div\n class=\"mb-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 p-3 rounded border border-amber-300 bg-amber-50 dark:border-amber-700 dark:bg-amber-950/30\"\n >\n <p class=\"text-sm text-amber-900 dark:text-amber-100\">\n {{ ch.notConfiguredMessageKey | translate | async }}\n </p>\n @if (ch.configureSettings) {\n <ax-button\n [text]=\"\n '@content-management:templates.actions.configure-channel'\n | translate\n | async\n \"\n look=\"outline\"\n color=\"primary\"\n size=\"sm\"\n (onClick)=\"openChannelConfigure(ch)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-gear\"></ax-icon>\n </ax-prefix>\n </ax-button>\n }\n </div>\n }\n\n @if (viewMode() === 'edit') {\n <!-- Edit mode: Subject field (for channels that support it, e.g. Email) -->\n @if (ch.hasSubject) {\n <div class=\"mb-3\">\n <label class=\"block text-sm mb-1\">\n {{\n '@content-management:templates.entities.text-template.fields.subject.title'\n | translate\n | async\n }}\n </label>\n <ax-text-box\n [ngModel]=\"getChannelSubject(ch.name)\"\n (onValueChanged)=\"handleSubjectChange(ch.name, $event)\"\n [placeholder]=\"\n ('@content-management:templates.entities.text-template.fields.subject.placeholder'\n | translate\n | async)!\n \"\n ></ax-text-box>\n </div>\n }\n\n <!-- Edit mode: Body field (plain text or rich text-editor) -->\n <div>\n <label class=\"block text-sm mb-1\">\n {{\n '@content-management:templates.entities.text-template.fields.body.title'\n | translate\n | async\n }}\n </label>\n <!--->\n <!-- ----- Plain-text body for SMS-style channels ----- -->\n @if (ch.type === 'plain') {\n <ax-text-area\n #bodyTextarea\n [ngModel]=\"getChannelBody(ch.name)\"\n (onValueChanged)=\"handlePlainBodyChange(ch.name, $event)\"\n [rows]=\"8\"\n [placeholder]=\"\n ('@content-management:templates.entities.text-template.fields.body-placeholder.plain'\n | translate\n | async)!\n \"\n ></ax-text-area>\n }\n <!-- ----- Recreate the rich editor per channel so tab switches do not keep the previous HTML ----- -->\n @else {\n @for (channelName of [ch.name]; track channelName) {\n <ax-text-editor\n #editorRef\n outputFormat=\"html\"\n [placeHolder]=\"\n ('@content-management:templates.entities.text-template.fields.body-placeholder.rich'\n | translate\n | async)!\n \"\n [ngModel]=\"getChannelBody(channelName)\"\n (onValueChanged)=\"handleEditorChange(channelName, $event)\"\n [look]=\"'solid'\"\n [initialLine]=\"8\"\n >\n <ax-text-editor-content [style.min-height.px]=\"200\"></ax-text-editor-content>\n <ax-text-editor-toolbar>\n <ax-prefix>\n <ax-text-editor-history></ax-text-editor-history>\n <ax-text-editor-font-style></ax-text-editor-font-style>\n <ax-text-editor-list></ax-text-editor-list>\n </ax-prefix>\n </ax-text-editor-toolbar>\n </ax-text-editor>\n }\n }\n </div>\n } @else {\n <!-- Preview mode: Rendered content with variable placeholders replaced by sample values -->\n <div class=\"space-y-2\">\n @if (ch.hasSubject && previewSubject(ch.name)) {\n <div>\n <span class=\"text-xs text-gray-500\"\n >{{\n '@content-management:templates.entities.text-template.fields.subject.title'\n | translate\n | async\n }}:\n </span>\n <span class=\"text-sm\">{{ previewSubject(ch.name) }}</span>\n </div>\n }\n <!-- ----- Rich email keeps inline styles; plain channels use pre-wrap ----- -->\n <div\n class=\"text-sm p-3 bg-gray-100 dark:bg-gray-900 rounded border overflow-auto\"\n [class.whitespace-pre-wrap]=\"ch.type !== 'rich'\"\n [innerHTML]=\"previewBodyHtml(ch.name)\"\n ></div>\n </div>\n }\n </div>\n\n <!-- Footer: Action buttons (left) + Edit/Preview toggle (right) in single row -->\n <div\n class=\"flex flex-nowrap items-center justify-between gap-3 pt-3 mt-1 border-t border-gray-200 dark:border-gray-700\"\n >\n <div class=\"flex flex-nowrap items-center gap-2 min-w-0\">\n @if (viewMode() === 'edit') {\n <!-- ----- Insert variable dropdown from platform tokens ----- -->\n <div data-insert-var-trigger>\n <ax-button\n [text]=\"\n '@content-management:templates.actions.insert-variable'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-code\"></ax-icon>\n </ax-prefix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for (v of availableVariables(); track v.name) {\n <ax-button-item\n look=\"blank\"\n color=\"default\"\n [text]=\"(v.title || v.name) + ' ({{' + v.name + '}})'\"\n (onClick)=\"insertVariable(ch.name, v.name)\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"getVariableIcon(v)\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n <ax-suffix>\n <ax-icon icon=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n </ax-button>\n </div>\n <!--->\n <!-- ----- Insert reserved [content] slot for master templates ----- -->\n @if (isMasterKind()) {\n <div data-insert-var-trigger>\n <ax-button\n [text]=\"\n '@content-management:templates.actions.insert-content-slot'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n (onClick)=\"insertContentSlot(ch.name)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-layer-group\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n }\n <!--->\n <!-- ----- Copy subject/body from another channel ----- -->\n @if (otherChannelsWithContent(ch.name).length > 0) {\n <ax-button\n [text]=\"\n '@content-management:templates.actions.copy-from'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-copy\"></ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-icon icon=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for (\n src of otherChannelsWithContent(ch.name);\n track src.name\n ) {\n <ax-button-item\n look=\"blank\"\n color=\"default\"\n [text]=\"(src.title | translate | async) ?? src.name\"\n (onClick)=\"copyFromChannel(ch.name, src.name)\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"getChannelIcon(src)\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n }\n </div>\n <div>\n <ax-tabs [look]=\"'default'\">\n <ax-tab-item\n [text]=\"\n ('@content-management:templates.actions.edit'\n | translate\n | async) ?? 'Edit'\n \"\n [active]=\"viewMode() === 'edit'\"\n (onClick)=\"viewMode.set('edit')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-pen\" class=\"text-current\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n <ax-tab-item\n [text]=\"\n ('@content-management:templates.actions.preview'\n | translate\n | async) ?? 'Preview'\n \"\n [active]=\"viewMode() === 'preview'\"\n (onClick)=\"viewMode.set('preview')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-eye\" class=\"text-current\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n </ax-tabs>\n </div>\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i3.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "reorderable", "reorderDelay", "renderMode", "stacked", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged", "onTabsReordered"] }, { kind: "component", type: i3.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXTextAreaModule }, { kind: "component", type: i4.AXTextAreaComponent, selector: "ax-text-area", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "placeholder", "maxLength", "look", "rows", "allowResize", "showCounter", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i5.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "maskPattern", "customTokens", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onMaskChanged"] }, { kind: "ngmodule", type: AXTextEditorModule }, { kind: "component", type: i6.AXTextEditorComponent, selector: "ax-text-editor", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "look", "placeHolder", "outputFormat", "initialLine"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "component", type: i6.AXTextEditorToolbarComponent, selector: "ax-text-editor-toolbar", inputs: ["orientation"] }, { kind: "component", type: i6.AXTextEditorContentComponent, selector: "ax-text-editor-content" }, { kind: "component", type: i6.AXTextEditorHistoryComponent, selector: "ax-text-editor-history" }, { kind: "component", type: i6.AXTextEditorFontStyleComponent, selector: "ax-text-editor-font-style" }, { kind: "component", type: i6.AXTextEditorListComponent, selector: "ax-text-editor-list" }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i7.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i7.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i7.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i8.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
794
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMTemplateContentEditorWidgetEditComponent, isStandalone: true, selector: "axm-template-content-editor-widget-edit", viewQueries: [{ propertyName: "editorRef", first: true, predicate: ["editorRef"], descendants: true, isSignal: true }, { propertyName: "bodyTextareaRef", first: true, predicate: ["bodyTextarea"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<!-- Template Content Editor: Channel tabs and content per channel -->\n<div class=\"flex flex-col gap-4 w-full\">\n <!-- Channel tabs navigation -->\n <div class=\"flex items-center gap-2 flex-wrap\">\n <ax-tabs\n [look]=\"'with-line'\"\n (onActiveTabChanged)=\"onChannelTabChanged($event.index)\"\n class=\"flex-1 min-w-0\"\n >\n @for (ch of availableChannels(); track ch.name; let i = $index) {\n <ax-tab-item\n [text]=\"(ch.title | translate | async) ?? ch.name\"\n [key]=\"i.toString()\"\n [active]=\"activeTabIndex() === i\"\n ></ax-tab-item>\n }\n </ax-tabs>\n </div>\n\n @if (activeChannel(); as ch) {\n <!-- Channel content area: Edit mode or Preview mode -->\n <div class=\"mb-4 p-4\">\n @if (!isChannelConfigured(ch.name) && ch.notConfiguredMessageKey) {\n <div\n class=\"mb-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 p-3 rounded border border-amber-300 bg-amber-50 dark:border-amber-700 dark:bg-amber-950/30\"\n >\n <p class=\"text-sm text-amber-900 dark:text-amber-100\">\n {{ ch.notConfiguredMessageKey | translate | async }}\n </p>\n @if (ch.configureSettings) {\n <ax-button\n [text]=\"\n '@content-management:templates.actions.configure-channel'\n | translate\n | async\n \"\n look=\"outline\"\n color=\"primary\"\n size=\"sm\"\n (onClick)=\"openChannelConfigure(ch)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-gear\"></ax-icon>\n </ax-prefix>\n </ax-button>\n }\n </div>\n }\n\n @if (viewMode() === 'edit') {\n <!-- Edit mode: Subject field (for channels that support it, e.g. Email) -->\n @if (ch.hasSubject) {\n <div class=\"mb-3\">\n <label class=\"block text-sm mb-1\">\n {{\n '@content-management:templates.entities.text-template.fields.subject.title'\n | translate\n | async\n }}\n </label>\n <ax-text-box\n [ngModel]=\"getChannelSubject(ch.name)\"\n (onValueChanged)=\"handleSubjectChange(ch.name, $event)\"\n [placeholder]=\"\n ('@content-management:templates.entities.text-template.fields.subject.placeholder'\n | translate\n | async)!\n \"\n ></ax-text-box>\n </div>\n }\n\n <!-- Edit mode: Body field (plain text or rich text-editor) -->\n <div>\n <label class=\"block text-sm mb-1\">\n {{\n '@content-management:templates.entities.text-template.fields.body.title'\n | translate\n | async\n }}\n </label>\n <!--->\n <!-- ----- Plain-text body for SMS-style channels ----- -->\n @if (ch.type === 'plain') {\n <ax-text-area\n #bodyTextarea\n [ngModel]=\"getChannelBody(ch.name)\"\n (onValueChanged)=\"handlePlainBodyChange(ch.name, $event)\"\n [rows]=\"8\"\n [placeholder]=\"\n ('@content-management:templates.entities.text-template.fields.body-placeholder.plain'\n | translate\n | async)!\n \"\n ></ax-text-area>\n }\n <!-- ----- Recreate the rich editor per channel so tab switches do not keep the previous HTML ----- -->\n @else {\n @for (channelName of [ch.name]; track channelName) {\n <ax-text-editor\n #editorRef\n outputFormat=\"html\"\n [placeHolder]=\"\n ('@content-management:templates.entities.text-template.fields.body-placeholder.rich'\n | translate\n | async)!\n \"\n [ngModel]=\"getChannelBody(channelName)\"\n (onValueChanged)=\"handleEditorChange(channelName, $event)\"\n [look]=\"'solid'\"\n [initialLine]=\"8\"\n >\n <ax-text-editor-content [style.min-height.px]=\"200\"></ax-text-editor-content>\n <ax-text-editor-toolbar>\n <ax-prefix>\n <ax-text-editor-history></ax-text-editor-history>\n <ax-text-editor-font-style></ax-text-editor-font-style>\n <ax-text-editor-list></ax-text-editor-list>\n </ax-prefix>\n </ax-text-editor-toolbar>\n </ax-text-editor>\n }\n }\n </div>\n } @else {\n <!-- Preview mode: Rendered content with variable placeholders replaced by sample values -->\n <div class=\"space-y-2\">\n @if (ch.hasSubject && previewSubject(ch.name)) {\n <div>\n <span class=\"text-xs text-gray-500\"\n >{{\n '@content-management:templates.entities.text-template.fields.subject.title'\n | translate\n | async\n }}:\n </span>\n <span class=\"text-sm\">{{ previewSubject(ch.name) }}</span>\n </div>\n }\n <!-- ----- Rich email keeps inline styles; plain channels use pre-wrap ----- -->\n <div\n class=\"text-sm p-3 bg-gray-100 dark:bg-gray-900 rounded border overflow-auto\"\n [class.whitespace-pre-wrap]=\"ch.type !== 'rich'\"\n [innerHTML]=\"previewBodyHtml(ch.name)\"\n ></div>\n </div>\n }\n </div>\n\n <!-- Footer: Action buttons (left) + Edit/Preview toggle (right) in single row -->\n <div\n class=\"flex flex-nowrap items-center justify-between gap-3 pt-3 mt-1 border-t border-gray-200 dark:border-gray-700\"\n >\n <div class=\"flex flex-nowrap items-center gap-2 min-w-0\">\n @if (viewMode() === 'edit') {\n <!-- ----- Insert variable dropdown from platform tokens ----- -->\n <div data-insert-var-trigger>\n <ax-button\n [text]=\"\n '@content-management:templates.actions.insert-variable'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-code\"></ax-icon>\n </ax-prefix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for (v of availableVariables(); track v.name) {\n <ax-button-item\n look=\"blank\"\n color=\"default\"\n [text]=\"(v.title || v.name) + ' ({{' + v.name + '}})'\"\n (onClick)=\"insertVariable(ch.name, v.name)\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"getVariableIcon(v)\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n <ax-suffix>\n <ax-icon icon=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n </ax-button>\n </div>\n <!--->\n <!-- ----- Insert reserved [content] slot for master templates ----- -->\n @if (isMasterKind()) {\n <div data-insert-var-trigger>\n <ax-button\n [text]=\"\n '@content-management:templates.actions.insert-content-slot'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n (onClick)=\"insertContentSlot(ch.name)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-layer-group\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n }\n <!--->\n <!-- ----- Copy subject/body from another channel ----- -->\n @if (otherChannelsWithContent(ch.name).length > 0) {\n <ax-button\n [text]=\"\n '@content-management:templates.actions.copy-from'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-copy\"></ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-icon icon=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for (\n src of otherChannelsWithContent(ch.name);\n track src.name\n ) {\n <ax-button-item\n look=\"blank\"\n color=\"default\"\n [text]=\"(src.title | translate | async) ?? src.name\"\n (onClick)=\"copyFromChannel(ch.name, src.name)\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"getChannelIcon(src)\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n }\n </div>\n <div>\n <ax-tabs [look]=\"'default'\">\n <ax-tab-item\n [text]=\"\n ('@content-management:templates.actions.edit'\n | translate\n | async) ?? 'Edit'\n \"\n [active]=\"viewMode() === 'edit'\"\n (onClick)=\"viewMode.set('edit')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-pen\" class=\"text-current\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n <ax-tab-item\n [text]=\"\n ('@content-management:templates.actions.preview'\n | translate\n | async) ?? 'Preview'\n \"\n [active]=\"viewMode() === 'preview'\"\n (onClick)=\"viewMode.set('preview')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-eye\" class=\"text-current\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n </ax-tabs>\n </div>\n </div>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i1.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "component", type: i1.AXDecoratorGenericComponent, selector: "ax-footer, ax-header, ax-content, ax-divider, ax-form-hint, ax-prefix, ax-suffix, ax-text, ax-title, ax-subtitle, ax-placeholder, ax-overlay" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: AXFormModule }, { kind: "ngmodule", type: AXTabsModule }, { kind: "component", type: i3.AXTabsComponent, selector: "ax-tabs", inputs: ["look", "location", "reorderable", "reorderDelay", "renderMode", "stacked", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged", "onTabsReordered"] }, { kind: "component", type: i3.AXTabItemComponent, selector: "ax-tab-item", inputs: ["disabled", "text", "key", "headerTemplate", "active"], outputs: ["disabledChange", "onClick", "onBlur", "onFocus", "activeChange"] }, { kind: "ngmodule", type: AXTextAreaModule }, { kind: "component", type: i4.AXTextAreaComponent, selector: "ax-text-area", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "placeholder", "maxLength", "look", "rows", "allowResize", "showCounter", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress"] }, { kind: "ngmodule", type: AXTextBoxModule }, { kind: "component", type: i5.AXTextBoxComponent, selector: "ax-text-box", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "id", "placeholder", "maxLength", "allowNull", "type", "autoComplete", "look", "maskPattern", "customTokens", "class"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange", "onKeyDown", "onKeyUp", "onKeyPress", "onMaskChanged"] }, { kind: "ngmodule", type: AXTextEditorModule }, { kind: "component", type: i6.AXTextEditorComponent, selector: "ax-text-editor", inputs: ["disabled", "tabIndex", "readonly", "value", "state", "name", "look", "placeHolder", "outputFormat", "line", "initialLine", "maxLine"], outputs: ["onBlur", "onFocus", "valueChange", "stateChange", "onValueChanged", "readonlyChange", "disabledChange"] }, { kind: "component", type: i6.AXTextEditorToolbarComponent, selector: "ax-text-editor-toolbar", inputs: ["orientation"] }, { kind: "component", type: i6.AXTextEditorContentComponent, selector: "ax-text-editor-content" }, { kind: "component", type: i6.AXTextEditorHistoryComponent, selector: "ax-text-editor-history" }, { kind: "component", type: i6.AXTextEditorFontStyleComponent, selector: "ax-text-editor-font-style" }, { kind: "component", type: i6.AXTextEditorListComponent, selector: "ax-text-editor-list" }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i7.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: i7.AXButtonItemComponent, selector: "ax-button-item", inputs: ["color", "disabled", "text", "selected", "divided", "data", "name"], outputs: ["onClick", "onFocus", "onBlur", "disabledChange"] }, { kind: "component", type: i7.AXButtonItemListComponent, selector: "ax-button-item-list", inputs: ["items", "closeParentOnClick", "lockOnLoading"], outputs: ["onItemClick"] }, { kind: "ngmodule", type: AXDropdownModule }, { kind: "component", type: i8.AXDropdownPanelComponent, selector: "ax-dropdown-panel", inputs: ["isOpen", "fitParent", "dropdownWidth", "position", "placement", "_target", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$1.AXTranslatorPipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
795
795
|
}
|
|
796
796
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTemplateContentEditorWidgetEditComponent, decorators: [{
|
|
797
797
|
type: Component,
|
|
@@ -812,4 +812,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
812
812
|
}], ctorParameters: () => [], propDecorators: { editorRef: [{ type: i0.ViewChild, args: ['editorRef', { isSignal: true }] }], bodyTextareaRef: [{ type: i0.ViewChild, args: ['bodyTextarea', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
|
|
813
813
|
|
|
814
814
|
export { AXMTemplateContentEditorWidgetEditComponent };
|
|
815
|
-
//# sourceMappingURL=acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-
|
|
815
|
+
//# sourceMappingURL=acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-B1Q4_HTa.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-h5ING7pF.mjs","sources":["../../../../libs/modules/content-management/client/src/lib/features/template-content-editor/template-content-editor-widget-edit.component.ts","../../../../libs/modules/content-management/client/src/lib/features/template-content-editor/template-content-editor-widget-edit.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXTabsModule } from '@acorex/components/tabs';\nimport { AXTextAreaModule } from '@acorex/components/text-area';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTextEditorComponent, AXTextEditorModule } from '@acorex/components/text-editor';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { AXPSettingsService, AXPTokenDefinitionService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';\nimport { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n effect,\n inject,\n OnInit,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { DomSanitizer, type SafeHtml } from '@angular/platform-browser';\nimport { FormsModule } from '@angular/forms';\nimport { AXValueChangedEvent } from '@acorex/cdk/common';\nimport {\n AXPContextState,\n AXPPlatformScope,\n isFormValueEqual,\n runtimeCommandPayloadData,\n type AXPMultiLanguageString,\n} from '@acorex-platform/framework-shared/core';\nimport {\n AXM_TEXT_TEMPLATE_PREVIEW_COMMAND_KEY,\n RootConfig,\n type AXMTextTemplatePreviewRequest,\n type AXMTextTemplatePreviewResult,\n} from '@acorex-platform/module-content-management-client/contracts';\nimport { AXP_TEXT_TEMPLATE_CHANNEL_DEFINITION_PROVIDER } from './channel-definition.provider';\nimport {\n AXMTextTemplateChannelDefinition,\n AXMTextTemplateChannelsValue,\n} from './channel-definition.types';\nimport {\n AXM_TEXT_TEMPLATE_CONTENT_SLOT,\n AXM_TEXT_TEMPLATE_KIND,\n AXM_TEXT_TEMPLATE_MAX_PARENT_DEPTH,\n collectTextTemplatePlaceholderNames,\n composeTextTemplateBodyChain,\n renderTextTemplateSource,\n replaceTextTemplatePlaceholders,\n resolveTextTemplateLocalizedString,\n type AXMTextTemplateEntityModel,\n} from './text-template-placeholder.util';\n\n/** Variable definition from PlatformManagement.Tokens for template preview and Insert variable */\ninterface TemplateVariable {\n name: string;\n title: string;\n sampleValue?: string;\n kind?: string;\n dataType?: string;\n}\n\n@Component({\n selector: 'axm-template-content-editor-widget-edit',\n templateUrl: './template-content-editor-widget-edit.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n AXDecoratorModule,\n FormsModule,\n AXFormModule,\n AXTabsModule,\n AXTextAreaModule,\n AXTextBoxModule,\n AXTextEditorModule,\n AXValidationModule,\n AXTranslationModule,\n AXButtonModule,\n AXDropdownModule,\n ],\n})\nexport class AXMTemplateContentEditorWidgetEditComponent\n extends AXPValueWidgetComponent<AXMTextTemplateChannelsValue | null>\n implements OnInit, AfterViewInit\n{\n /** Stored cursor/selection state before Insert Variable dropdown opens */\n private storedCursor: {\n channelName: string;\n isPlain: boolean;\n selectionStart?: number;\n selectionEnd?: number;\n range?: Range;\n } | null = null;\n private readonly channelProviders = inject(AXP_TEXT_TEMPLATE_CHANNEL_DEFINITION_PROVIDER, {\n optional: true,\n });\n private readonly settingsService = inject(AXPSettingsService);\n private readonly translationService = inject(AXTranslationService);\n private readonly entityService = inject(AXPEntityService);\n private readonly tokenDefinitionService = inject(AXPTokenDefinitionService, { optional: true });\n private readonly commandExecutor = inject(AXPCommandExecutor);\n private readonly toastService = inject(AXToastService);\n private readonly sanitizer = inject(DomSanitizer);\n private readonly destroyRef = inject(DestroyRef);\n private readonly hostRef = inject(ElementRef<HTMLElement>);\n\n /** Dedupes in-flight preview loads when effect re-runs. */\n private previewRequestSeq = 0;\n\n /**\n * TipTap `commitValue(html, true)` marks hydration as a user edit.\n * Ignore writes until that timer elapses after a programmatic sync.\n */\n private suppressEditorWrites = false;\n private suppressEditorWritesTimer: ReturnType<typeof setTimeout> | null = null;\n\n private lastSyncedChannel: string | null = null;\n private lastSyncedViewMode: 'edit' | 'preview' | null = null;\n private lastSyncedEditor: AXTextEditorComponent | undefined;\n /** Drops the ax-tabs init event so it cannot overwrite the content-channel tab. */\n private ignoreNextChannelTabChange = false;\n\n protected editorRef = viewChild<AXTextEditorComponent>('editorRef');\n protected bodyTextareaRef = viewChild('bodyTextarea', { read: ElementRef<HTMLElement> });\n\n protected availableChannels = signal<AXMTextTemplateChannelDefinition[]>([]);\n protected channelConfigured = signal<Record<string, boolean>>({});\n protected availableVariables = signal<TemplateVariable[]>([]);\n protected activeTabIndex = signal<number>(0);\n protected viewMode = signal<'edit' | 'preview'>('edit');\n\n /** Resolved values for local preview fallback: expression/token evaluation, then sampleValue */\n protected resolvedPreviewValues = signal<Record<string, string>>({});\n\n /** Parent-chain bodies (leaf → root) for the active locale, keyed by channel (local fallback). */\n protected composedPreviewBodies = signal<Record<string, string>>({});\n\n /** Server Preview results keyed by channel (preferred over local compose). */\n protected serverPreviewByChannel = signal<\n Record<string, { subject?: string; body: string }>\n >({});\n\n protected activeChannel = computed(() => {\n const idx = this.activeTabIndex();\n const chs = this.availableChannels();\n return chs[idx] ?? null;\n });\n\n /** True when the host entity form has Kind = Master. */\n protected isMasterKind = computed(() => {\n this.contextService.changeEvent();\n const kind = this.contextService.getValue('kind');\n return kind === AXM_TEXT_TEMPLATE_KIND.Master;\n });\n\n protected otherChannelsWithContent = (currentName: string) =>\n this.availableChannels().filter(\n (c) => c.name !== currentName && (this.getChannelBody(c.name) || (c.hasSubject && this.getChannelSubject(c.name)))\n );\n\n /** Returns icon class for a variable/token based on kind and dataType */\n protected getVariableIcon(v: TemplateVariable): string {\n const kindMap: Record<string, string> = {\n Static: 'fa-light fa-database',\n Context: 'fa-light fa-layer-group',\n Event: 'fa-light fa-bolt',\n Computed: 'fa-light fa-calculator',\n Secret: 'fa-light fa-key',\n };\n const dataTypeMap: Record<string, string> = {\n String: 'fa-light fa-font',\n Integer: 'fa-light fa-hashtag',\n Boolean: 'fa-light fa-toggle-on',\n Decimal: 'fa-light fa-calculator',\n DateTime: 'fa-light fa-clock',\n Json: 'fa-light fa-braces',\n };\n const byKind = v.kind && kindMap[v.kind];\n if (byKind) return byKind;\n const byDataType = v.dataType && dataTypeMap[v.dataType];\n if (byDataType) return byDataType;\n return 'fa-light fa-code';\n }\n\n /** Returns icon class for a channel based on name and type */\n protected getChannelIcon(ch: AXMTextTemplateChannelDefinition): string {\n const nameMap: Record<string, string> = {\n email: 'fa-light fa-envelope',\n sms: 'fa-light fa-comment-sms',\n whatsapp: 'fa-brands fa-whatsapp',\n push: 'fa-light fa-bell',\n telegram: 'fa-brands fa-telegram',\n 'in-app': 'fa-light fa-inbox',\n };\n const byName = nameMap[ch.name?.toLowerCase() ?? ''];\n if (byName) return byName;\n return ch.type === 'rich' ? 'fa-light fa-file-lines' : 'fa-light fa-align-left';\n }\n\n private getTemplateLocale(): string {\n return this.translationService.getActiveLang() ?? 'en-US';\n }\n\n /**\n * Builds a mutable locale map from a stored channel field (string legacy or ML object).\n */\n private normalizeChannelFieldToMl(\n existing: AXPMultiLanguageString | string | undefined,\n ): Record<string, string> {\n if (existing == null || existing === '') {\n return {};\n }\n if (typeof existing === 'string') {\n const s = existing;\n return { 'en-US': s, 'fa-IR': s };\n }\n return { ...(existing as Record<string, string>) };\n }\n\n constructor() {\n super();\n effect(() => {\n this.viewMode();\n this.activeTabIndex();\n this.getValue();\n this.contextService.changeEvent();\n if (this.viewMode() === 'preview') {\n void this.loadServerPreview();\n } else {\n this.previewRequestSeq += 1;\n this.resolvedPreviewValues.set({});\n this.composedPreviewBodies.set({});\n this.serverPreviewByChannel.set({});\n }\n });\n\n /**\n * TipTap keeps its own document; one-way ngModel does not refresh it when the entity\n * loads, the user discards, or the active channel tab changes.\n */\n effect(() => {\n const viewMode = this.viewMode();\n const channel = this.activeChannel();\n const changeState = this.contextService.changeEvent().state;\n const body = channel ? this.getChannelBody(channel.name) : '';\n const editor = this.editorRef();\n\n if (viewMode !== 'edit' || !channel || channel.type === 'plain' || !editor) {\n this.lastSyncedViewMode = viewMode;\n return;\n }\n\n const channelChanged = channel.name !== this.lastSyncedChannel;\n const viewModeChanged = viewMode !== this.lastSyncedViewMode;\n const editorChanged = editor !== this.lastSyncedEditor;\n const contextReload = this.shouldSyncEditorFromContext(changeState);\n\n if (!channelChanged && !viewModeChanged && !editorChanged && !contextReload) {\n return;\n }\n\n untracked(() => {\n this.lastSyncedChannel = channel.name;\n this.lastSyncedViewMode = viewMode;\n this.lastSyncedEditor = editor;\n void this.applyEditorContentWhenReady(editor, body);\n });\n });\n\n this.settingsService.onChanged.subscribe(() => {\n void this.refreshChannelConfiguration();\n });\n\n this.destroyRef.onDestroy(() => this.clearSuppressEditorWritesTimer());\n }\n\n protected isChannelConfigured(name: string): boolean {\n return this.channelConfigured()[name] ?? true;\n }\n\n protected async openChannelConfigure(channel: AXMTextTemplateChannelDefinition): Promise<void> {\n const configure = channel.configureSettings;\n if (!configure) {\n return;\n }\n\n const saved = await this.settingsService.showSectionPopup({\n scope: configure.scope,\n section: configure.section,\n group: configure.group,\n });\n if (saved) {\n await this.refreshChannelConfiguration();\n }\n }\n\n private async refreshChannelConfiguration(): Promise<void> {\n const channels = this.availableChannels();\n const next: Record<string, boolean> = {};\n for (const channel of channels) {\n next[channel.name] = await this.isChannelConfiguredInternal(channel);\n }\n this.channelConfigured.set(next);\n }\n\n private async isChannelConfiguredInternal(channel: AXMTextTemplateChannelDefinition): Promise<boolean> {\n const requiredKeys = channel.requiredSettingKeys ?? [];\n if (!requiredKeys.length) {\n return true;\n }\n const scopeKey = channel.configureSettings?.scope ?? 'T';\n const scoped = this.settingsService.scope(scopeKey as AXPPlatformScope);\n for (const key of requiredKeys) {\n const value = await scoped.get(key);\n if (!this.hasNonEmptySettingValue(value)) {\n return false;\n }\n }\n return true;\n }\n\n private hasNonEmptySettingValue(value: unknown): boolean {\n if (value == null) {\n return false;\n }\n if (typeof value === 'string') {\n return value.trim().length > 0;\n }\n if (typeof value === 'number') {\n return Number.isFinite(value);\n }\n if (typeof value === 'boolean') {\n return true;\n }\n if (typeof value === 'object' && 'value' in value) {\n return this.hasNonEmptySettingValue((value as { value?: unknown }).value);\n }\n return String(value).trim().length > 0;\n }\n\n ngAfterViewInit(): void {\n const el = this.hostRef.nativeElement;\n const handleMousedown = (e: MouseEvent) => {\n const target = e.target as Node;\n if (!target || !el.contains(target)) return;\n const trigger = (target as Element).closest?.('[data-insert-var-trigger]');\n if (!trigger) return;\n this.captureCursorBeforeInsert();\n };\n el.addEventListener('mousedown', handleMousedown, { capture: true });\n this.destroyRef.onDestroy(() =>\n el.removeEventListener('mousedown', handleMousedown, { capture: true })\n );\n }\n\n override async ngOnInit(): Promise<void> {\n super.ngOnInit();\n const rawCh = this.channelProviders;\n const chProviders = rawCh == null ? [] : Array.isArray(rawCh) ? rawCh : [rawCh];\n const allChannels: AXMTextTemplateChannelDefinition[] = [];\n for (const p of chProviders) {\n if (p?.getChannels) allChannels.push(...p.getChannels());\n }\n this.availableChannels.set(\n Array.from(new Map(allChannels.map((c) => [c.name, c])).values())\n );\n await this.refreshChannelConfiguration();\n\n try {\n const tokensAccessor = this.entityService.withEntity('PlatformManagement', 'Tokens').data();\n const result = await tokensAccessor.query({ skip: 0, take: 500 });\n const items = (result.items ?? []) as Array<{\n name?: string;\n title?: string;\n sampleValue?: string;\n kind?: string;\n dataType?: string;\n }>;\n const vars: TemplateVariable[] = items\n .map((t) => ({\n name: String(t.name ?? ''),\n title: String(t.title ?? t.name ?? ''),\n sampleValue: t.sampleValue != null ? String(t.sampleValue) : undefined,\n kind: t.kind,\n dataType: t.dataType,\n }))\n .filter((v) => v.name);\n this.availableVariables.set(Array.from(new Map(vars.map((v) => [v.name, v])).values()));\n } catch {\n this.availableVariables.set([]);\n }\n\n const value = this.getValue();\n if (value && typeof value === 'object' && Object.keys(value).length > 0) {\n const names = Object.keys(value);\n const chs = this.availableChannels();\n const idx = chs.findIndex((c) => names.includes(c.name));\n if (idx >= 0) {\n this.ignoreNextChannelTabChange = true;\n this.beginSuppressEditorWrites();\n this.activeTabIndex.set(idx);\n setTimeout(() => {\n this.ignoreNextChannelTabChange = false;\n });\n }\n }\n }\n\n protected onChannelTabChanged(index: number): void {\n if (this.ignoreNextChannelTabChange || index === this.activeTabIndex()) {\n return;\n }\n this.beginSuppressEditorWrites();\n this.activeTabIndex.set(index);\n }\n\n /** Capture cursor/selection before dropdown opens (runs in mousedown capture phase) */\n private captureCursorBeforeInsert(): void {\n const ch = this.activeChannel();\n if (!ch) return;\n this.storedCursor = null;\n const active = document.activeElement as HTMLElement | null;\n if (!active) return;\n if (ch.type === 'plain') {\n const textarea = this.getTextareaElement(active);\n if (textarea) {\n this.storedCursor = {\n channelName: ch.name,\n isPlain: true,\n selectionStart: textarea.selectionStart,\n selectionEnd: textarea.selectionEnd,\n };\n }\n } else {\n const editable = this.getContentEditableElement(active);\n if (editable) {\n const sel = document.getSelection();\n if (sel && sel.rangeCount > 0) {\n const range = sel.getRangeAt(0).cloneRange();\n this.storedCursor = {\n channelName: ch.name,\n isPlain: false,\n range,\n };\n }\n }\n }\n }\n\n private getTextareaElement(el: HTMLElement): HTMLTextAreaElement | null {\n if (el instanceof HTMLTextAreaElement) return el;\n return el.querySelector?.('textarea') ?? null;\n }\n\n private getContentEditableElement(el: HTMLElement): HTMLElement | null {\n if (el.isContentEditable) return el;\n return el.closest?.('[contenteditable=\"true\"]') ?? null;\n }\n\n protected insertVariable(channelName: string, varName: string): void {\n this.insertToken(channelName, `{{${varName}}}`);\n }\n\n protected insertContentSlot(channelName: string): void {\n this.insertToken(channelName, AXM_TEXT_TEMPLATE_CONTENT_SLOT);\n }\n\n private insertToken(channelName: string, token: string): void {\n const current = this.getChannelBody(channelName);\n const stored = this.storedCursor;\n this.storedCursor = null;\n\n if (stored && stored.channelName === channelName) {\n if (stored.isPlain) {\n const start = stored.selectionStart ?? current.length;\n const end = stored.selectionEnd ?? start;\n const before = current.slice(0, start);\n const after = current.slice(end);\n const newBody = before + token + after;\n this.setChannelBody(channelName, newBody);\n const newCursor = start + token.length;\n queueMicrotask(() => this.restoreTextareaCursor(newCursor));\n } else if (stored.range) {\n try {\n const startNode = stored.range.startContainer;\n const elem = startNode.nodeType === Node.TEXT_NODE\n ? (startNode as Text).parentElement\n : (startNode as Element);\n const editable = elem?.closest?.('[contenteditable=\"true\"]') as HTMLElement | null;\n const editorHost = this.editorRef();\n const target = editable ?? editorHost?.getHostElement()?.querySelector?.('[contenteditable=\"true\"]');\n if (target) {\n (target as HTMLElement).focus();\n const sel = document.getSelection();\n if (sel) {\n sel.removeAllRanges();\n sel.addRange(stored.range);\n document.execCommand('insertText', false, token);\n }\n } else {\n this.setChannelBody(channelName, current + token);\n }\n } catch {\n this.setChannelBody(channelName, current + token);\n }\n }\n } else {\n this.setChannelBody(channelName, current + token);\n }\n }\n\n private restoreTextareaCursor(position: number): void {\n const ref = this.bodyTextareaRef();\n const el = ref?.nativeElement;\n const textarea = el?.querySelector?.('textarea') ?? (el instanceof HTMLTextAreaElement ? el : null);\n if (textarea) {\n textarea.focus();\n textarea.setSelectionRange(position, position);\n }\n }\n\n protected copyFromChannel(targetName: string, sourceName: string): void {\n const ch = this.availableChannels().find((c) => c.name === sourceName);\n if (!ch) return;\n const hasSubject = ch.hasSubject;\n if (hasSubject) {\n this.setChannelSubject(targetName, this.getChannelSubject(sourceName));\n }\n this.setChannelBody(targetName, this.getChannelBody(sourceName));\n const active = this.activeChannel();\n if (active?.name === targetName && active.type === 'rich') {\n void this.applyEditorContentWhenReady(this.editorRef(), this.getChannelBody(targetName));\n }\n }\n\n protected getChannelSubject(name: string): string {\n const v = this.getValue()?.[name];\n const raw =\n v && typeof v === 'object' && 'subject' in v ? (v as { subject?: AXPMultiLanguageString }).subject : undefined;\n return resolveTextTemplateLocalizedString(raw, this.getTemplateLocale());\n }\n\n protected handleSubjectChange(name: string, e: AXValueChangedEvent<string>): void {\n if (!e.isUserInteraction) {\n return;\n }\n this.setChannelSubject(name, e.value ?? '');\n }\n\n protected setChannelSubject(name: string, value: string): void {\n const nextText = value ?? '';\n if (this.getChannelSubject(name) === nextText) {\n return;\n }\n const current = this.getValue() || {};\n if (!current[name] && !nextText.trim()) {\n return;\n }\n const ch = current[name] || { body: '' };\n const locale = this.getTemplateLocale();\n const ml = this.normalizeChannelFieldToMl(ch.subject);\n ml[locale] = nextText;\n this.commitChannelValue(current, name, { ...ch, subject: ml });\n }\n\n protected getChannelBody(name: string): string {\n const v = this.getValue()?.[name];\n const raw =\n v && typeof v === 'object' && 'body' in v ? (v as { body?: AXPMultiLanguageString }).body : undefined;\n return resolveTextTemplateLocalizedString(raw, this.getTemplateLocale());\n }\n\n protected handlePlainBodyChange(name: string, e: AXValueChangedEvent<string>): void {\n if (!e.isUserInteraction) {\n return;\n }\n this.setChannelBody(name, e.value ?? '');\n }\n\n protected handleEditorChange(name: string, e: AXValueChangedEvent<string>): void {\n if (this.suppressEditorWrites || !e.isUserInteraction) {\n return;\n }\n const val =\n typeof e === 'object' && e !== null && 'value' in e\n ? ((e as { value: string | null }).value ?? '')\n : String(e ?? '');\n this.setChannelBody(name, val);\n }\n\n protected setChannelBody(name: string, value: string): void {\n const nextText = value ?? '';\n if (this.getChannelBody(name) === nextText) {\n return;\n }\n const current = this.getValue() || {};\n if (!current[name] && !nextText.trim()) {\n return;\n }\n const ch = current[name] || { body: '' };\n const locale = this.getTemplateLocale();\n const ml = this.normalizeChannelFieldToMl(ch.body);\n ml[locale] = nextText;\n this.commitChannelValue(current, name, { ...ch, body: ml });\n }\n\n private commitChannelValue(\n current: AXMTextTemplateChannelsValue,\n name: string,\n nextChannel: AXMTextTemplateChannelsValue[string],\n ): void {\n const nextValue = { ...current, [name]: nextChannel };\n if (isFormValueEqual(nextValue, current)) {\n return;\n }\n const path = this.fullPath();\n const saved = path ? this.contextService.getSavedValue(path) : undefined;\n if (saved !== undefined && isFormValueEqual(nextValue, saved)) {\n return;\n }\n this.setValue(nextValue);\n }\n\n private shouldSyncEditorFromContext(state: AXPContextState): boolean {\n return state === 'restored' || state === 'initiated';\n }\n\n private beginSuppressEditorWrites(): void {\n this.suppressEditorWrites = true;\n this.clearSuppressEditorWritesTimer();\n this.suppressEditorWritesTimer = setTimeout(() => {\n this.suppressEditorWrites = false;\n this.suppressEditorWritesTimer = null;\n }, 500);\n }\n\n private clearSuppressEditorWritesTimer(): void {\n if (this.suppressEditorWritesTimer) {\n clearTimeout(this.suppressEditorWritesTimer);\n this.suppressEditorWritesTimer = null;\n }\n }\n\n private async applyEditorContentWhenReady(\n host: AXTextEditorComponent | undefined,\n text: string,\n ): Promise<void> {\n const content = text ?? '';\n\n for (let attempt = 0; attempt < 30; attempt++) {\n const editor = this.editorRef() ?? host;\n if (!editor?.getEditor()) {\n await new Promise((resolve) => setTimeout(resolve, 50));\n continue;\n }\n\n this.beginSuppressEditorWrites();\n editor.getEditorService().setContent(content, false);\n return;\n }\n }\n\n /**\n * Prefer server draft Preview (Context tokens + Event samples + parent composition).\n * Falls back to local compose when the command fails.\n */\n private async loadServerPreview(): Promise<void> {\n const requestSeq = ++this.previewRequestSeq;\n const value = this.getValue();\n const channel = this.activeChannel()?.name?.trim() || '';\n if (!value || typeof value !== 'object' || !channel) {\n this.serverPreviewByChannel.set({});\n this.composedPreviewBodies.set({});\n return;\n }\n\n const locale = this.getTemplateLocale();\n const parentIdRaw = this.contextService.getValue('parentId');\n const parentId = typeof parentIdRaw === 'string' ? parentIdRaw.trim() : '';\n const kindRaw = this.contextService.getValue('kind');\n const kind = typeof kindRaw === 'string' ? kindRaw.trim() : undefined;\n\n const request: AXMTextTemplatePreviewRequest = {\n channels: value,\n channel,\n locale,\n ...(parentId ? { parentId } : {}),\n ...(kind ? { kind } : {}),\n };\n\n try {\n const result = await this.commandExecutor.execute<\n AXMTextTemplatePreviewRequest,\n AXMTextTemplatePreviewResult\n >(AXM_TEXT_TEMPLATE_PREVIEW_COMMAND_KEY, request);\n\n if (requestSeq !== this.previewRequestSeq) {\n return;\n }\n\n const preview = runtimeCommandPayloadData(result);\n if (preview?.body != null) {\n this.serverPreviewByChannel.update((prev) => ({\n ...prev,\n [channel]: {\n ...(preview.subject != null ? { subject: preview.subject } : {}),\n body: preview.body,\n },\n }));\n return;\n }\n\n const message =\n typeof result?.message?.text === 'string' && result.message.text.trim()\n ? result.message.text.trim()\n : undefined;\n await this.fallbackToLocalPreview(channel, message);\n } catch (error) {\n if (requestSeq !== this.previewRequestSeq) {\n return;\n }\n const message = error instanceof Error ? error.message : undefined;\n await this.fallbackToLocalPreview(channel, message);\n }\n }\n\n private async fallbackToLocalPreview(channel: string, errorMessage?: string): Promise<void> {\n const title = await this.translationService.translateAsync(\n '@content-management:templates.messages.preview-failed.title',\n );\n const content = await this.translationService.translateAsync(\n '@content-management:templates.messages.preview-failed.content',\n );\n this.toastService.show({\n color: 'warning',\n title,\n content: errorMessage ? `${content} ${errorMessage}` : content,\n closeButton: true,\n timeOut: 5000,\n });\n\n this.serverPreviewByChannel.update((prev) => {\n const next = { ...prev };\n delete next[channel];\n return next;\n });\n await this.resolveComposedPreviewBodies();\n }\n\n /** Resolve variable values for local preview fallback */\n private async resolvePreviewVariables(): Promise<void> {\n const value = this.getValue();\n if (!value || typeof value !== 'object') return;\n const locale = this.getTemplateLocale();\n const parts: string[] = [];\n for (const v of Object.values(value)) {\n if (v != null && typeof v === 'object' && 'body' in v) {\n const o = v as { subject?: AXPMultiLanguageString; body?: AXPMultiLanguageString };\n parts.push(resolveTextTemplateLocalizedString(o.subject, locale));\n parts.push(resolveTextTemplateLocalizedString(o.body, locale));\n }\n }\n for (const body of Object.values(this.composedPreviewBodies())) {\n parts.push(body);\n }\n const allText = parts.join('');\n const varNames = collectTextTemplatePlaceholderNames(allText);\n if (varNames.length === 0) return;\n const vars = this.availableVariables();\n const resolved: Record<string, string> = {};\n const svc = this.tokenDefinitionService;\n for (const name of varNames) {\n try {\n if (svc) {\n const val = await svc.getValue(name);\n resolved[name] = val != null ? String(val) : '';\n }\n } catch {\n /* use fallback */\n }\n if (!(name in resolved) || !resolved[name]) {\n const v = vars.find((x) => x.name === name);\n if (v?.sampleValue != null) {\n resolved[name] = v.sampleValue;\n } else if (!(name in resolved)) {\n resolved[name] = '';\n }\n }\n }\n this.resolvedPreviewValues.update((prev) => ({ ...prev, ...resolved }));\n }\n\n /**\n * Local fallback: loads optional parent masters and stores leaf→root body chains per channel.\n */\n private async resolveComposedPreviewBodies(): Promise<void> {\n const value = this.getValue();\n if (!value || typeof value !== 'object') {\n this.composedPreviewBodies.set({});\n return;\n }\n\n const parentIdRaw = this.contextService.getValue('parentId');\n const parentId = typeof parentIdRaw === 'string' ? parentIdRaw.trim() : '';\n const locale = this.getTemplateLocale();\n const next: Record<string, string> = {};\n\n if (!parentId) {\n for (const channelName of Object.keys(value)) {\n next[channelName] = this.getChannelBody(channelName);\n }\n this.composedPreviewBodies.set(next);\n await this.resolvePreviewVariables();\n return;\n }\n\n const parentBodiesByChannel: Record<string, string[]> = {};\n try {\n const accessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.textTemplate.name)\n .data<\n string,\n AXMTextTemplateEntityModel,\n AXMTextTemplateEntityModel,\n AXMTextTemplateEntityModel,\n AXMTextTemplateEntityModel\n >();\n\n const visited = new Set<string>();\n const selfIdRaw = this.contextService.getValue('id');\n const selfId = typeof selfIdRaw === 'string' ? selfIdRaw.trim() : '';\n if (selfId) {\n visited.add(selfId);\n }\n\n let currentId: string | null = parentId;\n let depth = 1;\n while (currentId && depth <= AXM_TEXT_TEMPLATE_MAX_PARENT_DEPTH) {\n if (visited.has(currentId)) {\n break;\n }\n visited.add(currentId);\n const parent = await accessor.byKey(currentId);\n if (!parent?.channels) {\n break;\n }\n for (const [channelName, channelDef] of Object.entries(parent.channels)) {\n const body = resolveTextTemplateLocalizedString(channelDef?.body, locale);\n if (!body) continue;\n (parentBodiesByChannel[channelName] ??= []).push(body);\n }\n currentId = parent.parentId?.trim() || null;\n depth += 1;\n }\n } catch {\n /* keep leaf-only preview */\n }\n\n for (const channelName of Object.keys(value)) {\n const leafBody = this.getChannelBody(channelName);\n const parents = parentBodiesByChannel[channelName] ?? [];\n next[channelName] = composeTextTemplateBodyChain([leafBody, ...parents]);\n }\n this.composedPreviewBodies.set(next);\n await this.resolvePreviewVariables();\n }\n\n /** Get preview value for variable: expression/token first, then sampleValue */\n private getPreviewValue(varName: string): string {\n const resolved = this.resolvedPreviewValues()[varName];\n if (resolved !== undefined && resolved !== '') return resolved;\n const v = this.availableVariables().find((x) => x.name === varName);\n return v?.sampleValue ?? `{{${varName}}}`;\n }\n\n /**\n * Merge map for interpolating `{{ path }}` in `text`.\n * When `escapeMergeValuesForHtml` is true, substitution values are escaped for safe `innerHTML` fragments.\n */\n private previewMergeFor(text: string, escapeMergeValuesForHtml: boolean): Record<string, string> {\n const out: Record<string, string> = {};\n for (const name of collectTextTemplatePlaceholderNames(text)) {\n let v = this.getPreviewValue(name);\n if (escapeMergeValuesForHtml) {\n v = v.replace(/</g, '<').replace(/>/g, '>');\n }\n out[name] = v;\n }\n return out;\n }\n\n protected previewSubject(channelName: string): string {\n const server = this.serverPreviewByChannel()[channelName];\n if (server?.subject != null) {\n return server.subject;\n }\n return this.previewText(this.getChannelSubject(channelName));\n }\n\n protected previewText(text: string): string {\n return replaceTextTemplatePlaceholders(text, this.previewMergeFor(text, false));\n }\n\n /**\n * Email/rich preview must bypass Angular's default innerHTML sanitizer;\n * otherwise inline `style` (colors, gradients, header bar) is stripped and\n * the preview diverges from the real sent email.\n */\n protected previewBodyHtml(channelName: string): SafeHtml | string {\n const ch = this.availableChannels().find((c) => c.name === channelName);\n const server = this.serverPreviewByChannel()[channelName];\n if (server?.body != null) {\n if (ch?.type === 'rich') {\n return this.sanitizer.bypassSecurityTrustHtml(server.body);\n }\n return server.body\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\\n/g, '<br/>');\n }\n\n const composed = this.composedPreviewBodies()[channelName];\n const body = composed ?? this.getChannelBody(channelName);\n // Local fallback: do not escape data for rich HTML (logo mark / styled shells).\n const merged = renderTextTemplateSource(\n body,\n this.previewMergeFor(body, ch?.type !== 'rich'),\n );\n if (ch?.type === 'rich') {\n return this.sanitizer.bypassSecurityTrustHtml(merged);\n }\n return merged\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\\n/g, '<br/>');\n }\n}\n","<!-- Template Content Editor: Channel tabs and content per channel -->\n<div class=\"flex flex-col gap-4 w-full\">\n <!-- Channel tabs navigation -->\n <div class=\"flex items-center gap-2 flex-wrap\">\n <ax-tabs\n [look]=\"'with-line'\"\n (onActiveTabChanged)=\"onChannelTabChanged($event.index)\"\n class=\"flex-1 min-w-0\"\n >\n @for (ch of availableChannels(); track ch.name; let i = $index) {\n <ax-tab-item\n [text]=\"(ch.title | translate | async) ?? ch.name\"\n [key]=\"i.toString()\"\n [active]=\"activeTabIndex() === i\"\n ></ax-tab-item>\n }\n </ax-tabs>\n </div>\n\n @if (activeChannel(); as ch) {\n <!-- Channel content area: Edit mode or Preview mode -->\n <div class=\"mb-4 p-4\">\n @if (!isChannelConfigured(ch.name) && ch.notConfiguredMessageKey) {\n <div\n class=\"mb-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 p-3 rounded border border-amber-300 bg-amber-50 dark:border-amber-700 dark:bg-amber-950/30\"\n >\n <p class=\"text-sm text-amber-900 dark:text-amber-100\">\n {{ ch.notConfiguredMessageKey | translate | async }}\n </p>\n @if (ch.configureSettings) {\n <ax-button\n [text]=\"\n '@content-management:templates.actions.configure-channel'\n | translate\n | async\n \"\n look=\"outline\"\n color=\"primary\"\n size=\"sm\"\n (onClick)=\"openChannelConfigure(ch)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-gear\"></ax-icon>\n </ax-prefix>\n </ax-button>\n }\n </div>\n }\n\n @if (viewMode() === 'edit') {\n <!-- Edit mode: Subject field (for channels that support it, e.g. Email) -->\n @if (ch.hasSubject) {\n <div class=\"mb-3\">\n <label class=\"block text-sm mb-1\">\n {{\n '@content-management:templates.entities.text-template.fields.subject.title'\n | translate\n | async\n }}\n </label>\n <ax-text-box\n [ngModel]=\"getChannelSubject(ch.name)\"\n (onValueChanged)=\"handleSubjectChange(ch.name, $event)\"\n [placeholder]=\"\n ('@content-management:templates.entities.text-template.fields.subject.placeholder'\n | translate\n | async)!\n \"\n ></ax-text-box>\n </div>\n }\n\n <!-- Edit mode: Body field (plain text or rich text-editor) -->\n <div>\n <label class=\"block text-sm mb-1\">\n {{\n '@content-management:templates.entities.text-template.fields.body.title'\n | translate\n | async\n }}\n </label>\n <!--->\n <!-- ----- Plain-text body for SMS-style channels ----- -->\n @if (ch.type === 'plain') {\n <ax-text-area\n #bodyTextarea\n [ngModel]=\"getChannelBody(ch.name)\"\n (onValueChanged)=\"handlePlainBodyChange(ch.name, $event)\"\n [rows]=\"8\"\n [placeholder]=\"\n ('@content-management:templates.entities.text-template.fields.body-placeholder.plain'\n | translate\n | async)!\n \"\n ></ax-text-area>\n }\n <!-- ----- Recreate the rich editor per channel so tab switches do not keep the previous HTML ----- -->\n @else {\n @for (channelName of [ch.name]; track channelName) {\n <ax-text-editor\n #editorRef\n outputFormat=\"html\"\n [placeHolder]=\"\n ('@content-management:templates.entities.text-template.fields.body-placeholder.rich'\n | translate\n | async)!\n \"\n [ngModel]=\"getChannelBody(channelName)\"\n (onValueChanged)=\"handleEditorChange(channelName, $event)\"\n [look]=\"'solid'\"\n [initialLine]=\"8\"\n >\n <ax-text-editor-content [style.min-height.px]=\"200\"></ax-text-editor-content>\n <ax-text-editor-toolbar>\n <ax-prefix>\n <ax-text-editor-history></ax-text-editor-history>\n <ax-text-editor-font-style></ax-text-editor-font-style>\n <ax-text-editor-list></ax-text-editor-list>\n </ax-prefix>\n </ax-text-editor-toolbar>\n </ax-text-editor>\n }\n }\n </div>\n } @else {\n <!-- Preview mode: Rendered content with variable placeholders replaced by sample values -->\n <div class=\"space-y-2\">\n @if (ch.hasSubject && previewSubject(ch.name)) {\n <div>\n <span class=\"text-xs text-gray-500\"\n >{{\n '@content-management:templates.entities.text-template.fields.subject.title'\n | translate\n | async\n }}:\n </span>\n <span class=\"text-sm\">{{ previewSubject(ch.name) }}</span>\n </div>\n }\n <!-- ----- Rich email keeps inline styles; plain channels use pre-wrap ----- -->\n <div\n class=\"text-sm p-3 bg-gray-100 dark:bg-gray-900 rounded border overflow-auto\"\n [class.whitespace-pre-wrap]=\"ch.type !== 'rich'\"\n [innerHTML]=\"previewBodyHtml(ch.name)\"\n ></div>\n </div>\n }\n </div>\n\n <!-- Footer: Action buttons (left) + Edit/Preview toggle (right) in single row -->\n <div\n class=\"flex flex-nowrap items-center justify-between gap-3 pt-3 mt-1 border-t border-gray-200 dark:border-gray-700\"\n >\n <div class=\"flex flex-nowrap items-center gap-2 min-w-0\">\n @if (viewMode() === 'edit') {\n <!-- ----- Insert variable dropdown from platform tokens ----- -->\n <div data-insert-var-trigger>\n <ax-button\n [text]=\"\n '@content-management:templates.actions.insert-variable'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-code\"></ax-icon>\n </ax-prefix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for (v of availableVariables(); track v.name) {\n <ax-button-item\n look=\"blank\"\n color=\"default\"\n [text]=\"(v.title || v.name) + ' ({{' + v.name + '}})'\"\n (onClick)=\"insertVariable(ch.name, v.name)\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"getVariableIcon(v)\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n <ax-suffix>\n <ax-icon icon=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n </ax-button>\n </div>\n <!--->\n <!-- ----- Insert reserved [content] slot for master templates ----- -->\n @if (isMasterKind()) {\n <div data-insert-var-trigger>\n <ax-button\n [text]=\"\n '@content-management:templates.actions.insert-content-slot'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n (onClick)=\"insertContentSlot(ch.name)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-layer-group\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n }\n <!--->\n <!-- ----- Copy subject/body from another channel ----- -->\n @if (otherChannelsWithContent(ch.name).length > 0) {\n <ax-button\n [text]=\"\n '@content-management:templates.actions.copy-from'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-copy\"></ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-icon icon=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for (\n src of otherChannelsWithContent(ch.name);\n track src.name\n ) {\n <ax-button-item\n look=\"blank\"\n color=\"default\"\n [text]=\"(src.title | translate | async) ?? src.name\"\n (onClick)=\"copyFromChannel(ch.name, src.name)\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"getChannelIcon(src)\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n }\n </div>\n <div>\n <ax-tabs [look]=\"'default'\">\n <ax-tab-item\n [text]=\"\n ('@content-management:templates.actions.edit'\n | translate\n | async) ?? 'Edit'\n \"\n [active]=\"viewMode() === 'edit'\"\n (onClick)=\"viewMode.set('edit')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-pen\" class=\"text-current\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n <ax-tab-item\n [text]=\"\n ('@content-management:templates.actions.preview'\n | translate\n | async) ?? 'Preview'\n \"\n [active]=\"viewMode() === 'preview'\"\n (onClick)=\"viewMode.set('preview')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-eye\" class=\"text-current\"></ax-icon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AAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAC5B,cAAc,EAAA,EAAA,GAAE,EAAE,IAAI,GAAE,UAAuB,CAAA,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-B1Q4_HTa.mjs","sources":["../../../../libs/modules/content-management/client/src/lib/features/template-content-editor/template-content-editor-widget-edit.component.ts","../../../../libs/modules/content-management/client/src/lib/features/template-content-editor/template-content-editor-widget-edit.component.html"],"sourcesContent":["import { AXButtonModule } from '@acorex/components/button';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\nimport { AXDropdownModule } from '@acorex/components/dropdown';\nimport { AXFormModule } from '@acorex/components/form';\nimport { AXTabsModule } from '@acorex/components/tabs';\nimport { AXTextAreaModule } from '@acorex/components/text-area';\nimport { AXTextBoxModule } from '@acorex/components/text-box';\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXTextEditorComponent, AXTextEditorModule } from '@acorex/components/text-editor';\nimport { AXTranslationModule, AXTranslationService } from '@acorex/core/translation';\nimport { AXValidationModule } from '@acorex/core/validation';\nimport { AXPSettingsService, AXPTokenDefinitionService } from '@acorex-platform/framework-client/common';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AXPCommandExecutor } from '@acorex-platform/framework-client/runtime';\nimport { CommonModule } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n ElementRef,\n effect,\n inject,\n OnInit,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { DomSanitizer, type SafeHtml } from '@angular/platform-browser';\nimport { FormsModule } from '@angular/forms';\nimport { AXValueChangedEvent } from '@acorex/cdk/common';\nimport {\n AXPContextState,\n AXPPlatformScope,\n isFormValueEqual,\n runtimeCommandPayloadData,\n type AXPMultiLanguageString,\n} from '@acorex-platform/framework-shared/core';\nimport {\n AXM_TEXT_TEMPLATE_PREVIEW_COMMAND_KEY,\n RootConfig,\n type AXMTextTemplatePreviewRequest,\n type AXMTextTemplatePreviewResult,\n} from '@acorex-platform/module-content-management-client/contracts';\nimport { AXP_TEXT_TEMPLATE_CHANNEL_DEFINITION_PROVIDER } from './channel-definition.provider';\nimport {\n AXMTextTemplateChannelDefinition,\n AXMTextTemplateChannelsValue,\n} from './channel-definition.types';\nimport {\n AXM_TEXT_TEMPLATE_CONTENT_SLOT,\n AXM_TEXT_TEMPLATE_KIND,\n AXM_TEXT_TEMPLATE_MAX_PARENT_DEPTH,\n collectTextTemplatePlaceholderNames,\n composeTextTemplateBodyChain,\n renderTextTemplateSource,\n replaceTextTemplatePlaceholders,\n resolveTextTemplateLocalizedString,\n type AXMTextTemplateEntityModel,\n} from './text-template-placeholder.util';\n\n/** Variable definition from PlatformManagement.Tokens for template preview and Insert variable */\ninterface TemplateVariable {\n name: string;\n title: string;\n sampleValue?: string;\n kind?: string;\n dataType?: string;\n}\n\n@Component({\n selector: 'axm-template-content-editor-widget-edit',\n templateUrl: './template-content-editor-widget-edit.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n CommonModule,\n AXDecoratorModule,\n FormsModule,\n AXFormModule,\n AXTabsModule,\n AXTextAreaModule,\n AXTextBoxModule,\n AXTextEditorModule,\n AXValidationModule,\n AXTranslationModule,\n AXButtonModule,\n AXDropdownModule,\n ],\n})\nexport class AXMTemplateContentEditorWidgetEditComponent\n extends AXPValueWidgetComponent<AXMTextTemplateChannelsValue | null>\n implements OnInit, AfterViewInit\n{\n /** Stored cursor/selection state before Insert Variable dropdown opens */\n private storedCursor: {\n channelName: string;\n isPlain: boolean;\n selectionStart?: number;\n selectionEnd?: number;\n range?: Range;\n } | null = null;\n private readonly channelProviders = inject(AXP_TEXT_TEMPLATE_CHANNEL_DEFINITION_PROVIDER, {\n optional: true,\n });\n private readonly settingsService = inject(AXPSettingsService);\n private readonly translationService = inject(AXTranslationService);\n private readonly entityService = inject(AXPEntityService);\n private readonly tokenDefinitionService = inject(AXPTokenDefinitionService, { optional: true });\n private readonly commandExecutor = inject(AXPCommandExecutor);\n private readonly toastService = inject(AXToastService);\n private readonly sanitizer = inject(DomSanitizer);\n private readonly destroyRef = inject(DestroyRef);\n private readonly hostRef = inject(ElementRef<HTMLElement>);\n\n /** Dedupes in-flight preview loads when effect re-runs. */\n private previewRequestSeq = 0;\n\n /**\n * TipTap `commitValue(html, true)` marks hydration as a user edit.\n * Ignore writes until that timer elapses after a programmatic sync.\n */\n private suppressEditorWrites = false;\n private suppressEditorWritesTimer: ReturnType<typeof setTimeout> | null = null;\n\n private lastSyncedChannel: string | null = null;\n private lastSyncedViewMode: 'edit' | 'preview' | null = null;\n private lastSyncedEditor: AXTextEditorComponent | undefined;\n /** Drops the ax-tabs init event so it cannot overwrite the content-channel tab. */\n private ignoreNextChannelTabChange = false;\n\n protected editorRef = viewChild<AXTextEditorComponent>('editorRef');\n protected bodyTextareaRef = viewChild('bodyTextarea', { read: ElementRef<HTMLElement> });\n\n protected availableChannels = signal<AXMTextTemplateChannelDefinition[]>([]);\n protected channelConfigured = signal<Record<string, boolean>>({});\n protected availableVariables = signal<TemplateVariable[]>([]);\n protected activeTabIndex = signal<number>(0);\n protected viewMode = signal<'edit' | 'preview'>('edit');\n\n /** Resolved values for local preview fallback: expression/token evaluation, then sampleValue */\n protected resolvedPreviewValues = signal<Record<string, string>>({});\n\n /** Parent-chain bodies (leaf → root) for the active locale, keyed by channel (local fallback). */\n protected composedPreviewBodies = signal<Record<string, string>>({});\n\n /** Server Preview results keyed by channel (preferred over local compose). */\n protected serverPreviewByChannel = signal<\n Record<string, { subject?: string; body: string }>\n >({});\n\n protected activeChannel = computed(() => {\n const idx = this.activeTabIndex();\n const chs = this.availableChannels();\n return chs[idx] ?? null;\n });\n\n /** True when the host entity form has Kind = Master. */\n protected isMasterKind = computed(() => {\n this.contextService.changeEvent();\n const kind = this.contextService.getValue('kind');\n return kind === AXM_TEXT_TEMPLATE_KIND.Master;\n });\n\n protected otherChannelsWithContent = (currentName: string) =>\n this.availableChannels().filter(\n (c) => c.name !== currentName && (this.getChannelBody(c.name) || (c.hasSubject && this.getChannelSubject(c.name)))\n );\n\n /** Returns icon class for a variable/token based on kind and dataType */\n protected getVariableIcon(v: TemplateVariable): string {\n const kindMap: Record<string, string> = {\n Static: 'fa-light fa-database',\n Context: 'fa-light fa-layer-group',\n Event: 'fa-light fa-bolt',\n Computed: 'fa-light fa-calculator',\n Secret: 'fa-light fa-key',\n };\n const dataTypeMap: Record<string, string> = {\n String: 'fa-light fa-font',\n Integer: 'fa-light fa-hashtag',\n Boolean: 'fa-light fa-toggle-on',\n Decimal: 'fa-light fa-calculator',\n DateTime: 'fa-light fa-clock',\n Json: 'fa-light fa-braces',\n };\n const byKind = v.kind && kindMap[v.kind];\n if (byKind) return byKind;\n const byDataType = v.dataType && dataTypeMap[v.dataType];\n if (byDataType) return byDataType;\n return 'fa-light fa-code';\n }\n\n /** Returns icon class for a channel based on name and type */\n protected getChannelIcon(ch: AXMTextTemplateChannelDefinition): string {\n const nameMap: Record<string, string> = {\n email: 'fa-light fa-envelope',\n sms: 'fa-light fa-comment-sms',\n whatsapp: 'fa-brands fa-whatsapp',\n push: 'fa-light fa-bell',\n telegram: 'fa-brands fa-telegram',\n 'in-app': 'fa-light fa-inbox',\n };\n const byName = nameMap[ch.name?.toLowerCase() ?? ''];\n if (byName) return byName;\n return ch.type === 'rich' ? 'fa-light fa-file-lines' : 'fa-light fa-align-left';\n }\n\n private getTemplateLocale(): string {\n return this.translationService.getActiveLang() ?? 'en-US';\n }\n\n /**\n * Builds a mutable locale map from a stored channel field (string legacy or ML object).\n */\n private normalizeChannelFieldToMl(\n existing: AXPMultiLanguageString | string | undefined,\n ): Record<string, string> {\n if (existing == null || existing === '') {\n return {};\n }\n if (typeof existing === 'string') {\n const s = existing;\n return { 'en-US': s, 'fa-IR': s };\n }\n return { ...(existing as Record<string, string>) };\n }\n\n constructor() {\n super();\n effect(() => {\n this.viewMode();\n this.activeTabIndex();\n this.getValue();\n this.contextService.changeEvent();\n if (this.viewMode() === 'preview') {\n void this.loadServerPreview();\n } else {\n this.previewRequestSeq += 1;\n this.resolvedPreviewValues.set({});\n this.composedPreviewBodies.set({});\n this.serverPreviewByChannel.set({});\n }\n });\n\n /**\n * TipTap keeps its own document; one-way ngModel does not refresh it when the entity\n * loads, the user discards, or the active channel tab changes.\n */\n effect(() => {\n const viewMode = this.viewMode();\n const channel = this.activeChannel();\n const changeState = this.contextService.changeEvent().state;\n const body = channel ? this.getChannelBody(channel.name) : '';\n const editor = this.editorRef();\n\n if (viewMode !== 'edit' || !channel || channel.type === 'plain' || !editor) {\n this.lastSyncedViewMode = viewMode;\n return;\n }\n\n const channelChanged = channel.name !== this.lastSyncedChannel;\n const viewModeChanged = viewMode !== this.lastSyncedViewMode;\n const editorChanged = editor !== this.lastSyncedEditor;\n const contextReload = this.shouldSyncEditorFromContext(changeState);\n\n if (!channelChanged && !viewModeChanged && !editorChanged && !contextReload) {\n return;\n }\n\n untracked(() => {\n this.lastSyncedChannel = channel.name;\n this.lastSyncedViewMode = viewMode;\n this.lastSyncedEditor = editor;\n void this.applyEditorContentWhenReady(editor, body);\n });\n });\n\n this.settingsService.onChanged.subscribe(() => {\n void this.refreshChannelConfiguration();\n });\n\n this.destroyRef.onDestroy(() => this.clearSuppressEditorWritesTimer());\n }\n\n protected isChannelConfigured(name: string): boolean {\n return this.channelConfigured()[name] ?? true;\n }\n\n protected async openChannelConfigure(channel: AXMTextTemplateChannelDefinition): Promise<void> {\n const configure = channel.configureSettings;\n if (!configure) {\n return;\n }\n\n const saved = await this.settingsService.showSectionPopup({\n scope: configure.scope,\n section: configure.section,\n group: configure.group,\n });\n if (saved) {\n await this.refreshChannelConfiguration();\n }\n }\n\n private async refreshChannelConfiguration(): Promise<void> {\n const channels = this.availableChannels();\n const next: Record<string, boolean> = {};\n for (const channel of channels) {\n next[channel.name] = await this.isChannelConfiguredInternal(channel);\n }\n this.channelConfigured.set(next);\n }\n\n private async isChannelConfiguredInternal(channel: AXMTextTemplateChannelDefinition): Promise<boolean> {\n const requiredKeys = channel.requiredSettingKeys ?? [];\n if (!requiredKeys.length) {\n return true;\n }\n const scopeKey = channel.configureSettings?.scope ?? 'T';\n const scoped = this.settingsService.scope(scopeKey as AXPPlatformScope);\n for (const key of requiredKeys) {\n const value = await scoped.get(key);\n if (!this.hasNonEmptySettingValue(value)) {\n return false;\n }\n }\n return true;\n }\n\n private hasNonEmptySettingValue(value: unknown): boolean {\n if (value == null) {\n return false;\n }\n if (typeof value === 'string') {\n return value.trim().length > 0;\n }\n if (typeof value === 'number') {\n return Number.isFinite(value);\n }\n if (typeof value === 'boolean') {\n return true;\n }\n if (typeof value === 'object' && 'value' in value) {\n return this.hasNonEmptySettingValue((value as { value?: unknown }).value);\n }\n return String(value).trim().length > 0;\n }\n\n ngAfterViewInit(): void {\n const el = this.hostRef.nativeElement;\n const handleMousedown = (e: MouseEvent) => {\n const target = e.target as Node;\n if (!target || !el.contains(target)) return;\n const trigger = (target as Element).closest?.('[data-insert-var-trigger]');\n if (!trigger) return;\n this.captureCursorBeforeInsert();\n };\n el.addEventListener('mousedown', handleMousedown, { capture: true });\n this.destroyRef.onDestroy(() =>\n el.removeEventListener('mousedown', handleMousedown, { capture: true })\n );\n }\n\n override async ngOnInit(): Promise<void> {\n super.ngOnInit();\n const rawCh = this.channelProviders;\n const chProviders = rawCh == null ? [] : Array.isArray(rawCh) ? rawCh : [rawCh];\n const allChannels: AXMTextTemplateChannelDefinition[] = [];\n for (const p of chProviders) {\n if (p?.getChannels) allChannels.push(...p.getChannels());\n }\n this.availableChannels.set(\n Array.from(new Map(allChannels.map((c) => [c.name, c])).values())\n );\n await this.refreshChannelConfiguration();\n\n try {\n const tokensAccessor = this.entityService.withEntity('PlatformManagement', 'Tokens').data();\n const result = await tokensAccessor.query({ skip: 0, take: 500 });\n const items = (result.items ?? []) as Array<{\n name?: string;\n title?: string;\n sampleValue?: string;\n kind?: string;\n dataType?: string;\n }>;\n const vars: TemplateVariable[] = items\n .map((t) => ({\n name: String(t.name ?? ''),\n title: String(t.title ?? t.name ?? ''),\n sampleValue: t.sampleValue != null ? String(t.sampleValue) : undefined,\n kind: t.kind,\n dataType: t.dataType,\n }))\n .filter((v) => v.name);\n this.availableVariables.set(Array.from(new Map(vars.map((v) => [v.name, v])).values()));\n } catch {\n this.availableVariables.set([]);\n }\n\n const value = this.getValue();\n if (value && typeof value === 'object' && Object.keys(value).length > 0) {\n const names = Object.keys(value);\n const chs = this.availableChannels();\n const idx = chs.findIndex((c) => names.includes(c.name));\n if (idx >= 0) {\n this.ignoreNextChannelTabChange = true;\n this.beginSuppressEditorWrites();\n this.activeTabIndex.set(idx);\n setTimeout(() => {\n this.ignoreNextChannelTabChange = false;\n });\n }\n }\n }\n\n protected onChannelTabChanged(index: number): void {\n if (this.ignoreNextChannelTabChange || index === this.activeTabIndex()) {\n return;\n }\n this.beginSuppressEditorWrites();\n this.activeTabIndex.set(index);\n }\n\n /** Capture cursor/selection before dropdown opens (runs in mousedown capture phase) */\n private captureCursorBeforeInsert(): void {\n const ch = this.activeChannel();\n if (!ch) return;\n this.storedCursor = null;\n const active = document.activeElement as HTMLElement | null;\n if (!active) return;\n if (ch.type === 'plain') {\n const textarea = this.getTextareaElement(active);\n if (textarea) {\n this.storedCursor = {\n channelName: ch.name,\n isPlain: true,\n selectionStart: textarea.selectionStart,\n selectionEnd: textarea.selectionEnd,\n };\n }\n } else {\n const editable = this.getContentEditableElement(active);\n if (editable) {\n const sel = document.getSelection();\n if (sel && sel.rangeCount > 0) {\n const range = sel.getRangeAt(0).cloneRange();\n this.storedCursor = {\n channelName: ch.name,\n isPlain: false,\n range,\n };\n }\n }\n }\n }\n\n private getTextareaElement(el: HTMLElement): HTMLTextAreaElement | null {\n if (el instanceof HTMLTextAreaElement) return el;\n return el.querySelector?.('textarea') ?? null;\n }\n\n private getContentEditableElement(el: HTMLElement): HTMLElement | null {\n if (el.isContentEditable) return el;\n return el.closest?.('[contenteditable=\"true\"]') ?? null;\n }\n\n protected insertVariable(channelName: string, varName: string): void {\n this.insertToken(channelName, `{{${varName}}}`);\n }\n\n protected insertContentSlot(channelName: string): void {\n this.insertToken(channelName, AXM_TEXT_TEMPLATE_CONTENT_SLOT);\n }\n\n private insertToken(channelName: string, token: string): void {\n const current = this.getChannelBody(channelName);\n const stored = this.storedCursor;\n this.storedCursor = null;\n\n if (stored && stored.channelName === channelName) {\n if (stored.isPlain) {\n const start = stored.selectionStart ?? current.length;\n const end = stored.selectionEnd ?? start;\n const before = current.slice(0, start);\n const after = current.slice(end);\n const newBody = before + token + after;\n this.setChannelBody(channelName, newBody);\n const newCursor = start + token.length;\n queueMicrotask(() => this.restoreTextareaCursor(newCursor));\n } else if (stored.range) {\n try {\n const startNode = stored.range.startContainer;\n const elem = startNode.nodeType === Node.TEXT_NODE\n ? (startNode as Text).parentElement\n : (startNode as Element);\n const editable = elem?.closest?.('[contenteditable=\"true\"]') as HTMLElement | null;\n const editorHost = this.editorRef();\n const target = editable ?? editorHost?.getHostElement()?.querySelector?.('[contenteditable=\"true\"]');\n if (target) {\n (target as HTMLElement).focus();\n const sel = document.getSelection();\n if (sel) {\n sel.removeAllRanges();\n sel.addRange(stored.range);\n document.execCommand('insertText', false, token);\n }\n } else {\n this.setChannelBody(channelName, current + token);\n }\n } catch {\n this.setChannelBody(channelName, current + token);\n }\n }\n } else {\n this.setChannelBody(channelName, current + token);\n }\n }\n\n private restoreTextareaCursor(position: number): void {\n const ref = this.bodyTextareaRef();\n const el = ref?.nativeElement;\n const textarea = el?.querySelector?.('textarea') ?? (el instanceof HTMLTextAreaElement ? el : null);\n if (textarea) {\n textarea.focus();\n textarea.setSelectionRange(position, position);\n }\n }\n\n protected copyFromChannel(targetName: string, sourceName: string): void {\n const ch = this.availableChannels().find((c) => c.name === sourceName);\n if (!ch) return;\n const hasSubject = ch.hasSubject;\n if (hasSubject) {\n this.setChannelSubject(targetName, this.getChannelSubject(sourceName));\n }\n this.setChannelBody(targetName, this.getChannelBody(sourceName));\n const active = this.activeChannel();\n if (active?.name === targetName && active.type === 'rich') {\n void this.applyEditorContentWhenReady(this.editorRef(), this.getChannelBody(targetName));\n }\n }\n\n protected getChannelSubject(name: string): string {\n const v = this.getValue()?.[name];\n const raw =\n v && typeof v === 'object' && 'subject' in v ? (v as { subject?: AXPMultiLanguageString }).subject : undefined;\n return resolveTextTemplateLocalizedString(raw, this.getTemplateLocale());\n }\n\n protected handleSubjectChange(name: string, e: AXValueChangedEvent<string>): void {\n if (!e.isUserInteraction) {\n return;\n }\n this.setChannelSubject(name, e.value ?? '');\n }\n\n protected setChannelSubject(name: string, value: string): void {\n const nextText = value ?? '';\n if (this.getChannelSubject(name) === nextText) {\n return;\n }\n const current = this.getValue() || {};\n if (!current[name] && !nextText.trim()) {\n return;\n }\n const ch = current[name] || { body: '' };\n const locale = this.getTemplateLocale();\n const ml = this.normalizeChannelFieldToMl(ch.subject);\n ml[locale] = nextText;\n this.commitChannelValue(current, name, { ...ch, subject: ml });\n }\n\n protected getChannelBody(name: string): string {\n const v = this.getValue()?.[name];\n const raw =\n v && typeof v === 'object' && 'body' in v ? (v as { body?: AXPMultiLanguageString }).body : undefined;\n return resolveTextTemplateLocalizedString(raw, this.getTemplateLocale());\n }\n\n protected handlePlainBodyChange(name: string, e: AXValueChangedEvent<string>): void {\n if (!e.isUserInteraction) {\n return;\n }\n this.setChannelBody(name, e.value ?? '');\n }\n\n protected handleEditorChange(name: string, e: AXValueChangedEvent<string>): void {\n if (this.suppressEditorWrites || !e.isUserInteraction) {\n return;\n }\n const val =\n typeof e === 'object' && e !== null && 'value' in e\n ? ((e as { value: string | null }).value ?? '')\n : String(e ?? '');\n this.setChannelBody(name, val);\n }\n\n protected setChannelBody(name: string, value: string): void {\n const nextText = value ?? '';\n if (this.getChannelBody(name) === nextText) {\n return;\n }\n const current = this.getValue() || {};\n if (!current[name] && !nextText.trim()) {\n return;\n }\n const ch = current[name] || { body: '' };\n const locale = this.getTemplateLocale();\n const ml = this.normalizeChannelFieldToMl(ch.body);\n ml[locale] = nextText;\n this.commitChannelValue(current, name, { ...ch, body: ml });\n }\n\n private commitChannelValue(\n current: AXMTextTemplateChannelsValue,\n name: string,\n nextChannel: AXMTextTemplateChannelsValue[string],\n ): void {\n const nextValue = { ...current, [name]: nextChannel };\n if (isFormValueEqual(nextValue, current)) {\n return;\n }\n const path = this.fullPath();\n const saved = path ? this.contextService.getSavedValue(path) : undefined;\n if (saved !== undefined && isFormValueEqual(nextValue, saved)) {\n return;\n }\n this.setValue(nextValue);\n }\n\n private shouldSyncEditorFromContext(state: AXPContextState): boolean {\n return state === 'restored' || state === 'initiated';\n }\n\n private beginSuppressEditorWrites(): void {\n this.suppressEditorWrites = true;\n this.clearSuppressEditorWritesTimer();\n this.suppressEditorWritesTimer = setTimeout(() => {\n this.suppressEditorWrites = false;\n this.suppressEditorWritesTimer = null;\n }, 500);\n }\n\n private clearSuppressEditorWritesTimer(): void {\n if (this.suppressEditorWritesTimer) {\n clearTimeout(this.suppressEditorWritesTimer);\n this.suppressEditorWritesTimer = null;\n }\n }\n\n private async applyEditorContentWhenReady(\n host: AXTextEditorComponent | undefined,\n text: string,\n ): Promise<void> {\n const content = text ?? '';\n\n for (let attempt = 0; attempt < 30; attempt++) {\n const editor = this.editorRef() ?? host;\n if (!editor?.getEditor()) {\n await new Promise((resolve) => setTimeout(resolve, 50));\n continue;\n }\n\n this.beginSuppressEditorWrites();\n editor.getEditorService().setContent(content, false);\n return;\n }\n }\n\n /**\n * Prefer server draft Preview (Context tokens + Event samples + parent composition).\n * Falls back to local compose when the command fails.\n */\n private async loadServerPreview(): Promise<void> {\n const requestSeq = ++this.previewRequestSeq;\n const value = this.getValue();\n const channel = this.activeChannel()?.name?.trim() || '';\n if (!value || typeof value !== 'object' || !channel) {\n this.serverPreviewByChannel.set({});\n this.composedPreviewBodies.set({});\n return;\n }\n\n const locale = this.getTemplateLocale();\n const parentIdRaw = this.contextService.getValue('parentId');\n const parentId = typeof parentIdRaw === 'string' ? parentIdRaw.trim() : '';\n const kindRaw = this.contextService.getValue('kind');\n const kind = typeof kindRaw === 'string' ? kindRaw.trim() : undefined;\n\n const request: AXMTextTemplatePreviewRequest = {\n channels: value,\n channel,\n locale,\n ...(parentId ? { parentId } : {}),\n ...(kind ? { kind } : {}),\n };\n\n try {\n const result = await this.commandExecutor.execute<\n AXMTextTemplatePreviewRequest,\n AXMTextTemplatePreviewResult\n >(AXM_TEXT_TEMPLATE_PREVIEW_COMMAND_KEY, request);\n\n if (requestSeq !== this.previewRequestSeq) {\n return;\n }\n\n const preview = runtimeCommandPayloadData(result);\n if (preview?.body != null) {\n this.serverPreviewByChannel.update((prev) => ({\n ...prev,\n [channel]: {\n ...(preview.subject != null ? { subject: preview.subject } : {}),\n body: preview.body,\n },\n }));\n return;\n }\n\n const message =\n typeof result?.message?.text === 'string' && result.message.text.trim()\n ? result.message.text.trim()\n : undefined;\n await this.fallbackToLocalPreview(channel, message);\n } catch (error) {\n if (requestSeq !== this.previewRequestSeq) {\n return;\n }\n const message = error instanceof Error ? error.message : undefined;\n await this.fallbackToLocalPreview(channel, message);\n }\n }\n\n private async fallbackToLocalPreview(channel: string, errorMessage?: string): Promise<void> {\n const title = await this.translationService.translateAsync(\n '@content-management:templates.messages.preview-failed.title',\n );\n const content = await this.translationService.translateAsync(\n '@content-management:templates.messages.preview-failed.content',\n );\n this.toastService.show({\n color: 'warning',\n title,\n content: errorMessage ? `${content} ${errorMessage}` : content,\n closeButton: true,\n timeOut: 5000,\n });\n\n this.serverPreviewByChannel.update((prev) => {\n const next = { ...prev };\n delete next[channel];\n return next;\n });\n await this.resolveComposedPreviewBodies();\n }\n\n /** Resolve variable values for local preview fallback */\n private async resolvePreviewVariables(): Promise<void> {\n const value = this.getValue();\n if (!value || typeof value !== 'object') return;\n const locale = this.getTemplateLocale();\n const parts: string[] = [];\n for (const v of Object.values(value)) {\n if (v != null && typeof v === 'object' && 'body' in v) {\n const o = v as { subject?: AXPMultiLanguageString; body?: AXPMultiLanguageString };\n parts.push(resolveTextTemplateLocalizedString(o.subject, locale));\n parts.push(resolveTextTemplateLocalizedString(o.body, locale));\n }\n }\n for (const body of Object.values(this.composedPreviewBodies())) {\n parts.push(body);\n }\n const allText = parts.join('');\n const varNames = collectTextTemplatePlaceholderNames(allText);\n if (varNames.length === 0) return;\n const vars = this.availableVariables();\n const resolved: Record<string, string> = {};\n const svc = this.tokenDefinitionService;\n for (const name of varNames) {\n try {\n if (svc) {\n const val = await svc.getValue(name);\n resolved[name] = val != null ? String(val) : '';\n }\n } catch {\n /* use fallback */\n }\n if (!(name in resolved) || !resolved[name]) {\n const v = vars.find((x) => x.name === name);\n if (v?.sampleValue != null) {\n resolved[name] = v.sampleValue;\n } else if (!(name in resolved)) {\n resolved[name] = '';\n }\n }\n }\n this.resolvedPreviewValues.update((prev) => ({ ...prev, ...resolved }));\n }\n\n /**\n * Local fallback: loads optional parent masters and stores leaf→root body chains per channel.\n */\n private async resolveComposedPreviewBodies(): Promise<void> {\n const value = this.getValue();\n if (!value || typeof value !== 'object') {\n this.composedPreviewBodies.set({});\n return;\n }\n\n const parentIdRaw = this.contextService.getValue('parentId');\n const parentId = typeof parentIdRaw === 'string' ? parentIdRaw.trim() : '';\n const locale = this.getTemplateLocale();\n const next: Record<string, string> = {};\n\n if (!parentId) {\n for (const channelName of Object.keys(value)) {\n next[channelName] = this.getChannelBody(channelName);\n }\n this.composedPreviewBodies.set(next);\n await this.resolvePreviewVariables();\n return;\n }\n\n const parentBodiesByChannel: Record<string, string[]> = {};\n try {\n const accessor = this.entityService\n .withEntity(RootConfig.module.name, RootConfig.entities.textTemplate.name)\n .data<\n string,\n AXMTextTemplateEntityModel,\n AXMTextTemplateEntityModel,\n AXMTextTemplateEntityModel,\n AXMTextTemplateEntityModel\n >();\n\n const visited = new Set<string>();\n const selfIdRaw = this.contextService.getValue('id');\n const selfId = typeof selfIdRaw === 'string' ? selfIdRaw.trim() : '';\n if (selfId) {\n visited.add(selfId);\n }\n\n let currentId: string | null = parentId;\n let depth = 1;\n while (currentId && depth <= AXM_TEXT_TEMPLATE_MAX_PARENT_DEPTH) {\n if (visited.has(currentId)) {\n break;\n }\n visited.add(currentId);\n const parent = await accessor.byKey(currentId);\n if (!parent?.channels) {\n break;\n }\n for (const [channelName, channelDef] of Object.entries(parent.channels)) {\n const body = resolveTextTemplateLocalizedString(channelDef?.body, locale);\n if (!body) continue;\n (parentBodiesByChannel[channelName] ??= []).push(body);\n }\n currentId = parent.parentId?.trim() || null;\n depth += 1;\n }\n } catch {\n /* keep leaf-only preview */\n }\n\n for (const channelName of Object.keys(value)) {\n const leafBody = this.getChannelBody(channelName);\n const parents = parentBodiesByChannel[channelName] ?? [];\n next[channelName] = composeTextTemplateBodyChain([leafBody, ...parents]);\n }\n this.composedPreviewBodies.set(next);\n await this.resolvePreviewVariables();\n }\n\n /** Get preview value for variable: expression/token first, then sampleValue */\n private getPreviewValue(varName: string): string {\n const resolved = this.resolvedPreviewValues()[varName];\n if (resolved !== undefined && resolved !== '') return resolved;\n const v = this.availableVariables().find((x) => x.name === varName);\n return v?.sampleValue ?? `{{${varName}}}`;\n }\n\n /**\n * Merge map for interpolating `{{ path }}` in `text`.\n * When `escapeMergeValuesForHtml` is true, substitution values are escaped for safe `innerHTML` fragments.\n */\n private previewMergeFor(text: string, escapeMergeValuesForHtml: boolean): Record<string, string> {\n const out: Record<string, string> = {};\n for (const name of collectTextTemplatePlaceholderNames(text)) {\n let v = this.getPreviewValue(name);\n if (escapeMergeValuesForHtml) {\n v = v.replace(/</g, '<').replace(/>/g, '>');\n }\n out[name] = v;\n }\n return out;\n }\n\n protected previewSubject(channelName: string): string {\n const server = this.serverPreviewByChannel()[channelName];\n if (server?.subject != null) {\n return server.subject;\n }\n return this.previewText(this.getChannelSubject(channelName));\n }\n\n protected previewText(text: string): string {\n return replaceTextTemplatePlaceholders(text, this.previewMergeFor(text, false));\n }\n\n /**\n * Email/rich preview must bypass Angular's default innerHTML sanitizer;\n * otherwise inline `style` (colors, gradients, header bar) is stripped and\n * the preview diverges from the real sent email.\n */\n protected previewBodyHtml(channelName: string): SafeHtml | string {\n const ch = this.availableChannels().find((c) => c.name === channelName);\n const server = this.serverPreviewByChannel()[channelName];\n if (server?.body != null) {\n if (ch?.type === 'rich') {\n return this.sanitizer.bypassSecurityTrustHtml(server.body);\n }\n return server.body\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\\n/g, '<br/>');\n }\n\n const composed = this.composedPreviewBodies()[channelName];\n const body = composed ?? this.getChannelBody(channelName);\n // Local fallback: do not escape data for rich HTML (logo mark / styled shells).\n const merged = renderTextTemplateSource(\n body,\n this.previewMergeFor(body, ch?.type !== 'rich'),\n );\n if (ch?.type === 'rich') {\n return this.sanitizer.bypassSecurityTrustHtml(merged);\n }\n return merged\n .replace(/</g, '<')\n .replace(/>/g, '>')\n .replace(/\\n/g, '<br/>');\n }\n}\n","<!-- Template Content Editor: Channel tabs and content per channel -->\n<div class=\"flex flex-col gap-4 w-full\">\n <!-- Channel tabs navigation -->\n <div class=\"flex items-center gap-2 flex-wrap\">\n <ax-tabs\n [look]=\"'with-line'\"\n (onActiveTabChanged)=\"onChannelTabChanged($event.index)\"\n class=\"flex-1 min-w-0\"\n >\n @for (ch of availableChannels(); track ch.name; let i = $index) {\n <ax-tab-item\n [text]=\"(ch.title | translate | async) ?? ch.name\"\n [key]=\"i.toString()\"\n [active]=\"activeTabIndex() === i\"\n ></ax-tab-item>\n }\n </ax-tabs>\n </div>\n\n @if (activeChannel(); as ch) {\n <!-- Channel content area: Edit mode or Preview mode -->\n <div class=\"mb-4 p-4\">\n @if (!isChannelConfigured(ch.name) && ch.notConfiguredMessageKey) {\n <div\n class=\"mb-4 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 p-3 rounded border border-amber-300 bg-amber-50 dark:border-amber-700 dark:bg-amber-950/30\"\n >\n <p class=\"text-sm text-amber-900 dark:text-amber-100\">\n {{ ch.notConfiguredMessageKey | translate | async }}\n </p>\n @if (ch.configureSettings) {\n <ax-button\n [text]=\"\n '@content-management:templates.actions.configure-channel'\n | translate\n | async\n \"\n look=\"outline\"\n color=\"primary\"\n size=\"sm\"\n (onClick)=\"openChannelConfigure(ch)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-gear\"></ax-icon>\n </ax-prefix>\n </ax-button>\n }\n </div>\n }\n\n @if (viewMode() === 'edit') {\n <!-- Edit mode: Subject field (for channels that support it, e.g. Email) -->\n @if (ch.hasSubject) {\n <div class=\"mb-3\">\n <label class=\"block text-sm mb-1\">\n {{\n '@content-management:templates.entities.text-template.fields.subject.title'\n | translate\n | async\n }}\n </label>\n <ax-text-box\n [ngModel]=\"getChannelSubject(ch.name)\"\n (onValueChanged)=\"handleSubjectChange(ch.name, $event)\"\n [placeholder]=\"\n ('@content-management:templates.entities.text-template.fields.subject.placeholder'\n | translate\n | async)!\n \"\n ></ax-text-box>\n </div>\n }\n\n <!-- Edit mode: Body field (plain text or rich text-editor) -->\n <div>\n <label class=\"block text-sm mb-1\">\n {{\n '@content-management:templates.entities.text-template.fields.body.title'\n | translate\n | async\n }}\n </label>\n <!--->\n <!-- ----- Plain-text body for SMS-style channels ----- -->\n @if (ch.type === 'plain') {\n <ax-text-area\n #bodyTextarea\n [ngModel]=\"getChannelBody(ch.name)\"\n (onValueChanged)=\"handlePlainBodyChange(ch.name, $event)\"\n [rows]=\"8\"\n [placeholder]=\"\n ('@content-management:templates.entities.text-template.fields.body-placeholder.plain'\n | translate\n | async)!\n \"\n ></ax-text-area>\n }\n <!-- ----- Recreate the rich editor per channel so tab switches do not keep the previous HTML ----- -->\n @else {\n @for (channelName of [ch.name]; track channelName) {\n <ax-text-editor\n #editorRef\n outputFormat=\"html\"\n [placeHolder]=\"\n ('@content-management:templates.entities.text-template.fields.body-placeholder.rich'\n | translate\n | async)!\n \"\n [ngModel]=\"getChannelBody(channelName)\"\n (onValueChanged)=\"handleEditorChange(channelName, $event)\"\n [look]=\"'solid'\"\n [initialLine]=\"8\"\n >\n <ax-text-editor-content [style.min-height.px]=\"200\"></ax-text-editor-content>\n <ax-text-editor-toolbar>\n <ax-prefix>\n <ax-text-editor-history></ax-text-editor-history>\n <ax-text-editor-font-style></ax-text-editor-font-style>\n <ax-text-editor-list></ax-text-editor-list>\n </ax-prefix>\n </ax-text-editor-toolbar>\n </ax-text-editor>\n }\n }\n </div>\n } @else {\n <!-- Preview mode: Rendered content with variable placeholders replaced by sample values -->\n <div class=\"space-y-2\">\n @if (ch.hasSubject && previewSubject(ch.name)) {\n <div>\n <span class=\"text-xs text-gray-500\"\n >{{\n '@content-management:templates.entities.text-template.fields.subject.title'\n | translate\n | async\n }}:\n </span>\n <span class=\"text-sm\">{{ previewSubject(ch.name) }}</span>\n </div>\n }\n <!-- ----- Rich email keeps inline styles; plain channels use pre-wrap ----- -->\n <div\n class=\"text-sm p-3 bg-gray-100 dark:bg-gray-900 rounded border overflow-auto\"\n [class.whitespace-pre-wrap]=\"ch.type !== 'rich'\"\n [innerHTML]=\"previewBodyHtml(ch.name)\"\n ></div>\n </div>\n }\n </div>\n\n <!-- Footer: Action buttons (left) + Edit/Preview toggle (right) in single row -->\n <div\n class=\"flex flex-nowrap items-center justify-between gap-3 pt-3 mt-1 border-t border-gray-200 dark:border-gray-700\"\n >\n <div class=\"flex flex-nowrap items-center gap-2 min-w-0\">\n @if (viewMode() === 'edit') {\n <!-- ----- Insert variable dropdown from platform tokens ----- -->\n <div data-insert-var-trigger>\n <ax-button\n [text]=\"\n '@content-management:templates.actions.insert-variable'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-code\"></ax-icon>\n </ax-prefix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for (v of availableVariables(); track v.name) {\n <ax-button-item\n look=\"blank\"\n color=\"default\"\n [text]=\"(v.title || v.name) + ' ({{' + v.name + '}})'\"\n (onClick)=\"insertVariable(ch.name, v.name)\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"getVariableIcon(v)\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n <ax-suffix>\n <ax-icon icon=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n </ax-button>\n </div>\n <!--->\n <!-- ----- Insert reserved [content] slot for master templates ----- -->\n @if (isMasterKind()) {\n <div data-insert-var-trigger>\n <ax-button\n [text]=\"\n '@content-management:templates.actions.insert-content-slot'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n (onClick)=\"insertContentSlot(ch.name)\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-layer-group\"></ax-icon>\n </ax-prefix>\n </ax-button>\n </div>\n }\n <!--->\n <!-- ----- Copy subject/body from another channel ----- -->\n @if (otherChannelsWithContent(ch.name).length > 0) {\n <ax-button\n [text]=\"\n '@content-management:templates.actions.copy-from'\n | translate\n | async\n \"\n look=\"twotone\"\n color=\"default\"\n size=\"sm\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-copy\"></ax-icon>\n </ax-prefix>\n <ax-suffix>\n <ax-icon icon=\"fa-light fa-chevron-down\"></ax-icon>\n </ax-suffix>\n <ax-dropdown-panel>\n <ax-button-item-list>\n @for (\n src of otherChannelsWithContent(ch.name);\n track src.name\n ) {\n <ax-button-item\n look=\"blank\"\n color=\"default\"\n [text]=\"(src.title | translate | async) ?? src.name\"\n (onClick)=\"copyFromChannel(ch.name, src.name)\"\n >\n <ax-prefix>\n <ax-icon [icon]=\"getChannelIcon(src)\"></ax-icon>\n </ax-prefix>\n </ax-button-item>\n }\n </ax-button-item-list>\n </ax-dropdown-panel>\n </ax-button>\n }\n }\n </div>\n <div>\n <ax-tabs [look]=\"'default'\">\n <ax-tab-item\n [text]=\"\n ('@content-management:templates.actions.edit'\n | translate\n | async) ?? 'Edit'\n \"\n [active]=\"viewMode() === 'edit'\"\n (onClick)=\"viewMode.set('edit')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-pen\" class=\"text-current\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n <ax-tab-item\n [text]=\"\n ('@content-management:templates.actions.preview'\n | translate\n | async) ?? 'Preview'\n \"\n [active]=\"viewMode() === 'preview'\"\n (onClick)=\"viewMode.set('preview')\"\n >\n <ax-prefix>\n <ax-icon icon=\"fa-light fa-eye\" class=\"text-current\"></ax-icon>\n </ax-prefix>\n </ax-tab-item>\n </ax-tabs>\n </div>\n </div>\n }\n</div>\n"],"names":["i9","i10"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2FM,MAAO,2CACX,SAAQ,uBAA4D,CAAA;;AA+E1D,IAAA,eAAe,CAAC,CAAmB,EAAA;AAC3C,QAAA,MAAM,OAAO,GAA2B;AACtC,YAAA,MAAM,EAAE,sBAAsB;AAC9B,YAAA,OAAO,EAAE,yBAAyB;AAClC,YAAA,KAAK,EAAE,kBAAkB;AACzB,YAAA,QAAQ,EAAE,wBAAwB;AAClC,YAAA,MAAM,EAAE,iBAAiB;SAC1B;AACD,QAAA,MAAM,WAAW,GAA2B;AAC1C,YAAA,MAAM,EAAE,kBAAkB;AAC1B,YAAA,OAAO,EAAE,qBAAqB;AAC9B,YAAA,OAAO,EAAE,uBAAuB;AAChC,YAAA,OAAO,EAAE,wBAAwB;AACjC,YAAA,QAAQ,EAAE,mBAAmB;AAC7B,YAAA,IAAI,EAAE,oBAAoB;SAC3B;AACD,QAAA,MAAM,MAAM,GAAG,CAAC,CAAC,IAAI,IAAI,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;AAC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EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAGP,2CAA2C,EAAA,UAAA,EAAA,CAAA;kBAnBvD,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,yCAAyC,EAAA,eAAA,EAElC,uBAAuB,CAAC,MAAM,EAAA,OAAA,EACtC;wBACP,YAAY;wBACZ,iBAAiB;wBACjB,WAAW;wBACX,YAAY;wBACZ,YAAY;wBACZ,gBAAgB;wBAChB,eAAe;wBACf,kBAAkB;wBAClB,kBAAkB;wBAClB,mBAAmB;wBACnB,cAAc;wBACd,gBAAgB;AACjB,qBAAA,EAAA,QAAA,EAAA,2uVAAA,EAAA;iGA2CsD,WAAW,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAC5B,cAAc,EAAA,EAAA,GAAE,EAAE,IAAI,GAAE,UAAuB,CAAA,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;"}
|
|
@@ -58,7 +58,7 @@ const AXMTemplateContentEditorWidget = {
|
|
|
58
58
|
component: () => import('./acorex-platform-module-content-management-client-template-content-editor-widget-view.component-CfupUZTI.mjs').then((c) => c.AXMTemplateContentEditorWidgetViewComponent),
|
|
59
59
|
},
|
|
60
60
|
edit: {
|
|
61
|
-
component: () => import('./acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-
|
|
61
|
+
component: () => import('./acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-B1Q4_HTa.mjs').then((c) => c.AXMTemplateContentEditorWidgetEditComponent),
|
|
62
62
|
},
|
|
63
63
|
},
|
|
64
64
|
};
|
package/package.json
CHANGED
|
@@ -381,6 +381,12 @@ declare const AXM_TEXT_TEMPLATE_IDS: {
|
|
|
381
381
|
readonly entityChangeUserHistory: "c7100012-0001-4111-b111-121212121212";
|
|
382
382
|
/** Daily AU/NZ field-mission weather briefing emailed to tenant admins. */
|
|
383
383
|
readonly weatherDailyForecastDigest: "c7100013-0001-4111-b111-131313131313";
|
|
384
|
+
/** Public tenant-creation request — confirmation to the requester. */
|
|
385
|
+
readonly tenantRequestReceived: "c7100014-0001-4111-b111-141414141414";
|
|
386
|
+
/** Public tenant-creation request — notify platform console admins. */
|
|
387
|
+
readonly tenantRequestAdminNotify: "c7100015-0001-4111-b111-151515151515";
|
|
388
|
+
/** Public tenant-creation request — approved; sent to the requester. */
|
|
389
|
+
readonly tenantRequestApproved: "c7100016-0001-4111-b111-161616161616";
|
|
384
390
|
};
|
|
385
391
|
|
|
386
392
|
export { AXMPermissionsKeys, AXM_TEXT_TEMPLATE_CONTENT_SLOT, AXM_TEXT_TEMPLATE_IDS, AXM_TEXT_TEMPLATE_KIND, AXM_TEXT_TEMPLATE_MAX_PARENT_DEPTH, AXM_TEXT_TEMPLATE_PREVIEW_COMMAND_KEY, AXM_TEXT_TEMPLATE_PRINT_CHANNEL, AXM_TEXT_TEMPLATE_RENDER_COMMAND_KEY, AXM_TEXT_TEMPLATE_TENANT_MASTER_NAMESPACE, AXPContentDocumentsPermissionKeys, AXPContentManagementMenuKeys, ContentManagementManifest, RootConfig, collectTextTemplatePlaceholderNames, composeTextTemplateBodyChain, defaultShortDatePatternForLocale, defaultShortTimePatternForLocale, formatTextTemplateDate, formatTextTemplateMergeValues, formatTextTemplateNumber, parseTextTemplateDateValue, renderTextTemplateSource, replaceTextTemplateContentSlot, replaceTextTemplatePlaceholders, resolveTextTemplateCalendar, resolveTextTemplateLocalizedString, textTemplateContainsContentSlot, validateTextTemplateContentSlots, validateTextTemplateParentChain };
|