@indice/ng-components 0.2.136-beta → 0.2.136
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/_styles.css +69 -72
- package/bundles/indice-ng-components.umd.js +217 -122
- package/bundles/indice-ng-components.umd.js.map +1 -1
- package/esm2015/lib/controls/nav-links-list/nav-links-list.component.js +40 -0
- package/esm2015/lib/controls/notifications-indicator/notifications-indicator.component.js +77 -0
- package/esm2015/lib/layouts/shell/shell-header/shell-header.component.js +70 -72
- package/esm2015/lib/layouts/shell/shell-layout/shell-layout.component.js +11 -6
- package/esm2015/lib/layouts/views/form-layout/form-layout.component.js +5 -6
- package/esm2015/lib/layouts/views/model-view-layout/model-view-layout.component.js +1 -3
- package/esm2015/lib/ng-components.module.js +7 -6
- package/esm2015/lib/pages/http-status/page-not-found/page-not-found.component.js +2 -2
- package/esm2015/lib/tokens.js +2 -1
- package/esm2015/lib/types.js +10 -7
- package/esm2015/public-api.js +2 -2
- package/fesm2015/indice-ng-components.js +194 -109
- package/fesm2015/indice-ng-components.js.map +1 -1
- package/lib/controls/nav-links-list/nav-links-list.component.d.ts +15 -0
- package/lib/controls/notifications-indicator/notifications-indicator.component.d.ts +23 -0
- package/lib/layouts/shell/shell-header/shell-header.component.d.ts +21 -25
- package/lib/layouts/shell/shell-layout/shell-layout.component.d.ts +3 -2
- package/lib/layouts/views/form-layout/form-layout.component.d.ts +2 -3
- package/lib/ng-components.module.d.ts +6 -5
- package/lib/tokens.d.ts +1 -0
- package/lib/types.d.ts +18 -10
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/esm2015/lib/pipes/obs-with-status.pipe.js +0 -26
- package/lib/pipes/obs-with-status.pipe.d.ts +0 -13
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { OnInit } from '@angular/core';
|
|
3
|
+
import { NavLink } from '../../types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NavLinksListComponent implements OnInit {
|
|
6
|
+
links: Observable<NavLink[]> | undefined;
|
|
7
|
+
activeFragment: Observable<string> | undefined;
|
|
8
|
+
navLinkClass: string | string;
|
|
9
|
+
navLinkActiveClass: string | string[];
|
|
10
|
+
containerClass: string | string[];
|
|
11
|
+
constructor();
|
|
12
|
+
ngOnInit(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavLinksListComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NavLinksListComponent, "lib-nav-links-list", never, { "links": "links"; "activeFragment": "active-fragment"; "navLinkClass": "link-class"; "navLinkActiveClass": "link-active-class"; "containerClass": "container-class"; }, {}, never, never>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IAppNotifications, NavLink } from './../../types';
|
|
2
|
+
import { OnInit, OnDestroy } from '@angular/core';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class NotificationsIndicatorComponent implements OnInit, OnDestroy {
|
|
6
|
+
notifications: IAppNotifications;
|
|
7
|
+
links: any;
|
|
8
|
+
menuExpanded: boolean;
|
|
9
|
+
unreadCount: number;
|
|
10
|
+
items: any[];
|
|
11
|
+
allNotificationsLink: Observable<NavLink[]>;
|
|
12
|
+
private notificationsSub$;
|
|
13
|
+
private inboxAction;
|
|
14
|
+
newArrival: boolean;
|
|
15
|
+
constructor(notifications: IAppNotifications, links: any);
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
ngOnInit(): void;
|
|
18
|
+
toggleMenu(): void;
|
|
19
|
+
doInboxAction(): void;
|
|
20
|
+
onClickOutside($event: any): void;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationsIndicatorComponent, never>;
|
|
22
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NotificationsIndicatorComponent, "lib-notifications-indicator", never, {}, {}, never, never>;
|
|
23
|
+
}
|
|
@@ -1,45 +1,41 @@
|
|
|
1
|
+
import { AuthService } from '@indice/ng-auth';
|
|
1
2
|
import { OnInit, OnDestroy } from '@angular/core';
|
|
2
3
|
import { User } from 'oidc-client';
|
|
3
|
-
import { Router } from '@angular/router';
|
|
4
|
-
import {
|
|
5
|
-
import { Observable
|
|
6
|
-
import {
|
|
4
|
+
import { ActivatedRoute, Event, Router } from '@angular/router';
|
|
5
|
+
import { NavLink } from '../../../types';
|
|
6
|
+
import { Observable } from 'rxjs';
|
|
7
|
+
import { Subscription } from 'rxjs';
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
export declare class ShellHeaderComponent implements OnInit, OnDestroy {
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
protected authService: AuthService;
|
|
11
|
+
protected router: Router;
|
|
12
|
+
protected route: ActivatedRoute;
|
|
13
|
+
config: any;
|
|
11
14
|
links: any;
|
|
12
15
|
sectionLinksPath: string;
|
|
13
|
-
notificationLinksPath: string;
|
|
14
|
-
allNotificationsLinkPath: string;
|
|
15
|
-
config: IShellConfig;
|
|
16
|
-
border: boolean;
|
|
17
|
-
showNotifications: boolean | undefined;
|
|
18
|
-
showUserNameOnHeader: boolean | undefined;
|
|
19
|
-
notificationsMenuVisible: boolean;
|
|
20
16
|
profileMenuVisible: boolean;
|
|
17
|
+
showUserNameOnHeader: boolean | undefined;
|
|
18
|
+
showAlerts: boolean | undefined;
|
|
19
|
+
langs: string[] | undefined;
|
|
20
|
+
currentLang: string | undefined;
|
|
21
|
+
border: boolean;
|
|
21
22
|
sectionLinks: Observable<NavLink[]>;
|
|
22
|
-
notificationLinks: Observable<NotificationNavLink[]>;
|
|
23
|
-
allNotificationsLink: Observable<NavLink>;
|
|
24
23
|
mobileMenuExpanded: boolean;
|
|
25
24
|
userMenuExpanded: boolean;
|
|
26
|
-
notificationsMenuExpanded: boolean;
|
|
27
25
|
protected routeSubject: Observable<Event>;
|
|
28
26
|
protected routerSub$: Subscription | null;
|
|
29
27
|
protected userSub$: Subscription | null;
|
|
30
28
|
protected statusSub$: Subscription | null;
|
|
31
29
|
user: User | null;
|
|
32
30
|
avatarName: string | null;
|
|
33
|
-
|
|
34
|
-
constructor(authService: AuthService, router: Router, links: any);
|
|
35
|
-
ngOnDestroy(): void;
|
|
31
|
+
activeFragment: any | null;
|
|
32
|
+
constructor(authService: AuthService, router: Router, route: ActivatedRoute, config: any, links: any);
|
|
36
33
|
ngOnInit(): void;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
onClickOutsideNotifications($event: any): void;
|
|
34
|
+
ngOnDestroy(): void;
|
|
35
|
+
onClickOutside($event: any): void;
|
|
40
36
|
signin(event: any | null | undefined): void;
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
private setCurrentUser;
|
|
38
|
+
setCurrentLang(lang: any): void;
|
|
43
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<ShellHeaderComponent, never>;
|
|
44
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ShellHeaderComponent, "lib-shell-header", never, { "sectionLinksPath": "section-links"; "
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ShellHeaderComponent, "lib-shell-header", never, { "sectionLinksPath": "section-links"; "profileMenuVisible": "profile-menu"; "showUserNameOnHeader": "show-userName"; "showAlerts": "show-alerts"; "langs": "langs"; "currentLang": "current-lang"; "border": "border"; }, {}, never, never>;
|
|
45
41
|
}
|
|
@@ -6,16 +6,17 @@ import { DynamicComponentHostDirective } from '../../../directives/dynamic-compo
|
|
|
6
6
|
import { ComponentLoaderFactory } from '../../../services/component-loader/component-loader.factory';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export declare class ShellLayoutComponent implements OnInit, OnDestroy, AfterViewInit, AfterViewChecked {
|
|
9
|
+
private document;
|
|
9
10
|
private router;
|
|
10
11
|
private location;
|
|
11
12
|
private config;
|
|
12
13
|
private componentLoaderFactory;
|
|
13
14
|
dynamicComponentHosts: QueryList<DynamicComponentHostDirective> | null;
|
|
14
|
-
private routerSub$;
|
|
15
15
|
showRightPaneSM: boolean;
|
|
16
|
+
private routerSub$;
|
|
16
17
|
activeConfig: IShellConfig;
|
|
17
18
|
loaded: boolean;
|
|
18
|
-
constructor(router: Router, location: Location, config: IShellConfig | null, componentLoaderFactory: ComponentLoaderFactory);
|
|
19
|
+
constructor(document: any, router: Router, location: Location, config: IShellConfig | null, componentLoaderFactory: ComponentLoaderFactory);
|
|
19
20
|
ngAfterViewChecked(): void;
|
|
20
21
|
ngOnInit(): void;
|
|
21
22
|
ngAfterViewInit(): void;
|
|
@@ -3,7 +3,7 @@ import { Router } from '@angular/router';
|
|
|
3
3
|
import { RouterViewAction, ViewAction } from '../../../types';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class FormLayoutComponent implements OnInit {
|
|
6
|
-
private
|
|
6
|
+
private router$;
|
|
7
7
|
private searchInput$?;
|
|
8
8
|
title: string | null;
|
|
9
9
|
searchPlaceholder: string | null;
|
|
@@ -12,8 +12,7 @@ export declare class FormLayoutComponent implements OnInit {
|
|
|
12
12
|
onAction: EventEmitter<ViewAction>;
|
|
13
13
|
onSearch: EventEmitter<string>;
|
|
14
14
|
onComplete: EventEmitter<boolean>;
|
|
15
|
-
|
|
16
|
-
constructor(_router: Router);
|
|
15
|
+
constructor(router$: Router);
|
|
17
16
|
ngOnInit(): void;
|
|
18
17
|
onSidePaneDeactivated($event: any): void;
|
|
19
18
|
emitActionClick(action: ViewAction): void;
|
|
@@ -33,13 +33,14 @@ import * as i30 from "./pages/http-status/page-not-found/page-not-found.componen
|
|
|
33
33
|
import * as i31 from "./pages/http-status/unauthorized/unauthorized.component";
|
|
34
34
|
import * as i32 from "./pipes/address.pipe";
|
|
35
35
|
import * as i33 from "./pipes/duration-format.pipe";
|
|
36
|
-
import * as i34 from "./
|
|
37
|
-
import * as i35 from "
|
|
38
|
-
import * as i36 from "@angular/
|
|
39
|
-
import * as i37 from "@
|
|
36
|
+
import * as i34 from "./controls/nav-links-list/nav-links-list.component";
|
|
37
|
+
import * as i35 from "./controls/notifications-indicator/notifications-indicator.component";
|
|
38
|
+
import * as i36 from "@angular/common";
|
|
39
|
+
import * as i37 from "@angular/router";
|
|
40
|
+
import * as i38 from "@indice/ng-auth";
|
|
40
41
|
export declare class IndiceComponentsModule {
|
|
41
42
|
static forRoot(): i0.ModuleWithProviders<IndiceComponentsModule>;
|
|
42
43
|
static ɵfac: i0.ɵɵFactoryDeclaration<IndiceComponentsModule, never>;
|
|
43
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<IndiceComponentsModule, [typeof i1.ClickOutsideDirective, typeof i2.DynamicComponentHostDirective, typeof i3.DropDownMenuComponent, typeof i4.PagerComponent, typeof i5.ListViewComponent, typeof i6.ListColumnComponent, typeof i7.ListTileComponent, typeof i8.ListDetailsSectionComponent, typeof i9.ListViewEmptyStateComponent, typeof i10.SkeletonLoaderComponent, typeof i11.CollapsiblePanelComponent, typeof i12.KpiTileComponent, typeof i13.SidePaneComponent, typeof i14.DatepickerComponent, typeof i15.AvatarInitialsComponent, typeof i16.ToggleComponent, typeof i17.ToasterContainerComponent, typeof i18.ToasterComponent, typeof i19.ShellLayoutComponent, typeof i20.ShellHeaderComponent, typeof i21.ShellFooterComponent, typeof i22.ViewLayoutComponent, typeof i23.SideViewLayoutComponent, typeof i24.ModelViewLayoutComponent, typeof i25.FormLayoutComponent, typeof i26.AuthCallbackComponent, typeof i27.AuthRenewComponent, typeof i28.LoggedOutComponent, typeof i29.ErrorComponent, typeof i30.PageNotFoundComponent, typeof i31.UnauthorizedComponent, typeof i32.AddressPipe, typeof i33.DurationFormatPipe, typeof i34.
|
|
44
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<IndiceComponentsModule, [typeof i1.ClickOutsideDirective, typeof i2.DynamicComponentHostDirective, typeof i3.DropDownMenuComponent, typeof i4.PagerComponent, typeof i5.ListViewComponent, typeof i6.ListColumnComponent, typeof i7.ListTileComponent, typeof i8.ListDetailsSectionComponent, typeof i9.ListViewEmptyStateComponent, typeof i10.SkeletonLoaderComponent, typeof i11.CollapsiblePanelComponent, typeof i12.KpiTileComponent, typeof i13.SidePaneComponent, typeof i14.DatepickerComponent, typeof i15.AvatarInitialsComponent, typeof i16.ToggleComponent, typeof i17.ToasterContainerComponent, typeof i18.ToasterComponent, typeof i19.ShellLayoutComponent, typeof i20.ShellHeaderComponent, typeof i21.ShellFooterComponent, typeof i22.ViewLayoutComponent, typeof i23.SideViewLayoutComponent, typeof i24.ModelViewLayoutComponent, typeof i25.FormLayoutComponent, typeof i26.AuthCallbackComponent, typeof i27.AuthRenewComponent, typeof i28.LoggedOutComponent, typeof i29.ErrorComponent, typeof i30.PageNotFoundComponent, typeof i31.UnauthorizedComponent, typeof i32.AddressPipe, typeof i33.DurationFormatPipe, typeof i34.NavLinksListComponent, typeof i35.NotificationsIndicatorComponent], [typeof i36.CommonModule, typeof i37.RouterModule, typeof i38.IndiceAuthModule], [typeof i1.ClickOutsideDirective, typeof i3.DropDownMenuComponent, typeof i4.PagerComponent, typeof i5.ListViewComponent, typeof i6.ListColumnComponent, typeof i7.ListTileComponent, typeof i8.ListDetailsSectionComponent, typeof i9.ListViewEmptyStateComponent, typeof i12.KpiTileComponent, typeof i10.SkeletonLoaderComponent, typeof i19.ShellLayoutComponent, typeof i20.ShellHeaderComponent, typeof i21.ShellFooterComponent, typeof i22.ViewLayoutComponent, typeof i23.SideViewLayoutComponent, typeof i24.ModelViewLayoutComponent, typeof i25.FormLayoutComponent, typeof i26.AuthCallbackComponent, typeof i27.AuthRenewComponent, typeof i28.LoggedOutComponent, typeof i29.ErrorComponent, typeof i30.PageNotFoundComponent, typeof i31.UnauthorizedComponent, typeof i32.AddressPipe, typeof i33.DurationFormatPipe, typeof i11.CollapsiblePanelComponent, typeof i13.SidePaneComponent, typeof i14.DatepickerComponent, typeof i17.ToasterContainerComponent, typeof i18.ToasterComponent, typeof i15.AvatarInitialsComponent, typeof i16.ToggleComponent]>;
|
|
44
45
|
static ɵinj: i0.ɵɵInjectorDeclaration<IndiceComponentsModule>;
|
|
45
46
|
}
|
package/lib/tokens.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { IAppLinks, IShellConfig } from './types';
|
|
3
3
|
export declare const APP_LINKS: InjectionToken<IAppLinks>;
|
|
4
|
+
export declare const APP_NOTIFICATIONS: InjectionToken<IAppLinks>;
|
|
4
5
|
export declare const SHELL_CONFIG: InjectionToken<IShellConfig>;
|
package/lib/types.d.ts
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { Observable } from
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
export interface IAppNotifications {
|
|
3
|
+
messages: Observable<IResultSet<NavLink>>;
|
|
4
|
+
inboxAction?: () => void | undefined;
|
|
5
|
+
}
|
|
2
6
|
export interface IAppLinks {
|
|
3
7
|
public: Observable<NavLink[]>;
|
|
4
8
|
main: Observable<NavLink[]>;
|
|
@@ -6,27 +10,30 @@ export interface IAppLinks {
|
|
|
6
10
|
profileActions: Observable<NavLink[]>;
|
|
7
11
|
legal: Observable<NavLink[]>;
|
|
8
12
|
brand: Observable<NavLink[]>;
|
|
9
|
-
notifications?: Observable<
|
|
10
|
-
allNotifications?: Observable<NavLink>;
|
|
13
|
+
notifications?: Observable<NavLink[]>;
|
|
11
14
|
}
|
|
12
15
|
export declare class NavLink {
|
|
13
|
-
constructor(text: string, path: string, exact?: boolean, external?: boolean, icon?: string,
|
|
16
|
+
constructor(text: string, path: string, exact?: boolean, external?: boolean, icon?: string, data?: any);
|
|
14
17
|
text: string;
|
|
15
18
|
path: string;
|
|
16
19
|
exact: boolean;
|
|
17
20
|
external: boolean;
|
|
18
21
|
icon: string | undefined;
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
type: string;
|
|
23
|
+
data: any | undefined;
|
|
21
24
|
}
|
|
22
25
|
export declare class ExternalNavLink extends NavLink {
|
|
23
26
|
constructor(text: string, path: string, openInNewTab?: boolean, icon?: string);
|
|
27
|
+
type: string;
|
|
24
28
|
}
|
|
25
29
|
export declare class FragmentNavLink extends NavLink {
|
|
26
30
|
constructor(text: string, path: string, icon?: string);
|
|
31
|
+
type: string;
|
|
27
32
|
}
|
|
28
33
|
export declare class NotificationNavLink extends NavLink {
|
|
29
|
-
|
|
34
|
+
isRead: boolean;
|
|
35
|
+
creationDate?: Date | undefined;
|
|
36
|
+
constructor(text: string, path: string, isRead: boolean, creationDate?: Date | undefined);
|
|
30
37
|
}
|
|
31
38
|
export declare class ViewAction {
|
|
32
39
|
type: string;
|
|
@@ -81,18 +88,19 @@ export interface IShellConfig {
|
|
|
81
88
|
appLogoAlt: string;
|
|
82
89
|
showHeader: boolean;
|
|
83
90
|
showUserNameOnHeader?: boolean;
|
|
84
|
-
|
|
85
|
-
showFooter: boolean;
|
|
91
|
+
showAlertsOnHeader?: boolean;
|
|
86
92
|
customHeaderComponent?: any;
|
|
93
|
+
showFooter: boolean;
|
|
87
94
|
customFooterComponent?: any;
|
|
88
95
|
fluid: boolean;
|
|
96
|
+
langs?: string[];
|
|
89
97
|
}
|
|
90
98
|
export declare class DefaultShellConfig implements IShellConfig {
|
|
91
99
|
appLogo: string;
|
|
92
100
|
appLogoAlt: string;
|
|
93
101
|
showHeader: boolean;
|
|
94
102
|
showUserNameOnHeader: boolean;
|
|
95
|
-
|
|
103
|
+
showAlertsOnHeader: boolean;
|
|
96
104
|
showFooter: boolean;
|
|
97
105
|
fluid: boolean;
|
|
98
106
|
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export * from './lib/controls/toaster/toaster.component';
|
|
|
15
15
|
export * from './lib/controls/avatar-initials/avatar-initials.component';
|
|
16
16
|
export * from './lib/controls/toggle/toggle.component';
|
|
17
17
|
export * from './lib/controls/side-pane/side-pane.component';
|
|
18
|
+
export * from './lib/controls/nav-links-list/nav-links-list.component';
|
|
18
19
|
export * from './lib/layouts/shell/shell-layout/shell-layout.component';
|
|
19
20
|
export * from './lib/layouts/shell/shell-header/shell-header.component';
|
|
20
21
|
export * from './lib/layouts/shell/shell-footer/shell-footer.component';
|
|
@@ -30,7 +31,6 @@ export * from './lib/pages/http-status/page-not-found/page-not-found.component';
|
|
|
30
31
|
export * from './lib/pages/http-status/unauthorized/unauthorized.component';
|
|
31
32
|
export * from './lib/pipes/address.pipe';
|
|
32
33
|
export * from './lib/pipes/duration-format.pipe';
|
|
33
|
-
export * from './lib/pipes/obs-with-status.pipe';
|
|
34
34
|
export * from './lib/tokens';
|
|
35
35
|
export * from './lib/types';
|
|
36
36
|
export * from './lib/icons';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { Pipe } from '@angular/core';
|
|
2
|
-
import { of } from 'rxjs';
|
|
3
|
-
import { catchError, map, startWith } from 'rxjs/operators';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
const defaultError = 'Something went wrong';
|
|
6
|
-
export class ObsWithStatusPipe {
|
|
7
|
-
transform(val) {
|
|
8
|
-
return val.pipe(map((value) => {
|
|
9
|
-
return {
|
|
10
|
-
loading: value.type === 'start',
|
|
11
|
-
error: value.type === 'error' ? defaultError : '',
|
|
12
|
-
value: value.type ? value.value : value,
|
|
13
|
-
};
|
|
14
|
-
}), startWith({ loading: true }), catchError(error => of({ loading: false, error: typeof error === 'string' ? error : defaultError })));
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
ObsWithStatusPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ObsWithStatusPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
18
|
-
ObsWithStatusPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ObsWithStatusPipe, name: "obsWithStatus", pure: false });
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: ObsWithStatusPipe, decorators: [{
|
|
20
|
-
type: Pipe,
|
|
21
|
-
args: [{
|
|
22
|
-
name: 'obsWithStatus',
|
|
23
|
-
pure: false
|
|
24
|
-
}]
|
|
25
|
-
}] });
|
|
26
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib2JzLXdpdGgtc3RhdHVzLnBpcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZy1jb21wb25lbnRzL3NyYy9saWIvcGlwZXMvb2JzLXdpdGgtc3RhdHVzLnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLElBQUksRUFBaUIsTUFBTSxlQUFlLENBQUM7QUFDcEQsT0FBTyxFQUFjLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN0QyxPQUFPLEVBQUUsVUFBVSxFQUFFLEdBQUcsRUFBRSxTQUFTLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQzs7QUFRNUQsTUFBTSxZQUFZLEdBQUcsc0JBQXNCLENBQUM7QUFNNUMsTUFBTSxPQUFPLGlCQUFpQjtJQUMxQixTQUFTLENBQVUsR0FBa0I7UUFDakMsT0FBTyxHQUFHLENBQUMsSUFBSSxDQUNYLEdBQUcsQ0FBQyxDQUFDLEtBQVUsRUFBRSxFQUFFO1lBQ2YsT0FBTztnQkFDSCxPQUFPLEVBQUUsS0FBSyxDQUFDLElBQUksS0FBSyxPQUFPO2dCQUMvQixLQUFLLEVBQUUsS0FBSyxDQUFDLElBQUksS0FBSyxPQUFPLENBQUMsQ0FBQyxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUMsRUFBRTtnQkFDakQsS0FBSyxFQUFFLEtBQUssQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQyxDQUFDLEtBQUs7YUFDMUMsQ0FBQztRQUNOLENBQUMsQ0FBQyxFQUNGLFNBQVMsQ0FBQyxFQUFFLE9BQU8sRUFBRSxJQUFJLEVBQUUsQ0FBQyxFQUM1QixVQUFVLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxPQUFPLEVBQUUsS0FBSyxFQUFFLEtBQUssRUFBRSxPQUFPLEtBQUssS0FBSyxRQUFRLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsWUFBWSxFQUFFLENBQUMsQ0FBQyxDQUN2RyxDQUFDO0lBQ04sQ0FBQzs7OEdBYlEsaUJBQWlCOzRHQUFqQixpQkFBaUI7MkZBQWpCLGlCQUFpQjtrQkFKN0IsSUFBSTttQkFBQztvQkFDRixJQUFJLEVBQUUsZUFBZTtvQkFDckIsSUFBSSxFQUFFLEtBQUs7aUJBQ2QiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBQaXBlLCBQaXBlVHJhbnNmb3JtIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XHJcbmltcG9ydCB7IE9ic2VydmFibGUsIG9mIH0gZnJvbSAncnhqcyc7XHJcbmltcG9ydCB7IGNhdGNoRXJyb3IsIG1hcCwgc3RhcnRXaXRoIH0gZnJvbSAncnhqcy9vcGVyYXRvcnMnO1xyXG5cclxuZXhwb3J0IGludGVyZmFjZSBPYnNXaXRoU3RhdHVzUmVzdWx0PFQ+IHtcclxuICAgIGxvYWRpbmc/OiBib29sZWFuO1xyXG4gICAgdmFsdWU/OiBUO1xyXG4gICAgZXJyb3I/OiBzdHJpbmc7XHJcbn1cclxuXHJcbmNvbnN0IGRlZmF1bHRFcnJvciA9ICdTb21ldGhpbmcgd2VudCB3cm9uZyc7XHJcblxyXG5AUGlwZSh7XHJcbiAgICBuYW1lOiAnb2JzV2l0aFN0YXR1cycsXHJcbiAgICBwdXJlOiBmYWxzZVxyXG59KVxyXG5leHBvcnQgY2xhc3MgT2JzV2l0aFN0YXR1c1BpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcclxuICAgIHRyYW5zZm9ybTxUID0gYW55Pih2YWw6IE9ic2VydmFibGU8VD4pOiBPYnNlcnZhYmxlPE9ic1dpdGhTdGF0dXNSZXN1bHQ8VD4+IHtcclxuICAgICAgICByZXR1cm4gdmFsLnBpcGUoXHJcbiAgICAgICAgICAgIG1hcCgodmFsdWU6IGFueSkgPT4ge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgICAgICAgICBsb2FkaW5nOiB2YWx1ZS50eXBlID09PSAnc3RhcnQnLFxyXG4gICAgICAgICAgICAgICAgICAgIGVycm9yOiB2YWx1ZS50eXBlID09PSAnZXJyb3InID8gZGVmYXVsdEVycm9yIDogJycsXHJcbiAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHZhbHVlLnR5cGUgPyB2YWx1ZS52YWx1ZSA6IHZhbHVlLFxyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfSksXHJcbiAgICAgICAgICAgIHN0YXJ0V2l0aCh7IGxvYWRpbmc6IHRydWUgfSksXHJcbiAgICAgICAgICAgIGNhdGNoRXJyb3IoZXJyb3IgPT4gb2YoeyBsb2FkaW5nOiBmYWxzZSwgZXJyb3I6IHR5cGVvZiBlcnJvciA9PT0gJ3N0cmluZycgPyBlcnJvciA6IGRlZmF1bHRFcnJvciB9KSlcclxuICAgICAgICApO1xyXG4gICAgfVxyXG59Il19
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { PipeTransform } from '@angular/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export interface ObsWithStatusResult<T> {
|
|
5
|
-
loading?: boolean;
|
|
6
|
-
value?: T;
|
|
7
|
-
error?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare class ObsWithStatusPipe implements PipeTransform {
|
|
10
|
-
transform<T = any>(val: Observable<T>): Observable<ObsWithStatusResult<T>>;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ObsWithStatusPipe, never>;
|
|
12
|
-
static ɵpipe: i0.ɵɵPipeDeclaration<ObsWithStatusPipe, "obsWithStatus">;
|
|
13
|
-
}
|