Hoppa till innehåll

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

  • Add new utility function preventDefault to prevent default behavior of events in a more readable way.
  • Update type definitions.
  • Add idPrefix when rendering Svelte on the server to avoid conflicts with other apps.
  • Add type definitions.
  • Update license.
  • Update README and tagging in package.json.
  • Pass props properly to Svelte 5 server render function.
  • Update JSDoc to correct new paths for deprecated functions.
  • Restructure rendering function for different Svelte versions.
  • Add rendering function for Svelte 5.
  • Deprecate old Svelte rendering functions.
  • Add ?version=0 properly to getRouteUri when called in offline mode.
  • Change widget detection to use window.sv.PageContext.dashboardId.
  • Options in fetchJson is now optional.
  • Add widget support for fetchJson.
  • Fix asynchronous handling of error in fetchJson.
  • Cast Packages.java.util.UUID.randomUUID() to string.
  • Only remove values in stringifyParams if they are undefined, null or an empty string.
  • Update to correct homepage in package.json.
  • Hydrate when children other than HTML Elements exist in target.
  • New argument for client side Svelte rendering for hydrate.
  • New constants: isServer and isBrowser.
  • New function: generateId.
  • Throw more clear error when JSON response can’t be parsed in fetchJson.
  • Webpack support for usage with @sitevision/sitevision-scripts.
  • Respect hash when updating URL parameters with updateUrlParams and setUrlParams.
  • Don’t remove ? from location.search when parsing parameters in getUrlParams and updateUrlParams.
  • Remove abort controllers in fetchJson since it’s better to handle this seperatly case by case.
  • Add /edit-app-config to ignored URI
    in fetchJson.
  • Add fetchJson function to make requests to app routes or other resources.
  • Added helper functions for managing parameters in the URL-field.
  • Fix parseParams export.
  • Fix homepage url.
  • More lenient with peerDependency @sitevision/api.
  • New function parseParams to parse query parameters from an URL, URI or query string.
  • New function stringifyParams to stringify query parameters to a Sitevision compatible format.
  • Possible to pass a parameters object to getRouteUri.
  • All common constants and functions are now usable in hooks.
  • Deprecate getViewUri since it’s not used in WebApps 2.
  • Using WebApps 2 for rendering apps.
  • Removed getAppData, use getAppProps instead.
  • Removed server/render, use res.agnosticRender for framework agnostic rendering.
  • Removed server/renderTemplate, used for rendering underscore templates.
  • Underscore is misspelled in renderTemplate.
  • Added getAppProps for getting props passed to the app when rendering.
  • getAppData deprecated due to confusion, use getAppProps instead.
  • Return empty object instead of undefined when app data isn’t set.
  • Remove vue as optional dependency.
  • Consistent rendering when using serverServer and render for Svelte.
  • Docs for Svelte renderServer function.
  • Escape tags when parsing data to prevent closure of script tags.
  • Validation error for id on script tags, even though it’s allowed.
  • Put app data and metadata in script elements instead of data attributes.
  • Crashes when no data is passed to app and then trying to call getAppData.

A much needed major overhaul of the package. See MIGRATION.

  • Major refactoring of package.
  • Exports for render functions are moved.
  • All documented constants and functions from base import (@soleil-se/app-util) now works both in a server and client context.
  • Settings for selector is moved from server to client rendering functions.
  • Removed noScript option in render (formerly renderApp) has been removed. If a no script message is needed use the html option wrapped in <noscript>.
  • Removed @soleil-se/app-util/app-data has been removed, use getAppData from @soleil-se/app-util.
  • Nothing, Lerna wanted to publish…
  • Nothing, Lerna wanted to publish…
  • Homepage link
  • Svelte support.
  • New exports:
    • uniqueId - A unique id for the app instance.
  • App data with single quotes crashes app in edit mode, use double quotes instead.
  • getViewUri returns correct URI when in offline mode and in the Addons view.
  • renderApp now accepts req as a setting to opimize script loading when multiple instances of the app exists. If req is present the script will only be loaded once in all browsers except IE11 that needs a unique script src for the currentScript polyfill to work.
  • noScript in renderApp was not wrapped in a <noscript> tag.
  • renderTemplate function is now available inside templates rendered by the function.
  • getViewUri had incorrect portlet ID.
  • Add timestamp to script url in edit mode as well.
  • Wrapped renderApp script in svDocReady in edit mode to be sure it executes when other bundles are loaded.
  • Updated readme, heading levels and examples.
  • App data import in client, @soleil-se/app-util/app-data.
  • getViewUri to get the URI that also renders the page.
  • isOnline to see if the app is online.
  • vue is now an optional depedency.
  • Now using currentScript to reference the script element the app is running in to pass data when using renderApp.
  • renderApp is no longer using appName.
  • render is now called directly in ./app_src/client/index.js.
  • render and App no longer needs to be exported from ./app_src/client/index.js.