{"version":3,"file":"bravura-ui-clip-note.mjs","sources":["../../../projects/ui/clip-note/clip-note.component.ts","../../../projects/ui/clip-note/clip-note.component.html","../../../projects/ui/clip-note/clip-note.directive.ts","../../../projects/ui/clip-note/clip-note.module.ts","../../../projects/ui/clip-note/bravura-ui-clip-note.ts"],"sourcesContent":["import { BidiModule, Directionality } from '@angular/cdk/bidi';\r\nimport { ObserversModule } from '@angular/cdk/observers';\r\nimport { CommonModule } from '@angular/common';\r\nimport {\r\n\tafterNextRender,\r\n\tChangeDetectorRef,\r\n\tComponent,\r\n\tElementRef,\r\n\tEmbeddedViewRef,\r\n\tEventEmitter,\r\n\tHost,\r\n\tOnDestroy,\r\n\tOnInit,\r\n\tsignal,\r\n\tTemplateRef,\r\n\tviewChild,\r\n\tViewChild,\r\n\tViewContainerRef\r\n} from '@angular/core';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { BuiCommonModule } from '@bravura/ui/common';\r\nimport { IconFontModule } from '@bravura/ui/icon-font';\r\nimport { Subject, takeUntil } from 'rxjs';\r\n\r\n@Component({\r\n\tselector: 'bui-clip-note',\r\n\ttemplateUrl: './clip-note.component.html',\r\n\tstyleUrls: ['./clip-note.component.scss'],\r\n\thost: { class: 'bui-clip-note bui-host' },\r\n\timports: [CommonModule, MatButtonModule, MatIconModule, BidiModule, BuiCommonModule, ObserversModule, IconFontModule]\r\n})\r\nexport class ClipNoteComponent implements OnInit, OnDestroy {\r\n\tbuttonText = '';\r\n\r\n\tbuttonIcon = viewChild('buttonIcon', { read: ElementRef<HTMLElement> });\r\n\r\n\tget buttonState(): string {\r\n\t\tif (this._hovering || this.panelState === 'open') {\r\n\t\t\treturn 'active';\r\n\t\t}\r\n\t\treturn 'inactive';\r\n\t}\r\n\r\n\tget buttonIconState(): string {\r\n\t\tif (this.panelState === 'open') {\r\n\t\t\treturn `open-${this.direction}`;\r\n\t\t}\r\n\t\tif (this.buttonState === 'active') {\r\n\t\t\treturn `active-${this.direction}`;\r\n\t\t}\r\n\t\treturn 'inactive';\r\n\t}\r\n\r\n\tpanelState: 'open' | 'closed-ltr' | 'closed-rtl' = 'closed-ltr';\r\n\r\n\tdirection = 'ltr';\r\n\t_contentView?: EmbeddedViewRef<any>;\r\n\t_content?: string;\r\n\t_color: ThemePalette;\r\n\t_buttonAnimating = false;\r\n\t_icon?: string;\r\n\t_hasContent = false;\r\n\r\n\treadonly opened = new EventEmitter<void>();\r\n\treadonly closed = new EventEmitter<void>();\r\n\r\n\tprivate _hovering = false;\r\n\tprivate _destroyed$ = new Subject<void>();\r\n\tprivate _toggleQueue: boolean[] = [];\r\n\r\n\t@ViewChild('viewDiv', { static: true, read: ElementRef })\r\n\tprivate _viewDiv!: ElementRef<HTMLDivElement>;\r\n\r\n\t@ViewChild('noteViewRef', { static: true, read: ViewContainerRef })\r\n\tprivate _noteViewRef!: ViewContainerRef;\r\n\r\n\t@ViewChild('fallbackTemplate', { static: true })\r\n\tprivate _fallbackTemplate!: TemplateRef<any>;\r\n\r\n\t_ready = signal(true);\r\n\r\n\tconstructor(\r\n\t\tprivate _cd: ChangeDetectorRef,\r\n\t\tprivate _dir: Directionality,\r\n\t\t@Host() private _elemRef: ElementRef<HTMLElement>\r\n\t) {\r\n\t\tafterNextRender(() => {\r\n\t\t\trequestAnimationFrame(() => {\r\n\t\t\t\tthis._ready.set(true);\r\n\t\t\t});\r\n\t\t});\r\n\t}\r\n\r\n\tngOnInit(): void {\r\n\t\tthis.buttonIcon()?.nativeElement.addEventListener('transitionend', () => {\r\n\t\t\tthis._buttonAnimating = false;\r\n\t\t\tthis._checkToggle();\r\n\t\t});\r\n\r\n\t\tthis.buttonIcon()?.nativeElement.addEventListener('transitionstart', () => {\r\n\t\t\tthis._buttonAnimating = true;\r\n\t\t});\r\n\r\n\t\tconst changeDir = () => {\r\n\t\t\tthis.direction = this._dir.value;\r\n\t\t\tthis.panelState = `closed-${this.direction}` as any;\r\n\t\t\tthis._cd.markForCheck();\r\n\t\t};\r\n\t\tthis._dir.change.pipe(takeUntil(this._destroyed$)).subscribe(changeDir);\r\n\t\tchangeDir();\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\tthis._destroyed$.next();\r\n\t\tthis._destroyed$.complete();\r\n\t}\r\n\r\n\t_mouseOverButton(hovering: boolean) {\r\n\t\tif (this._hovering !== hovering) {\r\n\t\t\tthis._hovering = hovering;\r\n\t\t\tthis._cd.markForCheck();\r\n\t\t}\r\n\t}\r\n\r\n\ttoggle() {\r\n\t\tthis.panelState = this.panelState === `closed-${this.direction}` ? 'open' : (`closed-${this.direction}` as any);\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n\r\n\t_scheduleToggle() {\r\n\t\tif (this._buttonAnimating) {\r\n\t\t\tthis._toggleQueue.push(true);\r\n\t\t} else {\r\n\t\t\tthis.toggle();\r\n\t\t}\r\n\t}\r\n\r\n\t_checkToggle() {\r\n\t\tif (this._toggleQueue.pop()) {\r\n\t\t\tthis.toggle();\r\n\t\t}\r\n\t}\r\n\r\n\topen() {\r\n\t\tthis.panelState = 'open';\r\n\t\tthis._cd.markForCheck();\r\n\t\tthis._emit();\r\n\t}\r\n\r\n\tclose() {\r\n\t\tthis.panelState = `closed-${this.direction}` as any;\r\n\t\tthis._cd.markForCheck();\r\n\t\tthis._emit();\r\n\t}\r\n\r\n\t_emit() {\r\n\t\tif (this.panelState === 'open') {\r\n\t\t\tthis.opened.emit();\r\n\t\t} else {\r\n\t\t\tthis.closed.emit();\r\n\t\t}\r\n\t}\r\n\r\n\t_contentChanged(content?: string | TemplateRef<any>) {\r\n\t\tlet template: TemplateRef<any>;\r\n\r\n\t\tif (content instanceof TemplateRef) {\r\n\t\t\ttemplate = content;\r\n\t\t} else {\r\n\t\t\ttemplate = this._fallbackTemplate;\r\n\t\t\tthis._content = content;\r\n\t\t}\r\n\t\tthis._noteViewRef.clear();\r\n\t\tconst context = {};\r\n\t\tthis._contentView = this._noteViewRef.createEmbeddedView(template, context);\r\n\t\tthis._checkContent(true);\r\n\t}\r\n\r\n\t_checkContent(initial?: boolean) {\r\n\t\tthis._contentView?.detectChanges();\r\n\t\tthis._hasContent = !!this._viewDiv.nativeElement.textContent?.trim();\r\n\t\tconst classList = this._elemRef.nativeElement.classList;\r\n\t\tconst cls = 'bui-clip-note-hidden';\r\n\t\tconst cls1 = 'bui-clip-note-reveal';\r\n\t\tif (this._hasContent) {\r\n\t\t\tclassList.remove(cls);\r\n\t\t\tif (!initial && this.panelState !== 'open') {\r\n\t\t\t\tclassList.add(cls1);\r\n\t\t\t}\r\n\t\t\tthis._elemRef.nativeElement.scrollIntoView({ block: 'nearest', behavior: 'smooth' });\r\n\t\t} else {\r\n\t\t\tclassList.add(cls);\r\n\t\t\tclassList.remove(cls1);\r\n\t\t\tthis.close();\r\n\t\t}\r\n\t}\r\n\r\n\t_assignColor(color: ThemePalette) {\r\n\t\tthis._color = color;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n\r\n\t_assignButtonText(text: string) {\r\n\t\tthis.buttonText = text;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n\r\n\t_assignButtonIcon(icon?: string) {\r\n\t\tthis._icon = icon;\r\n\t\tthis._cd.markForCheck();\r\n\t}\r\n}\r\n","<div class=\"bui-clip-note-wrapper\">\r\n\t<div\r\n\t\t[class.animate]=\"_ready()\"\r\n\t\tclass=\"{{ panelState }} bui-clip-note-content bui-border-{{ _color }} mat-elevation-z3\"\r\n\t\t#viewDiv\r\n\t\t(cdkObserveContent)=\"_checkContent()\"\r\n\t>\r\n\t\t<ng-container #noteViewRef></ng-container>\r\n\t</div>\r\n\r\n\t<button\r\n\t\tmat-raised-button\r\n\t\t[class.animate]=\"_ready()\"\r\n\t\tclass=\"{{ buttonState }} bui-clip-note-trigger bui-clip-note-trigger-{{ buttonIconState }}\"\r\n\t\t[color]=\"_color\"\r\n\t\t(mouseenter)=\"_mouseOverButton(true)\"\r\n\t\t(mouseleave)=\"_mouseOverButton(false)\"\r\n\t\t(click)=\"_scheduleToggle()\"\r\n\t>\r\n\t\t<mat-icon\r\n\t\t\t#buttonIcon\r\n\t\t\t[class]=\"_icon ? 'disabled' : buttonIconState\"\r\n\t\t\tclass=\"clip-note-button-icon\"\r\n\t\t\t[buiIcon]=\"_icon || (direction === 'rtl' ? 'chevron_right' : 'chevron_left')\"\r\n\t\t\tstyle=\"margin: 0\"\r\n\t\t>\r\n\t\t</mat-icon>\r\n\t\t<span [class.animate]=\"_ready()\" class=\"{{ buttonState }} bui-clip-note-button-text\">&nbsp; {{ buttonText }}</span>\r\n\t</button>\r\n</div>\r\n\r\n<ng-template #fallbackTemplate>\r\n\t<div [innerHTML]=\"_content\"></div>\r\n</ng-template>\r\n","import {\r\n\tAfterViewInit,\r\n\tComponentRef,\r\n\tDirective,\r\n\tElementRef,\r\n\tEventEmitter,\r\n\tHost,\r\n\tInject,\r\n\tInjectionToken,\r\n\tInput,\r\n\tOutput,\r\n\tTemplateRef,\r\n\tViewContainerRef\r\n} from '@angular/core';\r\nimport { ThemePalette } from '@angular/material/core';\r\nimport { ClipNoteComponent } from './clip-note.component';\r\n\r\nexport interface ClipNoteDefaultConfig {\r\n\tcolor: ThemePalette;\r\n\tcaption: string;\r\n}\r\n\r\n/** Used to provide default config for clip notes. */\r\nexport const CLIP_NOTE_DEFAULT_CONFIG = new InjectionToken<ClipNoteDefaultConfig>('bui-clip-note.default-config', {\r\n\tfactory: () => ({ color: 'primary', caption: 'More info' })\r\n});\r\n\r\n/**\r\n * A clip note consists of a toggle button and a floating 'notepad' element, attached to the top end of the host element's\r\n * viewable area. The 'notepad' normally collapses away and only reveals itself when the toggle button is active.\r\n *\r\n * The toggle button clips on the edge of the host element and expands to display the full caption when hovered. It hides itself\r\n * automatically when there is no content provided via the `buiClipNote` property of the directive.\r\n *\r\n * The clip note component is suitable for large page container elements with visible boundaries. It can present contextual\r\n * information regarding and in addition to the content displayed in the main view area.\r\n *\r\n * The properties `buiClipNoteColor` and `buiClipNoteCaption` customise the appearance of the clip note, the default values of which\r\n * can optionally be provided by the `ClipNoteModule.forConfig()` method.\r\n *\r\n */\r\n@Directive({\r\n\tselector: '[buiClipNote]',\r\n\texportAs: 'buiClipNote'\r\n})\r\nexport class ClipNoteDirective implements AfterViewInit {\r\n\t/**\r\n\t * Provide content to the clip note's floating notepad element.\r\n\t * It accepts a `string` of HTML content or a `TemplateRef` object.\r\n\t */\r\n\t@Input()\r\n\tget buiClipNote(): string | TemplateRef<any> | undefined {\r\n\t\treturn this._content;\r\n\t}\r\n\tset buiClipNote(note: string | TemplateRef<any> | undefined) {\r\n\t\tthis._content = note;\r\n\t\tif (this._compRef) {\r\n\t\t\tthis._processContent();\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Customise the theme color alias.\r\n\t * @default 'primary'\r\n\t */\r\n\t@Input()\r\n\tget buiClipNoteColor(): ThemePalette {\r\n\t\treturn this._color;\r\n\t}\r\n\tset buiClipNoteColor(color: ThemePalette) {\r\n\t\tthis._color = color;\r\n\t\tif (this._compRef) {\r\n\t\t\tthis._compRef.instance._assignColor(this._color);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Customise the icon on the toggle button. With this property specified, the animation on the icon\r\n\t * will not be active.\r\n\t */\r\n\t@Input()\r\n\tget buiClipNoteIcon(): string | undefined {\r\n\t\treturn this._icon;\r\n\t}\r\n\tset buiClipNoteIcon(icon: string | undefined) {\r\n\t\tthis._icon = icon;\r\n\t\tif (this._compRef) {\r\n\t\t\tthis._compRef.instance._assignButtonIcon(this._icon);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * The caption of the toggle button when expanded.\r\n\t */\r\n\t@Input()\r\n\tget buiClipNoteCaption(): string {\r\n\t\treturn this._caption;\r\n\t}\r\n\tset buiClipNoteCaption(text: string) {\r\n\t\tthis._caption = text;\r\n\t\tif (this._compRef) {\r\n\t\t\tthis._compRef.instance._assignButtonText(this._caption);\r\n\t\t}\r\n\t}\r\n\r\n\t/** Emits when the panel opens */\r\n\t@Output()\r\n\treadonly buiClipNoteOpened = new EventEmitter<void>();\r\n\r\n\t/** Emits when the panel closes */\r\n\t@Output()\r\n\treadonly buiClipNoteClosed = new EventEmitter<void>();\r\n\r\n\tprivate _content?: string | TemplateRef<any>;\r\n\tprivate _color: ThemePalette = 'primary';\r\n\tprivate _compRef!: ComponentRef<ClipNoteComponent>;\r\n\tprivate _caption: string;\r\n\tprivate _icon?: string;\r\n\r\n\tconstructor(\r\n\t\t@Host() private _elementRef: ElementRef<HTMLElement>,\r\n\t\tprivate _vc: ViewContainerRef,\r\n\t\t@Inject(CLIP_NOTE_DEFAULT_CONFIG) _config: ClipNoteDefaultConfig\r\n\t) {\r\n\t\tthis._caption = _config.caption;\r\n\t\tthis._color = _config.color;\r\n\t}\r\n\r\n\tngAfterViewInit(): void {\r\n\t\tsetTimeout(() => {\r\n\t\t\tthis._compRef = this._vc.createComponent(ClipNoteComponent);\r\n\t\t\tconst childElement: HTMLElement = this._compRef.location.nativeElement;\r\n\t\t\tconst element = this._elementRef.nativeElement;\r\n\t\t\telement.style.position = 'relative';\r\n\t\t\telement.appendChild(childElement);\r\n\t\t\tthis._compRef.instance._assignColor(this._color);\r\n\t\t\tthis._compRef.instance._assignButtonText(this._caption);\r\n\t\t\tthis._compRef.instance._assignButtonIcon(this._icon);\r\n\t\t\tthis._compRef.instance.opened.subscribe(this.buiClipNoteOpened.next.bind(this.buiClipNoteOpened));\r\n\t\t\tthis._compRef.instance.closed.subscribe(this.buiClipNoteClosed.next.bind(this.buiClipNoteClosed));\r\n\t\t\tthis._processContent();\r\n\t\t});\r\n\t}\r\n\r\n\tngOnDestroy(): void {\r\n\t\tthis._compRef.destroy();\r\n\t}\r\n\r\n\t/** Open the note panel */\r\n\topen() {\r\n\t\tthis._compRef.instance.open();\r\n\t}\r\n\r\n\t/** Close the note panel */\r\n\tclose() {\r\n\t\tthis._compRef.instance.close();\r\n\t}\r\n\r\n\tprivate _processContent() {\r\n\t\tthis._compRef.instance._contentChanged(this._content);\r\n\t}\r\n}\r\n","import { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { CLIP_NOTE_DEFAULT_CONFIG, ClipNoteDefaultConfig, ClipNoteDirective } from './clip-note.directive';\r\n\r\n@NgModule({\r\n\timports: [ClipNoteDirective],\r\n\texports: [ClipNoteDirective]\r\n})\r\nexport class ClipNoteModule {\r\n\tstatic forConfig(config: ClipNoteDefaultConfig): ModuleWithProviders<ClipNoteModule> {\r\n\t\treturn {\r\n\t\t\tngModule: ClipNoteModule,\r\n\t\t\tproviders: [{ provide: CLIP_NOTE_DEFAULT_CONFIG, useValue: config }]\r\n\t\t};\r\n\t}\r\n}\r\n\r\nexport { ClipNoteDirective };\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAiCa,iBAAiB,CAAA;AAK7B,IAAA,IAAI,WAAW,GAAA;QACd,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,UAAU,KAAK,MAAM,EAAE;AACjD,YAAA,OAAO,QAAQ;QAChB;AACA,QAAA,OAAO,UAAU;IAClB;AAEA,IAAA,IAAI,eAAe,GAAA;AAClB,QAAA,IAAI,IAAI,CAAC,UAAU,KAAK,MAAM,EAAE;AAC/B,YAAA,OAAO,CAAA,KAAA,EAAQ,IAAI,CAAC,SAAS,EAAE;QAChC;AACA,QAAA,IAAI,IAAI,CAAC,WAAW,KAAK,QAAQ,EAAE;AAClC,YAAA,OAAO,CAAA,OAAA,EAAU,IAAI,CAAC,SAAS,EAAE;QAClC;AACA,QAAA,OAAO,UAAU;IAClB;AA8BA,IAAA,WAAA,CACS,GAAsB,EACtB,IAAoB,EACZ,QAAiC,EAAA;QAFzC,IAAA,CAAA,GAAG,GAAH,GAAG;QACH,IAAA,CAAA,IAAI,GAAJ,IAAI;QACI,IAAA,CAAA,QAAQ,GAAR,QAAQ;QApDzB,I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