UiPath UI Widgets
A collection of reusable React UI components for UiPath applications.
๐ฆ Packages
@uipath/ui-widgets-datatable
A powerful and flexible datatable component with full CRUD support, master-detail views, inline editing, and more.
Features:
- โ Full CRUD operations (Create, Read, Update, Delete)
- ๐ Master-detail view with grouping
- โ๏ธ Inline editing with multiple field types
- ๐ Filtering, sorting, and pagination
- ๐จ Customizable columns and styling
- ๐ Foreign key relationship support
- ๐ Diff viewer for change review
- โ Comprehensive test coverage
@uipath/ui-widgets-multi-file-upload
A multi-file upload component that allows users to select and upload multiple files to a UiPath bucket.
Features:
- ๐ Multiple file selection
- โ๏ธ Upload to UiPath buckets
- โ Success/error callbacks
- ๐ File type filtering
- ๐ File size limits
- ๐ Custom path support
๐ Getting Started
Installation
Development
# Start development server npm run dev # Build all packages npm run build # Run linter npm run lint # Start Storybook npm run storybook # Build Storybook npm run build-storybook
Testing
# Run all tests npm test # Run tests in watch mode npm test -- --watch # Run tests with UI npm run test:ui # Generate coverage report npm run test:coverage
See TEST_GUIDE.md for comprehensive testing documentation.
๐ Storybook
This project uses Storybook for component documentation and development. Storybook provides an interactive UI for viewing and testing components in isolation.
Running Storybook Locally
This will start Storybook on http://localhost:6006.
Building Storybook
This creates a static build of Storybook in the storybook-static directory.
Deployment
Storybook is automatically deployed to GitHub Pages when changes are pushed to the main or develop branches. The deployment workflow builds both the packages and Storybook, then publishes the static Storybook site.
To enable GitHub Pages deployment:
- Go to your repository settings
- Navigate to Pages
- Set Source to "GitHub Actions"
๐ Project Structure
uipath-ui-widgets/
โโโ packages/
โ โโโ datatable/ # DataTable component package
โ โโโ src/
โ โ โโโ components/ # React components
โ โ โโโ hooks/ # Custom React hooks
โ โ โโโ utils/ # Utility functions
โ โ โโโ types.ts # TypeScript types
โ โโโ package.json
โโโ samples/ # Sample applications
โโโ test/ # Test setup and utilities
โ โโโ setup.ts # Test configuration
โ โโโ utils/ # Test helpers
โโโ vitest.config.ts # Vitest configuration
โโโ package.json
๐งช Testing
This project follows testing best practices with comprehensive unit test coverage:
- Test Framework: Vitest
- Testing Library: React Testing Library
- Coverage Target: 80%+ for statements, branches, functions, and lines
Key testing principles:
- โ Test behavior, not implementation
- โ Use accessible queries
- โ Follow AAA pattern (Arrange-Act-Assert)
- โ Mock external dependencies
- โ Test edge cases and error states
๐ ๏ธ Tech Stack
- React 19 - UI library
- TypeScript - Type safety
- Vite - Build tool
- ag-Grid - Data grid component
- Material-UI - UI components
- Vitest - Test runner
- React Testing Library - Component testing
React Compiler
The React Compiler is enabled on this project. See React Compiler documentation for more information.
Note: This will impact Vite dev & build performances.
Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default defineConfig([ globalIgnores(["dist"]), { files: ["**/*.{ts,tsx}"], extends: [ // Other configs... // Remove tseslint.configs.recommended and replace with this tseslint.configs.recommendedTypeChecked, // Alternatively, use this for stricter rules tseslint.configs.strictTypeChecked, // Optionally, add this for stylistic rules tseslint.configs.stylisticTypeChecked, // Other configs... ], languageOptions: { parserOptions: { project: ["./tsconfig.node.json", "./tsconfig.app.json"], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]);
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js import reactX from "eslint-plugin-react-x"; import reactDom from "eslint-plugin-react-dom"; export default defineConfig([ globalIgnores(["dist"]), { files: ["**/*.{ts,tsx}"], extends: [ // Other configs... // Enable lint rules for React reactX.configs["recommended-typescript"], // Enable lint rules for React DOM reactDom.configs.recommended, ], languageOptions: { parserOptions: { project: ["./tsconfig.node.json", "./tsconfig.app.json"], tsconfigRootDir: import.meta.dirname, }, // other options... }, }, ]);