Sparnatural query history component
- Local storage of stored queries : queries are stored locally in the browser, and persist across sessions
- Query summary rendering each query is displayed in a compact way in the history
- Easy integration : open the modal dialog from any button or link or icon
- Favorites support : Toggle the "star" to put queries in favorite and easily retrieve them
- Search inside the history by date range and inside the query structure
- Sort the history by date, type searched entity, or by favorites
- Copy, Load, Delete actions for each saved query
- Internationalization (English/French)
The main component rendered inside . Responsible for:
- Rendering the full history interface
- Initializing the selected language
Handles all the UI logic for the modal, including:
- Loading and displaying saved queries
- Applying a custom scrollable summary renderer
- Favoriting (star icons)
- Copying to clipboard
- Deleting entries
- Filtering by date range with a modal
- Graceful fallback for missing
specProvider
A modal window triggered by a calendar icon, allowing users to apply a date range filter (minDate
/ maxDate
) on saved queries.
A confirmation dialog shown before critical actions, such as deleting a query or clearing all non-favorited history entries.
Loads translation labels from language files in /assets/lang/en-Hist.json
or /fr-Hist.json
.
Singleton for handling browser localStorage
:
getHistory()
— retrieves saved historysaveQuery(queryJson)
— saves a query with datedeleteQuery(id)
— deletes a queryclearHistory()
— clears all