🗃️ Application
5 items
🗃️ Contexts
6 items
📄️ Data
Data is the object that provides read access to the form values data.
📄️ API for Saving Files
The fileSaver object lets a form script trigger a client-side file download, prompting the user's browser to save a file to their own machine (not "to the backend" as the name might suggest). It is the file-saver library's saveAs function, exposed directly as a standard script variable alongside data, form, and http.
📄️ Form instance API
The form object gives your scripts access to the current form: its data, its mode, and the functions to read or update field values, submit, and report validation errors. It's available in every script alongside the other standard script variables.
📄️ HTTP Requests
HTTP is the object that provides access to the HTTP API that can be used to make HTTP requests. HTTP Requests are the lifeblood of a Shesha application. In order for the application to function well, the front-end needs to send data to the backend, for that data to be saved in the database. This is where HTTP requests come in. The Shesha front-end uses axios under the hood, and an axios instance is exposed on almost all the available Scripts on the configurator. For more on Shesha Scripts, see here.
📄️ JavaScript API Plugins
Shesha lets you extend the JavaScript API available in scripts by registering custom plugins. A plugin adds a named object to the application context that your scripts can call just like the built-in APIs. Use this when your application has shared logic - such as business rules, utility functions, or stateful services - that you want to access from any form script.
📄️ Loader API
The Shesha loader provides a full-page spinner overlay that you can trigger from form scripts, custom actions, and data context expressions. It is designed for async operations where you want to give the user visual feedback.
📄️ Message
The message object lets you show brief toast notifications to the user from inside any Shesha script. Use it to confirm that an action succeeded, alert the user to a problem, or surface useful information without blocking the page with a modal.
📄️ Modal API
The modal object provides methods for displaying various types of dialogs and modals to the user. This API is built on top of Ant Design's Modal component and provides Promise-based methods for handling user interactions.
📄️ Moment
Moment.js is a library for parsing, validating, manipulating, and displaying dates and times in JavaScript. Shesha exposes it to your form scripts through the moment variable, so you can work with dates without writing your own date-handling logic.