@dereekb/dbx-core 8.12.8 → 8.12.11

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.
@@ -62,6 +62,7 @@ export declare class DbxActionContextStoreSourceInstance<T = unknown, O = unknow
62
62
  disable(key?: DbxActionDisabledKey, disable?: boolean): void;
63
63
  setIsModified(isModified?: boolean | Observable<boolean> | Observable<void>): void;
64
64
  trigger(): void;
65
+ triggerWithValue(value: T | Observable<T>): void;
65
66
  readyValue(value: T | Observable<T>): void;
66
67
  startWorking(): void;
67
68
  reject(error: Maybe<ReadableError | Observable<ReadableError>>): void;
@@ -1,8 +1,9 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "./auth.role.has.directive";
3
3
  import * as i2 from "./auth.role.any.directive";
4
+ import * as i3 from "./auth.role.not.directive";
4
5
  export declare class DbxCoreAuthModule {
5
6
  static ɵfac: i0.ɵɵFactoryDeclaration<DbxCoreAuthModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<DbxCoreAuthModule, [typeof i1.DbxAuthHasRolesDirective, typeof i2.DbxAuthHasAnyRoleDirective], never, [typeof i1.DbxAuthHasRolesDirective, typeof i2.DbxAuthHasAnyRoleDirective]>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DbxCoreAuthModule, [typeof i1.DbxAuthHasRolesDirective, typeof i2.DbxAuthHasAnyRoleDirective, typeof i3.DbxAuthNotAnyRolesDirective], never, [typeof i1.DbxAuthHasRolesDirective, typeof i2.DbxAuthHasAnyRoleDirective, typeof i3.DbxAuthNotAnyRolesDirective]>;
7
8
  static ɵinj: i0.ɵɵInjectorDeclaration<DbxCoreAuthModule>;
8
9
  }
@@ -0,0 +1,19 @@
1
+ import { Maybe, AuthRole, ArrayOrValue } from '@dereekb/util';
2
+ import { TemplateRef, ViewContainerRef, OnDestroy } from '@angular/core';
3
+ import { DbxAuthService } from './service';
4
+ import { AbstractIfDirective } from '../view/if.directive';
5
+ import * as i0 from "@angular/core";
6
+ /**
7
+ * Structural decorator directive similar to ngIf that embeds content if the current auth user has none of the target role(s).
8
+ */
9
+ export declare class DbxAuthNotAnyRolesDirective extends AbstractIfDirective implements OnDestroy {
10
+ private dbxAuthService;
11
+ private _targetRoles;
12
+ readonly targetRoles$: import("rxjs").Observable<Maybe<ArrayOrValue<string>>>;
13
+ readonly show$: import("rxjs").Observable<boolean>;
14
+ constructor(templateRef: TemplateRef<unknown>, viewContainer: ViewContainerRef, dbxAuthService: DbxAuthService);
15
+ ngOnDestroy(): void;
16
+ set targetRoles(roles: Maybe<ArrayOrValue<AuthRole>>);
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<DbxAuthNotAnyRolesDirective, never>;
18
+ static ɵdir: i0.ɵɵDirectiveDeclaration<DbxAuthNotAnyRolesDirective, "[dbxAuthNotAnyRoles]", never, { "targetRoles": "dbxAuthNotRoles"; }, {}, never>;
19
+ }
@@ -5,5 +5,6 @@ export * from './auth.user';
5
5
  export * from './auth.module';
6
6
  export * from './auth.role.any.directive';
7
7
  export * from './auth.role.has.directive';
8
+ export * from './auth.role.not.directive';
8
9
  export * from './auth.state.module';
9
10
  export * from './auth.state.service';
@@ -16,3 +16,4 @@ export declare function loggedInObsFromIsLoggedIn(isLoggedInObs: Observable<bool
16
16
  export declare function loggedOutObsFromIsLoggedIn(isLoggedInObs: Observable<boolean>): Observable<void>;
17
17
  export declare function authRolesSetContainsAllRolesFrom(roles: Observable<Maybe<Iterable<AuthRole>>>): OperatorFunction<AuthRoleSet, boolean>;
18
18
  export declare function authRolesSetContainsAnyRoleFrom(roles: Observable<Maybe<Iterable<AuthRole>>>): OperatorFunction<AuthRoleSet, boolean>;
19
+ export declare function authRolesSetContainsNoRolesFrom(roles: Observable<Maybe<Iterable<AuthRole>>>): OperatorFunction<AuthRoleSet, boolean>;
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@dereekb/dbx-core",
3
- "version": "8.12.8",
3
+ "version": "8.12.11",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.0.0",
6
6
  "@angular/core": "^13.0.0",
7
- "@dereekb/util": "8.12.8",
8
- "@dereekb/rxjs": "8.12.8",
7
+ "@dereekb/util": "8.12.11",
8
+ "@dereekb/rxjs": "8.12.11",
9
9
  "@ngrx/component-store": "^13.0.2",
10
10
  "@angular/platform-browser": "^13.0.0",
11
11
  "@ngrx/effects": "^13.0.2",
12
12
  "@ngrx/store": "^13.0.2",
13
13
  "@uirouter/core": "^6.0.8",
14
14
  "date-fns": "^2.28.0",
15
- "@dereekb/date": "8.12.8",
15
+ "@dereekb/date": "8.12.11",
16
16
  "@angular/router": "^13.0.0"
17
17
  },
18
18
  "dependencies": {