Skip to content

Viewer ​

Deprecated (5.x only)

This page applies to the 5.x line only (npm 5.1.x, branch 5.x). @ahoo-wang/fetcher-viewer is deprecated on npm (every version) and frozen there: existing functionality is maintained, with no new features. It is replaced by @ahoo-wang/wow-view-engine in the Wow repository (typescript/, wow.ahoo.me), on npm from Wow 9.2.0 (9.2.1 or later accepts fetcher 6). The two use different models and APIs, so migration requires adaptation.

Viewer supplies Ant Design filter, table and saved-view UI. Begin with the component matching who owns the rows and saved views. A local table does not require a Wow backend; FetcherViewer requires the defined remote protocol.

Choose an entry ​

EntryComponent ownsApplication owns
ViewOne view's filter/table/page interactiondataSource: {list,total}, data loading and persistence
ViewerView collection, switching and editable active-view statedefinition, initial views, onLoadData, create/update/delete persistence and success callbacks
FetcherViewerDefinition/view lookup, Wow commands and paged data requestsCompatible backend, default Fetcher/authentication, tenant/owner identity and authorization

View and Viewer do not filter or paginate an input array for you. Their callbacks request new data; the application supplies the resulting rows and total. A save callback acknowledges application persistence. FetcherViewer adds version confirmation for create/update; deletion and ordinary row queries have different boundaries.

Installation prerequisites ​

sh
pnpm add @ahoo-wang/fetcher @ahoo-wang/fetcher-cosec @ahoo-wang/fetcher-decorator @ahoo-wang/fetcher-eventbus @ahoo-wang/fetcher-eventstream @ahoo-wang/fetcher-openapi @ahoo-wang/fetcher-react @ahoo-wang/fetcher-storage @ahoo-wang/fetcher-viewer @ahoo-wang/fetcher-wow @ant-design/icons antd dayjs react react-dom

This reference targets 5.0.0. The library package declares Node >=18.20.8; repository development requires Node >=22.12.0 and pnpm 10.34.5. The command includes all transitive internal peers, including packages reached through Wow/React/CoSec. Direct runtime dependencies are installed automatically. External peer ranges are React/ReactDOM ^19.2.8, antd ^6.6.3, @ant-design/icons ^6.3.4 and dayjs ^1.11.23. They are installation requirements even when a particular feature is unused. Consumers do not need to duplicate the repository React Compiler toolchain.

Runnable core example ​

For setup, fixtures and expected results follow the guide.

The file lives on the 5.x branch, where @ahoo-wang/fetcher-viewer is maintained: stories/docs/LocalViewer.tsx.

Topics ​

State and resource ownership · Failure and cancellation boundaries

Released under the Apache License 2.0.