@liquid-js/lyr-core 22.0.0-alpha.1 → 22.0.0-alpha.3

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.
Files changed (29) hide show
  1. package/components/accordion/accordion-item-body.component.html +7 -0
  2. package/components/accordion/accordion-item-body.component.scss +4 -0
  3. package/components/file-drop/file-drop.component.scss +5 -1
  4. package/components/menu/menu-item.component.html +16 -14
  5. package/fesm2022/liquid-js-lyr-core-accordion.mjs +83 -14
  6. package/fesm2022/liquid-js-lyr-core-accordion.mjs.map +1 -1
  7. package/fesm2022/liquid-js-lyr-core-base.mjs +38 -2
  8. package/fesm2022/liquid-js-lyr-core-base.mjs.map +1 -1
  9. package/fesm2022/liquid-js-lyr-core-chat.mjs +1 -1
  10. package/fesm2022/liquid-js-lyr-core-chat.mjs.map +1 -1
  11. package/fesm2022/liquid-js-lyr-core-context-menu.mjs +1 -0
  12. package/fesm2022/liquid-js-lyr-core-context-menu.mjs.map +1 -1
  13. package/fesm2022/liquid-js-lyr-core-dialog.mjs +13 -4
  14. package/fesm2022/liquid-js-lyr-core-dialog.mjs.map +1 -1
  15. package/fesm2022/liquid-js-lyr-core-file-drop.mjs +2 -2
  16. package/fesm2022/liquid-js-lyr-core-file-drop.mjs.map +1 -1
  17. package/fesm2022/liquid-js-lyr-core-form-field.mjs +1 -1
  18. package/fesm2022/liquid-js-lyr-core-form-field.mjs.map +1 -1
  19. package/fesm2022/liquid-js-lyr-core-menu.mjs +52 -4
  20. package/fesm2022/liquid-js-lyr-core-menu.mjs.map +1 -1
  21. package/package.json +1 -1
  22. package/schematics/ng-add/index.js +2 -2
  23. package/schematics/util/package.js +10 -1
  24. package/types/liquid-js-lyr-core-accordion.d.ts +28 -3
  25. package/types/liquid-js-lyr-core-base.d.ts +5 -3
  26. package/types/liquid-js-lyr-core-button.d.ts +1 -1
  27. package/types/liquid-js-lyr-core-dialog.d.ts +11 -4
  28. package/types/liquid-js-lyr-core-menu.d.ts +42 -1
  29. package/types/liquid-js-lyr-core-select.d.ts +3 -3
@@ -1486,7 +1486,7 @@ var NbChatFormComponent = class NbChatFormComponent {
1486
1486
  observer.observe(button);
1487
1487
  onCleanup(() => {
1488
1488
  observer.disconnect();
1489
- row.style.removeProperty("--nb-chat-send-width");
1489
+ if (!row.contains(button)) row.style.removeProperty("--nb-chat-send-width");
1490
1490
  });
1491
1491
  });
1492
1492
  if (typeof CSS === "undefined" || CSS.supports("field-sizing", "content")) return;
@@ -1 +1 @@
1
- {"version":3,"file":"liquid-js-lyr-core-chat.mjs","names":["convertToBoolProperty","convertToBoolProperty","convertToBoolProperty","isComposing","convertToBoolProperty"],"sources":["../../../packages/core/src/components/chat/chat-form-ref.ts","../../../packages/core/src/components/chat/chat-message-text.component.ts","../../../packages/core/src/components/chat/chat-message-text.component.html","../../../packages/core/src/components/chat/chat-message-file.component.ts","../../../packages/core/src/components/chat/chat-message-file.component.html","../../../packages/core/src/components/chat/chat-custom-message.service.ts","../../../packages/core/src/components/chat/chat-state.ts","../../../packages/core/src/components/chat/chat-avatar.component.ts","../../../packages/core/src/components/chat/chat-avatar.component.html","../../../packages/core/src/components/chat/chat-message-quote.component.ts","../../../packages/core/src/components/chat/chat-message-quote.component.html","../../../packages/core/src/components/chat/chat.options.ts","../../../packages/core/src/components/chat/chat-message-map.component.ts","../../../packages/core/src/components/chat/chat-message-map.component.html","../../../packages/core/src/components/chat/chat-message.component.ts","../../../packages/core/src/components/chat/chat-message.component.html","../../../packages/core/src/components/chat/chat-title.directive.ts","../../../packages/core/src/components/chat/chat.component.ts","../../../packages/core/src/components/chat/chat.component.html","../../../packages/core/src/components/chat/chat-form.component.ts","../../../packages/core/src/components/chat/chat-form.component.html","../../../packages/core/src/components/chat/chat-custom-message.directive.ts","../../../packages/core/src/components/chat/chat.module.ts"],"sourcesContent":["import { NbComponentOrCustomStatus } from '@liquid-js/lyr-core/base'\n\n/**\n * An `nb-chat-form`, for the chat it's in, which gives it its status. Querying this instead of the form component keeps\n * the form's code out of an app whose chats only show messages.\n */\nexport abstract class NbChatFormRef {\n abstract setStatus(status: NbComponentOrCustomStatus): void\n}\n","import { Component, input } from '@angular/core'\nimport { DatePipe } from '@angular/common'\n\n/**\n * The text of a message, with its sender and time.\n */\n@Component({\n selector: 'nb-chat-message-text',\n templateUrl: './chat-message-text.component.html',\n imports: [DatePipe]\n})\nexport class NbChatMessageTextComponent {\n\n /**\n * The sender's name.\n */\n readonly sender = input<string>()\n\n /**\n * The message text.\n */\n readonly message = input<string>()\n\n /**\n * When the message was sent.\n */\n readonly date = input<Date>()\n\n /**\n * `DatePipe` format of the date; `shortTime` by default.\n */\n readonly dateFormat = input<string>('shortTime')\n\n}\n","@if (sender() || date()) {\n<p class=\"sender\"><span dir=\"auto\">{{ sender() }}</span>&ngsp;<time>{{ date() | date: dateFormat() }}</time></p>\n}\n@if (message()) {\n<!-- The bubble sits by the page's direction; its text aligns by its own. -->\n<p class=\"text\"\n dir=\"auto\">{{ message() }}</p>\n}\n","import { Component, computed, inject, input } from '@angular/core'\nimport { DomSanitizer } from '@angular/platform-browser'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NbChatMessageTextComponent } from './chat-message-text.component'\n\nexport interface NbChatMessageFileIconPreview {\n url: string\n icon: string\n /** Accessible name of the file link, the file name from the URL by default. */\n name?: string\n}\nexport interface NbChatMessageFileImagePreview {\n url: string\n type: string\n /** Accessible name of the file link, the file name from the URL by default. */\n name?: string\n}\nexport type NbChatMessageFile = NbChatMessageFileIconPreview | NbChatMessageFileImagePreview\n\n/**\n * A `file` message: its text, and each file as a link, images as previews and other files with their icon.\n */\n@Component({\n selector: 'nb-chat-message-file',\n templateUrl: './chat-message-file.component.html',\n imports: [NbChatMessageTextComponent, NbIconComponent]\n})\nexport class NbChatMessageFileComponent {\n protected readonly domSanitizer = inject(DomSanitizer)\n\n /**\n * The message text.\n */\n readonly message = input<string>()\n\n /**\n * The sender's name.\n */\n readonly sender = input<string>()\n\n /**\n * When the message was sent.\n */\n readonly date = input<Date>()\n\n /**\n * `DatePipe` format of the date; `shortTime` by default.\n */\n readonly dateFormat = input<string>('shortTime')\n\n /**\n * The files: `{ url, type }` for an image shown as a preview, `{ url, icon }` for another file.\n */\n readonly files = input<NbChatMessageFile[]>()\n\n readonly readyFiles = computed(() =>\n (this.files() || []).map((file) => {\n const isImage = this.isImage(file)\n return {\n ...file,\n icon: 'icon' in file ? file.icon : undefined,\n urlStyle: isImage && this.domSanitizer.bypassSecurityTrustStyle(`url(${file.url})`),\n isImage,\n name: file.name ?? this.getFileName(file.url)\n }\n })\n )\n\n protected getFileName(url: string): string {\n const path = (url ?? '').split(/[?#]/)[0]\n const name = path.slice(path.lastIndexOf('/') + 1)\n try {\n return decodeURIComponent(name) || url\n } catch {\n return name || url\n }\n }\n\n isImage(file: NbChatMessageFile): boolean {\n const type = 'type' in file ? file.type : undefined\n if (type) {\n return ['image/png', 'image/jpeg', 'image/gif', 'image/webp', 'image/avif', 'image/svg+xml'].includes(type)\n }\n return false\n }\n}\n","<nb-chat-message-text [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\"\n [message]=\"message()\">\n {{ message() }}\n</nb-chat-message-text>\n\n@if (readyFiles()?.length > 1) {\n<div class=\"message-content-group\">\n @for (file of readyFiles(); track file) {\n <a [href]=\"file.url\"\n target=\"_blank\"\n [attr.aria-label]=\"file.name\">\n @if (!file.urlStyle && file.icon) {\n <nb-icon [icon]=\"file.icon\" />\n }\n @if (file.urlStyle) {\n <div [style.background-image]=\"file.urlStyle\"></div>\n }\n </a>\n }\n</div>\n}\n\n@if (readyFiles()?.length === 1) {\n<a [href]=\"readyFiles()[0].url\"\n target=\"_blank\"\n [attr.aria-label]=\"readyFiles()[0].name\">\n @if (!readyFiles()[0].urlStyle && readyFiles()[0].icon) {\n <nb-icon [icon]=\"readyFiles()[0].icon\" />\n }\n @if (readyFiles()[0].urlStyle) {\n <div [style.background-image]=\"readyFiles()[0].urlStyle\"></div>\n }\n</a>\n}\n","import { Service } from '@angular/core'\n\nimport { NbChatCustomMessageDirective } from './chat-custom-message.directive'\n\n/**\n * Holds the `nbCustomMessage` templates declared in a chat, by message type.\n */\n@Service({ autoProvided: false })\nexport class NbChatCustomMessageService {\n protected readonly customMessages = new Map<string, NbChatCustomMessageDirective>()\n\n register(type: string, instance: NbChatCustomMessageDirective) {\n this.customMessages.set(type, instance)\n }\n\n unregister(type: string): boolean {\n return this.customMessages.delete(type)\n }\n\n getInstance(type: string): NbChatCustomMessageDirective | undefined {\n return this.customMessages.get(type)\n }\n}\n","import { Injectable, signal } from '@angular/core'\n\n/**\n * A chat's state its messages read: whether the chat has rendered its first messages, so only messages added after\n * them animate in.\n */\n@Injectable()\nexport class NbChatState {\n readonly settled = signal(false)\n}\n","import { Component, input } from '@angular/core'\nimport { SafeStyle } from '@angular/platform-browser'\n\n@Component({\n selector: 'nb-chat-avatar',\n templateUrl: './chat-avatar.component.html',\n host: {\n 'class': 'avatar',\n '[style.background-image]': 'avatarStyle()'\n }\n})\nexport class NbChatAvatarComponent {\n\n readonly initials = input<string>()\n\n readonly avatarStyle = input<SafeStyle>()\n}\n","@if (!avatarStyle()) {\n{{ initials() }}\n}\n","import { Component, input } from '@angular/core'\nimport { DatePipe } from '@angular/common'\nimport { NbChatMessageTextComponent } from './chat-message-text.component'\n\n/**\n * A `quote` message: the quoted text above the message's own.\n */\n@Component({\n selector: 'nb-chat-message-quote',\n templateUrl: './chat-message-quote.component.html',\n imports: [NbChatMessageTextComponent, DatePipe]\n})\nexport class NbChatMessageQuoteComponent {\n\n /**\n * The message text.\n */\n readonly message = input<string>()\n\n /**\n * The sender's name.\n */\n readonly sender = input<string>()\n\n /**\n * When the message was sent.\n */\n readonly date = input<Date>()\n\n /**\n * `DatePipe` format of the date; `shortTime` by default.\n */\n readonly dateFormat = input<string>('shortTime')\n\n /**\n * The quoted text.\n */\n readonly quote = input<string>()\n\n}\n","@if (sender() || date()) {\n<p class=\"sender\"><span dir=\"auto\">{{ sender() }}</span>&ngsp;<time>{{ date() | date: dateFormat() }}</time></p>\n}\n<p class=\"quote\"\n dir=\"auto\">{{ quote() }}</p>\n<nb-chat-message-text [message]=\"message()\">\n {{ message() }}\n</nb-chat-message-text>\n","export class NbChatOptions {\n messageGoogleMapKey?: string\n}\n","import { Component, inject, input } from '@angular/core'\nimport { NbChatOptions } from './chat.options'\nimport { NbChatMessageFileComponent } from './chat-message-file.component'\n\n/**\n * A `map` message: its text, and a static Google Maps picture of the location, which needs the `messageGoogleMapKey`\n * of `provideNbChat`.\n */\n@Component({\n selector: 'nb-chat-message-map',\n templateUrl: './chat-message-map.component.html',\n imports: [NbChatMessageFileComponent]\n})\nexport class NbChatMessageMapComponent {\n\n /**\n * The message text.\n */\n readonly message = input<string>()\n\n /**\n * The sender's name.\n */\n readonly sender = input<string>()\n\n /**\n * When the message was sent.\n */\n readonly date = input<Date>()\n\n /**\n * `DatePipe` format of the date; `shortTime` by default.\n */\n readonly dateFormat = input<string>('shortTime')\n\n /**\n * Latitude of the location.\n */\n readonly latitude = input<number>()\n\n /**\n * Longitude of the location.\n */\n readonly longitude = input<number>()\n\n get file() {\n return {\n\n url: `https://maps.googleapis.com/maps/api/staticmap?center=${this.latitude()},${this.longitude()}&zoom=12&size=400x400&key=${this.mapKey}`,\n type: 'image/png',\n icon: 'location'\n }\n }\n\n mapKey = inject(NbChatOptions, { optional: true })?.messageGoogleMapKey\n}\n","<nb-chat-message-file [files]=\"[file]\"\n [message]=\"message()\"\n [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\" />\n","import { Component, computed, inject, input, TemplateRef } from '@angular/core'\nimport { DomSanitizer, SafeStyle } from '@angular/platform-browser'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NgTemplateOutlet } from '@angular/common'\nimport { NbChatMessageFile, NbChatMessageFileComponent } from './chat-message-file.component'\nimport { NbChatCustomMessageService } from './chat-custom-message.service'\nimport { NbChatState } from './chat-state'\nimport { NbChatCustomMessageDirective } from './chat-custom-message.directive'\nimport { NbChatAvatarComponent } from './chat-avatar.component'\nimport { NbChatMessageQuoteComponent } from './chat-message-quote.component'\nimport { NbChatMessageMapComponent } from './chat-message-map.component'\nimport { NbChatMessageTextComponent } from './chat-message-text.component'\n\n/**\n * A message in an `nb-chat`, with its sender, time and avatar; a `reply` is the other side of the conversation.\n *\n * `type` sets what the message holds:\n * - `text` (default) - the message text\n * - `file` - `files`, images as previews and other files with an icon, grouped when there are several\n * - `quote` - a `quote` of another message above the text\n * - `map` - a Google Maps picture of `latitude` and `longitude`\n * - a custom type, rendered with the chat's `nbCustomMessage` template of that type\n *\n * @stacked-example(Available Types, chat/chat-message-types-showcase.component)\n *\n * Message with attached files:\n * ```html\n * <nb-chat-message\n * type=\"file\"\n * [files]=\"[ { url: '...' } ]\"\n * message=\"Hello world!\">\n * </nb-chat-message>\n * ```\n *\n * Map message:\n * ```html\n * <nb-chat-message\n * type=\"map\"\n * [latitude]=\"53.914\"\n * [longitude]=\"27.59\"\n * message=\"Here I am\">\n * </nb-chat-message>\n * ```\n * @styles\n *\n * chat-message-background:\n * chat-message-text-color:\n * chat-message-reply-background-color:\n * chat-message-reply-text-color:\n * chat-message-avatar-background-color:\n * chat-message-sender-text-color:\n * chat-message-quote-background-color:\n * chat-message-quote-text-color:\n * chat-message-file-text-color:\n * chat-message-file-background-color:\n */\n@Component({\n selector: 'nb-chat-message',\n templateUrl: './chat-message.component.html',\n styleUrls: ['./chat-message.component.scss'],\n imports: [\n NbChatAvatarComponent,\n NbChatMessageFileComponent,\n NbChatMessageQuoteComponent,\n NbChatMessageMapComponent,\n NbChatMessageTextComponent,\n NgTemplateOutlet\n ],\n host: {\n '[animate.enter]': 'enterAnimation',\n 'animate.leave': 'nb-chat-message-leave',\n '[class.reply]': 'reply()',\n '[class.not-reply]': 'notReply()'\n }\n})\nexport class NbChatMessageComponent {\n protected readonly domSanitizer = inject(DomSanitizer)\n protected readonly customMessageService = inject(NbChatCustomMessageService)\n private readonly chatState = inject(NbChatState, { optional: true })\n\n /** Animates in when it arrives in a chat that has rendered, not with the chat's first messages. */\n protected readonly enterAnimation = this.chatState?.settled() === false ? '' : 'nb-chat-message-enter'\n\n protected readonly builtInMessageTypes: string[] = ['text', 'file', 'map', 'quote']\n\n get _addReplyClass(): boolean {\n return this._areDefaultStylesEnabled() && this.reply()\n }\n\n get _addNotReplyClass(): boolean {\n return this._areDefaultStylesEnabled() && this.notReply()\n }\n\n get _addNoSpaceClass(): boolean {\n return this._areDefaultStylesEnabled() && !this.message()\n }\n\n readonly notReply = computed(() => !this.reply())\n\n /**\n * Marks a message from the other side of the conversation: aligned to the other edge, in the reply colours, without\n * an avatar.\n */\n readonly reply = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * The message text.\n */\n readonly message = input<string>()\n\n /**\n * The sender's name, shown with the message; its initials stand in for a missing `avatar`.\n */\n readonly sender = input<string>()\n\n /**\n * When the message was sent.\n */\n readonly date = input<Date>()\n\n /**\n * `DatePipe` format of the date; `shortTime` by default.\n */\n readonly dateFormat = input<string>('shortTime')\n\n /**\n * The files of a `file` message: `{ url, type }` for an image shown as a preview, `{ url, icon }` for another file.\n */\n readonly files = input<NbChatMessageFile[]>()\n\n /**\n * The quoted text of a `quote` message.\n */\n readonly quote = input<string>()\n\n /**\n * Latitude of a `map` message.\n */\n readonly latitude = input<number>()\n\n /**\n * Longitude of a `map` message.\n */\n readonly longitude = input<number>()\n\n /**\n * URL of the sender's picture, shown beside a message that isn't a `reply`.\n */\n readonly avatar = input<string>()\n\n readonly avatarStyle = computed<SafeStyle | undefined>(() => {\n const avatar = this.avatar()\n return avatar ? this.domSanitizer.bypassSecurityTrustStyle(`url(${avatar})`) : undefined\n })\n\n /**\n * Message type: `text` (default), `file`, `map`, `quote`, or a custom one with an `nbCustomMessage` template.\n */\n readonly type = input<string>()\n\n /**\n * What a custom message's template gets as its `$implicit` context.\n */\n readonly customMessageData = input<unknown>()\n\n getInitials(): string {\n const sender = this.sender()\n if (sender) {\n const names = sender.split(' ')\n return names\n .map((n) => n.charAt(0))\n .splice(0, 2)\n .join('')\n .toUpperCase()\n }\n return ''\n }\n\n _isBuiltInMessageType(): boolean {\n // Unset type defaults to \"text\" type\n const type = this.type()\n return type == null || this.builtInMessageTypes.includes(type)\n }\n\n _getTemplate(): TemplateRef<unknown> {\n const customMessage = this.getCustomMessage(this.type())\n return customMessage.templateRef\n }\n\n _getTemplateContext(): { $implicit: unknown, isReply: boolean } {\n return { $implicit: this.customMessageData(), isReply: this.reply() }\n }\n\n _areDefaultStylesEnabled(): boolean {\n const customMessageDirective = this.getCustomMessage(this.type())\n return !customMessageDirective.noStyles()\n }\n\n protected getCustomMessage(type?: string): NbChatCustomMessageDirective {\n const customMessageDirective = type ? this.customMessageService.getInstance(type) : undefined\n if (!customMessageDirective) {\n throw new Error(\n `nb-chat: Can't find template for custom type '${type}'. ` +\n `Make sure you provide it in the chat component with *nbCustomMessage='${type}'.`\n )\n }\n return customMessageDirective\n }\n}\n","@if (notReply()) {\n<nb-chat-avatar [initials]=\"getInitials()\"\n [avatarStyle]=\"avatarStyle()\" />\n}\n\n<div class=\"message\">\n @if (_isBuiltInMessageType()) {\n @switch (type()) {\n @case ('file') {\n <nb-chat-message-file [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\"\n [message]=\"message()\"\n [files]=\"files()\" />\n }\n @case ('quote') {\n <nb-chat-message-quote [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\"\n [message]=\"message()\"\n [quote]=\"quote()\" />\n }\n @case ('map') {\n <nb-chat-message-map [sender]=\"sender()\"\n [date]=\"date()\"\n [message]=\"message()\"\n [latitude]=\"latitude()\"\n [longitude]=\"longitude()\" />\n }\n @default {\n <nb-chat-message-text [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\"\n [message]=\"message()\" />\n }\n }\n } @else {\n <nb-chat-message-text [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\"\n [message]=\"message()\" />\n <div [class.nb-custom-message]=\"_areDefaultStylesEnabled()\"\n [class.nb-custom-message-no-space]=\"_addNoSpaceClass\"\n [class.nb-custom-message-reply]=\"_addReplyClass\"\n [class.nb-custom-message-not-reply]=\"_addNotReplyClass\"\n [class.nb-custom-message-full-width]=\"!_areDefaultStylesEnabled()\">\n <ng-container [ngTemplateOutlet]=\"_getTemplate()\"\n [ngTemplateOutletContext]=\"_getTemplateContext()\" />\n </div>\n }\n</div>\n","import { Directive, TemplateRef, inject, input } from '@angular/core'\n\n/**\n * A template for the chat's title, in place of its `title` text: `<ng-template nbChatTitle [context]=\"...\" let-data>`\n * in an `nb-chat`, which renders it with `context` as `$implicit`.\n */\n@Directive({ selector: '[nbChatTitle]' })\nexport class NbChatTitleDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef)\n\n /** The value the template gets as `$implicit`. */\n readonly context = input<object>({})\n}\n","import {\n afterNextRender,\n afterRenderEffect,\n Component,\n computed,\n contentChild,\n contentChildren,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n untracked,\n viewChild\n} from '@angular/core'\n\nimport { NbStatusService, injectNbDefaults, NbContainerAppearance, NbComponentSize, NbComponentOrCustomStatus, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, injectNbTexts, NbLocalize } from '@liquid-js/lyr-core/base'\nimport { NgTemplateOutlet } from '@angular/common'\nimport { NbChatFormRef } from './chat-form-ref'\nimport { NbChatMessageComponent } from './chat-message.component'\nimport { NbChatCustomMessageService } from './chat-custom-message.service'\nimport { NbChatState } from './chat-state'\nimport { NbChatTitleDirective } from './chat-title.directive'\n\n/** @internal */\ndeclare const $localize: NbLocalize\n\n/**\n * A chat: a titled list of messages with a form to send one.\n *\n * Main features:\n * - message types: text, files and images, quotes, maps, and custom ones with their own templates\n * - drag & drop and pasting of images and files, with previews\n * - statuses, sizes and appearances\n *\n * Here's a complete example built as a bot-like app. Type `help` to receive the different message types.\n *\n * @stacked-example(Showcase, chat/chat-showcase.component)\n *\n * The messages are a `log` region named by the title, which scrolls by keyboard, and new messages animate in and\n * scroll into view.\n *\n * Basic chat configuration and usage:\n * ```ts\n * <nb-chat title=\"Lyra Conversational UI\">\n * @for (msg of messages; track msg) {\n * <nb-chat-message [type]=\"msg.type\"\n * [message]=\"msg.text\"\n * [reply]=\"msg.reply\"\n * [sender]=\"msg.user.name\"\n * [date]=\"msg.date\"\n * [files]=\"msg.files\"\n * [quote]=\"msg.quote\"\n * [latitude]=\"msg.latitude\"\n * [longitude]=\"msg.longitude\"\n * [avatar]=\"msg.user.avatar\">\n * </nb-chat-message>\n * }\n *\n * <nb-chat-form (send)=\"sendMessage($event)\" dropFiles>\n * </nb-chat-form>\n * </nb-chat>\n * ```\n * ### Installation\n *\n * Import `NbChatComponent`, `NbChatMessageComponent`, `NbChatFormComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbChatComponent, NbChatMessageComponent, NbChatFormComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * and add `provideNbChat()` to the application providers:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideNbChat({ messageGoogleMapKey: 'MAP_KEY' })],\n * });\n * ```\n * In a lazy loaded route, add `provideNbChat()` to the route's `providers` instead, so the route gets its own instance.\n *\n * With NgModules:\n *\n * Import `NbChatModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbChatModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n *\n * If you need to provide an API key for a `map` message type (which is required by Google Maps)\n * you may use `NbChatModule.forRoot({ ... })` call if this is a global app configuration\n * or `NbChatModule.forChild({ ... })` for a feature module configuration:\n *\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbChatModule.forRoot({ messageGoogleMapKey: 'MAP_KEY' }),\n * ],\n * })\n * export class AppModule { }\n * ```\n *\n * ### Usage\n *\n * There are three main components:\n * ```ts\n * <nb-chat>\n * </nb-chat> // chat container\n *\n * <nb-chat-form>\n * </nb-chat-form> // chat form with drag&drop files feature\n *\n * <nb-chat-message>\n * </nb-chat-message> // chat message, available multiple types\n * ```\n *\n * An `nbChatTitle` template replaces the `title` text:\n * @stacked-example(Custom template as a title, chat/chat-template-title.component)\n *\n * A conversation between two users, with `reply` marking one side's messages:\n * @stacked-example(Conversation, chat/chat-conversation-showcase.component)\n *\n * `status` colours the header and the form:\n * @stacked-example(Colored Chat, chat/chat-colors.component)\n *\n * `size` gives the chat a fixed height:\n * @stacked-example(Chat Sizes, chat/chat-sizes.component)\n *\n * A chat looks like a card, to sit among them in a page. One that floats over the page, e.g. opened from a button in\n * a corner, has a shadow instead of a border with `appearance=\"floating\"`:\n * @stacked-example(Floating Chat, chat/chat-floating.component)\n *\n * # Custom message types\n *\n * Besides built-in message types, you could provide custom ones with their own template to render.\n * As an example, let's add the `link` message type.\n * <br>\n * First, you need to provide a template for the `link` message type:\n * ```html\n * <nb-chat>\n * <a *nbCustomMessage=\"'link'\" href=\"https://example.com\">example.com</a>\n * </nb-chat>\n * ```\n * Then, add the `nb-chat-message` component with the `link` type:\n * ```html\n * <nb-chat>\n * <a *nbCustomMessage=\"'link'\" href=\"https://example.com\">example.com</a>\n * <nb-chat-message type=\"link\"></nb-chat-message>\n * </nb-chat>\n * ```\n *\n * <div class=\"note note-warning\">\n * <div class=\"note-title\">Important!</div>\n * <div class=\"note-body\">\n * Custom chat messages must be defined before the `nb-chat-message`.\n * </div>\n * </div>\n *\n * Custom message templates could have arbitrary data associated with them. Let's extract hardcoded link\n * href and text. To pass some data to the custom message template, use the `customMessageData` input\n * of the `nb-chat-message` component:\n * ```html\n * ...\n * <nb-chat-message type=\"link\" [customMessageData]=\"{ href: 'https://example.com', text: 'example.com' }\">\n * </nb-chat-message>\n * ...\n * ```\n * When `customMessageData` is set, this object would become a template context and you'll be able\n * to reference it via `let varName` syntax:\n * ```html\n * <a *nbCustomMessage=\"'link'; let data\" [href]=\"data.href\">{{ data.text }}</a>\n * ```\n *\n * That's it, full example will look like this:\n * ```html\n * <nb-chat title=\"Lyra Conversational UI\">\n * <a *nbCustomMessage=\"'link'; let data\" [href]=\"data.href\">{{ data.text }}</a>\n * <nb-chat-message type=\"link\" [customMessageData]=\"{ href: 'https://example.com', text: 'example.com' }\">\n * </nb-chat-message>\n * </nb-chat>\n * ```\n *\n * If you want to style your custom template from the ground up you could turn off generic message styling\n * (such as round borders, color, background, etc.) via the `noStyles` input:\n * ```html\n * <div *nbCustomMessage=\"'my-custom-type'; noStyles: true\">...</div>\n * ```\n * When you decide to use your own styles, the `isReply` property of the custom message template context\n * would come in handy. This property allows you to determine whether the message is a reply or not.\n * For example, to change link text color (as replies have a different background):\n * ```html\n * <a *nbCustomMessage=\"'link'; let data; let isReply=isReply\"\n * [href]=\"data.href\"\n * [class.link-control]=\"!isReply\">\n * {{ data.label }}\n * </a>\n * ```\n *\n * Below, you could find a more complex example with multiple custom message types:\n * @stacked-example(Custom message, chat/chat-custom-message.component)\n * @styles\n *\n * chat-background-color:\n * chat-border-width:\n * chat-border-style:\n * chat-border-color:\n * chat-border-radius:\n * chat-shadow:\n * chat-floating-shadow:\n * chat-padding:\n * chat-scrollbar-color:\n * chat-scrollbar-background-color:\n * chat-scrollbar-width:\n * chat-text-color:\n * chat-text-font-family:\n * chat-text-font-size:\n * chat-text-font-weight:\n * chat-text-line-height:\n * chat-header-text-font-family:\n * chat-header-text-font-size:\n * chat-header-text-font-weight:\n * chat-header-text-line-height:\n * chat-tiny-height:\n * chat-small-height:\n * chat-medium-height:\n * chat-large-height:\n * chat-giant-height:\n * chat-basic-background-color:\n * chat-basic-text-color:\n * chat-primary-background-color:\n * chat-primary-text-color:\n * chat-success-background-color:\n * chat-success-text-color:\n * chat-info-background-color:\n * chat-info-text-color:\n * chat-warning-background-color:\n * chat-warning-text-color:\n * chat-danger-background-color:\n * chat-danger-text-color:\n * chat-control-background-color:\n * chat-control-text-color:\n * chat-divider-color:\n * chat-divider-style:\n * chat-divider-width:\n * chat-message-background:\n * chat-message-text-color:\n * chat-message-reply-background-color:\n * chat-message-reply-text-color:\n * chat-message-avatar-background-color:\n * chat-message-sender-text-color:\n * chat-message-quote-background-color:\n * chat-message-quote-text-color:\n * chat-message-file-text-color:\n * chat-message-file-background-color:\n * chat-form-input-max-height:\n */\n@Component({\n selector: 'nb-chat',\n styleUrls: ['./chat.component.scss'],\n templateUrl: './chat.component.html',\n providers: [NbChatCustomMessageService, NbChatState],\n host: {\n '[class]': 'hostClasses()'\n },\n imports: [NgTemplateOutlet]\n})\nexport class NbChatComponent {\n protected readonly texts = injectNbTexts('chat', () => ({\n noMessages: $localize`:@@nb.chat.noMessages:No messages yet.`,\n messages: $localize`:@@nb.chat.messages:Messages`,\n messagePlaceholder: $localize`:@@nb.chat.messagePlaceholder:Type a message`,\n dropFilePlaceholder: $localize`:@@nb.chat.dropFilePlaceholder:Drop file to send`,\n removeFile: (name) => $localize`:@@nb.chat.removeFile:Remove ${name}:name:`\n }))\n\n protected readonly statusService = inject(NbStatusService)\n\n /**\n * The title in the header, which also names the list of messages; an `nbChatTitle` template replaces it.\n */\n readonly title = input<string>()\n\n /**\n * A fixed height: `tiny`, `small`, `medium`, `large` or `giant`. Unset by default.\n */\n readonly size = input<NbComponentSize>()\n\n /**\n * Colours the header and the form: `basic` (default), `primary`, `success`, `info`, `warning`, `danger`,\n * `control` or a custom status.\n */\n readonly status = input<NbComponentOrCustomStatus>('basic')\n\n /**\n * Text shown while there are no messages; \"No messages yet.\" by default.\n */\n readonly noMessagesPlaceholder = input<string>()\n\n // The app's defaults for chats, which the appearance starts from.\n protected readonly nbDefaults = injectNbDefaults('chat')\n\n /**\n * Chat appearance: `outline`, a card's border, or `floating`, a shadow instead, for a chat over the page, e.g.\n * opened from a button in a corner.\n */\n readonly appearanceInput = input<NbContainerAppearance | undefined>(undefined, { alias: 'appearance' })\n /** The appearance in use: the input's, the app's default, or 'outline'. */\n readonly appearance = linkedSignal<NbContainerAppearance>(\n () => this.appearanceInput() ?? this.nbDefaults().appearance ?? 'outline'\n )\n\n /**\n * Scrolls to the latest message as messages arrive (default).\n */\n readonly scrollBottom = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n readonly scrollable = viewChild<ElementRef<HTMLElement>>('scrollable')\n readonly messages = contentChildren(NbChatMessageComponent)\n readonly chatForm = contentChild(NbChatFormRef)\n readonly titleTemplate = contentChild(NbChatTitleDirective)\n private readonly state = inject(NbChatState)\n\n protected readonly hostClasses = computed(() => [\n this.size() && `size-${this.size()}`,\n `appearance-${this.appearance()}`,\n this.statusService.getStatusClass(this.status())\n ].filter(Boolean))\n\n constructor() {\n // The form takes the chat's status.\n effect(() => {\n const status = this.status()\n untracked(() => this.chatForm()?.setStatus(status))\n })\n\n // Show the latest message once the messages render.\n afterRenderEffect(() => {\n this.messages()\n untracked(() => this.updateView())\n })\n\n // The messages it renders with are there already; later ones arrive, and animate in.\n afterNextRender(() => this.state.settled.set(true))\n }\n\n updateView() {\n if (this.scrollBottom()) {\n this.scrollListBottom()\n }\n }\n\n scrollListBottom() {\n const scrollable = this.scrollable()?.nativeElement\n if (!scrollable) {\n return\n }\n // To a message that arrives smoothly, alongside its animation; at once to the ones it renders with, or where motion\n // is reduced.\n const view = scrollable.ownerDocument.defaultView\n const smooth =\n this.state.settled() && !!view && !view.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n if (smooth && typeof scrollable.scrollTo === 'function') {\n scrollable.scrollTo({ top: scrollable.scrollHeight, behavior: 'smooth' })\n } else {\n scrollable.scrollTop = scrollable.scrollHeight\n }\n }\n}\n","<div class=\"header\">\n @if (titleTemplate(); as titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"titleTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: titleTemplate.context() }\" />\n } @else {\n <span dir=\"auto\">{{ title() }}</span>\n }\n</div>\n\n<!-- A Tab stop, so the messages scroll by keyboard in Safari too. -->\n<div class=\"scrollable\"\n role=\"log\"\n tabindex=\"0\"\n [attr.aria-label]=\"title() || texts().messages\"\n #scrollable>\n <div class=\"messages\">\n <ng-content select=\"nb-chat-message\" />\n @if (!messages().length) {\n <p class=\"no-messages\"\n dir=\"auto\">{{ noMessagesPlaceholder() ?? texts().noMessages }}</p>\n }\n </div>\n</div>\n<div class=\"form\">\n <ng-content select=\"nb-chat-form\" />\n</div>\n","import {\n afterRenderEffect,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n model,\n output,\n signal,\n viewChild\n} from '@angular/core'\nimport { DomSanitizer, SafeStyle } from '@angular/platform-browser'\n\nimport { NbComponentOrCustomStatus, ɵisComposing as isComposing, injectNbTexts, NbLocalize, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NbInputDirective } from '@liquid-js/lyr-core/input'\nimport { NbButtonComponent } from '@liquid-js/lyr-core/button'\nimport { NbChatFormRef } from './chat-form-ref'\n\n/** @internal */\ndeclare const $localize: NbLocalize\n\n/**\n * A file dropped or pasted in `nb-chat-form`. An image gets its data URL in `src` and a background-image style of it\n * in `urlStyle` once it's read.\n */\nexport type NbChatFormFile = File & { src?: string, urlStyle?: SafeStyle }\n\n/**\n * The message field and send button at the bottom of an `nb-chat`.\n *\n * ```ts\n * <nb-chat-form showButton=\"true\" buttonIcon=\"paper-plane-outline\">\n * </nb-chat-form>\n * ```\n *\n * The message can have several lines: Enter sends it and Shift+Enter starts a new line. The field grows with the\n * message, up to `chat-form-input-max-height`, and then scrolls.\n *\n * With `dropFiles` it handles files drag&drop with a file preview, and adds files and images pasted into the\n * field, e.g. a screenshot.\n *\n * Drag & drop available for files and images:\n *\n * @stacked-example(Drag & Drop Chat, chat/chat-drop.component)\n *\n * `send` emits the message and its files; the form is then cleared.\n *\n * ```ts\n * <nb-chat-form (send)=\"onNewMessage($event)\">\n * </nb-chat-form>\n *\n * // ...\n *\n * onNewMessage({ message: string, files: any[] }) {\n * this.service.sendToServer(message, files);\n * }\n * ```\n */\n@Component({\n selector: 'nb-chat-form',\n templateUrl: './chat-form.component.html',\n imports: [NbIconComponent, NbInputDirective, NbButtonComponent],\n providers: [{ provide: NbChatFormRef, useExisting: NbChatFormComponent }],\n host: {\n '[class.file-over]': 'fileOver()',\n '(drop)': 'onDrop($event)',\n '(dragover)': 'onDragOver($event)',\n '(dragleave)': 'onDragLeave($event)'\n }\n})\nexport class NbChatFormComponent implements NbChatFormRef {\n protected readonly texts = injectNbTexts('chat', () => ({\n noMessages: $localize`:@@nb.chat.noMessages:No messages yet.`,\n messages: $localize`:@@nb.chat.messages:Messages`,\n messagePlaceholder: $localize`:@@nb.chat.messagePlaceholder:Type a message`,\n dropFilePlaceholder: $localize`:@@nb.chat.dropFilePlaceholder:Drop file to send`,\n removeFile: (name) => $localize`:@@nb.chat.removeFile:Remove ${name}:name:`\n }))\n\n protected readonly domSanitizer = inject(DomSanitizer)\n\n readonly status = signal<NbComponentOrCustomStatus>('basic')\n readonly inputFocus = signal(false)\n readonly inputHover = signal(false)\n readonly fileOver = signal(false)\n\n readonly droppedFiles = signal<NbChatFormFile[]>([])\n imgDropTypes = ['image/png', 'image/jpeg', 'image/gif', 'image/webp', 'image/avif', 'image/svg+xml']\n\n /**\n * The message text. Two-way bindable; cleared once the message is sent.\n */\n readonly message = model<string>('')\n\n /**\n * Placeholder of the field; \"Type a message\" by default.\n */\n readonly messagePlaceholder = input<string>()\n /**\n * Text of the send button, in place of its icon.\n */\n readonly buttonTitle = input<string>('')\n\n /**\n * Icon of the send button, shown while `buttonTitle` is empty.\n */\n readonly buttonIcon = input<string>('paper-plane-outline')\n\n /**\n * Shows the send button (default). Enter sends the message either way.\n */\n readonly showButton = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Takes files dropped on the form or pasted into the field, shown as previews above it and sent with the message.\n */\n readonly dropFiles = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Placeholder of the field while a file is dragged over the form; \"Drop file to send\" by default.\n */\n readonly dropFilePlaceholder = input<string>()\n\n /**\n * Emits the message and the files dropped or pasted with it; images come with their previews.\n */\n readonly send = output<{\n message: string\n files: NbChatFormFile[]\n }>()\n\n /**\n * Emits the text as the user types.\n */\n readonly onInputChange = output<string>()\n\n private readonly messageInput = viewChild.required<ElementRef<HTMLTextAreaElement>>('messageInput')\n private readonly sendButton = viewChild('sendButton', { read: ElementRef<HTMLElement> })\n\n constructor() {\n // The send button sits in the field's corner, and the field's text stops before it: the theme knows an icon\n // button's width, and a button with a title tells it its own.\n afterRenderEffect((onCleanup) => {\n const button = this.sendButton()?.nativeElement\n const row = button?.parentElement\n if (!button || !row || typeof ResizeObserver === 'undefined') {\n return\n }\n const observer = new ResizeObserver(() =>\n row.style.setProperty('--nb-chat-send-width', `${button.offsetWidth}px`)\n )\n observer.observe(button)\n onCleanup(() => {\n observer.disconnect()\n row.style.removeProperty('--nb-chat-send-width')\n })\n })\n\n // The field fits the message with `field-sizing: content`; where that isn't supported, it's measured. The theme\n // limits its height, and an empty field has the height of one line.\n if (typeof CSS === 'undefined' || CSS.supports('field-sizing', 'content')) {\n return\n }\n afterRenderEffect(() => {\n const field = this.messageInput().nativeElement\n field.style.height = ''\n if (this.message()) {\n const borders = field.offsetHeight - field.clientHeight\n field.style.height = `${field.scrollHeight + borders}px`\n }\n })\n }\n\n onDrop(event: DragEvent) {\n if (this.dropFiles()) {\n event.preventDefault()\n event.stopPropagation()\n\n this.fileOver.set(false)\n if (event.dataTransfer && event.dataTransfer.files) {\n this.addFiles(event.dataTransfer.files)\n }\n }\n }\n\n /** @internal Adds pasted files, e.g. a screenshot, like dropped ones. */\n onPaste(event: ClipboardEvent) {\n const files = event.clipboardData?.files\n if (this.dropFiles() && files?.length) {\n event.preventDefault()\n this.addFiles(files)\n }\n }\n\n /** @internal */\n onInput(event: Event) {\n const value = (event.target as HTMLTextAreaElement).value\n this.message.set(value)\n this.onModelChange(value)\n }\n\n /**\n * @internal\n * Enter sends the message; Shift+Enter, and Enter that ends a composition, e.g. of a Japanese word, don't.\n */\n onEnter(event: Event) {\n const keyboardEvent = event as KeyboardEvent\n if (keyboardEvent.shiftKey || isComposing(keyboardEvent)) {\n return\n }\n event.preventDefault()\n this.sendMessage()\n }\n\n protected addFiles(files: FileList) {\n for (const file of Array.from(files)) {\n const res: NbChatFormFile = file\n\n if (this.imgDropTypes.includes(file.type)) {\n const fr = new FileReader()\n fr.onload = () => {\n // A data URL, as it's read with `readAsDataURL`.\n res.src = String(fr.result)\n res.urlStyle = this.domSanitizer.bypassSecurityTrustStyle(`url(${res.src})`)\n // A new array, so the preview renders with the loaded image.\n this.droppedFiles.update((droppedFiles) => [...droppedFiles])\n }\n\n fr.readAsDataURL(file)\n }\n this.droppedFiles.update((droppedFiles) => [...droppedFiles, res])\n }\n }\n\n removeFile(file: File) {\n this.droppedFiles.update((files) => files.filter((droppedFile) => droppedFile !== file))\n }\n\n onDragOver(event: DragEvent) {\n event.preventDefault()\n event.stopPropagation()\n if (this.dropFiles()) {\n this.fileOver.set(true)\n }\n }\n\n onDragLeave(event: DragEvent) {\n event.preventDefault()\n event.stopPropagation()\n if (this.dropFiles()) {\n this.fileOver.set(false)\n }\n }\n\n sendMessage() {\n const files = this.droppedFiles()\n if (files.length || String(this.message()).trim().length) {\n this.send.emit({ message: this.message(), files })\n this.message.set('')\n this.droppedFiles.set([])\n }\n }\n\n setStatus(status: NbComponentOrCustomStatus) {\n this.status.set(status)\n }\n\n readonly inputStatus = computed<NbComponentOrCustomStatus>(() => {\n if (this.fileOver()) {\n return this.highlightStatus()\n }\n\n if (this.inputFocus() || this.inputHover()) {\n return this.status()\n }\n\n return 'basic'\n })\n\n readonly buttonStatus = computed(() => this.highlightStatus())\n\n protected readonly highlightStatus = computed<NbComponentOrCustomStatus>(() => {\n const status = this.status()\n return status === 'basic' || status === 'control' ? 'primary' : status\n })\n\n onModelChange(value: string) {\n this.onInputChange.emit(value)\n }\n}\n","@if (droppedFiles().length) {\n<div class=\"dropped-files\">\n @for (file of droppedFiles(); track file) {\n <div [style.background-image]=\"file.urlStyle\">\n @if (!file.urlStyle) {\n <nb-icon icon=\"file-text-outline\"\n pack=\"essentials\" />\n }\n <!-- Reachable with Tab in Safari, which skips buttons by default. -->\n <button type=\"button\"\n class=\"remove\"\n tabindex=\"0\"\n [attr.aria-label]=\"texts().removeFile(file.name)\"\n (click)=\"removeFile(file)\">&times;</button>\n </div>\n }\n</div>\n}\n<div class=\"message-row\">\n <!-- Takes the direction of the message; an empty field keeps the page's, for its placeholder. -->\n <textarea #messageInput\n nbInput\n fieldSize=\"medium\"\n [attr.dir]=\"message() ? 'auto' : null\"\n fullWidth\n rows=\"1\"\n [status]=\"inputStatus()\"\n (focus)=\"inputFocus.set(true)\"\n (blur)=\"inputFocus.set(false)\"\n (mouseenter)=\"inputHover.set(true)\"\n (mouseleave)=\"inputHover.set(false)\"\n [value]=\"message()\"\n (input)=\"onInput($event)\"\n (keydown.enter)=\"onEnter($event)\"\n (paste)=\"onPaste($event)\"\n [class.with-button]=\"showButton()\"\n [placeholder]=\"fileOver()\n ? (dropFilePlaceholder() ?? texts().dropFilePlaceholder)\n : (messagePlaceholder() ?? texts().messagePlaceholder)\"></textarea>\n @if (showButton()) {\n <button #sendButton\n type=\"button\"\n nbButton\n size=\"medium\"\n [status]=\"buttonStatus()\"\n [class.with-icon]=\"!buttonTitle()\"\n (click)=\"sendMessage()\"\n class=\"send-button\">\n @if (!buttonTitle()) {\n <nb-icon [icon]=\"buttonIcon()\"\n pack=\"essentials\" />\n } @else {{{ buttonTitle() }}}\n </button>\n }\n</div>\n","import { computed, Directive, inject, input, OnDestroy, OnInit, TemplateRef } from '@angular/core'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbChatCustomMessageService } from './chat-custom-message.service'\n\nfunction throwCustomMessageTypeIsRequired(): never {\n throw new Error('[nbCustomMessage]: custom message type is required.')\n}\n\n/**\n * A template for the messages of a custom `type` in an `nb-chat`, declared before them, as a structural directive or\n * on an `ng-template`. It gets the message's `customMessageData` as `$implicit` and whether it's a reply as `isReply`:\n *\n * ```html\n * <div *nbCustomMessage=\"'my-custom-type'; let data\">\n * <!-- custom message -->\n * </div>\n * ```\n * or\n * ```html\n * <ng-template nbCustomMessage='my-custom-type' let-data>\n * <!-- custom message -->\n * </ng-template>\n * ```\n */\n@Directive({ selector: '[nbCustomMessage]' })\nexport class NbChatCustomMessageDirective implements OnInit, OnDestroy {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef)\n protected readonly customMessageService = inject(NbChatCustomMessageService)\n\n /**\n * The message type the template renders.\n */\n readonly nbCustomMessage = input.required<string>()\n\n /**\n * Drops the message styles, such as the rounded corners, text colour and background, so a custom message can be\n * styled from the ground up.\n */\n readonly nbCustomMessageNoStyles = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * The custom message type.\n */\n readonly type = computed(() => this.nbCustomMessage())\n\n /**\n * Whether the message is rendered without the default message styles.\n */\n readonly noStyles = computed(() => this.nbCustomMessageNoStyles())\n\n ngOnInit() {\n const type = this.type()\n if (!type) {\n throwCustomMessageTypeIsRequired()\n }\n this.customMessageService.register(type, this)\n }\n\n ngOnDestroy() {\n this.customMessageService.unregister(this.type())\n }\n}\n","import { ModuleWithProviders, NgModule, EnvironmentProviders, makeEnvironmentProviders } from '@angular/core'\n\nimport { NbButtonModule } from '@liquid-js/lyr-core/button'\nimport { NbInputModule } from '@liquid-js/lyr-core/input'\nimport { NbIconModule } from '@liquid-js/lyr-core/icon'\n\nimport { NbChatComponent } from './chat.component'\nimport { NbChatMessageComponent } from './chat-message.component'\nimport { NbChatFormComponent } from './chat-form.component'\nimport { NbChatMessageTextComponent } from './chat-message-text.component'\nimport { NbChatMessageFileComponent } from './chat-message-file.component'\nimport { NbChatMessageQuoteComponent } from './chat-message-quote.component'\nimport { NbChatMessageMapComponent } from './chat-message-map.component'\nimport { NbChatOptions } from './chat.options'\nimport { NbChatAvatarComponent } from './chat-avatar.component'\nimport { NbChatCustomMessageDirective } from './chat-custom-message.directive'\nimport { NbChatTitleDirective } from './chat-title.directive'\n\nconst NB_CHAT_COMPONENTS = [\n NbChatComponent,\n NbChatMessageComponent,\n NbChatFormComponent,\n NbChatMessageTextComponent,\n NbChatMessageFileComponent,\n NbChatMessageQuoteComponent,\n NbChatMessageMapComponent,\n NbChatAvatarComponent\n]\n\nconst NB_CHAT_DIRECTIVES = [NbChatCustomMessageDirective, NbChatTitleDirective]\n\n/**\n * Provides the chat options, in place of `NbChatModule.forRoot()` or `forChild()`.\n */\nexport function provideNbChat(options?: NbChatOptions): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: NbChatOptions, useValue: options || {} }])\n}\n\n@NgModule({\n imports: [NbIconModule, NbInputModule, NbButtonModule, ...NB_CHAT_COMPONENTS, ...NB_CHAT_DIRECTIVES],\n exports: [...NB_CHAT_COMPONENTS, ...NB_CHAT_DIRECTIVES]\n})\nexport class NbChatModule {\n static forRoot(options?: NbChatOptions): ModuleWithProviders<NbChatModule> {\n return { ngModule: NbChatModule, providers: [provideNbChat(options)] }\n }\n\n static forChild(options?: NbChatOptions): ModuleWithProviders<NbChatModule> {\n return { ngModule: NbChatModule, providers: [provideNbChat(options)] }\n }\n}\n"],"mappings":";;;;;;;;AAMA,IAAsB,gBAAtB,MAAmC,CAElC;ACGD,IAAa,6BAAb,MAAa,2BAA0B;CALvC,cAAA;EAUa,KAAA,SAAS,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;EAKxB,KAAA,UAAU,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAKzB,KAAA,OAAO,MAAa,GAAA,YAAA,CAAA,QAAA,EAAA,WA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-js-lyr-core-chat.mjs","names":["convertToBoolProperty","convertToBoolProperty","convertToBoolProperty","isComposing","convertToBoolProperty"],"sources":["../../../packages/core/src/components/chat/chat-form-ref.ts","../../../packages/core/src/components/chat/chat-message-text.component.ts","../../../packages/core/src/components/chat/chat-message-text.component.html","../../../packages/core/src/components/chat/chat-message-file.component.ts","../../../packages/core/src/components/chat/chat-message-file.component.html","../../../packages/core/src/components/chat/chat-custom-message.service.ts","../../../packages/core/src/components/chat/chat-state.ts","../../../packages/core/src/components/chat/chat-avatar.component.ts","../../../packages/core/src/components/chat/chat-avatar.component.html","../../../packages/core/src/components/chat/chat-message-quote.component.ts","../../../packages/core/src/components/chat/chat-message-quote.component.html","../../../packages/core/src/components/chat/chat.options.ts","../../../packages/core/src/components/chat/chat-message-map.component.ts","../../../packages/core/src/components/chat/chat-message-map.component.html","../../../packages/core/src/components/chat/chat-message.component.ts","../../../packages/core/src/components/chat/chat-message.component.html","../../../packages/core/src/components/chat/chat-title.directive.ts","../../../packages/core/src/components/chat/chat.component.ts","../../../packages/core/src/components/chat/chat.component.html","../../../packages/core/src/components/chat/chat-form.component.ts","../../../packages/core/src/components/chat/chat-form.component.html","../../../packages/core/src/components/chat/chat-custom-message.directive.ts","../../../packages/core/src/components/chat/chat.module.ts"],"sourcesContent":["import { NbComponentOrCustomStatus } from '@liquid-js/lyr-core/base'\n\n/**\n * An `nb-chat-form`, for the chat it's in, which gives it its status. Querying this instead of the form component keeps\n * the form's code out of an app whose chats only show messages.\n */\nexport abstract class NbChatFormRef {\n abstract setStatus(status: NbComponentOrCustomStatus): void\n}\n","import { Component, input } from '@angular/core'\nimport { DatePipe } from '@angular/common'\n\n/**\n * The text of a message, with its sender and time.\n */\n@Component({\n selector: 'nb-chat-message-text',\n templateUrl: './chat-message-text.component.html',\n imports: [DatePipe]\n})\nexport class NbChatMessageTextComponent {\n\n /**\n * The sender's name.\n */\n readonly sender = input<string>()\n\n /**\n * The message text.\n */\n readonly message = input<string>()\n\n /**\n * When the message was sent.\n */\n readonly date = input<Date>()\n\n /**\n * `DatePipe` format of the date; `shortTime` by default.\n */\n readonly dateFormat = input<string>('shortTime')\n\n}\n","@if (sender() || date()) {\n<p class=\"sender\"><span dir=\"auto\">{{ sender() }}</span>&ngsp;<time>{{ date() | date: dateFormat() }}</time></p>\n}\n@if (message()) {\n<!-- The bubble sits by the page's direction; its text aligns by its own. -->\n<p class=\"text\"\n dir=\"auto\">{{ message() }}</p>\n}\n","import { Component, computed, inject, input } from '@angular/core'\nimport { DomSanitizer } from '@angular/platform-browser'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NbChatMessageTextComponent } from './chat-message-text.component'\n\nexport interface NbChatMessageFileIconPreview {\n url: string\n icon: string\n /** Accessible name of the file link, the file name from the URL by default. */\n name?: string\n}\nexport interface NbChatMessageFileImagePreview {\n url: string\n type: string\n /** Accessible name of the file link, the file name from the URL by default. */\n name?: string\n}\nexport type NbChatMessageFile = NbChatMessageFileIconPreview | NbChatMessageFileImagePreview\n\n/**\n * A `file` message: its text, and each file as a link, images as previews and other files with their icon.\n */\n@Component({\n selector: 'nb-chat-message-file',\n templateUrl: './chat-message-file.component.html',\n imports: [NbChatMessageTextComponent, NbIconComponent]\n})\nexport class NbChatMessageFileComponent {\n protected readonly domSanitizer = inject(DomSanitizer)\n\n /**\n * The message text.\n */\n readonly message = input<string>()\n\n /**\n * The sender's name.\n */\n readonly sender = input<string>()\n\n /**\n * When the message was sent.\n */\n readonly date = input<Date>()\n\n /**\n * `DatePipe` format of the date; `shortTime` by default.\n */\n readonly dateFormat = input<string>('shortTime')\n\n /**\n * The files: `{ url, type }` for an image shown as a preview, `{ url, icon }` for another file.\n */\n readonly files = input<NbChatMessageFile[]>()\n\n readonly readyFiles = computed(() =>\n (this.files() || []).map((file) => {\n const isImage = this.isImage(file)\n return {\n ...file,\n icon: 'icon' in file ? file.icon : undefined,\n urlStyle: isImage && this.domSanitizer.bypassSecurityTrustStyle(`url(${file.url})`),\n isImage,\n name: file.name ?? this.getFileName(file.url)\n }\n })\n )\n\n protected getFileName(url: string): string {\n const path = (url ?? '').split(/[?#]/)[0]\n const name = path.slice(path.lastIndexOf('/') + 1)\n try {\n return decodeURIComponent(name) || url\n } catch {\n return name || url\n }\n }\n\n isImage(file: NbChatMessageFile): boolean {\n const type = 'type' in file ? file.type : undefined\n if (type) {\n return ['image/png', 'image/jpeg', 'image/gif', 'image/webp', 'image/avif', 'image/svg+xml'].includes(type)\n }\n return false\n }\n}\n","<nb-chat-message-text [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\"\n [message]=\"message()\">\n {{ message() }}\n</nb-chat-message-text>\n\n@if (readyFiles()?.length > 1) {\n<div class=\"message-content-group\">\n @for (file of readyFiles(); track file) {\n <a [href]=\"file.url\"\n target=\"_blank\"\n [attr.aria-label]=\"file.name\">\n @if (!file.urlStyle && file.icon) {\n <nb-icon [icon]=\"file.icon\" />\n }\n @if (file.urlStyle) {\n <div [style.background-image]=\"file.urlStyle\"></div>\n }\n </a>\n }\n</div>\n}\n\n@if (readyFiles()?.length === 1) {\n<a [href]=\"readyFiles()[0].url\"\n target=\"_blank\"\n [attr.aria-label]=\"readyFiles()[0].name\">\n @if (!readyFiles()[0].urlStyle && readyFiles()[0].icon) {\n <nb-icon [icon]=\"readyFiles()[0].icon\" />\n }\n @if (readyFiles()[0].urlStyle) {\n <div [style.background-image]=\"readyFiles()[0].urlStyle\"></div>\n }\n</a>\n}\n","import { Service } from '@angular/core'\n\nimport { NbChatCustomMessageDirective } from './chat-custom-message.directive'\n\n/**\n * Holds the `nbCustomMessage` templates declared in a chat, by message type.\n */\n@Service({ autoProvided: false })\nexport class NbChatCustomMessageService {\n protected readonly customMessages = new Map<string, NbChatCustomMessageDirective>()\n\n register(type: string, instance: NbChatCustomMessageDirective) {\n this.customMessages.set(type, instance)\n }\n\n unregister(type: string): boolean {\n return this.customMessages.delete(type)\n }\n\n getInstance(type: string): NbChatCustomMessageDirective | undefined {\n return this.customMessages.get(type)\n }\n}\n","import { Injectable, signal } from '@angular/core'\n\n/**\n * A chat's state its messages read: whether the chat has rendered its first messages, so only messages added after\n * them animate in.\n */\n@Injectable()\nexport class NbChatState {\n readonly settled = signal(false)\n}\n","import { Component, input } from '@angular/core'\nimport { SafeStyle } from '@angular/platform-browser'\n\n@Component({\n selector: 'nb-chat-avatar',\n templateUrl: './chat-avatar.component.html',\n host: {\n 'class': 'avatar',\n '[style.background-image]': 'avatarStyle()'\n }\n})\nexport class NbChatAvatarComponent {\n\n readonly initials = input<string>()\n\n readonly avatarStyle = input<SafeStyle>()\n}\n","@if (!avatarStyle()) {\n{{ initials() }}\n}\n","import { Component, input } from '@angular/core'\nimport { DatePipe } from '@angular/common'\nimport { NbChatMessageTextComponent } from './chat-message-text.component'\n\n/**\n * A `quote` message: the quoted text above the message's own.\n */\n@Component({\n selector: 'nb-chat-message-quote',\n templateUrl: './chat-message-quote.component.html',\n imports: [NbChatMessageTextComponent, DatePipe]\n})\nexport class NbChatMessageQuoteComponent {\n\n /**\n * The message text.\n */\n readonly message = input<string>()\n\n /**\n * The sender's name.\n */\n readonly sender = input<string>()\n\n /**\n * When the message was sent.\n */\n readonly date = input<Date>()\n\n /**\n * `DatePipe` format of the date; `shortTime` by default.\n */\n readonly dateFormat = input<string>('shortTime')\n\n /**\n * The quoted text.\n */\n readonly quote = input<string>()\n\n}\n","@if (sender() || date()) {\n<p class=\"sender\"><span dir=\"auto\">{{ sender() }}</span>&ngsp;<time>{{ date() | date: dateFormat() }}</time></p>\n}\n<p class=\"quote\"\n dir=\"auto\">{{ quote() }}</p>\n<nb-chat-message-text [message]=\"message()\">\n {{ message() }}\n</nb-chat-message-text>\n","export class NbChatOptions {\n messageGoogleMapKey?: string\n}\n","import { Component, inject, input } from '@angular/core'\nimport { NbChatOptions } from './chat.options'\nimport { NbChatMessageFileComponent } from './chat-message-file.component'\n\n/**\n * A `map` message: its text, and a static Google Maps picture of the location, which needs the `messageGoogleMapKey`\n * of `provideNbChat`.\n */\n@Component({\n selector: 'nb-chat-message-map',\n templateUrl: './chat-message-map.component.html',\n imports: [NbChatMessageFileComponent]\n})\nexport class NbChatMessageMapComponent {\n\n /**\n * The message text.\n */\n readonly message = input<string>()\n\n /**\n * The sender's name.\n */\n readonly sender = input<string>()\n\n /**\n * When the message was sent.\n */\n readonly date = input<Date>()\n\n /**\n * `DatePipe` format of the date; `shortTime` by default.\n */\n readonly dateFormat = input<string>('shortTime')\n\n /**\n * Latitude of the location.\n */\n readonly latitude = input<number>()\n\n /**\n * Longitude of the location.\n */\n readonly longitude = input<number>()\n\n get file() {\n return {\n\n url: `https://maps.googleapis.com/maps/api/staticmap?center=${this.latitude()},${this.longitude()}&zoom=12&size=400x400&key=${this.mapKey}`,\n type: 'image/png',\n icon: 'location'\n }\n }\n\n mapKey = inject(NbChatOptions, { optional: true })?.messageGoogleMapKey\n}\n","<nb-chat-message-file [files]=\"[file]\"\n [message]=\"message()\"\n [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\" />\n","import { Component, computed, inject, input, TemplateRef } from '@angular/core'\nimport { DomSanitizer, SafeStyle } from '@angular/platform-browser'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NgTemplateOutlet } from '@angular/common'\nimport { NbChatMessageFile, NbChatMessageFileComponent } from './chat-message-file.component'\nimport { NbChatCustomMessageService } from './chat-custom-message.service'\nimport { NbChatState } from './chat-state'\nimport { NbChatCustomMessageDirective } from './chat-custom-message.directive'\nimport { NbChatAvatarComponent } from './chat-avatar.component'\nimport { NbChatMessageQuoteComponent } from './chat-message-quote.component'\nimport { NbChatMessageMapComponent } from './chat-message-map.component'\nimport { NbChatMessageTextComponent } from './chat-message-text.component'\n\n/**\n * A message in an `nb-chat`, with its sender, time and avatar; a `reply` is the other side of the conversation.\n *\n * `type` sets what the message holds:\n * - `text` (default) - the message text\n * - `file` - `files`, images as previews and other files with an icon, grouped when there are several\n * - `quote` - a `quote` of another message above the text\n * - `map` - a Google Maps picture of `latitude` and `longitude`\n * - a custom type, rendered with the chat's `nbCustomMessage` template of that type\n *\n * @stacked-example(Available Types, chat/chat-message-types-showcase.component)\n *\n * Message with attached files:\n * ```html\n * <nb-chat-message\n * type=\"file\"\n * [files]=\"[ { url: '...' } ]\"\n * message=\"Hello world!\">\n * </nb-chat-message>\n * ```\n *\n * Map message:\n * ```html\n * <nb-chat-message\n * type=\"map\"\n * [latitude]=\"53.914\"\n * [longitude]=\"27.59\"\n * message=\"Here I am\">\n * </nb-chat-message>\n * ```\n * @styles\n *\n * chat-message-background:\n * chat-message-text-color:\n * chat-message-reply-background-color:\n * chat-message-reply-text-color:\n * chat-message-avatar-background-color:\n * chat-message-sender-text-color:\n * chat-message-quote-background-color:\n * chat-message-quote-text-color:\n * chat-message-file-text-color:\n * chat-message-file-background-color:\n */\n@Component({\n selector: 'nb-chat-message',\n templateUrl: './chat-message.component.html',\n styleUrls: ['./chat-message.component.scss'],\n imports: [\n NbChatAvatarComponent,\n NbChatMessageFileComponent,\n NbChatMessageQuoteComponent,\n NbChatMessageMapComponent,\n NbChatMessageTextComponent,\n NgTemplateOutlet\n ],\n host: {\n '[animate.enter]': 'enterAnimation',\n 'animate.leave': 'nb-chat-message-leave',\n '[class.reply]': 'reply()',\n '[class.not-reply]': 'notReply()'\n }\n})\nexport class NbChatMessageComponent {\n protected readonly domSanitizer = inject(DomSanitizer)\n protected readonly customMessageService = inject(NbChatCustomMessageService)\n private readonly chatState = inject(NbChatState, { optional: true })\n\n /** Animates in when it arrives in a chat that has rendered, not with the chat's first messages. */\n protected readonly enterAnimation = this.chatState?.settled() === false ? '' : 'nb-chat-message-enter'\n\n protected readonly builtInMessageTypes: string[] = ['text', 'file', 'map', 'quote']\n\n get _addReplyClass(): boolean {\n return this._areDefaultStylesEnabled() && this.reply()\n }\n\n get _addNotReplyClass(): boolean {\n return this._areDefaultStylesEnabled() && this.notReply()\n }\n\n get _addNoSpaceClass(): boolean {\n return this._areDefaultStylesEnabled() && !this.message()\n }\n\n readonly notReply = computed(() => !this.reply())\n\n /**\n * Marks a message from the other side of the conversation: aligned to the other edge, in the reply colours, without\n * an avatar.\n */\n readonly reply = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * The message text.\n */\n readonly message = input<string>()\n\n /**\n * The sender's name, shown with the message; its initials stand in for a missing `avatar`.\n */\n readonly sender = input<string>()\n\n /**\n * When the message was sent.\n */\n readonly date = input<Date>()\n\n /**\n * `DatePipe` format of the date; `shortTime` by default.\n */\n readonly dateFormat = input<string>('shortTime')\n\n /**\n * The files of a `file` message: `{ url, type }` for an image shown as a preview, `{ url, icon }` for another file.\n */\n readonly files = input<NbChatMessageFile[]>()\n\n /**\n * The quoted text of a `quote` message.\n */\n readonly quote = input<string>()\n\n /**\n * Latitude of a `map` message.\n */\n readonly latitude = input<number>()\n\n /**\n * Longitude of a `map` message.\n */\n readonly longitude = input<number>()\n\n /**\n * URL of the sender's picture, shown beside a message that isn't a `reply`.\n */\n readonly avatar = input<string>()\n\n readonly avatarStyle = computed<SafeStyle | undefined>(() => {\n const avatar = this.avatar()\n return avatar ? this.domSanitizer.bypassSecurityTrustStyle(`url(${avatar})`) : undefined\n })\n\n /**\n * Message type: `text` (default), `file`, `map`, `quote`, or a custom one with an `nbCustomMessage` template.\n */\n readonly type = input<string>()\n\n /**\n * What a custom message's template gets as its `$implicit` context.\n */\n readonly customMessageData = input<unknown>()\n\n getInitials(): string {\n const sender = this.sender()\n if (sender) {\n const names = sender.split(' ')\n return names\n .map((n) => n.charAt(0))\n .splice(0, 2)\n .join('')\n .toUpperCase()\n }\n return ''\n }\n\n _isBuiltInMessageType(): boolean {\n // Unset type defaults to \"text\" type\n const type = this.type()\n return type == null || this.builtInMessageTypes.includes(type)\n }\n\n _getTemplate(): TemplateRef<unknown> {\n const customMessage = this.getCustomMessage(this.type())\n return customMessage.templateRef\n }\n\n _getTemplateContext(): { $implicit: unknown, isReply: boolean } {\n return { $implicit: this.customMessageData(), isReply: this.reply() }\n }\n\n _areDefaultStylesEnabled(): boolean {\n const customMessageDirective = this.getCustomMessage(this.type())\n return !customMessageDirective.noStyles()\n }\n\n protected getCustomMessage(type?: string): NbChatCustomMessageDirective {\n const customMessageDirective = type ? this.customMessageService.getInstance(type) : undefined\n if (!customMessageDirective) {\n throw new Error(\n `nb-chat: Can't find template for custom type '${type}'. ` +\n `Make sure you provide it in the chat component with *nbCustomMessage='${type}'.`\n )\n }\n return customMessageDirective\n }\n}\n","@if (notReply()) {\n<nb-chat-avatar [initials]=\"getInitials()\"\n [avatarStyle]=\"avatarStyle()\" />\n}\n\n<div class=\"message\">\n @if (_isBuiltInMessageType()) {\n @switch (type()) {\n @case ('file') {\n <nb-chat-message-file [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\"\n [message]=\"message()\"\n [files]=\"files()\" />\n }\n @case ('quote') {\n <nb-chat-message-quote [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\"\n [message]=\"message()\"\n [quote]=\"quote()\" />\n }\n @case ('map') {\n <nb-chat-message-map [sender]=\"sender()\"\n [date]=\"date()\"\n [message]=\"message()\"\n [latitude]=\"latitude()\"\n [longitude]=\"longitude()\" />\n }\n @default {\n <nb-chat-message-text [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\"\n [message]=\"message()\" />\n }\n }\n } @else {\n <nb-chat-message-text [sender]=\"sender()\"\n [date]=\"date()\"\n [dateFormat]=\"dateFormat()\"\n [message]=\"message()\" />\n <div [class.nb-custom-message]=\"_areDefaultStylesEnabled()\"\n [class.nb-custom-message-no-space]=\"_addNoSpaceClass\"\n [class.nb-custom-message-reply]=\"_addReplyClass\"\n [class.nb-custom-message-not-reply]=\"_addNotReplyClass\"\n [class.nb-custom-message-full-width]=\"!_areDefaultStylesEnabled()\">\n <ng-container [ngTemplateOutlet]=\"_getTemplate()\"\n [ngTemplateOutletContext]=\"_getTemplateContext()\" />\n </div>\n }\n</div>\n","import { Directive, TemplateRef, inject, input } from '@angular/core'\n\n/**\n * A template for the chat's title, in place of its `title` text: `<ng-template nbChatTitle [context]=\"...\" let-data>`\n * in an `nb-chat`, which renders it with `context` as `$implicit`.\n */\n@Directive({ selector: '[nbChatTitle]' })\nexport class NbChatTitleDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef)\n\n /** The value the template gets as `$implicit`. */\n readonly context = input<object>({})\n}\n","import {\n afterNextRender,\n afterRenderEffect,\n Component,\n computed,\n contentChild,\n contentChildren,\n effect,\n ElementRef,\n inject,\n input,\n linkedSignal,\n untracked,\n viewChild\n} from '@angular/core'\n\nimport { NbStatusService, injectNbDefaults, NbContainerAppearance, NbComponentSize, NbComponentOrCustomStatus, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, injectNbTexts, NbLocalize } from '@liquid-js/lyr-core/base'\nimport { NgTemplateOutlet } from '@angular/common'\nimport { NbChatFormRef } from './chat-form-ref'\nimport { NbChatMessageComponent } from './chat-message.component'\nimport { NbChatCustomMessageService } from './chat-custom-message.service'\nimport { NbChatState } from './chat-state'\nimport { NbChatTitleDirective } from './chat-title.directive'\n\n/** @internal */\ndeclare const $localize: NbLocalize\n\n/**\n * A chat: a titled list of messages with a form to send one.\n *\n * Main features:\n * - message types: text, files and images, quotes, maps, and custom ones with their own templates\n * - drag & drop and pasting of images and files, with previews\n * - statuses, sizes and appearances\n *\n * Here's a complete example built as a bot-like app. Type `help` to receive the different message types.\n *\n * @stacked-example(Showcase, chat/chat-showcase.component)\n *\n * The messages are a `log` region named by the title, which scrolls by keyboard, and new messages animate in and\n * scroll into view.\n *\n * Basic chat configuration and usage:\n * ```ts\n * <nb-chat title=\"Lyra Conversational UI\">\n * @for (msg of messages; track msg) {\n * <nb-chat-message [type]=\"msg.type\"\n * [message]=\"msg.text\"\n * [reply]=\"msg.reply\"\n * [sender]=\"msg.user.name\"\n * [date]=\"msg.date\"\n * [files]=\"msg.files\"\n * [quote]=\"msg.quote\"\n * [latitude]=\"msg.latitude\"\n * [longitude]=\"msg.longitude\"\n * [avatar]=\"msg.user.avatar\">\n * </nb-chat-message>\n * }\n *\n * <nb-chat-form (send)=\"sendMessage($event)\" dropFiles>\n * </nb-chat-form>\n * </nb-chat>\n * ```\n * ### Installation\n *\n * Import `NbChatComponent`, `NbChatMessageComponent`, `NbChatFormComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbChatComponent, NbChatMessageComponent, NbChatFormComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * and add `provideNbChat()` to the application providers:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideNbChat({ messageGoogleMapKey: 'MAP_KEY' })],\n * });\n * ```\n * In a lazy loaded route, add `provideNbChat()` to the route's `providers` instead, so the route gets its own instance.\n *\n * With NgModules:\n *\n * Import `NbChatModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbChatModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n *\n * If you need to provide an API key for a `map` message type (which is required by Google Maps)\n * you may use `NbChatModule.forRoot({ ... })` call if this is a global app configuration\n * or `NbChatModule.forChild({ ... })` for a feature module configuration:\n *\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbChatModule.forRoot({ messageGoogleMapKey: 'MAP_KEY' }),\n * ],\n * })\n * export class AppModule { }\n * ```\n *\n * ### Usage\n *\n * There are three main components:\n * ```ts\n * <nb-chat>\n * </nb-chat> // chat container\n *\n * <nb-chat-form>\n * </nb-chat-form> // chat form with drag&drop files feature\n *\n * <nb-chat-message>\n * </nb-chat-message> // chat message, available multiple types\n * ```\n *\n * An `nbChatTitle` template replaces the `title` text:\n * @stacked-example(Custom template as a title, chat/chat-template-title.component)\n *\n * A conversation between two users, with `reply` marking one side's messages:\n * @stacked-example(Conversation, chat/chat-conversation-showcase.component)\n *\n * `status` colours the header and the form:\n * @stacked-example(Colored Chat, chat/chat-colors.component)\n *\n * `size` gives the chat a fixed height:\n * @stacked-example(Chat Sizes, chat/chat-sizes.component)\n *\n * A chat looks like a card, to sit among them in a page. One that floats over the page, e.g. opened from a button in\n * a corner, has a shadow instead of a border with `appearance=\"floating\"`:\n * @stacked-example(Floating Chat, chat/chat-floating.component)\n *\n * # Custom message types\n *\n * Besides built-in message types, you could provide custom ones with their own template to render.\n * As an example, let's add the `link` message type.\n * <br>\n * First, you need to provide a template for the `link` message type:\n * ```html\n * <nb-chat>\n * <a *nbCustomMessage=\"'link'\" href=\"https://example.com\">example.com</a>\n * </nb-chat>\n * ```\n * Then, add the `nb-chat-message` component with the `link` type:\n * ```html\n * <nb-chat>\n * <a *nbCustomMessage=\"'link'\" href=\"https://example.com\">example.com</a>\n * <nb-chat-message type=\"link\"></nb-chat-message>\n * </nb-chat>\n * ```\n *\n * <div class=\"note note-warning\">\n * <div class=\"note-title\">Important!</div>\n * <div class=\"note-body\">\n * Custom chat messages must be defined before the `nb-chat-message`.\n * </div>\n * </div>\n *\n * Custom message templates could have arbitrary data associated with them. Let's extract hardcoded link\n * href and text. To pass some data to the custom message template, use the `customMessageData` input\n * of the `nb-chat-message` component:\n * ```html\n * ...\n * <nb-chat-message type=\"link\" [customMessageData]=\"{ href: 'https://example.com', text: 'example.com' }\">\n * </nb-chat-message>\n * ...\n * ```\n * When `customMessageData` is set, this object would become a template context and you'll be able\n * to reference it via `let varName` syntax:\n * ```html\n * <a *nbCustomMessage=\"'link'; let data\" [href]=\"data.href\">{{ data.text }}</a>\n * ```\n *\n * That's it, full example will look like this:\n * ```html\n * <nb-chat title=\"Lyra Conversational UI\">\n * <a *nbCustomMessage=\"'link'; let data\" [href]=\"data.href\">{{ data.text }}</a>\n * <nb-chat-message type=\"link\" [customMessageData]=\"{ href: 'https://example.com', text: 'example.com' }\">\n * </nb-chat-message>\n * </nb-chat>\n * ```\n *\n * If you want to style your custom template from the ground up you could turn off generic message styling\n * (such as round borders, color, background, etc.) via the `noStyles` input:\n * ```html\n * <div *nbCustomMessage=\"'my-custom-type'; noStyles: true\">...</div>\n * ```\n * When you decide to use your own styles, the `isReply` property of the custom message template context\n * would come in handy. This property allows you to determine whether the message is a reply or not.\n * For example, to change link text color (as replies have a different background):\n * ```html\n * <a *nbCustomMessage=\"'link'; let data; let isReply=isReply\"\n * [href]=\"data.href\"\n * [class.link-control]=\"!isReply\">\n * {{ data.label }}\n * </a>\n * ```\n *\n * Below, you could find a more complex example with multiple custom message types:\n * @stacked-example(Custom message, chat/chat-custom-message.component)\n * @styles\n *\n * chat-background-color:\n * chat-border-width:\n * chat-border-style:\n * chat-border-color:\n * chat-border-radius:\n * chat-shadow:\n * chat-floating-shadow:\n * chat-padding:\n * chat-scrollbar-color:\n * chat-scrollbar-background-color:\n * chat-scrollbar-width:\n * chat-text-color:\n * chat-text-font-family:\n * chat-text-font-size:\n * chat-text-font-weight:\n * chat-text-line-height:\n * chat-header-text-font-family:\n * chat-header-text-font-size:\n * chat-header-text-font-weight:\n * chat-header-text-line-height:\n * chat-tiny-height:\n * chat-small-height:\n * chat-medium-height:\n * chat-large-height:\n * chat-giant-height:\n * chat-basic-background-color:\n * chat-basic-text-color:\n * chat-primary-background-color:\n * chat-primary-text-color:\n * chat-success-background-color:\n * chat-success-text-color:\n * chat-info-background-color:\n * chat-info-text-color:\n * chat-warning-background-color:\n * chat-warning-text-color:\n * chat-danger-background-color:\n * chat-danger-text-color:\n * chat-control-background-color:\n * chat-control-text-color:\n * chat-divider-color:\n * chat-divider-style:\n * chat-divider-width:\n * chat-message-background:\n * chat-message-text-color:\n * chat-message-reply-background-color:\n * chat-message-reply-text-color:\n * chat-message-avatar-background-color:\n * chat-message-sender-text-color:\n * chat-message-quote-background-color:\n * chat-message-quote-text-color:\n * chat-message-file-text-color:\n * chat-message-file-background-color:\n * chat-form-input-max-height:\n */\n@Component({\n selector: 'nb-chat',\n styleUrls: ['./chat.component.scss'],\n templateUrl: './chat.component.html',\n providers: [NbChatCustomMessageService, NbChatState],\n host: {\n '[class]': 'hostClasses()'\n },\n imports: [NgTemplateOutlet]\n})\nexport class NbChatComponent {\n protected readonly texts = injectNbTexts('chat', () => ({\n noMessages: $localize`:@@nb.chat.noMessages:No messages yet.`,\n messages: $localize`:@@nb.chat.messages:Messages`,\n messagePlaceholder: $localize`:@@nb.chat.messagePlaceholder:Type a message`,\n dropFilePlaceholder: $localize`:@@nb.chat.dropFilePlaceholder:Drop file to send`,\n removeFile: (name) => $localize`:@@nb.chat.removeFile:Remove ${name}:name:`\n }))\n\n protected readonly statusService = inject(NbStatusService)\n\n /**\n * The title in the header, which also names the list of messages; an `nbChatTitle` template replaces it.\n */\n readonly title = input<string>()\n\n /**\n * A fixed height: `tiny`, `small`, `medium`, `large` or `giant`. Unset by default.\n */\n readonly size = input<NbComponentSize>()\n\n /**\n * Colours the header and the form: `basic` (default), `primary`, `success`, `info`, `warning`, `danger`,\n * `control` or a custom status.\n */\n readonly status = input<NbComponentOrCustomStatus>('basic')\n\n /**\n * Text shown while there are no messages; \"No messages yet.\" by default.\n */\n readonly noMessagesPlaceholder = input<string>()\n\n // The app's defaults for chats, which the appearance starts from.\n protected readonly nbDefaults = injectNbDefaults('chat')\n\n /**\n * Chat appearance: `outline`, a card's border, or `floating`, a shadow instead, for a chat over the page, e.g.\n * opened from a button in a corner.\n */\n readonly appearanceInput = input<NbContainerAppearance | undefined>(undefined, { alias: 'appearance' })\n /** The appearance in use: the input's, the app's default, or 'outline'. */\n readonly appearance = linkedSignal<NbContainerAppearance>(\n () => this.appearanceInput() ?? this.nbDefaults().appearance ?? 'outline'\n )\n\n /**\n * Scrolls to the latest message as messages arrive (default).\n */\n readonly scrollBottom = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n readonly scrollable = viewChild<ElementRef<HTMLElement>>('scrollable')\n readonly messages = contentChildren(NbChatMessageComponent)\n readonly chatForm = contentChild(NbChatFormRef)\n readonly titleTemplate = contentChild(NbChatTitleDirective)\n private readonly state = inject(NbChatState)\n\n protected readonly hostClasses = computed(() => [\n this.size() && `size-${this.size()}`,\n `appearance-${this.appearance()}`,\n this.statusService.getStatusClass(this.status())\n ].filter(Boolean))\n\n constructor() {\n // The form takes the chat's status.\n effect(() => {\n const status = this.status()\n untracked(() => this.chatForm()?.setStatus(status))\n })\n\n // Show the latest message once the messages render.\n afterRenderEffect(() => {\n this.messages()\n untracked(() => this.updateView())\n })\n\n // The messages it renders with are there already; later ones arrive, and animate in.\n afterNextRender(() => this.state.settled.set(true))\n }\n\n updateView() {\n if (this.scrollBottom()) {\n this.scrollListBottom()\n }\n }\n\n scrollListBottom() {\n const scrollable = this.scrollable()?.nativeElement\n if (!scrollable) {\n return\n }\n // To a message that arrives smoothly, alongside its animation; at once to the ones it renders with, or where motion\n // is reduced.\n const view = scrollable.ownerDocument.defaultView\n const smooth =\n this.state.settled() && !!view && !view.matchMedia?.('(prefers-reduced-motion: reduce)').matches\n if (smooth && typeof scrollable.scrollTo === 'function') {\n scrollable.scrollTo({ top: scrollable.scrollHeight, behavior: 'smooth' })\n } else {\n scrollable.scrollTop = scrollable.scrollHeight\n }\n }\n}\n","<div class=\"header\">\n @if (titleTemplate(); as titleTemplate) {\n <ng-container [ngTemplateOutlet]=\"titleTemplate.templateRef\"\n [ngTemplateOutletContext]=\"{ $implicit: titleTemplate.context() }\" />\n } @else {\n <span dir=\"auto\">{{ title() }}</span>\n }\n</div>\n\n<!-- A Tab stop, so the messages scroll by keyboard in Safari too. -->\n<div class=\"scrollable\"\n role=\"log\"\n tabindex=\"0\"\n [attr.aria-label]=\"title() || texts().messages\"\n #scrollable>\n <div class=\"messages\">\n <ng-content select=\"nb-chat-message\" />\n @if (!messages().length) {\n <p class=\"no-messages\"\n dir=\"auto\">{{ noMessagesPlaceholder() ?? texts().noMessages }}</p>\n }\n </div>\n</div>\n<div class=\"form\">\n <ng-content select=\"nb-chat-form\" />\n</div>\n","import {\n afterRenderEffect,\n Component,\n computed,\n ElementRef,\n inject,\n input,\n model,\n output,\n signal,\n viewChild\n} from '@angular/core'\nimport { DomSanitizer, SafeStyle } from '@angular/platform-browser'\n\nimport { NbComponentOrCustomStatus, ɵisComposing as isComposing, injectNbTexts, NbLocalize, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NbInputDirective } from '@liquid-js/lyr-core/input'\nimport { NbButtonComponent } from '@liquid-js/lyr-core/button'\nimport { NbChatFormRef } from './chat-form-ref'\n\n/** @internal */\ndeclare const $localize: NbLocalize\n\n/**\n * A file dropped or pasted in `nb-chat-form`. An image gets its data URL in `src` and a background-image style of it\n * in `urlStyle` once it's read.\n */\nexport type NbChatFormFile = File & { src?: string, urlStyle?: SafeStyle }\n\n/**\n * The message field and send button at the bottom of an `nb-chat`.\n *\n * ```ts\n * <nb-chat-form showButton=\"true\" buttonIcon=\"paper-plane-outline\">\n * </nb-chat-form>\n * ```\n *\n * The message can have several lines: Enter sends it and Shift+Enter starts a new line. The field grows with the\n * message, up to `chat-form-input-max-height`, and then scrolls.\n *\n * With `dropFiles` it handles files drag&drop with a file preview, and adds files and images pasted into the\n * field, e.g. a screenshot.\n *\n * Drag & drop available for files and images:\n *\n * @stacked-example(Drag & Drop Chat, chat/chat-drop.component)\n *\n * `send` emits the message and its files; the form is then cleared.\n *\n * ```ts\n * <nb-chat-form (send)=\"onNewMessage($event)\">\n * </nb-chat-form>\n *\n * // ...\n *\n * onNewMessage({ message: string, files: any[] }) {\n * this.service.sendToServer(message, files);\n * }\n * ```\n */\n@Component({\n selector: 'nb-chat-form',\n templateUrl: './chat-form.component.html',\n imports: [NbIconComponent, NbInputDirective, NbButtonComponent],\n providers: [{ provide: NbChatFormRef, useExisting: NbChatFormComponent }],\n host: {\n '[class.file-over]': 'fileOver()',\n '(drop)': 'onDrop($event)',\n '(dragover)': 'onDragOver($event)',\n '(dragleave)': 'onDragLeave($event)'\n }\n})\nexport class NbChatFormComponent implements NbChatFormRef {\n protected readonly texts = injectNbTexts('chat', () => ({\n noMessages: $localize`:@@nb.chat.noMessages:No messages yet.`,\n messages: $localize`:@@nb.chat.messages:Messages`,\n messagePlaceholder: $localize`:@@nb.chat.messagePlaceholder:Type a message`,\n dropFilePlaceholder: $localize`:@@nb.chat.dropFilePlaceholder:Drop file to send`,\n removeFile: (name) => $localize`:@@nb.chat.removeFile:Remove ${name}:name:`\n }))\n\n protected readonly domSanitizer = inject(DomSanitizer)\n\n readonly status = signal<NbComponentOrCustomStatus>('basic')\n readonly inputFocus = signal(false)\n readonly inputHover = signal(false)\n readonly fileOver = signal(false)\n\n readonly droppedFiles = signal<NbChatFormFile[]>([])\n imgDropTypes = ['image/png', 'image/jpeg', 'image/gif', 'image/webp', 'image/avif', 'image/svg+xml']\n\n /**\n * The message text. Two-way bindable; cleared once the message is sent.\n */\n readonly message = model<string>('')\n\n /**\n * Placeholder of the field; \"Type a message\" by default.\n */\n readonly messagePlaceholder = input<string>()\n /**\n * Text of the send button, in place of its icon.\n */\n readonly buttonTitle = input<string>('')\n\n /**\n * Icon of the send button, shown while `buttonTitle` is empty.\n */\n readonly buttonIcon = input<string>('paper-plane-outline')\n\n /**\n * Shows the send button (default). Enter sends the message either way.\n */\n readonly showButton = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Takes files dropped on the form or pasted into the field, shown as previews above it and sent with the message.\n */\n readonly dropFiles = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Placeholder of the field while a file is dragged over the form; \"Drop file to send\" by default.\n */\n readonly dropFilePlaceholder = input<string>()\n\n /**\n * Emits the message and the files dropped or pasted with it; images come with their previews.\n */\n readonly send = output<{\n message: string\n files: NbChatFormFile[]\n }>()\n\n /**\n * Emits the text as the user types.\n */\n readonly onInputChange = output<string>()\n\n private readonly messageInput = viewChild.required<ElementRef<HTMLTextAreaElement>>('messageInput')\n private readonly sendButton = viewChild('sendButton', { read: ElementRef<HTMLElement> })\n\n constructor() {\n // The send button sits in the field's corner, and the field's text stops before it: the theme knows an icon\n // button's width, and a button with a title tells it its own.\n afterRenderEffect((onCleanup) => {\n const button = this.sendButton()?.nativeElement\n const row = button?.parentElement\n if (!button || !row || typeof ResizeObserver === 'undefined') {\n return\n }\n const observer = new ResizeObserver(() =>\n row.style.setProperty('--nb-chat-send-width', `${button.offsetWidth}px`)\n )\n observer.observe(button)\n onCleanup(() => {\n observer.disconnect()\n // Kept while the button is still in the row, as when the form leaves with an animation, so the text\n // stays clear of it until it's gone.\n if (!row.contains(button)) {\n row.style.removeProperty('--nb-chat-send-width')\n }\n })\n })\n\n // The field fits the message with `field-sizing: content`; where that isn't supported, it's measured. The theme\n // limits its height, and an empty field has the height of one line.\n if (typeof CSS === 'undefined' || CSS.supports('field-sizing', 'content')) {\n return\n }\n afterRenderEffect(() => {\n const field = this.messageInput().nativeElement\n field.style.height = ''\n if (this.message()) {\n const borders = field.offsetHeight - field.clientHeight\n field.style.height = `${field.scrollHeight + borders}px`\n }\n })\n }\n\n onDrop(event: DragEvent) {\n if (this.dropFiles()) {\n event.preventDefault()\n event.stopPropagation()\n\n this.fileOver.set(false)\n if (event.dataTransfer && event.dataTransfer.files) {\n this.addFiles(event.dataTransfer.files)\n }\n }\n }\n\n /** @internal Adds pasted files, e.g. a screenshot, like dropped ones. */\n onPaste(event: ClipboardEvent) {\n const files = event.clipboardData?.files\n if (this.dropFiles() && files?.length) {\n event.preventDefault()\n this.addFiles(files)\n }\n }\n\n /** @internal */\n onInput(event: Event) {\n const value = (event.target as HTMLTextAreaElement).value\n this.message.set(value)\n this.onModelChange(value)\n }\n\n /**\n * @internal\n * Enter sends the message; Shift+Enter, and Enter that ends a composition, e.g. of a Japanese word, don't.\n */\n onEnter(event: Event) {\n const keyboardEvent = event as KeyboardEvent\n if (keyboardEvent.shiftKey || isComposing(keyboardEvent)) {\n return\n }\n event.preventDefault()\n this.sendMessage()\n }\n\n protected addFiles(files: FileList) {\n for (const file of Array.from(files)) {\n const res: NbChatFormFile = file\n\n if (this.imgDropTypes.includes(file.type)) {\n const fr = new FileReader()\n fr.onload = () => {\n // A data URL, as it's read with `readAsDataURL`.\n res.src = String(fr.result)\n res.urlStyle = this.domSanitizer.bypassSecurityTrustStyle(`url(${res.src})`)\n // A new array, so the preview renders with the loaded image.\n this.droppedFiles.update((droppedFiles) => [...droppedFiles])\n }\n\n fr.readAsDataURL(file)\n }\n this.droppedFiles.update((droppedFiles) => [...droppedFiles, res])\n }\n }\n\n removeFile(file: File) {\n this.droppedFiles.update((files) => files.filter((droppedFile) => droppedFile !== file))\n }\n\n onDragOver(event: DragEvent) {\n event.preventDefault()\n event.stopPropagation()\n if (this.dropFiles()) {\n this.fileOver.set(true)\n }\n }\n\n onDragLeave(event: DragEvent) {\n event.preventDefault()\n event.stopPropagation()\n if (this.dropFiles()) {\n this.fileOver.set(false)\n }\n }\n\n sendMessage() {\n const files = this.droppedFiles()\n if (files.length || String(this.message()).trim().length) {\n this.send.emit({ message: this.message(), files })\n this.message.set('')\n this.droppedFiles.set([])\n }\n }\n\n setStatus(status: NbComponentOrCustomStatus) {\n this.status.set(status)\n }\n\n readonly inputStatus = computed<NbComponentOrCustomStatus>(() => {\n if (this.fileOver()) {\n return this.highlightStatus()\n }\n\n if (this.inputFocus() || this.inputHover()) {\n return this.status()\n }\n\n return 'basic'\n })\n\n readonly buttonStatus = computed(() => this.highlightStatus())\n\n protected readonly highlightStatus = computed<NbComponentOrCustomStatus>(() => {\n const status = this.status()\n return status === 'basic' || status === 'control' ? 'primary' : status\n })\n\n onModelChange(value: string) {\n this.onInputChange.emit(value)\n }\n}\n","@if (droppedFiles().length) {\n<div class=\"dropped-files\">\n @for (file of droppedFiles(); track file) {\n <div [style.background-image]=\"file.urlStyle\">\n @if (!file.urlStyle) {\n <nb-icon icon=\"file-text-outline\"\n pack=\"essentials\" />\n }\n <!-- Reachable with Tab in Safari, which skips buttons by default. -->\n <button type=\"button\"\n class=\"remove\"\n tabindex=\"0\"\n [attr.aria-label]=\"texts().removeFile(file.name)\"\n (click)=\"removeFile(file)\">&times;</button>\n </div>\n }\n</div>\n}\n<div class=\"message-row\">\n <!-- Takes the direction of the message; an empty field keeps the page's, for its placeholder. -->\n <textarea #messageInput\n nbInput\n fieldSize=\"medium\"\n [attr.dir]=\"message() ? 'auto' : null\"\n fullWidth\n rows=\"1\"\n [status]=\"inputStatus()\"\n (focus)=\"inputFocus.set(true)\"\n (blur)=\"inputFocus.set(false)\"\n (mouseenter)=\"inputHover.set(true)\"\n (mouseleave)=\"inputHover.set(false)\"\n [value]=\"message()\"\n (input)=\"onInput($event)\"\n (keydown.enter)=\"onEnter($event)\"\n (paste)=\"onPaste($event)\"\n [class.with-button]=\"showButton()\"\n [placeholder]=\"fileOver()\n ? (dropFilePlaceholder() ?? texts().dropFilePlaceholder)\n : (messagePlaceholder() ?? texts().messagePlaceholder)\"></textarea>\n @if (showButton()) {\n <button #sendButton\n type=\"button\"\n nbButton\n size=\"medium\"\n [status]=\"buttonStatus()\"\n [class.with-icon]=\"!buttonTitle()\"\n (click)=\"sendMessage()\"\n class=\"send-button\">\n @if (!buttonTitle()) {\n <nb-icon [icon]=\"buttonIcon()\"\n pack=\"essentials\" />\n } @else {{{ buttonTitle() }}}\n </button>\n }\n</div>\n","import { computed, Directive, inject, input, OnDestroy, OnInit, TemplateRef } from '@angular/core'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbChatCustomMessageService } from './chat-custom-message.service'\n\nfunction throwCustomMessageTypeIsRequired(): never {\n throw new Error('[nbCustomMessage]: custom message type is required.')\n}\n\n/**\n * A template for the messages of a custom `type` in an `nb-chat`, declared before them, as a structural directive or\n * on an `ng-template`. It gets the message's `customMessageData` as `$implicit` and whether it's a reply as `isReply`:\n *\n * ```html\n * <div *nbCustomMessage=\"'my-custom-type'; let data\">\n * <!-- custom message -->\n * </div>\n * ```\n * or\n * ```html\n * <ng-template nbCustomMessage='my-custom-type' let-data>\n * <!-- custom message -->\n * </ng-template>\n * ```\n */\n@Directive({ selector: '[nbCustomMessage]' })\nexport class NbChatCustomMessageDirective implements OnInit, OnDestroy {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef)\n protected readonly customMessageService = inject(NbChatCustomMessageService)\n\n /**\n * The message type the template renders.\n */\n readonly nbCustomMessage = input.required<string>()\n\n /**\n * Drops the message styles, such as the rounded corners, text colour and background, so a custom message can be\n * styled from the ground up.\n */\n readonly nbCustomMessageNoStyles = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * The custom message type.\n */\n readonly type = computed(() => this.nbCustomMessage())\n\n /**\n * Whether the message is rendered without the default message styles.\n */\n readonly noStyles = computed(() => this.nbCustomMessageNoStyles())\n\n ngOnInit() {\n const type = this.type()\n if (!type) {\n throwCustomMessageTypeIsRequired()\n }\n this.customMessageService.register(type, this)\n }\n\n ngOnDestroy() {\n this.customMessageService.unregister(this.type())\n }\n}\n","import { ModuleWithProviders, NgModule, EnvironmentProviders, makeEnvironmentProviders } from '@angular/core'\n\nimport { NbButtonModule } from '@liquid-js/lyr-core/button'\nimport { NbInputModule } from '@liquid-js/lyr-core/input'\nimport { NbIconModule } from '@liquid-js/lyr-core/icon'\n\nimport { NbChatComponent } from './chat.component'\nimport { NbChatMessageComponent } from './chat-message.component'\nimport { NbChatFormComponent } from './chat-form.component'\nimport { NbChatMessageTextComponent } from './chat-message-text.component'\nimport { NbChatMessageFileComponent } from './chat-message-file.component'\nimport { NbChatMessageQuoteComponent } from './chat-message-quote.component'\nimport { NbChatMessageMapComponent } from './chat-message-map.component'\nimport { NbChatOptions } from './chat.options'\nimport { NbChatAvatarComponent } from './chat-avatar.component'\nimport { NbChatCustomMessageDirective } from './chat-custom-message.directive'\nimport { NbChatTitleDirective } from './chat-title.directive'\n\nconst NB_CHAT_COMPONENTS = [\n NbChatComponent,\n NbChatMessageComponent,\n NbChatFormComponent,\n NbChatMessageTextComponent,\n NbChatMessageFileComponent,\n NbChatMessageQuoteComponent,\n NbChatMessageMapComponent,\n NbChatAvatarComponent\n]\n\nconst NB_CHAT_DIRECTIVES = [NbChatCustomMessageDirective, NbChatTitleDirective]\n\n/**\n * Provides the chat options, in place of `NbChatModule.forRoot()` or `forChild()`.\n */\nexport function provideNbChat(options?: NbChatOptions): EnvironmentProviders {\n return makeEnvironmentProviders([{ provide: NbChatOptions, useValue: options || {} }])\n}\n\n@NgModule({\n imports: [NbIconModule, NbInputModule, NbButtonModule, ...NB_CHAT_COMPONENTS, ...NB_CHAT_DIRECTIVES],\n exports: [...NB_CHAT_COMPONENTS, ...NB_CHAT_DIRECTIVES]\n})\nexport class NbChatModule {\n static forRoot(options?: NbChatOptions): ModuleWithProviders<NbChatModule> {\n return { ngModule: NbChatModule, providers: [provideNbChat(options)] }\n }\n\n static forChild(options?: NbChatOptions): ModuleWithProviders<NbChatModule> {\n return { ngModule: NbChatModule, providers: [provideNbChat(options)] }\n }\n}\n"],"mappings":";;;;;;;;AAMA,IAAsB,gBAAtB,MAAmC,CAElC;ACGD,IAAa,6BAAb,MAAa,2BAA0B;CALvC,cAAA;EAUa,KAAA,SAAS,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;EAKxB,KAAA,UAAU,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;EAKzB,KAAA,OAAO,MAAa,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAKpB,KAAA,aAAa,MAAc,aAAY,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAEnD;CAtBY;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA0B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAA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GAAE,UAAU;GAAc,WAAW,CAAC,cAAc,OAAO,CAAC;EAAC;CACxE;CAEA,OAAO,SAAS,SAAuB;EACnC,OAAO;GAAE,UAAU;GAAc,WAAW,CAAC,cAAc,OAAO,CAAC;EAAC;CACxE;CAPS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAY,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAZ;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAY,SAAA;IAHX;IAAc;IAAe;IApBvC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGwB;IAA8B;GAAoB;GAAA,SAAA;IAV1E;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAGwB;IAA8B;GAAoB;EAAA,CAAA;CAAA;CAajE;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAY,SAAA;IAHX;IAAc;IAAe;IAnBvC;IACA;IAEA;IAEA;GAAyB;EAAA,CAAA;CAAA;;AAiBhB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EAJxB,MAAA;EAAS,MAAA,CAAA;GACN,SAAS;IAAC;IAAc;IAAe;IAAgB,GAAG;IAAoB,GAAG;GAAkB;GACnG,SAAS,CAAC,GAAG,oBAAoB,GAAG,kBAAkB;EACzD,CAAA"}
@@ -69,6 +69,7 @@ var NbContextMenuComponent = class NbContextMenuComponent extends NbPositionedCo
69
69
  "tag",
70
70
  "items",
71
71
  "autoCollapse",
72
+ "highlightParents",
72
73
  "orientation"
73
74
  ]
74
75
  }],
@@ -1 +1 @@
1
- {"version":3,"file":"liquid-js-lyr-core-context-menu.mjs","names":["convertToBoolProperty"],"sources":["../../../packages/core/src/components/context-menu/context-menu.component.ts","../../../packages/core/src/components/context-menu/context-menu.directive.ts","../../../packages/core/src/components/context-menu/context-menu.module.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core'\n\nimport { NbMenuItem, NbMenuComponent } from '@liquid-js/lyr-core/menu'\nimport { NbPositionedContainerComponent, NbRenderableContainer } from '@liquid-js/lyr-core/cdk'\n\n/**\n * The overlay `NbContextMenuDirective` opens: an `nb-menu` of its items.\n *\n * @styles\n *\n * context-menu-background-color:\n * context-menu-border-color:\n * context-menu-border-style:\n * context-menu-border-width:\n * context-menu-border-radius:\n * context-menu-text-align:\n * context-menu-min-width:\n * context-menu-max-width:\n * context-menu-shadow:\n * */\n@Component({\n selector: 'nb-context-menu',\n template: '<nb-menu class=\"context-menu\" [items]=\"context().items\" [tag]=\"context().tag\" />',\n // The menu inside reads items that apps change in place.\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [NbMenuComponent],\n host: {\n 'animate.enter': 'nb-overlay-enter',\n 'animate.leave': 'nb-overlay-leave'\n }\n})\nexport class NbContextMenuComponent extends NbPositionedContainerComponent implements NbRenderableContainer {\n readonly items = input<NbMenuItem[]>([])\n readonly tag = input<string>()\n\n readonly context = input<{ items: NbMenuItem[], tag?: string }>({ items: [] })\n\n /**\n * Nothing to do: change detection renders the menu from `context`.\n */\n renderContent() {}\n}\n","import {\n Injector,\n afterNextRender,\n AfterViewInit,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n OnChanges,\n OnDestroy,\n OnInit,\n signal\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { filter } from 'rxjs/operators'\n\nimport { NbDynamicOverlay, NbDynamicOverlayController, NbDynamicOverlayHandler, nbCreateDynamicOverlayHandler, NbOverlayConfig, NbAdjustment, NbAdjustmentValues, NbPosition, NbPositionValues, NbTrigger, NbTriggerValues } from '@liquid-js/lyr-core/cdk'\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbMenuItem, NbMenuService } from '@liquid-js/lyr-core/menu'\nimport { NbContextMenuComponent } from './context-menu.component'\n\nexport interface NbContextMenuContext {\n items: NbMenuItem[]\n tag?: string\n position: NbPosition\n}\n\nlet lastContextMenuId = 0\n\n/**\n * Opens a menu of items from an element, e.g. a profile button, in an overlay beside it.\n *\n * @stacked-example(Showcase, context-menu/context-menu-showcase.component)\n *\n * Pass the menu items:\n *\n * ```html\n * <button [nbContextMenu]=\"items\"></button>\n * ...\n * items = [{ title: 'Profile' }, { title: 'Log out' }];\n * ```\n * ### Installation\n *\n * Import `NbContextMenuDirective` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbContextMenuDirective],\n * })\n * export class PageComponent { }\n * ```\n *\n * and add `provideNbMenu()` to the application providers:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideNbMenu()],\n * });\n * ```\n *\n * With NgModules:\n *\n * Import `NbContextMenuModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbContextMenuModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n * Also make sure `NbMenuModule` is imported to your `app.module`.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbMenuModule.forRoot(),\n * ],\n * })\n * export class AppModule { }\n * ```\n *\n * ### Usage\n *\n * The menu inside is an `nb-menu`, so item clicks come through `NbMenuService`: give the menu an `nbContextMenuTag`\n * and listen for clicks with that tag. The menu closes after a click on an item.\n * @stacked-example(Menu item click, context-menu/context-menu-click.component)\n *\n * `nbContextMenuPlacement` puts the menu at the host's `bottom` (default), `top`, `start`, `end`, `left` or `right`,\n * or at a corner such as `bottom-start`:\n *\n * ```html\n * <button [nbContextMenu]=\"items\" nbContextMenuPlacement=\"right\"></button>\n * ```\n *\n * ```ts\n * items = [{ title: 'Profile' }, { title: 'Log out' }];\n * ```\n *\n * When the menu doesn't fit the viewport it moves to another side, `clockwise` by default; `nbContextMenuAdjustment`\n * changes that to `counterclockwise`, `vertical`, `horizontal`, or `noop` to keep it where it is:\n *\n * ```html\n * <button [nbContextMenu]=\"items\" nbContextMenuAdjustment=\"counterclockwise\"></button>\n * ```\n *\n * ```ts\n * items = [{ title: 'Profile' }, { title: 'Log out' }];\n * ```\n * `nbContextMenuTrigger` sets what opens and closes the menu:\n *\n * - `click` (default) opens it with a click on the host and closes it with a click elsewhere on the page. The host\n * is a disclosure then, with `aria-expanded` and `aria-controls`; a menu opened by keyboard takes the focus to its\n * first item, and Escape brings it back.\n * - `hint` opens it while the pointer is over the host.\n * - `hover` is `hint`, but the menu stays open while the pointer moves from the host onto it, so its items can be\n * clicked.\n * - `focus` opens it while the host has focus.\n * - `noop` leaves it to `show()`, `hide()` and `toggle()`.\n * @stacked-example(Available Triggers, context-menu/context-menu-modes.component.html)\n *\n * `noop` is for a menu opened from code, e.g. after a request or a check, or on a right click:\n * @stacked-example(Manual Control, context-menu/context-menu-noop.component)\n * @stacked-example(Manual Control, context-menu/context-menu-right-click.component)\n */\n@Directive({\n selector: '[nbContextMenu]',\n host: {\n 'class': 'context-menu-host',\n // A host the menu opens from on click says whether it's open, and what it opens, as a disclosure does.\n '[attr.aria-expanded]': 'discloses() ? expanded() : null',\n '[attr.aria-controls]': 'discloses() && expanded() ? containerId : null',\n '(click)': 'noteKeyboardOpen($event)'\n }\n})\nexport class NbContextMenuDirective implements NbDynamicOverlayController, OnChanges, AfterViewInit, OnDestroy, OnInit {\n private readonly hostRef = inject(ElementRef)\n private readonly menuService = inject(NbMenuService)\n private readonly destroyRef = inject(DestroyRef)\n private readonly injector = inject(Injector)\n\n /**\n * Where the menu opens, relative to the host: `bottom` (default), `top`, `start`, `end`, `left`, `right`, or a\n * corner such as `bottom-start`.\n */\n readonly position = input<NbPosition, NbPositionValues>(NbPosition.BOTTOM, {\n alias: 'nbContextMenuPlacement',\n transform: (value) => value as NbPosition\n })\n\n /**\n * Where the menu moves when it doesn't fit the viewport: to the next side `clockwise` (default) or\n * `counterclockwise`, to the opposite side `vertical`ly or `horizontal`ly, or nowhere with `noop`.\n */\n readonly adjustment = input<NbAdjustment, NbAdjustmentValues>(NbAdjustment.CLOCKWISE, {\n alias: 'nbContextMenuAdjustment',\n transform: (value) => value as NbAdjustment\n })\n\n /**\n * The tag of the `nb-menu` inside, which tells its events apart in `NbMenuService`.\n */\n readonly tag = input<string>(undefined, { alias: 'nbContextMenuTag' })\n\n /**\n * The menu items. Without any, the menu doesn't open.\n */\n readonly items = input<NbMenuItem[], NbMenuItem[] | null | undefined>([], {\n alias: 'nbContextMenu',\n // An empty or missing list keeps the menu closed (see configureDynamicOverlay) instead of throwing.\n transform: (items) => items ?? []\n })\n\n /**\n * What opens and closes the menu: `click` (default), `hover`, `hint`, `focus` or `noop`.\n */\n readonly trigger = input<NbTrigger, NbTriggerValues>(NbTrigger.CLICK, {\n alias: 'nbContextMenuTrigger',\n transform: (value) => value as NbTrigger\n })\n\n /**\n * Class added to the overlay pane, for styling the menu.\n */\n readonly contextMenuClass = input('', { alias: 'nbContextMenuClass' })\n\n /** The menu's distance from its host, as a popover's `nbPopoverOffset`. */\n readonly offset = input(15, { alias: 'nbContextMenuOffset' })\n\n /** Keeps the menu from opening, as a popover's `nbPopoverDisabled`. */\n readonly disabled = input<boolean, NbBooleanInput>(false, {\n alias: 'nbContextMenuDisabled',\n transform: convertToBoolProperty\n })\n\n protected readonly overlayConfig = computed<NbOverlayConfig>(() => ({ panelClass: this.contextMenuClass() }))\n protected readonly overlayContext = computed<NbContextMenuContext>(() => ({\n items: this.items(),\n tag: this.tag(),\n position: this.position()\n }))\n\n private dynamicOverlay?: NbDynamicOverlay\n\n private readonly dynamicOverlayHandler =\n inject(NbDynamicOverlayHandler, { optional: true, self: true }) ?? nbCreateDynamicOverlayHandler()\n\n ngOnInit() {\n this.dynamicOverlayHandler\n .host(this.hostRef)\n .componentType(NbContextMenuComponent)\n }\n\n ngOnChanges() {\n this.rebuild()\n }\n\n protected readonly expanded = signal(false)\n protected readonly containerId = `nb-context-menu-${lastContextMenuId++}`\n protected readonly discloses = computed(() => this.trigger() === NbTrigger.CLICK)\n\n ngAfterViewInit() {\n const overlay = this.configureDynamicOverlay().build()\n this.dynamicOverlay = overlay\n overlay.isShown.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((shown) => {\n this.expanded.set(shown)\n overlay.containerElement?.setAttribute('id', this.containerId)\n })\n this.subscribeOnItemClick()\n // A menu the keyboard opens takes the focus to its first item, as a menu button's does, so the keyboard can go on\n // to choose one; Escape brings it back.\n overlay.isShown\n .pipe(\n filter((shown) => shown && this.openedByKeyboard),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() =>\n afterNextRender(\n () => overlay.containerElement?.querySelector<HTMLElement>('a[href], button, [tabindex=\"0\"]')?.focus(),\n { injector: this.injector }\n )\n )\n }\n\n // Whether the host was last activated by the keyboard: its click then has no mouse button presses.\n private openedByKeyboard = false\n\n protected noteKeyboardOpen(event: MouseEvent) {\n this.openedByKeyboard = event.detail === 0\n }\n\n rebuild() {\n this.dynamicOverlay = this.configureDynamicOverlay()\n .rebuild()\n }\n\n show() {\n this.builtOverlay().show()\n }\n\n hide() {\n this.builtOverlay().hide()\n }\n\n toggle() {\n this.builtOverlay().toggle()\n }\n\n ngOnDestroy() {\n this.dynamicOverlayHandler.destroy()\n }\n\n private builtOverlay(): NbDynamicOverlay {\n if (!this.dynamicOverlay) {\n throw new Error('NbContextMenuDirective: the context menu is built once the view initialises.')\n }\n return this.dynamicOverlay\n }\n\n protected configureDynamicOverlay() {\n return this.dynamicOverlayHandler\n .position(this.position())\n .trigger(this.trigger())\n .disabled(this.disabled() || !this.items().length)\n .offset(this.offset())\n .adjustment(this.adjustment())\n .context(this.overlayContext())\n .overlayConfig(this.overlayConfig())\n }\n\n private subscribeOnItemClick() {\n this.menuService.onItemClick()\n .pipe(\n filter(({ tag }) => tag === this.tag() && this.trigger() !== NbTrigger.NOOP),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.hide())\n }\n}\n","import { NgModule } from '@angular/core'\n\nimport { NbOverlayModule } from '@liquid-js/lyr-core/cdk'\nimport { NbMenuModule } from '@liquid-js/lyr-core/menu'\nimport { NbContextMenuDirective } from './context-menu.directive'\nimport { NbContextMenuComponent } from './context-menu.component'\n\n@NgModule({\n imports: [NbOverlayModule, NbMenuModule, NbContextMenuDirective, NbContextMenuComponent],\n exports: [NbContextMenuDirective]\n})\nexport class NbContextMenuModule {\n}\n"],"mappings":";;;;;;;AA+BA,IAAa,yBAAb,MAAa,+BAA+B,+BAA8B;CAX1E,cAAA;;EAYa,KAAA,QAAQ,MAAoB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAC/B,KAAA,MAAM,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,MAAA,CAAA,+BAAA,CAAA,CAAA;EAErB,KAAA,UAAU,MAA6C,EAAE,OAAO,CAAA,EAAE,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAMjF;CADG,gBAAa,CAAI;CATR;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAtB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAsB,cAAA;GAAA,UAAA;GAAA,QAAA;IAAA,OAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,KAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,SAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,MAAA,EAAA,YAAA;IAAA,iBAA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A;GAAA,eAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAtB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EAVlC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,MAAM;IACF,SAAS;IAET,wBAAwB;IACxB,wBAAwB;IACxB,WAAW;GACd;EACJ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5HD,IAAa,sBAAb,MAAa,oBAAmB;CAAnB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAnB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmB,SAAA;IAHlB;IAAiB;IAAc;IAAwB;GAAsB;GAAA,SAAA,CAC7E,sBAAsB;EAAA,CAAA;CAAA;CAEvB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmB,SAAA;IAHlB;IAAiB;IAAsC;GAAsB;EAAA,CAAA;CAAA;;AAG9E,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EAJ/B,MAAA;EAAS,MAAA,CAAA;GACN,SAAS;IAAC;IAAiB;IAAc;IAAwB;GAAsB;GACvF,SAAS,CAAC,sBAAsB;EACnC,CAAA"}
1
+ {"version":3,"file":"liquid-js-lyr-core-context-menu.mjs","names":["convertToBoolProperty"],"sources":["../../../packages/core/src/components/context-menu/context-menu.component.ts","../../../packages/core/src/components/context-menu/context-menu.directive.ts","../../../packages/core/src/components/context-menu/context-menu.module.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input } from '@angular/core'\n\nimport { NbMenuItem, NbMenuComponent } from '@liquid-js/lyr-core/menu'\nimport { NbPositionedContainerComponent, NbRenderableContainer } from '@liquid-js/lyr-core/cdk'\n\n/**\n * The overlay `NbContextMenuDirective` opens: an `nb-menu` of its items.\n *\n * @styles\n *\n * context-menu-background-color:\n * context-menu-border-color:\n * context-menu-border-style:\n * context-menu-border-width:\n * context-menu-border-radius:\n * context-menu-text-align:\n * context-menu-min-width:\n * context-menu-max-width:\n * context-menu-shadow:\n * */\n@Component({\n selector: 'nb-context-menu',\n template: '<nb-menu class=\"context-menu\" [items]=\"context().items\" [tag]=\"context().tag\" />',\n // The menu inside reads items that apps change in place.\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [NbMenuComponent],\n host: {\n 'animate.enter': 'nb-overlay-enter',\n 'animate.leave': 'nb-overlay-leave'\n }\n})\nexport class NbContextMenuComponent extends NbPositionedContainerComponent implements NbRenderableContainer {\n readonly items = input<NbMenuItem[]>([])\n readonly tag = input<string>()\n\n readonly context = input<{ items: NbMenuItem[], tag?: string }>({ items: [] })\n\n /**\n * Nothing to do: change detection renders the menu from `context`.\n */\n renderContent() {}\n}\n","import {\n Injector,\n afterNextRender,\n AfterViewInit,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n OnChanges,\n OnDestroy,\n OnInit,\n signal\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { filter } from 'rxjs/operators'\n\nimport { NbDynamicOverlay, NbDynamicOverlayController, NbDynamicOverlayHandler, nbCreateDynamicOverlayHandler, NbOverlayConfig, NbAdjustment, NbAdjustmentValues, NbPosition, NbPositionValues, NbTrigger, NbTriggerValues } from '@liquid-js/lyr-core/cdk'\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbMenuItem, NbMenuService } from '@liquid-js/lyr-core/menu'\nimport { NbContextMenuComponent } from './context-menu.component'\n\nexport interface NbContextMenuContext {\n items: NbMenuItem[]\n tag?: string\n position: NbPosition\n}\n\nlet lastContextMenuId = 0\n\n/**\n * Opens a menu of items from an element, e.g. a profile button, in an overlay beside it.\n *\n * @stacked-example(Showcase, context-menu/context-menu-showcase.component)\n *\n * Pass the menu items:\n *\n * ```html\n * <button [nbContextMenu]=\"items\"></button>\n * ...\n * items = [{ title: 'Profile' }, { title: 'Log out' }];\n * ```\n * ### Installation\n *\n * Import `NbContextMenuDirective` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbContextMenuDirective],\n * })\n * export class PageComponent { }\n * ```\n *\n * and add `provideNbMenu()` to the application providers:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideNbMenu()],\n * });\n * ```\n *\n * With NgModules:\n *\n * Import `NbContextMenuModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbContextMenuModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n * Also make sure `NbMenuModule` is imported to your `app.module`.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbMenuModule.forRoot(),\n * ],\n * })\n * export class AppModule { }\n * ```\n *\n * ### Usage\n *\n * The menu inside is an `nb-menu`, so item clicks come through `NbMenuService`: give the menu an `nbContextMenuTag`\n * and listen for clicks with that tag. The menu closes after a click on an item.\n * @stacked-example(Menu item click, context-menu/context-menu-click.component)\n *\n * `nbContextMenuPlacement` puts the menu at the host's `bottom` (default), `top`, `start`, `end`, `left` or `right`,\n * or at a corner such as `bottom-start`:\n *\n * ```html\n * <button [nbContextMenu]=\"items\" nbContextMenuPlacement=\"right\"></button>\n * ```\n *\n * ```ts\n * items = [{ title: 'Profile' }, { title: 'Log out' }];\n * ```\n *\n * When the menu doesn't fit the viewport it moves to another side, `clockwise` by default; `nbContextMenuAdjustment`\n * changes that to `counterclockwise`, `vertical`, `horizontal`, or `noop` to keep it where it is:\n *\n * ```html\n * <button [nbContextMenu]=\"items\" nbContextMenuAdjustment=\"counterclockwise\"></button>\n * ```\n *\n * ```ts\n * items = [{ title: 'Profile' }, { title: 'Log out' }];\n * ```\n * `nbContextMenuTrigger` sets what opens and closes the menu:\n *\n * - `click` (default) opens it with a click on the host and closes it with a click elsewhere on the page. The host\n * is a disclosure then, with `aria-expanded` and `aria-controls`; a menu opened by keyboard takes the focus to its\n * first item, and Escape brings it back.\n * - `hint` opens it while the pointer is over the host.\n * - `hover` is `hint`, but the menu stays open while the pointer moves from the host onto it, so its items can be\n * clicked.\n * - `focus` opens it while the host has focus.\n * - `noop` leaves it to `show()`, `hide()` and `toggle()`.\n * @stacked-example(Available Triggers, context-menu/context-menu-modes.component.html)\n *\n * `noop` is for a menu opened from code, e.g. after a request or a check, or on a right click:\n * @stacked-example(Manual Control, context-menu/context-menu-noop.component)\n * @stacked-example(Manual Control, context-menu/context-menu-right-click.component)\n */\n@Directive({\n selector: '[nbContextMenu]',\n host: {\n 'class': 'context-menu-host',\n // A host the menu opens from on click says whether it's open, and what it opens, as a disclosure does.\n '[attr.aria-expanded]': 'discloses() ? expanded() : null',\n '[attr.aria-controls]': 'discloses() && expanded() ? containerId : null',\n '(click)': 'noteKeyboardOpen($event)'\n }\n})\nexport class NbContextMenuDirective implements NbDynamicOverlayController, OnChanges, AfterViewInit, OnDestroy, OnInit {\n private readonly hostRef = inject(ElementRef)\n private readonly menuService = inject(NbMenuService)\n private readonly destroyRef = inject(DestroyRef)\n private readonly injector = inject(Injector)\n\n /**\n * Where the menu opens, relative to the host: `bottom` (default), `top`, `start`, `end`, `left`, `right`, or a\n * corner such as `bottom-start`.\n */\n readonly position = input<NbPosition, NbPositionValues>(NbPosition.BOTTOM, {\n alias: 'nbContextMenuPlacement',\n transform: (value) => value as NbPosition\n })\n\n /**\n * Where the menu moves when it doesn't fit the viewport: to the next side `clockwise` (default) or\n * `counterclockwise`, to the opposite side `vertical`ly or `horizontal`ly, or nowhere with `noop`.\n */\n readonly adjustment = input<NbAdjustment, NbAdjustmentValues>(NbAdjustment.CLOCKWISE, {\n alias: 'nbContextMenuAdjustment',\n transform: (value) => value as NbAdjustment\n })\n\n /**\n * The tag of the `nb-menu` inside, which tells its events apart in `NbMenuService`.\n */\n readonly tag = input<string>(undefined, { alias: 'nbContextMenuTag' })\n\n /**\n * The menu items. Without any, the menu doesn't open.\n */\n readonly items = input<NbMenuItem[], NbMenuItem[] | null | undefined>([], {\n alias: 'nbContextMenu',\n // An empty or missing list keeps the menu closed (see configureDynamicOverlay) instead of throwing.\n transform: (items) => items ?? []\n })\n\n /**\n * What opens and closes the menu: `click` (default), `hover`, `hint`, `focus` or `noop`.\n */\n readonly trigger = input<NbTrigger, NbTriggerValues>(NbTrigger.CLICK, {\n alias: 'nbContextMenuTrigger',\n transform: (value) => value as NbTrigger\n })\n\n /**\n * Class added to the overlay pane, for styling the menu.\n */\n readonly contextMenuClass = input('', { alias: 'nbContextMenuClass' })\n\n /** The menu's distance from its host, as a popover's `nbPopoverOffset`. */\n readonly offset = input(15, { alias: 'nbContextMenuOffset' })\n\n /** Keeps the menu from opening, as a popover's `nbPopoverDisabled`. */\n readonly disabled = input<boolean, NbBooleanInput>(false, {\n alias: 'nbContextMenuDisabled',\n transform: convertToBoolProperty\n })\n\n protected readonly overlayConfig = computed<NbOverlayConfig>(() => ({ panelClass: this.contextMenuClass() }))\n protected readonly overlayContext = computed<NbContextMenuContext>(() => ({\n items: this.items(),\n tag: this.tag(),\n position: this.position()\n }))\n\n private dynamicOverlay?: NbDynamicOverlay\n\n private readonly dynamicOverlayHandler =\n inject(NbDynamicOverlayHandler, { optional: true, self: true }) ?? nbCreateDynamicOverlayHandler()\n\n ngOnInit() {\n this.dynamicOverlayHandler\n .host(this.hostRef)\n .componentType(NbContextMenuComponent)\n }\n\n ngOnChanges() {\n this.rebuild()\n }\n\n protected readonly expanded = signal(false)\n protected readonly containerId = `nb-context-menu-${lastContextMenuId++}`\n protected readonly discloses = computed(() => this.trigger() === NbTrigger.CLICK)\n\n ngAfterViewInit() {\n const overlay = this.configureDynamicOverlay().build()\n this.dynamicOverlay = overlay\n overlay.isShown.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((shown) => {\n this.expanded.set(shown)\n overlay.containerElement?.setAttribute('id', this.containerId)\n })\n this.subscribeOnItemClick()\n // A menu the keyboard opens takes the focus to its first item, as a menu button's does, so the keyboard can go on\n // to choose one; Escape brings it back.\n overlay.isShown\n .pipe(\n filter((shown) => shown && this.openedByKeyboard),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() =>\n afterNextRender(\n () => overlay.containerElement?.querySelector<HTMLElement>('a[href], button, [tabindex=\"0\"]')?.focus(),\n { injector: this.injector }\n )\n )\n }\n\n // Whether the host was last activated by the keyboard: its click then has no mouse button presses.\n private openedByKeyboard = false\n\n protected noteKeyboardOpen(event: MouseEvent) {\n this.openedByKeyboard = event.detail === 0\n }\n\n rebuild() {\n this.dynamicOverlay = this.configureDynamicOverlay()\n .rebuild()\n }\n\n show() {\n this.builtOverlay().show()\n }\n\n hide() {\n this.builtOverlay().hide()\n }\n\n toggle() {\n this.builtOverlay().toggle()\n }\n\n ngOnDestroy() {\n this.dynamicOverlayHandler.destroy()\n }\n\n private builtOverlay(): NbDynamicOverlay {\n if (!this.dynamicOverlay) {\n throw new Error('NbContextMenuDirective: the context menu is built once the view initialises.')\n }\n return this.dynamicOverlay\n }\n\n protected configureDynamicOverlay() {\n return this.dynamicOverlayHandler\n .position(this.position())\n .trigger(this.trigger())\n .disabled(this.disabled() || !this.items().length)\n .offset(this.offset())\n .adjustment(this.adjustment())\n .context(this.overlayContext())\n .overlayConfig(this.overlayConfig())\n }\n\n private subscribeOnItemClick() {\n this.menuService.onItemClick()\n .pipe(\n filter(({ tag }) => tag === this.tag() && this.trigger() !== NbTrigger.NOOP),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.hide())\n }\n}\n","import { NgModule } from '@angular/core'\n\nimport { NbOverlayModule } from '@liquid-js/lyr-core/cdk'\nimport { NbMenuModule } from '@liquid-js/lyr-core/menu'\nimport { NbContextMenuDirective } from './context-menu.directive'\nimport { NbContextMenuComponent } from './context-menu.component'\n\n@NgModule({\n imports: [NbOverlayModule, NbMenuModule, NbContextMenuDirective, NbContextMenuComponent],\n exports: [NbContextMenuDirective]\n})\nexport class NbContextMenuModule {\n}\n"],"mappings":";;;;;;;AA+BA,IAAa,yBAAb,MAAa,+BAA+B,+BAA8B;CAX1E,cAAA;;EAYa,KAAA,QAAQ,MAAoB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAC/B,KAAA,MAAM,MAAe,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,MAAA,CAAA,+BAAA,CAAA,CAAA;EAErB,KAAA,UAAU,MAA6C,EAAE,OAAO,CAAA,EAAE,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAMjF;CADG,gBAAa,CAAI;CATR;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAsB,MAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAtB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAsB,cAAA;GAAA,UAAA;GAAA,QAAA;IAAA,OAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,KAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;IAAA,SAAA;KAAA,mBAAA;KAAA,YAAA;KAAA,UAAA;KAAA,YAAA;KAAA,mBAAA;IAAA;GAAA;GAAA,MAAA,EAAA,YAAA;IAAA,iBAAA;IAAA,iBAAA;GAAA,EAAA;GAAA,iBAAA;GAAA,UAAA;GAAA,UATrB;GAAkF,UAAA;GAAA,cAAA,CA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AA;CAAA,UAAA;CAAA,MAAA;CAAsB,YAAA,CAAA;EAVlC,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,MAAM;IACF,SAAS;IAET,wBAAwB;IACxB,wBAAwB;IACxB,WAAW;GACd;EACJ,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC5HD,IAAa,sBAAb,MAAa,oBAAmB;CAAnB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAnB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmB,SAAA;IAHlB;IAAiB;IAAc;IAAwB;GAAsB;GAAA,SAAA,CAC7E,sBAAsB;EAAA,CAAA;CAAA;CAEvB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmB,SAAA;IAHlB;IAAiB;IAAsC;GAAsB;EAAA,CAAA;CAAA;;AAG9E,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EAJ/B,MAAA;EAAS,MAAA,CAAA;GACN,SAAS;IAAC;IAAiB;IAAc;IAAwB;GAAsB;GACvF,SAAS,CAAC,sBAAsB;EACnC,CAAA"}
@@ -1,9 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
- import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, ErrorHandler, InjectionToken, Injector, NgModule, Service, TemplateRef, afterNextRender, computed, inject, input, makeEnvironmentProviders, signal, viewChild } from "@angular/core";
2
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, ElementRef, ErrorHandler, InjectionToken, Injector, NgModule, Service, TemplateRef, afterNextRender, computed, inject, input, makeEnvironmentProviders, signal, viewChild } from "@angular/core";
3
3
  import { Subject, isObservable, lastValueFrom } from "rxjs";
4
4
  import { NbComponentPortal, NbEscapeStack, NbFocusTrapFactoryService, NbOverlayModule, NbOverlayService, NbPortalOutletDirective, NbPositionBuilderService, NbPositionHelper, NbTemplatePortal, disposeAfterBackdrop, setComponentContext } from "@liquid-js/lyr-core/cdk";
5
5
  import { NB_DOCUMENT, injectNbTexts, ɵanimatePane as animateDialog } from "@liquid-js/lyr-core/base";
6
- import { NavigationStart, Router } from "@angular/router";
6
+ import { NavigationStart, Router, UrlTree } from "@angular/router";
7
7
  import { filter, takeUntil } from "rxjs/operators";
8
8
  import { NgTemplateOutlet } from "@angular/common";
9
9
  import { NbButtonComponent } from "@liquid-js/lyr-core/button";
@@ -18,7 +18,7 @@ var NbDialogConfig = class {
18
18
  this.closeOnEsc = true;
19
19
  this.hasScroll = false;
20
20
  this.autoFocus = true;
21
- this.closeOnNavigation = true;
21
+ this.closeOnNavigation = false;
22
22
  this.position = "center";
23
23
  this.positionOffset = "";
24
24
  this.role = "dialog";
@@ -51,6 +51,7 @@ var NbDialogContainerComponent = class NbDialogContainerComponent {
51
51
  this.elementRef = inject(ElementRef);
52
52
  this.focusTrapFactory = inject(NbFocusTrapFactoryService);
53
53
  this.injector = inject(Injector);
54
+ this.changeDetectorRef = inject(ChangeDetectorRef);
54
55
  this.portalOutlet = viewChild.required(NbPortalOutletDirective, ...ngDevMode ? [{ debugName: "portalOutlet" }] : /* istanbul ignore next */ []);
55
56
  }
56
57
  ngOnInit() {
@@ -70,6 +71,9 @@ var NbDialogContainerComponent = class NbDialogContainerComponent {
70
71
  attachTemplatePortal(portal) {
71
72
  return this.portalOutlet().attachTemplatePortal(portal);
72
73
  }
74
+ detectChanges() {
75
+ this.changeDetectorRef.detectChanges();
76
+ }
73
77
  static {
74
78
  this.ɵfac = i0.ɵɵngDeclareFactory({
75
79
  minVersion: "12.0.0",
@@ -371,6 +375,7 @@ var NbDialogService = class NbDialogService {
371
375
  dialogRef.onClose.subscribe(() => escape.remove());
372
376
  const container = this.createContainer(config, overlayRef);
373
377
  this.createContent(config, content, container, dialogRef);
378
+ container.detectChanges();
374
379
  animateDialog(overlayRef.overlayElement, true);
375
380
  this.registerCloseListeners(config, overlayRef, dialogRef);
376
381
  return dialogRef;
@@ -463,7 +468,11 @@ var NbDialogService = class NbDialogService {
463
468
  }
464
469
  registerCloseListeners(config, overlayRef, dialogRef) {
465
470
  if (config.closeOnBackdropClick) overlayRef.backdropClick().subscribe(() => dialogRef.close());
466
- if (config.closeOnNavigation && this.router) this.router.events.pipe(filter((event) => event instanceof NavigationStart), takeUntil(dialogRef.onClose)).subscribe(() => dialogRef.close());
471
+ const router = this.router;
472
+ if (config.closeOnNavigation && router) {
473
+ const page = (url) => router.serializeUrl(new UrlTree(router.parseUrl(url).root));
474
+ router.events.pipe(filter((event) => event instanceof NavigationStart && page(event.url) !== page(router.url)), takeUntil(dialogRef.onClose)).subscribe(() => dialogRef.close());
475
+ }
467
476
  }
468
477
  static {
469
478
  this.ɵfac = i0.ɵɵngDeclareFactory({