dolfo-angular 1.230.0 → 1.232.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 = () => {
@@ -1174,6 +1174,7 @@ class Formable extends Subscriptable {
1174
1174
  this.formRef.form.get(passwordControlName).markAsTouched();
1175
1175
  }));
1176
1176
  };
1177
+ isLoading$ = () => this.loading$.asObservable();
1177
1178
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: Formable, deps: null, target: i0.ɵɵFactoryTarget.Directive });
1178
1179
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.0", type: Formable, isStandalone: true, viewQueries: [{ propertyName: "formRef", first: true, predicate: FormGroupDirective, descendants: true }, { propertyName: "inputs", predicate: BaseFormInput, descendants: true }], usesInheritance: true, ngImport: i0 });
1179
1180
  }
@@ -2210,14 +2211,14 @@ class ContextMenuDirective extends Subscriptable {
2210
2211
  useElRef;
2211
2212
  position = "bottom-left";
2212
2213
  contextMenuService = inject(ContextMenuService);
2213
- elRef = inject(ElementRef);
2214
+ elRef = inject((ElementRef));
2214
2215
  ngOnInit() {
2215
2216
  this.addSubscription(fromEvent(this.elRef.nativeElement, this.openOnClick ? "click" : "contextmenu").subscribe(e => {
2216
2217
  e.preventDefault();
2217
- const [left, top] = this.getElRefPosition();
2218
+ const [left, top] = this.useElRef ? this.getElRefPosition() : [e.clientX, e.clientY];
2218
2219
  this.contextMenuService.openContextMenu({
2219
- x: this.useElRef ? left : e.clientX,
2220
- y: this.useElRef ? top : e.clientY,
2220
+ x: left,
2221
+ y: top,
2221
2222
  items: this.contextMenu,
2222
2223
  ref: this.elRef,
2223
2224
  position: this.position
@@ -2225,17 +2226,17 @@ class ContextMenuDirective extends Subscriptable {
2225
2226
  }));
2226
2227
  }
2227
2228
  getElRefPosition = () => {
2228
- const diff = this.elRef.nativeElement.offsetLeft + this.elRef.nativeElement.offsetWidth;
2229
+ const { left, width, top, height } = this.elRef.nativeElement.getBoundingClientRect();
2230
+ const diff = left + width;
2229
2231
  if (this.position.startsWith("bottom-")) {
2230
- const top = this.elRef.nativeElement.offsetTop + this.elRef.nativeElement.offsetHeight;
2232
+ const posTop = top + height;
2231
2233
  if (this.position === "bottom-left")
2232
- return [this.elRef.nativeElement.offsetLeft, top];
2233
- return [diff, top];
2234
+ return [left, posTop];
2235
+ return [diff, posTop];
2234
2236
  }
2235
- const top = this.elRef.nativeElement.offsetTop;
2236
2237
  if (this.position === "top-right")
2237
2238
  return [diff, top];
2238
- return [this.elRef.nativeElement.offsetLeft, top];
2239
+ return [left, top];
2239
2240
  };
2240
2241
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.0", ngImport: i0, type: ContextMenuDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
2241
2242
  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 +2266,7 @@ class NavigateDirective extends Subscriptable {
2265
2266
  publicUrl = inject(APP_BASE_HREF);
2266
2267
  storeService = inject(StoreService);
2267
2268
  router = inject(Router);
2268
- elementRef = inject(ElementRef);
2269
+ elementRef = inject((ElementRef));
2269
2270
  constructor() {
2270
2271
  super();
2271
2272
  this.isLink = this.elementRef.nativeElement.tagName.toLowerCase() === "a";
@@ -2307,7 +2308,7 @@ class PopoverDirective extends Subscriptable {
2307
2308
  content;
2308
2309
  context;
2309
2310
  direction = "top";
2310
- el = inject(ElementRef);
2311
+ el = inject((ElementRef));
2311
2312
  ps = inject(PopoverService);
2312
2313
  ngOnInit() {
2313
2314
  this.addSubscription(fromEvent(this.el.nativeElement, "mousedown").pipe(filter(() => !!this.ps.getPopover())).subscribe(() => this.ps.hide()));
@@ -2344,7 +2345,7 @@ class ScrollDragDirective extends Subscriptable {
2344
2345
  mouseDownY;
2345
2346
  initialScrollY = 0;
2346
2347
  diffY = 0;
2347
- elementRef = inject(ElementRef);
2348
+ elementRef = inject((ElementRef));
2348
2349
  constructor() {
2349
2350
  super();
2350
2351
  this.addSubscription(fromEvent(this.elementRef.nativeElement, "mousedown").pipe(filter(e => e.button === 0)).subscribe(e => {