@memberjunction/ng-explorer-core 6.2.0-edge.6 → 6.2.0-edge.8
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/dist/app-routing.module.d.ts.map +1 -1
- package/dist/app-routing.module.js +10 -0
- package/dist/app-routing.module.js.map +1 -1
- package/dist/generated/lazy-feature-config.d.ts +1 -1
- package/dist/generated/lazy-feature-config.d.ts.map +1 -1
- package/dist/generated/lazy-feature-config.js +14 -2
- package/dist/generated/lazy-feature-config.js.map +1 -1
- package/dist/lib/about/about-dialog.component.d.ts +3 -1
- package/dist/lib/about/about-dialog.component.d.ts.map +1 -1
- package/dist/lib/about/about-dialog.component.js +32 -15
- package/dist/lib/about/about-dialog.component.js.map +1 -1
- package/dist/lib/dashboard-preferences-dialog/dashboard-preferences-dialog.component.js +2 -2
- package/dist/lib/office/office-connect.component.d.ts +19 -0
- package/dist/lib/office/office-connect.component.d.ts.map +1 -0
- package/dist/lib/office/office-connect.component.js +80 -0
- package/dist/lib/office/office-connect.component.js.map +1 -0
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts +7 -0
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js +20 -8
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-class-resolution.d.ts +14 -0
- package/dist/lib/resource-wrappers/dashboard-class-resolution.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-class-resolution.js +21 -0
- package/dist/lib/resource-wrappers/dashboard-class-resolution.js.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-resource.component.js +3 -2
- package/dist/lib/resource-wrappers/dashboard-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/view-resource.component.js +3 -3
- package/dist/lib/resource-wrappers/view-resource.component.js.map +1 -1
- package/dist/lib/shell/components/dialogs/app-access-dialog.component.js +2 -2
- package/dist/lib/shell/services/about-dialog.service.d.ts +1 -0
- package/dist/lib/shell/services/about-dialog.service.d.ts.map +1 -1
- package/dist/lib/shell/services/about-dialog.service.js +4 -0
- package/dist/lib/shell/services/about-dialog.service.js.map +1 -1
- package/dist/lib/shell/shell.component.d.ts +13 -0
- package/dist/lib/shell/shell.component.d.ts.map +1 -1
- package/dist/lib/shell/shell.component.js +289 -233
- package/dist/lib/shell/shell.component.js.map +1 -1
- package/dist/lib/shell/shell.module.d.ts +6 -5
- package/dist/lib/shell/shell.module.d.ts.map +1 -1
- package/dist/lib/shell/shell.module.js +4 -0
- package/dist/lib/shell/shell.module.js.map +1 -1
- package/dist/lib/single-list-detail/single-list-detail.component.js +2 -2
- package/dist/lib/single-list-detail/single-list-detail.component.js.map +1 -1
- package/dist/lib/user-menu/base-user-menu.d.ts +2 -0
- package/dist/lib/user-menu/base-user-menu.d.ts.map +1 -1
- package/dist/lib/user-menu/base-user-menu.js +19 -0
- package/dist/lib/user-menu/base-user-menu.js.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.d.ts +14 -0
- package/dist/lib/user-notifications/user-notifications.component.d.ts.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.js +62 -2
- package/dist/lib/user-notifications/user-notifications.component.js.map +1 -1
- package/dist/lib/user-profile/user-profile.component.js +2 -2
- package/dist/module.d.ts +64 -63
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +3 -0
- package/dist/module.js.map +1 -1
- package/package.json +59 -57
|
@@ -129,6 +129,8 @@ export declare class BaseUserMenu {
|
|
|
129
129
|
protected Handle_submit_feedback(): Promise<UserMenuActionResult>;
|
|
130
130
|
/** Signal the shell to open the About dialog */
|
|
131
131
|
protected Handle_about(): Promise<UserMenuActionResult>;
|
|
132
|
+
/** Signal the shell to open the Diagnostic Bundle dialog */
|
|
133
|
+
protected Handle_diagnostic_bundle(): Promise<UserMenuActionResult>;
|
|
132
134
|
/**
|
|
133
135
|
* Build menu items for each registered theme plus a 'System' option.
|
|
134
136
|
* Each theme gets a `select-theme-<id>` item ID. The currently active
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-user-menu.d.ts","sourceRoot":"","sources":["../../../src/lib/user-menu/base-user-menu.ts"],"names":[],"mappings":"AACA,OAAO,EACH,YAAY,EACZ,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,eAAe,EAEf,eAAe,EAClB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,YAAY;IACrB,SAAS,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAQ;IAClD,SAAS,CAAC,QAAQ,EAAE,eAAe,CAAC;;IAUpC;;OAEG;IACU,UAAU,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhE;;OAEG;cACa,YAAY,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrE;;OAEG;IACI,OAAO,IAAI,IAAI;IAQtB;;OAEG;IACH,SAAS,CAAC,iBAAiB,IAAI,eAAe;IAS9C;;OAEG;IACI,UAAU,IAAI,eAAe;IAIpC;;OAEG;IACI,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI;IAQ1D;;;;;;;;OAQG;IACI,YAAY,IAAI,YAAY,EAAE;
|
|
1
|
+
{"version":3,"file":"base-user-menu.d.ts","sourceRoot":"","sources":["../../../src/lib/user-menu/base-user-menu.ts"],"names":[],"mappings":"AACA,OAAO,EACH,YAAY,EACZ,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,eAAe,EAEf,eAAe,EAClB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBAAa,YAAY;IACrB,SAAS,CAAC,QAAQ,EAAE,eAAe,GAAG,IAA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CAAC,oBAAoB,CAAC;IAUnE;;;;OAIG;cACa,qBAAqB,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAQtE,mDAAmD;cACnC,sBAAsB,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAQvE,gDAAgD;cAChC,YAAY,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAQ7D,4DAA4D;cAC5C,wBAAwB,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAYzE;;;;OAIG;IACH,SAAS,CAAC,mBAAmB,IAAI,YAAY,EAAE;IAwC/C;;;OAGG;IACH,SAAS,CAAC,wBAAwB,CAAC,SAAS,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM;IAQvE;;OAEG;IACI,kBAAkB,IAAI,eAAe;IAe5C;;OAEG;IACH,SAAS,CAAC,aAAa,IAAI,MAAM;IAIjC;;OAEG;IACH,SAAS,KAAK,OAAO,IAAI,eAAe,GAAG,IAAI,CAE9C;IAED;;OAEG;IACI,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,IAAI;CAKhE"}
|
|
@@ -159,6 +159,17 @@ export class BaseUserMenu {
|
|
|
159
159
|
enabled: true,
|
|
160
160
|
tooltip: 'Reset workspace to default layout'
|
|
161
161
|
},
|
|
162
|
+
{
|
|
163
|
+
id: 'diagnostic-bundle',
|
|
164
|
+
label: 'Diagnostic Bundle',
|
|
165
|
+
icon: 'fa-solid fa-stethoscope',
|
|
166
|
+
group: 'system',
|
|
167
|
+
order: 15,
|
|
168
|
+
developerOnly: false,
|
|
169
|
+
visible: true,
|
|
170
|
+
enabled: true,
|
|
171
|
+
tooltip: 'Capture, download, or submit a diagnostic bundle (.mjdiag)'
|
|
172
|
+
},
|
|
162
173
|
{
|
|
163
174
|
id: 'about',
|
|
164
175
|
label: 'About MemberJunction',
|
|
@@ -371,6 +382,14 @@ export class BaseUserMenu {
|
|
|
371
382
|
message: 'about'
|
|
372
383
|
};
|
|
373
384
|
}
|
|
385
|
+
/** Signal the shell to open the Diagnostic Bundle dialog */
|
|
386
|
+
async Handle_diagnostic_bundle() {
|
|
387
|
+
return {
|
|
388
|
+
success: true,
|
|
389
|
+
closeMenu: true,
|
|
390
|
+
message: 'diagnostic-bundle'
|
|
391
|
+
};
|
|
392
|
+
}
|
|
374
393
|
// ========================================
|
|
375
394
|
// THEME HELPERS
|
|
376
395
|
// ========================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-user-menu.js","sourceRoot":"","sources":["../../../src/lib/user-menu/base-user-menu.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,OAAO,YAAY;IACX,QAAQ,GAA2B,IAAI,CAAC;IACxC,QAAQ,CAAkB;IAEpC;QACI,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7C,CAAC;IAED,2CAA2C;IAC3C,iBAAiB;IACjB,2CAA2C;IAE3C;;OAEG;IACI,KAAK,CAAC,UAAU,CAAC,OAAwB;QAC5C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,YAAY,CAAC,OAAwB;QACjD,iDAAiD;IACrD,CAAC;IAED;;OAEG;IACI,OAAO;QACV,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzB,CAAC;IAED,2CAA2C;IAC3C,UAAU;IACV,2CAA2C;IAE3C;;OAEG;IACO,iBAAiB;QACvB,OAAO;YACH,YAAY,EAAE,IAAI;YAClB,aAAa,EAAE,IAAI;YACnB,YAAY,EAAE,YAAY;YAC1B,cAAc,EAAE,MAAM;SACzB,CAAC;IACN,CAAC;IAED;;OAEG;IACI,UAAU;QACb,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAChC,CAAC;IAED;;OAEG;IACI,UAAU,CAAC,OAAi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O,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,aAAa,CAAC,OAAiC;QAClD,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;QACrD,CAAC;IACL,CAAC;CACJ","sourcesContent":["import { RegisterClass } from '@memberjunction/global';\nimport {\n UserMenuItem,\n UserMenuElement,\n UserMenuContext,\n UserMenuActionResult,\n UserMenuOptions,\n UserMenuDivider,\n UserDisplayInfo\n} from './user-menu.types';\n\n/**\n * Base class for user menu implementations with built-in default behavior.\n *\n * This class provides the standard MemberJunction user menu. To customize:\n * 1. Create a subclass\n * 2. Register with @RegisterClass(BaseUserMenu)\n * 3. Override methods as needed\n *\n * Subclasses automatically get higher priority via compiler order since they\n * import this class, causing their @RegisterClass to execute after this one.\n *\n * @example\n * ```typescript\n * // In your custom app\n * import { BaseUserMenu } from '@memberjunction/ng-explorer-core';\n *\n * @RegisterClass(BaseUserMenu)\n * export class MyAppUserMenu extends BaseUserMenu {\n * public override GetMenuItems(): UserMenuItem[] {\n * const items = super.GetMenuItems();\n * // Add, remove, or modify items\n * items.push({ id: 'custom', label: 'My Custom Action', ... });\n * return items;\n * }\n *\n * protected override async Handle_custom(): Promise<UserMenuActionResult> {\n * // Handle the custom action\n * return { success: true, closeMenu: true };\n * }\n * }\n * ```\n */\nexport class BaseUserMenu {\n protected _context: UserMenuContext | null = null;\n protected _options: UserMenuOptions;\n\n constructor() {\n this._options = this.GetDefaultOptions();\n }\n\n // ========================================\n // INITIALIZATION\n // ========================================\n\n /**\n * Initialize the menu with context. Called by shell component.\n */\n public async Initialize(context: UserMenuContext): Promise<void> {\n this._context = context;\n await this.OnInitialize(context);\n }\n\n /**\n * Override to perform custom initialization\n */\n protected async OnInitialize(context: UserMenuContext): Promise<void> {\n // Override in subclass for custom initialization\n }\n\n /**\n * Cleanup when menu is destroyed\n */\n public Destroy(): void {\n this._context = null;\n }\n\n // ========================================\n // OPTIONS\n // ========================================\n\n /**\n * Get default menu configuration options\n */\n protected GetDefaultOptions(): UserMenuOptions {\n return {\n showUserName: true,\n showUserEmail: true,\n menuPosition: 'below-left',\n animationStyle: 'fade'\n };\n }\n\n /**\n * Get current menu options\n */\n public GetOptions(): UserMenuOptions {\n return { ...this._options };\n }\n\n /**\n * Update menu options\n */\n public SetOptions(options: Partial<UserMenuOptions>): void {\n this._options = { ...this._options, ...options };\n }\n\n // ========================================\n // MENU ITEMS - Override to customize\n // ========================================\n\n /**\n * Get all menu items. Override to customize the menu structure.\n *\n * Items are grouped by the `group` property with dividers between groups.\n * Groups are rendered in this order: primary, developer, system, danger.\n *\n * Developer-only items are automatically hidden unless the user has\n * Developer role AND developer mode is enabled.\n */\n public GetMenuItems(): UserMenuItem[] {\n return [\n // === PRIMARY GROUP ===\n {\n id: 'profile',\n label: 'My Profile',\n icon: 'fa-solid fa-user-circle',\n group: 'primary',\n order: 10,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: 'View and edit your profile'\n },\n {\n id: 'pin-to-home',\n label: 'Pin to Home',\n icon: 'fa-solid fa-house-chimney',\n group: 'primary',\n order: 20,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: 'Pin the current resource to your Home dashboard'\n },\n {\n id: 'sharing-center',\n label: 'Sharing Center',\n icon: 'fa-solid fa-share-nodes',\n group: 'primary',\n order: 25,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: \"See what you've shared and what's been shared with you\"\n },\n {\n id: 'submit-feedback',\n label: 'Submit Feedback',\n icon: 'fa-solid fa-comment-dots',\n group: 'primary',\n order: 30,\n developerOnly: false,\n visible: this._context?.feedbackEnabled !== false,\n enabled: true,\n tooltip: 'Report a bug or request a feature'\n },\n\n // Developer tools live in the Admin app's \"Developer Tools\" section,\n // not in this menu. The DeveloperModeService still exists for\n // per-record dev affordances (e.g. \"open in CodeGen\" links).\n\n // === SYSTEM GROUP (Theme selection) ===\n ...this.BuildThemeMenuItems(),\n {\n id: 'reset-layout',\n label: 'Reset Layout',\n icon: 'fa-solid fa-rotate-left',\n group: 'system',\n order: 10,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: 'Reset workspace to default layout'\n },\n {\n id: 'about',\n label: 'About MemberJunction',\n icon: 'fa-solid fa-circle-info',\n group: 'system',\n order: 20,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: 'Version, diagnostics, and links'\n },\n\n // === DANGER GROUP ===\n {\n id: 'logout',\n label: 'Sign Out',\n icon: 'fa-solid fa-sign-out-alt',\n color: '#c62828',\n cssClass: 'danger',\n group: 'danger',\n order: 100,\n developerOnly: false,\n visible: true,\n enabled: true\n }\n ];\n }\n\n /**\n * Get the complete menu element list including dividers between groups.\n * This is called by the template to render the menu.\n */\n public GetMenuElements(): UserMenuElement[] {\n const items = this.GetMenuItems();\n const visibleItems = items.filter(item => this.IsItemVisible(item));\n\n // Group items\n const groups = this.GroupItems(visibleItems);\n const elements: UserMenuElement[] = [];\n\n // Define group order\n const groupOrder = this.GetGroupOrder();\n const sortedGroupKeys = Object.keys(groups).sort((a, b) => {\n const aIndex = groupOrder.indexOf(a);\n const bIndex = groupOrder.indexOf(b);\n return (aIndex === -1 ? 999 : aIndex) - (bIndex === -1 ? 999 : bIndex);\n });\n\n // Build element list with dividers\n sortedGroupKeys.forEach((group, index) => {\n if (index > 0) {\n elements.push({ type: 'divider', group } as UserMenuDivider);\n }\n\n // Sort items within group by order\n const groupItems = groups[group].sort((a, b) => a.order - b.order);\n elements.push(...groupItems);\n });\n\n return elements;\n }\n\n /**\n * Check if a menu item should be visible based on current context\n */\n protected IsItemVisible(item: UserMenuItem): boolean {\n // Check developer-only visibility\n if (item.developerOnly && !this._context?.isDeveloper) {\n return false;\n }\n\n // Check item's own visible flag\n return item.visible;\n }\n\n /**\n * Get the ordered list of group names for menu rendering.\n * Override to insert custom groups (e.g., 'organization' before 'primary').\n */\n protected GetGroupOrder(): string[] {\n return ['primary', 'developer', 'system', 'danger'];\n }\n\n /**\n * Group items by their group property\n */\n protected GroupItems(items: UserMenuItem[]): Record<string, UserMenuItem[]> {\n return items.reduce((groups, item) => {\n const group = item.group || 'primary';\n if (!groups[group]) {\n groups[group] = [];\n }\n groups[group].push(item);\n return groups;\n }, {} as Record<string, UserMenuItem[]>);\n }\n\n // ========================================\n // CLICK HANDLING\n // ========================================\n\n /**\n * Handle menu item click. Dispatches to specific Handle_<id> methods.\n * Theme selection items (select-theme-*) are routed to HandleThemeSelection.\n */\n public async HandleItemClick(itemId: string): Promise<UserMenuActionResult> {\n const items = this.GetMenuItems();\n const item = items.find(i => i.id === itemId);\n\n if (!item || !item.enabled) {\n return { success: false, closeMenu: false, message: 'Item not found or disabled' };\n }\n\n // Route theme selection items to the theme handler\n if (itemId.startsWith('select-theme-')) {\n const themeId = itemId.substring('select-theme-'.length);\n return await this.HandleThemeSelection(themeId);\n }\n\n // Convert item id to handler method name (e.g., 'toggle-dev-mode' -> 'Handle_toggle_dev_mode')\n const handlerName = `Handle_${itemId.replace(/-/g, '_')}` as keyof this;\n\n if (typeof this[handlerName] === 'function') {\n return await (this[handlerName] as () => Promise<UserMenuActionResult>).call(this);\n }\n\n // Fall back to generic handler\n return await this.OnItemClick(item);\n }\n\n /**\n * Generic click handler for items without specific handlers.\n * Override for custom default behavior.\n */\n protected async OnItemClick(item: UserMenuItem): Promise<UserMenuActionResult> {\n console.warn(`No handler defined for menu item: ${item.id}`);\n return { success: false, closeMenu: true };\n }\n\n // ========================================\n // DEFAULT HANDLERS - Override to customize\n // ========================================\n\n /**\n * Handle \"My Profile\" click — signals the shell to open the new\n * Identity Card profile dialog. The shell wires this to ProfileDialogService.\n */\n protected async Handle_profile(): Promise<UserMenuActionResult> {\n return {\n success: true,\n closeMenu: true,\n message: 'profile'\n };\n }\n\n /**\n * Handle theme selection clicks.\n * Item IDs follow the pattern 'select-theme-<themeId>'.\n */\n protected async HandleThemeSelection(themeId: string): Promise<UserMenuActionResult> {\n return {\n success: true,\n closeMenu: false, // Keep menu open to see updated state\n message: `select-theme-${themeId}` // Signal for shell to handle\n };\n }\n\n /**\n * Handle \"Reset Layout\" click\n */\n protected async Handle_reset_layout(): Promise<UserMenuActionResult> {\n // Signal to shell to handle reset layout\n return {\n success: true,\n closeMenu: true,\n message: 'reset-layout' // Special signal for shell to handle\n };\n }\n\n /**\n * Handle \"Sign Out\" click\n */\n protected async Handle_logout(): Promise<UserMenuActionResult> {\n if (!this._context?.authService) {\n return { success: false, closeMenu: true, message: 'Auth service not available' };\n }\n\n // Clear auth data\n localStorage.removeItem('auth');\n localStorage.removeItem('claims');\n\n // Call logout\n await this._context.authService.logout();\n\n return { success: true, closeMenu: true };\n }\n\n // ========================================\n // PIN TO HOME HELPERS\n // ========================================\n\n /**\n * Handle \"Pin to Home\" click - signals the shell to pin the active resource\n */\n protected async Handle_pin_to_home(): Promise<UserMenuActionResult> {\n // Signal the shell to handle the actual pinning (it has access to DI and the active tab)\n // The shell's handler checks for Home app and duplicate pin conditions\n return {\n success: true,\n closeMenu: true,\n message: 'pin-to-home'\n };\n }\n\n /**\n * Handle \"Sharing Center\" click — signals the shell to open the dialog.\n * The shell has access to `ViewContainerRef` and the dialog service; the\n * menu only needs to report the intent.\n */\n protected async Handle_sharing_center(): Promise<UserMenuActionResult> {\n return {\n success: true,\n closeMenu: true,\n message: 'sharing-center'\n };\n }\n\n /** Signal the shell to open the feedback dialog */\n protected async Handle_submit_feedback(): Promise<UserMenuActionResult> {\n return {\n success: true,\n closeMenu: true,\n message: 'submit-feedback'\n };\n }\n\n /** Signal the shell to open the About dialog */\n protected async Handle_about(): Promise<UserMenuActionResult> {\n return {\n success: true,\n closeMenu: true,\n message: 'about'\n };\n }\n\n // ========================================\n // THEME HELPERS\n // ========================================\n\n /**\n * Build menu items for each registered theme plus a 'System' option.\n * Each theme gets a `select-theme-<id>` item ID. The currently active\n * theme (or 'system' preference) shows a checkmark icon.\n */\n protected BuildThemeMenuItems(): UserMenuItem[] {\n const themes = this._context?.availableThemes ?? [];\n const currentPreference = this._context?.themePreference ?? 'system';\n const items: UserMenuItem[] = [];\n let order = 1;\n\n for (const theme of themes) {\n const isActive = currentPreference === theme.Id;\n items.push({\n id: `select-theme-${theme.Id}`,\n label: theme.Name,\n icon: isActive ? 'fa-solid fa-check' : this.GetThemeIconForBaseTheme(theme.BaseTheme),\n color: isActive ? '#4CAF50' : undefined,\n group: 'system',\n order: order++,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: theme.Description ?? `Switch to ${theme.Name} theme`\n });\n }\n\n // Always add a 'System' option (auto-detect OS preference)\n const isSystemActive = currentPreference === 'system';\n items.push({\n id: 'select-theme-system',\n label: 'System',\n icon: isSystemActive ? 'fa-solid fa-check' : 'fa-solid fa-desktop',\n color: isSystemActive ? '#4CAF50' : undefined,\n group: 'system',\n order: order++,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: 'Auto-detect theme from OS preference'\n });\n\n return items;\n }\n\n /**\n * Get an appropriate icon for a base theme type.\n * Used for non-active theme items to hint at light vs dark.\n */\n protected GetThemeIconForBaseTheme(baseTheme: 'light' | 'dark'): string {\n return baseTheme === 'dark' ? 'fa-solid fa-moon' : 'fa-solid fa-sun';\n }\n\n // ========================================\n // UTILITY METHODS\n // ========================================\n\n /**\n * Get user display information for menu header\n */\n public GetUserDisplayInfo(): UserDisplayInfo {\n const user = this._context?.userEntity;\n const name = user?.Name || this._context?.user?.Name || 'User';\n const email = user?.Email || '';\n const avatarUrl = user?.UserImageURL || null;\n\n // Generate initials from name\n const nameParts = name.split(' ').filter(Boolean);\n const initials = nameParts.length >= 2\n ? `${nameParts[0][0]}${nameParts[nameParts.length - 1][0]}`.toUpperCase()\n : name.substring(0, 2).toUpperCase();\n\n return { name, email, avatarUrl, initials };\n }\n\n /**\n * Generate a unique tab ID\n */\n protected GenerateTabId(): string {\n return `tab-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n }\n\n /**\n * Get the current context (for subclasses)\n */\n protected get Context(): UserMenuContext | null {\n return this._context;\n }\n\n /**\n * Update context (called by shell when developer mode changes)\n */\n public UpdateContext(updates: Partial<UserMenuContext>): void {\n if (this._context) {\n this._context = { ...this._context, ...updates };\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"base-user-menu.js","sourceRoot":"","sources":["../../../src/lib/user-menu/base-user-menu.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,OAAO,YAAY;IACX,QAAQ,GAA2B,IAAI,CAAC;IACxC,QAAQ,CAAkB;IAEpC;QACI,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC7C,CAAC;IAED,2CAA2C;IAC3C,iBAAiB;IACjB,2CAA2C;IAE3C;;OAEG;IACI,KAAK,CAAC,UAAU,CAAC,OAAwB;QAC5C,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC;QACxB,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACO,KAAK,CAAC,YAAY,CAAC,OAAwB;QACjD,iDAAiD;IACrD,CAAC;IAED;;OAEG;IACI,OAAO;QACV,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;IACzB,CAAC;IAED,2CAA2C;IAC3C,UAAU;IACV,2CAA2C;IAE3C;;OAEG;IACO,iBAAiB;QACvB,OAAO;YACH,YAAY,EAAE,IAAI;YAClB,aAAa,EAAE,IAAI;YACnB,YAAY,EAAE,YAAY;YAC1B,cAAc,EAAE,MAAM;SACzB,CAAC;IACN,CAAC;IAED;;OAEG;IACI,UAAU;QACb,OAAO,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;IAChC,CAAC;IAED;;OAEG;IACI,UAAU,CAAC,OAAiC;QAC/C,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,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,CAAC;QAEzC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;IAChD,CAAC;IAED;;OAEG;IACO,aAAa;QACnB,OAAO,OAAO,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;IAC1E,CAAC;IAED;;OAEG;IACH,IAAc,OAAO;QACjB,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,aAAa,CAAC,OAAiC;QAClD,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,IAAI,CAAC,QAAQ,GAAG,EAAE,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,OAAO,EAAE,CAAC;QACrD,CAAC;IACL,CAAC;CACJ","sourcesContent":["import { RegisterClass } from '@memberjunction/global';\nimport {\n UserMenuItem,\n UserMenuElement,\n UserMenuContext,\n UserMenuActionResult,\n UserMenuOptions,\n UserMenuDivider,\n UserDisplayInfo\n} from './user-menu.types';\n\n/**\n * Base class for user menu implementations with built-in default behavior.\n *\n * This class provides the standard MemberJunction user menu. To customize:\n * 1. Create a subclass\n * 2. Register with @RegisterClass(BaseUserMenu)\n * 3. Override methods as needed\n *\n * Subclasses automatically get higher priority via compiler order since they\n * import this class, causing their @RegisterClass to execute after this one.\n *\n * @example\n * ```typescript\n * // In your custom app\n * import { BaseUserMenu } from '@memberjunction/ng-explorer-core';\n *\n * @RegisterClass(BaseUserMenu)\n * export class MyAppUserMenu extends BaseUserMenu {\n * public override GetMenuItems(): UserMenuItem[] {\n * const items = super.GetMenuItems();\n * // Add, remove, or modify items\n * items.push({ id: 'custom', label: 'My Custom Action', ... });\n * return items;\n * }\n *\n * protected override async Handle_custom(): Promise<UserMenuActionResult> {\n * // Handle the custom action\n * return { success: true, closeMenu: true };\n * }\n * }\n * ```\n */\nexport class BaseUserMenu {\n protected _context: UserMenuContext | null = null;\n protected _options: UserMenuOptions;\n\n constructor() {\n this._options = this.GetDefaultOptions();\n }\n\n // ========================================\n // INITIALIZATION\n // ========================================\n\n /**\n * Initialize the menu with context. Called by shell component.\n */\n public async Initialize(context: UserMenuContext): Promise<void> {\n this._context = context;\n await this.OnInitialize(context);\n }\n\n /**\n * Override to perform custom initialization\n */\n protected async OnInitialize(context: UserMenuContext): Promise<void> {\n // Override in subclass for custom initialization\n }\n\n /**\n * Cleanup when menu is destroyed\n */\n public Destroy(): void {\n this._context = null;\n }\n\n // ========================================\n // OPTIONS\n // ========================================\n\n /**\n * Get default menu configuration options\n */\n protected GetDefaultOptions(): UserMenuOptions {\n return {\n showUserName: true,\n showUserEmail: true,\n menuPosition: 'below-left',\n animationStyle: 'fade'\n };\n }\n\n /**\n * Get current menu options\n */\n public GetOptions(): UserMenuOptions {\n return { ...this._options };\n }\n\n /**\n * Update menu options\n */\n public SetOptions(options: Partial<UserMenuOptions>): void {\n this._options = { ...this._options, ...options };\n }\n\n // ========================================\n // MENU ITEMS - Override to customize\n // ========================================\n\n /**\n * Get all menu items. Override to customize the menu structure.\n *\n * Items are grouped by the `group` property with dividers between groups.\n * Groups are rendered in this order: primary, developer, system, danger.\n *\n * Developer-only items are automatically hidden unless the user has\n * Developer role AND developer mode is enabled.\n */\n public GetMenuItems(): UserMenuItem[] {\n return [\n // === PRIMARY GROUP ===\n {\n id: 'profile',\n label: 'My Profile',\n icon: 'fa-solid fa-user-circle',\n group: 'primary',\n order: 10,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: 'View and edit your profile'\n },\n {\n id: 'pin-to-home',\n label: 'Pin to Home',\n icon: 'fa-solid fa-house-chimney',\n group: 'primary',\n order: 20,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: 'Pin the current resource to your Home dashboard'\n },\n {\n id: 'sharing-center',\n label: 'Sharing Center',\n icon: 'fa-solid fa-share-nodes',\n group: 'primary',\n order: 25,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: \"See what you've shared and what's been shared with you\"\n },\n {\n id: 'submit-feedback',\n label: 'Submit Feedback',\n icon: 'fa-solid fa-comment-dots',\n group: 'primary',\n order: 30,\n developerOnly: false,\n visible: this._context?.feedbackEnabled !== false,\n enabled: true,\n tooltip: 'Report a bug or request a feature'\n },\n\n // Developer tools live in the Admin app's \"Developer Tools\" section,\n // not in this menu. The DeveloperModeService still exists for\n // per-record dev affordances (e.g. \"open in CodeGen\" links).\n\n // === SYSTEM GROUP (Theme selection) ===\n ...this.BuildThemeMenuItems(),\n {\n id: 'reset-layout',\n label: 'Reset Layout',\n icon: 'fa-solid fa-rotate-left',\n group: 'system',\n order: 10,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: 'Reset workspace to default layout'\n },\n {\n id: 'diagnostic-bundle',\n label: 'Diagnostic Bundle',\n icon: 'fa-solid fa-stethoscope',\n group: 'system',\n order: 15,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: 'Capture, download, or submit a diagnostic bundle (.mjdiag)'\n },\n {\n id: 'about',\n label: 'About MemberJunction',\n icon: 'fa-solid fa-circle-info',\n group: 'system',\n order: 20,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: 'Version, diagnostics, and links'\n },\n\n // === DANGER GROUP ===\n {\n id: 'logout',\n label: 'Sign Out',\n icon: 'fa-solid fa-sign-out-alt',\n color: '#c62828',\n cssClass: 'danger',\n group: 'danger',\n order: 100,\n developerOnly: false,\n visible: true,\n enabled: true\n }\n ];\n }\n\n /**\n * Get the complete menu element list including dividers between groups.\n * This is called by the template to render the menu.\n */\n public GetMenuElements(): UserMenuElement[] {\n const items = this.GetMenuItems();\n const visibleItems = items.filter(item => this.IsItemVisible(item));\n\n // Group items\n const groups = this.GroupItems(visibleItems);\n const elements: UserMenuElement[] = [];\n\n // Define group order\n const groupOrder = this.GetGroupOrder();\n const sortedGroupKeys = Object.keys(groups).sort((a, b) => {\n const aIndex = groupOrder.indexOf(a);\n const bIndex = groupOrder.indexOf(b);\n return (aIndex === -1 ? 999 : aIndex) - (bIndex === -1 ? 999 : bIndex);\n });\n\n // Build element list with dividers\n sortedGroupKeys.forEach((group, index) => {\n if (index > 0) {\n elements.push({ type: 'divider', group } as UserMenuDivider);\n }\n\n // Sort items within group by order\n const groupItems = groups[group].sort((a, b) => a.order - b.order);\n elements.push(...groupItems);\n });\n\n return elements;\n }\n\n /**\n * Check if a menu item should be visible based on current context\n */\n protected IsItemVisible(item: UserMenuItem): boolean {\n // Check developer-only visibility\n if (item.developerOnly && !this._context?.isDeveloper) {\n return false;\n }\n\n // Check item's own visible flag\n return item.visible;\n }\n\n /**\n * Get the ordered list of group names for menu rendering.\n * Override to insert custom groups (e.g., 'organization' before 'primary').\n */\n protected GetGroupOrder(): string[] {\n return ['primary', 'developer', 'system', 'danger'];\n }\n\n /**\n * Group items by their group property\n */\n protected GroupItems(items: UserMenuItem[]): Record<string, UserMenuItem[]> {\n return items.reduce((groups, item) => {\n const group = item.group || 'primary';\n if (!groups[group]) {\n groups[group] = [];\n }\n groups[group].push(item);\n return groups;\n }, {} as Record<string, UserMenuItem[]>);\n }\n\n // ========================================\n // CLICK HANDLING\n // ========================================\n\n /**\n * Handle menu item click. Dispatches to specific Handle_<id> methods.\n * Theme selection items (select-theme-*) are routed to HandleThemeSelection.\n */\n public async HandleItemClick(itemId: string): Promise<UserMenuActionResult> {\n const items = this.GetMenuItems();\n const item = items.find(i => i.id === itemId);\n\n if (!item || !item.enabled) {\n return { success: false, closeMenu: false, message: 'Item not found or disabled' };\n }\n\n // Route theme selection items to the theme handler\n if (itemId.startsWith('select-theme-')) {\n const themeId = itemId.substring('select-theme-'.length);\n return await this.HandleThemeSelection(themeId);\n }\n\n // Convert item id to handler method name (e.g., 'toggle-dev-mode' -> 'Handle_toggle_dev_mode')\n const handlerName = `Handle_${itemId.replace(/-/g, '_')}` as keyof this;\n\n if (typeof this[handlerName] === 'function') {\n return await (this[handlerName] as () => Promise<UserMenuActionResult>).call(this);\n }\n\n // Fall back to generic handler\n return await this.OnItemClick(item);\n }\n\n /**\n * Generic click handler for items without specific handlers.\n * Override for custom default behavior.\n */\n protected async OnItemClick(item: UserMenuItem): Promise<UserMenuActionResult> {\n console.warn(`No handler defined for menu item: ${item.id}`);\n return { success: false, closeMenu: true };\n }\n\n // ========================================\n // DEFAULT HANDLERS - Override to customize\n // ========================================\n\n /**\n * Handle \"My Profile\" click — signals the shell to open the new\n * Identity Card profile dialog. The shell wires this to ProfileDialogService.\n */\n protected async Handle_profile(): Promise<UserMenuActionResult> {\n return {\n success: true,\n closeMenu: true,\n message: 'profile'\n };\n }\n\n /**\n * Handle theme selection clicks.\n * Item IDs follow the pattern 'select-theme-<themeId>'.\n */\n protected async HandleThemeSelection(themeId: string): Promise<UserMenuActionResult> {\n return {\n success: true,\n closeMenu: false, // Keep menu open to see updated state\n message: `select-theme-${themeId}` // Signal for shell to handle\n };\n }\n\n /**\n * Handle \"Reset Layout\" click\n */\n protected async Handle_reset_layout(): Promise<UserMenuActionResult> {\n // Signal to shell to handle reset layout\n return {\n success: true,\n closeMenu: true,\n message: 'reset-layout' // Special signal for shell to handle\n };\n }\n\n /**\n * Handle \"Sign Out\" click\n */\n protected async Handle_logout(): Promise<UserMenuActionResult> {\n if (!this._context?.authService) {\n return { success: false, closeMenu: true, message: 'Auth service not available' };\n }\n\n // Clear auth data\n localStorage.removeItem('auth');\n localStorage.removeItem('claims');\n\n // Call logout\n await this._context.authService.logout();\n\n return { success: true, closeMenu: true };\n }\n\n // ========================================\n // PIN TO HOME HELPERS\n // ========================================\n\n /**\n * Handle \"Pin to Home\" click - signals the shell to pin the active resource\n */\n protected async Handle_pin_to_home(): Promise<UserMenuActionResult> {\n // Signal the shell to handle the actual pinning (it has access to DI and the active tab)\n // The shell's handler checks for Home app and duplicate pin conditions\n return {\n success: true,\n closeMenu: true,\n message: 'pin-to-home'\n };\n }\n\n /**\n * Handle \"Sharing Center\" click — signals the shell to open the dialog.\n * The shell has access to `ViewContainerRef` and the dialog service; the\n * menu only needs to report the intent.\n */\n protected async Handle_sharing_center(): Promise<UserMenuActionResult> {\n return {\n success: true,\n closeMenu: true,\n message: 'sharing-center'\n };\n }\n\n /** Signal the shell to open the feedback dialog */\n protected async Handle_submit_feedback(): Promise<UserMenuActionResult> {\n return {\n success: true,\n closeMenu: true,\n message: 'submit-feedback'\n };\n }\n\n /** Signal the shell to open the About dialog */\n protected async Handle_about(): Promise<UserMenuActionResult> {\n return {\n success: true,\n closeMenu: true,\n message: 'about'\n };\n }\n\n /** Signal the shell to open the Diagnostic Bundle dialog */\n protected async Handle_diagnostic_bundle(): Promise<UserMenuActionResult> {\n return {\n success: true,\n closeMenu: true,\n message: 'diagnostic-bundle'\n };\n }\n\n // ========================================\n // THEME HELPERS\n // ========================================\n\n /**\n * Build menu items for each registered theme plus a 'System' option.\n * Each theme gets a `select-theme-<id>` item ID. The currently active\n * theme (or 'system' preference) shows a checkmark icon.\n */\n protected BuildThemeMenuItems(): UserMenuItem[] {\n const themes = this._context?.availableThemes ?? [];\n const currentPreference = this._context?.themePreference ?? 'system';\n const items: UserMenuItem[] = [];\n let order = 1;\n\n for (const theme of themes) {\n const isActive = currentPreference === theme.Id;\n items.push({\n id: `select-theme-${theme.Id}`,\n label: theme.Name,\n icon: isActive ? 'fa-solid fa-check' : this.GetThemeIconForBaseTheme(theme.BaseTheme),\n color: isActive ? '#4CAF50' : undefined,\n group: 'system',\n order: order++,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: theme.Description ?? `Switch to ${theme.Name} theme`\n });\n }\n\n // Always add a 'System' option (auto-detect OS preference)\n const isSystemActive = currentPreference === 'system';\n items.push({\n id: 'select-theme-system',\n label: 'System',\n icon: isSystemActive ? 'fa-solid fa-check' : 'fa-solid fa-desktop',\n color: isSystemActive ? '#4CAF50' : undefined,\n group: 'system',\n order: order++,\n developerOnly: false,\n visible: true,\n enabled: true,\n tooltip: 'Auto-detect theme from OS preference'\n });\n\n return items;\n }\n\n /**\n * Get an appropriate icon for a base theme type.\n * Used for non-active theme items to hint at light vs dark.\n */\n protected GetThemeIconForBaseTheme(baseTheme: 'light' | 'dark'): string {\n return baseTheme === 'dark' ? 'fa-solid fa-moon' : 'fa-solid fa-sun';\n }\n\n // ========================================\n // UTILITY METHODS\n // ========================================\n\n /**\n * Get user display information for menu header\n */\n public GetUserDisplayInfo(): UserDisplayInfo {\n const user = this._context?.userEntity;\n const name = user?.Name || this._context?.user?.Name || 'User';\n const email = user?.Email || '';\n const avatarUrl = user?.UserImageURL || null;\n\n // Generate initials from name\n const nameParts = name.split(' ').filter(Boolean);\n const initials = nameParts.length >= 2\n ? `${nameParts[0][0]}${nameParts[nameParts.length - 1][0]}`.toUpperCase()\n : name.substring(0, 2).toUpperCase();\n\n return { name, email, avatarUrl, initials };\n }\n\n /**\n * Generate a unique tab ID\n */\n protected GenerateTabId(): string {\n return `tab-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n }\n\n /**\n * Get the current context (for subclasses)\n */\n protected get Context(): UserMenuContext | null {\n return this._context;\n }\n\n /**\n * Update context (called by shell when developer mode changes)\n */\n public UpdateContext(updates: Partial<UserMenuContext>): void {\n if (this._context) {\n this._context = { ...this._context, ...updates };\n }\n }\n}\n"]}
|
|
@@ -189,6 +189,20 @@ export declare class UserNotificationsComponent extends BaseAngularComponent imp
|
|
|
189
189
|
* Returns true if the notification was a conversation type and navigation was attempted.
|
|
190
190
|
*/
|
|
191
191
|
private navigateToConversation;
|
|
192
|
+
/** The routine-run config of a notification, or null when it is not one (or names no routine). */
|
|
193
|
+
private parseUserRoutineConfig;
|
|
194
|
+
/**
|
|
195
|
+
* Opens what a routine run produced: its reply, in the routine's own conversation (the
|
|
196
|
+
* `{ type:'UserRoutine', routineId, runId, conversationId? }` ResourceConfiguration). That
|
|
197
|
+
* conversation is application-scoped, so the chat sidebar never lists it; the click deep-links
|
|
198
|
+
* into the Chat app's Conversations item. A notification written before the config carried the
|
|
199
|
+
* conversation reads it off the routine; a routine with no conversation opens in the Routines
|
|
200
|
+
* app. Returns false (not handled) when the notification is not a routine run.
|
|
201
|
+
*/
|
|
202
|
+
private navigateToUserRoutine;
|
|
203
|
+
private openUserRoutineOutput;
|
|
204
|
+
/** The routine's ConversationID, or null when the routine cannot be read or has none. */
|
|
205
|
+
private loadRoutineConversationId;
|
|
192
206
|
GetNotificationType(typeId: string | null): MJUserNotificationTypeEntity | null;
|
|
193
207
|
/** @deprecated Use {@link GetNotificationType}. */
|
|
194
208
|
getNotificationType(typeId: string | null): MJUserNotificationTypeEntity | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-notifications.component.d.ts","sourceRoot":"","sources":["../../../src/lib/user-notifications/user-notifications.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAU,MAAM,eAAe,CAAC;AAC/G,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,
|
|
1
|
+
{"version":3,"file":"user-notifications.component.d.ts","sourceRoot":"","sources":["../../../src/lib/user-notifications/user-notifications.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,SAAS,EAAE,MAAM,EAAE,aAAa,EAAU,MAAM,eAAe,CAAC;AAC/G,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,4BAA4B,EAAuC,MAAM,+BAA+B,CAAC;AAC5I,OAAO,EAAgB,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAG1E,OAAO,EAAE,kBAAkB,EAAW,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;;AAErE;;GAEG;AACH,KAAK,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAA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AAG,MAAM;IAI3D,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAItD,kDAAkD;IAC3C,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;yCAx3B3C,0BAA0B;2CAA1B,0BAA0B;CA23BtC"}
|
|
@@ -696,6 +696,9 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
696
696
|
if (typeName === 'meet-room') {
|
|
697
697
|
return true;
|
|
698
698
|
}
|
|
699
|
+
if (this.parseUserRoutineConfig(notification)) {
|
|
700
|
+
return true;
|
|
701
|
+
}
|
|
699
702
|
}
|
|
700
703
|
const info = this.NotificationUrl(notification);
|
|
701
704
|
return (info !== null && info.urlParts && info.urlParts.length > 0);
|
|
@@ -879,6 +882,9 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
879
882
|
if (this.navigateToMeetRoom(notification)) {
|
|
880
883
|
return;
|
|
881
884
|
}
|
|
885
|
+
if (this.navigateToUserRoutine(notification)) {
|
|
886
|
+
return;
|
|
887
|
+
}
|
|
882
888
|
if (this.navigateToHandoffConsole(notification)) {
|
|
883
889
|
return;
|
|
884
890
|
}
|
|
@@ -1064,9 +1070,63 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
1064
1070
|
navConfig['versionNumber'] = config.versionNumber;
|
|
1065
1071
|
if (config.taskId)
|
|
1066
1072
|
navConfig['taskId'] = config.taskId;
|
|
1067
|
-
|
|
1073
|
+
// The Chat tab is usually already open and gets reused; a reused tab reads its configuration
|
|
1074
|
+
// only at init, so the same values go in the query params, which it does react to.
|
|
1075
|
+
this.navigationService.OpenNavItemByName('Conversations', navConfig, chatApp.ID, { queryParams: { ...navConfig } });
|
|
1068
1076
|
return true;
|
|
1069
1077
|
}
|
|
1078
|
+
/** The routine-run config of a notification, or null when it is not one (or names no routine). */
|
|
1079
|
+
parseUserRoutineConfig(notification) {
|
|
1080
|
+
if (!notification.ResourceConfiguration || notification.ResourceConfiguration.trim().length === 0) {
|
|
1081
|
+
return null;
|
|
1082
|
+
}
|
|
1083
|
+
const config = SafeJSONParse(notification.ResourceConfiguration);
|
|
1084
|
+
if (!config || config.type?.trim().toLowerCase() !== 'userroutine' || !config.routineId) {
|
|
1085
|
+
return null;
|
|
1086
|
+
}
|
|
1087
|
+
return config;
|
|
1088
|
+
}
|
|
1089
|
+
/**
|
|
1090
|
+
* Opens what a routine run produced: its reply, in the routine's own conversation (the
|
|
1091
|
+
* `{ type:'UserRoutine', routineId, runId, conversationId? }` ResourceConfiguration). That
|
|
1092
|
+
* conversation is application-scoped, so the chat sidebar never lists it; the click deep-links
|
|
1093
|
+
* into the Chat app's Conversations item. A notification written before the config carried the
|
|
1094
|
+
* conversation reads it off the routine; a routine with no conversation opens in the Routines
|
|
1095
|
+
* app. Returns false (not handled) when the notification is not a routine run.
|
|
1096
|
+
*/
|
|
1097
|
+
navigateToUserRoutine(notification) {
|
|
1098
|
+
const config = this.parseUserRoutineConfig(notification);
|
|
1099
|
+
if (!config) {
|
|
1100
|
+
return false;
|
|
1101
|
+
}
|
|
1102
|
+
void this.openUserRoutineOutput(config);
|
|
1103
|
+
return true;
|
|
1104
|
+
}
|
|
1105
|
+
async openUserRoutineOutput(config) {
|
|
1106
|
+
const conversationId = config.conversationId ?? await this.loadRoutineConversationId(config.routineId);
|
|
1107
|
+
const chatApp = conversationId ? this.appManager.GetAppByName('Chat') : null;
|
|
1108
|
+
if (conversationId && chatApp) {
|
|
1109
|
+
// Query params as well as configuration: an already-open Chat tab is reused and reacts
|
|
1110
|
+
// only to a query-param change (its configuration is read once, at init).
|
|
1111
|
+
await this.navigationService.OpenNavItemByName('Conversations', { conversationId }, chatApp.ID, { queryParams: { conversationId } });
|
|
1112
|
+
return;
|
|
1113
|
+
}
|
|
1114
|
+
const routinesApp = this.appManager.GetAppByName('Routines');
|
|
1115
|
+
if (routinesApp) {
|
|
1116
|
+
await this.navigationService.OpenNavItemByName('My Routines', { routine: config.routineId }, routinesApp.ID);
|
|
1117
|
+
return;
|
|
1118
|
+
}
|
|
1119
|
+
MJNotificationService.Instance.CreateSimpleNotification('The Routines app is not installed, so this routine cannot be opened', 'error', 4000);
|
|
1120
|
+
}
|
|
1121
|
+
/** The routine's ConversationID, or null when the routine cannot be read or has none. */
|
|
1122
|
+
async loadRoutineConversationId(routineId) {
|
|
1123
|
+
const p = this.ProviderToUse;
|
|
1124
|
+
const routine = await p.GetEntityObject('MJ: User Routines', p.CurrentUser);
|
|
1125
|
+
if (!await routine.Load(routineId)) {
|
|
1126
|
+
return null;
|
|
1127
|
+
}
|
|
1128
|
+
return routine.ConversationID ?? null;
|
|
1129
|
+
}
|
|
1070
1130
|
GetNotificationType(typeId) {
|
|
1071
1131
|
if (!typeId)
|
|
1072
1132
|
return null;
|
|
@@ -1139,5 +1199,5 @@ export class UserNotificationsComponent extends BaseAngularComponent {
|
|
|
1139
1199
|
type: Component,
|
|
1140
1200
|
args: [{ standalone: false, selector: 'app-user-notifications', template: "<div class=\"notifications-container\">\n <!-- Header Section -->\n <div class=\"notifications-header\">\n <div class=\"header-top\">\n <div class=\"header-title\">\n <div class=\"title-icon\">\n <i class=\"fa-solid fa-bell\"></i>\n </div>\n <div class=\"title-text\">\n <h1>Notifications</h1>\n @if (UnreadNotifications.length > 0) {\n <span class=\"title-subtitle\">{{UnreadNotifications.length}} unread</span>\n } @else if (AllNotifications.length > 0) {\n <span class=\"title-subtitle\">All caught up</span>\n }\n </div>\n </div>\n\n @if (AllNotifications.length > 0) {\n <div class=\"header-actions\">\n @if (UnreadNotifications.length > 0) {\n <button class=\"action-btn action-btn-ghost\"\n type=\"button\"\n (click)=\"markAllAsRead()\"\n aria-label=\"Mark all notifications as read\">\n <i class=\"fa-solid fa-check-double\" aria-hidden=\"true\"></i>\n <span class=\"btn-text\">Mark All Read</span>\n </button>\n }\n @if (ReadNotifications.length > 0) {\n <button class=\"action-btn action-btn-secondary\"\n type=\"button\"\n (click)=\"markAllAsUnread()\"\n aria-label=\"Mark all notifications as unread\">\n <i class=\"fa-solid fa-envelope\" aria-hidden=\"true\"></i>\n <span class=\"btn-text\">Mark All Unread</span>\n </button>\n }\n </div>\n }\n </div>\n\n <!-- Filters Section -->\n @if (AllNotifications.length > 0) {\n <div class=\"filters-section\">\n <div class=\"filters-slider\">\n <div class=\"slider-content\">\n <!-- Read-status pills -->\n <div class=\"header-stats\" role=\"group\" aria-label=\"Filter notifications by read status\">\n <button class=\"stat-pill\"\n type=\"button\"\n [class.active]=\"radioSelected === 'All'\"\n (click)=\"selectReadOption('All')\"\n [attr.aria-pressed]=\"radioSelected === 'All'\"\n aria-label=\"Show all notifications\">\n <span class=\"stat-label\">All</span>\n <span class=\"stat-count\">{{AllNotifications.length}}</span>\n </button>\n\n @if (UnreadNotifications.length > 0 || ReadNotifications.length === 0) {\n <button class=\"stat-pill\"\n type=\"button\"\n [class.active]=\"radioSelected === 'Unread'\"\n [class.has-unread]=\"UnreadNotifications.length > 0\"\n (click)=\"selectReadOption('Unread')\"\n [attr.aria-pressed]=\"radioSelected === 'Unread'\"\n aria-label=\"Show unread notifications\">\n <span class=\"stat-label\">Unread</span>\n <span class=\"stat-count\" [class.unread-count]=\"UnreadNotifications.length > 0\">\n {{UnreadNotifications.length}}\n </span>\n </button>\n }\n\n @if (ReadNotifications.length > 0 || UnreadNotifications.length === 0) {\n <button class=\"stat-pill\"\n type=\"button\"\n [class.active]=\"radioSelected === 'Read'\"\n (click)=\"selectReadOption('Read')\"\n [attr.aria-pressed]=\"radioSelected === 'Read'\"\n aria-label=\"Show read notifications\">\n <span class=\"stat-label\">Read</span>\n <span class=\"stat-count\">{{ReadNotifications.length}}</span>\n </button>\n }\n </div>\n\n <!-- Type filter -->\n @if (notificationTypes.length > 0) {\n <div class=\"filter-item type-filter-slider\">\n <select class=\"type-select\"\n [(ngModel)]=\"selectedTypeFilter\"\n (change)=\"onTypeFilterChange(selectedTypeFilter)\"\n aria-label=\"Filter by notification type\">\n <option [value]=\"null\">All Types</option>\n @for (type of notificationTypes; track type.ID) {\n <option [value]=\"type.ID\">{{type.Name}}</option>\n }\n </select>\n </div>\n }\n </div>\n </div>\n\n <!-- Search -->\n <div class=\"search-section\">\n <div class=\"search-container\">\n <i class=\"fa-solid fa-magnifying-glass search-icon\" aria-hidden=\"true\"></i>\n <input type=\"text\"\n class=\"search-input\"\n placeholder=\"Search notifications...\"\n [value]=\"currentFilter\"\n (input)=\"onFilterChanged($any($event.target).value)\"\n aria-label=\"Search notifications\" />\n </div>\n </div>\n\n @if (NotificationsToShow.length !== AllNotifications.length) {\n <div class=\"filter-info\">\n <span class=\"filter-badge\">\n <i class=\"fa-solid fa-filter\" aria-hidden=\"true\"></i>\n Showing {{NotificationsToShow.length}} of {{AllNotifications.length}}\n </span>\n </div>\n }\n </div>\n }\n </div>\n\n <!-- Notifications Content -->\n <div class=\"notifications-content\">\n @if (NotificationsToShow.length === 0 && AllNotifications.length === 0) {\n <mj-empty-state\n Variant=\"success\"\n Icon=\"fa-solid fa-bell-slash\"\n Title=\"No Notifications\"\n Message=\"You're all caught up! New notifications will appear here.\" />\n } @else if (NotificationsToShow.length === 0) {\n <mj-empty-state\n Variant=\"no-results\"\n Icon=\"fa-solid fa-filter-circle-xmark\"\n Title=\"No Matching Notifications\"\n Message=\"Try adjusting your filters to see more notifications.\" />\n } @else {\n <!-- Day-grouped notification list -->\n <div class=\"notifications-list\">\n @for (group of Groups; track group.Key) {\n <div class=\"group-label\">{{group.Label}}</div>\n\n @for (vm of group.Items; track vm.N.ID) {\n <article class=\"notification-card\"\n [class.unread]=\"vm.N.Unread\"\n [class.expanded]=\"IsExpanded(vm)\"\n [class.clickable]=\"vm.Clickable\"\n role=\"article\"\n [attr.aria-label]=\"vm.N.Title\">\n\n <!-- Unread Indicator Bar -->\n <div class=\"card-indicator\" aria-hidden=\"true\"></div>\n\n <!-- Type Icon -->\n <div class=\"card-icon\" aria-hidden=\"true\">\n <i [class]=\"'fa-solid ' + getTypeIcon(vm.N)\"\n [style.color]=\"getTypeColor(vm.N)\"></i>\n </div>\n\n <!-- Content -->\n <div class=\"card-content\" (click)=\"notificationClicked(vm.N)\">\n <div class=\"card-header\">\n <h3 class=\"card-title\" [class.card-title-unread]=\"vm.N.Unread\">\n {{vm.N.Title}}\n </h3>\n <span class=\"card-time\" [title]=\"(vm.N.__mj_CreatedAt | date:'medium') ?? ''\">\n @if (vm.Relative) {\n {{vm.Relative}}\n } @else {\n <time [attr.datetime]=\"vm.N.__mj_CreatedAt\">{{vm.N.__mj_CreatedAt | date:'MMM d, h:mm a'}}</time>\n }\n </span>\n </div>\n\n <div class=\"card-meta\">\n <span class=\"card-type\">{{getTypeName(vm.N)}}</span>\n @if (vm.Clickable) {\n <span class=\"card-open-hint\">\n <i class=\"fa-solid fa-arrow-up-right-from-square\" aria-hidden=\"true\"></i> Open\n </span>\n }\n </div>\n\n @if (!IsExpanded(vm)) {\n <p class=\"card-message\">{{vm.Preview}}</p>\n } @else {\n <div class=\"card-rich\" (click)=\"$event.stopPropagation()\">\n @switch (vm.Kind) {\n @case ('html') {\n <!-- Angular sanitizes on [innerHTML] bind; chrome tags were stripped at classification -->\n <div class=\"card-rich-html\" [innerHTML]=\"vm.Body\"></div>\n }\n @case ('markdown') {\n <mj-markdown class=\"card-rich-md\" [data]=\"vm.Body\" [enableMermaid]=\"false\"></mj-markdown>\n }\n @default {\n <p class=\"card-message card-message-full\">{{vm.N.Message}}</p>\n }\n }\n </div>\n }\n\n @if (vm.Expandable) {\n <button class=\"card-expand-btn\" type=\"button\"\n (click)=\"ToggleExpanded(vm, $event)\"\n [attr.aria-expanded]=\"IsExpanded(vm)\">\n <i class=\"fa-solid\" [class.fa-chevron-down]=\"!IsExpanded(vm)\" [class.fa-chevron-up]=\"IsExpanded(vm)\" aria-hidden=\"true\"></i>\n {{ IsExpanded(vm) ? 'Show less' : 'Show more' }}\n </button>\n }\n </div>\n\n <!-- Actions -->\n <div class=\"card-actions\">\n @if (vm.N.Unread) {\n <button class=\"card-action-btn\"\n type=\"button\"\n (click)=\"markAsRead(vm.N, true, null)\"\n [attr.aria-label]=\"'Mark ' + vm.N.Title + ' as read'\"\n title=\"Mark as Read\">\n <i class=\"fa-solid fa-check\" aria-hidden=\"true\"></i>\n <span class=\"action-text\">Read</span>\n </button>\n } @else {\n <button class=\"card-action-btn\"\n type=\"button\"\n (click)=\"markAsRead(vm.N, false, null)\"\n [attr.aria-label]=\"'Mark ' + vm.N.Title + ' as unread'\"\n title=\"Mark as Unread\">\n <i class=\"fa-solid fa-envelope\" aria-hidden=\"true\"></i>\n <span class=\"action-text\">Unread</span>\n </button>\n }\n </div>\n </article>\n }\n }\n </div>\n }\n </div>\n</div>\n", styles: ["/* \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\n User Notifications \u2014 day-grouped cards with rich (HTML/Markdown) content,\n expand/collapse, and token-driven theming (light + dark for free).\n \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 */\n\n:host {\n display: block;\n height: 100%;\n}\n\n.notifications-container {\n display: flex;\n flex-direction: column;\n height: 100%;\n background: var(--mj-bg-page);\n}\n\n/* \u2500\u2500 Header \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.notifications-header {\n flex-shrink: 0;\n padding: 20px 24px 12px 24px;\n background: var(--mj-bg-surface);\n border-bottom: 1px solid var(--mj-border-default);\n}\n\n.header-top {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 16px;\n margin-bottom: 14px;\n}\n\n.header-title {\n display: flex;\n align-items: center;\n gap: 12px;\n min-width: 0;\n}\n\n.title-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 40px;\n height: 40px;\n border-radius: var(--mj-radius-lg, 12px);\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n font-size: 16px;\n}\n\n.title-text {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n\n.title-text h1 {\n margin: 0;\n font-size: 20px;\n font-weight: 700;\n color: var(--mj-text-primary);\n line-height: 1.2;\n}\n\n.title-subtitle {\n font-size: 12px;\n color: var(--mj-text-muted);\n}\n\n.header-actions {\n display: flex;\n gap: 8px;\n flex-shrink: 0;\n}\n\n.action-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 7px 12px;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-secondary);\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s, border-color 0.15s;\n}\n\n.action-btn:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n}\n\n.action-btn-ghost {\n border-color: color-mix(in srgb, var(--mj-brand-primary) 35%, transparent);\n color: var(--mj-brand-primary);\n}\n\n.action-btn-ghost:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, var(--mj-bg-surface));\n color: var(--mj-brand-primary);\n}\n\n/* \u2500\u2500 Filters \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.filters-section {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 10px;\n}\n\n.filters-slider {\n min-width: 0;\n}\n\n.slider-content {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.header-stats {\n display: inline-flex;\n gap: 4px;\n padding: 3px;\n border-radius: var(--mj-radius-full, 999px);\n background: var(--mj-bg-surface-sunken);\n}\n\n.stat-pill {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 12px;\n border: none;\n border-radius: var(--mj-radius-full, 999px);\n background: transparent;\n color: var(--mj-text-secondary);\n font-size: 12px;\n font-weight: 600;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s;\n}\n\n.stat-pill:hover {\n color: var(--mj-text-primary);\n}\n\n.stat-pill.active {\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n box-shadow: var(--mj-shadow-sm);\n}\n\n.stat-count {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n border-radius: var(--mj-radius-full, 999px);\n background: color-mix(in srgb, var(--mj-text-muted) 14%, transparent);\n color: var(--mj-text-secondary);\n font-size: 10px;\n font-weight: 700;\n}\n\n.stat-count.unread-count {\n background: color-mix(in srgb, var(--mj-brand-primary) 15%, transparent);\n color: var(--mj-brand-primary);\n}\n\n.type-select {\n padding: 7px 10px;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-size: 12px;\n cursor: pointer;\n}\n\n.search-section {\n flex: 1 1 220px;\n min-width: 180px;\n}\n\n.search-container {\n position: relative;\n display: flex;\n align-items: center;\n}\n\n.search-icon {\n position: absolute;\n left: 12px;\n color: var(--mj-text-muted);\n font-size: 12px;\n pointer-events: none;\n}\n\n.search-input {\n width: 100%;\n padding: 8px 12px 8px 32px;\n border-radius: var(--mj-radius-md, 8px);\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n font-size: 13px;\n}\n\n.search-input:focus {\n outline: none;\n border-color: var(--mj-border-focus);\n box-shadow: 0 0 0 3px color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n}\n\n.filter-info {\n flex-basis: 100%;\n}\n\n.filter-badge {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 4px 10px;\n border-radius: var(--mj-radius-full, 999px);\n background: color-mix(in srgb, var(--mj-status-info) 10%, var(--mj-bg-surface));\n color: var(--mj-status-info);\n font-size: 11px;\n font-weight: 600;\n}\n\n/* \u2500\u2500 Content / list \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.notifications-content {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n padding: 16px 24px 32px 24px;\n}\n\n.notifications-list {\n display: flex;\n flex-direction: column;\n gap: 10px;\n max-width: 960px;\n margin: 0 auto;\n}\n\n.group-label {\n position: sticky;\n top: -16px;\n z-index: 1;\n padding: 10px 2px 4px 2px;\n background: var(--mj-bg-page);\n font-size: 11px;\n font-weight: 700;\n letter-spacing: 0.08em;\n text-transform: uppercase;\n color: var(--mj-text-muted);\n}\n\n.group-label:not(:first-child) {\n margin-top: 8px;\n}\n\n/* \u2500\u2500 Card \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.notification-card {\n position: relative;\n display: flex;\n gap: 12px;\n padding: 14px 16px;\n border: 1px solid var(--mj-border-default);\n border-radius: var(--mj-radius-lg, 12px);\n background: var(--mj-bg-surface);\n transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;\n overflow: hidden;\n}\n\n.notification-card:hover {\n border-color: var(--mj-border-strong);\n box-shadow: var(--mj-shadow-sm);\n}\n\n.notification-card.unread {\n background: color-mix(in srgb, var(--mj-brand-primary) 3%, var(--mj-bg-surface));\n}\n\n.card-indicator {\n display: none;\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n width: 3px;\n background: var(--mj-brand-primary);\n border-radius: 0 2px 2px 0;\n}\n\n.notification-card.unread .card-indicator {\n display: block;\n}\n\n.card-icon {\n flex-shrink: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n height: 36px;\n border-radius: var(--mj-radius-md, 10px);\n background: var(--mj-bg-surface-sunken);\n font-size: 14px;\n}\n\n.card-content {\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.notification-card.clickable .card-content {\n cursor: pointer;\n}\n\n.card-header {\n display: flex;\n align-items: baseline;\n justify-content: space-between;\n gap: 12px;\n}\n\n.card-title {\n margin: 0;\n font-size: 14px;\n font-weight: 500;\n color: var(--mj-text-primary);\n overflow-wrap: anywhere;\n}\n\n.card-title-unread {\n font-weight: 700;\n}\n\n.card-time {\n flex-shrink: 0;\n font-size: 11px;\n color: var(--mj-text-muted);\n white-space: nowrap;\n}\n\n.card-meta {\n display: flex;\n align-items: center;\n gap: 8px;\n margin: 3px 0 6px 0;\n}\n\n.card-type {\n display: inline-flex;\n padding: 2px 8px;\n border-radius: var(--mj-radius-full, 999px);\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n font-size: 10px;\n font-weight: 700;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n}\n\n.card-open-hint {\n display: none;\n align-items: center;\n gap: 4px;\n font-size: 10px;\n font-weight: 600;\n color: var(--mj-brand-primary);\n}\n\n.notification-card.clickable:hover .card-open-hint {\n display: inline-flex;\n}\n\n.card-message {\n margin: 0;\n font-size: 13px;\n line-height: 1.5;\n color: var(--mj-text-secondary);\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n overflow-wrap: anywhere;\n}\n\n.card-message-full {\n display: block;\n -webkit-line-clamp: unset;\n white-space: pre-wrap;\n}\n\n/* \u2500\u2500 Rich (expanded) content \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.card-rich {\n margin-top: 4px;\n padding: 12px 14px;\n border: 1px solid var(--mj-border-subtle);\n border-radius: var(--mj-radius-md, 8px);\n background: var(--mj-bg-surface-card);\n cursor: default;\n}\n\n/* Sanitized foreign markup: keep it inside the card no matter what it brought along */\n.card-rich-html {\n font-size: 13px;\n line-height: 1.55;\n color: var(--mj-text-primary);\n overflow-x: auto;\n}\n\n.card-rich-html img {\n max-width: 100%;\n height: auto;\n}\n\n.card-rich-html table {\n max-width: 100%;\n border-collapse: collapse;\n}\n\n.card-rich-html td,\n.card-rich-html th {\n padding: 4px 8px;\n border: 1px solid var(--mj-border-subtle);\n}\n\n.card-rich-html a {\n color: var(--mj-text-link);\n}\n\n.card-rich-html h1,\n.card-rich-html h2,\n.card-rich-html h3 {\n margin: 0.4em 0 0.3em 0;\n font-size: 1.05em;\n}\n\n.card-rich-md {\n display: block;\n font-size: 13px;\n}\n\n.card-expand-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n margin-top: 8px;\n padding: 4px 10px;\n border: none;\n border-radius: var(--mj-radius-full, 999px);\n background: transparent;\n color: var(--mj-brand-primary);\n font-size: 11px;\n font-weight: 700;\n cursor: pointer;\n}\n\n.card-expand-btn:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n}\n\n/* \u2500\u2500 Card actions \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.card-actions {\n flex-shrink: 0;\n display: flex;\n align-items: flex-start;\n}\n\n.card-action-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 6px 10px;\n border: 1px solid transparent;\n border-radius: var(--mj-radius-md, 8px);\n background: transparent;\n color: var(--mj-text-muted);\n font-size: 11px;\n font-weight: 600;\n cursor: pointer;\n transition: background-color 0.15s, color 0.15s;\n}\n\n.card-action-btn:hover {\n background: var(--mj-bg-surface-hover);\n color: var(--mj-text-primary);\n border-color: var(--mj-border-default);\n}\n\n/* \u2500\u2500 Responsive \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n@media (max-width: 720px) {\n .notifications-header {\n padding: 14px 14px 10px 14px;\n }\n\n .notifications-content {\n padding: 12px 12px 24px 12px;\n }\n\n .btn-text,\n .action-text {\n display: none;\n }\n\n .card-header {\n flex-direction: column;\n gap: 2px;\n }\n\n .card-time {\n order: -1;\n }\n}\n"] }]
|
|
1141
1201
|
}], () => [{ type: i1.SharedService }, { type: i1.NavigationService }, { type: i2.ApplicationManager }], null); })();
|
|
1142
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserNotificationsComponent, { className: "UserNotificationsComponent", filePath: "src/lib/user-notifications/user-notifications.component.ts", lineNumber:
|
|
1202
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UserNotificationsComponent, { className: "UserNotificationsComponent", filePath: "src/lib/user-notifications/user-notifications.component.ts", lineNumber: 104 }); })();
|
|
1143
1203
|
//# sourceMappingURL=user-notifications.component.js.map
|