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

ngx-explorer-sdteam

v1.6.0

Published

Angular library that provides simple file manager.

Downloads

33

Readme

ngx-explorer-sdteam

Preview

A version inherits from ngx-explorer.

  • Image preview
  • Right click context menu
  • Read-only mode
  • Asynchronous upload progress bar
  • One-click treeview
  • Observable callback function
  • File link generation

DEMO

Icon View explorer

Detail View explorer

Quick Start

  • Install package
yarn add ngx-explorer-sdteam
  • Implement IDataService provider interface
import { IDataService } from 'ngx-explorer-sdteam';

export class MainComponent implements IDataService<ExampleNode> {
    ...
}
  • Add NgxExplorerModule and data provider to NgModule
import { MainComponent } from './main/main.component';
import { NgxExplorerModule, DataService } from 'ngx-explorer-sdteam';

@NgModule({
    imports: [
        ...
        NgxExplorerModule
    ],
    exports: [],
    declarations:[MainComponent],
    providers: [
        { provide: DataService, useClass: MainComponent }
    ]
})
export class AppModule { }
  • Add Style to angular.json
"styles": [
    "node_modules/ngx-explorer-sdteam/src/assets/icons/css/txt.css"
],
  • Add to .html
<nxe-explorer></nxe-explorer>

Available attribute

| Attribute | Type | Default | Description | | :----------------- | :-------- | :--------- | :--------------------------------------------------------------- | | read-only | boolean | false | Explorer work on read only mode (Open Folder/Download File only) | | auto-refresh | boolean | false | Explorer will be refreshed automatically | | refresh-interval | number | 10000 | Interval between refreshes | | offset-top | number | 0 | Right click context menu offset from top | | offset-right | number | 0 | Right click context menu offset from right | | offset-bottom | number | 0 | Right click context menu offset from bottom | | offset-left | number | 0 | Right click context menu offset from left | | main-node | string | "Files" | Root folder name | | view-type | string | "Detail" | Default explorer view type |

Example

<nxe-explorer main-node="home" 
              [read-only]="true" 
              [offset-left]="30" 
              [offset-right]="48" 
              [offset-top]="126" 
              [offset-bottom]="80"> 
</nxe-explorer>

Main function

| Function | Description | | :-------------- | :------------------------------------ | | New Folder | Create a new folder on recent path | | Upload File | Open a dialog to select uploaded file | | Download File | Download selected files | | Rename | Rename selected item | | Delete | Delete selected item | | Copy Path | Copy recent path | | Generate Link | Generate a link to selected item |

Copy Path

Path Format : Home/Music/Classical

Generate Link

Link Format : .../file-explorer?filter=Home%2FMusic%2FClassical

import { ExampleNode, IDataService, HelperService } from 'ngx-explorer-sdteam';

export class MainComponent implements IDataService<ExampleNode> {
    filter: string;
    baseUrl: string = `${window.location.protocol}//${window.location.hostname}:${window.location.port}/`;
    constructor(
        private _activatedroute: ActivatedRoute,
        private _router: Router
    ) {
        this.filter = this._activatedroute.snapshot.queryParamMap.get('filter')
        this._router.events
            .pipe(filter((event: Event | RouterEvent) => event instanceof NavigationEnd))
            .subscribe(() => { delete this.filter });
    }
    getFilterString(): Observable<any> {
        return of(this.filter);
    }
    getBaseUrl(): Observable<any> {
        return of(`${this.baseUrl}#/file-explorer?filter=`);
    }
}

SignalR

import { ExampleNode, IDataService, HelperService } from 'ngx-explorer-sdteam';

export class MainComponent implements IDataService<ExampleNode> {
    constructor(
    private service: FileManagerService,
    private helperService: HelperService,
    private signalRService: SignalRService,
  ) {
    this.signalRService.fileChangedEmitter
    .pipe(takeUntilDestroyed())
    .subscribe(() => {
        this.helperService.refreshExplorer()
    });
  }
}

Usage

Database & API

Contact me for more detail ([email protected])

SPA

Example file