Utils
The Design System exposes some utilities that you may find useful when developing custom views or components. You can import each utility individually from the @sema4ai/components/utils path.
formatDate
Returns formatted date or date time string with optional format options.
jsx
formatRelativeDate
Returns formatted relative time if difference is less than 1 hour, otherwise returns regular formatted date.
jsx
dataFuzzySearcher
Local data fuzzy search helper util
jsx
dataSearcher
Local data search helper util
jsx
dataSorter
Local data sorting helper util
jsx
dataFilter
Local data filtering helper util
jsx