langflow/docs
anovazzi1 eec1fb23d3
feat: adds new JSON viewer (#5407)
* feat: Add JsonEditor component for JSON editing

This commit adds a new component called JsonEditor, which allows users to edit JSON data. The component uses the JSONEditor library and provides options for customizing the editor's appearance and behavior. It also includes functionality for updating the edited data and triggering a callback when the data changes. The component is initialized with an initial data object and can be updated with new data through props. The component is designed to be reusable and can be easily integrated into other parts of the application.

* feat: Add JsonEditor component for JSON editing and replace JsonView

The commit adds a new component called JsonEditor for editing JSON data. It replaces the previous JsonView component used for displaying JSON data. This change improves the functionality and user experience of the application.

* [autofix.ci] apply automated fixes

* Added json editor to package

* Change jsonEditor to use new vanilla jsonEditor

* Added color variables

* Removed unused buttons on json editor

* Removed unused dark store

* Fixed state management on dictAreaModal

* Change default DictComponent value to dict

* removed unused checks

* Changed to forward ref of json editor

* removed nav bar

* Fixed value not being received

* Added check if value is null and handleOnNewValue on this case

* Removed unused button on json editor

* Adds auto focus and change mode to text

* ♻️ (jsonEditor/index.tsx): remove unnecessary comments and improve code readability by removing redundant comments and empty dependency array in useEffect.

* Fixed dict component test

* Refactor json-input component to use VanillaJsonEditor and JsonEditor component

* Remove react-json-view-lite and react18-json-view dependencies

* [autofix.ci] apply automated fixes

* Refactor jsonEditor component to add readOnly prop

* Refactor json-output-view component to add read-only prop

* Refactor switchOutputView component to add JSON output view

* Refactor CSS styles for JSON editor buttons

* Update package-lock.json to add new dependencies for @mapbox/node-pre-gyp and remove jsdom and its related modules

* [autofix.ci] apply automated fixes

* Refactor textModal component to remove unused imports and dependencies

* add filter property to jsonEditor

* [autofix.ci] apply automated fixes

* Refactor jsonEditor component to handle transform queries and display error messages

* [autofix.ci] apply automated fixes

* Refactor jsonEditor component to add filter property and handle transform queries

* Refactor jsonEditor component to add filter property and handle transform queries

* Refactor Output class to add options property

* Refactor json-output-view.tsx to update default height value

* Refactor jsonEditor component to normalize transform query path

* Refactor jsonEditor component to add JSONQuery support for transform queries

* Add jsonquerylang library as a dependency

* Refactor utils.py to add support for applying JSON filters

* Refactor base.py to add apply_options method for JSON filtering

* Fix jsonOutputView to set filter option to undefined when empty

* Enhance apply_json_filter to support Data objects and improve query handling

* Improve json filtering in Output class to return original result if filtered result is None

* Refactor Component class to simplify map_outputs method and enhance output handling

* move jsonquerylang to langflow-base

* Refactor Component and Output classes for improved output handling and type consistency; enhance apply_json_filter to ensure proper data processing and add comprehensive unit tests.

* Add filter_data method to Data class and update apply_options in Output class to utilize it; enhance apply_json_filter return type to Data.

* Import apply_json_filter in Data class to enable data filtering functionality

* Add validation for JSON results in JsonEditor; ensure only objects and arrays are accepted and handle serialization errors

* 📝 (App.css): Add styles for jse-menu separator and cm-gutters to improve UI layout
♻️ (index.tsx): Refactor imports and code formatting for better readability and maintainability
🔧 (index.tsx): Update BaseModal component styles to improve UI layout and responsiveness

* 📝 (custom.css): add extra line at the end of the file for consistency
📝 (App.css): add styling for .jse-menu .jse-button.jse-group-button class
📝 (classes.css): add extra line at the end of the file for consistency

* 🐛 (data.py): fix custom_serializer to handle bytes objects by decoding them to utf-8
♻️ (base.py): refactor options field in Output class to accept BaseModel, dict, or None for better flexibility and compatibility

* Refactor apply_json_filter to directly use jsonquery on result, removing unnecessary string conversion

*  (base.py): Introduce OutputOptions model for output filtering and update Output class to use it

* 🐛 (classes.css): Hide search box background and adjust container positioning for better layout

*  (jsonEditor): Enhance filtering functionality with improved state management and user feedback

* Fixed package lock

* [autofix.ci] apply automated fixes

* Updated package lock

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Lucas Oliveira <lucas.edu.oli@hotmail.com>
Co-authored-by: cristhianzl <cristhian.lousa@gmail.com>
Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
2025-03-17 14:25:50 +00:00
..
css feat: adds new JSON viewer (#5407) 2025-03-17 14:25:50 +00:00
docs docs: test and update google oauth integration (#6949) 2025-03-13 21:24:48 +00:00
i18n docs: added fetching from notion (#2670) 2024-07-12 22:59:52 +02:00
src docs: replace mendable with algolia (#6694) 2025-02-18 21:06:56 +00:00
static docs: test and update google oauth integration (#6949) 2025-03-13 21:24:48 +00:00
.gitignore chore: use yarn only (#6141) 2025-02-06 17:44:46 +00:00
.yarnrc.yml chore: use yarn only (#6141) 2025-02-06 17:44:46 +00:00
babel.config.js add docs with components 2023-07-18 15:08:00 -03:00
docusaurus.config.js docs: Allow setting baseUrl configuration via ENV variable (#7021) 2025-03-11 19:24:29 +00:00
index.d.ts docs: added fetching from notion (#2670) 2024-07-12 22:59:52 +02:00
openapi.json docs: bump openapi.json to v1.2.0 (#6832) 2025-02-26 15:03:23 +00:00
package.json docs: fix syntax errors at build (#7047) 2025-03-13 00:18:29 +00:00
README.md chore: use yarn only (#6141) 2025-02-06 17:44:46 +00:00
sidebars.js docs: mcp integration (#6986) 2025-03-13 18:24:39 +00:00
tailwind.config.js docs: fix syntax errors at build (#7047) 2025-03-13 00:18:29 +00:00
tsconfig.json docs: added fetching from notion (#2670) 2024-07-12 22:59:52 +02:00
yarn.lock build(deps): bump @babel/runtime-corejs3 from 7.26.9 to 7.26.10 in /docs (#7051) 2025-03-13 01:53:51 +00:00

Website

This website is built using Docusaurus 3, a modern static website generator.

Installation

$ yarn install

Local Development

$ yarn start

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

$ yarn build

This command generates static content into the build directory and can be served using any static contents hosting service, including yarn serve.

Deployment

Using SSH:

$ USE_SSH=true yarn deploy

Not using SSH:

$ GIT_USER=<Your GitHub username> yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.