@acorex-platform/module-content-management-client 0.0.33 → 0.0.37
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-entities-promotion.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-content-management-client-contracts-entities-text-template.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-content-management-client-contracts-entity-catalog-acorex-platform-module-content-management-client-contracts-entity-catalog-CTui3PB-.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-content-management-client-contracts-entity-catalog-promotion.entity-DXk_WIh3.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-content-management-client-contracts-entity-catalog-text-template.entity-C8SFkg-E.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-content-management-client-contracts.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-content-management-client-local-entities.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-content-management-client-permission-definition.provider-DHowV1eO.mjs.map +1 -1
- package/fesm2022/{acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-BkSjAXjQ.mjs → acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-BZUn1TiT.mjs} +2 -2
- package/fesm2022/{acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-BkSjAXjQ.mjs.map → acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-BZUn1TiT.mjs.map} +1 -1
- package/fesm2022/acorex-platform-module-content-management-client-template-content-editor-widget-view.component-CfupUZTI.mjs.map +1 -1
- package/fesm2022/acorex-platform-module-content-management-client.mjs +1 -1
- package/fesm2022/acorex-platform-module-content-management-client.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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/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 ----- 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} as const;\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './menu.keys';\nexport * from './permission.keys';\n\nexport * from './root-config';\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;YACvD,MAAM,EAAE,iCAAiC,CAAC,eAAe;YACzD,MAAM,EAAE,iCAAiC,CAAC,eAAe;AAC1D,SAAA;AACF,KAAA;;;ACjCH,MAAM,MAAM,GAAG;AACb,IAAA,IA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AC7D,IAAA,sBAAsB,EAAE,sCAAsC;;AAE9D,IAAA,eAAe,EAAE,sCAAsC;;AAEvD,IAAA,kBAAkB,EAAE,sCAAsC;;AAE1D,IAAA,kBAAkB,EAAE,sCAAsC;;AAE1D,IAAA,kBAAkB,EAAE,sCAAsC;;AAE1D,IAAA,sBAAsB,EAAE,sCAAsC;;AAE9D,IAAA,qBAAqB,EAAE,sCAAsC;;AAE7D,IAAA,iBAAiB,EAAE,sCAAsC;;AAG3D;;ACxCA;;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/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 ----- 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} as const;\n\n//#endregion\n","//#region ---- Contracts barrel ----\n\nexport * from './menu.keys';\nexport * from './permission.keys';\n\nexport * from './root-config';\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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AAC;IACZ;AAEA,IAAA,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE;AACrB;AAEA;;ACpPA;AAEA;AACO,MAAM,oCAAoC,GAAG;AA4CpD;AAEA;AAEA;AACO,MAAM,qCAAqC,GAAG;AAiCrD;;ACvFA;AAEA;;;AAGG;AACI,MAAM,yCAAyC,GAAG;AAEzD;;;;;;AAMG;AACI,MAAM,qBAAqB,GAAG;AACnC,IAAA,kBAAkB,EAAE,sCAAsC;AAC1D,IAAA,aAAa,EAAE,sCAAsC;AACrD,IAAA,iBAAiB,EAAE,sCAAsC;AACzD,IAAA,eAAe,EAAE,sCAAsC;AACvD,IAAA,cAAc,EAAE,sCAAsC;AACtD,IAAA,cAAc,EAAE,sCAAsC;AACtD,IAAA,qBAAqB,EAAE,sCAAsC;AAC7D,IAAA,sBAAsB,EAAE,sCAAsC;;AAE9D,IAAA,eAAe,EAAE,sCAAsC;;AAEvD,IAAA,kBAAkB,EAAE,sCAAsC;;AAE1D,IAAA,kBAAkB,EAAE,sCAAsC;;AAE1D,IAAA,kBAAkB,EAAE,sCAAsC;;AAE1D,IAAA,sBAAsB,EAAE,sCAAsC;;AAE9D,IAAA,qBAAqB,EAAE,sCAAsC;;AAE7D,IAAA,iBAAiB,EAAE,sCAAsC;;AAG3D;;ACxCA;;ACAA;;AAEG;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-content-management-client-local-entities.mjs","sources":["../../../../libs/modules/content-management/client/src/lib/provide-local-entities.ts","../../../../libs/modules/content-management/client/src/lib/acorex-platform-module-content-management-client-local-entities.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { provideLocalEntityCatalog } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-content-management-client/contracts';\n\n//#endregion\n\n//#region ----- Provide local entities -----\n\n/**\n * Registers content-management layouts on the client from packaged factories.\n * Each `import()` targets a secondary entry so unused entities stay out of the\n * bundle. Do not add this to the demo app; demo continues to load layouts via\n * `Domain:GetEntityLayout`.\n */\nexport function provideContentManagementLocalEntities() {\n return provideLocalEntityCatalog({\n moduleName: RootConfig.module.name,\n loaders: {\n [RootConfig.entities.promotion.name]: () =>\n import('@acorex-platform/module-content-management-client/contracts/entities/promotion').then((m) => m.promotionEntityFactory()),\n [RootConfig.entities.textTemplate.name]: () =>\n import('@acorex-platform/module-content-management-client/contracts/entities/text-template').then((m) => m.textTemplateEntityFactory()),\n },\n });\n}\n\nexport { contentManagementLocalEntityCatalog } from '@acorex-platform/module-content-management-client/contracts/entity-catalog';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './provide-local-entities';\n"],"names":[],"mappings":";;;;AAAA;AAKA;AAEA;AAEA;;;;;AAKG;SACa,qCAAqC,GAAA;AACnD,IAAA,OAAO,yBAAyB,CAAC;AAC/B,QAAA,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAClC,QAAA,OAAO,EAAE;AACP,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,MACpC,OAAO,gFAAgF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,sBAAsB,EAAE,CAAC;AAClI,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,GAAG,MACvC,OAAO,oFAAoF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,yBAAyB,EAAE,CAAC;AAC1I,SAAA;AACF,KAAA,CAAC;AACJ;AAIA;;AC7BA;;AAEG
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-content-management-client-local-entities.mjs","sources":["../../../../libs/modules/content-management/client/src/lib/provide-local-entities.ts","../../../../libs/modules/content-management/client/src/lib/acorex-platform-module-content-management-client-local-entities.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport { provideLocalEntityCatalog } from '@acorex-platform/framework-client/layout/entity';\nimport { RootConfig } from '@acorex-platform/module-content-management-client/contracts';\n\n//#endregion\n\n//#region ----- Provide local entities -----\n\n/**\n * Registers content-management layouts on the client from packaged factories.\n * Each `import()` targets a secondary entry so unused entities stay out of the\n * bundle. Do not add this to the demo app; demo continues to load layouts via\n * `Domain:GetEntityLayout`.\n */\nexport function provideContentManagementLocalEntities() {\n return provideLocalEntityCatalog({\n moduleName: RootConfig.module.name,\n loaders: {\n [RootConfig.entities.promotion.name]: () =>\n import('@acorex-platform/module-content-management-client/contracts/entities/promotion').then((m) => m.promotionEntityFactory()),\n [RootConfig.entities.textTemplate.name]: () =>\n import('@acorex-platform/module-content-management-client/contracts/entities/text-template').then((m) => m.textTemplateEntityFactory()),\n },\n });\n}\n\nexport { contentManagementLocalEntityCatalog } from '@acorex-platform/module-content-management-client/contracts/entity-catalog';\n\n//#endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './provide-local-entities';\n"],"names":[],"mappings":";;;;AAAA;AAKA;AAEA;AAEA;;;;;AAKG;SACa,qCAAqC,GAAA;AACnD,IAAA,OAAO,yBAAyB,CAAC;AAC/B,QAAA,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,IAAI;AAClC,QAAA,OAAO,EAAE;AACP,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,GAAG,MACpC,OAAO,gFAAgF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,sBAAsB,EAAE,CAAC;AAClI,YAAA,CAAC,UAAU,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,GAAG,MACvC,OAAO,oFAAoF,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,yBAAyB,EAAE,CAAC;AAC1I,SAAA;AACF,KAAA,CAAC;AACJ;AAIA;;AC7BA;;AAEG;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-platform-module-content-management-client-permission-definition.provider-DHowV1eO.mjs","sources":["../../../../libs/modules/content-management/client/src/lib/permission-definition.provider.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport {\n AXPPermissionDefinitionProvider,\n AXPPermissionDefinitionProviderContext,\n} from '@acorex-platform/framework-client/auth';\nimport {\n AXPCommonPermissionGroupKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport {\n AXPContentDocumentsPermissionKeys\n} from '@acorex-platform/module-content-management-client/contracts';\n\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ----- Permission Definition Provider -----\n\n/**\n * Registers content capabilities into the shared Content & Documents group.\n */\n@Injectable()\nexport class AXMPermissionDefinitionProvider implements AXPPermissionDefinitionProvider {\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const keys = AXPContentDocumentsPermissionKeys;\n const groups = AXPCommonPermissionGroupKeys;\n const P = '@common:content-documents.permissions';\n const G = '@common:permission-groups';\n\n context.addGroup(groups.ContentDocuments.Root, `${G}.content-documents.title`, `${G}.content-documents.description`, { order: 90 });\n\n context\n .addGroup(\n groups.ContentDocuments.Content,\n `${G}.content-documents-content.title`,\n `${G}.content-documents-content.description`,\n { parent: groups.ContentDocuments.Root, order: 20 },\n )\n .addPermission(keys.MaintainContent, `${P}.maintain-content.title`, `${P}.maintain-content.description`)\n .endPermission()\n .endGroup();\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAeA;AAEA;AAEA;;AAEG;MAEU,+BAA+B,CAAA;IAC1C,MAAM,MAAM,CAAC,OAA+C,EAAA;QAC1D,MAAM,IAAI,GAAG,iCAAiC;QAC9C,MAAM,MAAM,GAAG,4BAA4B;QAC3C,MAAM,CAAC,GAAG,uCAAuC;QACjD,MAAM,CAAC,GAAG,2BAA2B;QAErC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAA,EAAG,CAAC,0BAA0B,EAAE,CAAA,EAAG,CAAC,CAAA,8BAAA,CAAgC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QAEnI;AACG,aAAA,QAAQ,CACP,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAC/B,CAAA,EAAG,CAAC,CAAA,gCAAA,CAAkC,EACtC,CAAA,EAAG,CAAC,CAAA,sCAAA,CAAwC,EAC5C,EAAE,MAAM,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AAEpD,aAAA,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,CAAA,EAAG,CAAC,CAAA,uBAAA,CAAyB,EAAE,CAAA,EAAG,CAAC,CAAA,6BAAA,CAA+B;AACtG,aAAA,aAAa;AACb,aAAA,QAAQ,EAAE;IACf;8GAnBW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA/B,+BAA+B,EAAA,CAAA,CAAA;;2FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C
|
|
1
|
+
{"version":3,"file":"acorex-platform-module-content-management-client-permission-definition.provider-DHowV1eO.mjs","sources":["../../../../libs/modules/content-management/client/src/lib/permission-definition.provider.ts"],"sourcesContent":["//#region ----- Imports -----\n\nimport {\n AXPPermissionDefinitionProvider,\n AXPPermissionDefinitionProviderContext,\n} from '@acorex-platform/framework-client/auth';\nimport {\n AXPCommonPermissionGroupKeys\n} from '@acorex-platform/module-common-client/contracts';\nimport {\n AXPContentDocumentsPermissionKeys\n} from '@acorex-platform/module-content-management-client/contracts';\n\nimport { Injectable } from '@angular/core';\n\n//#endregion\n\n//#region ----- Permission Definition Provider -----\n\n/**\n * Registers content capabilities into the shared Content & Documents group.\n */\n@Injectable()\nexport class AXMPermissionDefinitionProvider implements AXPPermissionDefinitionProvider {\n async define(context: AXPPermissionDefinitionProviderContext): Promise<void> {\n const keys = AXPContentDocumentsPermissionKeys;\n const groups = AXPCommonPermissionGroupKeys;\n const P = '@common:content-documents.permissions';\n const G = '@common:permission-groups';\n\n context.addGroup(groups.ContentDocuments.Root, `${G}.content-documents.title`, `${G}.content-documents.description`, { order: 90 });\n\n context\n .addGroup(\n groups.ContentDocuments.Content,\n `${G}.content-documents-content.title`,\n `${G}.content-documents-content.description`,\n { parent: groups.ContentDocuments.Root, order: 20 },\n )\n .addPermission(keys.MaintainContent, `${P}.maintain-content.title`, `${P}.maintain-content.description`)\n .endPermission()\n .endGroup();\n }\n}\n\n//#endregion\n"],"names":[],"mappings":";;;;;AAeA;AAEA;AAEA;;AAEG;MAEU,+BAA+B,CAAA;IAC1C,MAAM,MAAM,CAAC,OAA+C,EAAA;QAC1D,MAAM,IAAI,GAAG,iCAAiC;QAC9C,MAAM,MAAM,GAAG,4BAA4B;QAC3C,MAAM,CAAC,GAAG,uCAAuC;QACjD,MAAM,CAAC,GAAG,2BAA2B;QAErC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAA,EAAG,CAAC,0BAA0B,EAAE,CAAA,EAAG,CAAC,CAAA,8BAAA,CAAgC,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QAEnI;AACG,aAAA,QAAQ,CACP,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAC/B,CAAA,EAAG,CAAC,CAAA,gCAAA,CAAkC,EACtC,CAAA,EAAG,CAAC,CAAA,sCAAA,CAAwC,EAC5C,EAAE,MAAM,EAAE,MAAM,CAAC,gBAAgB,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE;AAEpD,aAAA,aAAa,CAAC,IAAI,CAAC,eAAe,EAAE,CAAA,EAAG,CAAC,CAAA,uBAAA,CAAyB,EAAE,CAAA,EAAG,CAAC,CAAA,6BAAA,CAA+B;AACtG,aAAA,aAAa;AACb,aAAA,QAAQ,EAAE;IACf;8GAnBW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAA/B,+BAA+B,EAAA,CAAA,CAAA;;2FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C;;;"}
|
|
@@ -670,7 +670,7 @@ class AXMTemplateContentEditorWidgetEditComponent extends AXPValueWidgetComponen
|
|
|
670
670
|
.replace(/\n/g, '<br/>');
|
|
671
671
|
}
|
|
672
672
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTemplateContentEditorWidgetEditComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
673
|
-
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: "wysiwygRef", first: true, predicate: ["wysiwygRef"], 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)=\"activeTabIndex.set($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 (ngModelChange)=\"setChannelSubject(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 WYSIWYG) -->\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 @if (ch.type === 'plain') {\n <ax-text-area\n #bodyTextarea\n [ngModel]=\"getChannelBody(ch.name)\"\n (ngModelChange)=\"setChannelBody(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 } @else {\n <ax-wysiwyg-container\n #wysiwygRef\n [placeHolder]=\"\n ('@content-management:templates.entities.text-template.fields.body-placeholder.rich'\n | translate\n | async)!\n \"\n [ngModel]=\"getChannelBody(ch.name)\"\n (onValueChanged)=\"handleWysiwygChange(ch.name, $event)\"\n [look]=\"'solid'\"\n >\n <ax-wysiwyg-view [style.min-height.px]=\"200\"></ax-wysiwyg-view>\n <ax-wysiwyg-toolbar>\n <ax-prefix>\n <ax-wysiwyg-history></ax-wysiwyg-history>\n <ax-wysiwyg-font-style></ax-wysiwyg-font-style>\n <ax-wysiwyg-list></ax-wysiwyg-list>\n </ax-prefix>\n </ax-wysiwyg-toolbar>\n </ax-wysiwyg-container>\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", "fitParent", "minWidth", "content"], outputs: ["onActiveTabChanged"] }, { 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: AXWysiwygModule }, { kind: "component", type: i6.AXWysiwygContainerComponent, selector: "ax-wysiwyg-container", inputs: ["look", "readonly", "disabled", "value", "placeHolder", "initialLine"], outputs: ["onValueChanged"] }, { kind: "component", type: i6.AXWysiwygViewComponent, selector: "ax-wysiwyg-view" }, { kind: "component", type: i6.AXWysiwygFontStyleComponent, selector: "ax-wysiwyg-font-style" }, { kind: "component", type: i6.AXWysiwygHistoryComponent, selector: "ax-wysiwyg-history" }, { kind: "component", type: i6.AXWysiwygListComponent, selector: "ax-wysiwyg-list" }, { kind: "component", type: i6.AXWysiwygToolbarComponent, selector: "ax-wysiwyg-toolbar" }, { kind: "ngmodule", type: AXValidationModule }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i7.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "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 }); }
|
|
673
|
+
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: "wysiwygRef", first: true, predicate: ["wysiwygRef"], 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)=\"activeTabIndex.set($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 (ngModelChange)=\"setChannelSubject(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 WYSIWYG) -->\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 @if (ch.type === 'plain') {\n <ax-text-area\n #bodyTextarea\n [ngModel]=\"getChannelBody(ch.name)\"\n (ngModelChange)=\"setChannelBody(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 } @else {\n <ax-wysiwyg-container\n #wysiwygRef\n [placeHolder]=\"\n ('@content-management:templates.entities.text-template.fields.body-placeholder.rich'\n | translate\n | async)!\n \"\n [ngModel]=\"getChannelBody(ch.name)\"\n (onValueChanged)=\"handleWysiwygChange(ch.name, $event)\"\n [look]=\"'solid'\"\n >\n <ax-wysiwyg-view [style.min-height.px]=\"200\"></ax-wysiwyg-view>\n <ax-wysiwyg-toolbar>\n <ax-prefix>\n <ax-wysiwyg-history></ax-wysiwyg-history>\n <ax-wysiwyg-font-style></ax-wysiwyg-font-style>\n <ax-wysiwyg-list></ax-wysiwyg-list>\n </ax-prefix>\n </ax-wysiwyg-toolbar>\n </ax-wysiwyg-container>\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", "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: AXWysiwygModule }, { kind: "component", type: i6.AXWysiwygContainerComponent, selector: "ax-wysiwyg-container", inputs: ["look", "readonly", "disabled", "value", "placeHolder", "initialLine"], outputs: ["onValueChanged"] }, { kind: "component", type: i6.AXWysiwygViewComponent, selector: "ax-wysiwyg-view" }, { kind: "component", type: i6.AXWysiwygFontStyleComponent, selector: "ax-wysiwyg-font-style" }, { kind: "component", type: i6.AXWysiwygHistoryComponent, selector: "ax-wysiwyg-history" }, { kind: "component", type: i6.AXWysiwygListComponent, selector: "ax-wysiwyg-list" }, { kind: "component", type: i6.AXWysiwygToolbarComponent, selector: "ax-wysiwyg-toolbar" }, { 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 }); }
|
|
674
674
|
}
|
|
675
675
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMTemplateContentEditorWidgetEditComponent, decorators: [{
|
|
676
676
|
type: Component,
|
|
@@ -691,4 +691,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
691
691
|
}], ctorParameters: () => [], propDecorators: { wysiwygRef: [{ type: i0.ViewChild, args: ['wysiwygRef', { isSignal: true }] }], bodyTextareaRef: [{ type: i0.ViewChild, args: ['bodyTextarea', { ...{ read: (ElementRef) }, isSignal: true }] }] } });
|
|
692
692
|
|
|
693
693
|
export { AXMTemplateContentEditorWidgetEditComponent };
|
|
694
|
-
//# sourceMappingURL=acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-
|
|
694
|
+
//# sourceMappingURL=acorex-platform-module-content-management-client-template-content-editor-widget-edit.component-BZUn1TiT.mjs.map
|