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

adl-ui-framework

v1.0.10

Published

ADL UI Framework

Downloads

62

Readme

ADL UI Framework

Downloads Version

Axiata Digital Labs Indonesia Design System.

Features

  • Search UI
  • Table UI
  • Base Service
  • Icon Service
  • Input Currency Directive
  • Only Number Directive
  • Decimal Number Pipe
  • Currency Pipe (Rupiah)
  • Transform AbstractControl to FormControl
  • Safe Pipe (HTML | Style | URL | Resource URL)
  • Base Model
    • HTTP Body Request Pagination Model
    • HTTP Body Request Pagination with Filter Model
    • HTTP Body Resp Model
    • Upload File Request Model
  • Util
    • HTTP Param Generator
  • Styles
    • Bootstrap v5.1.3 (https://getbootstrap.com/)
    • Font Family
      • Axiata | Inter | Material Icons
    • Component
      • Accordion | Alert | Avatar | Breadcrumb | Button | Checbox | Input | Search | Tooltip | Typography

Getting started

Installation

npm i adl-ui-framework
/* Import style to styles.scss */
@import '../../node_modules/adl-ui-framework/adl-ui-framework.styles.scss';
@include font_mixins('/assets/fonts/');

Usage

Example

import { IconService } from 'adl-ui-framework';

export class AppComponent {
	constructor(
		private iconService: IconService,
	) {
		iconService.registerIcons(IconsList, '../../../../assets/images/icons');
	}
}
<adl-table [table]="table"
			(nextAction)="clickedButton($event)"></adl-table>
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { BaseService, TableButtonModel, TableModel } from 'adl-ui-framework';
import { Subscription } from 'rxjs';
import {
	ViewListTableColumnConst,
	ViewListTableLabelConst,
} from '../../shared/const';
import { UserModel } from '../../shared/model';

@Component({
	selector: 'app-adl-library-view-list',
	templateUrl: './adl-library-view-list.component.html',
	styleUrls: ['./adl-library-view-list.component.scss'],
})
export class ADLLibraryViewListComponent implements OnInit, OnDestroy {
	public isLoading!: boolean;
	public table!: TableModel;

	private subscribers: Subscription[] = [];

	constructor(private router: Router, private baseService: BaseService) {}

	ngOnInit(): void {
		this.isLoading = false;
		this.subscribers = [];

		this.initTable();
		this.getViewListService();
	}

	private initTable(): void {
		const editButton = new TableButtonModel(
			'Edit',
			'edit',
			'flat',
			'icon',
			'primary',
			false,
			'edit'
		);
		const deleteButton = new TableButtonModel(
			'Delete',
			'delete',
			'stroked',
			'icon',
			'warn',
			false,
			'delete'
		);

		this.table = new TableModel(
			[],
			0,
			ViewListTableColumnConst,
			ViewListTableLabelConst,
			1,
			10,
			[editButton, deleteButton],
			true
		);
	}

	private getViewListService(): void {
		this.isLoading = true;

		const url =
			UserViewListServicePathConst +
			'?page=' +
			this.table.page +
			'&limit=' +
			this.table.pageSize;

		const subs = this.baseService
			.getDataPaging(url, UserModel)
			.subscribe(resp => {
				if (resp) {
					this.table.totalData = resp.total;
					this.table.dataSource.data = resp.data;
				}

				this.isLoading = false;
			});

		this.subscribers.push(subs);
	}

	public clickedButton(event: { row: UserModel; action: string }): void {
		if (!event) {
			return;
		}

		if (event.action === 'edit') {
			this.navigateToEdit(event.row.id);
		} else if (event.action === 'delete') {
			this.deleteUserService(event.row.id);
		}
	}

	public deleteUserService(id: string): void {
		const subs = this.baseService
			.deleteData(UserViewListServicePathConst + '/' + id, null)
			.subscribe(resp => {
				if (resp) {
					this.getViewListService();
					console.log(resp);
				}
			});

		this.subscribers.push(subs);
	}

	private navigateToEdit(id: string): void {
		this.router.navigate(['/example-url/edit'], {
			queryParams: {
				id,
			},
		});
	}

	ngOnDestroy(): void {
		this.subscribers.forEach(each => each.unsubscribe());
	}
}
import { TableModule } from 'adl-ui-framework';

@NgModule({
  imports: [TableModule]
})
export class ExampleModule {
}

Troubleshooting

Please follow this guidelines when reporting bugs and feature requests:

  1. Use GitHub Issues board to report bugs and feature requests (not our email address)
  2. Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for understanding!