dolfo-angular 1.230.0 → 1.231.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.
|
@@ -429,7 +429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.0", ngImpor
|
|
|
429
429
|
class TooltipDirective extends Subscriptable {
|
|
430
430
|
content;
|
|
431
431
|
direction = "top";
|
|
432
|
-
el = inject(ElementRef);
|
|
432
|
+
el = inject((ElementRef));
|
|
433
433
|
ts = inject(TooltipService);
|
|
434
434
|
constructor() {
|
|
435
435
|
super();
|
|
@@ -492,7 +492,7 @@ class InputContainerComponent {
|
|
|
492
492
|
return null;
|
|
493
493
|
}));
|
|
494
494
|
input = inject(BaseFormInput);
|
|
495
|
-
elRef = inject(ElementRef);
|
|
495
|
+
elRef = inject((ElementRef));
|
|
496
496
|
translateService = inject(TranslateService);
|
|
497
497
|
cp = inject(DecimalPipe);
|
|
498
498
|
focus = () => {
|
|
@@ -2210,14 +2210,14 @@ class ContextMenuDirective extends Subscriptable {
|
|
|
2210
2210
|
useElRef;
|
|
2211
2211
|
position = "bottom-left";
|
|
2212
2212
|
contextMenuService = inject(ContextMenuService);
|
|
2213
|
-
elRef = inject(ElementRef);
|
|
2213
|
+
elRef = inject((ElementRef));
|
|
2214
2214
|
ngOnInit() {
|
|
2215
2215
|
this.addSubscription(fromEvent(this.elRef.nativeElement, this.openOnClick ? "click" : "contextmenu").subscribe(e => {
|
|
2216
2216
|
e.preventDefault();
|
|
2217
|
-
const [left, top] = this.getElRefPosition();
|
|
2217
|
+
const [left, top] = this.useElRef ? this.getElRefPosition() : [e.clientX, e.clientY];
|
|
2218
2218
|
this.contextMenuService.openContextMenu({
|
|
2219
|
-
x:
|
|
2220
|
-
y:
|
|
2219
|
+
x: left,
|
|
2220
|
+
y: top,
|
|
2221
2221
|
items: this.contextMenu,
|
|
2222
2222
|
ref: this.elRef,
|
|
2223
2223
|
position: this.position
|
|
@@ -2225,17 +2225,17 @@ class ContextMenuDirective extends Subscriptable {
|
|
|
2225
2225
|
}));
|
|
2226
2226
|
}
|
|
2227
2227
|
getElRefPosition = () => {
|
|
2228
|
-
const
|
|
2228
|
+
const { left, width, top, height } = this.elRef.nativeElement.getBoundingClientRect();
|
|
2229
|
+
const diff = left + width;
|
|
2229
2230
|
if (this.position.startsWith("bottom-")) {
|
|
2230
|
-
const
|
|
2231
|
+
const posTop = top + height;
|
|
2231
2232
|
if (this.position === "bottom-left")
|
|
2232
|
-
return [
|
|
2233
|
-
return [diff,
|
|
2233
|
+
return [left, posTop];
|
|
2234
|
+
return [diff, posTop];
|
|
2234
2235
|
}
|
|
2235
|
-
const top = this.elRef.nativeElement.offsetTop;
|
|
2236
2236
|
if (this.position === "top-right")
|
|
2237
2237
|
return [diff, top];
|
|
2238
|
-
return [
|
|
2238
|
+
return [left, top];
|
|
2239
2239
|
};
|
|
2240
2240
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: ContextMenuDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
2241
2241
|
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "22.1.0", type: ContextMenuDirective, isStandalone: false, selector: "[dolfoContextMenu]", inputs: { contextMenu: ["dolfoContextMenu", "contextMenu"], openOnClick: ["openOnClick", "openOnClick", booleanAttribute], useElRef: ["useElRef", "useElRef", booleanAttribute], position: "position" }, usesInheritance: true, ngImport: i0 });
|
|
@@ -2265,7 +2265,7 @@ class NavigateDirective extends Subscriptable {
|
|
|
2265
2265
|
publicUrl = inject(APP_BASE_HREF);
|
|
2266
2266
|
storeService = inject(StoreService);
|
|
2267
2267
|
router = inject(Router);
|
|
2268
|
-
elementRef = inject(ElementRef);
|
|
2268
|
+
elementRef = inject((ElementRef));
|
|
2269
2269
|
constructor() {
|
|
2270
2270
|
super();
|
|
2271
2271
|
this.isLink = this.elementRef.nativeElement.tagName.toLowerCase() === "a";
|
|
@@ -2307,7 +2307,7 @@ class PopoverDirective extends Subscriptable {
|
|
|
2307
2307
|
content;
|
|
2308
2308
|
context;
|
|
2309
2309
|
direction = "top";
|
|
2310
|
-
el = inject(ElementRef);
|
|
2310
|
+
el = inject((ElementRef));
|
|
2311
2311
|
ps = inject(PopoverService);
|
|
2312
2312
|
ngOnInit() {
|
|
2313
2313
|
this.addSubscription(fromEvent(this.el.nativeElement, "mousedown").pipe(filter(() => !!this.ps.getPopover())).subscribe(() => this.ps.hide()));
|
|
@@ -2344,7 +2344,7 @@ class ScrollDragDirective extends Subscriptable {
|
|
|
2344
2344
|
mouseDownY;
|
|
2345
2345
|
initialScrollY = 0;
|
|
2346
2346
|
diffY = 0;
|
|
2347
|
-
elementRef = inject(ElementRef);
|
|
2347
|
+
elementRef = inject((ElementRef));
|
|
2348
2348
|
constructor() {
|
|
2349
2349
|
super();
|
|
2350
2350
|
this.addSubscription(fromEvent(this.elementRef.nativeElement, "mousedown").pipe(filter(e => e.button === 0)).subscribe(e => {
|