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

@shopware-ag/admin-extension-sdk

v3.0.16

Published

The SDK for App iframes to communicate with the Shopware Administration

Downloads

29,192

Readme

Admin Extension SDK

Tests NPM Package

The admin-extension-sdk is a JavaScript library for all Shopware 6 App and Plugin developer which want an easy way to extend and customize the administration.

See Documentation

Installation

Using NPM:

Install it to your package.json

npm i --save @shopware-ag/admin-extension-sdk

and import it in your app:

// import everything
import * as sw from '@shopware-ag/admin-extension-sdk';

// or import only needed functionality
import { notification }  from '@shopware-ag/admin-extension-sdk';

Using CDN:

Import the source from the CDN

// use the latest version available
<script src="https://unpkg.com/@shopware-ag/admin-extension-sdk/cdn"></script>

// use a fix version (example here: 1.2.3)
<script src="https://unpkg.com/@shopware-ag/[email protected]/cdn"></script>

and then you can access it with the global variable sw.

sw.notification.dispatch({
  title: 'My first notification',
  message: 'This was really easy to do'
})

Features

  • 🏗 Works with Shopware 6 Apps and Plugins: you can use the SDK for your plugins or apps. API usage is identical.
  • 🎢 Shallow learning curve: you don't need to have extensive knowledge about the internals of the Shopware 6 Administration. Our SDK hides the complicated stuff behind a beautiful API.
  • 🧰 Many extension capabilities: from throwing notifications, accessing context information or extending the current UI. The feature set of the SDK will gradually be extended, providing more possibilities and flexibility for your ideas and solutions.
  • 🪨 A stable API with great backwards compatibility: don't fear Shopware updates anymore. Breaking changes in this SDK are an exception. If you use the SDK, your apps and plugins will stay stable for a longer time, without any need for code maintenance.
  • 🧭 Type safety: the whole SDK is written in TypeScript which provides great autocompletion support and more safety for your apps and plugins.
  • 💙 Developer experience: have a great development experience right from the start. And it will become better and better in the future.
  • 🪶 Lightweight: the whole library is completely tree-shakable and dependency-free. Every functionality can be imported granularly to keep your bundle as small and fast as possible.

Examples

Throw a notification:

sw.notification.dispatch({
  title: 'My first notification',
  message: 'This was really easy to do'
})

Get the system currency:

const currency = await sw.context.getCurrency();

Subscribe for UI locale changes:

let currentLocale = 'en-GB';

sw.context.subscribeLocale(({ locale }) => {
  currentLocale = locale;
})

See more examples in the Documentation.