@cccteam/ccc-lib 0.0.13 → 0.0.14
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/fesm2022/cccteam-ccc-lib-src-auth-authentication-guard.mjs +7 -15
- package/fesm2022/cccteam-ccc-lib-src-auth-authentication-guard.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-auth-authorization-guard.mjs +10 -9
- package/fesm2022/cccteam-ccc-lib-src-auth-authorization-guard.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-auth-forms.mjs +9 -10
- package/fesm2022/cccteam-ccc-lib-src-auth-forms.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-auth-has-permission.mjs +11 -18
- package/fesm2022/cccteam-ccc-lib-src-auth-has-permission.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-auth-service.mjs +45 -13
- package/fesm2022/cccteam-ccc-lib-src-auth-service.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-ui-alert.mjs +4 -4
- package/fesm2022/cccteam-ccc-lib-src-ui-alert.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-ui-core-service.mjs +41 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-core-service.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-interceptor.mjs +13 -11
- package/fesm2022/cccteam-ccc-lib-src-ui-interceptor.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-ui-notification-service.mjs +11 -5
- package/fesm2022/cccteam-ccc-lib-src-ui-notification-service.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib-src-ui-sidenav.mjs +10 -20
- package/fesm2022/cccteam-ccc-lib-src-ui-sidenav.mjs.map +1 -1
- package/fesm2022/cccteam-ccc-lib.mjs +3 -4
- package/fesm2022/cccteam-ccc-lib.mjs.map +1 -1
- package/index.d.ts +12 -5
- package/package.json +11 -15
- package/src/auth-authentication-guard/index.d.ts +6 -5
- package/src/auth-authorization-guard/index.d.ts +6 -5
- package/src/auth-forms/index.d.ts +43 -3
- package/src/auth-has-permission/index.d.ts +15 -5
- package/src/auth-service/index.d.ts +36 -5
- package/src/types/index.d.ts +131 -3
- package/src/ui-alert/index.d.ts +16 -5
- package/src/ui-core-service/index.d.ts +20 -0
- package/src/ui-interceptor/index.d.ts +16 -5
- package/src/ui-notification-service/index.d.ts +33 -5
- package/src/ui-sidenav/index.d.ts +33 -5
- package/src/util-request-options/index.d.ts +12 -5
- package/cccteam-ccc-lib-0.0.13.tgz +0 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-state.mjs +0 -109
- package/fesm2022/cccteam-ccc-lib-src-auth-state.mjs.map +0 -1
- package/fesm2022/cccteam-ccc-lib-src-ui-core-state.mjs +0 -100
- package/fesm2022/cccteam-ccc-lib-src-ui-core-state.mjs.map +0 -1
- package/public-api.d.ts +0 -13
- package/src/auth-authentication-guard/authentication.guard.d.ts +0 -3
- package/src/auth-authentication-guard/public-api.d.ts +0 -1
- package/src/auth-authorization-guard/authorization.guard.d.ts +0 -3
- package/src/auth-authorization-guard/public-api.d.ts +0 -1
- package/src/auth-forms/ccc-field/ccc-field.component.d.ts +0 -25
- package/src/auth-forms/form-helpers.d.ts +0 -16
- package/src/auth-forms/public-api.d.ts +0 -2
- package/src/auth-has-permission/has-permission.directive.d.ts +0 -12
- package/src/auth-has-permission/public-api.d.ts +0 -1
- package/src/auth-service/auth.service.d.ts +0 -24
- package/src/auth-service/public-api.d.ts +0 -1
- package/src/auth-state/auth.state.d.ts +0 -27
- package/src/auth-state/index.d.ts +0 -5
- package/src/auth-state/public-api.d.ts +0 -1
- package/src/types/auth.actions.d.ts +0 -41
- package/src/types/core.actions.d.ts +0 -31
- package/src/types/notification-message.d.ts +0 -18
- package/src/types/permissions.d.ts +0 -17
- package/src/types/public-api.d.ts +0 -6
- package/src/types/session-info.d.ts +0 -9
- package/src/types/tokens.d.ts +0 -13
- package/src/ui-alert/alert.component.d.ts +0 -13
- package/src/ui-alert/public-api.d.ts +0 -1
- package/src/ui-core-state/core.state.d.ts +0 -28
- package/src/ui-core-state/index.d.ts +0 -5
- package/src/ui-core-state/public-api.d.ts +0 -1
- package/src/ui-interceptor/api.interceptor.d.ts +0 -12
- package/src/ui-interceptor/public-api.d.ts +0 -1
- package/src/ui-notification-service/notification.service.d.ts +0 -30
- package/src/ui-notification-service/public-api.d.ts +0 -1
- package/src/ui-sidenav/public-api.d.ts +0 -1
- package/src/ui-sidenav/sidenav.component.d.ts +0 -31
- package/src/util-request-options/public-api.d.ts +0 -1
- package/src/util-request-options/request-options.d.ts +0 -8
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
type Brand<K, T> = K & {
|
|
2
|
-
__brand: T;
|
|
3
|
-
};
|
|
4
|
-
export type Permission = Brand<string, 'Permission'>;
|
|
5
|
-
export type Resource = Brand<string, 'Resource'>;
|
|
6
|
-
export type Domain = Brand<string, 'Domain'>;
|
|
7
|
-
export type FieldName = Brand<string, 'FieldName'>;
|
|
8
|
-
export type Method = Brand<string, 'Method'>;
|
|
9
|
-
export type DomainPermissions = Record<Domain, Record<Resource, Record<Permission, Permissions>>>;
|
|
10
|
-
export interface PermissionScope {
|
|
11
|
-
resource: Resource;
|
|
12
|
-
permission: Permission;
|
|
13
|
-
domain: Domain;
|
|
14
|
-
}
|
|
15
|
-
export declare const ReadPermission: Permission;
|
|
16
|
-
export declare const UpdatePermission: Permission;
|
|
17
|
-
export {};
|
package/src/types/tokens.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { Domain, Permission, Resource } from './permissions';
|
|
3
|
-
export declare const BASE_URL: InjectionToken<string>;
|
|
4
|
-
export declare const API_URL: InjectionToken<string>;
|
|
5
|
-
export declare const PERMISSION_REQUIRED: InjectionToken<(resource: Resource, permission: Permission) => boolean>;
|
|
6
|
-
export declare const AVAILABLE_PERMISSIONS: InjectionToken<{
|
|
7
|
-
Create: Permission;
|
|
8
|
-
Delete: Permission;
|
|
9
|
-
List: Permission;
|
|
10
|
-
Read: Permission;
|
|
11
|
-
Update: Permission;
|
|
12
|
-
}>;
|
|
13
|
-
export declare const AVAILABLE_DOMAINS: InjectionToken<Record<string, Domain>[]>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { NotificationMessage } from '@cccteam/ccc-lib/src/types';
|
|
3
|
-
import { NotificationService } from '@cccteam/ccc-lib/src/ui-notification-service';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class AlertComponent implements OnInit {
|
|
6
|
-
error: NotificationMessage;
|
|
7
|
-
dismiss: EventEmitter<any>;
|
|
8
|
-
errors: NotificationService;
|
|
9
|
-
ngOnInit(): void;
|
|
10
|
-
dismissAlert(): void;
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
|
|
12
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "ccc-alert", never, { "error": { "alias": "error"; "required": true; }; }, { "dismiss": "dismiss"; }, never, never, true, never>;
|
|
13
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './alert.component';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { AppAction, CreateNotificationMessage } from '@cccteam/ccc-lib/src/types';
|
|
2
|
-
import { StateContext } from '@ngxs/store';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
interface CoreStateModel {
|
|
5
|
-
loading: string[];
|
|
6
|
-
sidenavOpened: boolean;
|
|
7
|
-
currentSidenavIdentifier: string;
|
|
8
|
-
}
|
|
9
|
-
export declare class CoreState {
|
|
10
|
-
private notifications;
|
|
11
|
-
static sidenavOpened(state: CoreStateModel): boolean;
|
|
12
|
-
static isLoading(state: CoreStateModel): boolean;
|
|
13
|
-
static currentSidenavIdentifier(state: CoreStateModel): string;
|
|
14
|
-
setNavIdentifier(ctx: StateContext<CoreStateModel>, action: AppAction.SetNavIdentifier): void;
|
|
15
|
-
publishError(ctx: StateContext<CoreStateModel>, action: {
|
|
16
|
-
message: CreateNotificationMessage;
|
|
17
|
-
}): void;
|
|
18
|
-
beginActivity(ctx: StateContext<CoreStateModel>, action: {
|
|
19
|
-
process: string;
|
|
20
|
-
}): CoreStateModel;
|
|
21
|
-
endActivity(ctx: StateContext<CoreStateModel>, action: {
|
|
22
|
-
process: string;
|
|
23
|
-
}): CoreStateModel | null;
|
|
24
|
-
toggleSidenav(ctx: StateContext<CoreStateModel>): void;
|
|
25
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<CoreState, never>;
|
|
26
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<CoreState>;
|
|
27
|
-
}
|
|
28
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './core.state';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ApiInterceptor implements HttpInterceptor {
|
|
5
|
-
private store;
|
|
6
|
-
private router;
|
|
7
|
-
private ngZone;
|
|
8
|
-
private baseUrl;
|
|
9
|
-
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>>;
|
|
10
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ApiInterceptor, never>;
|
|
11
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ApiInterceptor>;
|
|
12
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './api.interceptor';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { CreateNotificationMessage, NotificationMessage } from '@cccteam/ccc-lib/src/types';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class NotificationService {
|
|
4
|
-
private notificationId;
|
|
5
|
-
private _notifications;
|
|
6
|
-
notifications: import("@angular/core").Signal<NotificationMessage[]>;
|
|
7
|
-
/**
|
|
8
|
-
* Adds a new global notification.
|
|
9
|
-
* @param notification The notification message to add.
|
|
10
|
-
* @returns The unique ID assigned to the notification.
|
|
11
|
-
*/
|
|
12
|
-
addGlobalNotification(notification: CreateNotificationMessage): number;
|
|
13
|
-
/**
|
|
14
|
-
* Dismisses a global notification by its ID.
|
|
15
|
-
* @param notificationId The ID of the notification to dismiss.
|
|
16
|
-
*/
|
|
17
|
-
dismissGlobalNotificationById(notificationId: number): void;
|
|
18
|
-
/**
|
|
19
|
-
* Dismisses a specific global notification.
|
|
20
|
-
* @param notification The notification to dismiss.
|
|
21
|
-
*/
|
|
22
|
-
dismissGlobalNotification(notification: NotificationMessage): void;
|
|
23
|
-
/**
|
|
24
|
-
* Updates an existing notification.
|
|
25
|
-
* @param updatedNotification The notification with updated information.
|
|
26
|
-
*/
|
|
27
|
-
updateNotification(updatedNotification: NotificationMessage): void;
|
|
28
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
|
|
29
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
|
|
30
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './notification.service';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './sidenav.component';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import { PermissionScope } from '@cccteam/ccc-lib/src/types';
|
|
3
|
-
import { Observable } from 'rxjs';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
export interface NavItem {
|
|
6
|
-
type: 'link' | 'header' | 'expandable';
|
|
7
|
-
routerLink?: string[];
|
|
8
|
-
label: string;
|
|
9
|
-
icon?: string;
|
|
10
|
-
permission?: PermissionScope;
|
|
11
|
-
children?: NavItem[];
|
|
12
|
-
isExpanded?: boolean;
|
|
13
|
-
attentionCount?: Observable<number>;
|
|
14
|
-
}
|
|
15
|
-
export type NavGroups = Record<string, NavItem[]>;
|
|
16
|
-
export declare class SidenavComponent implements OnInit {
|
|
17
|
-
private store;
|
|
18
|
-
private destroyRef;
|
|
19
|
-
navGroups?: NavGroups;
|
|
20
|
-
currentNav: NavItem[];
|
|
21
|
-
ngOnInit(): void;
|
|
22
|
-
/**
|
|
23
|
-
* Updates the currentNav based on the identifier
|
|
24
|
-
* @param identifier
|
|
25
|
-
* @returns NavItem[]
|
|
26
|
-
* @memberof SidenavComponent
|
|
27
|
-
*/
|
|
28
|
-
updateNavItems(identifier: string): NavItem[];
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SidenavComponent, never>;
|
|
30
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SidenavComponent, "ccc-sidenav", never, { "navGroups": { "alias": "navGroups"; "required": false; }; }, {}, never, never, true, never>;
|
|
31
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './request-options';
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { HttpContext, HttpContextToken } from '@angular/common/http';
|
|
2
|
-
export interface CustomHttpRequestOptions {
|
|
3
|
-
suppressGlobalError: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const CUSTOM_HTTP_REQUEST_OPTIONS: HttpContextToken<CustomHttpRequestOptions>;
|
|
6
|
-
export declare function errorOptions(suppressGlobalError: boolean | undefined): {
|
|
7
|
-
context: HttpContext;
|
|
8
|
-
};
|