Utility functions for WebApps, RESTApps and Widgets.
Common functions are available both on the server and client.
Client functions are only available in the browser.
- fetchJson - Fetch wrapper for calling app routes, rest-api or external resources.
- urlParams - Helper functions for managing URL query parameters.
- utils - General utility functions.
Server functions are only available on the server.
- appData - Typesafe wrapper for
@sitevision/api/server/appData
. - globalAppData - Typesafe wrapper for
@sitevision/api/server/globalAppData
.
Requirements
Section titled “Requirements”- Sitevision 9.1.0 or later.
@soleil-se/build-app@^1.0.0
or@sitevision/sitevision-scripts@^3.0.0
.- WebApps 2 enabled app.
Manifest
Section titled “Manifest”bundled
needs to be enabled in WebApp manifest for WebApps 2.
{ "id": "se.soleil.myApp", "version": "1.0.0", "name": "My app", "author": "Soleil AB", "description": "", "helpUrl": "https://soleil.se/support", "type": "WebApp", "bundled": true}
Install
Section titled “Install”npm i @soleil-se/app-util
Migration
Section titled “Migration”Migrating from version 4?
See MIGRATION.