@cccteam/ccc-lib 0.0.10 → 0.0.12
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 +44 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-authentication-guard.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-authorization-guard.mjs +24 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-authorization-guard.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-forms.mjs +118 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-forms.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-has-permission.mjs +51 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-has-permission.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-service.mjs +56 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-service.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-state.mjs +109 -0
- package/fesm2022/cccteam-ccc-lib-src-auth-state.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-types.mjs +137 -0
- package/fesm2022/cccteam-ccc-lib-src-types.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-alert.mjs +48 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-alert.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-core-state.mjs +100 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-core-state.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-interceptor.mjs +48 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-interceptor.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-notification-service.mjs +57 -0
- package/fesm2022/cccteam-ccc-lib-src-ui-notification-service.mjs.map +1 -0
- package/{esm2022/lib/ui/components/sidenav/sidenav.component.mjs → fesm2022/cccteam-ccc-lib-src-ui-sidenav.mjs} +20 -13
- package/fesm2022/cccteam-ccc-lib-src-ui-sidenav.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib-src-util-request-options.mjs +19 -0
- package/fesm2022/cccteam-ccc-lib-src-util-request-options.mjs.map +1 -0
- package/fesm2022/cccteam-ccc-lib.mjs +13 -729
- package/fesm2022/cccteam-ccc-lib.mjs.map +1 -1
- package/package.json +55 -5
- package/public-api.d.ts +13 -19
- package/src/auth-authentication-guard/index.d.ts +5 -0
- package/src/auth-authentication-guard/public-api.d.ts +1 -0
- package/src/auth-authorization-guard/index.d.ts +5 -0
- package/src/auth-authorization-guard/public-api.d.ts +1 -0
- package/{lib/auth/forms → src/auth-forms}/ccc-field/ccc-field.component.d.ts +1 -1
- package/src/auth-forms/index.d.ts +5 -0
- package/src/auth-forms/public-api.d.ts +2 -0
- package/{lib/auth/directives → src/auth-has-permission}/has-permission.directive.d.ts +1 -1
- package/src/auth-has-permission/index.d.ts +5 -0
- package/src/auth-has-permission/public-api.d.ts +1 -0
- package/{lib/auth/services → src/auth-service}/auth.service.d.ts +1 -1
- package/src/auth-service/index.d.ts +5 -0
- package/src/auth-service/public-api.d.ts +1 -0
- package/{lib/auth/state → src/auth-state}/auth.state.d.ts +1 -2
- package/src/auth-state/index.d.ts +5 -0
- package/src/auth-state/public-api.d.ts +1 -0
- package/{lib/auth/state → src/types}/auth.actions.d.ts +1 -1
- package/{lib/ui/state → src/types}/core.actions.d.ts +1 -1
- package/src/types/index.d.ts +5 -0
- package/src/types/public-api.d.ts +6 -0
- package/{lib/types/base → src/types}/tokens.d.ts +1 -1
- package/{lib/ui/components/alert → src/ui-alert}/alert.component.d.ts +2 -2
- package/src/ui-alert/index.d.ts +5 -0
- package/src/ui-alert/public-api.d.ts +1 -0
- package/{lib/ui/state → src/ui-core-state}/core.state.d.ts +1 -2
- package/src/ui-core-state/index.d.ts +5 -0
- package/src/ui-core-state/public-api.d.ts +1 -0
- package/src/ui-interceptor/index.d.ts +5 -0
- package/src/ui-interceptor/public-api.d.ts +1 -0
- package/src/ui-notification-service/index.d.ts +5 -0
- package/{lib/ui/services → src/ui-notification-service}/notification.service.d.ts +1 -1
- package/src/ui-notification-service/public-api.d.ts +1 -0
- package/src/ui-sidenav/index.d.ts +5 -0
- package/src/ui-sidenav/public-api.d.ts +1 -0
- package/{lib/ui/components/sidenav → src/ui-sidenav}/sidenav.component.d.ts +1 -1
- package/src/util-request-options/index.d.ts +5 -0
- package/src/util-request-options/public-api.d.ts +1 -0
- package/cccteam-ccc-lib-0.0.10.tgz +0 -0
- package/esm2022/cccteam-ccc-lib.mjs +0 -5
- package/esm2022/lib/auth/directives/has-permission.directive.mjs +0 -44
- package/esm2022/lib/auth/forms/ccc-field/ccc-field.component.mjs +0 -77
- package/esm2022/lib/auth/forms/form-helpers.mjs +0 -34
- package/esm2022/lib/auth/guards/authentication.guard.mjs +0 -38
- package/esm2022/lib/auth/guards/authorization.guard.mjs +0 -17
- package/esm2022/lib/auth/services/auth.service.mjs +0 -49
- package/esm2022/lib/auth/services/request-options.mjs +0 -12
- package/esm2022/lib/auth/state/auth.actions.mjs +0 -64
- package/esm2022/lib/auth/state/auth.state.mjs +0 -105
- package/esm2022/lib/types/base/tokens.mjs +0 -7
- package/esm2022/lib/types/notification-message.mjs +0 -7
- package/esm2022/lib/types/permissions.mjs +0 -3
- package/esm2022/lib/types/session-info.mjs +0 -2
- package/esm2022/lib/ui/components/alert/alert.component.mjs +0 -41
- package/esm2022/lib/ui/interceptor/api.interceptor.mjs +0 -43
- package/esm2022/lib/ui/services/notification.service.mjs +0 -50
- package/esm2022/lib/ui/state/core.actions.mjs +0 -49
- package/esm2022/lib/ui/state/core.state.mjs +0 -95
- package/esm2022/public-api.mjs +0 -34
- /package/{lib/auth/guards → src/auth-authentication-guard}/authentication.guard.d.ts +0 -0
- /package/{lib/auth/guards → src/auth-authorization-guard}/authorization.guard.d.ts +0 -0
- /package/{lib/auth/forms → src/auth-forms}/form-helpers.d.ts +0 -0
- /package/{lib → src}/types/notification-message.d.ts +0 -0
- /package/{lib → src}/types/permissions.d.ts +0 -0
- /package/{lib → src}/types/session-info.d.ts +0 -0
- /package/{lib/ui/interceptor → src/ui-interceptor}/api.interceptor.d.ts +0 -0
- /package/{lib/auth/services → src/util-request-options}/request-options.d.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cccteam-ccc-lib.mjs","sources":["../../../projects/ccc-lib/src/lib/types/base/tokens.ts","../../../projects/ccc-lib/src/lib/ui/state/core.actions.ts","../../../projects/ccc-lib/src/lib/auth/services/request-options.ts","../../../projects/ccc-lib/src/lib/auth/services/auth.service.ts","../../../projects/ccc-lib/src/lib/auth/state/auth.actions.ts","../../../projects/ccc-lib/src/lib/auth/state/auth.state.ts","../../../projects/ccc-lib/src/lib/auth/directives/has-permission.directive.ts","../../../projects/ccc-lib/src/lib/types/permissions.ts","../../../projects/ccc-lib/src/lib/auth/forms/ccc-field/ccc-field.component.ts","../../../projects/ccc-lib/src/lib/auth/forms/form-helpers.ts","../../../projects/ccc-lib/src/lib/auth/guards/authentication.guard.ts","../../../projects/ccc-lib/src/lib/auth/guards/authorization.guard.ts","../../../projects/ccc-lib/src/lib/types/notification-message.ts","../../../projects/ccc-lib/src/lib/ui/services/notification.service.ts","../../../projects/ccc-lib/src/lib/ui/components/alert/alert.component.ts","../../../projects/ccc-lib/src/lib/ui/components/alert/alert.component.html","../../../projects/ccc-lib/src/lib/ui/state/core.state.ts","../../../projects/ccc-lib/src/lib/ui/components/sidenav/sidenav.component.ts","../../../projects/ccc-lib/src/lib/ui/components/sidenav/sidenav.component.html","../../../projects/ccc-lib/src/lib/ui/interceptor/api.interceptor.ts","../../../projects/ccc-lib/src/public-api.ts","../../../projects/ccc-lib/src/cccteam-ccc-lib.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { Domain, Permission, Resource } from '../permissions';\n\nexport const BASE_URL = new InjectionToken<string>('BASE_URL');\nexport const API_URL = new InjectionToken<string>('API_URL');\nexport const PERMISSION_REQUIRED = new InjectionToken<(resource: Resource, permission: Permission) => boolean>(\n 'PERMISSION_REQUIRED',\n);\n\nexport const AVAILABLE_PERMISSIONS = new InjectionToken<{\n Create: Permission;\n Delete: Permission;\n List: Permission;\n Read: Permission;\n Update: Permission;\n}>('AVAILABLE_PERMISSIONS');\nexport const AVAILABLE_DOMAINS = new InjectionToken<Record<string, Domain>[]>('AVAILABLE_DOMAINS');\n","/* eslint-disable @typescript-eslint/no-namespace */\n// no-namespace rule is disabled because action hygiene prevents import pollution\n\nimport { CreateNotificationMessage } from '../../types/notification-message';\n\nexport namespace ApiInterceptorAction {\n export class BeginActivity {\n static readonly type = '[ApiInterceptor] Add Loading Activity';\n constructor(public process: string) {}\n }\n export class EndActivity {\n static readonly type = '[ApiInterceptor] Remove Loading Activity';\n constructor(public process: string) {}\n }\n export class PublishError {\n static readonly type = '[ApiInterceptor] Publish Error';\n constructor(public message: CreateNotificationMessage) {}\n }\n export class SetRedirectUrl {\n static readonly type = '[ApiInterceptor] Set Redirect Url';\n constructor(public redirectUrl: string) {}\n }\n}\n\nexport namespace HeaderAction {\n export class ToggleSidenav {\n static readonly type = '[Header] Toggle Sidenav';\n }\n\n export class Logout {\n static readonly type = '[Header] User Logout';\n }\n}\n","import { HttpContext, HttpContextToken } from '@angular/common/http';\n\nexport interface CustomHttpRequestOptions {\n suppressGlobalError: boolean;\n}\n\nexport const CUSTOM_HTTP_REQUEST_OPTIONS = new HttpContextToken<CustomHttpRequestOptions>(() => ({\n suppressGlobalError: false,\n}));\n\nexport function errorOptions(suppressGlobalError: boolean | undefined): { context: HttpContext } {\n return {\n context: new HttpContext().set(CUSTOM_HTTP_REQUEST_OPTIONS, {\n suppressGlobalError: suppressGlobalError ?? false,\n }),\n };\n}\n","import { HttpClient } from '@angular/common/http';\nimport { Inject, Injectable } from '@angular/core';\nimport { map, Observable } from 'rxjs';\nimport { API_URL } from '../../types/base/tokens';\nimport { SessionInfo } from '../../types/session-info';\nimport { errorOptions } from './request-options';\n\nconst routes = {\n login: (rootUrl: string): string => `${rootUrl}/user/login`,\n session: (rootUrl: string): string => `${rootUrl}/user/session`,\n};\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService {\n constructor(\n private http: HttpClient,\n @Inject(API_URL) private apiUrl: string,\n ) {}\n\n /**\n * Logs a user out.\n *\n * @returns Observable with a boolean indicating whether they were logged out.\n */\n logout(): Observable<boolean> {\n return this.http.delete(routes.session(this.apiUrl), errorOptions(false)).pipe(map(() => true));\n }\n\n /**\n * Checks a user's session with the server.\n *\n * @returns Observable with the user session info\n */\n checkUserSession(): Observable<SessionInfo | null> {\n return this.http.get<SessionInfo>(routes.session(this.apiUrl), errorOptions(false));\n }\n\n loginRoute(): string {\n return routes.login(this.apiUrl);\n }\n}\n","/* eslint-disable @typescript-eslint/no-namespace */\n// no-namespace rule is disabled because action hygiene prevents import pollution\n\nimport { CreateNotificationMessage } from '../../types/notification-message';\n\nexport namespace AuthenticationGuardAction {\n export class SetRedirectUrl {\n static readonly type = '[AuthenticationGuard] Set Redirect Url And Navigate To Login Page';\n constructor(public redirectUrl: string) {}\n }\n\n export class CheckUserSession {\n static readonly type = '[AuthenticationGuard] Check User Session';\n }\n}\n\nexport namespace LoginAction {\n export class Logout {\n static readonly type = '[Login] Auto Logout';\n }\n\n export class SetRedirectUrl {\n static readonly type = '[Login] Set Redirect Url';\n constructor(public redirectUrl: string) {}\n }\n\n export class PublishError {\n static readonly type = '[Login] Publish Error';\n constructor(public message: CreateNotificationMessage) {}\n }\n}\n\nexport namespace AppAction {\n export class CheckUserSession {\n static readonly type = '[App] Check User Session';\n }\n\n export class SetRedirectUrl {\n static readonly type = '[App] Set Redirect Url';\n constructor(public redirectUrl: string) {}\n }\n\n export class SetNavIdentifier {\n static readonly type = '[App] Set Nav Identifier';\n constructor(public identifier: string) {}\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { Action, Selector, State, StateContext } from '@ngxs/store';\nimport { patch } from '@ngxs/store/operators';\nimport { cloneDeep } from 'lodash-es';\nimport { Observable, tap } from 'rxjs';\nimport { PERMISSION_REQUIRED } from '../../types/base/tokens';\nimport { Permission, PermissionScope, Resource } from '../../types/permissions';\nimport { SessionInfo } from '../../types/session-info';\nimport { ApiInterceptorAction } from '../../ui/state/core.actions';\nimport { AuthService } from '../services/auth.service';\nimport { AppAction, AuthenticationGuardAction, LoginAction } from './auth.actions';\n\nexport interface AuthStateModel {\n authenticated: boolean;\n redirectUrl: string;\n sessionInfo: SessionInfo | null;\n}\n\nexport const initState: AuthStateModel = {\n authenticated: false,\n redirectUrl: '',\n sessionInfo: null,\n};\n\n@State<AuthStateModel>({\n name: 'authState',\n defaults: initState,\n})\n@Injectable()\nexport class AuthState {\n private authService = inject(AuthService);\n private static permissionFn: (resource: Resource, permission: Permission) => boolean;\n\n constructor() {\n AuthState.initializePermissionFn();\n }\n\n private static initializePermissionFn(): void {\n if (!AuthState.permissionFn) {\n AuthState.permissionFn = inject(PERMISSION_REQUIRED);\n }\n }\n\n @Selector()\n static hasPermission(state: AuthStateModel): (scope?: PermissionScope) => boolean {\n return (scope?: PermissionScope) => {\n if (!scope) return true;\n const resourcePermissions = state?.sessionInfo?.permissions?.[scope.domain]?.[scope.resource];\n return Array.isArray(resourcePermissions) && resourcePermissions.includes(scope.permission);\n };\n }\n\n static requiresPermission(resource: Resource, permission: Permission): boolean {\n if (!AuthState.permissionFn) {\n throw new Error(\n `AuthState has not been initialized. Ensure AuthState is provided in your module or instantiated at least once.`,\n );\n }\n return AuthState.permissionFn(resource, permission);\n }\n\n @Selector()\n static isAuthenticated(state: AuthStateModel): boolean {\n return state?.authenticated;\n }\n\n @Selector()\n static redirectUrl(state: AuthStateModel): string {\n return state?.redirectUrl;\n }\n\n @Action([AppAction.CheckUserSession, AuthenticationGuardAction.CheckUserSession])\n checkUserSession(ctx: StateContext<AuthStateModel>): Observable<SessionInfo | null> {\n return this.authService.checkUserSession().pipe(\n tap((result) =>\n ctx.setState(\n patch({\n authenticated: !!result?.authenticated,\n sessionInfo: result,\n }),\n ),\n ),\n );\n }\n\n @Action([LoginAction.Logout])\n logout(ctx: StateContext<AuthStateModel>): Observable<boolean> {\n const localStateCopy = cloneDeep(initState);\n localStateCopy.redirectUrl = ctx.getState().redirectUrl;\n return this.authService.logout().pipe(\n tap(() => {\n ctx.setState(localStateCopy);\n }),\n );\n }\n\n @Action([\n AppAction.SetRedirectUrl,\n LoginAction.SetRedirectUrl,\n AuthenticationGuardAction.SetRedirectUrl,\n ApiInterceptorAction.SetRedirectUrl,\n ])\n setRedirectUrl(ctx: StateContext<AuthStateModel>, action: { redirectUrl: string }): AuthStateModel {\n ctx.setState(\n patch({\n redirectUrl: action.redirectUrl,\n }),\n );\n return ctx.getState();\n }\n}\n","import { Directive, Input, TemplateRef, ViewContainerRef, inject } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { Store } from '@ngxs/store';\nimport { Subject, catchError, combineLatest, map, of } from 'rxjs';\nimport { PermissionScope } from '../../types/permissions';\nimport { AuthState } from '../state/auth.state';\n\n@Directive({\n selector: '[cccHasPermission]',\n standalone: true,\n})\nexport class HasPermissionDirective {\n private templateRef = inject(TemplateRef<unknown>);\n private viewContainer = inject(ViewContainerRef);\n private store = inject(Store);\n\n private scope = new Subject<PermissionScope>();\n\n @Input()\n set cccHasPermission(scope: PermissionScope) {\n this.scope.next(scope);\n }\n\n constructor() {\n combineLatest({\n permissionFn: this.store.select(AuthState.hasPermission),\n scope: this.scope.asObservable(),\n })\n .pipe(\n takeUntilDestroyed(),\n map(({ permissionFn, scope }) => (scope !== undefined ? permissionFn(scope) : true)),\n catchError(() => of(false)),\n )\n .subscribe((result) => {\n if (result) {\n if (!this.viewContainer.get(0)) {\n this.viewContainer.createEmbeddedView(this.templateRef);\n }\n } else {\n this.viewContainer.clear();\n }\n });\n }\n}\n","type Brand<K, T> = K & { __brand: T };\n\nexport type Permission = Brand<string, 'Permission'>;\nexport type Resource = Brand<string, 'Resource'>;\nexport type Domain = Brand<string, 'Domain'>;\nexport type DomainPermissions = Record<Domain, Record<Resource, Record<Permission, Permissions>>>;\n\nexport interface PermissionScope {\n resource: Resource;\n permission: Permission;\n domain: Domain;\n}\n\nexport const ReadPermission = 'Read' as Permission;\nexport const UpdatePermission = 'Update' as Permission;\n","import { Component, computed, inject, input, OnInit, signal, Signal } from '@angular/core';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { Store } from '@ngxs/store';\nimport { Domain, ReadPermission, Resource, UpdatePermission } from '../../../types/permissions';\nimport { AuthState } from '../../state/auth.state';\n\nexport enum InputMode {\n Read = 'read',\n Edit = 'edit',\n}\n\n@Component({\n selector: 'ccc-input-field',\n standalone: true,\n imports: [MatFormFieldModule, MatInputModule],\n template: `\n <mat-form-field [class]=\"className()\">\n <mat-label>{{ name() }}</mat-label>\n <input matInput [disabled]=\"mode() === inputMode.Edit && canEdit()\" [value]=\"value()\" />\n </mat-form-field>\n `,\n styleUrl: './ccc-field.component.scss',\n})\nexport class CccInputFieldComponent implements OnInit {\n store = inject(Store);\n className = input();\n mode = input.required<InputMode>();\n resource = input.required<Resource>();\n domain = input.required<Domain>();\n value = input.required();\n name = input.required<string>();\n\n inputMode = InputMode;\n\n canEdit: Signal<boolean> = signal(false);\n canEditSelector = false;\n\n canRead: Signal<boolean> = signal(false);\n canReadSelector = false;\n\n ngOnInit(): void {\n this.canEditSelector = this.store.selectSnapshot(AuthState.hasPermission)({\n resource: this.resource(),\n permission: ReadPermission,\n domain: this.domain(),\n });\n this.canReadSelector = this.store.selectSnapshot(AuthState.hasPermission)({\n resource: this.resource(),\n permission: UpdatePermission,\n domain: this.domain(),\n });\n\n this.canRead = computed(() => {\n const res = this.resource();\n if (!res) {\n return false;\n }\n if (AuthState.requiresPermission(this.resource(), ReadPermission)) {\n return this.canReadSelector;\n }\n return false;\n });\n\n this.canEdit = computed(() => {\n const res = this.resource();\n if (!res) {\n return false;\n }\n if (AuthState.requiresPermission(this.resource(), UpdatePermission)) {\n return this.canEditSelector;\n }\n return false;\n });\n }\n}\n","import { FormArray, FormGroup } from '@angular/forms';\nimport { isEqual } from 'lodash-es';\n\n/**\n * Accepts a FormGroup and compares it to an object to return the dirty form values\n * as a sparse object\n * @param form - FormGroup\n * @param compareData - object to compare form values against\n * @returns Partial<T>\n * @example sparseFormData<UserCreate>(this.userForm, initUser)\n */\nexport function sparseFormData<T>(form: FormGroup, compareData: T): T {\n const sparseFormData: T = {} as T;\n\n for (const [key, control] of Object.entries(form.controls)) {\n const controlValue = control.value;\n const compareValue = compareData[key as keyof T];\n\n if (!isEqual(controlValue, compareValue)) {\n sparseFormData[key as keyof T] = controlValue as T[keyof T];\n }\n }\n\n return sparseFormData;\n}\n\n/**\n * Accepts a FormArray and removes empty strings\n * @param formArray - FormArray\n * @returns FormArray\n */\nexport function cleanStringFormArray(formArray: FormArray): FormArray {\n for (let i = formArray.controls.length - 1; i >= 0; i--) {\n if (formArray.at(i).value === '') {\n formArray.removeAt(i);\n }\n }\n return formArray;\n}\n","import { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { Store } from '@ngxs/store';\nimport { Observable, of } from 'rxjs';\nimport { catchError, map, switchMap } from 'rxjs/operators';\nimport { BASE_URL } from '../../types/base/tokens';\nimport { AuthService } from '../services/auth.service';\nimport { AuthenticationGuardAction } from '../state/auth.actions';\nimport { AuthState } from '../state/auth.state';\n\nexport const AuthenticationGuard = (\n route: ActivatedRouteSnapshot,\n routerState: RouterStateSnapshot,\n): Observable<boolean> => {\n const store = inject(Store);\n const authService = inject(AuthService);\n\n const baseUrl = inject(BASE_URL);\n\n const authenticate = (): void => {\n const url = routerState.url;\n const absoluteUrl = baseUrl + (!url.toString().startsWith('/') ? '/' + url : url);\n const encodedUrl = encodeURIComponent(absoluteUrl);\n window.location.href = `${authService.loginRoute()}?returnUrl=${encodedUrl}`;\n };\n\n return store.select(AuthState.isAuthenticated).pipe(\n switchMap((authenticated) => {\n if (authenticated) {\n return of(authenticated);\n }\n // Handle uninitialized state (ie Browser reload)\n return store.dispatch(AuthenticationGuardAction.CheckUserSession).pipe(\n switchMap(() => {\n return store.select(AuthState.isAuthenticated);\n }),\n );\n }),\n map((authenticated) => {\n if (authenticated) {\n return true;\n }\n\n authenticate();\n\n return false;\n }),\n catchError(() => {\n authenticate();\n\n return of(false);\n }),\n );\n};\n","import { inject } from '@angular/core';\nimport { ActivatedRouteSnapshot, Router } from '@angular/router';\nimport { Store } from '@ngxs/store';\nimport { map, Observable } from 'rxjs';\nimport { AuthState } from '../state/auth.state';\n\nexport const AuthorizationGuard = (route: ActivatedRouteSnapshot): Observable<boolean> => {\n const store = inject(Store);\n const router = inject(Router);\n return store.select(AuthState.hasPermission).pipe(\n map((permissionFn) => permissionFn(route.data['scope'])),\n map((hasPermission) => {\n if (hasPermission) {\n return true;\n }\n router.navigate(['/']);\n return false;\n }),\n );\n};\n","export enum AlertLevel {\n ERROR = 'warn',\n INFO = 'accent',\n SUCCESS = 'success',\n}\n\nexport interface CreateNotificationMessage {\n duration?: number;\n message: string;\n link: string;\n level: AlertLevel;\n}\n\nexport interface NotificationMessage {\n id: number;\n duration?: number;\n message: string;\n link: string;\n level: AlertLevel;\n}\n","import { Injectable, signal } from '@angular/core';\nimport { CreateNotificationMessage, NotificationMessage } from '../../types/notification-message';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NotificationService {\n private notificationId = 0;\n private _notifications = signal<NotificationMessage[]>([]);\n notifications = this._notifications.asReadonly();\n\n /**\n * Adds a new global notification.\n * @param notification The notification message to add.\n * @returns The unique ID assigned to the notification.\n */\n addGlobalNotification(notification: CreateNotificationMessage): number {\n const newNotification: NotificationMessage = {\n ...notification,\n id: this.notificationId++,\n };\n this._notifications.update((current) => [...current, newNotification]);\n return newNotification.id;\n }\n\n /**\n * Dismisses a global notification by its ID.\n * @param notificationId The ID of the notification to dismiss.\n */\n dismissGlobalNotificationById(notificationId: number): void {\n this._notifications.update((current) => current.filter((notification) => notification.id !== notificationId));\n }\n\n /**\n * Dismisses a specific global notification.\n * @param notification The notification to dismiss.\n */\n dismissGlobalNotification(notification: NotificationMessage): void {\n this.dismissGlobalNotificationById(notification.id);\n }\n\n /**\n * Updates an existing notification.\n * @param updatedNotification The notification with updated information.\n */\n updateNotification(updatedNotification: NotificationMessage): void {\n this._notifications.update((current) =>\n current.map((notification) =>\n notification.id === updatedNotification.id ? { ...notification, ...updatedNotification } : notification,\n ),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, EventEmitter, Input, OnInit, Output, inject } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { RouterModule } from '@angular/router';\nimport { NotificationMessage } from '../../../types/notification-message';\nimport { NotificationService } from '../../services/notification.service';\n\n@Component({\n selector: 'ccc-alert',\n templateUrl: './alert.component.html',\n styleUrls: ['./alert.component.scss'],\n standalone: true,\n imports: [MatIconModule, MatButtonModule, CommonModule, RouterModule],\n})\nexport class AlertComponent implements OnInit {\n @Input({ required: true }) error!: NotificationMessage;\n @Output() dismiss = new EventEmitter();\n\n errors = inject(NotificationService);\n ngOnInit(): void {\n if (this.error.duration === undefined) {\n this.error.duration = 30000;\n }\n\n setTimeout(() => {\n this.dismissAlert();\n }, this.error.duration);\n }\n\n dismissAlert(): void {\n if (this.error.id !== undefined) {\n this.errors.dismissGlobalNotification(this.error);\n }\n }\n}\n","<div class=\"alert\" [ngClass]=\"error.level\">\n <div class=\"message\">\n <span>{{ error.message }}</span>\n </div>\n <div class=\"alert-end\">\n @if (error.link) {\n <span [routerLink]=\"error.link\" class=\"link\">View</span>\n }\n <button (click)=\"dismissAlert()\" mat-icon-button aria-label=\"Close Alert\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n</div>\n","import { Injectable, inject } from '@angular/core';\nimport { Action, Selector, State, StateContext } from '@ngxs/store';\nimport { patch } from '@ngxs/store/operators';\nimport { AppAction, LoginAction } from '../../auth/state/auth.actions';\nimport { CreateNotificationMessage } from '../../types/notification-message';\nimport { NotificationService } from '../services/notification.service';\nimport { ApiInterceptorAction, HeaderAction } from './core.actions';\n\ninterface CoreStateModel {\n loading: string[];\n sidenavOpened: boolean;\n currentSidenavIdentifier: string;\n}\n\nconst initState: CoreStateModel = {\n loading: [],\n sidenavOpened: true,\n currentSidenavIdentifier: '',\n};\n\n@State<CoreStateModel>({\n name: 'coreState',\n defaults: initState,\n})\n@Injectable()\nexport class CoreState {\n private notifications = inject(NotificationService);\n\n @Selector()\n static sidenavOpened(state: CoreStateModel): boolean {\n return state?.sidenavOpened;\n }\n\n @Selector()\n static isLoading(state: CoreStateModel): boolean {\n return state.loading.length > 0;\n }\n\n @Selector()\n static currentSidenavIdentifier(state: CoreStateModel): string {\n return state.currentSidenavIdentifier;\n }\n\n @Action([AppAction.SetNavIdentifier])\n setNavIdentifier(ctx: StateContext<CoreStateModel>, action: AppAction.SetNavIdentifier): void {\n ctx.setState(\n patch({\n currentSidenavIdentifier: action.identifier,\n }),\n );\n }\n\n @Action([ApiInterceptorAction.PublishError, LoginAction.PublishError])\n publishError(ctx: StateContext<CoreStateModel>, action: { message: CreateNotificationMessage }): void {\n this.notifications.addGlobalNotification(action.message);\n }\n\n @Action([ApiInterceptorAction.BeginActivity])\n beginActivity(ctx: StateContext<CoreStateModel>, action: { process: string }): CoreStateModel {\n const state = ctx.getState();\n ctx.patchState({\n loading: [action.process, ...state.loading],\n });\n return ctx.getState();\n }\n\n @Action([ApiInterceptorAction.EndActivity])\n endActivity(ctx: StateContext<CoreStateModel>, action: { process: string }): CoreStateModel | null {\n const loading = ctx.getState().loading;\n // There can be multiple activities running with the same process signature\n const index = loading.findIndex((activity) => activity === action.process);\n if (index !== -1) {\n const newLoading = [...loading.slice(0, index), ...loading.slice(index + 1)];\n ctx.patchState({\n loading: newLoading,\n });\n return ctx.getState();\n }\n return null;\n }\n\n @Action([HeaderAction.ToggleSidenav])\n toggleSidenav(ctx: StateContext<CoreStateModel>): void {\n ctx.setState(\n patch({\n sidenavOpened: !ctx.getState().sidenavOpened,\n }),\n );\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, DestroyRef, inject, Input, OnInit } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatExpansionModule } from '@angular/material/expansion';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatSidenavModule } from '@angular/material/sidenav';\nimport { RouterModule } from '@angular/router';\nimport { Store } from '@ngxs/store';\n\nimport { Observable, tap } from 'rxjs';\nimport { HasPermissionDirective } from '../../../auth/directives/has-permission.directive';\nimport { PermissionScope } from '../../../types/permissions';\nimport { CoreState } from '../../state/core.state';\n\nexport interface NavItem {\n type: 'link' | 'header' | 'expandable';\n routerLink?: string[];\n label: string;\n icon?: string;\n permission?: PermissionScope;\n children?: NavItem[];\n isExpanded?: boolean;\n attentionCount?: Observable<number>;\n}\n\nexport type NavGroups = Record<string, NavItem[]>;\n\n@Component({\n selector: 'ccc-sidenav',\n templateUrl: './sidenav.component.html',\n styleUrls: ['./sidenav.component.scss'],\n standalone: true,\n imports: [\n MatIconModule,\n RouterModule,\n CommonModule,\n MatExpansionModule,\n MatButtonModule,\n MatSidenavModule,\n HasPermissionDirective,\n ],\n})\nexport class SidenavComponent implements OnInit {\n private store = inject(Store);\n private destroyRef = inject(DestroyRef);\n\n @Input() navGroups?: NavGroups;\n currentNav: NavItem[] = [];\n\n ngOnInit(): void {\n this.store\n .select(CoreState.currentSidenavIdentifier)\n .pipe(\n tap((identifier) => {\n this.currentNav = this.updateNavItems(identifier);\n }),\n takeUntilDestroyed(this.destroyRef),\n )\n .subscribe();\n }\n\n /**\n * Updates the currentNav based on the identifier\n * @param identifier\n * @returns NavItem[]\n * @memberof SidenavComponent\n */\n updateNavItems(identifier: string): NavItem[] {\n if (!this.navGroups) {\n return [];\n }\n if (!this.navGroups[identifier]) {\n // pick the first one if the identifier is not found so we don't break the UI\n identifier = Object.keys(this.navGroups)[0];\n }\n return this.navGroups[identifier];\n }\n}\n","<div class=\"nav-container\">\n <nav>\n @for (navItem of currentNav; track navItem.label) {\n <ng-container *ngTemplateOutlet=\"typeRendererTemplate; context: { navItem: navItem }\"></ng-container>\n }\n </nav>\n</div>\n<ng-template #typeRendererTemplate let-navItem=\"navItem\">\n @switch (navItem.type) {\n @case ('header') {\n <ng-container [ngTemplateOutlet]=\"headerTemplate\" [ngTemplateOutletContext]=\"{ navItem: navItem }\"></ng-container>\n }\n @case ('link') {\n <ng-container [ngTemplateOutlet]=\"linkTemplate\" [ngTemplateOutletContext]=\"{ navItem: navItem }\"></ng-container>\n }\n @case ('expandable') {\n <ng-container\n [ngTemplateOutlet]=\"expandableTemplate\"\n [ngTemplateOutletContext]=\"{ navItem: navItem }\"></ng-container>\n }\n }\n</ng-template>\n<ng-template #headerTemplate let-navItem=\"navItem\">\n <div class=\"link-header\">{{ navItem.label }}</div>\n</ng-template>\n<ng-template #linkTemplate let-navItem=\"navItem\">\n <a [routerLink]=\"navItem.routerLink\" *cccHasPermission=\"navItem.permission\">\n <div class=\"nav-item\" routerLinkActive=\"active-link\">\n <div class=\"link-button\">\n <div class=\"icon\">\n <mat-icon class=\"material-icons-outlined\" [inline]=\"true\">\n {{ navItem.icon }}\n </mat-icon>\n </div>\n <div class=\"text\">\n {{ navItem.label | titlecase }}\n </div>\n </div>\n </div>\n </a>\n</ng-template>\n<ng-template #expandableTemplate let-navItem=\"navItem\">\n <div class=\"nav-item\" aria-hidden=\"true\" (click)=\"navItem.isExpanded = !navItem.isExpanded\">\n <div class=\"link-button\">\n <div class=\"icon\">\n <mat-icon class=\"material-icons-outlined\" [inline]=\"true\">\n {{ navItem.isExpanded ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </div>\n <div class=\"text\">{{ navItem.label }}</div>\n </div>\n </div>\n @if (navItem.isExpanded) {\n <div class=\"expandable-links\">\n @for (navItemChild of navItem.children; track navItemChild) {\n <ng-container *ngTemplateOutlet=\"typeRendererTemplate; context: { navItem: navItemChild }\"> </ng-container>\n }\n </div>\n }\n</ng-template>\n","import { HttpErrorResponse, HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';\nimport { inject, Injectable, NgZone } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { Store } from '@ngxs/store';\nimport { catchError, finalize, Observable, throwError } from 'rxjs';\nimport { CUSTOM_HTTP_REQUEST_OPTIONS } from '../../auth/services/request-options';\nimport { BASE_URL } from '../../types/base/tokens';\nimport { AlertLevel } from '../../types/notification-message';\nimport { ApiInterceptorAction } from '../state/core.actions';\n\n@Injectable()\nexport class ApiInterceptor implements HttpInterceptor {\n private store = inject(Store);\n private router = inject(Router);\n private ngZone = inject(NgZone);\n private baseUrl = inject(BASE_URL);\n\n intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {\n this.store.dispatch(new ApiInterceptorAction.BeginActivity(request.method + ' ' + request.url));\n\n return next.handle(request).pipe(\n catchError((error: HttpErrorResponse): Observable<HttpEvent<unknown>> => {\n if (error.status === 401) {\n this.ngZone.run(() => {\n this.store.dispatch(new ApiInterceptorAction.SetRedirectUrl(this.baseUrl + this.router.url));\n this.router.navigate(['/login']);\n });\n }\n if (!request.context.get(CUSTOM_HTTP_REQUEST_OPTIONS).suppressGlobalError) {\n const message = error.error?.message ?? error.message ?? error.error;\n this.store.dispatch(\n new ApiInterceptorAction.PublishError({\n message: message,\n level: AlertLevel.ERROR,\n link: '',\n }),\n );\n }\n\n return throwError(() => error);\n }),\n finalize(() => {\n this.store.dispatch(new ApiInterceptorAction.EndActivity(request.method + ' ' + request.url));\n }),\n );\n }\n}\n","/*\n * Public API Surface of ccc-lib\n */\n\n// Auth directives\nexport * from './lib/auth/directives/has-permission.directive';\n\n// Auth forms\nexport * from './lib/auth/forms/ccc-field/ccc-field.component';\nexport * from './lib/auth/forms/form-helpers';\n\n// Auth guards\nexport * from './lib/auth/guards/authentication.guard';\nexport * from './lib/auth/guards/authorization.guard';\n\n// Auth services\nexport * from './lib/auth/services/auth.service';\nexport * from './lib/auth/services/request-options';\n\n// Auth state\nexport * from './lib/auth/state/auth.actions';\nexport * from './lib/auth/state/auth.state';\n\n// Types tokens\nexport * from './lib/types/base/tokens';\n\n// Types\nexport * from './lib/types/notification-message';\nexport * from './lib/types/permissions';\nexport * from './lib/types/session-info';\n\n// Ui components\nexport * from './lib/ui/components/alert/alert.component';\nexport * from './lib/ui/components/sidenav/sidenav.component';\n\n// Ui interceptor\nexport * from './lib/ui/interceptor/api.interceptor';\n\n// Ui services\nexport * from './lib/ui/services/notification.service';\n\n// Ui state\nexport * from './lib/ui/state/core.actions';\nexport * from './lib/ui/state/core.state';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["initState","map","catchError","i2","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MAGa,QAAQ,GAAG,IAAI,cAAc,CAAS,UAAU,EAAE;MAClD,OAAO,GAAG,IAAI,cAAc,CAAS,SAAS,EAAE;MAChD,mBAAmB,GAAG,IAAI,cAAc,CACnD,qBAAqB,EACrB;MAEW,qBAAqB,GAAG,IAAI,cAAc,CAMpD,uBAAuB,EAAE;MACf,iBAAiB,GAAG,IAAI,cAAc,CAA2B,mBAAmB;;AChBjG;AACA;AAIM,IAAW,qBAiBhB;AAjBD,CAAA,UAAiB,oBAAoB,EAAA;AACnC,IAAA,MAAa,aAAa,CAAA;AAEL,QAAA,OAAA,CAAA;AADnB,QAAA,OAAgB,IAAI,GAAG,uCAAuC,CAAC;AAC/D,QAAA,WAAA,CAAmB,OAAe,EAAA;YAAf,IAAO,CAAA,OAAA,GAAP,OAAO,CAAQ;SAAI;;AAF3B,IAAA,oBAAA,CAAA,aAAa,gBAGzB,CAAA;AACD,IAAA,MAAa,WAAW,CAAA;AAEH,QAAA,OAAA,CAAA;AADnB,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AED,YAAA,OAAO,UAAU,CAAC,MAAM,KAAK,CAAC,CAAC;AACjC,SAAC,CAAC,EACF,QAAQ,CAAC,MAAK;YACZ,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,oBAAoB,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC;SAC/F,CAAC,CACH,CAAC;KACH;uGAlCU,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;2GAAd,cAAc,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;;;ACVX;;AAEG;AAEH;;ACJA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"cccteam-ccc-lib.mjs","sources":["../../../projects/ccc-lib/src/public-api.ts","../../../projects/ccc-lib/src/cccteam-ccc-lib.ts"],"sourcesContent":["/*\n * Public API Surface of ccc-lib\n */\n\n// Auth directives\nexport * from '@cccteam/ccc-lib/src/auth-has-permission';\n\n// Auth forms\nexport * from '@cccteam/ccc-lib/src/auth-forms';\n\n// Auth guards\nexport * from '@cccteam/ccc-lib/src/auth-authentication-guard';\nexport * from '@cccteam/ccc-lib/src/auth-authorization-guard';\n\n// Auth services\nexport * from '@cccteam/ccc-lib/src/auth-service';\n\n// Util\nexport * from '@cccteam/ccc-lib/src/util-request-options';\n\n// Auth state\nexport * from '@cccteam/ccc-lib/src/auth-state';\n\n// Types\nexport * from '@cccteam/ccc-lib/src/types';\n\n// Ui components\nexport * from '@cccteam/ccc-lib/src/ui-alert';\nexport * from '@cccteam/ccc-lib/src/ui-sidenav';\n\n// Ui interceptor\nexport * from '@cccteam/ccc-lib/src/ui-interceptor';\n\n// Ui services\nexport * from '@cccteam/ccc-lib/src/ui-notification-service';\n\n// Ui state\nexport * from '@cccteam/ccc-lib/src/ui-core-state';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;AAEG;AAEH;;ACJA;;AAEG"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cccteam/ccc-lib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git://github.com/cccteam/ccc-lib.git"
|
|
7
7
|
},
|
|
8
8
|
"peerDependencies": {
|
|
9
|
-
"@angular/common": "^
|
|
10
|
-
"@angular/core": "^
|
|
9
|
+
"@angular/common": "^19.0.2",
|
|
10
|
+
"@angular/core": "^19.0.2"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"tslib": "^2.3.0"
|
|
@@ -21,9 +21,59 @@
|
|
|
21
21
|
},
|
|
22
22
|
".": {
|
|
23
23
|
"types": "./index.d.ts",
|
|
24
|
-
"esm2022": "./esm2022/cccteam-ccc-lib.mjs",
|
|
25
|
-
"esm": "./esm2022/cccteam-ccc-lib.mjs",
|
|
26
24
|
"default": "./fesm2022/cccteam-ccc-lib.mjs"
|
|
25
|
+
},
|
|
26
|
+
"./src/auth-authentication-guard": {
|
|
27
|
+
"types": "./src/auth-authentication-guard/index.d.ts",
|
|
28
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-auth-authentication-guard.mjs"
|
|
29
|
+
},
|
|
30
|
+
"./src/auth-forms": {
|
|
31
|
+
"types": "./src/auth-forms/index.d.ts",
|
|
32
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-auth-forms.mjs"
|
|
33
|
+
},
|
|
34
|
+
"./src/auth-has-permission": {
|
|
35
|
+
"types": "./src/auth-has-permission/index.d.ts",
|
|
36
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-auth-has-permission.mjs"
|
|
37
|
+
},
|
|
38
|
+
"./src/auth-authorization-guard": {
|
|
39
|
+
"types": "./src/auth-authorization-guard/index.d.ts",
|
|
40
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-auth-authorization-guard.mjs"
|
|
41
|
+
},
|
|
42
|
+
"./src/auth-service": {
|
|
43
|
+
"types": "./src/auth-service/index.d.ts",
|
|
44
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-auth-service.mjs"
|
|
45
|
+
},
|
|
46
|
+
"./src/auth-state": {
|
|
47
|
+
"types": "./src/auth-state/index.d.ts",
|
|
48
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-auth-state.mjs"
|
|
49
|
+
},
|
|
50
|
+
"./src/types": {
|
|
51
|
+
"types": "./src/types/index.d.ts",
|
|
52
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-types.mjs"
|
|
53
|
+
},
|
|
54
|
+
"./src/ui-alert": {
|
|
55
|
+
"types": "./src/ui-alert/index.d.ts",
|
|
56
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-ui-alert.mjs"
|
|
57
|
+
},
|
|
58
|
+
"./src/ui-core-state": {
|
|
59
|
+
"types": "./src/ui-core-state/index.d.ts",
|
|
60
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-ui-core-state.mjs"
|
|
61
|
+
},
|
|
62
|
+
"./src/ui-interceptor": {
|
|
63
|
+
"types": "./src/ui-interceptor/index.d.ts",
|
|
64
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-ui-interceptor.mjs"
|
|
65
|
+
},
|
|
66
|
+
"./src/ui-notification-service": {
|
|
67
|
+
"types": "./src/ui-notification-service/index.d.ts",
|
|
68
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-ui-notification-service.mjs"
|
|
69
|
+
},
|
|
70
|
+
"./src/ui-sidenav": {
|
|
71
|
+
"types": "./src/ui-sidenav/index.d.ts",
|
|
72
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-ui-sidenav.mjs"
|
|
73
|
+
},
|
|
74
|
+
"./src/util-request-options": {
|
|
75
|
+
"types": "./src/util-request-options/index.d.ts",
|
|
76
|
+
"default": "./fesm2022/cccteam-ccc-lib-src-util-request-options.mjs"
|
|
27
77
|
}
|
|
28
78
|
}
|
|
29
79
|
}
|
package/public-api.d.ts
CHANGED
|
@@ -1,19 +1,13 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
5
|
-
export * from '
|
|
6
|
-
export * from '
|
|
7
|
-
export * from '
|
|
8
|
-
export * from '
|
|
9
|
-
export * from '
|
|
10
|
-
export * from '
|
|
11
|
-
export * from '
|
|
12
|
-
export * from '
|
|
13
|
-
export * from '
|
|
14
|
-
export * from './lib/ui/components/alert/alert.component';
|
|
15
|
-
export * from './lib/ui/components/sidenav/sidenav.component';
|
|
16
|
-
export * from './lib/ui/interceptor/api.interceptor';
|
|
17
|
-
export * from './lib/ui/services/notification.service';
|
|
18
|
-
export * from './lib/ui/state/core.actions';
|
|
19
|
-
export * from './lib/ui/state/core.state';
|
|
1
|
+
export * from '@cccteam/ccc-lib/src/auth-has-permission';
|
|
2
|
+
export * from '@cccteam/ccc-lib/src/auth-forms';
|
|
3
|
+
export * from '@cccteam/ccc-lib/src/auth-authentication-guard';
|
|
4
|
+
export * from '@cccteam/ccc-lib/src/auth-authorization-guard';
|
|
5
|
+
export * from '@cccteam/ccc-lib/src/auth-service';
|
|
6
|
+
export * from '@cccteam/ccc-lib/src/util-request-options';
|
|
7
|
+
export * from '@cccteam/ccc-lib/src/auth-state';
|
|
8
|
+
export * from '@cccteam/ccc-lib/src/types';
|
|
9
|
+
export * from '@cccteam/ccc-lib/src/ui-alert';
|
|
10
|
+
export * from '@cccteam/ccc-lib/src/ui-sidenav';
|
|
11
|
+
export * from '@cccteam/ccc-lib/src/ui-interceptor';
|
|
12
|
+
export * from '@cccteam/ccc-lib/src/ui-notification-service';
|
|
13
|
+
export * from '@cccteam/ccc-lib/src/ui-core-state';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './authentication.guard';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './authorization.guard';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnInit, Signal } from '@angular/core';
|
|
2
|
+
import { Domain, Resource } from '@cccteam/ccc-lib/src/types';
|
|
2
3
|
import { Store } from '@ngxs/store';
|
|
3
|
-
import { Domain, Resource } from '../../../types/permissions';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare enum InputMode {
|
|
6
6
|
Read = "read",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './has-permission.directive';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { SessionInfo } from '@cccteam/ccc-lib/src/types';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { SessionInfo } from '../../types/session-info';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class AuthService {
|
|
6
6
|
private http;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './auth.service';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { Permission, PermissionScope, Resource, SessionInfo } from '@cccteam/ccc-lib/src/types';
|
|
1
2
|
import { StateContext } from '@ngxs/store';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { Permission, PermissionScope, Resource } from '../../types/permissions';
|
|
4
|
-
import { SessionInfo } from '../../types/session-info';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
6
5
|
export interface AuthStateModel {
|
|
7
6
|
authenticated: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './auth.state';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { Domain, Permission, Resource } from '
|
|
2
|
+
import { Domain, Permission, Resource } from './permissions';
|
|
3
3
|
export declare const BASE_URL: InjectionToken<string>;
|
|
4
4
|
export declare const API_URL: InjectionToken<string>;
|
|
5
5
|
export declare const PERMISSION_REQUIRED: InjectionToken<(resource: Resource, permission: Permission) => boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { NotificationMessage } from '
|
|
3
|
-
import { NotificationService } from '
|
|
2
|
+
import { NotificationMessage } from '@cccteam/ccc-lib/src/types';
|
|
3
|
+
import { NotificationService } from '@cccteam/ccc-lib/src/ui-notification-service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class AlertComponent implements OnInit {
|
|
6
6
|
error: NotificationMessage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './alert.component';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import { AppAction, CreateNotificationMessage } from '@cccteam/ccc-lib/src/types';
|
|
1
2
|
import { StateContext } from '@ngxs/store';
|
|
2
|
-
import { AppAction } from '../../auth/state/auth.actions';
|
|
3
|
-
import { CreateNotificationMessage } from '../../types/notification-message';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
interface CoreStateModel {
|
|
6
5
|
loading: string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './core.state';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api.interceptor';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateNotificationMessage, NotificationMessage } from '
|
|
1
|
+
import { CreateNotificationMessage, NotificationMessage } from '@cccteam/ccc-lib/src/types';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class NotificationService {
|
|
4
4
|
private notificationId;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './notification.service';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sidenav.component';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { PermissionScope } from '@cccteam/ccc-lib/src/types';
|
|
2
3
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { PermissionScope } from '../../../types/permissions';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export interface NavItem {
|
|
6
6
|
type: 'link' | 'header' | 'expandable';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './request-options';
|
|
Binary file
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
export * from './public-api';
|
|
5
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2NjdGVhbS1jY2MtbGliLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vcHJvamVjdHMvY2NjLWxpYi9zcmMvY2NjdGVhbS1jY2MtbGliLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxjQUFjLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljLWFwaSc7XG4iXX0=
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Directive, Input, TemplateRef, ViewContainerRef, inject } from '@angular/core';
|
|
2
|
-
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
3
|
-
import { Store } from '@ngxs/store';
|
|
4
|
-
import { Subject, catchError, combineLatest, map, of } from 'rxjs';
|
|
5
|
-
import { AuthState } from '../state/auth.state';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
export class HasPermissionDirective {
|
|
8
|
-
templateRef = inject((TemplateRef));
|
|
9
|
-
viewContainer = inject(ViewContainerRef);
|
|
10
|
-
store = inject(Store);
|
|
11
|
-
scope = new Subject();
|
|
12
|
-
set cccHasPermission(scope) {
|
|
13
|
-
this.scope.next(scope);
|
|
14
|
-
}
|
|
15
|
-
constructor() {
|
|
16
|
-
combineLatest({
|
|
17
|
-
permissionFn: this.store.select(AuthState.hasPermission),
|
|
18
|
-
scope: this.scope.asObservable(),
|
|
19
|
-
})
|
|
20
|
-
.pipe(takeUntilDestroyed(), map(({ permissionFn, scope }) => (scope !== undefined ? permissionFn(scope) : true)), catchError(() => of(false)))
|
|
21
|
-
.subscribe((result) => {
|
|
22
|
-
if (result) {
|
|
23
|
-
if (!this.viewContainer.get(0)) {
|
|
24
|
-
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
else {
|
|
28
|
-
this.viewContainer.clear();
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: HasPermissionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
33
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: HasPermissionDirective, isStandalone: true, selector: "[cccHasPermission]", inputs: { cccHasPermission: "cccHasPermission" }, ngImport: i0 });
|
|
34
|
-
}
|
|
35
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: HasPermissionDirective, decorators: [{
|
|
36
|
-
type: Directive,
|
|
37
|
-
args: [{
|
|
38
|
-
selector: '[cccHasPermission]',
|
|
39
|
-
standalone: true,
|
|
40
|
-
}]
|
|
41
|
-
}], ctorParameters: () => [], propDecorators: { cccHasPermission: [{
|
|
42
|
-
type: Input
|
|
43
|
-
}] } });
|
|
44
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGFzLXBlcm1pc3Npb24uZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4v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