Commit graph

5,978 commits

Author SHA1 Message Date
Gabriel Luiz Freitas Almeida
bfc74367b5 🔧 fix(store.py): modify metadata structure to include count for each name and total count to improve data analysis capabilities 2023-10-27 13:03:27 -03:00
Gabriel Luiz Freitas Almeida
4016c28573 🔧 fix(store.py): add metadata to component before uploading to improve data integrity and analysis capabilities 2023-10-27 11:43:12 -03:00
Gabriel Luiz Freitas Almeida
5716ca21dc 🔧 fix(store.py): import missing module 'langflow.api' to resolve NameError
🔧 fix(store.py): add missing metadata comment to clarify the purpose of the code block
 feat(store.py): add 'has_api_key' field to the response of 'check_if_store_is_enabled' endpoint to indicate if the user has an API key
🔧 fix(store.py): add missing metadata using the Component.data in the 'create_component' endpoint to properly handle component metadata
2023-10-27 11:37:54 -03:00
Gabriel Luiz Freitas Almeida
dfabb80567 🐛 fix(schema.py): fix the transformation of tags in ListComponentResponse to return a list of TagResponse objects
🔥 chore(service.py): remove unnecessary code that flattens the tags in ListComponentResponse
2023-10-27 11:05:02 -03:00
Gabriel Luiz Freitas Almeida
f69917f4b0 🔥 refactor(store.py): remove unnecessary "user_created.id" field from list_components function
🔥 refactor(service.py): remove unnecessary "user_created.id" field from StoreService class
2023-10-27 10:32:33 -03:00
anovazzi1
acb957fadf fix(market-card.tsx): remove unnecessary code related to Badge component
feat(index.tsx): add tags state and fetch tags from API to display as badges in the StorePage
2023-10-27 09:19:18 -03:00
anovazzi1
6b4c964d20 fix(nodeToolbarComponent): fix saveFlowStore function call to include selectedTags and sharePublic parameters 2023-10-27 08:55:18 -03:00
anovazzi1
b97c25d3c7 fix(extraSidebarComponent): remove unnecessary dependency from useEffect hook
feat(extraSidebarComponent): add support for tags selection in the extra sidebar component
fix(nodeToolbarComponent): add missing import statements for new components
feat(nodeToolbarComponent): add support for tags selection and public/private toggle in the node toolbar component
2023-10-27 08:52:50 -03:00
anovazzi1
cf434eb7ba feat(tagsSelectorComponent): add TagsSelector component to allow users to select tags for a flow
feat(tagsSelectorComponent): add TagComponent to render individual tags in the TagsSelector component
fix(API): add tags and publicFlow parameters to saveFlowStore function to save tags and set flow visibility
fix(ConfirmationModal): add size prop to allow customizing the size of the modal
feat(ExtraSidebar): add TagsSelector component to the Share Flow confirmation modal to allow users to select tags for the flow
feat(ExtraSidebar): add ToggleShadComponent to allow users to toggle the visibility of the shared flow
fix(ExtraSidebar): pass selected tags and sharePublic value to saveFlowStore function when sharing a flow
fix(ExtraSidebar): add useEffect to fetch tags from API and initialize tags state
fix(ExtraSidebar): add handleTagSelection function to handle tag selection in TagsSelector component
fix(ExtraSidebar): update handleShareFlow function to pass selected tags and sharePublic value to saveFlowStore function
fix(ExtraSidebar): update ConfirmationModal size prop to use size prop from component props
fix(ExtraSidebar): update ConfirmationModal dependency array to include sharePublic value
fix(NodeToolbarComponent): pass empty array as tags parameter to saveFlowStore function when sharing a component
fix(MarketCardComponent): pass tags parameter to saveFlowStore function when saving a flow from the store
fix(ConfirmationModal): add size prop to ConfirmationModalType to allow customizing the size of the modal
2023-10-27 01:11:48 -03:00
Gabriel Luiz Freitas Almeida
d34b551677 🔧 chore(.env.example): update example URLs for LANGFLOW_STORE_URL, LANGFLOW_DOWNLOAD_WEBHOOK_URL, and LANGFLOW_LIKE_WEBHOOK_URL to improve clarity and consistency
🔧 chore(store.py): add endpoint to like a component in the store API to enable users to like components

🔧 chore(base.py): add LIKE_WEBHOOK_URL to the settings to allow configuration of the webhook URL for liking components

🔧 chore(service.py): rename webhook_url variable to download_webhook_url for clarity and add like_webhook_url variable to store the LIKE_WEBHOOK_URL from the settings. Update call_webhook method to use download_webhook_url for downloading components and add like_component method to handle liking a component.
2023-10-27 00:16:57 -03:00
anovazzi1
343e6e3bfc fix(ConfirmationModal/index.tsx): fix typo in tooltipContent variable name
refactor(ConfirmationModal/index.tsx): refactor Trigger component to conditionally render ShadTooltip based on tooltipContent value
2023-10-26 23:39:36 -03:00
anovazzi1
b73ca7c36a fix(ConfirmationModal): remove modalContent prop and replace it with Content and Trigger components to improve flexibility and reusability
feat(ConfirmationModal): add support for displaying tooltip content and positioning in the Trigger component
fix(AdminPage): remove duplicate modalContent prop in ConfirmationModal components
fix(ApiKeysPage): remove duplicate modalContent prop in ConfirmationModal components
fix(ExtraSidebar): remove duplicate modalContent prop in ConfirmationModal component
fix(NodeToolbarComponent): remove duplicate modalContent prop in ConfirmationModal component
fix(types/components): add TriggerProps type to define props for the Trigger component in ConfirmationModal
2023-10-26 23:24:10 -03:00
Gabriel Luiz Freitas Almeida
af593684c0 🐛 fix(alembic): handle exception when altering column "user_id" in "flow" table to be nullable
🔥 chore(alembic): remove unnecessary code in downgrade function
2023-10-26 23:21:44 -03:00
cristhianzl
665dae87e5 fix(store.py): flatten the "tags" field in the list_components response to improve data structure and readability
feat(store.py): add new endpoint to get list of components liked by a user
fix(store.py): add "downloads_count" field to the list_components response to display the number of downloads for each component
fix(store.py): add "metadata" field to the list_components response to include additional metadata for each component
fix(store.py): change the "user_created.name" field to "user_created.first_name" in the list_components response to display the first name of the user who created the component
fix(store.py): change the "liked_by_count" field in the component response to be an integer instead of a list of UUIDs
fix(store.py): change the "downloads_count" field in the component response to be an integer instead of a list of UUIDs
fix(store.py): add "metadata" field to the component response to include additional metadata for each component
fix(store.py): add "metadata" field to the store_component_create request schema to allow passing additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
fix(store.py): add "metadata" field to the download_component response schema to include additional metadata for a component
2023-10-26 19:11:16 -03:00
anovazzi1
43c80da141 format code 2023-10-26 16:37:50 -03:00
anovazzi1
95af78ef08 refactor(market-card.tsx): remove unused handleFork function to improve code readability and maintainability
feat(market-card.tsx): add setErrorData function to alertContext to handle error messages when adding a component
feat(market-card.tsx): add setSuccessData function to alertContext to display success message when adding a component
2023-10-26 16:36:45 -03:00
anovazzi1
4775cd1d95 fix(market-card.tsx): fix import statement for storeComponent type
feat(market-card.tsx): add ShadTooltip component for displaying tooltips on market card
fix(index.tsx): fix import statement for storeComponent type
feat(index.tsx): change data and dataSelect state types to storeComponent[]
fix(index.tsx): add missing properties to storeComponent type
fix(styleUtils.ts): add missing import statement for Heart and ToyBrick icons
2023-10-26 16:26:25 -03:00
Gabriel Luiz Freitas Almeida
44b90b36d7 🐛 fix(service.py): remove unnecessary fields from params to improve performance and reduce payload size
 feat(service.py): remove page and limit params to retrieve all results instead of a limited number of results
2023-10-26 15:53:24 -03:00
Gabriel Luiz Freitas Almeida
5a54fa74fe 🔧 fix(schema.py): add 'downloads_count' field to ComponentResponse, ListComponentResponse, and DownloadComponentResponse models to track the number of downloads for each component 2023-10-26 15:50:15 -03:00
Gabriel Luiz Freitas Almeida
654a1de6c6 🔧 fix(store.py): flatten the tags in the list_components response to match the schema
🔧 fix(store.py): add user_created.id field to the list_components response to match the schema
🔧 fix(store.py): add count(downloads) field to the list_components response to match the schema
🔧 fix(store.py): add tags_id field to the TagsIdResponse schema to match the response structure
🔧 fix(service.py): add user_created.first_name and user_created.id fields to the list_components query to match the schema
🔧 fix(service.py): add count(downloads) field to the list_components query to match the schema
2023-10-26 15:48:42 -03:00
Gabriel Luiz Freitas Almeida
d0f121e662 🔧 fix(store.py): add "metadata" field to the list of requested fields in the list_components function to include metadata in the response
🔧 fix(schema.py): add "metadata" field to the ComponentResponse, ListComponentResponse, DownloadComponentResponse, and StoreComponentCreate models to support metadata in the store component data
🔧 fix(service.py): add "metadata" field to the list of requested fields in the StoreService class to include metadata in the query parameters
2023-10-26 15:25:54 -03:00
anovazzi1
b3a8be547f fix(StorePage/index.tsx): handle error when fetching saved components and display error message
feat(StorePage/index.tsx): add error handling for API key fetch and display error message
2023-10-26 15:19:32 -03:00
Gabriel Luiz Freitas Almeida
2427bda690 🔄 refactor(schema.py): change liked_by_count type from List[UUID] to int for better consistency and readability 2023-10-26 15:19:11 -03:00
Gabriel Luiz Freitas Almeida
4e62f02226 🐛 fix(service.py): fix typo in params["filter"] assignment
 feat(service.py): add support for filtering by user_created field and limit the results to 100
 feat(service.py): add support for fetching additional fields in the response for better data retrieval
2023-10-26 15:13:22 -03:00
Gabriel Luiz Freitas Almeida
5a8ba5f0db 🐛 fix(service.py): remove unnecessary try-except block and return statement to improve code readability and maintainability 2023-10-26 14:45:49 -03:00
Gabriel Luiz Freitas Almeida
6615bf3b03 🔧 fix(store.py): import UsersLikesResponse in store.py to resolve import error
 feat(store.py): add new endpoint to get list of components liked by a user
🔧 fix(schema.py): add UsersLikesResponse schema to define the response structure for the new endpoint
🔧 fix(service.py): add get_user_likes method to retrieve the list of components liked by a user from the store API
2023-10-26 11:46:42 -03:00
Gabriel Luiz Freitas Almeida
acc6cd6e4e 🐛 fix(service.py): handle JSONDecodeError when response does not contain data field to prevent server error
 feat(service.py): return ComponentResponse with component_dict when response does not contain data field to provide consistent response format
2023-10-26 11:31:35 -03:00
Gabriel Luiz Freitas Almeida
d11b199ca4 🔧 fix(store.py): update attribute name from "user_created.name" to "user_created.first_name" to reflect correct data structure
🔧 fix(store.py): remove unnecessary code and comments
2023-10-26 10:15:35 -03:00
cristhianzl
47ecdfb185 fix(StorePage/index.tsx): remove unnecessary slicing of search data in handleGetComponents and handlePageChange functions
feat(StorePage/index.tsx): add getNumberOfComponents function to fetch the total count of components in the store and update the totalRowsCount state
2023-10-26 08:49:12 -03:00
cristhianzl
b623438a27 feat(saved-components): add pagination functionality to the saved components page
- Add `PaginatorComponent` import to the `saved-components` file to use for pagination.
- Add `totalRowsCount`, `size`, and `index` state variables to manage pagination.
- Modify the `handleGetComponents` function to fetch components based on the current `index` and `size` values.
- Add `handleChangePagination` function to handle pagination changes and fetch components accordingly.
- Render the `PaginatorComponent` below the list of components if there are components to display and the loading state is false.

feat(store-page): add pagination functionality to the store page

- Remove the `loadingWithApiKey` variable as it is no longer needed.
- Remove the `renderComponents` variable as it is no longer needed.
- Add `renderPagination` variable to determine if pagination should be rendered based on the search data, loading state, and search state.
- Render the `PaginatorComponent` below the list of components if there are components to display, the loading state is false, and the search state is false.
2023-10-26 00:07:10 -03:00
cristhianzl
bfff5d305a refactor(storeContext.tsx): update setHasStore to use "enabled" property from response instead of "has_store" for better readability and consistency
refactor(API/index.ts): update checkHasStore API endpoint URL to use BASE_URL_API constant for better maintainability and consistency
2023-10-25 23:59:37 -03:00
cristhianzl
adf849a6fb Merge branch 'feature/store' into feat/store/cris 2023-10-25 23:57:13 -03:00
Gabriel Luiz Freitas Almeida
d664131e6c 🔧 fix(__main__.py): add 'store' parameter to update_settings function to enable/disable store feature
 feat(__main__.py): add 'store' option to the run command to enable/disable store feature
🔧 fix(store.py): add check_if_store_is_enabled endpoint to check if store feature is enabled
 feat(store.py): add get_tags endpoint to retrieve tags from the store
🔧 fix(base.py): add STORE setting to enable/disable store feature
🔧 fix(schema.py): rename 'likes_count' field to 'liked_by_count' in ComponentResponse and ListComponentResponse
🔧 fix(service.py): change default sorting in query_components function to sort by 'count(liked_by)'
 test(test_store.py): update sort parameter in test_search_components to 'count(liked_by)'
2023-10-25 23:12:23 -03:00
Gabriel Luiz Freitas Almeida
785e8a6436 🔧 fix(store.py): add count_components endpoint to retrieve the count of components in the store
🔧 fix(service.py): modify count_components method to make api_key optional and add filter_by_user parameter to filter components by user
2023-10-25 22:23:13 -03:00
cristhianzl
1081ace70f pagination and context with store 2023-10-25 22:18:31 -03:00
Gabriel Luiz Freitas Almeida
3934096e06 🔥 refactor(store.py): remove count_components endpoint
The count_components endpoint was removed as it was no longer being used and served no purpose in the API.
2023-10-25 22:03:22 -03:00
Gabriel Luiz Freitas Almeida
31fb76c992 🐛 fix(store.py): change function name from query_components to count_components to improve semantics and accurately count components
 feat(service.py): add count_components method to StoreService class to count components based on filter criteria
2023-10-25 21:50:06 -03:00
Gabriel Luiz Freitas Almeida
c9b77ec9db 🔧 fix(store.py): change list_components function name to query_components for better semantics and consistency
 feat(store.py): add `count_components` endpoint to get the count of components based on filter criteria
🔧 fix(service.py): modify `query_components` function to return a list of dictionaries when `count` parameter is True
2023-10-25 21:47:39 -03:00
cristhianzl
1b69f02b16 fix(StorePage): fix pagination bug where incorrect index and pageSize were passed to getStoreComponents function
feat(StorePage): add support for dynamic pagination in StorePage by implementing handleChangePagination function
feat(StorePage): add support for resetting filter in StorePage by implementing resetFilter function
feat(StorePage): add support for displaying total rows count in StorePage
feat(StorePage): add support for displaying loading message while fetching data in StorePage
feat(StorePage): add support for displaying error message when there is an error fetching data in StorePage
feat(StorePage): add support for displaying search input and search button in StorePage
feat(StorePage): add support for filtering components by type in StorePage
feat(StorePage): add support for displaying badges for each component type in StorePage
feat(StorePage): add support for displaying market card components in StorePage
feat(StorePage): add support for displaying paginator component in StorePage
feat(StorePage): add support for displaying loading message while fetching data with API key in StorePage
fix(types): add storeComponent property to PaginatorComponentType to differentiate between store and other components
2023-10-25 21:05:04 -03:00
anovazzi1
fd4aa3648a fix(tabsContext.tsx): remove console.log statements for debugging
feat(market-card.tsx): add success alert when flow is installed
2023-10-25 19:58:27 -03:00
anovazzi1
6d5c803c17 fix(tabsContext.tsx): fix typo in createRandomKey function parameter name from uid to uid()
feat(tabsContext.tsx): add createRandomKey function to generate random keys for custom components
refactor(tabsContext.tsx): refactor logic to update storeComponents object with new custom component data
refactor(tabsContext.tsx): refactor logic to update newData object with updated custom_components object
refactor(tabsContext.tsx): refactor logic to correctly concatenate newFlows array in addFlowToLocalState function
refactor(tabsContext.tsx): refactor logic to generate random key for component type in updateComponentType function
feat(utils.ts): add createRandomKey function to generate random keys for components
2023-10-25 19:49:39 -03:00
Lucas Oliveira
cbbfa3517f fixed input on mobile 2023-10-25 19:48:24 -03:00
Lucas Oliveira
3d6227d881 Fixed header 2023-10-25 19:45:04 -03:00
Lucas Oliveira
0d55ce9f06 Added skeleton on store loading 2023-10-25 19:19:45 -03:00
anovazzi1
02e1f8a82e fix(tabsContext.tsx): fix component key generation to include unique identifier to avoid conflicts
fix(extraSidebarComponent/index.tsx): fix sorting of sidebar items to be case-sensitive
fix(utils.ts): update regex pattern to remove count from string and sort function to handle alphanumeric identifiers
2023-10-25 19:08:35 -03:00
anovazzi1
a718ac2f4b fix(tabsContext.tsx): change return type of saveComponent function to Promise<String | undefined> for better error handling and consistency
fix(nodeToolbarComponent/index.tsx): fix saveComponent function call to return a Promise and handle success and error cases properly
fix(types/tabs/index.ts): change return type of saveComponent function to void for consistency with implementation
feat(reactflowUtils.ts): add updateComponentNameAndType function to update component name and type
2023-10-25 18:31:45 -03:00
Gabriel Luiz Freitas Almeida
b006f11a3d 🐛 fix(service.py): simplify the filter condition for retrieving public components 2023-10-25 18:07:49 -03:00
Gabriel Luiz Freitas Almeida
bb05c6cd46 🐛 fix(service.py): increase default limit value from 10 to 15 to retrieve more components per page
🐛 fix(service.py): fix duplicate assignment in filter parameter to correctly filter public and Public components
2023-10-25 18:05:42 -03:00
Gabriel Luiz Freitas Almeida
7d4e3e2614 🐛 fix(service.py): update filter logic to include components with status "Public" in addition to "public" 2023-10-25 18:04:22 -03:00
cristhianzl
3e315012e1 adding features store 2023-10-25 17:49:47 -03:00