Skip to main content
Version: Next

client-ui

client-ui provides all of the core React UI components for geoprocessing projects, including the building blocks for creating custom UI components needed by a project. Run the storybook command to explore them interactively.

Index

Classes

ClassDescription
ReportError-

Interfaces

InterfaceDescription
AppProps-
CardProps-
CircleProps-
ClassTableColumnConfig-
ClassTableProps-
CollapseGroupProps-
CollapseProps-
DataDownloadProps-
DataDownloadToolbarProps-
DataFormatters-
DownloadOption-
DropdownContainerProps-
DropdownPropsRenders an element with a dropdown list
ErrorStatusProps-
FilterSelectCustom table data filters that are only active when selected by the user
FilterSelectOptionCustom table data filter
FilterSelectTableOptionsThe empty definitions of below provides a base definition for the parts used by useTable, that can then be extended in the users code.
GeographySwitcherProps-
GroupCircleProps-
GroupCircleRowProps-
GroupPillProps-
HorizontalStackedBarProps-
IucnActivityRank-
IucnLevelCircleProps-
IucnLevelCircleRowProps-
IucnLevelPillProps-
KeySectionProps-
LabelPropsArray of Labels to be inserted into the waters diagram
LegendProps-
ObjectiveStatusProps-
PillColumnProps-
PillProps-
RbcsIconProps-
RbcsLearnMoreProps-
RbcsMpaClassPanelProps-
RbcsMpaObjectiveStatusProps-
RbcsNetworkObjectiveProps-
RbcsPanelProps-
ReportChartFigureProps-
ReportContextState-
ReportPageProps-
ReportStoryLayoutProps-
ResultsCardProps-
Row-
SegmentControlProps-
SimpleButtonProbs-
SketchAttributesCardProps-
SketchClassTableProps-
StatusProps-
StyledHorizontalStackedBarProps-
StyledLegendProps-
StyledTwoColorPointyCircleProps-
TableOptionsThe empty definitions of below provides a base definition for the parts used by useTable, that can then be extended in the users code.
ToolbarCardProps-
ToolbarProps-
TooltipContainerProps-
TooltipPropsRenders an element with a tooltip
TwoColorPointyCircleProps-
VerticalSpacerProps-

Functions

FunctionDescription
App-
Card-
CardDecoratorDefault decorator. Create additional building on StoryLayout for more sophisticated needs
ChartLegendHorizontal stacked bar chart component
CheckboxGroupControlled checkbox group
CircleCircle with user-defined component inside
ClassTableTable displaying class metrics, one class per table row. Having more than one metric per class may yield unexpected results Returns 0 value in table when faced with a 'missing' metric instead of erroring Handles "class has no value" NaN situation (common when sketch doesn't overlap with a geography) by overwriting with 0 and adding information circle
ClassTableStyled-
Collapse-
CollapseGroup-
createReportDecoratorThink of this as a ReportDecorator generator, that allows you to pass in context and override the default The only reason to use this instead of ReportDecorator directly is to pass context
DataDownloadDropdown menu for transforming data to CSV/JSON format and initiating a browser download Defaults to CSV and JSON, and filename will include sketch name from ReportContext (if available) and current timestamp
DataDownloadToolbarConvenience component that creates a Toolbar with Header and DataDownload
Dropdown-
DropdownContainer-
DropdownItem-
DropdownTrigger-
ErrorStatus-
EstimateLabel-
FilterSelectTableTable with customizable filter functions as CheckboxGroup that when selected filter the rows if the function return true. By default only 'some' filter function has to match for it to filter the row
FilterSelectTableStyled-
finishTaskFinishes task by hitting the remote cache, updating the hook with the task result and cleaning up
GeographySwitcher-
GreenPill-
GroupCircleCircle with user-defined group colors
GroupCircleRowGroupCircle with layout for use in table row
GroupPillPill with colors assigned to each group name
HorizontalStackedBarHorizontal stacked bar chart component
InfoStatus-
IucnActivitiesCard-
IucnDesignationTable-
IucnLevelCircle-
IucnLevelCircleRow-
IucnLevelPill-
IucnMatrix-
KeySection-
LanguageSwitcher-
LayerToggle-
ObjectiveStatus-
Pill-
PillColumn-
PointyCircleCircle with pointy top right corner
ProgressBar-
ProgressBarWrapper-
RbcsActivitiesCard-
RbcsIcon-
RbcsLearnMoreDescribes RBCS and lists minimum level of protection required for each objective
RbcsMpaClassPanelSketch collection status panel for MPA regulation-based classification
RbcsMpaObjectiveStatus-
RbcsNetworkObjectiveStatusDisplays status toward meeting Network objective
RbcsZoneClassPanelSingle-sketch status panel for MPA regulation-based classification
RbcsZoneRegIcon-
ReportChartFigureChart container styled with spacing for layout in report pages
ReportDecoratorDecorator that renders a story into ReportStoryLayout.
ReportPage-
ReportStoryLayoutWraps a story to look and behave like a sketch report It also replicates much of the functionality of App.tx like setting text direction and loading ReportContext. The context value can be added to or overridden by passing a value prop Layout includes a language switcher (connected to the report context) and a report width selector The caller must wrap the story in a Translator component to provide translations
ReportTableStyled-
ReportTextDirectionControls text direction for report based on current language
ResultsCard-
runTaskRuns task by sending GET request to url with payload and optional flags Task can be aborted using caller-provided AbortSignal
SegmentControl-
SimpleButtonA simple button component that accepts any text value so unicode can be used including emojis
SimpleButtonStyled-
Skeleton-
SketchAttributesCard-
SketchClassTableTable displaying sketch class metrics, one table row per sketch
SketchClassTableStyledStyle component for SketchClassTable
SmallReportTableStyled-
StyledCircleDefault style for Circle
StyledPill-
StyledTwoColorPointyCircle-
TableTable component suited to geoprocessing client reports. Builds on the react-table useTable hook and re-exports its interface, so reference those API docs to suit your needs.
TableStyled-
Toolbar-
ToolbarCard-
ToolbarStyled-
Tooltip-
TooltipContainer-
TooltipItem-
TooltipTrigger-
TranslatorLoads translations asynchronously using dynamic import abd react-i18next will have translations eventually and update When language changes in context, the i18n instance will be updated and child components will update
TwoColorPointyCircleTwo-color reg-based classification circle for collection index value
useCheckboxesHook to maintain checkbox state
useFunctionRuns the given geoprocessing function for the current sketch, as defined by ReportContext During testing, useFunction will look for example output values in SketchContext.exampleOutputs
useLanguageHook that returns current language from report context, and provides function to change the language Also include language text direction as third parameter
useSketchProperties-
VerticalSpacer-
WarningPill-
WatersDiagramServes up a translatable SVG image showing nautical boundaries

Type Aliases

Type aliasDescription
BlockSingle rectangle block value representing length
BlockGroupGroup of blocks with the same color
Column-
HorizontalStackedBarRowOne or more BlockGroups forming a single linear stacked row
RbcsMpaObjectiveRenderMsgFunction-
RbcsNetworkObjectiveRenderMsgFunction-
RowConfig-
StringOrNumber-
SUPPORTED_FORMAT-
TargetFormatterFunction that given target value for current table row, the table row index, and total number of table rows, returns a function that given target value returns a formatted string or Element. In other words a function that handles the formatting based on where the row is in the table and returns a function handling the remaining formatting.

References

defaultReportContext

Re-exports defaultReportContext


PartialReportContextValue

Re-exports PartialReportContextValue


ReportContext

Re-exports ReportContext


ReportContextValue

Re-exports ReportContextValue


sampleSketchReportContextValue

Re-exports sampleSketchReportContextValue


TestExampleOutput

Re-exports TestExampleOutput