Fluent Commerce Logo
Docs
Sign In

Component SDK New Features & Enhancements 2021-08-30

Release

Author:

Fluent Commerce

Changed on:

8 July 2024

Target release date:2021-08-30
Release status:Released

Description

New Features for Component SDK:

`TemplateRegistry`
support

The

`TemplateRegistry`
allows SDK developers to add new template helpers and quickly render template strings in their custom components. Custom and existing components are now more configurable via the manifest.

For more information, see the Registering SDK Components.

New global functions for producing drawers, modals, and toasts in the UI

New global functions are available to allow SDK developers to produce drawer (

`pushDrawer()`
), modal (
`pushModal()`
) and toast (
`pushToast()`
) controls directly.

For more information, see the Drawers, Modals, and Toasts section on the Utility Components page.

New hooks

  • `getSettings`
    - a promise-based variant of
    `useSettings`
  • `useData`
    - provides direct access to the page query response and variables
  • `useUserActions`
    - retrieve a list of all possible user actions for an entity
  • `useUserActionForm`
    - generate the form for a named user action
  • `getApiDownload`
    - download a file from the authenticated API

For more information, see the Hooks page.


Component SDK Enhancements

Improved the

`Children`
utility component

The

`Children`
utility component is updated to override the component and/or data context trees. SDK developers now have more flexibility in how custom components are configured.

For more information, see the Children section on the Utility Components page.

Update to

`ComponentRegistry`
interface

The

`ComponentRegistry`
interface has been updated to make the get function available. SDK developers can now use existing registered components from within custom components.

For more information, see the Component Registry section on the Registering Components page.

Update to

`FieldRegistry: FormFieldProps`
interface

The

`FieldRegistry: FormFieldProps`
interface has been extended to include the onChangeOptions and entityContext parameters, allowing the creation of field components that adapt to the context of the form they're a member of.

For more information, see the Field Registry section on the Registering Components page.

Extended functionality for useI18n

The useI18n hook has been extended to include:

  • `translateOr`
    - conditional translation with multiple fallback options
  • `language`
    details of this user’s current and available language options

For more information, see the useI18n section on the Hooks page.

Changelog

Details as listed above.

Released capability depth:New capability, Enhancement
Release bundle / Capability type:Tool, Platform
Fluent Commerce

Fluent Commerce

Copyright © 2024 Fluent Retail Pty Ltd (trading as Fluent Commerce). All rights reserved. No materials on this docs.fluentcommerce.com site may be used in any way and/or for any purpose without prior written authorisation from Fluent Commerce. Current customers and partners shall use these materials strictly in accordance with the terms and conditions of their written agreements with Fluent Commerce or its affiliates.

Fluent Logo