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

@digital-blueprint/sublibrary-app

v2.2.2

Published

[GitHub Repository](https://github.com/digital-blueprint/sublibrary-app) | [npmjs package](https://www.npmjs.com/package/@digital-blueprint/sublibrary-app) | [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/sublibrary-app/) | [Sublibrary Bundle](ht

Downloads

362

Readme

Sublibrary Application

GitHub Repository | npmjs package | Unpkg CDN | Sublibrary Bundle

Build and Test

overview

With the dbp sublibrary app you can assign call number, borrow books, return library books, extend loan periods, show current loans, show current book orders and show the budgets.

Prerequisites

  • You need library officer permissions to be allowed to use the application
  • You need the API server running
  • You need the Dbp Relay Sublibrary Bundle for the API server to talk to the Alma backend

Local development

# get the source
git clone [email protected]:digital-blueprint/sublibrary-app.git
cd sublibrary-app
git submodule update --init

# install dependencies
npm install

# constantly build dist/bundle.js and run a local web-server on port 8001 
npm run watch-local

# constantly build dist/bundle.js and run a local web-server on port 8001 using a custom assets directory assets_custom/
npm run watch-custom

# run tests
npm test

Jump to http://localhost:8001, and you should get a Single Sign On login page.

Example book barcodes: +F58330104, +F58019101, +F53498803

By default, the application is built using the assets in assets/. However, custom assets can also be used to build the application. The custom assets can be added to the directory assets_custom/dbp-sublibrary/assets/. This allows developers to easily develop and build the application for different environments.

Remote development

https://dbp-dev.tugraz.at/apps/library

Run npm run watch-dev to build the dist/bundle.js constantly and upload the dist folder to the server.

Roll back a release

COMPOSER_VENDOR_DIR=_temp composer require "deployer/deployer" "deployer/recipes"
# Check if the config is pointing to the server you want
./_temp/bin/dep config:hosts production
# Do the rollback
./_temp/bin/dep rollback production

Demo system

https://dbp-demo.tugraz.at/apps/library

Build bundle for the demo environment

APP_ENV=demo npm run build

Using this app as pre-built package

Install app

If you want to install the dbp sublibrary app in a new folder sublibrary-app with a path prefix / you can call:

npx @digital-blueprint/cli install-app sublibrary sublibrary-app /

Afterwards you can point your Apache web-server to sublibrary-app/public.

Make sure you are allowing .htaccess files in your Apache configuration.

Also make sure to add all of your resources you are using (like your API and Keycloak servers) to the Content-Security-Policy in your sublibrary-app/public/.htaccess, so the browser allows access to those sites.

You can also use this app directly from the Unpkg CDN for example like this: dbp-sublibrary/index.html

Note that you will need a Keycloak server along with a client id for the domain you are running this html on.

Update app

If you want to update the dbp sublibrary app in the current folder you can call:

npx @digital-blueprint/cli update-app library

Activities

This app has the following activities:

  • dbp-sublibrary-book-list
  • dbp-sublibrary-budget
  • dbp-sublibrary-create-loan
  • dbp-sublibrary-loan-list
  • dbp-sublibrary-order-list
  • dbp-sublibrary-renew-loan
  • dbp-sublibrary-return-book
  • dbp-sublibrary-shelving

You can find the documentation of these activities in the sublibrary activities documentation.

Adapt app

Functionality

You can add multiple attributes to the <dbp-sublibrary> tag.

| attribute name | value | Link to description | |----------------|-------| ------------| | provider-root | Boolean | app-shell | | lang | String | language-select | | entry-point-url | String | app-shell | | keycloak-config | Object | app-shell | | base-path | String | app-shell | | src | String | app-shell | | html-overrides | String | common | | themes | Array | theme-switcher | | darkModeThemeOverride | String | theme-switcher |

Mandatory attributes

If you are not using the provider-root attribute to "terminate" all provider attributes you need to manually add these attributes so that the topic will work properly:

<dbp-sublibrary
        auth
        requested-login-status
        analytics-event
>
</dbp-sublibrary>

Design

For frontend design customizations, such as logo, colors, font, favicon, and more, take a look at the theming documentation.

"dbp-sublibrary" slots

These are common slots for the app-shell. You can find the documentation of these slots in the app-shell documentation. For the app specific slots take a look at the sublibrary activities.