@memberjunction/ng-explorer-core 6.2.0-edge.2 → 6.2.0-edge.4
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/README.md +10 -0
- package/dist/app-routing.module.d.ts.map +1 -1
- package/dist/app-routing.module.js +5 -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 +12 -2
- package/dist/generated/lazy-feature-config.js.map +1 -1
- package/dist/lib/guards/moved-nav-item-redirect.d.ts +15 -0
- package/dist/lib/guards/moved-nav-item-redirect.d.ts.map +1 -0
- package/dist/lib/guards/moved-nav-item-redirect.js +37 -0
- package/dist/lib/guards/moved-nav-item-redirect.js.map +1 -0
- package/dist/lib/omnibar/omnibar-dashboard-matches.d.ts +34 -0
- package/dist/lib/omnibar/omnibar-dashboard-matches.d.ts.map +1 -0
- package/dist/lib/omnibar/omnibar-dashboard-matches.js +70 -0
- package/dist/lib/omnibar/omnibar-dashboard-matches.js.map +1 -0
- package/dist/lib/omnibar/omnibar-palette.component.d.ts +27 -2
- package/dist/lib/omnibar/omnibar-palette.component.d.ts.map +1 -1
- package/dist/lib/omnibar/omnibar-palette.component.js +126 -65
- package/dist/lib/omnibar/omnibar-palette.component.js.map +1 -1
- package/dist/lib/omnibar/omnibar-provider.d.ts +4 -0
- package/dist/lib/omnibar/omnibar-provider.d.ts.map +1 -1
- package/dist/lib/omnibar/omnibar-provider.js.map +1 -1
- package/dist/lib/omnibar/providers/omnibar-record.provider.d.ts +2 -2
- package/dist/lib/omnibar/providers/omnibar-record.provider.d.ts.map +1 -1
- package/dist/lib/omnibar/providers/omnibar-record.provider.js +3 -7
- package/dist/lib/omnibar/providers/omnibar-record.provider.js.map +1 -1
- package/dist/lib/omnibar/providers/omnibar-search.provider.d.ts +15 -2
- package/dist/lib/omnibar/providers/omnibar-search.provider.d.ts.map +1 -1
- package/dist/lib/omnibar/providers/omnibar-search.provider.js +59 -7
- package/dist/lib/omnibar/providers/omnibar-search.provider.js.map +1 -1
- package/dist/lib/profile/forking-setting.d.ts +8 -0
- package/dist/lib/profile/forking-setting.d.ts.map +1 -0
- package/dist/lib/profile/forking-setting.js +18 -0
- package/dist/lib/profile/forking-setting.js.map +1 -0
- package/dist/lib/profile/profile-dialog.component.d.ts +8 -0
- package/dist/lib/profile/profile-dialog.component.d.ts.map +1 -1
- package/dist/lib/profile/profile-dialog.component.js +182 -92
- package/dist/lib/profile/profile-dialog.component.js.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.d.ts +23 -4
- package/dist/lib/resource-wrappers/artifact-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/artifact-resource.component.js +36 -8
- package/dist/lib/resource-wrappers/artifact-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.d.ts +7 -18
- 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 -41
- package/dist/lib/resource-wrappers/chat-conversations-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/chat-search-routing.d.ts +10 -3
- package/dist/lib/resource-wrappers/chat-search-routing.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/chat-search-routing.js +11 -4
- package/dist/lib/resource-wrappers/chat-search-routing.js.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-add-to-menu.component.d.ts +29 -0
- package/dist/lib/resource-wrappers/dashboard-add-to-menu.component.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-add-to-menu.component.js +141 -0
- package/dist/lib/resource-wrappers/dashboard-add-to-menu.component.js.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-part-config.d.ts +28 -0
- package/dist/lib/resource-wrappers/dashboard-part-config.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-part-config.js +150 -0
- package/dist/lib/resource-wrappers/dashboard-part-config.js.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts +361 -56
- package/dist/lib/resource-wrappers/dashboard-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-resource.component.js +1312 -361
- package/dist/lib/resource-wrappers/dashboard-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/dashboard-source-search.d.ts +86 -0
- package/dist/lib/resource-wrappers/dashboard-source-search.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-source-search.js +136 -0
- package/dist/lib/resource-wrappers/dashboard-source-search.js.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-studio-pane.d.ts +30 -0
- package/dist/lib/resource-wrappers/dashboard-studio-pane.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-studio-pane.js +55 -0
- package/dist/lib/resource-wrappers/dashboard-studio-pane.js.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-studio-tools.d.ts +135 -0
- package/dist/lib/resource-wrappers/dashboard-studio-tools.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-studio-tools.js +856 -0
- package/dist/lib/resource-wrappers/dashboard-studio-tools.js.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-tab-agent.d.ts +87 -0
- package/dist/lib/resource-wrappers/dashboard-tab-agent.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/dashboard-tab-agent.js +125 -0
- package/dist/lib/resource-wrappers/dashboard-tab-agent.js.map +1 -0
- package/dist/lib/resource-wrappers/human-handoff-console-resource.component.d.ts +32 -0
- package/dist/lib/resource-wrappers/human-handoff-console-resource.component.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/human-handoff-console-resource.component.js +114 -0
- package/dist/lib/resource-wrappers/human-handoff-console-resource.component.js.map +1 -0
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts +40 -6
- package/dist/lib/resource-wrappers/livekit-room-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js +287 -147
- package/dist/lib/resource-wrappers/livekit-room-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/meetings-resource.component.d.ts +42 -0
- package/dist/lib/resource-wrappers/meetings-resource.component.d.ts.map +1 -0
- package/dist/lib/resource-wrappers/meetings-resource.component.js +225 -0
- package/dist/lib/resource-wrappers/meetings-resource.component.js.map +1 -0
- package/dist/lib/resource-wrappers/record-resource.component.d.ts +27 -2
- package/dist/lib/resource-wrappers/record-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/record-resource.component.js +58 -6
- package/dist/lib/resource-wrappers/record-resource.component.js.map +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.d.ts.map +1 -1
- package/dist/lib/resource-wrappers/search-results-resource.component.js +5 -4
- package/dist/lib/resource-wrappers/search-results-resource.component.js.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/component-cache-manager.js.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts +38 -0
- package/dist/lib/shell/components/tabs/tab-container.component.d.ts.map +1 -1
- package/dist/lib/shell/components/tabs/tab-container.component.js +77 -4
- package/dist/lib/shell/components/tabs/tab-container.component.js.map +1 -1
- package/dist/lib/shell/dashboard-tab-for-url.d.ts +35 -0
- package/dist/lib/shell/dashboard-tab-for-url.d.ts.map +1 -0
- package/dist/lib/shell/dashboard-tab-for-url.js +39 -0
- package/dist/lib/shell/dashboard-tab-for-url.js.map +1 -0
- package/dist/lib/shell/shell.component.d.ts +31 -2
- package/dist/lib/shell/shell.component.d.ts.map +1 -1
- package/dist/lib/shell/shell.component.js +119 -42
- package/dist/lib/shell/shell.component.js.map +1 -1
- package/dist/lib/shell/shell.module.d.ts +2 -1
- package/dist/lib/shell/shell.module.d.ts.map +1 -1
- package/dist/lib/shell/shell.module.js +6 -2
- package/dist/lib/shell/shell.module.js.map +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.js +1 -1
- package/dist/lib/single-dashboard/single-dashboard.component.js.map +1 -1
- package/dist/lib/single-record/single-record.component.d.ts +29 -3
- package/dist/lib/single-record/single-record.component.d.ts.map +1 -1
- package/dist/lib/single-record/single-record.component.js +44 -4
- package/dist/lib/single-record/single-record.component.js.map +1 -1
- package/dist/lib/template-user/template-user-banner.component.d.ts +20 -0
- package/dist/lib/template-user/template-user-banner.component.d.ts.map +1 -0
- package/dist/lib/template-user/template-user-banner.component.js +67 -0
- package/dist/lib/template-user/template-user-banner.component.js.map +1 -0
- package/dist/lib/user-notifications/user-notifications.component.d.ts +13 -0
- package/dist/lib/user-notifications/user-notifications.component.d.ts.map +1 -1
- package/dist/lib/user-notifications/user-notifications.component.js +67 -0
- package/dist/lib/user-notifications/user-notifications.component.js.map +1 -1
- package/dist/module.d.ts +61 -56
- package/dist/module.d.ts.map +1 -1
- package/dist/module.js +32 -4
- package/dist/module.js.map +1 -1
- package/dist/public-api.d.ts +2 -0
- package/dist/public-api.d.ts.map +1 -1
- package/dist/public-api.js +2 -0
- package/dist/public-api.js.map +1 -1
- package/package.json +58 -52
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-dialog.component.js","sourceRoot":"","sources":["../../../src/lib/profile/profile-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,YAAY,EACZ,KAAK,EAGL,MAAM,EACN,iBAAiB,EACjB,MAAM,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAgB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAGH,cAAc,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,a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;YAC3F,uBACJ;YAER,AADI,AADI,iBAAS,EACP,EACJ;YAKE,AADJ,AADJ,gCAAwF,eAC9C,kBAC4D;YAAvB,oGAAS,gBAAY,IAAC;YACzF,yBAAsC;YAC1C,iBAAS;YACT,+BAAoC;YAAA,aAAgB;YACxD,AADwD,iBAAK,EACvD;YACN,gCAAoC;YAG9B,AAFF,4GAA+B,qEAEO;YAgDlD,AADI,AADI,iBAAM,EACJ,EACJ;;YAhNkB,oEAAuD;YAYnE,eASC;YATD,kEASC;YAQ4B,eAAc;YAAd,kCAAc;YACd,eAAe;YAAf,mCAAe;YAC5C,cASC;YATD,oDASC;YAWe,gBACA;YADA,+EACA;YAAA,cAEC;YAFD,2CAEC;YASgC,eAAgB;YAAhB,oCAAgB;YAMjE,eA6BC;YA7BD,gDA6BC;YAKO,eAEC;YAFD,+CAEC;YAEL,cA0BC;YA1BD,oDA0BC;YAiBkB,eAAwD;YAAxD,qEAAwD;YAK3C,eAAgB;YAAhB,oCAAgB;YAGpD,eA+CC;YA/CD,0FA+CC;4BA/MC,YAAY,EAAE,sBAAsB;;iFA+wBrC,sBAAsB;cAlxBlC,SAAS;2BACI,mBAAmB,cACjB,IAAI,WACP,CAAC,YAAY,EAAE,sBAAsB,CAAC,YACrC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAkNT;;kBA6jBA,MAAM;;kBAEN,KAAK;;kBACL,KAAK;;kFAJG,sBAAsB","sourcesContent":["import {\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ChangeDetectorRef,\n inject\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RunView, UserRoleInfo } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport {\n MJThemeEntity,\n MJUserNotificationPreferenceEntity,\n UserInfoEngine\n} from '@memberjunction/core-entities';\nimport { MJAuthBase } from '@memberjunction/ng-auth-services';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { ThemeService, SharedService, ThemeDefinition } from '@memberjunction/ng-shared';\nimport type { ThemeSeeds } from '@memberjunction/theme-engine';\nimport { ExplorerSettingsModule } from '@memberjunction/ng-explorer-settings';\nimport { IsOmnibarAvailable, IsOmnibarEnabledForUser, OMNIBAR_USER_SETTING_KEY } from '../omnibar/omnibar-user-setting';\nimport { GetOmnibarShortcutLabel } from '../omnibar/omnibar-shortcut';\nimport { Subscription } from 'rxjs';\n\ninterface NotificationChannel {\n key: 'InApp' | 'Email' | 'SMS';\n label: string;\n icon: string;\n enabled: boolean;\n saving: boolean;\n}\n\ninterface StarredThemeItem {\n id: string;\n name: string;\n seeds: string;\n swatches: string[];\n overrides: string | null;\n customCss: string | null;\n}\n\ntype ProfilePanel = 'none' | 'photo' | 'theme';\n\n/**\n * \"Identity Card\" profile dialog with slide-in detail panels for editing\n * profile photo and switching theme. Replaces the legacy multi-tab Settings\n * dialog entirely. Brand-aligned with the About dialog.\n */\n@Component({\n selector: 'mj-profile-dialog',\n standalone: true,\n imports: [CommonModule, ExplorerSettingsModule],\n template: `\n<div class=\"mj-profile\" [class.mj-profile--panel-open]=\"ActivePanel !== 'none'\" role=\"document\">\n <button class=\"mj-profile__close\" type=\"button\" aria-label=\"Close\" (click)=\"OnCloseClick()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n\n <!-- ===== MAIN VIEW ===== -->\n <div class=\"mj-profile__main\">\n <div class=\"mj-profile__hero\">\n <h3 class=\"mj-profile__hero-title\">My Profile</h3>\n </div>\n\n <div class=\"mj-profile__avatar-zone\">\n @if (AvatarUrl) {\n <img class=\"mj-profile__avatar mj-profile__avatar--img\"\n [src]=\"AvatarUrl\" alt=\"\" (error)=\"OnAvatarLoadError()\" />\n } @else if (AvatarIconClass) {\n <div class=\"mj-profile__avatar mj-profile__avatar--icon\">\n <i [class]=\"AvatarIconClass\"></i>\n </div>\n } @else {\n <div class=\"mj-profile__avatar\">{{ UserInitials }}</div>\n }\n <button class=\"mj-profile__avatar-edit\" type=\"button\" title=\"Change photo\"\n (click)=\"OpenPanel('photo')\">\n <i class=\"fa-solid fa-camera\"></i>\n </button>\n </div>\n\n <div class=\"mj-profile__identity\">\n <h2 class=\"mj-profile__name\">{{ UserName }}</h2>\n <p class=\"mj-profile__email\">{{ UserEmail }}</p>\n @if (RoleChips.length > 0) {\n <div class=\"mj-profile__chips\">\n @for (chip of RoleChips; track chip.label) {\n <span class=\"mj-profile__chip\" [class]=\"'mj-profile__chip--' + chip.tone\">\n @if (chip.icon) { <i [class]=\"chip.icon\"></i> }\n {{ chip.label }}\n </span>\n }\n </div>\n }\n </div>\n\n <!-- The one scroll region: hero, avatar, identity and footer stay put; only the settings rows scroll. -->\n <div class=\"mj-profile__scroll\">\n <div class=\"mj-profile__field-list\">\n <div class=\"mj-profile__field\">\n <div class=\"mj-profile__field-icon\"><i class=\"fa-solid fa-id-badge\"></i></div>\n <div class=\"mj-profile__field-body\">\n <div class=\"mj-profile__field-label\">Account</div>\n <div class=\"mj-profile__field-value\">\n {{ AccountType }} · {{ AccountStatus }}\n @if (MemberSince) {\n <span class=\"mj-profile__field-muted\"> · {{ MemberSince }}</span>\n }\n </div>\n </div>\n </div>\n\n <button class=\"mj-profile__field mj-profile__field--button\" type=\"button\" (click)=\"OpenPanel('theme')\">\n <div class=\"mj-profile__field-icon\"><i class=\"fa-solid fa-palette\"></i></div>\n <div class=\"mj-profile__field-body\">\n <div class=\"mj-profile__field-label\">Theme</div>\n <div class=\"mj-profile__field-value\">{{ ThemeLabel }}</div>\n </div>\n <i class=\"fa-solid fa-chevron-right mj-profile__field-chev\"></i>\n </button>\n </div>\n\n @if (OmnibarAvailable) {\n <div class=\"mj-profile__section\">\n <div class=\"mj-profile__section-head\">\n <h4>Command Palette</h4>\n </div>\n <div class=\"mj-profile__channels\">\n <button type=\"button\"\n class=\"mj-profile__channel\"\n data-testid=\"omnibar-toggle\"\n [class.mj-profile__channel--on]=\"OmnibarEnabled\"\n [disabled]=\"SavingOmnibar\"\n (click)=\"ToggleOmnibar()\">\n <div class=\"mj-profile__channel-icon\"><i class=\"fa-solid fa-magnifying-glass\"></i></div>\n <div class=\"mj-profile__channel-label\">\n Unified command palette\n <div class=\"mj-profile__channel-hint\">{{ OmnibarShortcutLabel }} — search, records, agents & commands in one bar</div>\n </div>\n <div class=\"mj-profile__channel-state\">\n @if (SavingOmnibar) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n } @else {\n <span class=\"mj-profile__switch\" [class.mj-profile__switch--on]=\"OmnibarEnabled\">\n <span class=\"mj-profile__switch-knob\"></span>\n </span>\n }\n </div>\n </button>\n </div>\n </div>\n }\n\n <div class=\"mj-profile__section\">\n <div class=\"mj-profile__section-head\">\n <h4>Notifications</h4>\n @if (UnreadCount > 0) {\n <span class=\"mj-profile__unread\">{{ UnreadCount }} unread</span>\n }\n </div>\n @if (LoadingNotifications) {\n <div class=\"mj-profile__channels-loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading…\n </div>\n } @else {\n <div class=\"mj-profile__channels\">\n @for (ch of Channels; track ch.key) {\n <button type=\"button\"\n class=\"mj-profile__channel\"\n [class.mj-profile__channel--on]=\"ch.enabled\"\n [disabled]=\"ch.saving\"\n (click)=\"ToggleChannel(ch)\">\n <div class=\"mj-profile__channel-icon\"><i [class]=\"ch.icon\"></i></div>\n <div class=\"mj-profile__channel-label\">{{ ch.label }}</div>\n <div class=\"mj-profile__channel-state\">\n @if (ch.saving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n } @else {\n <span class=\"mj-profile__switch\" [class.mj-profile__switch--on]=\"ch.enabled\">\n <span class=\"mj-profile__switch-knob\"></span>\n </span>\n }\n </div>\n </button>\n }\n </div>\n }\n </div>\n </div>\n\n <div class=\"mj-profile__footer\">\n <button class=\"mj-profile__btn mj-profile__btn--danger\" type=\"button\" (click)=\"OnSignOut()\">\n <i class=\"fa-solid fa-arrow-right-from-bracket\"></i>\n Sign out\n </button>\n <span class=\"mj-profile__spacer\"></span>\n <button class=\"mj-profile__btn mj-profile__btn--primary\" type=\"button\" (click)=\"OnCloseClick()\">\n Done\n </button>\n </div>\n </div>\n\n <!-- ===== SLIDE-IN PANEL ===== -->\n <div class=\"mj-profile__panel\" [class.mj-profile__panel--open]=\"ActivePanel !== 'none'\">\n <div class=\"mj-profile__panel-header\">\n <button class=\"mj-profile__panel-back\" type=\"button\" aria-label=\"Back\" (click)=\"ClosePanel()\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n </button>\n <h3 class=\"mj-profile__panel-title\">{{ PanelTitle }}</h3>\n </div>\n <div class=\"mj-profile__panel-body\">\n @if (ActivePanel === 'photo') {\n <mj-user-profile-settings></mj-user-profile-settings>\n } @else if (ActivePanel === 'theme') {\n <div class=\"mj-profile__themes\">\n @for (theme of ThemeOptions; track theme.id) {\n <button type=\"button\"\n class=\"mj-profile__theme\"\n [class.mj-profile__theme--active]=\"theme.id === ThemePreference\"\n [class.mj-profile__theme--saving]=\"SavingTheme === theme.id\"\n [disabled]=\"!!SavingTheme\"\n (click)=\"SelectTheme(theme.id)\">\n <div class=\"mj-profile__theme-swatch\" [class]=\"'mj-profile__theme-swatch--' + theme.swatch\">\n <i [class]=\"theme.icon\"></i>\n </div>\n <div class=\"mj-profile__theme-info\">\n <div class=\"mj-profile__theme-name\">{{ theme.name }}</div>\n @if (theme.description) {\n <div class=\"mj-profile__theme-desc\">{{ theme.description }}</div>\n }\n </div>\n @if (SavingTheme === theme.id) {\n <i class=\"fa-solid fa-spinner fa-spin mj-profile__theme-check\"></i>\n } @else if (theme.id === ThemePreference) {\n <i class=\"fa-solid fa-check mj-profile__theme-check\"></i>\n }\n </button>\n }\n @if (StarredThemes.length) {\n <div class=\"mj-profile__theme-sep\">Brand themes</div>\n @for (t of StarredThemes; track t.id) {\n <button type=\"button\"\n class=\"mj-profile__theme\"\n [class.mj-profile__theme--active]=\"IsAppliedBrand(t.id)\"\n (click)=\"ApplyStarredTheme(t)\">\n <div class=\"mj-profile__theme-swatch mj-profile__brand-swatch\">\n @for (c of t.swatches; track $index) { <i [style.background]=\"c\"></i> }\n </div>\n <div class=\"mj-profile__theme-info\">\n <div class=\"mj-profile__theme-name\">{{ t.name }}</div>\n </div>\n @if (IsAppliedBrand(t.id)) {\n <i class=\"fa-solid fa-check mj-profile__theme-check\"></i>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n </div>\n</div>\n `,\n styles: [`\n:host {\n display: block;\n width: 100%;\n height: 100%;\n}\n/* A flex column, so the dialog's height bound reaches the one scroll region inside the card.\n\n ProfileDialogService opens the dialog with a width and no height, so .mj-dialog-container is\n height:auto with max-height:90vh, and every box between it and this card is a shrinkable flex item\n (.mj-dialog-body and the host div inside it, both min-height:0). That chain already bounds the card\n at 90vh. What it could not bound was .mj-profile__main: while this element was display:block,\n __main's height:100% had nothing definite to resolve against, so it computed to auto, grew to its\n full content, and overflow:hidden here clipped the bottom of the card -- notification channels,\n footer, Sign out -- with nothing left to scroll. The same shape #4351 fixed for the user menu, one\n layer out.\n\n The flex chain is the fix: display:flex here, flex:1 + min-height:0 on __main, and flex:1 +\n min-height:0 + overflow-y:auto on __scroll. Flex hands the bounded height down; a percentage could\n not. Do not trade it for a max-height -- a max-height gives no child percentage a definite size to\n resolve against, so the clip would come back.\n\n max-height:100dvh (100vh first, for engines without dvh) is only a backstop. On desktop it never\n binds: the container's 90vh is tighter. It can bind on a phone (<768px wide), where the dialog\n forces the container to height:100vh and a mobile browser's dynamic toolbar can make 100dvh\n shorter. A max-height can only shorten the card, so there it can only lift the footer, never\n push it down. */\n.mj-profile {\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n height: 100%;\n max-height: 100vh;\n max-height: 100dvh;\n min-height: 0;\n position: relative;\n font-family: inherit;\n overflow: hidden;\n}\n.mj-profile__close {\n position: absolute;\n top: 12px; right: 12px;\n width: 36px; height: 36px;\n border: none; border-radius: 8px;\n background: rgba(255, 255, 255, 0.18);\n backdrop-filter: blur(8px);\n color: #fff;\n cursor: pointer;\n font-size: 16px;\n display: flex; align-items: center; justify-content: center;\n transition: background 0.15s, opacity 0.2s;\n z-index: 4;\n}\n.mj-profile__close:hover { background: rgba(255, 255, 255, 0.3); }\n.mj-profile--panel-open .mj-profile__close { opacity: 0; pointer-events: none; }\n\n/* ============ MAIN VIEW ============ */\n/* flex:1 with min-height:0 rather than height:100%: the card is a flex column, so this takes the\n card's bounded height, and min-height:0 lets it shrink below its content -- without it a flex\n item's automatic minimum size refuses to, and __scroll would never be short enough to scroll. */\n.mj-profile__main {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);\n}\n.mj-profile--panel-open .mj-profile__main {\n transform: translateX(-12%);\n pointer-events: none;\n}\n\n.mj-profile__hero {\n background: linear-gradient(135deg, #264FAF 0%, #0076b6 100%);\n color: #fff;\n padding: 22px 24px 56px;\n position: relative;\n overflow: hidden;\n flex-shrink: 0;\n}\n.mj-profile__hero::before {\n content: '';\n position: absolute;\n inset: -50%;\n background: radial-gradient(circle, rgba(255, 255, 255, 0.10) 0%, transparent 60%);\n animation: mj-profile-rotate 24s linear infinite;\n pointer-events: none;\n}\n@media (prefers-reduced-motion: reduce) {\n .mj-profile__hero::before { animation: none; }\n}\n@keyframes mj-profile-rotate { to { transform: rotate(360deg); } }\n\n.mj-profile__hero-title {\n margin: 0;\n font-size: 12px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 1.2px;\n opacity: 0.85;\n position: relative;\n z-index: 1;\n}\n\n.mj-profile__avatar-zone {\n position: relative;\n width: 96px;\n height: 96px;\n margin: -48px auto 12px;\n z-index: 2;\n}\n.mj-profile__avatar {\n width: 96px;\n height: 96px;\n border-radius: 50%;\n background: linear-gradient(135deg, #264FAF 0%, #0076b6 100%);\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 32px;\n font-weight: 700;\n border: 4px solid var(--mj-bg-surface);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);\n object-fit: cover;\n overflow: hidden;\n}\nimg.mj-profile__avatar { background: var(--mj-bg-surface-card); }\n.mj-profile__avatar--icon i { font-size: 36px; }\n\n.mj-profile__avatar-edit {\n position: absolute;\n bottom: 2px; right: 2px;\n width: 30px; height: 30px;\n border-radius: 50%;\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n border: 2px solid var(--mj-bg-surface);\n cursor: pointer;\n display: flex; align-items: center; justify-content: center;\n font-size: 12px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);\n transition: transform 0.15s;\n}\n.mj-profile__avatar-edit:hover { transform: scale(1.1); }\n\n.mj-profile__identity {\n text-align: center;\n padding: 0 24px 16px;\n flex-shrink: 0;\n}\n.mj-profile__name {\n margin: 0 0 4px;\n font-size: 22px;\n font-weight: 700;\n letter-spacing: -0.4px;\n color: var(--mj-text-primary);\n}\n.mj-profile__email {\n margin: 0 0 12px;\n color: var(--mj-text-muted);\n font-size: 13px;\n word-break: break-all;\n}\n.mj-profile__chips {\n display: flex;\n gap: 6px;\n flex-wrap: wrap;\n justify-content: center;\n}\n.mj-profile__chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 9px;\n border-radius: 100px;\n font-size: 11px;\n font-weight: 600;\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n color: var(--mj-brand-primary);\n}\n.mj-profile__chip--admin {\n background: color-mix(in srgb, #f59e0b 14%, transparent);\n color: #b45309;\n}\n.mj-profile__chip--dev {\n background: color-mix(in srgb, #10b981 14%, transparent);\n color: #047857;\n}\n\n/* The only flex-grow and the only scroller in __main. Hero, avatar, identity and footer hold their\n size; this takes whatever height they leave and scrolls the settings rows inside it. One region,\n not one per section: peer scrollers split the leftover height between them and each shrinks to\n its own padding on a short window. */\n.mj-profile__scroll {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n}\n\n.mj-profile__field-list {\n padding: 0 24px;\n}\n.mj-profile__field {\n display: flex;\n align-items: center;\n padding: 12px 0;\n gap: 14px;\n border-top: 1px solid var(--mj-border-subtle);\n width: 100%;\n text-align: left;\n background: transparent;\n border-left: none;\n border-right: none;\n border-bottom: none;\n font-family: inherit;\n color: inherit;\n}\n.mj-profile__field:first-child { border-top: none; }\n.mj-profile__field--button {\n cursor: pointer;\n transition: background 0.12s;\n margin: 0 -8px;\n padding-left: 8px;\n padding-right: 8px;\n border-radius: 8px;\n border-top: none;\n}\n.mj-profile__field--button + .mj-profile__field--button { margin-top: 0; }\n.mj-profile__field--button:hover { background: var(--mj-bg-surface-hover); }\n.mj-profile__field--button:hover .mj-profile__field-chev { color: var(--mj-brand-primary); }\n.mj-profile__field-icon {\n width: 32px; height: 32px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n color: var(--mj-text-secondary);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n flex-shrink: 0;\n}\n.mj-profile__field-body { flex: 1; min-width: 0; }\n.mj-profile__field-label {\n font-size: 10.5px;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n font-weight: 600;\n letter-spacing: 0.5px;\n}\n.mj-profile__field-value {\n font-size: 13px;\n color: var(--mj-text-primary);\n margin-top: 2px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mj-profile__field-muted { color: var(--mj-text-muted); }\n.mj-profile__field-chev {\n color: var(--mj-text-muted);\n font-size: 11px;\n transition: color 0.15s;\n}\n\n.mj-profile__section {\n padding: 16px 24px 8px;\n}\n.mj-profile__section-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 10px;\n}\n.mj-profile__section-head h4 {\n margin: 0;\n font-size: 11px;\n font-weight: 700;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.6px;\n}\n.mj-profile__unread {\n font-size: 11px;\n font-weight: 600;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n padding: 2px 8px;\n border-radius: 100px;\n}\n.mj-profile__channels-loading {\n color: var(--mj-text-muted);\n font-size: 12.5px;\n padding: 12px;\n text-align: center;\n}\n.mj-profile__channels {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.mj-profile__channel {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 14px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.15s;\n font-family: inherit;\n text-align: left;\n width: 100%;\n}\n.mj-profile__channel:hover:not(:disabled) {\n border-color: var(--mj-border-default);\n background: var(--mj-bg-surface-hover);\n}\n.mj-profile__channel:disabled { cursor: wait; opacity: 0.7; }\n.mj-profile__channel-icon {\n width: 32px; height: 32px;\n border-radius: 8px;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n display: flex; align-items: center; justify-content: center;\n font-size: 13px;\n flex-shrink: 0;\n transition: all 0.15s;\n}\n.mj-profile__channel--on .mj-profile__channel-icon {\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, transparent);\n color: var(--mj-brand-primary);\n}\n.mj-profile__channel-label {\n flex: 1;\n font-size: 13.5px;\n font-weight: 500;\n color: var(--mj-text-primary);\n}\n.mj-profile__channel-hint {\n font-size: 11.5px;\n font-weight: 400;\n color: var(--mj-text-muted);\n margin-top: 2px;\n}\n.mj-profile__channel-state {\n flex-shrink: 0;\n color: var(--mj-text-muted);\n font-size: 13px;\n min-width: 36px;\n display: flex; justify-content: flex-end; align-items: center;\n}\n\n.mj-profile__switch {\n width: 36px;\n height: 20px;\n background: var(--mj-border-strong);\n border-radius: 100px;\n position: relative;\n transition: background 0.2s;\n display: inline-block;\n}\n.mj-profile__switch-knob {\n position: absolute;\n top: 2px; left: 2px;\n width: 16px; height: 16px;\n background: white;\n border-radius: 50%;\n transition: transform 0.2s;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);\n}\n.mj-profile__switch--on { background: var(--mj-brand-primary); }\n.mj-profile__switch--on .mj-profile__switch-knob { transform: translateX(16px); }\n\n.mj-profile__footer {\n border-top: 1px solid var(--mj-border-subtle);\n padding: 14px 20px;\n display: flex;\n gap: 8px;\n align-items: center;\n flex-shrink: 0;\n}\n.mj-profile__spacer { flex: 1; }\n.mj-profile__btn {\n padding: 9px 16px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n font-family: inherit;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n transition: all 0.15s;\n}\n.mj-profile__btn:hover { background: var(--mj-bg-surface-hover); border-color: var(--mj-border-strong); }\n.mj-profile__btn--primary {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border-color: var(--mj-brand-primary);\n}\n.mj-profile__btn--primary:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 88%, black);\n border-color: color-mix(in srgb, var(--mj-brand-primary) 88%, black);\n}\n.mj-profile__btn--danger {\n color: var(--mj-status-error);\n border-color: color-mix(in srgb, var(--mj-status-error) 30%, var(--mj-border-default));\n}\n.mj-profile__btn--danger:hover {\n background: color-mix(in srgb, var(--mj-status-error) 8%, transparent);\n border-color: var(--mj-status-error);\n}\n\n/* ============ SLIDE-IN PANEL ============ */\n.mj-profile__panel {\n position: absolute;\n inset: 0;\n background: var(--mj-bg-surface);\n transform: translateX(100%);\n transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);\n display: flex;\n flex-direction: column;\n z-index: 3;\n}\n.mj-profile__panel--open {\n transform: translateX(0);\n box-shadow: -8px 0 24px rgba(0, 0, 0, 0.06);\n}\n.mj-profile__panel-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 14px 18px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n flex-shrink: 0;\n}\n.mj-profile__panel-back {\n width: 34px; height: 34px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n cursor: pointer;\n display: flex; align-items: center; justify-content: center;\n font-size: 13px;\n transition: all 0.15s;\n font-family: inherit;\n}\n.mj-profile__panel-back:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n}\n.mj-profile__panel-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--mj-text-primary);\n letter-spacing: -0.2px;\n}\n.mj-profile__panel-body {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: 16px 20px 20px;\n}\n\n/* Theme picker */\n.mj-profile__themes {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.mj-profile__theme {\n display: flex;\n align-items: center;\n gap: 14px;\n padding: 12px 14px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.15s;\n text-align: left;\n width: 100%;\n font-family: inherit;\n}\n.mj-profile__theme:hover:not(:disabled) {\n border-color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-hover);\n}\n.mj-profile__theme:disabled { cursor: wait; opacity: 0.7; }\n.mj-profile__theme--active {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 5%, var(--mj-bg-surface-card));\n}\n.mj-profile__theme-swatch {\n width: 40px; height: 40px;\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n flex-shrink: 0;\n border: 1px solid var(--mj-border-default);\n}\n.mj-profile__theme-swatch--light {\n background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);\n color: #f59e0b;\n}\n.mj-profile__theme-swatch--dark {\n background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);\n color: #94a3b8;\n border-color: #334155;\n}\n.mj-profile__theme-swatch--system {\n background: linear-gradient(135deg, #ffffff 0%, #ffffff 49%, #1e293b 51%, #0f172a 100%);\n color: var(--mj-text-secondary);\n}\n.mj-profile__theme-info { flex: 1; min-width: 0; }\n.mj-profile__theme-name {\n font-size: 13.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.mj-profile__theme-desc {\n font-size: 11.5px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mj-profile__theme-check {\n color: var(--mj-brand-primary);\n font-size: 14px;\n flex-shrink: 0;\n}\n\n/* Starred brand themes shown inline in the theme list */\n.mj-profile__theme-sep {\n font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;\n color: var(--mj-text-muted); padding: 6px 4px 2px; margin-top: 6px;\n}\n.mj-profile__brand-swatch {\n display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0;\n}\n.mj-profile__brand-swatch i {\n width: 33%; height: 100%; display: block;\n}\n\n@media (max-width: 480px) {\n .mj-profile__hero { padding: 20px 18px 48px; }\n .mj-profile__avatar-zone { width: 88px; height: 88px; margin-top: -44px; }\n .mj-profile__avatar { width: 88px; height: 88px; font-size: 28px; }\n .mj-profile__name { font-size: 19px; }\n .mj-profile__field-list,\n .mj-profile__section { padding-left: 18px; padding-right: 18px; }\n .mj-profile__footer { padding: 12px 16px; }\n .mj-profile--panel-open .mj-profile__main { transform: translateX(-20%); }\n .mj-profile__panel-body { padding: 14px 16px 16px; }\n}\n `]\n})\nexport class ProfileDialogComponent extends BaseAngularComponent implements OnInit, OnDestroy {\n @Output() CloseRequested = new EventEmitter<void>();\n\n @Input() AvatarUrl: string | null = null;\n @Input() AvatarIconClass: string | null = null;\n\n public UserName = '';\n public UserEmail = '';\n public UserInitials = '?';\n public AccountType = '';\n public AccountStatus = '';\n public MemberSince = '';\n public ThemeLabel = '';\n public RoleChips: Array<{ label: string; tone: string; icon: string | null }> = [];\n\n public LoadingNotifications = true;\n public Channels: NotificationChannel[] = [\n { key: 'InApp', label: 'In-app', icon: 'fa-solid fa-bell', enabled: false, saving: false },\n { key: 'Email', label: 'Email', icon: 'fa-solid fa-envelope', enabled: false, saving: false },\n { key: 'SMS', label: 'SMS', icon: 'fa-solid fa-mobile', enabled: false, saving: false }\n ];\n public UnreadCount = 0;\n\n // Omnibar per-user opt-in (shown only when the instance makes it available)\n public OmnibarAvailable = false;\n public OmnibarEnabled = false;\n public SavingOmnibar = false;\n\n /** Platform-correct summon-shortcut label ('⌘K' on Mac, 'Ctrl+K' elsewhere). */\n public get OmnibarShortcutLabel(): string {\n return GetOmnibarShortcutLabel();\n }\n\n // Slide-in panel state\n public ActivePanel: ProfilePanel = 'none';\n public ThemeOptions: Array<{ id: string; name: string; description: string; icon: string; swatch: 'light' | 'dark' | 'system' }> = [];\n public ThemePreference = '';\n public SavingTheme: string | null = null;\n\n // Starred brand themes shown inline in the theme list\n public StarredThemes: StarredThemeItem[] = [];\n public get AppliedBrandId(): string | null {\n return this.themeService.BrandOverlayId;\n }\n\n /** Whether a theme id is the applied brand overlay (case-insensitive GUID compare). */\n public IsAppliedBrand(id: string): boolean {\n const active = this.themeService.BrandOverlayId;\n return !!active && UUIDsEqual(id, active);\n }\n\n public get PanelTitle(): string {\n switch (this.ActivePanel) {\n case 'photo': return 'Profile photo';\n case 'theme': return 'Theme';\n default: return '';\n }\n }\n\n private authBase = inject(MJAuthBase);\n private themeService = inject(ThemeService);\n private sharedService = inject(SharedService);\n private cdr = inject(ChangeDetectorRef);\n\n private themeSub?: Subscription;\n\n public ngOnInit(): void {\n this.populateIdentity();\n this.populateThemeOptions();\n this.loadNotifications();\n this.OmnibarAvailable = IsOmnibarAvailable();\n this.OmnibarEnabled = IsOmnibarEnabledForUser();\n this.themeSub = this.themeService.Preference$.subscribe(pref => {\n this.ThemePreference = pref;\n this.ThemeLabel = this.computeThemeLabel();\n this.cdr.markForCheck();\n });\n }\n\n public ngOnDestroy(): void {\n this.themeSub?.unsubscribe();\n }\n\n public OnCloseClick(): void {\n if (this.ActivePanel !== 'none') {\n this.ClosePanel();\n return;\n }\n this.CloseRequested.emit();\n }\n\n public OnAvatarLoadError(): void {\n this.AvatarUrl = null;\n this.cdr.markForCheck();\n }\n\n public OpenPanel(panel: ProfilePanel): void {\n this.ActivePanel = panel;\n if (panel === 'theme') {\n this.loadStarredThemes();\n }\n }\n\n public ClosePanel(): void {\n this.ActivePanel = 'none';\n }\n\n public async OnSignOut(): Promise<void> {\n try {\n localStorage.removeItem('auth');\n localStorage.removeItem('claims');\n await this.authBase.logout();\n } catch (err) {\n const msg = err instanceof Error ? err.message : 'Unknown error';\n this.sharedService.CreateSimpleNotification(`Sign out failed: ${msg}`, 'error', 3000);\n }\n }\n\n public async SelectTheme(themeId: string): Promise<void> {\n if (this.SavingTheme) return;\n if (themeId === this.ThemePreference) return;\n this.SavingTheme = themeId;\n this.cdr.markForCheck();\n try {\n await this.themeService.SetTheme(themeId);\n } catch (err) {\n const msg = err instanceof Error ? err.message : 'Unknown error';\n this.sharedService.CreateSimpleNotification(`Theme change failed: ${msg}`, 'error', 3000);\n } finally {\n this.SavingTheme = null;\n this.cdr.markForCheck();\n }\n }\n\n // ========================================\n // Starred brand themes\n // ========================================\n\n /** Load the user's starred brand themes to show inline in the theme list. */\n private async loadStarredThemes(): Promise<void> {\n this.StarredThemes = [];\n try {\n const ids = this.themeService.GetStarredThemeIds();\n if (ids.length) {\n const idList = ids.map((id) => `'${id.replace(/'/g, \"''\")}'`).join(', ');\n const rv = new RunView();\n const result = await rv.RunView<MJThemeEntity>({\n EntityName: 'MJ: Themes',\n ExtraFilter: `ID IN (${idList}) AND Status = 'Active'`,\n OrderBy: 'Name',\n ResultType: 'entity_object',\n });\n if (result.Success) {\n this.StarredThemes = result.Results.map((t) => ({\n id: t.ID,\n name: t.Name,\n seeds: t.Seeds,\n swatches: this.swatchesFor(t.Seeds),\n overrides: t.Overrides,\n customCss: t.CustomCSS,\n }));\n }\n }\n } catch {\n /* non-fatal: the list just stays light/dark/system */\n }\n this.cdr.markForCheck();\n }\n\n /** Apply a starred brand theme to the running app and persist it as the user's choice. */\n public async ApplyStarredTheme(t: StarredThemeItem): Promise<void> {\n try {\n this.themeService.RegisterBrandTheme({ id: t.id, name: t.name, seeds: t.seeds, overrides: t.overrides, customCss: t.customCss });\n await this.themeService.ApplyBrandOverlay(t.id);\n await this.themeService.SetSelectedBrandTheme(t.id);\n } catch (err) {\n const msg = err instanceof Error ? err.message : 'Unknown error';\n this.sharedService.CreateSimpleNotification(`Could not apply theme: ${msg}`, 'error', 3000);\n } finally {\n this.cdr.markForCheck();\n }\n }\n\n private swatchesFor(seedsJson: string): string[] {\n try {\n const s = JSON.parse(seedsJson) as ThemeSeeds;\n return [s.primary, s.accent ?? s.primary, s.tertiary ?? s.accent ?? s.primary];\n } catch {\n return ['#0076b6', '#38a9d9', '#8b5cf6'];\n }\n }\n\n /**\n * Per-user omnibar opt-in/out. Persists via UserInfoEngine (MJ: User\n * Settings) so the choice follows the user across browsers/devices. The\n * shell reads the same setting on every change-detection pass, so the\n * header affordance and Ctrl+K behavior flip live — no reload needed.\n */\n public async ToggleOmnibar(): Promise<void> {\n if (this.SavingOmnibar) return;\n const next = !this.OmnibarEnabled;\n this.SavingOmnibar = true;\n this.cdr.markForCheck();\n try {\n const saved = await UserInfoEngine.Instance.SetSetting(OMNIBAR_USER_SETTING_KEY, String(next));\n if (saved) {\n this.OmnibarEnabled = next;\n } else {\n this.sharedService.CreateSimpleNotification('Could not save the command palette preference', 'error', 3000);\n }\n } finally {\n this.SavingOmnibar = false;\n this.cdr.markForCheck();\n }\n }\n\n public async ToggleChannel(channel: NotificationChannel): Promise<void> {\n if (channel.saving) return;\n const newState = !channel.enabled;\n channel.saving = true;\n this.cdr.markForCheck();\n\n const provider = this.ProviderToUse;\n const currentUser = provider?.CurrentUser;\n if (!provider || !currentUser) {\n channel.saving = false;\n return;\n }\n\n try {\n const transGroup = await provider.CreateTransactionGroup();\n const types = UserInfoEngine.Instance.NotificationTypes;\n const preferences = UserInfoEngine.Instance.NotificationPreferences;\n\n for (const type of types) {\n if (type.AllowUserPreference === false) continue;\n\n let pref = preferences.find(p => UUIDsEqual(p.NotificationTypeID, type.ID));\n if (!pref) {\n pref = await provider.GetEntityObject<MJUserNotificationPreferenceEntity>(\n 'MJ: User Notification Preferences'\n );\n pref.UserID = currentUser.ID;\n pref.NotificationTypeID = type.ID;\n pref.InAppEnabled = type.DefaultInApp ?? true;\n pref.EmailEnabled = type.DefaultEmail ?? false;\n pref.SMSEnabled = type.DefaultSMS ?? false;\n }\n\n if (channel.key === 'InApp') pref.InAppEnabled = newState;\n else if (channel.key === 'Email') pref.EmailEnabled = newState;\n else pref.SMSEnabled = newState;\n\n pref.Enabled = pref.InAppEnabled || pref.EmailEnabled || pref.SMSEnabled;\n pref.TransactionGroup = transGroup;\n pref.Save();\n }\n\n const success = await transGroup.Submit();\n if (success) {\n channel.enabled = newState;\n this.sharedService.CreateSimpleNotification(\n `${channel.label} notifications ${newState ? 'enabled' : 'disabled'}`,\n 'success',\n 2000\n );\n } else {\n throw new Error('Save failed');\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : 'Unknown error';\n this.sharedService.CreateSimpleNotification(`Update failed: ${msg}`, 'error', 3000);\n await this.loadNotifications();\n } finally {\n channel.saving = false;\n this.cdr.markForCheck();\n }\n }\n\n // ---------- private helpers ----------\n\n private populateIdentity(): void {\n const provider = this.ProviderToUse;\n const user = provider?.CurrentUser;\n if (user) {\n const name = user.Name || `${user.FirstName ?? ''} ${user.LastName ?? ''}`.trim();\n this.UserName = name || 'User';\n this.UserEmail = user.Email || '';\n this.UserInitials = this.computeInitials(this.UserName);\n this.AccountType = user.Type || 'User';\n this.AccountStatus = user.IsActive ? 'Active' : 'Inactive';\n this.MemberSince = this.formatMemberSince(user.__mj_CreatedAt);\n this.RoleChips = this.computeRoleChips(user.UserRoles);\n }\n this.ThemePreference = this.themeService.Preference;\n this.ThemeLabel = this.computeThemeLabel();\n }\n\n private populateThemeOptions(): void {\n const themes: ThemeDefinition[] = this.themeService.AvailableThemes ?? [];\n this.ThemeOptions = themes.map(t => ({\n id: t.Id,\n name: t.Name,\n description: t.Description ?? (t.BaseTheme === 'dark' ? 'Dark interface' : 'Light interface'),\n icon: t.BaseTheme === 'dark' ? 'fa-solid fa-moon' : 'fa-solid fa-sun',\n swatch: t.BaseTheme as 'light' | 'dark'\n }));\n this.ThemeOptions.push({\n id: 'system',\n name: 'System',\n description: 'Follow your operating system',\n icon: 'fa-solid fa-desktop',\n swatch: 'system'\n });\n }\n\n private async loadNotifications(): Promise<void> {\n this.LoadingNotifications = true;\n try {\n this.UnreadCount = UserInfoEngine.Instance.UnreadNotificationCount ?? 0;\n const preferences = UserInfoEngine.Instance.NotificationPreferences;\n const types = UserInfoEngine.Instance.NotificationTypes;\n\n let inApp: boolean, email: boolean, sms: boolean;\n if (preferences.length === 0 && types.length > 0) {\n inApp = types.some(t => t.DefaultInApp ?? true);\n email = types.some(t => t.DefaultEmail ?? false);\n sms = types.some(t => t.DefaultSMS ?? false);\n } else {\n inApp = preferences.some(p => p.InAppEnabled);\n email = preferences.some(p => p.EmailEnabled);\n sms = preferences.some(p => p.SMSEnabled);\n }\n\n this.Channels[0].enabled = inApp;\n this.Channels[1].enabled = email;\n this.Channels[2].enabled = sms;\n } catch {\n // non-fatal; leave defaults\n } finally {\n this.LoadingNotifications = false;\n this.cdr.markForCheck();\n }\n }\n\n private computeInitials(name: string): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n if (parts.length === 0) return '?';\n if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();\n return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();\n }\n\n private computeRoleChips(roles: UserRoleInfo[] | undefined): Array<{ label: string; tone: string; icon: string | null }> {\n if (!roles || roles.length === 0) return [];\n return roles\n .map(r => r.Role)\n .filter((n): n is string => !!n)\n .map(roleName => {\n const lower = roleName.toLowerCase();\n if (lower.includes('admin')) return { label: roleName, tone: 'admin', icon: 'fa-solid fa-shield' };\n if (lower.includes('developer') || lower.includes('integration')) return { label: roleName, tone: 'dev', icon: 'fa-solid fa-code' };\n return { label: roleName, tone: '', icon: null };\n });\n }\n\n private formatMemberSince(date: Date | string | null | undefined): string {\n if (!date) return '';\n const d = date instanceof Date ? date : new Date(date);\n if (isNaN(d.getTime())) return '';\n return d.toLocaleDateString(undefined, { month: 'short', year: 'numeric' });\n }\n\n private computeThemeLabel(): string {\n const applied = this.themeService.AppliedTheme;\n const preference = this.themeService.Preference;\n const def = this.themeService.GetThemeDefinition(applied);\n const themeName = def?.Name ?? applied;\n return preference === 'system' ? `${themeName} · System` : themeName;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"profile-dialog.component.js","sourceRoot":"","sources":["../../../src/lib/profile/profile-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,EACT,YAAY,EACZ,KAAK,EAGL,MAAM,EACN,iBAAiB,EACjB,MAAM,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAgB,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EACH,gCAAgC,EAGhC,cAAc,EACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,aAAa,EAAmB,MAAM,2BAA2B,CAAC;AAEzF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM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AM;;kBAEN,KAAK;;kBACL,KAAK;;kFAJG,sBAAsB","sourcesContent":["import {\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ChangeDetectorRef,\n inject\n} from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { RunView, UserRoleInfo } from '@memberjunction/core';\nimport { UUIDsEqual } from '@memberjunction/global';\nimport {\n CONVERSATIONS_FORK_AUTHORIZATION,\n MJThemeEntity,\n MJUserNotificationPreferenceEntity,\n UserInfoEngine\n} from '@memberjunction/core-entities';\nimport { MJAuthBase } from '@memberjunction/ng-auth-services';\nimport { BaseAngularComponent } from '@memberjunction/ng-base-types';\nimport { ThemeService, SharedService, ThemeDefinition } from '@memberjunction/ng-shared';\nimport type { ThemeSeeds } from '@memberjunction/theme-engine';\nimport { ExplorerSettingsModule } from '@memberjunction/ng-explorer-settings';\nimport { UserHoldsAuthorization } from '@memberjunction/ng-conversations';\nimport { IsOmnibarAvailable, IsOmnibarEnabledForUser, OMNIBAR_USER_SETTING_KEY } from '../omnibar/omnibar-user-setting';\nimport { GetOmnibarShortcutLabel } from '../omnibar/omnibar-shortcut';\nimport { IsForkingOnForUser, SaveForkingForUser } from './forking-setting';\nimport { Subscription } from 'rxjs';\n\ninterface NotificationChannel {\n key: 'InApp' | 'Email' | 'SMS';\n label: string;\n icon: string;\n enabled: boolean;\n saving: boolean;\n}\n\ninterface StarredThemeItem {\n id: string;\n name: string;\n seeds: string;\n swatches: string[];\n overrides: string | null;\n customCss: string | null;\n}\n\ntype ProfilePanel = 'none' | 'photo' | 'theme';\n\n/**\n * \"Identity Card\" profile dialog with slide-in detail panels for editing\n * profile photo and switching theme. Replaces the legacy multi-tab Settings\n * dialog entirely. Brand-aligned with the About dialog.\n */\n@Component({\n selector: 'mj-profile-dialog',\n standalone: true,\n imports: [CommonModule, ExplorerSettingsModule],\n template: `\n<div class=\"mj-profile\" [class.mj-profile--panel-open]=\"ActivePanel !== 'none'\" role=\"document\">\n <button class=\"mj-profile__close\" type=\"button\" aria-label=\"Close\" (click)=\"OnCloseClick()\">\n <i class=\"fa-solid fa-xmark\"></i>\n </button>\n\n <!-- ===== MAIN VIEW ===== -->\n <div class=\"mj-profile__main\">\n <div class=\"mj-profile__hero\">\n <h3 class=\"mj-profile__hero-title\">My Profile</h3>\n </div>\n\n <div class=\"mj-profile__avatar-zone\">\n @if (AvatarUrl) {\n <img class=\"mj-profile__avatar mj-profile__avatar--img\"\n [src]=\"AvatarUrl\" alt=\"\" (error)=\"OnAvatarLoadError()\" />\n } @else if (AvatarIconClass) {\n <div class=\"mj-profile__avatar mj-profile__avatar--icon\">\n <i [class]=\"AvatarIconClass\"></i>\n </div>\n } @else {\n <div class=\"mj-profile__avatar\">{{ UserInitials }}</div>\n }\n <button class=\"mj-profile__avatar-edit\" type=\"button\" title=\"Change photo\"\n (click)=\"OpenPanel('photo')\">\n <i class=\"fa-solid fa-camera\"></i>\n </button>\n </div>\n\n <div class=\"mj-profile__identity\">\n <h2 class=\"mj-profile__name\">{{ UserName }}</h2>\n <p class=\"mj-profile__email\">{{ UserEmail }}</p>\n @if (RoleChips.length > 0) {\n <div class=\"mj-profile__chips\">\n @for (chip of RoleChips; track chip.label) {\n <span class=\"mj-profile__chip\" [class]=\"'mj-profile__chip--' + chip.tone\">\n @if (chip.icon) { <i [class]=\"chip.icon\"></i> }\n {{ chip.label }}\n </span>\n }\n </div>\n }\n </div>\n\n <!-- The one scroll region: hero, avatar, identity and footer stay put; only the settings rows scroll. -->\n <div class=\"mj-profile__scroll\">\n <div class=\"mj-profile__field-list\">\n <div class=\"mj-profile__field\">\n <div class=\"mj-profile__field-icon\"><i class=\"fa-solid fa-id-badge\"></i></div>\n <div class=\"mj-profile__field-body\">\n <div class=\"mj-profile__field-label\">Account</div>\n <div class=\"mj-profile__field-value\">\n {{ AccountType }} · {{ AccountStatus }}\n @if (MemberSince) {\n <span class=\"mj-profile__field-muted\"> · {{ MemberSince }}</span>\n }\n </div>\n </div>\n </div>\n\n <button class=\"mj-profile__field mj-profile__field--button\" type=\"button\" (click)=\"OpenPanel('theme')\">\n <div class=\"mj-profile__field-icon\"><i class=\"fa-solid fa-palette\"></i></div>\n <div class=\"mj-profile__field-body\">\n <div class=\"mj-profile__field-label\">Theme</div>\n <div class=\"mj-profile__field-value\">{{ ThemeLabel }}</div>\n </div>\n <i class=\"fa-solid fa-chevron-right mj-profile__field-chev\"></i>\n </button>\n </div>\n\n @if (OmnibarAvailable) {\n <div class=\"mj-profile__section\">\n <div class=\"mj-profile__section-head\">\n <h4>Command Palette</h4>\n </div>\n <div class=\"mj-profile__channels\">\n <button type=\"button\"\n class=\"mj-profile__channel\"\n data-testid=\"omnibar-toggle\"\n [class.mj-profile__channel--on]=\"OmnibarEnabled\"\n [disabled]=\"SavingOmnibar\"\n (click)=\"ToggleOmnibar()\">\n <div class=\"mj-profile__channel-icon\"><i class=\"fa-solid fa-magnifying-glass\"></i></div>\n <div class=\"mj-profile__channel-label\">\n Unified command palette\n <div class=\"mj-profile__channel-hint\">{{ OmnibarShortcutLabel }} — search, records, agents & commands in one bar</div>\n </div>\n <div class=\"mj-profile__channel-state\">\n @if (SavingOmnibar) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n } @else {\n <span class=\"mj-profile__switch\" [class.mj-profile__switch--on]=\"OmnibarEnabled\">\n <span class=\"mj-profile__switch-knob\"></span>\n </span>\n }\n </div>\n </button>\n </div>\n </div>\n }\n\n @if (ForkingAvailable) {\n <div class=\"mj-profile__section\">\n <div class=\"mj-profile__section-head\">\n <h4>Conversations</h4>\n </div>\n <div class=\"mj-profile__channels\">\n <button type=\"button\"\n class=\"mj-profile__channel\"\n data-testid=\"forking-toggle\"\n role=\"switch\"\n [attr.aria-checked]=\"ForkingEnabled\"\n [class.mj-profile__channel--on]=\"ForkingEnabled\"\n [disabled]=\"SavingForking\"\n (click)=\"ToggleForking()\">\n <div class=\"mj-profile__channel-icon\"><i class=\"fa-solid fa-code-branch\" aria-hidden=\"true\"></i></div>\n <div class=\"mj-profile__channel-label\">\n Fork when I edit or regenerate\n <div class=\"mj-profile__channel-hint\">When off, Edit and Regenerate change the latest turn in place.</div>\n </div>\n <div class=\"mj-profile__channel-state\">\n <span class=\"mj-profile__switch\" [class.mj-profile__switch--on]=\"ForkingEnabled\">\n <span class=\"mj-profile__switch-knob\"></span>\n </span>\n </div>\n </button>\n </div>\n </div>\n }\n\n <div class=\"mj-profile__section\">\n <div class=\"mj-profile__section-head\">\n <h4>Notifications</h4>\n @if (UnreadCount > 0) {\n <span class=\"mj-profile__unread\">{{ UnreadCount }} unread</span>\n }\n </div>\n @if (LoadingNotifications) {\n <div class=\"mj-profile__channels-loading\">\n <i class=\"fa-solid fa-spinner fa-spin\"></i> Loading…\n </div>\n } @else {\n <div class=\"mj-profile__channels\">\n @for (ch of Channels; track ch.key) {\n <button type=\"button\"\n class=\"mj-profile__channel\"\n [class.mj-profile__channel--on]=\"ch.enabled\"\n [disabled]=\"ch.saving\"\n (click)=\"ToggleChannel(ch)\">\n <div class=\"mj-profile__channel-icon\"><i [class]=\"ch.icon\"></i></div>\n <div class=\"mj-profile__channel-label\">{{ ch.label }}</div>\n <div class=\"mj-profile__channel-state\">\n @if (ch.saving) {\n <i class=\"fa-solid fa-spinner fa-spin\"></i>\n } @else {\n <span class=\"mj-profile__switch\" [class.mj-profile__switch--on]=\"ch.enabled\">\n <span class=\"mj-profile__switch-knob\"></span>\n </span>\n }\n </div>\n </button>\n }\n </div>\n }\n </div>\n </div>\n\n <div class=\"mj-profile__footer\">\n <button class=\"mj-profile__btn mj-profile__btn--danger\" type=\"button\" (click)=\"OnSignOut()\">\n <i class=\"fa-solid fa-arrow-right-from-bracket\"></i>\n Sign out\n </button>\n <span class=\"mj-profile__spacer\"></span>\n <button class=\"mj-profile__btn mj-profile__btn--primary\" type=\"button\" (click)=\"OnCloseClick()\">\n Done\n </button>\n </div>\n </div>\n\n <!-- ===== SLIDE-IN PANEL ===== -->\n <div class=\"mj-profile__panel\" [class.mj-profile__panel--open]=\"ActivePanel !== 'none'\">\n <div class=\"mj-profile__panel-header\">\n <button class=\"mj-profile__panel-back\" type=\"button\" aria-label=\"Back\" (click)=\"ClosePanel()\">\n <i class=\"fa-solid fa-arrow-left\"></i>\n </button>\n <h3 class=\"mj-profile__panel-title\">{{ PanelTitle }}</h3>\n </div>\n <div class=\"mj-profile__panel-body\">\n @if (ActivePanel === 'photo') {\n <mj-user-profile-settings></mj-user-profile-settings>\n } @else if (ActivePanel === 'theme') {\n <div class=\"mj-profile__themes\">\n @for (theme of ThemeOptions; track theme.id) {\n <button type=\"button\"\n class=\"mj-profile__theme\"\n [class.mj-profile__theme--active]=\"theme.id === ThemePreference\"\n [class.mj-profile__theme--saving]=\"SavingTheme === theme.id\"\n [disabled]=\"!!SavingTheme\"\n (click)=\"SelectTheme(theme.id)\">\n <div class=\"mj-profile__theme-swatch\" [class]=\"'mj-profile__theme-swatch--' + theme.swatch\">\n <i [class]=\"theme.icon\"></i>\n </div>\n <div class=\"mj-profile__theme-info\">\n <div class=\"mj-profile__theme-name\">{{ theme.name }}</div>\n @if (theme.description) {\n <div class=\"mj-profile__theme-desc\">{{ theme.description }}</div>\n }\n </div>\n @if (SavingTheme === theme.id) {\n <i class=\"fa-solid fa-spinner fa-spin mj-profile__theme-check\"></i>\n } @else if (theme.id === ThemePreference) {\n <i class=\"fa-solid fa-check mj-profile__theme-check\"></i>\n }\n </button>\n }\n @if (StarredThemes.length) {\n <div class=\"mj-profile__theme-sep\">Brand themes</div>\n @for (t of StarredThemes; track t.id) {\n <button type=\"button\"\n class=\"mj-profile__theme\"\n [class.mj-profile__theme--active]=\"IsAppliedBrand(t.id)\"\n (click)=\"ApplyStarredTheme(t)\">\n <div class=\"mj-profile__theme-swatch mj-profile__brand-swatch\">\n @for (c of t.swatches; track $index) { <i [style.background]=\"c\"></i> }\n </div>\n <div class=\"mj-profile__theme-info\">\n <div class=\"mj-profile__theme-name\">{{ t.name }}</div>\n </div>\n @if (IsAppliedBrand(t.id)) {\n <i class=\"fa-solid fa-check mj-profile__theme-check\"></i>\n }\n </button>\n }\n }\n </div>\n }\n </div>\n </div>\n</div>\n `,\n styles: [`\n:host {\n display: block;\n width: 100%;\n height: 100%;\n}\n/* A flex column, so the dialog's height bound reaches the one scroll region inside the card.\n\n ProfileDialogService opens the dialog with a width and no height, so .mj-dialog-container is\n height:auto with max-height:90vh, and every box between it and this card is a shrinkable flex item\n (.mj-dialog-body and the host div inside it, both min-height:0). That chain already bounds the card\n at 90vh. What it could not bound was .mj-profile__main: while this element was display:block,\n __main's height:100% had nothing definite to resolve against, so it computed to auto, grew to its\n full content, and overflow:hidden here clipped the bottom of the card -- notification channels,\n footer, Sign out -- with nothing left to scroll. The same shape #4351 fixed for the user menu, one\n layer out.\n\n The flex chain is the fix: display:flex here, flex:1 + min-height:0 on __main, and flex:1 +\n min-height:0 + overflow-y:auto on __scroll. Flex hands the bounded height down; a percentage could\n not. Do not trade it for a max-height -- a max-height gives no child percentage a definite size to\n resolve against, so the clip would come back.\n\n max-height:100dvh (100vh first, for engines without dvh) is only a backstop. On desktop it never\n binds: the container's 90vh is tighter. It can bind on a phone (<768px wide), where the dialog\n forces the container to height:100vh and a mobile browser's dynamic toolbar can make 100dvh\n shorter. A max-height can only shorten the card, so there it can only lift the footer, never\n push it down. */\n.mj-profile {\n display: flex;\n flex-direction: column;\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n height: 100%;\n max-height: 100vh;\n max-height: 100dvh;\n min-height: 0;\n position: relative;\n font-family: inherit;\n overflow: hidden;\n}\n.mj-profile__close {\n position: absolute;\n top: 12px; right: 12px;\n width: 36px; height: 36px;\n border: none; border-radius: 8px;\n background: rgba(255, 255, 255, 0.18);\n backdrop-filter: blur(8px);\n color: #fff;\n cursor: pointer;\n font-size: 16px;\n display: flex; align-items: center; justify-content: center;\n transition: background 0.15s, opacity 0.2s;\n z-index: 4;\n}\n.mj-profile__close:hover { background: rgba(255, 255, 255, 0.3); }\n.mj-profile--panel-open .mj-profile__close { opacity: 0; pointer-events: none; }\n\n/* ============ MAIN VIEW ============ */\n/* flex:1 with min-height:0 rather than height:100%: the card is a flex column, so this takes the\n card's bounded height, and min-height:0 lets it shrink below its content -- without it a flex\n item's automatic minimum size refuses to, and __scroll would never be short enough to scroll. */\n.mj-profile__main {\n display: flex;\n flex-direction: column;\n flex: 1;\n min-height: 0;\n transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);\n}\n.mj-profile--panel-open .mj-profile__main {\n transform: translateX(-12%);\n pointer-events: none;\n}\n\n.mj-profile__hero {\n background: linear-gradient(135deg, #264FAF 0%, #0076b6 100%);\n color: #fff;\n padding: 22px 24px 56px;\n position: relative;\n overflow: hidden;\n flex-shrink: 0;\n}\n.mj-profile__hero::before {\n content: '';\n position: absolute;\n inset: -50%;\n background: radial-gradient(circle, rgba(255, 255, 255, 0.10) 0%, transparent 60%);\n animation: mj-profile-rotate 24s linear infinite;\n pointer-events: none;\n}\n@media (prefers-reduced-motion: reduce) {\n .mj-profile__hero::before { animation: none; }\n}\n@keyframes mj-profile-rotate { to { transform: rotate(360deg); } }\n\n.mj-profile__hero-title {\n margin: 0;\n font-size: 12px;\n font-weight: 700;\n text-transform: uppercase;\n letter-spacing: 1.2px;\n opacity: 0.85;\n position: relative;\n z-index: 1;\n}\n\n.mj-profile__avatar-zone {\n position: relative;\n width: 96px;\n height: 96px;\n margin: -48px auto 12px;\n z-index: 2;\n}\n.mj-profile__avatar {\n width: 96px;\n height: 96px;\n border-radius: 50%;\n background: linear-gradient(135deg, #264FAF 0%, #0076b6 100%);\n color: #fff;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 32px;\n font-weight: 700;\n border: 4px solid var(--mj-bg-surface);\n box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);\n object-fit: cover;\n overflow: hidden;\n}\nimg.mj-profile__avatar { background: var(--mj-bg-surface-card); }\n.mj-profile__avatar--icon i { font-size: 36px; }\n\n.mj-profile__avatar-edit {\n position: absolute;\n bottom: 2px; right: 2px;\n width: 30px; height: 30px;\n border-radius: 50%;\n background: var(--mj-bg-surface);\n color: var(--mj-brand-primary);\n border: 2px solid var(--mj-bg-surface);\n cursor: pointer;\n display: flex; align-items: center; justify-content: center;\n font-size: 12px;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);\n transition: transform 0.15s;\n}\n.mj-profile__avatar-edit:hover { transform: scale(1.1); }\n\n.mj-profile__identity {\n text-align: center;\n padding: 0 24px 16px;\n flex-shrink: 0;\n}\n.mj-profile__name {\n margin: 0 0 4px;\n font-size: 22px;\n font-weight: 700;\n letter-spacing: -0.4px;\n color: var(--mj-text-primary);\n}\n.mj-profile__email {\n margin: 0 0 12px;\n color: var(--mj-text-muted);\n font-size: 13px;\n word-break: break-all;\n}\n.mj-profile__chips {\n display: flex;\n gap: 6px;\n flex-wrap: wrap;\n justify-content: center;\n}\n.mj-profile__chip {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 3px 9px;\n border-radius: 100px;\n font-size: 11px;\n font-weight: 600;\n background: color-mix(in srgb, var(--mj-brand-primary) 12%, transparent);\n color: var(--mj-brand-primary);\n}\n.mj-profile__chip--admin {\n background: color-mix(in srgb, #f59e0b 14%, transparent);\n color: #b45309;\n}\n.mj-profile__chip--dev {\n background: color-mix(in srgb, #10b981 14%, transparent);\n color: #047857;\n}\n\n/* The only flex-grow and the only scroller in __main. Hero, avatar, identity and footer hold their\n size; this takes whatever height they leave and scrolls the settings rows inside it. One region,\n not one per section: peer scrollers split the leftover height between them and each shrinks to\n its own padding on a short window. */\n.mj-profile__scroll {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n}\n\n.mj-profile__field-list {\n padding: 0 24px;\n}\n.mj-profile__field {\n display: flex;\n align-items: center;\n padding: 12px 0;\n gap: 14px;\n border-top: 1px solid var(--mj-border-subtle);\n width: 100%;\n text-align: left;\n background: transparent;\n border-left: none;\n border-right: none;\n border-bottom: none;\n font-family: inherit;\n color: inherit;\n}\n.mj-profile__field:first-child { border-top: none; }\n.mj-profile__field--button {\n cursor: pointer;\n transition: background 0.12s;\n margin: 0 -8px;\n padding-left: 8px;\n padding-right: 8px;\n border-radius: 8px;\n border-top: none;\n}\n.mj-profile__field--button + .mj-profile__field--button { margin-top: 0; }\n.mj-profile__field--button:hover { background: var(--mj-bg-surface-hover); }\n.mj-profile__field--button:hover .mj-profile__field-chev { color: var(--mj-brand-primary); }\n.mj-profile__field-icon {\n width: 32px; height: 32px;\n background: var(--mj-bg-surface-sunken);\n border-radius: 8px;\n color: var(--mj-text-secondary);\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n flex-shrink: 0;\n}\n.mj-profile__field-body { flex: 1; min-width: 0; }\n.mj-profile__field-label {\n font-size: 10.5px;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n font-weight: 600;\n letter-spacing: 0.5px;\n}\n.mj-profile__field-value {\n font-size: 13px;\n color: var(--mj-text-primary);\n margin-top: 2px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mj-profile__field-muted { color: var(--mj-text-muted); }\n.mj-profile__field-chev {\n color: var(--mj-text-muted);\n font-size: 11px;\n transition: color 0.15s;\n}\n\n.mj-profile__section {\n padding: 16px 24px 8px;\n}\n.mj-profile__section-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 10px;\n}\n.mj-profile__section-head h4 {\n margin: 0;\n font-size: 11px;\n font-weight: 700;\n color: var(--mj-text-muted);\n text-transform: uppercase;\n letter-spacing: 0.6px;\n}\n.mj-profile__unread {\n font-size: 11px;\n font-weight: 600;\n color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 10%, transparent);\n padding: 2px 8px;\n border-radius: 100px;\n}\n.mj-profile__channels-loading {\n color: var(--mj-text-muted);\n font-size: 12.5px;\n padding: 12px;\n text-align: center;\n}\n.mj-profile__channels {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.mj-profile__channel {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 10px 14px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.15s;\n font-family: inherit;\n text-align: left;\n width: 100%;\n}\n.mj-profile__channel:hover:not(:disabled) {\n border-color: var(--mj-border-default);\n background: var(--mj-bg-surface-hover);\n}\n.mj-profile__channel:disabled { cursor: wait; opacity: 0.7; }\n.mj-profile__channel-icon {\n width: 32px; height: 32px;\n border-radius: 8px;\n background: var(--mj-bg-surface-sunken);\n color: var(--mj-text-secondary);\n display: flex; align-items: center; justify-content: center;\n font-size: 13px;\n flex-shrink: 0;\n transition: all 0.15s;\n}\n.mj-profile__channel--on .mj-profile__channel-icon {\n background: color-mix(in srgb, var(--mj-brand-primary) 14%, transparent);\n color: var(--mj-brand-primary);\n}\n.mj-profile__channel-label {\n flex: 1;\n font-size: 13.5px;\n font-weight: 500;\n color: var(--mj-text-primary);\n}\n.mj-profile__channel-hint {\n font-size: 11.5px;\n font-weight: 400;\n color: var(--mj-text-muted);\n margin-top: 2px;\n}\n.mj-profile__channel-state {\n flex-shrink: 0;\n color: var(--mj-text-muted);\n font-size: 13px;\n min-width: 36px;\n display: flex; justify-content: flex-end; align-items: center;\n}\n\n.mj-profile__switch {\n width: 36px;\n height: 20px;\n background: var(--mj-border-strong);\n border-radius: 100px;\n position: relative;\n transition: background 0.2s;\n display: inline-block;\n}\n.mj-profile__switch-knob {\n position: absolute;\n top: 2px; left: 2px;\n width: 16px; height: 16px;\n background: white;\n border-radius: 50%;\n transition: transform 0.2s;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);\n}\n.mj-profile__switch--on { background: var(--mj-brand-primary); }\n.mj-profile__switch--on .mj-profile__switch-knob { transform: translateX(16px); }\n\n.mj-profile__footer {\n border-top: 1px solid var(--mj-border-subtle);\n padding: 14px 20px;\n display: flex;\n gap: 8px;\n align-items: center;\n flex-shrink: 0;\n}\n.mj-profile__spacer { flex: 1; }\n.mj-profile__btn {\n padding: 9px 16px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n cursor: pointer;\n font-size: 13px;\n font-weight: 500;\n font-family: inherit;\n display: inline-flex;\n align-items: center;\n gap: 6px;\n transition: all 0.15s;\n}\n.mj-profile__btn:hover { background: var(--mj-bg-surface-hover); border-color: var(--mj-border-strong); }\n.mj-profile__btn--primary {\n background: var(--mj-brand-primary);\n color: var(--mj-text-inverse);\n border-color: var(--mj-brand-primary);\n}\n.mj-profile__btn--primary:hover {\n background: color-mix(in srgb, var(--mj-brand-primary) 88%, black);\n border-color: color-mix(in srgb, var(--mj-brand-primary) 88%, black);\n}\n.mj-profile__btn--danger {\n color: var(--mj-status-error);\n border-color: color-mix(in srgb, var(--mj-status-error) 30%, var(--mj-border-default));\n}\n.mj-profile__btn--danger:hover {\n background: color-mix(in srgb, var(--mj-status-error) 8%, transparent);\n border-color: var(--mj-status-error);\n}\n\n/* ============ SLIDE-IN PANEL ============ */\n.mj-profile__panel {\n position: absolute;\n inset: 0;\n background: var(--mj-bg-surface);\n transform: translateX(100%);\n transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);\n display: flex;\n flex-direction: column;\n z-index: 3;\n}\n.mj-profile__panel--open {\n transform: translateX(0);\n box-shadow: -8px 0 24px rgba(0, 0, 0, 0.06);\n}\n.mj-profile__panel-header {\n display: flex;\n align-items: center;\n gap: 12px;\n padding: 14px 18px;\n border-bottom: 1px solid var(--mj-border-subtle);\n background: var(--mj-bg-surface-card);\n flex-shrink: 0;\n}\n.mj-profile__panel-back {\n width: 34px; height: 34px;\n border-radius: 8px;\n border: 1px solid var(--mj-border-default);\n background: var(--mj-bg-surface);\n color: var(--mj-text-primary);\n cursor: pointer;\n display: flex; align-items: center; justify-content: center;\n font-size: 13px;\n transition: all 0.15s;\n font-family: inherit;\n}\n.mj-profile__panel-back:hover {\n background: var(--mj-bg-surface-hover);\n border-color: var(--mj-brand-primary);\n color: var(--mj-brand-primary);\n}\n.mj-profile__panel-title {\n margin: 0;\n font-size: 15px;\n font-weight: 600;\n color: var(--mj-text-primary);\n letter-spacing: -0.2px;\n}\n.mj-profile__panel-body {\n flex: 1;\n min-height: 0;\n overflow-y: auto;\n padding: 16px 20px 20px;\n}\n\n/* Theme picker */\n.mj-profile__themes {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.mj-profile__theme {\n display: flex;\n align-items: center;\n gap: 14px;\n padding: 12px 14px;\n background: var(--mj-bg-surface-card);\n border: 1px solid var(--mj-border-subtle);\n border-radius: 10px;\n cursor: pointer;\n transition: all 0.15s;\n text-align: left;\n width: 100%;\n font-family: inherit;\n}\n.mj-profile__theme:hover:not(:disabled) {\n border-color: var(--mj-brand-primary);\n background: var(--mj-bg-surface-hover);\n}\n.mj-profile__theme:disabled { cursor: wait; opacity: 0.7; }\n.mj-profile__theme--active {\n border-color: var(--mj-brand-primary);\n background: color-mix(in srgb, var(--mj-brand-primary) 5%, var(--mj-bg-surface-card));\n}\n.mj-profile__theme-swatch {\n width: 40px; height: 40px;\n border-radius: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 16px;\n flex-shrink: 0;\n border: 1px solid var(--mj-border-default);\n}\n.mj-profile__theme-swatch--light {\n background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);\n color: #f59e0b;\n}\n.mj-profile__theme-swatch--dark {\n background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);\n color: #94a3b8;\n border-color: #334155;\n}\n.mj-profile__theme-swatch--system {\n background: linear-gradient(135deg, #ffffff 0%, #ffffff 49%, #1e293b 51%, #0f172a 100%);\n color: var(--mj-text-secondary);\n}\n.mj-profile__theme-info { flex: 1; min-width: 0; }\n.mj-profile__theme-name {\n font-size: 13.5px;\n font-weight: 600;\n color: var(--mj-text-primary);\n}\n.mj-profile__theme-desc {\n font-size: 11.5px;\n color: var(--mj-text-muted);\n margin-top: 2px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.mj-profile__theme-check {\n color: var(--mj-brand-primary);\n font-size: 14px;\n flex-shrink: 0;\n}\n\n/* Starred brand themes shown inline in the theme list */\n.mj-profile__theme-sep {\n font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;\n color: var(--mj-text-muted); padding: 6px 4px 2px; margin-top: 6px;\n}\n.mj-profile__brand-swatch {\n display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 0;\n}\n.mj-profile__brand-swatch i {\n width: 33%; height: 100%; display: block;\n}\n\n@media (max-width: 480px) {\n .mj-profile__hero { padding: 20px 18px 48px; }\n .mj-profile__avatar-zone { width: 88px; height: 88px; margin-top: -44px; }\n .mj-profile__avatar { width: 88px; height: 88px; font-size: 28px; }\n .mj-profile__name { font-size: 19px; }\n .mj-profile__field-list,\n .mj-profile__section { padding-left: 18px; padding-right: 18px; }\n .mj-profile__footer { padding: 12px 16px; }\n .mj-profile--panel-open .mj-profile__main { transform: translateX(-20%); }\n .mj-profile__panel-body { padding: 14px 16px 16px; }\n}\n `]\n})\nexport class ProfileDialogComponent extends BaseAngularComponent implements OnInit, OnDestroy {\n @Output() CloseRequested = new EventEmitter<void>();\n\n @Input() AvatarUrl: string | null = null;\n @Input() AvatarIconClass: string | null = null;\n\n public UserName = '';\n public UserEmail = '';\n public UserInitials = '?';\n public AccountType = '';\n public AccountStatus = '';\n public MemberSince = '';\n public ThemeLabel = '';\n public RoleChips: Array<{ label: string; tone: string; icon: string | null }> = [];\n\n public LoadingNotifications = true;\n public Channels: NotificationChannel[] = [\n { key: 'InApp', label: 'In-app', icon: 'fa-solid fa-bell', enabled: false, saving: false },\n { key: 'Email', label: 'Email', icon: 'fa-solid fa-envelope', enabled: false, saving: false },\n { key: 'SMS', label: 'SMS', icon: 'fa-solid fa-mobile', enabled: false, saving: false }\n ];\n public UnreadCount = 0;\n\n // Omnibar per-user opt-in (shown only when the instance makes it available)\n public OmnibarAvailable = false;\n public OmnibarEnabled = false;\n public SavingOmnibar = false;\n\n // Personal forking switch (shown only to a person who holds Conversations: Fork)\n public ForkingAvailable = false;\n public ForkingEnabled = true;\n public SavingForking = false;\n\n /** Platform-correct summon-shortcut label ('⌘K' on Mac, 'Ctrl+K' elsewhere). */\n public get OmnibarShortcutLabel(): string {\n return GetOmnibarShortcutLabel();\n }\n\n // Slide-in panel state\n public ActivePanel: ProfilePanel = 'none';\n public ThemeOptions: Array<{ id: string; name: string; description: string; icon: string; swatch: 'light' | 'dark' | 'system' }> = [];\n public ThemePreference = '';\n public SavingTheme: string | null = null;\n\n // Starred brand themes shown inline in the theme list\n public StarredThemes: StarredThemeItem[] = [];\n public get AppliedBrandId(): string | null {\n return this.themeService.BrandOverlayId;\n }\n\n /** Whether a theme id is the applied brand overlay (case-insensitive GUID compare). */\n public IsAppliedBrand(id: string): boolean {\n const active = this.themeService.BrandOverlayId;\n return !!active && UUIDsEqual(id, active);\n }\n\n public get PanelTitle(): string {\n switch (this.ActivePanel) {\n case 'photo': return 'Profile photo';\n case 'theme': return 'Theme';\n default: return '';\n }\n }\n\n private authBase = inject(MJAuthBase);\n private themeService = inject(ThemeService);\n private sharedService = inject(SharedService);\n private cdr = inject(ChangeDetectorRef);\n\n private themeSub?: Subscription;\n\n public ngOnInit(): void {\n this.populateIdentity();\n this.populateThemeOptions();\n this.loadNotifications();\n this.OmnibarAvailable = IsOmnibarAvailable();\n this.OmnibarEnabled = IsOmnibarEnabledForUser();\n this.ForkingAvailable = UserHoldsAuthorization(this.ProviderToUse.CurrentUser, CONVERSATIONS_FORK_AUTHORIZATION, this.ProviderToUse);\n this.ForkingEnabled = IsForkingOnForUser();\n this.themeSub = this.themeService.Preference$.subscribe(pref => {\n this.ThemePreference = pref;\n this.ThemeLabel = this.computeThemeLabel();\n this.cdr.markForCheck();\n });\n }\n\n public ngOnDestroy(): void {\n this.themeSub?.unsubscribe();\n }\n\n public OnCloseClick(): void {\n if (this.ActivePanel !== 'none') {\n this.ClosePanel();\n return;\n }\n this.CloseRequested.emit();\n }\n\n public OnAvatarLoadError(): void {\n this.AvatarUrl = null;\n this.cdr.markForCheck();\n }\n\n public OpenPanel(panel: ProfilePanel): void {\n this.ActivePanel = panel;\n if (panel === 'theme') {\n this.loadStarredThemes();\n }\n }\n\n public ClosePanel(): void {\n this.ActivePanel = 'none';\n }\n\n public async OnSignOut(): Promise<void> {\n try {\n localStorage.removeItem('auth');\n localStorage.removeItem('claims');\n await this.authBase.logout();\n } catch (err) {\n const msg = err instanceof Error ? err.message : 'Unknown error';\n this.sharedService.CreateSimpleNotification(`Sign out failed: ${msg}`, 'error', 3000);\n }\n }\n\n public async SelectTheme(themeId: string): Promise<void> {\n if (this.SavingTheme) return;\n if (themeId === this.ThemePreference) return;\n this.SavingTheme = themeId;\n this.cdr.markForCheck();\n try {\n await this.themeService.SetTheme(themeId);\n } catch (err) {\n const msg = err instanceof Error ? err.message : 'Unknown error';\n this.sharedService.CreateSimpleNotification(`Theme change failed: ${msg}`, 'error', 3000);\n } finally {\n this.SavingTheme = null;\n this.cdr.markForCheck();\n }\n }\n\n // ========================================\n // Starred brand themes\n // ========================================\n\n /** Load the user's starred brand themes to show inline in the theme list. */\n private async loadStarredThemes(): Promise<void> {\n this.StarredThemes = [];\n try {\n const ids = this.themeService.GetStarredThemeIds();\n if (ids.length) {\n const idList = ids.map((id) => `'${id.replace(/'/g, \"''\")}'`).join(', ');\n const rv = new RunView();\n const result = await rv.RunView<MJThemeEntity>({\n EntityName: 'MJ: Themes',\n ExtraFilter: `ID IN (${idList}) AND Status = 'Active'`,\n OrderBy: 'Name',\n ResultType: 'entity_object',\n });\n if (result.Success) {\n this.StarredThemes = result.Results.map((t) => ({\n id: t.ID,\n name: t.Name,\n seeds: t.Seeds,\n swatches: this.swatchesFor(t.Seeds),\n overrides: t.Overrides,\n customCss: t.CustomCSS,\n }));\n }\n }\n } catch {\n /* non-fatal: the list just stays light/dark/system */\n }\n this.cdr.markForCheck();\n }\n\n /** Apply a starred brand theme to the running app and persist it as the user's choice. */\n public async ApplyStarredTheme(t: StarredThemeItem): Promise<void> {\n try {\n this.themeService.RegisterBrandTheme({ id: t.id, name: t.name, seeds: t.seeds, overrides: t.overrides, customCss: t.customCss });\n await this.themeService.ApplyBrandOverlay(t.id);\n await this.themeService.SetSelectedBrandTheme(t.id);\n } catch (err) {\n const msg = err instanceof Error ? err.message : 'Unknown error';\n this.sharedService.CreateSimpleNotification(`Could not apply theme: ${msg}`, 'error', 3000);\n } finally {\n this.cdr.markForCheck();\n }\n }\n\n private swatchesFor(seedsJson: string): string[] {\n try {\n const s = JSON.parse(seedsJson) as ThemeSeeds;\n return [s.primary, s.accent ?? s.primary, s.tertiary ?? s.accent ?? s.primary];\n } catch {\n return ['#0076b6', '#38a9d9', '#8b5cf6'];\n }\n }\n\n /**\n * Per-user omnibar opt-in/out. Persists via UserInfoEngine (MJ: User\n * Settings) so the choice follows the user across browsers/devices. The\n * shell reads the same setting on every change-detection pass, so the\n * header affordance and Ctrl+K behavior flip live — no reload needed.\n */\n public async ToggleOmnibar(): Promise<void> {\n if (this.SavingOmnibar) return;\n const next = !this.OmnibarEnabled;\n this.SavingOmnibar = true;\n this.cdr.markForCheck();\n try {\n const saved = await UserInfoEngine.Instance.SetSetting(OMNIBAR_USER_SETTING_KEY, String(next));\n if (saved) {\n this.OmnibarEnabled = next;\n } else {\n this.sharedService.CreateSimpleNotification('Could not save the command palette preference', 'error', 3000);\n }\n } finally {\n this.SavingOmnibar = false;\n this.cdr.markForCheck();\n }\n }\n\n /**\n * Turns the person's forking on or off. Saved through UserInfoEngine (MJ: User Settings), so it\n * follows them across browsers; an open conversation reads it on its next change detection.\n */\n public async ToggleForking(): Promise<void> {\n if (this.SavingForking) return;\n const next = !this.ForkingEnabled;\n this.SavingForking = true;\n this.cdr.markForCheck();\n try {\n if (await SaveForkingForUser(next)) {\n this.ForkingEnabled = next;\n } else {\n this.sharedService.CreateSimpleNotification('Could not save the forking preference', 'error', 3000);\n }\n } finally {\n this.SavingForking = false;\n this.cdr.markForCheck();\n }\n }\n\n public async ToggleChannel(channel: NotificationChannel): Promise<void> {\n if (channel.saving) return;\n const newState = !channel.enabled;\n channel.saving = true;\n this.cdr.markForCheck();\n\n const provider = this.ProviderToUse;\n const currentUser = provider?.CurrentUser;\n if (!provider || !currentUser) {\n channel.saving = false;\n return;\n }\n\n try {\n const transGroup = await provider.CreateTransactionGroup();\n const types = UserInfoEngine.Instance.NotificationTypes;\n const preferences = UserInfoEngine.Instance.NotificationPreferences;\n\n for (const type of types) {\n if (type.AllowUserPreference === false) continue;\n\n let pref = preferences.find(p => UUIDsEqual(p.NotificationTypeID, type.ID));\n if (!pref) {\n pref = await provider.GetEntityObject<MJUserNotificationPreferenceEntity>(\n 'MJ: User Notification Preferences'\n );\n pref.UserID = currentUser.ID;\n pref.NotificationTypeID = type.ID;\n pref.InAppEnabled = type.DefaultInApp ?? true;\n pref.EmailEnabled = type.DefaultEmail ?? false;\n pref.SMSEnabled = type.DefaultSMS ?? false;\n }\n\n if (channel.key === 'InApp') pref.InAppEnabled = newState;\n else if (channel.key === 'Email') pref.EmailEnabled = newState;\n else pref.SMSEnabled = newState;\n\n pref.Enabled = pref.InAppEnabled || pref.EmailEnabled || pref.SMSEnabled;\n pref.TransactionGroup = transGroup;\n pref.Save();\n }\n\n const success = await transGroup.Submit();\n if (success) {\n channel.enabled = newState;\n this.sharedService.CreateSimpleNotification(\n `${channel.label} notifications ${newState ? 'enabled' : 'disabled'}`,\n 'success',\n 2000\n );\n } else {\n throw new Error('Save failed');\n }\n } catch (err) {\n const msg = err instanceof Error ? err.message : 'Unknown error';\n this.sharedService.CreateSimpleNotification(`Update failed: ${msg}`, 'error', 3000);\n await this.loadNotifications();\n } finally {\n channel.saving = false;\n this.cdr.markForCheck();\n }\n }\n\n // ---------- private helpers ----------\n\n private populateIdentity(): void {\n const provider = this.ProviderToUse;\n const user = provider?.CurrentUser;\n if (user) {\n const name = user.Name || `${user.FirstName ?? ''} ${user.LastName ?? ''}`.trim();\n this.UserName = name || 'User';\n this.UserEmail = user.Email || '';\n this.UserInitials = this.computeInitials(this.UserName);\n this.AccountType = user.Type || 'User';\n this.AccountStatus = user.IsActive ? 'Active' : 'Inactive';\n this.MemberSince = this.formatMemberSince(user.__mj_CreatedAt);\n this.RoleChips = this.computeRoleChips(user.UserRoles);\n }\n this.ThemePreference = this.themeService.Preference;\n this.ThemeLabel = this.computeThemeLabel();\n }\n\n private populateThemeOptions(): void {\n const themes: ThemeDefinition[] = this.themeService.AvailableThemes ?? [];\n this.ThemeOptions = themes.map(t => ({\n id: t.Id,\n name: t.Name,\n description: t.Description ?? (t.BaseTheme === 'dark' ? 'Dark interface' : 'Light interface'),\n icon: t.BaseTheme === 'dark' ? 'fa-solid fa-moon' : 'fa-solid fa-sun',\n swatch: t.BaseTheme as 'light' | 'dark'\n }));\n this.ThemeOptions.push({\n id: 'system',\n name: 'System',\n description: 'Follow your operating system',\n icon: 'fa-solid fa-desktop',\n swatch: 'system'\n });\n }\n\n private async loadNotifications(): Promise<void> {\n this.LoadingNotifications = true;\n try {\n this.UnreadCount = UserInfoEngine.Instance.UnreadNotificationCount ?? 0;\n const preferences = UserInfoEngine.Instance.NotificationPreferences;\n const types = UserInfoEngine.Instance.NotificationTypes;\n\n let inApp: boolean, email: boolean, sms: boolean;\n if (preferences.length === 0 && types.length > 0) {\n inApp = types.some(t => t.DefaultInApp ?? true);\n email = types.some(t => t.DefaultEmail ?? false);\n sms = types.some(t => t.DefaultSMS ?? false);\n } else {\n inApp = preferences.some(p => p.InAppEnabled);\n email = preferences.some(p => p.EmailEnabled);\n sms = preferences.some(p => p.SMSEnabled);\n }\n\n this.Channels[0].enabled = inApp;\n this.Channels[1].enabled = email;\n this.Channels[2].enabled = sms;\n } catch {\n // non-fatal; leave defaults\n } finally {\n this.LoadingNotifications = false;\n this.cdr.markForCheck();\n }\n }\n\n private computeInitials(name: string): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean);\n if (parts.length === 0) return '?';\n if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();\n return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();\n }\n\n private computeRoleChips(roles: UserRoleInfo[] | undefined): Array<{ label: string; tone: string; icon: string | null }> {\n if (!roles || roles.length === 0) return [];\n return roles\n .map(r => r.Role)\n .filter((n): n is string => !!n)\n .map(roleName => {\n const lower = roleName.toLowerCase();\n if (lower.includes('admin')) return { label: roleName, tone: 'admin', icon: 'fa-solid fa-shield' };\n if (lower.includes('developer') || lower.includes('integration')) return { label: roleName, tone: 'dev', icon: 'fa-solid fa-code' };\n return { label: roleName, tone: '', icon: null };\n });\n }\n\n private formatMemberSince(date: Date | string | null | undefined): string {\n if (!date) return '';\n const d = date instanceof Date ? date : new Date(date);\n if (isNaN(d.getTime())) return '';\n return d.toLocaleDateString(undefined, { month: 'short', year: 'numeric' });\n }\n\n private computeThemeLabel(): string {\n const applied = this.themeService.AppliedTheme;\n const preference = this.themeService.Preference;\n const def = this.themeService.GetThemeDefinition(applied);\n const themeName = def?.Name ?? applied;\n return preference === 'system' ? `${themeName} · System` : themeName;\n }\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { DataSnapshot, UserInfo } from '@memberjunction/core';
|
|
1
|
+
import { CompositeKey, DataSnapshot, UserInfo } from '@memberjunction/core';
|
|
2
2
|
import { BaseResourceComponent } from '@memberjunction/ng-shared';
|
|
3
3
|
import { ResourceData } from '@memberjunction/core-entities';
|
|
4
|
+
import { NavigationRequest } from '@memberjunction/ng-artifacts';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* Artifact Resource - displays versioned content artifacts
|
|
@@ -11,9 +12,13 @@ export declare class ArtifactResource extends BaseResourceComponent {
|
|
|
11
12
|
private readonly analyzeService;
|
|
12
13
|
private readonly applyService;
|
|
13
14
|
/**
|
|
14
|
-
* Apply-to-my-form handler — see InteractiveFormApplyService.
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Apply-to-my-form handler — see InteractiveFormApplyService. Routes a whole form to
|
|
16
|
+
* the override actions and a form panel to the contribution actions.
|
|
17
|
+
*
|
|
18
|
+
* When the agent context names an open record form (`AdditionalContext.Form`), the service
|
|
19
|
+
* reads that form's full composition from the `FormCompositionRegistry`, to validate a
|
|
20
|
+
* panel's placement and spot an installed contribution with the same key before writing
|
|
21
|
+
* anything.
|
|
17
22
|
*/
|
|
18
23
|
OnApplyFormRequested(event: {
|
|
19
24
|
spec: unknown;
|
|
@@ -50,6 +55,20 @@ export declare class ArtifactResource extends BaseResourceComponent {
|
|
|
50
55
|
artifactId: string;
|
|
51
56
|
snapshot: DataSnapshot;
|
|
52
57
|
}): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Opens an entity record requested by the artifact, e.g. an interactive component's
|
|
60
|
+
* OpenEntityRecord callback. Without this, record links in a standalone artifact tab do nothing.
|
|
61
|
+
*/
|
|
62
|
+
OnOpenEntityRecord(event: {
|
|
63
|
+
entityName: string;
|
|
64
|
+
compositeKey: CompositeKey;
|
|
65
|
+
}): void;
|
|
66
|
+
/**
|
|
67
|
+
* Handles app-level navigation requested by an artifact viewer plugin.
|
|
68
|
+
* Opens the target nav item (switching apps if needed) then applies query params to the URL.
|
|
69
|
+
*/
|
|
70
|
+
OnNavigationRequest(event: NavigationRequest): Promise<void>;
|
|
71
|
+
private resolveAppID;
|
|
53
72
|
GetResourceDisplayName(data: ResourceData): Promise<string>;
|
|
54
73
|
GetResourceIconClass(data: ResourceData): Promise<string>;
|
|
55
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<ArtifactResource, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-resource.component.d.ts","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/artifact-resource.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAY,QAAQ,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"artifact-resource.component.d.ts","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/artifact-resource.component.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAY,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,YAAY,EAA+B,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAuD,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;;AAKtH;;;;GAIG;AACH,qBAgCa,gBAAiB,SAAQ,qBAAqB;IACzD,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAkC;IACjE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAuC;IAEpE;;;;;;;;OAQG;IACG,oBAAoB,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAWvF,oDAAoD;IAC9C,oBAAoB,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhF,WAAW,EAAE,QAAQ,GAAG,IAAI,CAAQ;IAE3C,2CAA2C;IAC3C,IAAW,WAAW,IAAI,QAAQ,GAAG,IAAI,CAExC;IACD,2CAA2C;IAC3C,IAAW,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,IAAI,EAE5C;IACM,UAAU,EAAE,MAAM,CAAM;IACxB,aAAa,EAAE,MAAM,CAAM;IAElC,6CAA6C;IAC7C,IAAW,aAAa,IAAI,MAAM,CAEjC;IACD,6CAA6C;IAC7C,IAAW,aAAa,CAAC,KAAK,EAAE,MAAM,EAErC;IAED,QAAQ;IAoBR;;;;OAIG;IACG,kBAAkB,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAoB9F,kDAAkD;IAC5C,kBAAkB,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAI9F;;;OAGG;IACH,kBAAkB,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,YAAY,CAAA;KAAE,GAAG,IAAI;IAInF;;;OAGG;IACG,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAOlE,OAAO,CAAC,YAAY;IAKd,sBAAsB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAe3D,oBAAoB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;yCA5IpD,gBAAgB;2CAAhB,gBAAgB;CA+I5B"}
|
|
@@ -15,7 +15,7 @@ import * as i1 from "@memberjunction/ng-artifacts";
|
|
|
15
15
|
function ArtifactResource_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
16
16
|
const _r1 = i0.ɵɵgetCurrentView();
|
|
17
17
|
i0.ɵɵelementStart(0, "mj-artifact-viewer-panel", 2);
|
|
18
|
-
i0.ɵɵlistener("analyzeRequested", function ArtifactResource_Conditional_1_Template_mj_artifact_viewer_panel_analyzeRequested_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onAnalyzeRequested($event)); })("applyFormRequested", function ArtifactResource_Conditional_1_Template_mj_artifact_viewer_panel_applyFormRequested_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onApplyFormRequested($event)); });
|
|
18
|
+
i0.ɵɵlistener("analyzeRequested", function ArtifactResource_Conditional_1_Template_mj_artifact_viewer_panel_analyzeRequested_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onAnalyzeRequested($event)); })("applyFormRequested", function ArtifactResource_Conditional_1_Template_mj_artifact_viewer_panel_applyFormRequested_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onApplyFormRequested($event)); })("openEntityRecord", function ArtifactResource_Conditional_1_Template_mj_artifact_viewer_panel_openEntityRecord_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnOpenEntityRecord($event)); })("navigationRequest", function ArtifactResource_Conditional_1_Template_mj_artifact_viewer_panel_navigationRequest_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnNavigationRequest($event)); });
|
|
19
19
|
i0.ɵɵelementEnd();
|
|
20
20
|
} if (rf & 2) {
|
|
21
21
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
@@ -30,12 +30,17 @@ let ArtifactResource = class ArtifactResource extends BaseResourceComponent {
|
|
|
30
30
|
analyzeService = inject(AnalyzeArtifactService);
|
|
31
31
|
applyService = inject(InteractiveFormApplyService);
|
|
32
32
|
/**
|
|
33
|
-
* Apply-to-my-form handler — see InteractiveFormApplyService.
|
|
34
|
-
*
|
|
35
|
-
*
|
|
33
|
+
* Apply-to-my-form handler — see InteractiveFormApplyService. Routes a whole form to
|
|
34
|
+
* the override actions and a form panel to the contribution actions.
|
|
35
|
+
*
|
|
36
|
+
* When the agent context names an open record form (`AdditionalContext.Form`), the service
|
|
37
|
+
* reads that form's full composition from the `FormCompositionRegistry`, to validate a
|
|
38
|
+
* panel's placement and spot an installed contribution with the same key before writing
|
|
39
|
+
* anything.
|
|
36
40
|
*/
|
|
37
41
|
async OnApplyFormRequested(event) {
|
|
38
|
-
|
|
42
|
+
const additional = (this.navigationService.AppContextSnapshot$.value?.AdditionalContext ?? null);
|
|
43
|
+
await this.applyService.ConfirmAndApply(event.spec, event.entityName, this.ProviderToUse, additional?.Form ?? null);
|
|
39
44
|
}
|
|
40
45
|
/** @deprecated Use {@link OnApplyFormRequested}. */
|
|
41
46
|
async onApplyFormRequested(event) {
|
|
@@ -104,6 +109,27 @@ let ArtifactResource = class ArtifactResource extends BaseResourceComponent {
|
|
|
104
109
|
async onAnalyzeRequested(event) {
|
|
105
110
|
return this.OnAnalyzeRequested(event);
|
|
106
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Opens an entity record requested by the artifact, e.g. an interactive component's
|
|
114
|
+
* OpenEntityRecord callback. Without this, record links in a standalone artifact tab do nothing.
|
|
115
|
+
*/
|
|
116
|
+
OnOpenEntityRecord(event) {
|
|
117
|
+
this.navigationService.OpenEntityRecord(event.entityName, event.compositeKey);
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Handles app-level navigation requested by an artifact viewer plugin.
|
|
121
|
+
* Opens the target nav item (switching apps if needed) then applies query params to the URL.
|
|
122
|
+
*/
|
|
123
|
+
async OnNavigationRequest(event) {
|
|
124
|
+
const appId = event.appName ? this.resolveAppID(event.appName) : undefined;
|
|
125
|
+
await this.navigationService.OpenNavItemByName(event.navItemName, undefined, appId, {
|
|
126
|
+
queryParams: event.queryParams
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
resolveAppID(appName) {
|
|
130
|
+
const app = this.ProviderToUse.Applications.find(a => a.Name.toLowerCase() === appName.toLowerCase());
|
|
131
|
+
return app?.ID;
|
|
132
|
+
}
|
|
107
133
|
async GetResourceDisplayName(data) {
|
|
108
134
|
// Try to load artifact name from database
|
|
109
135
|
if (data.ResourceRecordID) {
|
|
@@ -123,7 +149,7 @@ let ArtifactResource = class ArtifactResource extends BaseResourceComponent {
|
|
|
123
149
|
return 'fa-solid fa-file-code';
|
|
124
150
|
}
|
|
125
151
|
static ɵfac = /*@__PURE__*/ (() => { let ɵArtifactResource_BaseFactory; return function ArtifactResource_Factory(__ngFactoryType__) { return (ɵArtifactResource_BaseFactory || (ɵArtifactResource_BaseFactory = i0.ɵɵgetInheritedFactory(ArtifactResource)))(__ngFactoryType__ || ArtifactResource); }; })();
|
|
126
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ArtifactResource, selectors: [["mj-artifact-resource"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 1, consts: [[1, "artifact-container"], [3, "artifactId", "currentUser", "environmentId", "showSaveToCollection", "canShare", "canEdit"], [3, "analyzeRequested", "applyFormRequested", "artifactId", "currentUser", "environmentId", "showSaveToCollection", "canShare", "canEdit"]], template: function ArtifactResource_Template(rf, ctx) { if (rf & 1) {
|
|
152
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ArtifactResource, selectors: [["mj-artifact-resource"]], standalone: false, features: [i0.ɵɵInheritDefinitionFeature], decls: 2, vars: 1, consts: [[1, "artifact-container"], [3, "artifactId", "currentUser", "environmentId", "showSaveToCollection", "canShare", "canEdit"], [3, "analyzeRequested", "applyFormRequested", "openEntityRecord", "navigationRequest", "artifactId", "currentUser", "environmentId", "showSaveToCollection", "canShare", "canEdit"]], template: function ArtifactResource_Template(rf, ctx) { if (rf & 1) {
|
|
127
153
|
i0.ɵɵelementStart(0, "div", 0);
|
|
128
154
|
i0.ɵɵconditionalCreate(1, ArtifactResource_Conditional_1_Template, 1, 6, "mj-artifact-viewer-panel", 1);
|
|
129
155
|
i0.ɵɵelementEnd();
|
|
@@ -149,11 +175,13 @@ export { ArtifactResource };
|
|
|
149
175
|
[canShare]="true"
|
|
150
176
|
[canEdit]="true"
|
|
151
177
|
(analyzeRequested)="onAnalyzeRequested($event)"
|
|
152
|
-
(applyFormRequested)="onApplyFormRequested($event)"
|
|
178
|
+
(applyFormRequested)="onApplyFormRequested($event)"
|
|
179
|
+
(openEntityRecord)="OnOpenEntityRecord($event)"
|
|
180
|
+
(navigationRequest)="OnNavigationRequest($event)">
|
|
153
181
|
</mj-artifact-viewer-panel>
|
|
154
182
|
}
|
|
155
183
|
</div>
|
|
156
184
|
`, encapsulation: ViewEncapsulation.None, styles: ["\n .artifact-container {\n display: flex;\n width: 100%;\n height: 100%;\n overflow: hidden;\n }\n "] }]
|
|
157
185
|
}], null, null); })();
|
|
158
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ArtifactResource, { className: "ArtifactResource", filePath: "src/lib/resource-wrappers/artifact-resource.component.ts", lineNumber:
|
|
186
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ArtifactResource, { className: "ArtifactResource", filePath: "src/lib/resource-wrappers/artifact-resource.component.ts", lineNumber: 48 }); })();
|
|
159
187
|
//# sourceMappingURL=artifact-resource.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifact-resource.component.js","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/artifact-resource.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAgB,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,2BAA2B,EAAE,MAAM,8BAA8B,CAAC;AAEnG,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;IAcjE,mDAQsD;IAApD,AADA,kOAAoB,iCAA0B,KAAC,yNACzB,mCAA4B,KAAC;IACrD,iBAA2B;;;IAHzB,AADA,AADA,AADA,AADA,AADA,8CAAyB,mCACE,uCACI,8BACF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C7C,0CAA0C;QAC1C,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,IAAI,CAAC;gBACH,MAAM,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC;gBAC9B,MAAM,QAAQ,GAAG,MAAM,EAAE,CAAC,eAAe,CAAM,4BAA4B,CAAC,CAAC;gBAC7E,MAAM,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;gBAC3C,OAAO,QAAQ,CAAC,IAAI,IAAI,cAAc,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAChE,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;YACvD,CAAC;QACH,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,oBAAoB,CAAC,IAAkB;QAC3C,OAAO,uBAAuB,CAAC;IACjC,CAAC;6OA/GU,gBAAgB,yBAAhB,gBAAgB;6DAAhB,gBAAgB;YAzBzB,8BAAgC;YAC9B,uGAAiC;YAYnC,iBAAM;;YAZJ,cAWC;YAXD,4DAWC;;;AAaM,gBAAgB;IA9B5B,aAAa,CAAC,qBAAqB,EAAE,kBAAkB,CAAC;GA8B5C,gBAAgB,CAgH5B;;iFAhHY,gBAAgB;cA7B5B,SAAS;6BACI,KAAK,YACP,sBAAsB,YACtB;;;;;;;;;;;;;;;KAeP,iBASY,iBAAiB,CAAC,IAAI;;kFAE1B,gBAAgB","sourcesContent":["import { Component, ViewEncapsulation, inject } from '@angular/core';\nimport { DataSnapshot, Metadata, UserInfo } from '@memberjunction/core';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseResourceComponent } from '@memberjunction/ng-shared';\nimport { ResourceData, MJEnvironmentEntityExtended } from '@memberjunction/core-entities';\nimport { AnalyzeArtifactService, InteractiveFormApplyService } from '@memberjunction/ng-artifacts';\nimport type { ComponentSpec } from '@memberjunction/interactive-component-types';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\n\n/**\n * Artifact Resource - displays versioned content artifacts\n * Wraps the artifact-viewer-panel component for tab-based display\n * Supports reports, dashboards, forms, and other artifact types\n */\n@RegisterClass(BaseResourceComponent, 'ArtifactResource')\n@Component({\n standalone: false,\n selector: 'mj-artifact-resource',\n template: `\n <div class=\"artifact-container\">\n @if (currentUser && artifactId) {\n <mj-artifact-viewer-panel\n [artifactId]=\"artifactId\"\n [currentUser]=\"currentUser\"\n [environmentId]=\"environmentId\"\n [showSaveToCollection]=\"true\"\n [canShare]=\"true\"\n [canEdit]=\"true\"\n (analyzeRequested)=\"onAnalyzeRequested($event)\"\n (applyFormRequested)=\"onApplyFormRequested($event)\">\n </mj-artifact-viewer-panel>\n }\n </div>\n `,\n styles: [`\n .artifact-container {\n display: flex;\n width: 100%;\n height: 100%;\n overflow: hidden;\n }\n `],\n encapsulation: ViewEncapsulation.None\n})\nexport class ArtifactResource extends BaseResourceComponent {\n private readonly analyzeService = inject(AnalyzeArtifactService);\n private readonly applyService = inject(InteractiveFormApplyService);\n\n /**\n * Apply-to-my-form handler — see InteractiveFormApplyService.\n * Confirms with the user, then routes to Create or Modify depending on\n * whether an Active override already exists for this entity+user.\n */\n async OnApplyFormRequested(event: { spec: unknown; entityName: string }): Promise<void> {\n await this.applyService.ConfirmAndApply(\n event.spec as ComponentSpec,\n event.entityName,\n this.ProviderToUse,\n );\n }\n\n /** @deprecated Use {@link OnApplyFormRequested}. */\n async onApplyFormRequested(event: { spec: unknown; entityName: string }): Promise<void> {\n return this.OnApplyFormRequested(event);\n }\n\n public CurrentUser: UserInfo | null = null;\n\n /** @deprecated Use {@link CurrentUser}. */\n public get currentUser(): UserInfo | null {\n return this.CurrentUser;\n }\n /** @deprecated Use {@link CurrentUser}. */\n public set currentUser(value: UserInfo | null) {\n this.CurrentUser = value;\n }\n public artifactId: string = '';\n public EnvironmentId: string = '';\n\n /** @deprecated Use {@link EnvironmentId}. */\n public get environmentId(): string {\n return this.EnvironmentId;\n }\n /** @deprecated Use {@link EnvironmentId}. */\n public set environmentId(value: string) {\n this.EnvironmentId = value;\n }\n\n ngOnInit() {\n super.ngOnInit();\n const md = this.ProviderToUse;\n this.CurrentUser = md.CurrentUser;\n\n // Get artifact ID from resource data\n if (this.Data && this.Data.ResourceRecordID) {\n this.artifactId = this.Data.ResourceRecordID;\n }\n\n // Environment ID — use the configured environment if present, otherwise\n // fall back to the default environment. Must be a valid UUID since\n // downstream saves (e.g. AnalyzeArtifactService creating artifacts)\n // require a non-empty EnvironmentID.\n this.EnvironmentId = (this.Data?.Configuration?.['environmentId'] as string | undefined)\n || MJEnvironmentEntityExtended.DefaultEnvironmentID;\n\n setTimeout(() => this.NotifyLoadComplete(), 100);\n }\n\n /**\n * Handler for the Analyze button on the artifact viewer panel.\n * Creates a Data Snapshot artifact from the live viewer state, opens a\n * new conversation with it attached as input, and routes the user there.\n */\n async OnAnalyzeRequested(event: { artifactId: string; snapshot: DataSnapshot }): Promise<void> {\n if (!this.CurrentUser) return;\n\n try {\n const result = await this.analyzeService.StartAnalysisConversation({\n snapshot: event.snapshot,\n currentUser: this.CurrentUser,\n environmentId: this.EnvironmentId,\n });\n\n // Route to the new conversation in the Conversations nav item\n await this.navigationService.OpenNavItemByName('Conversations', {\n conversationId: result.conversationId,\n });\n } catch (error) {\n const message = error instanceof Error ? error.message : 'Failed to start analysis conversation';\n MJNotificationService.Instance.CreateSimpleNotification(message, 'error', 5000);\n }\n }\n\n /** @deprecated Use {@link OnAnalyzeRequested}. */\n async onAnalyzeRequested(event: { artifactId: string; snapshot: DataSnapshot }): Promise<void> {\n return this.OnAnalyzeRequested(event);\n }\n\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n // Try to load artifact name from database\n if (data.ResourceRecordID) {\n try {\n const md = this.ProviderToUse;\n const artifact = await md.GetEntityObject<any>('MJ: Conversation Artifacts');\n await artifact.Load(data.ResourceRecordID);\n return artifact.Name || `Artifact - ${data.ResourceRecordID}`;\n } catch (error) {\n console.error('Error loading artifact name:', error);\n }\n }\n return 'Artifact';\n }\n\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return 'fa-solid fa-file-code';\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"artifact-resource.component.js","sourceRoot":"","sources":["../../../src/lib/resource-wrappers/artifact-resource.component.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAErE,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAgB,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,2BAA2B,EAAqB,MAAM,8BAA8B,CAAC;AAGtH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;;;;;IAcjE,mDAUoD;IAAlD,AADA,AADA,AADA,kOAAoB,iCAA0B,KAAC,yNACzB,mCAA4B,KAAC,qNAC/B,iCAA0B,KAAC,uNAC1B,kCAA2B,KAAC;IACnD,iBAA2B;;;IALzB,AADA,AADA,AADA,AADA,AADA,8CAAyB,mCACE,uCACI,8BACF,kBACZ,iBACD;;AAlB1B;;;;GAIG;AAiCI,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,qBAAqB;IACxC,cAAc,GAAG,MAAM,CAAC,sBAAsB,CAAC,CAAC;IAChD,YAAY,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;IAEpE;;;;;;;;OAQG;IACH,KAAK,CAAC,oBAAoB,CAAC,KAA4C;QACrE,MAAM,UAAU,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,KAAK,EAAE,iBAAiB,IAAI,IAAI,CAC3D,CAAC;QACrC,MAAM,IAAI,CAAC,YAAY,CAAC,eAAe,CACrC,KAAK,CAAC,IAAqB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CAAC,qBAAqB,EAAE,kBAAkB,CAAC;GAgC5C,gBAAgB,CA+I5B;;iFA/IY,gBAAgB;cA/B5B,SAAS;6BACI,KAAK,YACP,sBAAsB,YACtB;;;;;;;;;;;;;;;;;KAiBP,iBASY,iBAAiB,CAAC,IAAI;;kFAE1B,gBAAgB","sourcesContent":["import { Component, ViewEncapsulation, inject } from '@angular/core';\nimport { CompositeKey, DataSnapshot, Metadata, UserInfo } from '@memberjunction/core';\nimport { RegisterClass } from '@memberjunction/global';\nimport { BaseResourceComponent } from '@memberjunction/ng-shared';\nimport { ResourceData, MJEnvironmentEntityExtended } from '@memberjunction/core-entities';\nimport { AnalyzeArtifactService, InteractiveFormApplyService, NavigationRequest } from '@memberjunction/ng-artifacts';\nimport type { ComponentSpec } from '@memberjunction/interactive-component-types';\nimport type { FormAgentContext } from '@memberjunction/ng-base-forms';\nimport { MJNotificationService } from '@memberjunction/ng-notifications';\n\n/**\n * Artifact Resource - displays versioned content artifacts\n * Wraps the artifact-viewer-panel component for tab-based display\n * Supports reports, dashboards, forms, and other artifact types\n */\n@RegisterClass(BaseResourceComponent, 'ArtifactResource')\n@Component({\n standalone: false,\n selector: 'mj-artifact-resource',\n template: `\n <div class=\"artifact-container\">\n @if (currentUser && artifactId) {\n <mj-artifact-viewer-panel\n [artifactId]=\"artifactId\"\n [currentUser]=\"currentUser\"\n [environmentId]=\"environmentId\"\n [showSaveToCollection]=\"true\"\n [canShare]=\"true\"\n [canEdit]=\"true\"\n (analyzeRequested)=\"onAnalyzeRequested($event)\"\n (applyFormRequested)=\"onApplyFormRequested($event)\"\n (openEntityRecord)=\"OnOpenEntityRecord($event)\"\n (navigationRequest)=\"OnNavigationRequest($event)\">\n </mj-artifact-viewer-panel>\n }\n </div>\n `,\n styles: [`\n .artifact-container {\n display: flex;\n width: 100%;\n height: 100%;\n overflow: hidden;\n }\n `],\n encapsulation: ViewEncapsulation.None\n})\nexport class ArtifactResource extends BaseResourceComponent {\n private readonly analyzeService = inject(AnalyzeArtifactService);\n private readonly applyService = inject(InteractiveFormApplyService);\n\n /**\n * Apply-to-my-form handler — see InteractiveFormApplyService. Routes a whole form to\n * the override actions and a form panel to the contribution actions.\n *\n * When the agent context names an open record form (`AdditionalContext.Form`), the service\n * reads that form's full composition from the `FormCompositionRegistry`, to validate a\n * panel's placement and spot an installed contribution with the same key before writing\n * anything.\n */\n async OnApplyFormRequested(event: { spec: unknown; entityName: string }): Promise<void> {\n const additional = (this.navigationService.AppContextSnapshot$.value?.AdditionalContext ?? null) as\n { Form?: FormAgentContext } | null;\n await this.applyService.ConfirmAndApply(\n event.spec as ComponentSpec,\n event.entityName,\n this.ProviderToUse,\n additional?.Form ?? null,\n );\n }\n\n /** @deprecated Use {@link OnApplyFormRequested}. */\n async onApplyFormRequested(event: { spec: unknown; entityName: string }): Promise<void> {\n return this.OnApplyFormRequested(event);\n }\n\n public CurrentUser: UserInfo | null = null;\n\n /** @deprecated Use {@link CurrentUser}. */\n public get currentUser(): UserInfo | null {\n return this.CurrentUser;\n }\n /** @deprecated Use {@link CurrentUser}. */\n public set currentUser(value: UserInfo | null) {\n this.CurrentUser = value;\n }\n public artifactId: string = '';\n public EnvironmentId: string = '';\n\n /** @deprecated Use {@link EnvironmentId}. */\n public get environmentId(): string {\n return this.EnvironmentId;\n }\n /** @deprecated Use {@link EnvironmentId}. */\n public set environmentId(value: string) {\n this.EnvironmentId = value;\n }\n\n ngOnInit() {\n super.ngOnInit();\n const md = this.ProviderToUse;\n this.CurrentUser = md.CurrentUser;\n\n // Get artifact ID from resource data\n if (this.Data && this.Data.ResourceRecordID) {\n this.artifactId = this.Data.ResourceRecordID;\n }\n\n // Environment ID — use the configured environment if present, otherwise\n // fall back to the default environment. Must be a valid UUID since\n // downstream saves (e.g. AnalyzeArtifactService creating artifacts)\n // require a non-empty EnvironmentID.\n this.EnvironmentId = (this.Data?.Configuration?.['environmentId'] as string | undefined)\n || MJEnvironmentEntityExtended.DefaultEnvironmentID;\n\n setTimeout(() => this.NotifyLoadComplete(), 100);\n }\n\n /**\n * Handler for the Analyze button on the artifact viewer panel.\n * Creates a Data Snapshot artifact from the live viewer state, opens a\n * new conversation with it attached as input, and routes the user there.\n */\n async OnAnalyzeRequested(event: { artifactId: string; snapshot: DataSnapshot }): Promise<void> {\n if (!this.CurrentUser) return;\n\n try {\n const result = await this.analyzeService.StartAnalysisConversation({\n snapshot: event.snapshot,\n currentUser: this.CurrentUser,\n environmentId: this.EnvironmentId,\n });\n\n // Route to the new conversation in the Conversations nav item\n await this.navigationService.OpenNavItemByName('Conversations', {\n conversationId: result.conversationId,\n });\n } catch (error) {\n const message = error instanceof Error ? error.message : 'Failed to start analysis conversation';\n MJNotificationService.Instance.CreateSimpleNotification(message, 'error', 5000);\n }\n }\n\n /** @deprecated Use {@link OnAnalyzeRequested}. */\n async onAnalyzeRequested(event: { artifactId: string; snapshot: DataSnapshot }): Promise<void> {\n return this.OnAnalyzeRequested(event);\n }\n\n /**\n * Opens an entity record requested by the artifact, e.g. an interactive component's\n * OpenEntityRecord callback. Without this, record links in a standalone artifact tab do nothing.\n */\n OnOpenEntityRecord(event: { entityName: string; compositeKey: CompositeKey }): void {\n this.navigationService.OpenEntityRecord(event.entityName, event.compositeKey);\n }\n\n /**\n * Handles app-level navigation requested by an artifact viewer plugin.\n * Opens the target nav item (switching apps if needed) then applies query params to the URL.\n */\n async OnNavigationRequest(event: NavigationRequest): Promise<void> {\n const appId = event.appName ? this.resolveAppID(event.appName) : undefined;\n await this.navigationService.OpenNavItemByName(event.navItemName, undefined, appId, {\n queryParams: event.queryParams\n });\n }\n\n private resolveAppID(appName: string): string | undefined {\n const app = this.ProviderToUse.Applications.find(a => a.Name.toLowerCase() === appName.toLowerCase());\n return app?.ID;\n }\n\n async GetResourceDisplayName(data: ResourceData): Promise<string> {\n // Try to load artifact name from database\n if (data.ResourceRecordID) {\n try {\n const md = this.ProviderToUse;\n const artifact = await md.GetEntityObject<any>('MJ: Conversation Artifacts');\n await artifact.Load(data.ResourceRecordID);\n return artifact.Name || `Artifact - ${data.ResourceRecordID}`;\n } catch (error) {\n console.error('Error loading artifact name:', error);\n }\n }\n return 'Artifact';\n }\n\n async GetResourceIconClass(data: ResourceData): Promise<string> {\n return 'fa-solid fa-file-code';\n }\n}\n"]}
|
|
@@ -54,11 +54,6 @@ export declare class ChatConversationsResource extends BaseResourceComponent imp
|
|
|
54
54
|
get selectedConversation(): MJConversationEntity | null;
|
|
55
55
|
/** @deprecated Use {@link SelectedConversation}. */
|
|
56
56
|
set selectedConversation(value: MJConversationEntity | null);
|
|
57
|
-
SelectedThreadId: string | null;
|
|
58
|
-
/** @deprecated Use {@link SelectedThreadId}. */
|
|
59
|
-
get selectedThreadId(): string | null;
|
|
60
|
-
/** @deprecated Use {@link SelectedThreadId}. */
|
|
61
|
-
set selectedThreadId(value: string | null);
|
|
62
57
|
IsNewUnsavedConversation: boolean;
|
|
63
58
|
/** @deprecated Use {@link IsNewUnsavedConversation}. */
|
|
64
59
|
get isNewUnsavedConversation(): boolean;
|
|
@@ -346,18 +341,6 @@ export declare class ChatConversationsResource extends BaseResourceComponent imp
|
|
|
346
341
|
name: string;
|
|
347
342
|
description: string;
|
|
348
343
|
}): void;
|
|
349
|
-
/**
|
|
350
|
-
* Handle thread opened event
|
|
351
|
-
*/
|
|
352
|
-
OnThreadOpened(threadId: string): void;
|
|
353
|
-
/** @deprecated Use {@link OnThreadOpened}. */
|
|
354
|
-
onThreadOpened(threadId: string): void;
|
|
355
|
-
/**
|
|
356
|
-
* Handle thread closed event
|
|
357
|
-
*/
|
|
358
|
-
OnThreadClosed(): void;
|
|
359
|
-
/** @deprecated Use {@link OnThreadClosed}. */
|
|
360
|
-
onThreadClosed(): void;
|
|
361
344
|
/**
|
|
362
345
|
* Handle pending artifact consumed event
|
|
363
346
|
*/
|
|
@@ -419,9 +402,15 @@ export declare class ChatConversationsResource extends BaseResourceComponent imp
|
|
|
419
402
|
*
|
|
420
403
|
* Explorer renders each chat surface as a separate resource, so results for another
|
|
421
404
|
* surface go through NavigationService. Conversations and messages resolve to a
|
|
422
|
-
* conversation, which this component owns, so they are selected in place
|
|
405
|
+
* conversation, which this component owns, so they are selected in place; a message then
|
|
406
|
+
* opens on its branch at its sequence.
|
|
423
407
|
*/
|
|
424
408
|
OnSearchResultSelected(result: SearchResult): void;
|
|
409
|
+
/**
|
|
410
|
+
* Selects the message's conversation, renders it into the chat area, then has the chat area
|
|
411
|
+
* switch to the message's branch and scroll to it.
|
|
412
|
+
*/
|
|
413
|
+
private openMessageResult;
|
|
425
414
|
/** @deprecated Use {@link OnOpenEntityRecord}. */
|
|
426
415
|
onOpenEntityRecord(event: {
|
|
427
416
|
entityName: string;
|