dolfo-angular 1.209.0 → 1.211.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/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "dolfo-angular",
3
- "version": "1.209.0",
3
+ "version": "1.211.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^21.2.9",
6
6
  "@angular/core": "^21.2.9",
7
7
  "@angular/forms": "^21.2.9",
8
- "@angular/platform-browser": "^21.2.9"
8
+ "@angular/platform-browser": "^21.2.9",
9
+ "@angular/router": "^21.2.14"
9
10
  },
10
11
  "dependencies": {
11
12
  "tslib": "^2.8.1"
@@ -1,13 +1,17 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, Type, ElementRef, TemplateRef, EventEmitter, ValueProvider, OnDestroy, AfterViewInit, OnInit, OnChanges, ChangeDetectorRef, SimpleChanges, PipeTransform, AfterViewChecked, QueryList, Injector, ViewContainerRef } from '@angular/core';
2
+ import { InjectionToken, Type, ElementRef, TemplateRef, EventEmitter, ValueProvider, OnDestroy, AfterViewInit, OnInit, OnChanges, ChangeDetectorRef, SimpleChanges, PipeTransform, ViewContainerRef, Injector, AfterViewChecked, QueryList } from '@angular/core';
3
3
  import * as rxjs from 'rxjs';
4
4
  import { Observable, Subscription, BehaviorSubject } from 'rxjs';
5
5
  import * as i10 from '@angular/forms';
6
6
  import { FormControl, ValidatorFn, ValidationErrors, ControlValueAccessor, Validator, AbstractControl, FormGroup, FormGroupDirective } from '@angular/forms';
7
7
  import * as i9 from '@angular/common';
8
8
  import { DecimalPipe } from '@angular/common';
9
+ import { CanActivate, ActivatedRouteSnapshot, Router } from '@angular/router';
9
10
  import * as _angular_platform_browser from '@angular/platform-browser';
10
11
  import { DomSanitizer } from '@angular/platform-browser';
12
+ import * as _angular_common_http from '@angular/common/http';
13
+ import { HttpRequest, HttpHandlerFn } from '@angular/common/http';
14
+ import * as dolfo_angular from 'dolfo-angular';
11
15
 
12
16
  type ButtonColor = "primary" | "secondary" | "white" | "error" | "warning" | "success" | "info";
13
17
  type ButtonSize = "small" | "large";
@@ -204,6 +208,34 @@ interface OnClick {
204
208
  onClick: EventEmitter<MouseEvent>;
205
209
  }
206
210
 
211
+ declare const ROUTE_CHECK_SERVICE: InjectionToken<CheckRoute<unknown>>;
212
+ interface CheckRoute<T> {
213
+ load$: () => Observable<T>;
214
+ checkRoute: (path: string) => Promise<boolean> | Observable<boolean>;
215
+ }
216
+
217
+ declare enum StoreLists {
218
+ EMPTY = 0
219
+ }
220
+ type StorageListType = {
221
+ [StoreLists.EMPTY]: null;
222
+ };
223
+ declare enum StorageValues {
224
+ TOKEN = "token",
225
+ LANG = "lang"
226
+ }
227
+ interface IStore {
228
+ readonly pressingCtrl: boolean;
229
+ readonly lists: {
230
+ [k in StoreLists]?: StorageListType[k][];
231
+ };
232
+ readonly entities: {
233
+ [x: string]: any;
234
+ };
235
+ }
236
+ declare const MAX_DEVICE_SIZE = 750;
237
+ declare const MAX_SMALL_DEVICE = 500;
238
+
207
239
  interface ILanguage {
208
240
  readonly name: string;
209
241
  readonly locale: string;
@@ -276,6 +308,21 @@ declare class DialogService {
276
308
  static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
277
309
  }
278
310
 
311
+ declare class DialogUtilsService {
312
+ private dialogService;
313
+ private translateService;
314
+ constructor(dialogService: DialogService, translateService: TranslateService);
315
+ showLoading$: <T, T2>(obs: (res: T2) => Observable<T>) => rxjs.OperatorFunction<T2, T>;
316
+ hideLoading: () => void;
317
+ closeLatestDialog: () => void;
318
+ closeWithAction: <T>(data: T) => void;
319
+ openDialogComponent: (component: DialogComponentInput) => Observable<dolfo_angular.DialogOutput>;
320
+ openDialog: (input: IDialogInput) => Observable<dolfo_angular.DialogOutput>;
321
+ askConfirmAndLoad: <T>(input: Pick<IDialogInput, "title" | "message" | "hideCloseX" | "width">, obs: (resp: DialogActionType) => Observable<T>, getDialogResp?: boolean) => Observable<T>;
322
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogUtilsService, never>;
323
+ static ɵprov: i0.ɵɵInjectableDeclaration<DialogUtilsService>;
324
+ }
325
+
279
326
  declare class NotificationService {
280
327
  private notification$;
281
328
  private history$;
@@ -299,6 +346,30 @@ declare class PopoverService {
299
346
  static ɵprov: i0.ɵɵInjectableDeclaration<PopoverService>;
300
347
  }
301
348
 
349
+ declare class RouteCheckService implements CanActivate {
350
+ private storeService;
351
+ private routeService;
352
+ canActivate({ routeConfig }: ActivatedRouteSnapshot): false | rxjs.Observable<boolean>;
353
+ static ɵfac: i0.ɵɵFactoryDeclaration<RouteCheckService, never>;
354
+ static ɵprov: i0.ɵɵInjectableDeclaration<RouteCheckService>;
355
+ }
356
+
357
+ declare class StoreService extends Subscriptable {
358
+ private appInitialized;
359
+ constructor();
360
+ private store$;
361
+ addList: <K extends StoreLists>(key: K, list: StorageListType[K][]) => void;
362
+ getList: <K extends StoreLists>(key: K) => StorageListType[K][];
363
+ addEntity: (key: string, entity: any) => void;
364
+ getEntity: <T>(key: string) => T;
365
+ setCtrlKey: (pressingCtrl: boolean) => void;
366
+ isPressingCtrl: () => boolean;
367
+ isInitialized: () => boolean;
368
+ initialize: () => void;
369
+ static ɵfac: i0.ɵɵFactoryDeclaration<StoreService, never>;
370
+ static ɵprov: i0.ɵɵInjectableDeclaration<StoreService>;
371
+ }
372
+
302
373
  declare class TooltipService {
303
374
  private tooltip$;
304
375
  showTooltip: (input: ITooltip) => void;
@@ -445,6 +516,21 @@ declare class TranslatePipe implements PipeTransform {
445
516
  static ɵpipe: i0.ɵɵPipeDeclaration<TranslatePipe, "translate", true>;
446
517
  }
447
518
 
519
+ declare abstract class BaseAppComponent extends Subscriptable implements OnInit, AfterViewInit {
520
+ protected abstract container: ViewContainerRef;
521
+ protected abstract readonly streams: Observable<string>[];
522
+ protected injector: Injector;
523
+ protected router: Router;
524
+ protected storeService: StoreService;
525
+ private loading;
526
+ loadingMessage: i0.WritableSignal<string>;
527
+ ngOnInit(): void;
528
+ ngAfterViewInit(): void;
529
+ get percentage(): number;
530
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaseAppComponent, never>;
531
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseAppComponent, never, never, {}, {}, never, never, true, never>;
532
+ }
533
+
448
534
  declare abstract class Formable<T = object> extends Subscriptable implements OnDestroy, AfterViewInit, AfterViewChecked {
449
535
  formRef: FormGroupDirective;
450
536
  inputs: QueryList<BaseFormInput<unknown>>;
@@ -522,9 +608,21 @@ declare class PopoverDirective extends Subscriptable {
522
608
  static ɵdir: i0.ɵɵDirectiveDeclaration<PopoverDirective, "[dolfoPopover]", never, { "content": { "alias": "dolfoPopover"; "required": true; }; "context": { "alias": "dolfoPopoverContext"; "required": false; }; "direction": { "alias": "direction"; "required": false; }; }, {}, never, never, false, never>;
523
609
  }
524
610
 
611
+ declare class NavigateDirective extends Subscriptable {
612
+ private elementRef;
613
+ url: string;
614
+ private isLink;
615
+ private publicUrl;
616
+ constructor(storeService: StoreService, router: Router, elementRef: ElementRef<HTMLElement>);
617
+ ngOnChanges(changes: SimpleChanges<this>): void;
618
+ private openBlank;
619
+ static ɵfac: i0.ɵɵFactoryDeclaration<NavigateDirective, never>;
620
+ static ɵdir: i0.ɵɵDirectiveDeclaration<NavigateDirective, "[dolfoNavigate]", never, { "url": { "alias": "dolfoNavigate"; "required": true; }; }, {}, never, never, false, never>;
621
+ }
622
+
525
623
  declare class DirectivesModule {
526
624
  static ɵfac: i0.ɵɵFactoryDeclaration<DirectivesModule, never>;
527
- static ɵmod: i0.ɵɵNgModuleDeclaration<DirectivesModule, [typeof ContextMenuDirective, typeof ScrollDragDirective, typeof TooltipDirective, typeof PopoverDirective], never, [typeof ContextMenuDirective, typeof ScrollDragDirective, typeof TooltipDirective, typeof PopoverDirective]>;
625
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DirectivesModule, [typeof ContextMenuDirective, typeof ScrollDragDirective, typeof TooltipDirective, typeof PopoverDirective, typeof NavigateDirective], never, [typeof ContextMenuDirective, typeof ScrollDragDirective, typeof TooltipDirective, typeof PopoverDirective, typeof NavigateDirective]>;
528
626
  static ɵinj: i0.ɵɵInjectorDeclaration<DirectivesModule>;
529
627
  }
530
628
 
@@ -750,5 +848,9 @@ declare class GridModule {
750
848
  static ɵinj: i0.ɵɵInjectorDeclaration<GridModule>;
751
849
  }
752
850
 
753
- export { AutocompleteComponent, BaseFormInput, ButtonComponent, CONTEXT_MENU_DESTROY_TOKEN, ColumnAlign, ColumnDataType, ComboboxComponent, ContextMenuComponent, ContextMenuDirective, ContextMenuService, DatepickerComponent, DialogActionType, DialogComponent, DialogContentComponent, DialogFooterComponent, DialogHeaderComponent, DialogLayoutComponent, DialogLayoutModule, DialogService, DirectivesModule, FormComponent, FormModule, Formable, GridComponent, GridConfig, GridModule, ICON_COMPONENT, IconComponent, IconWrapperComponent, InputCheckboxComponent, InputContainerComponent, InputRadioComponent, InputTextComponent, LANGUAGE_TOKEN, LayoutModule, LoaderComponent, NotificationComponent, NotificationService, OverlayManager, POPOVER_DESTROY_TOKEN, PopoverComponent, PopoverDirective, PopoverService, ScrollDragDirective, Subscriptable, TOOLTIP_DESTROY_TOKEN, TRANSLATE_STORAGE_KEY, TooltipComponent, TooltipDirective, TooltipService, TranslatePipe, TranslateService, isDeepEqual, passwordValidator, provideDolfoLanguages };
754
- export type { AutocompleteConfig, ButtonColor, ButtonSize, ComboInput, ComboOption, ContextMenuItem, DialogComponentInput, DialogFooterButton, DialogForm, DialogIcon, DialogOutput, DialogType, GridAction, GridColumn, IContextMenu, IDialogInput, IGridConfig, ILanguage, ILanguageToken, INotificationInput, IPopover, ITooltip, IconName, InputType, NotificationAction, NotificationType, OnBlur, OnClick, OnFocus, TooltipDirection };
851
+ declare const authInterceptor: (req: HttpRequest<unknown>, next: HttpHandlerFn) => rxjs.Observable<_angular_common_http.HttpEvent<unknown>>;
852
+
853
+ declare const errorInterceptor: (req: HttpRequest<unknown>, next: HttpHandlerFn) => rxjs.Observable<_angular_common_http.HttpEvent<unknown>>;
854
+
855
+ export { AutocompleteComponent, BaseAppComponent, BaseFormInput, ButtonComponent, CONTEXT_MENU_DESTROY_TOKEN, ColumnAlign, ColumnDataType, ComboboxComponent, ContextMenuComponent, ContextMenuDirective, ContextMenuService, DatepickerComponent, DialogActionType, DialogComponent, DialogContentComponent, DialogFooterComponent, DialogHeaderComponent, DialogLayoutComponent, DialogLayoutModule, DialogService, DialogUtilsService, DirectivesModule, FormComponent, FormModule, Formable, GridComponent, GridConfig, GridModule, ICON_COMPONENT, IconComponent, IconWrapperComponent, InputCheckboxComponent, InputContainerComponent, InputRadioComponent, InputTextComponent, LANGUAGE_TOKEN, LayoutModule, LoaderComponent, MAX_DEVICE_SIZE, MAX_SMALL_DEVICE, NavigateDirective, NotificationComponent, NotificationService, OverlayManager, POPOVER_DESTROY_TOKEN, PopoverComponent, PopoverDirective, PopoverService, ROUTE_CHECK_SERVICE, RouteCheckService, ScrollDragDirective, StorageValues, StoreLists, StoreService, Subscriptable, TOOLTIP_DESTROY_TOKEN, TRANSLATE_STORAGE_KEY, TooltipComponent, TooltipDirective, TooltipService, TranslatePipe, TranslateService, authInterceptor, errorInterceptor, isDeepEqual, passwordValidator, provideDolfoLanguages };
856
+ export type { AutocompleteConfig, ButtonColor, ButtonSize, CheckRoute, ComboInput, ComboOption, ContextMenuItem, DialogComponentInput, DialogFooterButton, DialogForm, DialogIcon, DialogOutput, DialogType, GridAction, GridColumn, IContextMenu, IDialogInput, IGridConfig, ILanguage, ILanguageToken, INotificationInput, IPopover, IStore, ITooltip, IconName, InputType, NotificationAction, NotificationType, OnBlur, OnClick, OnFocus, StorageListType, TooltipDirection };