@one-paragon/angular-utilities 0.0.2 → 0.0.7

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.
Files changed (65) hide show
  1. package/esm2020/http-request-state/HttpRequestStateFactory.mjs +3 -3
  2. package/esm2020/http-request-state/HttpRequestStateStore.mjs +3 -3
  3. package/esm2020/http-request-state/directives/HttpStateDirectiveBase.mjs +3 -3
  4. package/esm2020/http-request-state/directives/http-error-state-directive.mjs +3 -3
  5. package/esm2020/http-request-state/directives/http-inProgress-state-directive.mjs +3 -3
  6. package/esm2020/http-request-state/directives/http-notStarted-state-directive.mjs +3 -3
  7. package/esm2020/http-request-state/directives/http-success-state-directive.mjs +3 -3
  8. package/esm2020/http-request-state/directives/request-state-directive.mjs +3 -3
  9. package/esm2020/http-request-state/http-state-module.mjs +4 -4
  10. package/esm2020/http-request-state/types.mjs +2 -1
  11. package/esm2020/table-builder/classes/table-store.mjs +3 -3
  12. package/esm2020/table-builder/components/array-column.component.mjs +3 -3
  13. package/esm2020/table-builder/components/column-builder/column-builder.component.mjs +3 -3
  14. package/esm2020/table-builder/components/date-filter/date-filter.component.mjs +3 -3
  15. package/esm2020/table-builder/components/filter/filter.component.mjs +3 -3
  16. package/esm2020/table-builder/components/filter/in-list/in-list-filter.component.mjs +3 -3
  17. package/esm2020/table-builder/components/gen-col-displayer/gen-col-displayer.component.mjs +3 -3
  18. package/esm2020/table-builder/components/generic-table/generic-table.component.mjs +3 -3
  19. package/esm2020/table-builder/components/generic-table/paginator.component.mjs +3 -3
  20. package/esm2020/table-builder/components/header-menu/header-menu.component.mjs +3 -3
  21. package/esm2020/table-builder/components/in-filter/in-filter.component.mjs +3 -3
  22. package/esm2020/table-builder/components/initialization-component/initialization-component.mjs +5 -5
  23. package/esm2020/table-builder/components/number-filter/number-filter.component.mjs +3 -3
  24. package/esm2020/table-builder/components/sort-menu/sort-menu.component-store.mjs +3 -3
  25. package/esm2020/table-builder/components/sort-menu/sort-menu.component.mjs +3 -3
  26. package/esm2020/table-builder/components/table-container/table-container.mjs +5 -5
  27. package/esm2020/table-builder/components/table-container-filter/filter-list/filter-list.component.mjs +3 -3
  28. package/esm2020/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.mjs +4 -4
  29. package/esm2020/table-builder/components/table-container-filter/table-wrapper-filter-store.mjs +4 -4
  30. package/esm2020/table-builder/directives/custom-cell-directive.mjs +5 -5
  31. package/esm2020/table-builder/directives/multi-sort.directive.mjs +3 -3
  32. package/esm2020/table-builder/directives/resize-column.directive.mjs +3 -3
  33. package/esm2020/table-builder/material.module.mjs +4 -4
  34. package/esm2020/table-builder/ngrx/effects.mjs +3 -3
  35. package/esm2020/table-builder/pipes/column-total.pipe.mjs +3 -3
  36. package/esm2020/table-builder/pipes/format-filter-type.pipe.mjs +3 -3
  37. package/esm2020/table-builder/pipes/format-filter-value.pipe.mjs +3 -3
  38. package/esm2020/table-builder/pipes/key-display.mjs +3 -3
  39. package/esm2020/table-builder/services/export-to-csv.service.mjs +3 -3
  40. package/esm2020/table-builder/services/table-template-service.mjs +3 -3
  41. package/esm2020/table-builder/services/transform-creator.mjs +3 -3
  42. package/esm2020/table-builder/table-builder.module.mjs +4 -4
  43. package/esm2020/utilities/directives/auto-focus.directive.mjs +3 -3
  44. package/esm2020/utilities/directives/buttonSubject.mjs +3 -3
  45. package/esm2020/utilities/directives/dialog-service.mjs +25 -0
  46. package/esm2020/utilities/directives/dialog.mjs +94 -22
  47. package/esm2020/utilities/directives/prevent-enter.directive.mjs +3 -3
  48. package/esm2020/utilities/directives/stop-propagation.directive.mjs +3 -3
  49. package/esm2020/utilities/directives/styler.mjs +3 -3
  50. package/esm2020/utilities/module.mjs +11 -6
  51. package/esm2020/utilities/pipes/function.pipe.mjs +14 -7
  52. package/esm2020/utilities/pipes/phone.pipe.mjs +3 -3
  53. package/esm2020/utilities/pipes/space-case.pipes.mjs +3 -3
  54. package/fesm2015/one-paragon-angular-utilities.mjs +291 -184
  55. package/fesm2015/one-paragon-angular-utilities.mjs.map +1 -1
  56. package/fesm2020/one-paragon-angular-utilities.mjs +287 -182
  57. package/fesm2020/one-paragon-angular-utilities.mjs.map +1 -1
  58. package/http-request-state/HttpRequestStateStore.d.ts +1 -1
  59. package/http-request-state/rxjs/getRequestorState.d.ts +1 -1
  60. package/http-request-state/types.d.ts +2 -1
  61. package/package.json +8 -3
  62. package/table-builder/components/table-container-filter/gen-filter-displayer/gen-filter-displayer.component.d.ts +1 -1
  63. package/utilities/directives/dialog-service.d.ts +10 -0
  64. package/utilities/directives/dialog.d.ts +35 -10
  65. package/utilities/pipes/function.pipe.d.ts +1 -1
@@ -17,7 +17,7 @@ export declare class HttpRequestStateStore<TParam extends any[], T> extends Comp
17
17
  private flattenedRequest;
18
18
  private singleUseRequest;
19
19
  selectHttpState$: Observable<HttpRequestState<T>>;
20
- selectStatus$: Observable<HttpRequestStatus>;
20
+ selectStatus$: Observable<HttpRequestStatus.notStarted | HttpRequestStatus.inProgress | HttpRequestStatus.success | HttpRequestStatus.fail>;
21
21
  selectError$: Observable<any>;
22
22
  selectResponse$: Observable<T>;
23
23
  errorHandled: boolean;
@@ -1,3 +1,3 @@
1
1
  import { HttpRequestState } from '../types';
2
2
  import { Observable } from 'rxjs';
3
- export declare const getRequestorStatus: <T>(source: Observable<HttpRequestState<T>>) => Observable<import("../types").HttpRequestStatus>;
3
+ export declare const getRequestorStatus: <T>(source: Observable<HttpRequestState<T>>) => Observable<import("../types").HttpRequestStatus.notStarted | import("../types").HttpRequestStatus.inProgress | import("../types").HttpRequestStatus.success | import("../types").HttpRequestStatus.fail>;
@@ -3,7 +3,8 @@ export declare enum HttpRequestStatus {
3
3
  notStarted = 0,
4
4
  inProgress = 1,
5
5
  success = 2,
6
- fail = 3
6
+ fail = 3,
7
+ cancelled = 4
7
8
  }
8
9
  export declare type HttpRequestStateNotStarted = {
9
10
  status: HttpRequestStatus.notStarted;
package/package.json CHANGED
@@ -1,9 +1,14 @@
1
1
  {
2
2
  "name": "@one-paragon/angular-utilities",
3
- "version": "0.0.2",
3
+ "version": "0.0.7",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.0.0",
6
- "@angular/core": "^13.0.0"
6
+ "@angular/core": "^13.0.0",
7
+ "@angular/material": "^13.0.0",
8
+ "@ngrx/component": "^13.0.1",
9
+ "@ngrx/component-store": "^13.0.1",
10
+ "@ngrx/effects": "^13.0.1",
11
+ "@ngrx/store": "^13.0.1"
7
12
  },
8
13
  "dependencies": {
9
14
  "tslib": "^2.1.0"
@@ -28,4 +33,4 @@
28
33
  }
29
34
  },
30
35
  "sideEffects": false
31
- }
36
+ }
@@ -5,7 +5,7 @@ import { WrapperFilterStore } from '../table-wrapper-filter-store';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class GenFilterDisplayerComponent {
7
7
  tableState: TableStore;
8
- private filterStore;
8
+ filterStore: WrapperFilterStore;
9
9
  constructor(tableState: TableStore, filterStore: WrapperFilterStore);
10
10
  filterCols$: Observable<MetaData[]>;
11
11
  addFilter(metaData: MetaData): void;
@@ -0,0 +1,10 @@
1
+ import { MatDialogRef } from '@angular/material/dialog';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DialogService {
4
+ allOpenAppDialogs: MatDialogRef<any>[];
5
+ addDialogRef(ref: MatDialogRef<any>): void;
6
+ removeDialogRef(ref: MatDialogRef<any>): void;
7
+ closeAllAppDialogs(): void;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
10
+ }
@@ -1,17 +1,42 @@
1
- import { TemplateRef, OnDestroy } from '@angular/core';
1
+ import { TemplateRef, OnDestroy, EventEmitter, ViewContainerRef } from '@angular/core';
2
2
  import { MatDialog, MatDialogRef, MatDialogConfig } from '@angular/material/dialog';
3
- import { Observable, Subscription } from 'rxjs';
3
+ import { Observable, Subscription, Subject } from 'rxjs';
4
+ import { DialogService } from './dialog-service';
4
5
  import * as i0 from "@angular/core";
5
- export declare class DialogDirective implements OnDestroy {
6
+ interface DialogViewContext<T> {
7
+ $implicit?: T;
8
+ opDialog?: T;
9
+ close: () => void;
10
+ }
11
+ export declare class DialogWrapper<T = any> {
12
+ private vcr;
13
+ viewEmbeded: boolean;
14
+ viewContext: DialogViewContext<T>;
15
+ set template(tmpl: TemplateRef<DialogViewContext<T>>);
16
+ set close(closeMethod: () => void);
17
+ set data(value: T);
18
+ constructor(vcr: ViewContainerRef);
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogWrapper<any>, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogWrapper<any>, "app-dialog-content", never, {}, {}, never, never>;
21
+ }
22
+ export declare class DialogDirective<T> implements OnDestroy {
6
23
  private templateRef;
7
24
  private dialog;
8
- dialogRef?: MatDialogRef<any, any>;
9
- subscription?: Subscription;
10
- constructor(templateRef: TemplateRef<any>, dialog: MatDialog);
11
- appDialogConfig?: MatDialogConfig;
12
- set state(open_close: Observable<boolean>);
25
+ private service;
26
+ opDialogClosed: EventEmitter<boolean>;
27
+ opDialogConfig: MatDialogConfig<T>;
28
+ set state(open_close: Observable<T>);
29
+ nativeElement?: HTMLElement;
30
+ dialogRef?: MatDialogRef<any, boolean>;
31
+ subscription: Subscription;
32
+ componentWrapper?: DialogWrapper<T>;
33
+ constructor(templateRef: TemplateRef<DialogViewContext<T>>, dialog: MatDialog, service: DialogService);
34
+ _data: Subject<Observable<T>>;
35
+ close(): void;
36
+ initDialog(): void;
13
37
  setDialogState(open: boolean): void;
14
38
  ngOnDestroy(): void;
15
- static ɵfac: i0.ɵɵFactoryDeclaration<DialogDirective, never>;
16
- static ɵdir: i0.ɵɵDirectiveDeclaration<DialogDirective, "[appDialog]", never, { "appDialogConfig": "appDialogConfig"; "state": "appDialog"; }, {}, never>;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogDirective<any>, never>;
40
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DialogDirective<any>, "[opDialog]", never, { "opDialogConfig": "opDialogConfig"; "state": "opDialog"; "nativeElement": "opDialogOrigin"; }, { "opDialogClosed": "opDialogClosed"; }, never>;
17
41
  }
42
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { PipeTransform } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class FunctionPipe implements PipeTransform {
4
- transform(value: string, func: (o: any, ...args: any[]) => any, ...args: any[]): any;
4
+ transform(func: (...args: any[]) => any | string, ...args: any[]): any;
5
5
  static ɵfac: i0.ɵɵFactoryDeclaration<FunctionPipe, never>;
6
6
  static ɵpipe: i0.ɵɵPipeDeclaration<FunctionPipe, "func">;
7
7
  }