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-y/ycore

v2.0.0

Published

AngularAccelerator: a sap-commerce storefront using angular. This is a collection of core directives, filters and services

Downloads

6

Readme

AngularAccelerator

A sap-commerce storefront using angular

This is a collection of core directives, filters and services

How to

  • Services:

    • AuthGuard: CanActivate if oauth status is authorized
    • BrowserRef: Window object wrapper with SSR functionality
    • SiteGuard: CanActivate if BaseSite is found and processed
    • LocaleService: Root service. Will handle all site and locales
    • LocaleServiceInterceptor: Will add lang and curr query params to api request. See below
    • NavigatorService: Router navigate wrapper. Will handle navigation respecting base site url patterns
    • SmartEditService: Applies smartedit feedback to render changes
  • Directives:

    • scrollTop on click scroll to top
    • srcLazy will lazy load images/videos/iframes eg. <img [srcLazy]="image.png">
    • ifTheme similar to ngIf, will test for provided theme and render eg. <div *ifTheme="'alpha'">Hello World</div>
    • ifSite similar to ngIf, will test for provided site and render if true eg. <div *ifSite="'electronics'">Hello World</div>
    • intoView: will emit boolean event if element is into view. Uses IntersectionObserver
  • Filters:

    • site, theme : will add current siteId / theme to the class name like hompage | className will result in homepage site-electronics if on electronics site
    • fileSize : friendly file size
    • sanitizeHtml , sanitizeStyle and sanitizeUrl utils
    • stripHtml, stripTimeString, truncateNumber and truncateText as text utils
    • thumbnail, image: get thumbnail / primary image from media object
    • host : append host config parameter if resource is on different domain
    • routerPath, routerQuery and routerFragment: utils in dealing with site routing. Use these instead of [router]='/somewhere'
    • map: Map pipe. eg. [values]="sorts | map:'code'"
  • Validators:

    • ccNumber, ccCSC, ccMonth, ccYear, phone, password. Include YValidators to use them. YValidators extends Validators
  • To use Animations, in your component add them like this:

animations: [Animations.expand({value: 1})]
  • Form elements:

    • input-file : file upload input
      <input-file class="row g-0" (filesChange)="saveFile($event)">
        <ng-template #label>
          <div class="btn btn-secondary choose-file-button">
            Select file
          </div>
        </ng-template>
        <ng-template #suffix>
          <span class="p-1">{{file?.name}}</span>
        </ng-template>
      </input-file>
    • input-select : select input
       <input-select formControlName="pageSize"
                     [placeholder]="pagination.pageSize"
                     [values]="pageSizes"
                     [optionNames]="pageSizes">
       </input-select>
    • input-switch : toogle switch checkbox input
      <input-switch [(ngModel)]="consent"></input-switch>
  • LocaleService Interceptor needs to be installed in AppModule

providers: [
  {
    provide: HTTP_INTERCEPTORS,
    multi: true,
    useClass: LocaleInterceptor
  }
]
  • Use of SiteGuard
const routes: Routes = [
  {
    path: '',
    canActivate: [SiteGuard],
    children: [
      {
        path: '',
        loadChildren: () => import('./modules/layout/layout.module').then(m => m.LayoutModule)
      },
      {
        path: '**',
        redirectTo: 'error'
      }
    ]
  }
];

Installing

npm install @ngx-y/ycore

Build

ng build ycore --prod

App Requirements

  • @ngx-y/yapi is required for api services support

Licensing

GPLv2

© DialogData 2021