Hoppa till innehåll
This package has changed name, was previously @soleil-api/webapp-util.
More information

@soleil-se/app-util

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.
  • Sitevision 9.1.0 or later.
  • @soleil-se/build-app@^1.0.0 or @sitevision/sitevision-scripts@^3.0.0.
  • WebApps 2 enabled app.

bundled needs to be enabled in WebApp manifest for WebApps 2.

manifest.json
{
"id": "se.soleil.myApp",
"version": "1.0.0",
"name": "My app",
"author": "Soleil AB",
"description": "",
"helpUrl": "https://soleil.se/support",
"type": "WebApp",
"bundled": true
}
Terminal window
npm i @soleil-se/app-util

Migrating from version 4?
See MIGRATION.