npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@next-level-integration/nli-access-denied

v10.0.10-beta

Published

This component is for an access denied page to be re used in all the micro front end projects. In the case that the user does not have permission to access a particular page, the user will be redirected to this page.

Downloads

27

Readme

Access Denied Component

This component is for an access denied page to be re used in all the micro front end projects. In the case that the user does not have permission to access a particular page, the user will be redirected to this page.

How to use

Access Denied component: npm install @next-level-integration/nli-access-denied --save.

Create a wrapper component with a module file to import this module and then use that wrapper Component in routing to redirect. Classes to be added/updated are:

  1. AppRoutingModule: add this in the Routes:

      {path: 'access-denied', component: AccessDeniedPageComponent},
  2. Add this in the index.html

     const ACCESS_DENIED_ROUTE = "access-denied";
        

    Update the if condition in the funciton: getPositionWhereRoutingStarts(locationSplitArr){}

     if (locationSplitArr[i] === FIRST_STRING_OF_ROUTE
              || locationSplitArr[i] === ACCESS_DENIED_ROUTE) {
  3. Add this import the AppModule:

     AccessDeniedPageModule
  4. For translation:

    Update the function HttpLoaderFactory inside AppModule.ts with this line

    {prefix: "./lib/nli-access-denied/assets/i18n/", suffix: ".json"}

    Update the angular.json with this:

               {
                 "glob": "**/*",
                 "input": "./node_modules/@next-level-integration/nli-access-denied/assets",
                 "output": "./lib/nli-access-denied/assets/"
               }
  5. Create one folder access-denied-page in the pages folder. Add the wrapper module: component.ts, module.ts and component.html

    AccessDeniedPageComponent

     import {Component} from '@angular/core';
        
     @Component({
       selector: 'nli-access-denied-page',
       templateUrl: './access-denied-page.component.html',
     })
     export class AccessDeniedPageComponent  {}

    access-denied-page.component.html

     <nli-i18n [hidden]="true"></nli-i18n>
     <nli-show-access-denied></nli-show-access-denied>

    AccessDeniedPageModule

     import { NgModule } from '@angular/core';
     import { CommonModule } from '@angular/common';
     import {AccessDeniedPageComponent} from './access-denied-page.component';
     import {SharedModule} from '../../shared/shared.module';
     import {LibrariesModule} from '../../libraries.module';
     import {NliAccessDeniedModule} from '@next-level-integration/nli-access-denied';
     import {I18nModule} from '@next-level-integration-private/nli-i18n';
    
     @NgModule({
       imports: [
         CommonModule,
         LibrariesModule,
         NliAccessDeniedModule,
         I18nModule,
         SharedModule,
       ],
       declarations: [AccessDeniedPageComponent],
       exports: [],
     })
     export class AccessDeniedPageModule {}