@ruc-lib/overlay 2.0.0 → 2.0.2
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 +160 -7
- package/esm2020/lib/overlay-content/overlay-content.component.mjs +11 -6
- package/esm2020/lib/ruclib-overlay/ruclib-overlay.component.mjs +36 -26
- package/esm2020/lib/ruclib-overlay.module.mjs +7 -3
- package/fesm2015/ruc-lib-overlay.mjs +48 -29
- package/fesm2015/ruc-lib-overlay.mjs.map +1 -1
- package/fesm2020/ruc-lib-overlay.mjs +48 -29
- package/fesm2020/ruc-lib-overlay.mjs.map +1 -1
- package/lib/overlay-content/overlay-content.component.d.ts +3 -1
- package/lib/ruclib-overlay.module.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as i4 from '@angular/material/card';
|
|
2
|
+
import { MatCardModule } from '@angular/material/card';
|
|
1
3
|
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
2
4
|
import * as i0 from '@angular/core';
|
|
3
5
|
import { InjectionToken, Injectable, Component, ChangeDetectionStrategy, Input, EventEmitter, TemplateRef, Inject, Output, HostBinding, Injector, ElementRef, ViewChild, HostListener, NgModule } from '@angular/core';
|
|
@@ -5,15 +7,14 @@ import * as i1 from '@angular/common';
|
|
|
5
7
|
import { CommonModule } from '@angular/common';
|
|
6
8
|
import * as i1$1 from '@angular/cdk/overlay';
|
|
7
9
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
8
|
-
import { Subject, filter } from 'rxjs';
|
|
9
10
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
11
|
+
import { Subject } from 'rxjs';
|
|
10
12
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
11
13
|
import * as i2 from '@angular/material/icon';
|
|
12
14
|
import { MatIconModule } from '@angular/material/icon';
|
|
13
|
-
import
|
|
14
|
-
import * as i4 from '@angular/material/button';
|
|
15
|
+
import * as i3 from '@angular/material/button';
|
|
15
16
|
import { MatButton, MatButtonModule } from '@angular/material/button';
|
|
16
|
-
import
|
|
17
|
+
import Chart from 'chart.js/auto';
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* The Injection Token used to provide the PopoverControl object to the
|
|
@@ -92,6 +93,7 @@ class OverlayContentComponent {
|
|
|
92
93
|
this.control = control;
|
|
93
94
|
this.actualPlacement = 'bottom';
|
|
94
95
|
this.tableHeaders = [];
|
|
96
|
+
this.arrowOffset = 0;
|
|
95
97
|
this.mouseEnterPopover = new EventEmitter();
|
|
96
98
|
this.mouseLeavePopover = new EventEmitter();
|
|
97
99
|
this.actualPlacement = this.control.config.placement || 'bottom';
|
|
@@ -112,7 +114,7 @@ class OverlayContentComponent {
|
|
|
112
114
|
}
|
|
113
115
|
}
|
|
114
116
|
OverlayContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: OverlayContentComponent, deps: [{ token: OVERLAY_CONTROL }], target: i0.ɵɵFactoryTarget.Component });
|
|
115
|
-
OverlayContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: OverlayContentComponent, selector: "uxp-overlay-content", outputs: { mouseEnterPopover: "mouseEnterPopover", mouseLeavePopover: "mouseLeavePopover" }, host: { properties: { "@popoverAnimation": "this.animationState" } }, ngImport: i0, template: "<
|
|
117
|
+
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\">\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: [
|
|
116
118
|
trigger('popoverAnimation', [
|
|
117
119
|
state('void', style({ transform: 'scale(0.9)', opacity: 0 })),
|
|
118
120
|
state('enter-scale', style({ transform: 'scale(1)', opacity: 1 })),
|
|
@@ -143,11 +145,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
143
145
|
animate('500ms', style({ opacity: 0, transform: 'translateY(10px)' })),
|
|
144
146
|
]),
|
|
145
147
|
]),
|
|
146
|
-
], template: "<
|
|
148
|
+
], 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\">\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"] }]
|
|
147
149
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
148
150
|
type: Inject,
|
|
149
151
|
args: [OVERLAY_CONTROL]
|
|
150
|
-
}] }]; }, propDecorators: {
|
|
152
|
+
}] }]; }, propDecorators: { customTheme: [{
|
|
153
|
+
type: Input
|
|
154
|
+
}], mouseEnterPopover: [{
|
|
151
155
|
type: Output
|
|
152
156
|
}], mouseLeavePopover: [{
|
|
153
157
|
type: Output
|
|
@@ -196,7 +200,9 @@ class RuclibOverlayComponent {
|
|
|
196
200
|
// --- Trigger Handlers for self-contained button ---
|
|
197
201
|
toggle() {
|
|
198
202
|
if (this.rucInputData.trigger !== 'hover') {
|
|
199
|
-
this.isOpen
|
|
203
|
+
this.isOpen
|
|
204
|
+
? this.destroy()
|
|
205
|
+
: this.show(this.triggerButtonRef.nativeElement, this.rucInputData);
|
|
200
206
|
}
|
|
201
207
|
}
|
|
202
208
|
handleMouseEnter() {
|
|
@@ -214,47 +220,56 @@ class RuclibOverlayComponent {
|
|
|
214
220
|
}
|
|
215
221
|
}
|
|
216
222
|
show(trigger, config) {
|
|
217
|
-
if (this.isOpen)
|
|
223
|
+
if (this.isOpen)
|
|
218
224
|
return;
|
|
219
|
-
}
|
|
220
225
|
const positionStrategy = this.createPositionStrategy(trigger, config.placement || 'bottom');
|
|
221
226
|
this.overlayRef = this.overlay.create({
|
|
222
227
|
positionStrategy,
|
|
223
228
|
hasBackdrop: config.trigger !== 'hover',
|
|
224
229
|
backdropClass: 'cdk-overlay-transparent-backdrop',
|
|
225
230
|
scrollStrategy: this.overlay.scrollStrategies.reposition(),
|
|
226
|
-
disposeOnNavigation: true
|
|
227
231
|
});
|
|
228
|
-
|
|
229
|
-
// Create the control object with the close callback
|
|
230
|
-
const control = {
|
|
231
|
-
config,
|
|
232
|
-
close: this.destroy.bind(this),
|
|
233
|
-
};
|
|
232
|
+
const control = { config, close: this.destroy.bind(this) };
|
|
234
233
|
const injector = Injector.create({
|
|
235
234
|
parent: this.injector,
|
|
236
235
|
providers: [{ provide: OVERLAY_CONTROL, useValue: control }],
|
|
237
236
|
});
|
|
238
237
|
const portal = new ComponentPortal(OverlayContentComponent, null, injector);
|
|
239
238
|
const componentRef = this.overlayRef.attach(portal);
|
|
240
|
-
|
|
239
|
+
// --- START: MODIFICATION FOR DYNAMIC ARROW ---
|
|
240
|
+
this.positionSubscription = positionStrategy.positionChanges.subscribe((change) => {
|
|
241
|
+
// 1. Get the new placement ('top', 'bottom', etc.)
|
|
241
242
|
const newPlacement = this.getPlacementFromPosition(change.connectionPair);
|
|
242
243
|
componentRef.instance.actualPlacement = newPlacement;
|
|
244
|
+
// 2. Calculate the arrow's offset
|
|
245
|
+
if (this.overlayRef) {
|
|
246
|
+
const triggerRect = trigger.getBoundingClientRect();
|
|
247
|
+
const popoverRect = this.overlayRef.overlayElement.getBoundingClientRect();
|
|
248
|
+
let arrowOffset = 0;
|
|
249
|
+
// If popover is top/bottom, arrow moves horizontally (left)
|
|
250
|
+
if (newPlacement.startsWith('top') ||
|
|
251
|
+
newPlacement.startsWith('bottom')) {
|
|
252
|
+
const triggerCenter = triggerRect.left + triggerRect.width / 2;
|
|
253
|
+
arrowOffset = triggerCenter - popoverRect.left;
|
|
254
|
+
}
|
|
255
|
+
// If popover is left/right, arrow moves vertically (top)
|
|
256
|
+
else {
|
|
257
|
+
const triggerCenter = triggerRect.top + triggerRect.height / 2;
|
|
258
|
+
arrowOffset = triggerCenter - popoverRect.top;
|
|
259
|
+
}
|
|
260
|
+
// 3. Pass the offset to the content component
|
|
261
|
+
componentRef.instance.arrowOffset = arrowOffset;
|
|
262
|
+
}
|
|
243
263
|
componentRef.changeDetectorRef.detectChanges();
|
|
244
264
|
});
|
|
245
|
-
// --- NEW: Subscribe to the content component's events ---
|
|
246
265
|
componentRef.instance.mouseEnterPopover.subscribe(() => {
|
|
247
266
|
if (this.closeTimeout)
|
|
248
267
|
clearTimeout(this.closeTimeout);
|
|
249
268
|
});
|
|
250
|
-
componentRef.instance.mouseLeavePopover.subscribe(() =>
|
|
251
|
-
this.handleMouseLeave(); // Re-use the same logic
|
|
252
|
-
});
|
|
253
|
-
// Close on backdrop click for 'click' triggers
|
|
269
|
+
componentRef.instance.mouseLeavePopover.subscribe(() => this.handleMouseLeave());
|
|
254
270
|
if (config.trigger !== 'hover') {
|
|
255
271
|
this.overlayRef.backdropClick().subscribe(() => this.destroy());
|
|
256
272
|
}
|
|
257
|
-
// --- NEW: Accessibility ---
|
|
258
273
|
const popoverId = `popover-${Math.random().toString(36).substring(2, 9)}`;
|
|
259
274
|
componentRef.location.nativeElement.setAttribute('id', popoverId);
|
|
260
275
|
trigger.setAttribute('aria-describedby', popoverId);
|
|
@@ -299,7 +314,8 @@ class RuclibOverlayComponent {
|
|
|
299
314
|
preferredPosition = positions[0];
|
|
300
315
|
break;
|
|
301
316
|
}
|
|
302
|
-
return this.overlay
|
|
317
|
+
return this.overlay
|
|
318
|
+
.position()
|
|
303
319
|
.flexibleConnectedTo(origin)
|
|
304
320
|
.withPositions([preferredPosition, ...positions])
|
|
305
321
|
.withPush(true);
|
|
@@ -312,10 +328,10 @@ class RuclibOverlayComponent {
|
|
|
312
328
|
}
|
|
313
329
|
}
|
|
314
330
|
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 });
|
|
315
|
-
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
|
|
331
|
+
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\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"] }] });
|
|
316
332
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayComponent, decorators: [{
|
|
317
333
|
type: Component,
|
|
318
|
-
args: [{ selector: 'uxp-ruclib-overlay', template: "<button\r\nmat-raised-button\r\n
|
|
334
|
+
args: [{ selector: 'uxp-ruclib-overlay', template: "<button\r\nmat-raised-button\r\n\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" }]
|
|
319
335
|
}], ctorParameters: function () { return [{ type: i1$1.Overlay }, { type: i0.Injector }, { type: OverlayService }]; }, propDecorators: { buttonText: [{
|
|
320
336
|
type: Input
|
|
321
337
|
}], rucInputData: [{
|
|
@@ -339,12 +355,14 @@ RuclibOverlayModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ver
|
|
|
339
355
|
MatIconModule,
|
|
340
356
|
OverlayModule,
|
|
341
357
|
BrowserAnimationsModule,
|
|
342
|
-
MatButtonModule
|
|
358
|
+
MatButtonModule,
|
|
359
|
+
MatCardModule], exports: [RuclibOverlayComponent, RucOverlayChartComponent] });
|
|
343
360
|
RuclibOverlayModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayModule, imports: [CommonModule,
|
|
344
361
|
MatIconModule,
|
|
345
362
|
OverlayModule,
|
|
346
363
|
BrowserAnimationsModule,
|
|
347
|
-
MatButtonModule
|
|
364
|
+
MatButtonModule,
|
|
365
|
+
MatCardModule] });
|
|
348
366
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibOverlayModule, decorators: [{
|
|
349
367
|
type: NgModule,
|
|
350
368
|
args: [{
|
|
@@ -354,6 +372,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImpo
|
|
|
354
372
|
OverlayModule,
|
|
355
373
|
BrowserAnimationsModule,
|
|
356
374
|
MatButtonModule,
|
|
375
|
+
MatCardModule
|
|
357
376
|
],
|
|
358
377
|
declarations: [
|
|
359
378
|
RuclibOverlayComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ruc-lib-overlay.mjs","sources":["../../src/lib/model/overlay.types.ts","../../src/lib/service/overlay.service.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/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 { 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 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 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\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","<div class=\"popover-container\" (click)=\"$event.stopPropagation()\">\r\n <div class=\"popover-arrow\" [attr.data-placement]=\"actualPlacement\"></div>\r\n <!-- Header with optional title and close button -->\r\n <div\r\n *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 <h3 *ngIf=\"control.config.overlayTitle\">\r\n {{ control.config.overlayTitle }}\r\n </h3>\r\n\r\n\r\n <ng-container *ngIf=\"control.config.showCloseButton\">\r\n <button\r\n type=\"button\"\r\n class=\"close-btn\"\r\n aria-label=\"Close\"\r\n (click)=\"control.close()\"\r\n >\r\n <mat-icon>{{ control.config.closeIcon }}</mat-icon>\r\n </button>\r\n </ng-container>\r\n </div>\r\n\r\n <!-- Body with dynamic content -->\r\n <div 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 </div>\r\n</div>\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 { ConnectedPosition, ConnectionPositionPair, FlexibleConnectedPositionStrategy, Overlay, OverlayRef } from '@angular/cdk/overlay';\r\nimport { Component, ElementRef, HostListener, Injector, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\r\nimport { OVERLAY_CONTROL, OverlayConfig, OverlayControl, OverlayData } 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\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 \r\n @ViewChild(MatButton, { read: ElementRef }) 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\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\nthis.isOpen ? this.destroy() : 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\nthis.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\r\n private show(trigger: HTMLElement, config: OverlayConfig): void {\r\n if (this.isOpen) {\r\n return;\r\n }\r\n\r\n const positionStrategy = this.createPositionStrategy(\r\n trigger,\r\n config.placement || 'bottom'\r\n );\r\n\r\n this.overlayRef = this.overlay.create({\r\n positionStrategy,\r\n hasBackdrop: config.trigger !== 'hover', // No backdrop for hover\r\n backdropClass: 'cdk-overlay-transparent-backdrop',\r\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\r\n disposeOnNavigation:true\r\n });\r\n\r\n\r\n this.overlayRef.keydownEvents().pipe(filter(event=> event.keyCode === ESCAPE)).subscribe(()=> this.destroy());\r\n\r\n // Create the control object with the close callback\r\n const control: OverlayControl = {\r\n config,\r\n close: this.destroy.bind(this),\r\n };\r\n\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\r\n this.positionSubscription = positionStrategy.positionChanges.subscribe(change => {\r\n const newPlacement = this.getPlacementFromPosition(change.connectionPair);\r\n componentRef.instance.actualPlacement = newPlacement;\r\n componentRef.changeDetectorRef.detectChanges();\r\n });\r\n\r\n // --- NEW: Subscribe to the content component's events ---\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(); // Re-use the same logic\r\n });\r\n\r\n // Close on backdrop click for 'click' triggers\r\n if (config.trigger !== 'hover') {\r\n this.overlayRef.backdropClick().subscribe(() => this.destroy());\r\n }\r\n\r\n // --- NEW: Accessibility ---\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\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(position: ConnectionPositionPair): PopoverPlacement {\r\n if (position.originY === 'top' && position.overlayY === 'bottom') return 'top';\r\n if (position.originY === 'bottom' && position.overlayY === 'top') return 'bottom';\r\n if (position.originX === 'start' && position.overlayX === 'end') return 'left';\r\n if (position.originX === 'end' && position.overlayX === 'start') return 'right';\r\n return 'bottom';\r\n }\r\n\r\n private createPositionStrategy(origin: HTMLElement, placement: string): FlexibleConnectedPositionStrategy {\r\n let preferredPosition: ConnectedPosition;\r\n switch (placement) {\r\n case 'top': preferredPosition = positions[1]; break;\r\n case 'right': preferredPosition = positions[2]; break;\r\n case 'left': preferredPosition = positions[3]; break;\r\n default: preferredPosition = positions[0]; break;\r\n }\r\n\r\n return this.overlay.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}\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 { 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 ],\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":["i3.RucOverlayChartComponent","i1","i2.OverlayService","i3"],"mappings":";;;;;;;;;;;;;;;;;AAuCA;;;AAGE;MACW,eAAe,GAAG,IAAI,cAAc,CAAiB,iBAAiB;;MCpCtE,cAAc,CAAA;AAH3B,IAAA,WAAA,GAAA;AAKU,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAsB,CAAC;AAElD,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;AAoBzD,KAAA;AAhBC;;AAEG;IACH,IAAI,CAAC,MAA6B,EAAE,OAA+B,EAAA;AACjE,QAAA,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;;QAG7B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;KAC7C;AAED;;AAEG;IACH,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC9B;;4GAvBU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EA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BAAuB;QACvB,eAAe,CAAA,EAAA,CAAA,CAAA;4FASN,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAf/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,aAAa;wBACb,uBAAuB;wBACvB,eAAe;AAChB,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACZ,sBAAsB;wBACtB,uBAAuB;wBACvB,wBAAwB;AACzB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,wBAAwB,CAAC;AAC5D,iBAAA,CAAA;;;ACxBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ruc-lib-overlay.mjs","sources":["../../src/lib/model/overlay.types.ts","../../src/lib/service/overlay.service.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/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 { 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 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\">\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 {\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 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\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\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;;MCpCtE,cAAc,CAAA;AAH3B,IAAA,WAAA,GAAA;AAKU,QAAA,IAAA,CAAA,YAAY,GAAG,IAAI,OAAO,EAAsB,CAAC;AAElD,QAAA,IAAA,CAAA,aAAa,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;AAoBzD,KAAA;AAhBC;;AAEG;IACH,IAAI,CAAC,MAA6B,EAAE,OAA+B,EAAA;AACjE,QAAA,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;;;QAG7B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;KAC7C;AAED;;AAEG;IACH,KAAK,GAAA;AACH,QAAA,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KAC9B;;4GAvBU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAd,cAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cAFb,MAAM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aAAa;QACb,uBAAuB;QACvB,eAAe;QACf,aAAa,CAAA,EAAA,CAAA,CAAA;4FASJ,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAhB/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,aAAa;wBACb,aAAa;wBACb,uBAAuB;wBACvB,eAAe;wBACf,aAAa;AACd,qBAAA;AACD,oBAAA,YAAY,EAAE;wBACZ,sBAAsB;wBACtB,uBAAuB;wBACvB,wBAAwB;AACzB,qBAAA;AACD,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,wBAAwB,CAAC;AAC5D,iBAAA,CAAA;;;AC1BD;;AAEG;;;;"}
|
|
@@ -6,6 +6,8 @@ export declare class OverlayContentComponent implements OnInit {
|
|
|
6
6
|
control: OverlayControl;
|
|
7
7
|
actualPlacement: string | PopoverPlacement;
|
|
8
8
|
tableHeaders: any[];
|
|
9
|
+
customTheme: string;
|
|
10
|
+
arrowOffset: number;
|
|
9
11
|
mouseEnterPopover: EventEmitter<void>;
|
|
10
12
|
mouseLeavePopover: EventEmitter<void>;
|
|
11
13
|
ngOnInit(): void;
|
|
@@ -14,5 +16,5 @@ export declare class OverlayContentComponent implements OnInit {
|
|
|
14
16
|
isTemplateRef(content: any): content is TemplateRef<any>;
|
|
15
17
|
getTableHeaders(): void;
|
|
16
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<OverlayContentComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<OverlayContentComponent, "uxp-overlay-content", never, {}, { "mouseEnterPopover": "mouseEnterPopover"; "mouseLeavePopover": "mouseLeavePopover"; }, never, never, false, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OverlayContentComponent, "uxp-overlay-content", never, { "customTheme": "customTheme"; }, { "mouseEnterPopover": "mouseEnterPopover"; "mouseLeavePopover": "mouseLeavePopover"; }, never, never, false, never>;
|
|
18
20
|
}
|
|
@@ -7,8 +7,9 @@ import * as i5 from "@angular/material/icon";
|
|
|
7
7
|
import * as i6 from "@angular/cdk/overlay";
|
|
8
8
|
import * as i7 from "@angular/platform-browser/animations";
|
|
9
9
|
import * as i8 from "@angular/material/button";
|
|
10
|
+
import * as i9 from "@angular/material/card";
|
|
10
11
|
export declare class RuclibOverlayModule {
|
|
11
12
|
static ɵfac: i0.ɵɵFactoryDeclaration<RuclibOverlayModule, never>;
|
|
12
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<RuclibOverlayModule, [typeof i1.RuclibOverlayComponent, typeof i2.OverlayContentComponent, typeof i3.RucOverlayChartComponent], [typeof i4.CommonModule, typeof i5.MatIconModule, typeof i6.OverlayModule, typeof i7.BrowserAnimationsModule, typeof i8.MatButtonModule], [typeof i1.RuclibOverlayComponent, typeof i3.RucOverlayChartComponent]>;
|
|
13
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<RuclibOverlayModule, [typeof i1.RuclibOverlayComponent, typeof i2.OverlayContentComponent, typeof i3.RucOverlayChartComponent], [typeof i4.CommonModule, typeof i5.MatIconModule, typeof i6.OverlayModule, typeof i7.BrowserAnimationsModule, typeof i8.MatButtonModule, typeof i9.MatCardModule], [typeof i1.RuclibOverlayComponent, typeof i3.RucOverlayChartComponent]>;
|
|
13
14
|
static ɵinj: i0.ɵɵInjectorDeclaration<RuclibOverlayModule>;
|
|
14
15
|
}
|