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` supportThe `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 UINew 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
Component SDK EnhancementsImproved the
`Children` utility componentThe `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` interfaceThe `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` interfaceThe `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 useI18nThe 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
Changelog
Details as listed above.| Released capability depth: | New capability, Enhancement |
|---|---|
| Release bundle / Capability type: | Tool, Platform |