@ruc-lib/overlay 2.0.10 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -20
- package/fesm2022/ruc-lib-overlay.mjs +355 -0
- package/fesm2022/ruc-lib-overlay.mjs.map +1 -0
- package/index.d.ts +115 -6
- package/package.json +9 -21
- package/esm2020/index.mjs +0 -7
- package/esm2020/lib/constants/positions.mjs +0 -7
- package/esm2020/lib/model/overlay.types.mjs +0 -7
- package/esm2020/lib/overlay-content/overlay-content.component.mjs +0 -91
- package/esm2020/lib/ruc-overlay-chart/ruc-overlay-chart.component.mjs +0 -29
- package/esm2020/lib/ruclib-overlay/ruclib-overlay.component.mjs +0 -196
- package/esm2020/lib/ruclib-overlay.module.mjs +0 -48
- package/esm2020/lib/service/overlay.service.mjs +0 -33
- package/esm2020/ruc-lib-overlay.mjs +0 -5
- package/fesm2015/ruc-lib-overlay.mjs +0 -401
- package/fesm2015/ruc-lib-overlay.mjs.map +0 -1
- package/fesm2020/ruc-lib-overlay.mjs +0 -394
- package/fesm2020/ruc-lib-overlay.mjs.map +0 -1
- package/lib/constants/positions.d.ts +0 -2
- package/lib/model/overlay.types.d.ts +0 -40
- package/lib/overlay-content/overlay-content.component.d.ts +0 -20
- package/lib/ruc-overlay-chart/ruc-overlay-chart.component.d.ts +0 -11
- package/lib/ruclib-overlay/ruclib-overlay.component.d.ts +0 -40
- package/lib/ruclib-overlay.module.d.ts +0 -15
- package/lib/service/overlay.service.d.ts +0 -16
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { MatCardModule } from '@angular/material/card';
|
|
2
|
-
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
3
|
-
import { NgModule } from '@angular/core';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { RuclibOverlayComponent } from './ruclib-overlay/ruclib-overlay.component';
|
|
6
|
-
import { OverlayContentComponent } from './overlay-content/overlay-content.component';
|
|
7
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
8
|
-
import { OverlayModule } from '@angular/cdk/overlay';
|
|
9
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
10
|
-
import { RucOverlayChartComponent } from './ruc-overlay-chart/ruc-overlay-chart.component';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
export class RuclibOverlayModule {
|
|
13
|
-
}
|
|
14
|
-
RuclibOverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
15
|
-
RuclibOverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayModule, declarations: [RuclibOverlayComponent,
|
|
16
|
-
OverlayContentComponent,
|
|
17
|
-
RucOverlayChartComponent], imports: [CommonModule,
|
|
18
|
-
MatIconModule,
|
|
19
|
-
OverlayModule,
|
|
20
|
-
BrowserAnimationsModule,
|
|
21
|
-
MatButtonModule,
|
|
22
|
-
MatCardModule], exports: [RuclibOverlayComponent, RucOverlayChartComponent] });
|
|
23
|
-
RuclibOverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayModule, imports: [CommonModule,
|
|
24
|
-
MatIconModule,
|
|
25
|
-
OverlayModule,
|
|
26
|
-
BrowserAnimationsModule,
|
|
27
|
-
MatButtonModule,
|
|
28
|
-
MatCardModule] });
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayModule, decorators: [{
|
|
30
|
-
type: NgModule,
|
|
31
|
-
args: [{
|
|
32
|
-
imports: [
|
|
33
|
-
CommonModule,
|
|
34
|
-
MatIconModule,
|
|
35
|
-
OverlayModule,
|
|
36
|
-
BrowserAnimationsModule,
|
|
37
|
-
MatButtonModule,
|
|
38
|
-
MatCardModule
|
|
39
|
-
],
|
|
40
|
-
declarations: [
|
|
41
|
-
RuclibOverlayComponent,
|
|
42
|
-
OverlayContentComponent,
|
|
43
|
-
RucOverlayChartComponent
|
|
44
|
-
],
|
|
45
|
-
exports: [RuclibOverlayComponent, RucOverlayChartComponent],
|
|
46
|
-
}]
|
|
47
|
-
}] });
|
|
48
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVjbGliLW92ZXJsYXkubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xpYi9ydWNsaWItb3ZlcmxheS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQ3ZELE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBQy9FLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLDJDQUEyQyxDQUFDO0FBQ25GLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLDZDQUE2QyxDQUFDO0FBQ3RGLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUN2RCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFDckQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzNELE9BQU8sRUFBRSx3QkFBd0IsRUFBRSxNQUFNLGlEQUFpRCxDQUFDOztBQWtCM0YsTUFBTSxPQUFPLG1CQUFtQjs7aUhBQW5CLG1CQUFt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|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { Subject } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export class OverlayService {
|
|
5
|
-
constructor() {
|
|
6
|
-
this.popoverState = new Subject();
|
|
7
|
-
this.popoverState$ = this.popoverState.asObservable();
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Broadcasts a command to open a popover using the OverlayData structure.
|
|
11
|
-
*/
|
|
12
|
-
open(config, trigger) {
|
|
13
|
-
console.log(config, trigger);
|
|
14
|
-
// The service's responsibility is to bundle the config and trigger
|
|
15
|
-
// into a PopoverData object and send it.
|
|
16
|
-
this.popoverState.next({ config, trigger });
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Broadcasts a command to close any currently open service-controlled popover.
|
|
20
|
-
*/
|
|
21
|
-
close() {
|
|
22
|
-
this.popoverState.next(null);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
OverlayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OverlayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
26
|
-
OverlayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OverlayService, providedIn: 'root' });
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OverlayService, decorators: [{
|
|
28
|
-
type: Injectable,
|
|
29
|
-
args: [{
|
|
30
|
-
providedIn: 'root'
|
|
31
|
-
}]
|
|
32
|
-
}] });
|
|
33
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3ZlcmxheS5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2xpYi9zZXJ2aWNlL292ZXJsYXkuc2VydmljZS50cyJ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-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './index';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVjLWxpYi1vdmVybGF5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3J1Yy1saWItb3ZlcmxheS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
|
|
@@ -1,401 +0,0 @@
|
|
|
1
|
-
import * as i4 from '@angular/material/card';
|
|
2
|
-
import { MatCardModule } from '@angular/material/card';
|
|
3
|
-
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
4
|
-
import * as i0 from '@angular/core';
|
|
5
|
-
import { InjectionToken, Component, ChangeDetectionStrategy, Input, EventEmitter, TemplateRef, Inject, Output, HostBinding, Injectable, Injector, ElementRef, ViewChild, HostListener, NgModule } from '@angular/core';
|
|
6
|
-
import * as i1 from '@angular/common';
|
|
7
|
-
import { CommonModule } from '@angular/common';
|
|
8
|
-
import { Subject, filter } from 'rxjs';
|
|
9
|
-
import { ComponentPortal } from '@angular/cdk/portal';
|
|
10
|
-
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
11
|
-
import * as i2 from '@angular/material/icon';
|
|
12
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
-
import * as i3 from '@angular/material/button';
|
|
14
|
-
import { MatButton, MatButtonModule } from '@angular/material/button';
|
|
15
|
-
import Chart from 'chart.js/auto';
|
|
16
|
-
import { ESCAPE } from '@angular/cdk/keycodes';
|
|
17
|
-
import * as i1$1 from '@angular/cdk/overlay';
|
|
18
|
-
import { OverlayModule } from '@angular/cdk/overlay';
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* The Injection Token used to provide the PopoverControl object to the
|
|
22
|
-
* PopoverContentComponent. This is the correct, final version.
|
|
23
|
-
*/
|
|
24
|
-
const OVERLAY_CONTROL = new InjectionToken('OVERLAY_CONTROL');
|
|
25
|
-
|
|
26
|
-
class RucOverlayChartComponent {
|
|
27
|
-
constructor() {
|
|
28
|
-
this.index = 0;
|
|
29
|
-
}
|
|
30
|
-
ngAfterViewInit() {
|
|
31
|
-
if (this.chartConfig) {
|
|
32
|
-
this.chart = new Chart('canvas' + this.index, this.chartConfig);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
ngOnDestroy() {
|
|
36
|
-
var _a;
|
|
37
|
-
(_a = this.chart) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
38
|
-
this.chart = null;
|
|
39
|
-
this.chartConfig = null;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
RucOverlayChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucOverlayChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
43
|
-
RucOverlayChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RucOverlayChartComponent, selector: "uxp-ruc-overlay-chart", inputs: { index: "index", chartConfig: "chartConfig" }, ngImport: i0, template: "<div style=\"position: relative; height:220px;\">\r\n <canvas id=\"canvas{{index}}\">{{chart}}</canvas>\r\n</div>\r\n", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucOverlayChartComponent, decorators: [{
|
|
45
|
-
type: Component,
|
|
46
|
-
args: [{ selector: 'uxp-ruc-overlay-chart', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div style=\"position: relative; height:220px;\">\r\n <canvas id=\"canvas{{index}}\">{{chart}}</canvas>\r\n</div>\r\n" }]
|
|
47
|
-
}], propDecorators: { index: [{
|
|
48
|
-
type: Input
|
|
49
|
-
}], chartConfig: [{
|
|
50
|
-
type: Input
|
|
51
|
-
}] } });
|
|
52
|
-
|
|
53
|
-
class OverlayContentComponent {
|
|
54
|
-
ngOnInit() {
|
|
55
|
-
if (this.control.config.tableData) {
|
|
56
|
-
this.getTableHeaders();
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
get animationState() {
|
|
60
|
-
return this.control.config.animation === 'scale'
|
|
61
|
-
? 'enter-scale'
|
|
62
|
-
: 'enter-fade';
|
|
63
|
-
}
|
|
64
|
-
constructor(control) {
|
|
65
|
-
this.control = control;
|
|
66
|
-
this.actualPlacement = 'bottom';
|
|
67
|
-
this.tableHeaders = [];
|
|
68
|
-
this.arrowOffset = 0;
|
|
69
|
-
this.mouseEnterPopover = new EventEmitter();
|
|
70
|
-
this.mouseLeavePopover = new EventEmitter();
|
|
71
|
-
this.actualPlacement = this.control.config.placement || 'bottom';
|
|
72
|
-
}
|
|
73
|
-
// Helper to check if content is a TemplateRef
|
|
74
|
-
isTemplateRef(content) {
|
|
75
|
-
return content instanceof TemplateRef;
|
|
76
|
-
}
|
|
77
|
-
// Helper to get keys for the table header, robustly
|
|
78
|
-
getTableHeaders() {
|
|
79
|
-
const tempData = this.control.config.tableData;
|
|
80
|
-
if (!tempData || tempData.length === 0) {
|
|
81
|
-
this.tableHeaders = [];
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
// Assumes all objects in the array have the same shape
|
|
85
|
-
this.tableHeaders = Object.keys(tempData[0]);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
OverlayContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OverlayContentComponent, deps: [{ token: OVERLAY_CONTROL }], target: i0.ɵɵFactoryTarget.Component });
|
|
89
|
-
OverlayContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OverlayContentComponent, selector: "uxp-overlay-content", inputs: { customTheme: "customTheme" }, outputs: { mouseEnterPopover: "mouseEnterPopover", mouseLeavePopover: "mouseLeavePopover" }, host: { properties: { "@popoverAnimation": "this.animationState" } }, ngImport: i0, template: "<mat-card class=\"popover-container\" class={{customTheme}} (click)=\"$event.stopPropagation()\">\r\n\r\n <div class=\"popover-arrow\"\r\n[attr.data-placement]=\"actualPlacement\"\r\n [style.left.px]=\"(actualPlacement.startsWith('top') || actualPlacement.startsWith('bottom')) ? arrowOffset : null\"\r\n[style.top.px]=\"(actualPlacement.startsWith('left') || actualPlacement.startsWith('right')) ? arrowOffset : null\">\r\n </div>\r\n <!-- Header with optional title and close button -->\r\n\r\n <mat-card-header *ngIf=\"\r\n control.config.overlayTitle ||\r\n control.config.showCloseButton ||\r\n control.config.closeIcon\r\n \"\r\n class=\"popover-header\"\r\n >\r\n <mat-card-title class=\"popover-title\" *ngIf=\"control.config.overlayTitle\">{{ control.config.overlayTitle }}</mat-card-title>\r\n <ng-container *ngIf=\"control.config.showCloseButton && control.config.closeIcon\">\r\n <button mat-icon-button class=\"close-btn\" (click)=\"control.close()\" color=\"primary\" aria-label=\"Close popover icon\">\r\n <mat-icon>{{ control.config.closeIcon }}</mat-icon>\r\n </button>\r\n </ng-container>\r\n </mat-card-header>\r\n\r\n\r\n <!-- Body with dynamic content -->\r\n <mat-card-content class=\"popover-body\">\r\n <!-- Case 1: Content is a simple string -->\r\n <ng-container\r\n *ngIf=\"\r\n !isTemplateRef(control.config.content) && !control.config.tableData\r\n \"\r\n >\r\n {{ control.config.content }}\r\n </ng-container>\r\n\r\n <!-- Case 2: Content is a TemplateRef -->\r\n <ng-container *ngIf=\"isTemplateRef(control.config.content)\">\r\n <ng-container *ngTemplateOutlet=\"control.config.content\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"control.config.chartConfig\">\r\n\r\n <uxp-ruc-overlay-chart [chartConfig]=\"control.config.chartConfig\"></uxp-ruc-overlay-chart>\r\n </ng-container>\r\n\r\n <!-- Case 3: Content is table data -->\r\n <ng-container *ngIf=\"control.config.tableData?.length\">\r\n <table\r\n class=\"popover-table\"\r\n [class]=\"control.config.tableClass || 'basic-table'\"\r\n >\r\n <thead>\r\n <tr>\r\n <th\r\n *ngFor=\"let header of this.tableHeaders!\"\r\n >\r\n {{ header }}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of control.config.tableData\">\r\n <td\r\n *ngFor=\"let header of this.tableHeaders!\"\r\n >\r\n {{ row[header] }}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </mat-card-content>\r\n</mat-card>\r\n", styles: [":host{display:block}.popover-container{z-index:1080;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px #0003;position:relative;max-width:300px}.popover-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;border-width:10px}.close-btn .mat-mdc-icon-button.mat-mdc-button-base{width:30px;height:30px;padding:2px}.popover-title{font-size:16px;font-weight:600}.mat-card-header.mat-mdc-card-header.popover-header .mat-mdc-card-header-text .mat-card-title.mat-mdc-card-title{font-size:16px}button.close-btn.mdc-icon-button.mat-mdc-icon-button.mat-mdc-button-base{width:30px;height:30px;padding:2px}.popover-arrow[data-placement^=bottom]{top:-10px;transform:translate(-50%);border-width:0 10px 10px 10px;border-bottom-color:#fff;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.15))}.popover-arrow[data-placement^=top]{bottom:-10px;transform:translate(-50%);border-width:10px 10px 0 10px;border-top-color:#fff;filter:drop-shadow(0 1px 1px rgba(0,0,0,.15))}.popover-arrow[data-placement^=right]{left:-10px;transform:translateY(-50%);border-width:10px 10px 10px 0;border-right-color:#fff;filter:drop-shadow(-1px 0 1px rgba(0,0,0,.15))}.popover-arrow[data-placement^=left]{right:-10px;transform:translateY(-50%);border-width:10px 0 10px 10px;border-left-color:#fff;filter:drop-shadow(1px 0 1px rgba(0,0,0,.15))}.popover-header{display:flex;justify-content:space-between;align-items:center;padding:.5rem 1rem;margin:0;font-size:1rem;border-bottom:1px solid #dcdcdc;border-radius:5px 5px 0 0}.popover-header h3{margin:0;font-size:1rem}.popover-body{padding:9px 14px}.popover-table{width:100%;border-collapse:collapse;margin-top:5px}.popover-table th,.popover-table td{border:1px solid #ddd;padding:8px;text-align:left}.popover-table th{text-transform:capitalize}.striped-table{width:100%;border-collapse:collapse;font-size:.9em}.striped-table th,.striped-table td{border:1px solid #ddd;padding:8px;text-align:left}.striped-table thead th{font-weight:700}.striped-table tbody tr:nth-child(even){background-color:#00000061}.basic-table{width:100%;border-collapse:collapse;font-size:.9em}.basic-table th,.basic-table td{border:1px solid #ddd;padding:8px;text-align:left}.basic-table thead th{font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i4.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i4.MatCardContent, selector: "mat-card-content" }, { kind: "component", type: i4.MatCardHeader, selector: "mat-card-header" }, { kind: "directive", type: i4.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { kind: "component", type: RucOverlayChartComponent, selector: "uxp-ruc-overlay-chart", inputs: ["index", "chartConfig"] }], animations: [
|
|
90
|
-
trigger('popoverAnimation', [
|
|
91
|
-
state('void', style({ transform: 'scale(0.9)', opacity: 0 })),
|
|
92
|
-
state('enter-scale', style({ transform: 'scale(1)', opacity: 1 })),
|
|
93
|
-
state('enter-fade', style({ opacity: 1 })),
|
|
94
|
-
transition('void => enter-scale', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),
|
|
95
|
-
transition('void => enter-fade', [
|
|
96
|
-
style({ opacity: 0, transform: 'translateY(10px)' }),
|
|
97
|
-
animate('500ms', style({ opacity: 1, transform: 'translateY(0)' })),
|
|
98
|
-
]),
|
|
99
|
-
transition('* => void', [
|
|
100
|
-
animate('500ms', style({ opacity: 0, transform: 'translateY(10px)' })),
|
|
101
|
-
]),
|
|
102
|
-
]),
|
|
103
|
-
] });
|
|
104
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OverlayContentComponent, decorators: [{
|
|
105
|
-
type: Component,
|
|
106
|
-
args: [{ selector: 'uxp-overlay-content', animations: [
|
|
107
|
-
trigger('popoverAnimation', [
|
|
108
|
-
state('void', style({ transform: 'scale(0.9)', opacity: 0 })),
|
|
109
|
-
state('enter-scale', style({ transform: 'scale(1)', opacity: 1 })),
|
|
110
|
-
state('enter-fade', style({ opacity: 1 })),
|
|
111
|
-
transition('void => enter-scale', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),
|
|
112
|
-
transition('void => enter-fade', [
|
|
113
|
-
style({ opacity: 0, transform: 'translateY(10px)' }),
|
|
114
|
-
animate('500ms', style({ opacity: 1, transform: 'translateY(0)' })),
|
|
115
|
-
]),
|
|
116
|
-
transition('* => void', [
|
|
117
|
-
animate('500ms', style({ opacity: 0, transform: 'translateY(10px)' })),
|
|
118
|
-
]),
|
|
119
|
-
]),
|
|
120
|
-
], template: "<mat-card class=\"popover-container\" class={{customTheme}} (click)=\"$event.stopPropagation()\">\r\n\r\n <div class=\"popover-arrow\"\r\n[attr.data-placement]=\"actualPlacement\"\r\n [style.left.px]=\"(actualPlacement.startsWith('top') || actualPlacement.startsWith('bottom')) ? arrowOffset : null\"\r\n[style.top.px]=\"(actualPlacement.startsWith('left') || actualPlacement.startsWith('right')) ? arrowOffset : null\">\r\n </div>\r\n <!-- Header with optional title and close button -->\r\n\r\n <mat-card-header *ngIf=\"\r\n control.config.overlayTitle ||\r\n control.config.showCloseButton ||\r\n control.config.closeIcon\r\n \"\r\n class=\"popover-header\"\r\n >\r\n <mat-card-title class=\"popover-title\" *ngIf=\"control.config.overlayTitle\">{{ control.config.overlayTitle }}</mat-card-title>\r\n <ng-container *ngIf=\"control.config.showCloseButton && control.config.closeIcon\">\r\n <button mat-icon-button class=\"close-btn\" (click)=\"control.close()\" color=\"primary\" aria-label=\"Close popover icon\">\r\n <mat-icon>{{ control.config.closeIcon }}</mat-icon>\r\n </button>\r\n </ng-container>\r\n </mat-card-header>\r\n\r\n\r\n <!-- Body with dynamic content -->\r\n <mat-card-content class=\"popover-body\">\r\n <!-- Case 1: Content is a simple string -->\r\n <ng-container\r\n *ngIf=\"\r\n !isTemplateRef(control.config.content) && !control.config.tableData\r\n \"\r\n >\r\n {{ control.config.content }}\r\n </ng-container>\r\n\r\n <!-- Case 2: Content is a TemplateRef -->\r\n <ng-container *ngIf=\"isTemplateRef(control.config.content)\">\r\n <ng-container *ngTemplateOutlet=\"control.config.content\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"control.config.chartConfig\">\r\n\r\n <uxp-ruc-overlay-chart [chartConfig]=\"control.config.chartConfig\"></uxp-ruc-overlay-chart>\r\n </ng-container>\r\n\r\n <!-- Case 3: Content is table data -->\r\n <ng-container *ngIf=\"control.config.tableData?.length\">\r\n <table\r\n class=\"popover-table\"\r\n [class]=\"control.config.tableClass || 'basic-table'\"\r\n >\r\n <thead>\r\n <tr>\r\n <th\r\n *ngFor=\"let header of this.tableHeaders!\"\r\n >\r\n {{ header }}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of control.config.tableData\">\r\n <td\r\n *ngFor=\"let header of this.tableHeaders!\"\r\n >\r\n {{ row[header] }}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </mat-card-content>\r\n</mat-card>\r\n", styles: [":host{display:block}.popover-container{z-index:1080;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px #0003;position:relative;max-width:300px}.popover-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;border-width:10px}.close-btn .mat-mdc-icon-button.mat-mdc-button-base{width:30px;height:30px;padding:2px}.popover-title{font-size:16px;font-weight:600}.mat-card-header.mat-mdc-card-header.popover-header .mat-mdc-card-header-text .mat-card-title.mat-mdc-card-title{font-size:16px}button.close-btn.mdc-icon-button.mat-mdc-icon-button.mat-mdc-button-base{width:30px;height:30px;padding:2px}.popover-arrow[data-placement^=bottom]{top:-10px;transform:translate(-50%);border-width:0 10px 10px 10px;border-bottom-color:#fff;filter:drop-shadow(0 -1px 1px rgba(0,0,0,.15))}.popover-arrow[data-placement^=top]{bottom:-10px;transform:translate(-50%);border-width:10px 10px 0 10px;border-top-color:#fff;filter:drop-shadow(0 1px 1px rgba(0,0,0,.15))}.popover-arrow[data-placement^=right]{left:-10px;transform:translateY(-50%);border-width:10px 10px 10px 0;border-right-color:#fff;filter:drop-shadow(-1px 0 1px rgba(0,0,0,.15))}.popover-arrow[data-placement^=left]{right:-10px;transform:translateY(-50%);border-width:10px 0 10px 10px;border-left-color:#fff;filter:drop-shadow(1px 0 1px rgba(0,0,0,.15))}.popover-header{display:flex;justify-content:space-between;align-items:center;padding:.5rem 1rem;margin:0;font-size:1rem;border-bottom:1px solid #dcdcdc;border-radius:5px 5px 0 0}.popover-header h3{margin:0;font-size:1rem}.popover-body{padding:9px 14px}.popover-table{width:100%;border-collapse:collapse;margin-top:5px}.popover-table th,.popover-table td{border:1px solid #ddd;padding:8px;text-align:left}.popover-table th{text-transform:capitalize}.striped-table{width:100%;border-collapse:collapse;font-size:.9em}.striped-table th,.striped-table td{border:1px solid #ddd;padding:8px;text-align:left}.striped-table thead th{font-weight:700}.striped-table tbody tr:nth-child(even){background-color:#00000061}.basic-table{width:100%;border-collapse:collapse;font-size:.9em}.basic-table th,.basic-table td{border:1px solid #ddd;padding:8px;text-align:left}.basic-table thead th{font-weight:700}\n"] }]
|
|
121
|
-
}], ctorParameters: function () {
|
|
122
|
-
return [{ type: undefined, decorators: [{
|
|
123
|
-
type: Inject,
|
|
124
|
-
args: [OVERLAY_CONTROL]
|
|
125
|
-
}] }];
|
|
126
|
-
}, propDecorators: { customTheme: [{
|
|
127
|
-
type: Input
|
|
128
|
-
}], mouseEnterPopover: [{
|
|
129
|
-
type: Output
|
|
130
|
-
}], mouseLeavePopover: [{
|
|
131
|
-
type: Output
|
|
132
|
-
}], animationState: [{
|
|
133
|
-
type: HostBinding,
|
|
134
|
-
args: ['@popoverAnimation']
|
|
135
|
-
}] } });
|
|
136
|
-
|
|
137
|
-
const positions = [
|
|
138
|
-
{ originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 10 },
|
|
139
|
-
{ originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -10 },
|
|
140
|
-
{ originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 10 },
|
|
141
|
-
{ originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -10 }
|
|
142
|
-
];
|
|
143
|
-
|
|
144
|
-
class OverlayService {
|
|
145
|
-
constructor() {
|
|
146
|
-
this.popoverState = new Subject();
|
|
147
|
-
this.popoverState$ = this.popoverState.asObservable();
|
|
148
|
-
}
|
|
149
|
-
/**
|
|
150
|
-
* Broadcasts a command to open a popover using the OverlayData structure.
|
|
151
|
-
*/
|
|
152
|
-
open(config, trigger) {
|
|
153
|
-
console.log(config, trigger);
|
|
154
|
-
// The service's responsibility is to bundle the config and trigger
|
|
155
|
-
// into a PopoverData object and send it.
|
|
156
|
-
this.popoverState.next({ config, trigger });
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Broadcasts a command to close any currently open service-controlled popover.
|
|
160
|
-
*/
|
|
161
|
-
close() {
|
|
162
|
-
this.popoverState.next(null);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
OverlayService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OverlayService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
166
|
-
OverlayService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OverlayService, providedIn: 'root' });
|
|
167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OverlayService, decorators: [{
|
|
168
|
-
type: Injectable,
|
|
169
|
-
args: [{
|
|
170
|
-
providedIn: 'root'
|
|
171
|
-
}]
|
|
172
|
-
}] });
|
|
173
|
-
|
|
174
|
-
class RuclibOverlayComponent {
|
|
175
|
-
constructor(overlay, injector, overlayService) {
|
|
176
|
-
this.overlay = overlay;
|
|
177
|
-
this.injector = injector;
|
|
178
|
-
this.overlayService = overlayService;
|
|
179
|
-
this.rucInputData = {
|
|
180
|
-
content: 'Default content',
|
|
181
|
-
};
|
|
182
|
-
this.overlayRef = null;
|
|
183
|
-
}
|
|
184
|
-
ngOnInit() {
|
|
185
|
-
if (!this.buttonText) {
|
|
186
|
-
this.serviceSubscription = this.overlayService.popoverState$.subscribe((data) => {
|
|
187
|
-
if (data && !this.isOpen) {
|
|
188
|
-
this.show(data.trigger, data.config);
|
|
189
|
-
}
|
|
190
|
-
else if (!data) {
|
|
191
|
-
this.destroy();
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
ngOnDestroy() {
|
|
197
|
-
var _a, _b;
|
|
198
|
-
(_a = this.positionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
199
|
-
(_b = this.serviceSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
200
|
-
this.destroy();
|
|
201
|
-
}
|
|
202
|
-
get isOpen() {
|
|
203
|
-
return !!this.overlayRef;
|
|
204
|
-
}
|
|
205
|
-
// --- Trigger Handlers for self-contained button ---
|
|
206
|
-
toggle() {
|
|
207
|
-
if (this.rucInputData.trigger !== 'hover') {
|
|
208
|
-
this.isOpen
|
|
209
|
-
? this.destroy()
|
|
210
|
-
: this.show(this.triggerButtonRef.nativeElement, this.rucInputData);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
handleMouseEnter() {
|
|
214
|
-
if (this.rucInputData.trigger === 'hover') {
|
|
215
|
-
if (this.closeTimeout)
|
|
216
|
-
clearTimeout(this.closeTimeout); // Clear any pending close command
|
|
217
|
-
this.show(this.triggerButtonRef.nativeElement, this.rucInputData);
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
handleMouseLeave() {
|
|
221
|
-
var _a;
|
|
222
|
-
if (this.rucInputData.trigger === 'hover') {
|
|
223
|
-
// Use the configurable closeDelay
|
|
224
|
-
const delay = (_a = this.rucInputData.closeDelay) !== null && _a !== void 0 ? _a : 200;
|
|
225
|
-
this.closeTimeout = setTimeout(() => this.destroy(), delay);
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
show(trigger, config) {
|
|
229
|
-
if (this.isOpen)
|
|
230
|
-
return;
|
|
231
|
-
const positionStrategy = this.createPositionStrategy(trigger, config.placement || 'bottom');
|
|
232
|
-
this.overlayRef = this.overlay.create({
|
|
233
|
-
positionStrategy,
|
|
234
|
-
hasBackdrop: config.trigger !== 'hover',
|
|
235
|
-
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
236
|
-
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
237
|
-
});
|
|
238
|
-
this.overlayRef.keydownEvents().pipe(filter(event => event.keyCode === ESCAPE)).subscribe(() => this.destroy());
|
|
239
|
-
const control = { config, close: this.destroy.bind(this) };
|
|
240
|
-
const injector = Injector.create({
|
|
241
|
-
parent: this.injector,
|
|
242
|
-
providers: [{ provide: OVERLAY_CONTROL, useValue: control }],
|
|
243
|
-
});
|
|
244
|
-
const portal = new ComponentPortal(OverlayContentComponent, null, injector);
|
|
245
|
-
const componentRef = this.overlayRef.attach(portal);
|
|
246
|
-
componentRef.instance.customTheme = this.customTheme;
|
|
247
|
-
// --- START: MODIFICATION FOR DYNAMIC ARROW ---
|
|
248
|
-
this.positionSubscription = positionStrategy.positionChanges.subscribe((change) => {
|
|
249
|
-
// 1. Get the new placement ('top', 'bottom', etc.)
|
|
250
|
-
const newPlacement = this.getPlacementFromPosition(change.connectionPair);
|
|
251
|
-
componentRef.instance.actualPlacement = newPlacement;
|
|
252
|
-
// 2. Calculate the arrow's offset
|
|
253
|
-
if (this.overlayRef) {
|
|
254
|
-
const triggerRect = trigger.getBoundingClientRect();
|
|
255
|
-
const popoverRect = this.overlayRef.overlayElement.getBoundingClientRect();
|
|
256
|
-
let arrowOffset = 0;
|
|
257
|
-
// If popover is top/bottom, arrow moves horizontally (left)
|
|
258
|
-
if (newPlacement.startsWith('top') ||
|
|
259
|
-
newPlacement.startsWith('bottom')) {
|
|
260
|
-
const triggerCenter = triggerRect.left + triggerRect.width / 2;
|
|
261
|
-
arrowOffset = triggerCenter - popoverRect.left;
|
|
262
|
-
}
|
|
263
|
-
// If popover is left/right, arrow moves vertically (top)
|
|
264
|
-
else {
|
|
265
|
-
const triggerCenter = triggerRect.top + triggerRect.height / 2;
|
|
266
|
-
arrowOffset = triggerCenter - popoverRect.top;
|
|
267
|
-
}
|
|
268
|
-
// 3. Pass the offset to the content component
|
|
269
|
-
componentRef.instance.arrowOffset = arrowOffset;
|
|
270
|
-
}
|
|
271
|
-
componentRef.changeDetectorRef.detectChanges();
|
|
272
|
-
});
|
|
273
|
-
componentRef.instance.mouseEnterPopover.subscribe(() => {
|
|
274
|
-
if (this.closeTimeout)
|
|
275
|
-
clearTimeout(this.closeTimeout);
|
|
276
|
-
});
|
|
277
|
-
componentRef.instance.mouseLeavePopover.subscribe(() => this.handleMouseLeave());
|
|
278
|
-
if (config.trigger !== 'hover') {
|
|
279
|
-
this.overlayRef.backdropClick().subscribe(() => this.destroy());
|
|
280
|
-
}
|
|
281
|
-
const popoverId = `popover-${Math.random().toString(36).substring(2, 9)}`;
|
|
282
|
-
componentRef.location.nativeElement.setAttribute('id', popoverId);
|
|
283
|
-
trigger.setAttribute('aria-describedby', popoverId);
|
|
284
|
-
this.lastTriggerElement = trigger;
|
|
285
|
-
}
|
|
286
|
-
// Renamed from hide() to destroy() for clarity
|
|
287
|
-
destroy() {
|
|
288
|
-
var _a;
|
|
289
|
-
if (!this.overlayRef)
|
|
290
|
-
return; // Prevent multiple calls
|
|
291
|
-
if (this.lastTriggerElement) {
|
|
292
|
-
this.lastTriggerElement.removeAttribute('aria-describedby');
|
|
293
|
-
this.lastTriggerElement = undefined;
|
|
294
|
-
}
|
|
295
|
-
(_a = this.positionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
296
|
-
this.overlayRef.dispose();
|
|
297
|
-
this.overlayRef = null;
|
|
298
|
-
}
|
|
299
|
-
getPlacementFromPosition(position) {
|
|
300
|
-
if (position.originY === 'top' && position.overlayY === 'bottom')
|
|
301
|
-
return 'top';
|
|
302
|
-
if (position.originY === 'bottom' && position.overlayY === 'top')
|
|
303
|
-
return 'bottom';
|
|
304
|
-
if (position.originX === 'start' && position.overlayX === 'end')
|
|
305
|
-
return 'left';
|
|
306
|
-
if (position.originX === 'end' && position.overlayX === 'start')
|
|
307
|
-
return 'right';
|
|
308
|
-
return 'bottom';
|
|
309
|
-
}
|
|
310
|
-
createPositionStrategy(origin, placement) {
|
|
311
|
-
let preferredPosition;
|
|
312
|
-
switch (placement) {
|
|
313
|
-
case 'top':
|
|
314
|
-
preferredPosition = positions[1];
|
|
315
|
-
break;
|
|
316
|
-
case 'right':
|
|
317
|
-
preferredPosition = positions[2];
|
|
318
|
-
break;
|
|
319
|
-
case 'left':
|
|
320
|
-
preferredPosition = positions[3];
|
|
321
|
-
break;
|
|
322
|
-
default:
|
|
323
|
-
preferredPosition = positions[0];
|
|
324
|
-
break;
|
|
325
|
-
}
|
|
326
|
-
return this.overlay
|
|
327
|
-
.position()
|
|
328
|
-
.flexibleConnectedTo(origin)
|
|
329
|
-
.withPositions([preferredPosition, ...positions])
|
|
330
|
-
.withPush(true);
|
|
331
|
-
}
|
|
332
|
-
//Document-level listeners for closing
|
|
333
|
-
onEscape() {
|
|
334
|
-
var _a, _b;
|
|
335
|
-
(_a = this.positionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
336
|
-
(_b = this.serviceSubscription) === null || _b === void 0 ? void 0 : _b.unsubscribe();
|
|
337
|
-
this.destroy();
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
RuclibOverlayComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayComponent, deps: [{ token: i1$1.Overlay }, { token: i0.Injector }, { token: OverlayService }], target: i0.ɵɵFactoryTarget.Component });
|
|
341
|
-
RuclibOverlayComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RuclibOverlayComponent, selector: "uxp-ruclib-overlay", inputs: { buttonText: "buttonText", rucInputData: "rucInputData", customTheme: "customTheme" }, host: { listeners: { "document:keydown:escape": "onEscape()" } }, viewQueries: [{ propertyName: "triggerButtonRef", first: true, predicate: MatButton, descendants: true, read: ElementRef }], ngImport: i0, template: "<button\r\nmat-raised-button\r\n color=\"primary\"\r\n *ngIf=\"buttonText\"\r\n #triggerButton\r\n (click)=\"toggle()\"\r\n (mouseenter)=\"handleMouseEnter()\"\r\n (mouseleave)=\"handleMouseLeave()\"\r\n class=\"popover-trigger-btn\">\r\n {{ buttonText }}\r\n</button>\r\n", styles: [""], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] });
|
|
342
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayComponent, decorators: [{
|
|
343
|
-
type: Component,
|
|
344
|
-
args: [{ selector: 'uxp-ruclib-overlay', template: "<button\r\nmat-raised-button\r\n color=\"primary\"\r\n *ngIf=\"buttonText\"\r\n #triggerButton\r\n (click)=\"toggle()\"\r\n (mouseenter)=\"handleMouseEnter()\"\r\n (mouseleave)=\"handleMouseLeave()\"\r\n class=\"popover-trigger-btn\">\r\n {{ buttonText }}\r\n</button>\r\n" }]
|
|
345
|
-
}], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: OverlayService }]; }, propDecorators: { buttonText: [{
|
|
346
|
-
type: Input
|
|
347
|
-
}], rucInputData: [{
|
|
348
|
-
type: Input
|
|
349
|
-
}], customTheme: [{
|
|
350
|
-
type: Input
|
|
351
|
-
}], triggerButtonRef: [{
|
|
352
|
-
type: ViewChild,
|
|
353
|
-
args: [MatButton, { read: ElementRef }]
|
|
354
|
-
}], onEscape: [{
|
|
355
|
-
type: HostListener,
|
|
356
|
-
args: ['document:keydown:escape']
|
|
357
|
-
}] } });
|
|
358
|
-
|
|
359
|
-
class RuclibOverlayModule {
|
|
360
|
-
}
|
|
361
|
-
RuclibOverlayModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
362
|
-
RuclibOverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayModule, declarations: [RuclibOverlayComponent,
|
|
363
|
-
OverlayContentComponent,
|
|
364
|
-
RucOverlayChartComponent], imports: [CommonModule,
|
|
365
|
-
MatIconModule,
|
|
366
|
-
OverlayModule,
|
|
367
|
-
BrowserAnimationsModule,
|
|
368
|
-
MatButtonModule,
|
|
369
|
-
MatCardModule], exports: [RuclibOverlayComponent, RucOverlayChartComponent] });
|
|
370
|
-
RuclibOverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayModule, imports: [CommonModule,
|
|
371
|
-
MatIconModule,
|
|
372
|
-
OverlayModule,
|
|
373
|
-
BrowserAnimationsModule,
|
|
374
|
-
MatButtonModule,
|
|
375
|
-
MatCardModule] });
|
|
376
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayModule, decorators: [{
|
|
377
|
-
type: NgModule,
|
|
378
|
-
args: [{
|
|
379
|
-
imports: [
|
|
380
|
-
CommonModule,
|
|
381
|
-
MatIconModule,
|
|
382
|
-
OverlayModule,
|
|
383
|
-
BrowserAnimationsModule,
|
|
384
|
-
MatButtonModule,
|
|
385
|
-
MatCardModule
|
|
386
|
-
],
|
|
387
|
-
declarations: [
|
|
388
|
-
RuclibOverlayComponent,
|
|
389
|
-
OverlayContentComponent,
|
|
390
|
-
RucOverlayChartComponent
|
|
391
|
-
],
|
|
392
|
-
exports: [RuclibOverlayComponent, RucOverlayChartComponent],
|
|
393
|
-
}]
|
|
394
|
-
}] });
|
|
395
|
-
|
|
396
|
-
/**
|
|
397
|
-
* Generated bundle index. Do not edit.
|
|
398
|
-
*/
|
|
399
|
-
|
|
400
|
-
export { OVERLAY_CONTROL, OverlayContentComponent, OverlayService, RucOverlayChartComponent, RuclibOverlayComponent, RuclibOverlayModule };
|
|
401
|
-
//# sourceMappingURL=ruc-lib-overlay.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ruc-lib-overlay.mjs","sources":["../../src/lib/model/overlay.types.ts","../../src/lib/ruc-overlay-chart/ruc-overlay-chart.component.ts","../../src/lib/ruc-overlay-chart/ruc-overlay-chart.component.html","../../src/lib/overlay-content/overlay-content.component.ts","../../src/lib/overlay-content/overlay-content.component.html","../../src/lib/constants/positions.ts","../../src/lib/service/overlay.service.ts","../../src/lib/ruclib-overlay/ruclib-overlay.component.ts","../../src/lib/ruclib-overlay/ruclib-overlay.component.html","../../src/lib/ruclib-overlay.module.ts","../../src/ruc-lib-overlay.ts"],"sourcesContent":["import { InjectionToken, TemplateRef } from '@angular/core';\r\n\r\n/**\r\n* Defines the configuration options that a user can pass to the popover.\r\n* This is the public API of your component.\r\n*/\r\nexport interface OverlayConfig {\r\n placement?: 'top' | 'bottom' | 'left' | 'right' | string;\r\n overlayTitle?: string;\r\n content?: string | TemplateRef<any>;\r\n animation?: 'fade' | 'scale';\r\n trigger?: 'click' | 'hover';\r\n showCloseButton?: boolean;\r\n closeIcon?: string;\r\n tableData?: any[];\r\n tableClass?: string;\r\n closeDelay?:number,\r\n chartConfig?:any\r\n}\r\n\r\n/**\r\n* Defines the data packet that the PopoverService sends.\r\n* It contains the configuration AND the element to position against.\r\n* THIS IS THE ONE THE SERVICE USES.\r\n*/\r\nexport interface OverlayData {\r\n config: OverlayConfig;\r\n trigger: HTMLElement;\r\n}\r\n\r\n/**\r\n* Defines the data and controls passed to the dynamically created PopoverContentComponent.\r\n* It includes the config AND a callback function to close the popover.\r\n*/\r\nexport interface OverlayControl {\r\n config: OverlayConfig;\r\n close: () => void;\r\n}\r\n\r\n/**\r\n* The Injection Token used to provide the PopoverControl object to the\r\n* PopoverContentComponent. This is the correct, final version.\r\n*/\r\nexport const OVERLAY_CONTROL = new InjectionToken<OverlayControl>('OVERLAY_CONTROL');\r\n","import {\r\n AfterViewInit,\r\n ChangeDetectionStrategy,\r\n Component,\r\n Input,\r\n OnDestroy\r\n} from '@angular/core';\r\nimport Chart from 'chart.js/auto';\r\n@Component({\r\n selector: 'uxp-ruc-overlay-chart',\r\n templateUrl: './ruc-overlay-chart.component.html',\r\n styleUrls: ['./ruc-overlay-chart.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class RucOverlayChartComponent implements AfterViewInit, OnDestroy {\r\n chart: any;\r\n @Input() index?:number = 0;\r\n @Input() chartConfig: any;\r\n\r\n ngAfterViewInit(): void {\r\n if(this.chartConfig) {\r\n this.chart = new Chart('canvas' + this.index, this.chartConfig);\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.chart?.destroy();\r\n this.chart = null;\r\n this.chartConfig = null;\r\n }\r\n}\r\n","<div style=\"position: relative; height:220px;\">\r\n <canvas id=\"canvas{{index}}\">{{chart}}</canvas>\r\n</div>\r\n","import { OverlayControl } from './../model/overlay.types';\r\n\r\nimport {\r\n Component,\r\n EventEmitter,\r\n HostBinding,\r\n Inject,\r\n Input,\r\n OnInit,\r\n Output,\r\n TemplateRef,\r\n} from '@angular/core';\r\nimport {\r\n animate,\r\n state,\r\n style,\r\n transition,\r\n trigger,\r\n} from '@angular/animations';\r\nimport { OVERLAY_CONTROL } from '../model/overlay.types';\r\nimport { PopoverPlacement } from '../ruclib-overlay/ruclib-overlay.component';\r\n\r\n@Component({\r\n selector: 'uxp-overlay-content',\r\n templateUrl: './overlay-content.component.html',\r\n styleUrls: ['./overlay-content.component.scss'],\r\n animations: [\r\n trigger('popoverAnimation', [\r\n state('void', style({ transform: 'scale(0.9)', opacity: 0 })),\r\n state('enter-scale', style({ transform: 'scale(1)', opacity: 1 })),\r\n state('enter-fade', style({ opacity: 1 })),\r\n transition(\r\n 'void => enter-scale',\r\n animate('150ms cubic-bezier(0, 0, 0.2, 1)')\r\n ),\r\n transition('void => enter-fade', [\r\n style({ opacity: 0, transform: 'translateY(10px)' }),\r\n animate('500ms', style({ opacity: 1, transform: 'translateY(0)' })),\r\n ]),\r\n transition('* => void', [\r\n animate('500ms', style({ opacity: 0, transform: 'translateY(10px)' })),\r\n ]),\r\n ]),\r\n ],\r\n})\r\n\r\nexport class OverlayContentComponent implements OnInit {\r\n public actualPlacement: string | PopoverPlacement = 'bottom';\r\n public tableHeaders:any[]=[];\r\n @Input() customTheme!:string;\r\n public arrowOffset =0;\r\n\r\n @Output() mouseEnterPopover = new EventEmitter<void>();\r\n @Output() mouseLeavePopover = new EventEmitter<void>();\r\n\r\n\r\n ngOnInit(): void {\r\n if(this.control.config.tableData) {\r\n this.getTableHeaders();\r\n }\r\n }\r\n\r\n @HostBinding('@popoverAnimation')\r\n get animationState() {\r\n return this.control.config.animation === 'scale'\r\n ? 'enter-scale'\r\n : 'enter-fade';\r\n }\r\n\r\n constructor(@Inject(OVERLAY_CONTROL) public control: OverlayControl) {\r\n this.actualPlacement = this.control.config.placement || 'bottom';\r\n }\r\n\r\n // Helper to check if content is a TemplateRef\r\n isTemplateRef(content: any): content is TemplateRef<any> {\r\n return content instanceof TemplateRef;\r\n }\r\n\r\n // Helper to get keys for the table header, robustly\r\n getTableHeaders(): void {\r\n const tempData = this.control.config.tableData;\r\n\r\n if (!tempData || tempData.length === 0) {\r\n this.tableHeaders = [];\r\n return;\r\n }\r\n // Assumes all objects in the array have the same shape\r\n this.tableHeaders = Object.keys(tempData[0]);\r\n }\r\n}\r\n","<mat-card class=\"popover-container\" class={{customTheme}} (click)=\"$event.stopPropagation()\">\r\n\r\n <div class=\"popover-arrow\"\r\n[attr.data-placement]=\"actualPlacement\"\r\n [style.left.px]=\"(actualPlacement.startsWith('top') || actualPlacement.startsWith('bottom')) ? arrowOffset : null\"\r\n[style.top.px]=\"(actualPlacement.startsWith('left') || actualPlacement.startsWith('right')) ? arrowOffset : null\">\r\n </div>\r\n <!-- Header with optional title and close button -->\r\n\r\n <mat-card-header *ngIf=\"\r\n control.config.overlayTitle ||\r\n control.config.showCloseButton ||\r\n control.config.closeIcon\r\n \"\r\n class=\"popover-header\"\r\n >\r\n <mat-card-title class=\"popover-title\" *ngIf=\"control.config.overlayTitle\">{{ control.config.overlayTitle }}</mat-card-title>\r\n <ng-container *ngIf=\"control.config.showCloseButton && control.config.closeIcon\">\r\n <button mat-icon-button class=\"close-btn\" (click)=\"control.close()\" color=\"primary\" aria-label=\"Close popover icon\">\r\n <mat-icon>{{ control.config.closeIcon }}</mat-icon>\r\n </button>\r\n </ng-container>\r\n </mat-card-header>\r\n\r\n\r\n <!-- Body with dynamic content -->\r\n <mat-card-content class=\"popover-body\">\r\n <!-- Case 1: Content is a simple string -->\r\n <ng-container\r\n *ngIf=\"\r\n !isTemplateRef(control.config.content) && !control.config.tableData\r\n \"\r\n >\r\n {{ control.config.content }}\r\n </ng-container>\r\n\r\n <!-- Case 2: Content is a TemplateRef -->\r\n <ng-container *ngIf=\"isTemplateRef(control.config.content)\">\r\n <ng-container *ngTemplateOutlet=\"control.config.content\"></ng-container>\r\n </ng-container>\r\n\r\n <ng-container *ngIf=\"control.config.chartConfig\">\r\n\r\n <uxp-ruc-overlay-chart [chartConfig]=\"control.config.chartConfig\"></uxp-ruc-overlay-chart>\r\n </ng-container>\r\n\r\n <!-- Case 3: Content is table data -->\r\n <ng-container *ngIf=\"control.config.tableData?.length\">\r\n <table\r\n class=\"popover-table\"\r\n [class]=\"control.config.tableClass || 'basic-table'\"\r\n >\r\n <thead>\r\n <tr>\r\n <th\r\n *ngFor=\"let header of this.tableHeaders!\"\r\n >\r\n {{ header }}\r\n </th>\r\n </tr>\r\n </thead>\r\n <tbody>\r\n <tr *ngFor=\"let row of control.config.tableData\">\r\n <td\r\n *ngFor=\"let header of this.tableHeaders!\"\r\n >\r\n {{ row[header] }}\r\n </td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n </ng-container>\r\n </mat-card-content>\r\n</mat-card>\r\n","import { ConnectedPosition } from \"@angular/cdk/overlay\";\r\n\r\nexport const positions: ConnectedPosition[] = [\r\n { originX: 'center', originY: 'bottom', overlayX: 'center', overlayY: 'top', offsetY: 10 },\r\n { originX: 'center', originY: 'top', overlayX: 'center', overlayY: 'bottom', offsetY: -10 },\r\n { originX: 'end', originY: 'center', overlayX: 'start', overlayY: 'center', offsetX: 10 },\r\n { originX: 'start', originY: 'center', overlayX: 'end', overlayY: 'center', offsetX: -10 }\r\n ];\r\n","import { OverlayData } from './../model/overlay.types';\r\nimport { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class OverlayService {\r\n\r\n private popoverState = new Subject<OverlayData | null>();\r\n\r\n public popoverState$ = this.popoverState.asObservable();\r\n\r\n\r\n\r\n /**\r\n * Broadcasts a command to open a popover using the OverlayData structure.\r\n */\r\n open(config: OverlayData['config'], trigger: OverlayData['trigger']) {\r\n console.log(config, trigger);\r\n // The service's responsibility is to bundle the config and trigger\r\n // into a PopoverData object and send it.\r\n this.popoverState.next({ config, trigger });\r\n }\r\n\r\n /**\r\n * Broadcasts a command to close any currently open service-controlled popover.\r\n */\r\n close() {\r\n this.popoverState.next(null);\r\n }\r\n}\r\n","import {\r\n ConnectedPosition,\r\n ConnectionPositionPair,\r\n FlexibleConnectedPositionStrategy,\r\n Overlay,\r\n OverlayRef,\r\n} from '@angular/cdk/overlay';\r\nimport {\r\n Component,\r\n ElementRef,\r\n HostListener,\r\n Injector,\r\n Input,\r\n OnDestroy,\r\n OnInit,\r\n ViewChild,\r\n} from '@angular/core';\r\nimport {\r\n OVERLAY_CONTROL,\r\n OverlayConfig,\r\n OverlayControl,\r\n OverlayData,\r\n} from '../model/overlay.types';\r\nimport { filter, Subscription } from 'rxjs';\r\nimport { ComponentPortal } from '@angular/cdk/portal';\r\nimport { OverlayService } from '../service/overlay.service';\r\nimport { OverlayContentComponent } from '../overlay-content/overlay-content.component';\r\nimport { MatButton } from '@angular/material/button';\r\nimport { ESCAPE } from '@angular/cdk/keycodes';\r\nimport { positions } from '../constants/positions';\r\n\r\nexport type PopoverPlacement = 'top' | 'bottom' | 'left' | 'right';\r\nexport type PopoverAnimation = 'fade' | 'scale';\r\nexport type ChartType = 'doughnut' | 'pie' | 'bar';\r\n\r\nexport interface ChartModel {\r\n chartType: ChartType;\r\n data: any;\r\n}\r\n\r\n@Component({\r\n selector: 'uxp-ruclib-overlay',\r\n templateUrl: './ruclib-overlay.component.html',\r\n styleUrls: ['./ruclib-overlay.component.scss'],\r\n})\r\nexport class RuclibOverlayComponent implements OnInit, OnDestroy {\r\n @Input() buttonText?: string;\r\n @Input() rucInputData: OverlayConfig = {\r\n content: 'Default content',\r\n };\r\n @Input() customTheme!: string;\r\n\r\n @ViewChild(MatButton, { read: ElementRef })\r\n private triggerButtonRef!: ElementRef;\r\n\r\n private overlayRef: OverlayRef | null = null;\r\n private serviceSubscription!: Subscription;\r\n private closeTimeout?: ReturnType<typeof setTimeout>; // Use the correct type\r\n private lastTriggerElement?: HTMLElement;\r\n private positionSubscription!: Subscription;\r\n\r\n constructor(\r\n private overlay: Overlay,\r\n private injector: Injector,\r\n private overlayService: OverlayService\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n if (!this.buttonText) {\r\n this.serviceSubscription = this.overlayService.popoverState$.subscribe(\r\n (data: any) => {\r\n if (data && !this.isOpen) {\r\n this.show(data.trigger, data.config);\r\n } else if (!data) {\r\n this.destroy();\r\n }\r\n }\r\n );\r\n }\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.positionSubscription?.unsubscribe();\r\n this.serviceSubscription?.unsubscribe();\r\n this.destroy();\r\n }\r\n\r\n get isOpen(): boolean {\r\n return !!this.overlayRef;\r\n }\r\n\r\n // --- Trigger Handlers for self-contained button ---\r\n toggle(): void {\r\n if (this.rucInputData.trigger !== 'hover') {\r\n this.isOpen\r\n ? this.destroy()\r\n : this.show(this.triggerButtonRef.nativeElement, this.rucInputData);\r\n }\r\n }\r\n\r\n handleMouseEnter(): void {\r\n if (this.rucInputData.trigger === 'hover') {\r\n if (this.closeTimeout) clearTimeout(this.closeTimeout); // Clear any pending close command\r\n this.show(this.triggerButtonRef.nativeElement, this.rucInputData);\r\n }\r\n }\r\n\r\n handleMouseLeave(): void {\r\n if (this.rucInputData.trigger === 'hover') {\r\n // Use the configurable closeDelay\r\n const delay = this.rucInputData.closeDelay ?? 200;\r\n this.closeTimeout = setTimeout(() => this.destroy(), delay);\r\n }\r\n }\r\n\r\n private show(trigger: HTMLElement, config: OverlayConfig): void {\r\n if (this.isOpen) return;\r\n\r\n const positionStrategy = this.createPositionStrategy(\r\n trigger,\r\n config.placement || 'bottom'\r\n );\r\n this.overlayRef = this.overlay.create({\r\n positionStrategy,\r\n hasBackdrop: config.trigger !== 'hover',\r\n backdropClass: 'cdk-overlay-transparent-backdrop',\r\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\r\n });\r\n\r\n this.overlayRef.keydownEvents().pipe(filter(event=> event.keyCode === ESCAPE)).subscribe(()=> this.destroy());\r\n\r\n const control: OverlayControl = { config, close: this.destroy.bind(this) };\r\n const injector = Injector.create({\r\n parent: this.injector,\r\n providers: [{ provide: OVERLAY_CONTROL, useValue: control }],\r\n });\r\n\r\n const portal = new ComponentPortal(OverlayContentComponent, null, injector);\r\n const componentRef = this.overlayRef.attach(portal);\r\n componentRef.instance.customTheme = this.customTheme;\r\n\r\n // --- START: MODIFICATION FOR DYNAMIC ARROW ---\r\n this.positionSubscription = positionStrategy.positionChanges.subscribe(\r\n (change) => {\r\n // 1. Get the new placement ('top', 'bottom', etc.)\r\n const newPlacement = this.getPlacementFromPosition(\r\n change.connectionPair\r\n );\r\n componentRef.instance.actualPlacement = newPlacement;\r\n\r\n // 2. Calculate the arrow's offset\r\n if (this.overlayRef) {\r\n const triggerRect = trigger.getBoundingClientRect();\r\n const popoverRect =\r\n this.overlayRef.overlayElement.getBoundingClientRect();\r\n\r\n let arrowOffset = 0;\r\n // If popover is top/bottom, arrow moves horizontally (left)\r\n if (\r\n newPlacement.startsWith('top') ||\r\n newPlacement.startsWith('bottom')\r\n ) {\r\n const triggerCenter = triggerRect.left + triggerRect.width / 2;\r\n arrowOffset = triggerCenter - popoverRect.left;\r\n }\r\n // If popover is left/right, arrow moves vertically (top)\r\n else {\r\n const triggerCenter = triggerRect.top + triggerRect.height / 2;\r\n arrowOffset = triggerCenter - popoverRect.top;\r\n }\r\n\r\n // 3. Pass the offset to the content component\r\n componentRef.instance.arrowOffset = arrowOffset;\r\n }\r\n\r\n componentRef.changeDetectorRef.detectChanges();\r\n }\r\n );\r\n\r\n componentRef.instance.mouseEnterPopover.subscribe(() => {\r\n if (this.closeTimeout) clearTimeout(this.closeTimeout);\r\n });\r\n componentRef.instance.mouseLeavePopover.subscribe(() =>\r\n this.handleMouseLeave()\r\n );\r\n\r\n if (config.trigger !== 'hover') {\r\n this.overlayRef.backdropClick().subscribe(() => this.destroy());\r\n }\r\n\r\n const popoverId = `popover-${Math.random().toString(36).substring(2, 9)}`;\r\n componentRef.location.nativeElement.setAttribute('id', popoverId);\r\n trigger.setAttribute('aria-describedby', popoverId);\r\n this.lastTriggerElement = trigger;\r\n }\r\n\r\n // Renamed from hide() to destroy() for clarity\r\n private destroy(): void {\r\n if (!this.overlayRef) return; // Prevent multiple calls\r\n\r\n if (this.lastTriggerElement) {\r\n this.lastTriggerElement.removeAttribute('aria-describedby');\r\n this.lastTriggerElement = undefined;\r\n }\r\n this.positionSubscription?.unsubscribe();\r\n this.overlayRef.dispose();\r\n this.overlayRef = null;\r\n }\r\n\r\n private getPlacementFromPosition(\r\n position: ConnectionPositionPair\r\n ): PopoverPlacement {\r\n if (position.originY === 'top' && position.overlayY === 'bottom')\r\n return 'top';\r\n if (position.originY === 'bottom' && position.overlayY === 'top')\r\n return 'bottom';\r\n if (position.originX === 'start' && position.overlayX === 'end')\r\n return 'left';\r\n if (position.originX === 'end' && position.overlayX === 'start')\r\n return 'right';\r\n return 'bottom';\r\n }\r\n\r\n private createPositionStrategy(\r\n origin: HTMLElement,\r\n placement: string\r\n ): FlexibleConnectedPositionStrategy {\r\n let preferredPosition: ConnectedPosition;\r\n switch (placement) {\r\n case 'top':\r\n preferredPosition = positions[1];\r\n break;\r\n case 'right':\r\n preferredPosition = positions[2];\r\n break;\r\n case 'left':\r\n preferredPosition = positions[3];\r\n break;\r\n default:\r\n preferredPosition = positions[0];\r\n break;\r\n }\r\n\r\n return this.overlay\r\n .position()\r\n .flexibleConnectedTo(origin)\r\n .withPositions([preferredPosition, ...positions])\r\n .withPush(true);\r\n }\r\n\r\n //Document-level listeners for closing\r\n @HostListener('document:keydown:escape')\r\n onEscape(): void {\r\n this.positionSubscription?.unsubscribe();\r\n this.serviceSubscription?.unsubscribe();\r\n this.destroy();\r\n }\r\n}\r\n","<button\r\nmat-raised-button\r\n color=\"primary\"\r\n *ngIf=\"buttonText\"\r\n #triggerButton\r\n (click)=\"toggle()\"\r\n (mouseenter)=\"handleMouseEnter()\"\r\n (mouseleave)=\"handleMouseLeave()\"\r\n class=\"popover-trigger-btn\">\r\n {{ buttonText }}\r\n</button>\r\n","import { MatCardModule } from '@angular/material/card';\r\nimport { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { RuclibOverlayComponent } from './ruclib-overlay/ruclib-overlay.component';\r\nimport { OverlayContentComponent } from './overlay-content/overlay-content.component';\r\nimport { MatIconModule } from '@angular/material/icon';\r\nimport { OverlayModule } from '@angular/cdk/overlay';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { RucOverlayChartComponent } from './ruc-overlay-chart/ruc-overlay-chart.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MatIconModule,\r\n OverlayModule,\r\n BrowserAnimationsModule,\r\n MatButtonModule,\r\n MatCardModule\r\n ],\r\n declarations: [\r\n RuclibOverlayComponent,\r\n OverlayContentComponent,\r\n RucOverlayChartComponent\r\n ],\r\n exports: [RuclibOverlayComponent, RucOverlayChartComponent],\r\n})\r\nexport class RuclibOverlayModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i5.RucOverlayChartComponent","i1","i2.OverlayService","i3","i4"],"mappings":";;;;;;;;;;;;;;;;;;;AAuCA;;;AAGE;MACW,eAAe,GAAG,IAAI,cAAc,CAAiB,iBAAiB;;MC7BtE,wBAAwB,CAAA;AANrC,IAAA,WAAA,GAAA;AAQW,QAAA,IAAK,CAAA,KAAA,GAAW,CAAC,CAAC;KAc5B;IAXC,eAAe,GAAA;QACb,IAAG,IAAI,CAAC,WAAW,EAAE;AACnB,YAAA,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;AACjE,SAAA;KACF;IAED,WAAW,GAAA;;AACT,QAAA,CAAA,EAAA,GAAA,IAAI,CAAC,KAAK,MAAE,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAA,EAAA,CAAA,OAAO,EAAE,CAAC;AACtB,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;AAClB,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;KACzB;;sHAfU,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,qHCdrC,0HAGA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;4FDWa,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBANpC,SAAS;+BACE,uBAAuB,EAAA,eAAA,EAGhB,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,0HAAA,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