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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jm-7c3/sp-integration

v20.1.0

Published

Contains elements to work with SharePoint through its API.

Downloads

219

Readme

SharePoint Integration

Contains elements to work with SharePoint through its API.

Now the major version matches the Angular version used in the project.

Form Controls

Standalone UI form input controls, based on PrimeNG components, to be used in Reactive Forms.

Autocomplete Input

Autocomplete input that shows suggestions from a specified list.

Import

import {SpAutocompleteInputComponent} from '@jm-7c3/sp-integration';

Implementation

<cl-sp-autocomplete-input listName="fields" />

Inputs

| Input | Type | Default | Required | Description | | - | - | - | - | - | | appendTo | string | 'body' | false | HTML element to append the control to | | fieldName | string | 'Title' | false | List field to be used as label | | forceSelection | boolean | true | false | - | | listName | string | | true | List from which the options will be taken | | maxlength | number | 25 | false | Max length for the input | | minLength | number | 3 | false | Min length for the input | | placeholder | string | '' | false | Placeholder for the input |

Site Users Input

Input that shows users as suggestions.

Import

import {SpSiteusersInputComponent} from '@jm-7c3/sp-integration';

Implementation

<cl-sp-siteusers-input />

Inputs

| Input | Type | Default | Required | Description | | - | - | - | - | - | | appendTo | string | 'body' | false | HTML element to append the control to | | fieldName | string | 'Title' | false | List field to be used as label | | fieldValue | string | 'Id' | false | List field to be used as value | | forceSelection | boolean | true | false | - | | maxlength | number | 25 | false | Max length for the input | | minLength | number | 3 | false | Min length for the input | | placeholder | string | '' | false | Placeholder for the input | | styleClass | string | '' | false | CSS classes to be added to the input |

Interceptors

Form Digest

Takes the Form Digest token from local storage and set the X-RequestDigest header to POST requests.

Implementation

import { spFormDigestInterceptor } from '@jm-7c3/sp-integration';

const appConfig: ApplicationConfig = {
  providers: [
    ...
    provideHttpClient(
      withInterceptors([spFormDigestInterceptor])
    ),
    ...
  ]
}

Integration

Sets headers such as Accept and Content-Type to DELETE, GET and POST calls.

Implementation

import { spIntegrationInterceptor } from '@jm-7c3/sp-integration';

const appConfig: ApplicationConfig = {
  providers: [
    ...
    provideHttpClient(
      withInterceptors([spIntegrationInterceptor])
    ),
    ...
  ]
}

Services

All services internally generate paths to work with SharePoint's API.

Files

Allows working with SharePoint's files and directories.

Import

import {SpFilesService} from '@jm-7c3/sp-integration';

Inject the service

private readonly spFilesService = inject(SpFilesService);

Methods

| Method | HTTP Method | Description | | - | - | - | | createDirectory | POST | Creates a directory in the specified path | | downloadFile | NA | Opens a new tab to download the specified | | getFileName | NA | Returns the name (with hash) of the specified file | | getSafeFileName | NA | Returns the name (without hash) of the specified file | | uploadFile | POST | Uploads a file to the specified path |

Form Digest

Requests Form Digest token for authentication every 300s and saves it in local storage. It's only used by the Form Digest interceptor.

Implementation

It is suggested implementing the service's clear method in the root component's onDestroy hook to avoid memory leaks.

import {SpFormDigestService} from '@jm-7c3/sp-integration';

class AppComponent implements OnDestroy {
  private readonly spFormDigestService = inject(SpFormDigestService);

  ngOnDestroy(): void {
    this.spFormDigestService.clear();
  }
}

Lists

Allows working with SharePoint's lists.

Import

import {SpListsService} from '@jm-7c3/sp-integration';

Inject the service

private readonly spListsService = inject(SpListsService);

Methods

| Method | HTTP Method | Description | | - | - | - | | getListItem | GET | Returns a single list item from a list | | getListItemHistory | GET | Returns the version history of a list item | | query | GET | Returns an array of filtered list items of a list | | list | GET | Returns an array of all list items of a list | | save | POST | Saves a single list item |

Users

Allows working with SharePoint's users.

Import

import {SpUsersService} from '@jm-7c3/sp-integration';

Inject the service.

private readonly spUsersService = inject(SpUsersService);

Methods

| Method | HTTP Method | Description | | - | - | - | | getCurrentUser | GET | Returns the information of the current user | | getCurrentUserProfile | GET | Returns the profile of the current user | | getUser | GET | Returns the information of a specific user | | siteUsers | GET | Returns an array of filtered users |