@vertesia/ui 0.60.0 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/core/components/FormItem.js +9 -0
- package/lib/esm/core/components/FormItem.js.map +1 -0
- package/lib/esm/core/components/InputList.js +4 -3
- package/lib/esm/core/components/InputList.js.map +1 -1
- package/lib/esm/core/components/index.js +3 -3
- package/lib/esm/core/components/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/button.js +37 -7
- package/lib/esm/core/components/shadcn/button.js.map +1 -1
- package/lib/esm/core/components/shadcn/dialog.js +3 -3
- package/lib/esm/core/components/shadcn/dialog.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/DynamicLabel.js +38 -0
- package/lib/esm/core/components/shadcn/filters/DynamicLabel.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/comboBox.js +24 -26
- package/lib/esm/core/components/shadcn/filters/comboBox.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/dateFilter.js +12 -12
- package/lib/esm/core/components/shadcn/filters/dateFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filterBar.js +49 -36
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filters.js +31 -23
- package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/selectFilter.js +33 -24
- package/lib/esm/core/components/shadcn/filters/selectFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/textFilter.js +2 -2
- package/lib/esm/core/components/shadcn/filters/textFilter.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/types.js.map +1 -1
- package/lib/esm/core/components/shadcn/input.js +4 -4
- package/lib/esm/core/components/shadcn/input.js.map +1 -1
- package/lib/esm/core/components/shadcn/selectBox.js +72 -6
- package/lib/esm/core/components/shadcn/selectBox.js.map +1 -1
- package/lib/esm/core/components/styles.js +1 -1
- package/lib/esm/core/components/styles.js.map +1 -1
- package/lib/esm/core/components/table/index.js +3 -0
- package/lib/esm/core/components/table/index.js.map +1 -1
- package/lib/esm/core/index.js +2 -1
- package/lib/esm/core/index.js.map +1 -1
- package/lib/esm/core/utils/cn.js +6 -0
- package/lib/esm/core/utils/cn.js.map +1 -0
- package/lib/esm/core/utils/index.js +2 -0
- package/lib/esm/core/utils/index.js.map +1 -0
- package/lib/esm/features/agent/PayloadBuilder.js +174 -0
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -0
- package/lib/esm/features/agent/chat/AnimatedThinkingDots.js +207 -0
- package/lib/esm/features/agent/chat/AnimatedThinkingDots.js.map +1 -0
- package/lib/esm/features/agent/chat/JumpingDots.js +6 -0
- package/lib/esm/features/agent/chat/JumpingDots.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +409 -0
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +129 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js +66 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/Header.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js +29 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js +97 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js +46 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageInput.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +352 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js +20 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessagesContainer.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js +62 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/PlanPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js +23 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlideInPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js +51 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js +82 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js +13 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/StackedMessages.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js +105 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/WorkstreamTabs.js.map +1 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +154 -0
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -0
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js +266 -0
- package/lib/esm/features/agent/chat/SlidingThinkingIndicator.js.map +1 -0
- package/lib/esm/features/agent/chat/WaitingMessages.js +60 -0
- package/lib/esm/features/agent/chat/WaitingMessages.js.map +1 -0
- package/lib/esm/features/agent/chat/index.js +5 -0
- package/lib/esm/features/agent/chat/index.js.map +1 -0
- package/lib/esm/features/agent/index.js +3 -0
- package/lib/esm/features/agent/index.js.map +1 -0
- package/lib/esm/features/errors/PanelErrorBoundary.js +11 -0
- package/lib/esm/features/errors/PanelErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/RowErrorBoundary.js +9 -0
- package/lib/esm/features/errors/RowErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/VertesiaErrorBoundary.js +15 -0
- package/lib/esm/features/errors/VertesiaErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/WidgetErrorBoundary.js +11 -0
- package/lib/esm/features/errors/WidgetErrorBoundary.js.map +1 -0
- package/lib/esm/features/errors/index.js +5 -0
- package/lib/esm/features/errors/index.js.map +1 -0
- package/lib/esm/features/facets/EnvironmentFacet.js +39 -0
- package/lib/esm/features/facets/EnvironmentFacet.js.map +1 -0
- package/lib/esm/features/facets/FacetsNav.js +8 -0
- package/lib/esm/features/facets/FacetsNav.js.map +1 -0
- package/lib/esm/features/facets/InteractionFacet.js +39 -0
- package/lib/esm/features/facets/InteractionFacet.js.map +1 -0
- package/lib/esm/features/facets/StringFacet.js +12 -0
- package/lib/esm/features/facets/StringFacet.js.map +1 -0
- package/lib/esm/features/facets/StringListFacet.js +11 -0
- package/lib/esm/features/facets/StringListFacet.js.map +1 -0
- package/lib/esm/features/facets/TypeFacet.js +42 -0
- package/lib/esm/features/facets/TypeFacet.js.map +1 -0
- package/lib/esm/features/facets/TypeOptions.js +19 -0
- package/lib/esm/features/facets/TypeOptions.js.map +1 -0
- package/lib/esm/features/facets/UserFacet.js +33 -0
- package/lib/esm/features/facets/UserFacet.js.map +1 -0
- package/lib/esm/features/facets/VFacetsNav.js +114 -0
- package/lib/esm/features/facets/VFacetsNav.js.map +1 -0
- package/lib/esm/features/facets/VStringFacet.js +17 -0
- package/lib/esm/features/facets/VStringFacet.js.map +1 -0
- package/lib/esm/features/facets/VTypeFacet.js +56 -0
- package/lib/esm/features/facets/VTypeFacet.js.map +1 -0
- package/lib/esm/features/facets/VUserFacet.js +31 -0
- package/lib/esm/features/facets/VUserFacet.js.map +1 -0
- package/lib/esm/features/facets/index.js +12 -0
- package/lib/esm/features/facets/index.js.map +1 -0
- package/lib/esm/features/facets/utils.js +7 -0
- package/lib/esm/features/facets/utils.js.map +1 -0
- package/lib/esm/features/index.js +9 -1
- package/lib/esm/features/index.js.map +1 -1
- package/lib/esm/features/layout/GenericPageNavHeader.js +11 -0
- package/lib/esm/features/layout/GenericPageNavHeader.js.map +1 -0
- package/lib/esm/features/layout/NotFoundView.js +5 -0
- package/lib/esm/features/layout/NotFoundView.js.map +1 -0
- package/lib/esm/features/layout/index.js +3 -0
- package/lib/esm/features/layout/index.js.map +1 -0
- package/lib/esm/features/magic-pdf/DownloadPopover.js +13 -0
- package/lib/esm/features/magic-pdf/DownloadPopover.js.map +1 -0
- package/lib/esm/features/magic-pdf/MagicPdfView.js +44 -0
- package/lib/esm/features/magic-pdf/MagicPdfView.js.map +1 -0
- package/lib/esm/features/magic-pdf/PageSlider.js +57 -0
- package/lib/esm/features/magic-pdf/PageSlider.js.map +1 -0
- package/lib/esm/features/magic-pdf/PdfPageProvider.js +133 -0
- package/lib/esm/features/magic-pdf/PdfPageProvider.js.map +1 -0
- package/lib/esm/features/magic-pdf/TextPageView.js +45 -0
- package/lib/esm/features/magic-pdf/TextPageView.js.map +1 -0
- package/lib/esm/features/magic-pdf/index.js +2 -0
- package/lib/esm/features/magic-pdf/index.js.map +1 -0
- package/lib/esm/features/magic-pdf/types.js +2 -0
- package/lib/esm/features/magic-pdf/types.js.map +1 -0
- package/lib/esm/features/magic-pdf/useResizeOnDrag.js +34 -0
- package/lib/esm/features/magic-pdf/useResizeOnDrag.js.map +1 -0
- package/lib/esm/features/store/collections/BrowseCollectionView.js +37 -0
- package/lib/esm/features/store/collections/BrowseCollectionView.js.map +1 -0
- package/lib/esm/features/store/collections/CollectionView.js +53 -0
- package/lib/esm/features/store/collections/CollectionView.js.map +1 -0
- package/lib/esm/features/store/collections/CollectionsTable.js +60 -0
- package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -0
- package/lib/esm/features/store/collections/CollectionsView.js +94 -0
- package/lib/esm/features/store/collections/CollectionsView.js.map +1 -0
- package/lib/esm/features/store/collections/EditCollectionView.js +161 -0
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -0
- package/lib/esm/features/store/collections/index.js +6 -0
- package/lib/esm/features/store/collections/index.js.map +1 -0
- package/lib/esm/features/store/index.js +4 -0
- package/lib/esm/features/store/index.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js +150 -0
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentSearchResults.js +123 -0
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentSelectionProvider.js +81 -0
- package/lib/esm/features/store/objects/DocumentSelectionProvider.js.map +1 -0
- package/lib/esm/features/store/objects/DocumentTable.js +278 -0
- package/lib/esm/features/store/objects/DocumentTable.js.map +1 -0
- package/lib/esm/features/store/objects/ExportPropertiesModal.js +31 -0
- package/lib/esm/features/store/objects/ExportPropertiesModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/ContentDispositionButton.js +31 -0
- package/lib/esm/features/store/objects/components/ContentDispositionButton.js.map +1 -0
- package/lib/esm/features/store/objects/components/ContentOverview.js +195 -0
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -0
- package/lib/esm/features/store/objects/components/DocumentIcon.js +28 -0
- package/lib/esm/features/store/objects/components/DocumentIcon.js.map +1 -0
- package/lib/esm/features/store/objects/components/DocumentInput.js +52 -0
- package/lib/esm/features/store/objects/components/DocumentInput.js.map +1 -0
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js +169 -0
- package/lib/esm/features/store/objects/components/PropertiesEditorModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js +45 -0
- package/lib/esm/features/store/objects/components/SaveVersionConfirmModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/SelectDocument.js +39 -0
- package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -0
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js +7 -0
- package/lib/esm/features/store/objects/components/SelectDocumentModal.js.map +1 -0
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js +85 -0
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -0
- package/lib/esm/features/store/objects/components/index.js +10 -0
- package/lib/esm/features/store/objects/components/index.js.map +1 -0
- package/lib/esm/features/store/objects/components/useDownloadObject.js +21 -0
- package/lib/esm/features/store/objects/components/useDownloadObject.js.map +1 -0
- package/lib/esm/features/store/objects/index.js +11 -0
- package/lib/esm/features/store/objects/index.js.map +1 -0
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js +74 -0
- package/lib/esm/features/store/objects/layout/DocumentTableColumn.js.map +1 -0
- package/lib/esm/features/store/objects/layout/documentLayout.js +16 -0
- package/lib/esm/features/store/objects/layout/documentLayout.js.map +1 -0
- package/lib/esm/features/store/objects/layout/index.js +3 -0
- package/lib/esm/features/store/objects/layout/index.js.map +1 -0
- package/lib/esm/features/store/objects/layout/renderers.js +128 -0
- package/lib/esm/features/store/objects/layout/renderers.js.map +1 -0
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js +150 -0
- package/lib/esm/features/store/objects/search/DocumentSearchContext.js.map +1 -0
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js +41 -0
- package/lib/esm/features/store/objects/search/DocumentSearchProvider.js.map +1 -0
- package/lib/esm/features/store/objects/search/index.js +3 -0
- package/lib/esm/features/store/objects/search/index.js.map +1 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js +149 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionContext.js.map +1 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js +2 -0
- package/lib/esm/features/store/objects/selection/ObjectsActionSpec.js.map +1 -0
- package/lib/esm/features/store/objects/selection/SelectionActions.js +75 -0
- package/lib/esm/features/store/objects/selection/SelectionActions.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +64 -0
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js +53 -0
- package/lib/esm/features/store/objects/selection/actions/ChangeTypeAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js +30 -0
- package/lib/esm/features/store/objects/selection/actions/ConfirmAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js +66 -0
- package/lib/esm/features/store/objects/selection/actions/DeleteObjectsAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js +106 -0
- package/lib/esm/features/store/objects/selection/actions/ExportPropertiesAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js +64 -0
- package/lib/esm/features/store/objects/selection/actions/RemoveFromCollectionAction.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js +72 -0
- package/lib/esm/features/store/objects/selection/actions/StartWorkflowComponent.js.map +1 -0
- package/lib/esm/features/store/objects/selection/actions/index.js +8 -0
- package/lib/esm/features/store/objects/selection/actions/index.js.map +1 -0
- package/lib/esm/features/store/objects/selection/index.js +5 -0
- package/lib/esm/features/store/objects/selection/index.js.map +1 -0
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +476 -0
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -0
- package/lib/esm/features/store/objects/upload/index.js +4 -0
- package/lib/esm/features/store/objects/upload/index.js.map +1 -0
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js +201 -0
- package/lib/esm/features/store/objects/upload/useSmartFileUploadProcessing.js.map +1 -0
- package/lib/esm/features/store/objects/upload/useUploadHandler.js +230 -0
- package/lib/esm/features/store/objects/upload/useUploadHandler.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypeView.js +158 -0
- package/lib/esm/features/store/types/ContentObjectTypeView.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js +82 -0
- package/lib/esm/features/store/types/ContentObjectTypesSearch.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypesTable.js +11 -0
- package/lib/esm/features/store/types/ContentObjectTypesTable.js.map +1 -0
- package/lib/esm/features/store/types/ContentObjectTypesView.js +55 -0
- package/lib/esm/features/store/types/ContentObjectTypesView.js.map +1 -0
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js +26 -0
- package/lib/esm/features/store/types/CreateOrUpdateTypeModal.js.map +1 -0
- package/lib/esm/features/store/types/ObjectSchemaEditor.js +89 -0
- package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -0
- package/lib/esm/features/store/types/SelectContentType.js +43 -0
- package/lib/esm/features/store/types/SelectContentType.js.map +1 -0
- package/lib/esm/features/store/types/SelectContentTypeModal.js +28 -0
- package/lib/esm/features/store/types/SelectContentTypeModal.js.map +1 -0
- package/lib/esm/features/store/types/TableLayoutEditor.js +78 -0
- package/lib/esm/features/store/types/TableLayoutEditor.js.map +1 -0
- package/lib/esm/features/store/types/index.js +11 -0
- package/lib/esm/features/store/types/index.js.map +1 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js +98 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchContext.js.map +1 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js +15 -0
- package/lib/esm/features/store/types/search/ObjectTypeSearchProvider.js.map +1 -0
- package/lib/esm/features/store/types/search/index.js +3 -0
- package/lib/esm/features/store/types/search/index.js.map +1 -0
- package/lib/esm/features/user/UserAvatar.js +18 -0
- package/lib/esm/features/user/UserAvatar.js.map +1 -0
- package/lib/esm/features/user/UserInfo.js +88 -0
- package/lib/esm/features/user/UserInfo.js.map +1 -0
- package/lib/esm/features/user/index.js +3 -0
- package/lib/esm/features/user/index.js.map +1 -0
- package/lib/esm/features/utils/index.js +4 -0
- package/lib/esm/features/utils/index.js.map +1 -0
- package/lib/esm/features/utils/mimeType.js +9 -0
- package/lib/esm/features/utils/mimeType.js.map +1 -0
- package/lib/esm/features/utils/rendition.js +47 -0
- package/lib/esm/features/utils/rendition.js.map +1 -0
- package/lib/esm/features/utils/text.js +10 -0
- package/lib/esm/features/utils/text.js.map +1 -0
- package/lib/esm/layout/FullHeightLayout.js +1 -1
- package/lib/esm/layout/FullHeightLayout.js.map +1 -1
- package/lib/esm/layout/Sidebar.js +12 -2
- package/lib/esm/layout/Sidebar.js.map +1 -1
- package/lib/esm/widgets/Progress.js +5 -0
- package/lib/esm/widgets/Progress.js.map +1 -0
- package/lib/esm/widgets/codemirror/CodeMirrorEditor.js +1 -1
- package/lib/esm/widgets/codemirror/CodeMirrorEditor.js.map +1 -1
- package/lib/esm/widgets/form/Form.js +2 -2
- package/lib/esm/widgets/form/Form.js.map +1 -1
- package/lib/esm/widgets/form/schema.js +11 -5
- package/lib/esm/widgets/form/schema.js.map +1 -1
- package/lib/esm/widgets/index.js +4 -0
- package/lib/esm/widgets/index.js.map +1 -1
- package/lib/esm/widgets/popover/Popover.js +73 -0
- package/lib/esm/widgets/popover/Popover.js.map +1 -0
- package/lib/esm/widgets/popover/context.js +7 -0
- package/lib/esm/widgets/popover/context.js.map +1 -0
- package/lib/esm/widgets/popover/index.js +3 -0
- package/lib/esm/widgets/popover/index.js.map +1 -0
- package/lib/esm/widgets/popover/slots.js +22 -0
- package/lib/esm/widgets/popover/slots.js.map +1 -0
- package/lib/esm/widgets/properties/PropertiesView.js +6 -0
- package/lib/esm/widgets/properties/PropertiesView.js.map +1 -0
- package/lib/esm/widgets/properties/index.js +2 -0
- package/lib/esm/widgets/properties/index.js.map +1 -0
- package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js +1 -2
- package/lib/esm/widgets/schema-editor/JSONSchemaEditorModal.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/Editable.js +9 -10
- package/lib/esm/widgets/schema-editor/editor/Editable.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js +1 -1
- package/lib/esm/widgets/schema-editor/editor/PropertyViewer.js.map +1 -1
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js +2 -2
- package/lib/esm/widgets/schema-editor/editor/SchemaEditor.js.map +1 -1
- package/lib/esm/widgets/upload/DropZone.js +162 -0
- package/lib/esm/widgets/upload/DropZone.js.map +1 -0
- package/lib/esm/widgets/upload/UploadResultCategory.js +19 -0
- package/lib/esm/widgets/upload/UploadResultCategory.js.map +1 -0
- package/lib/esm/widgets/upload/UploadSummary.js +30 -0
- package/lib/esm/widgets/upload/UploadSummary.js.map +1 -0
- package/lib/esm/widgets/upload/index.js +4 -0
- package/lib/esm/widgets/upload/index.js.map +1 -0
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/FormItem.d.ts +11 -0
- package/lib/types/core/components/index.d.ts +3 -3
- package/lib/types/core/components/shadcn/button.d.ts +13 -2
- package/lib/types/core/components/shadcn/command.d.ts +7 -7
- package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts +8 -0
- package/lib/types/core/components/shadcn/filters/comboBox.d.ts +5 -5
- package/lib/types/core/components/shadcn/filters/dateFilter.d.ts +3 -4
- package/lib/types/core/components/shadcn/filters/types.d.ts +7 -1
- package/lib/types/core/components/shadcn/input.d.ts +4 -4
- package/lib/types/core/components/shadcn/selectBox.d.ts +13 -4
- package/lib/types/core/components/table/index.d.ts +1 -0
- package/lib/types/core/index.d.ts +2 -1
- package/lib/types/core/utils/cn.d.ts +2 -0
- package/lib/types/core/utils/index.d.ts +1 -0
- package/lib/types/features/agent/PayloadBuilder.d.ts +53 -0
- package/lib/types/features/agent/chat/AnimatedThinkingDots.d.ts +37 -0
- package/lib/types/features/agent/chat/JumpingDots.d.ts +6 -0
- package/lib/types/features/agent/chat/ModernAgentConversation.d.ts +24 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/AllMessagesMixed.d.ts +21 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/Header.d.ts +18 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.d.ts +10 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.d.ts +15 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageInput.d.ts +12 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/MessageItem.d.ts +7 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/MessagesContainer.d.ts +9 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/PlanPanel.d.ts +8 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/SlideInPanel.d.ts +10 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/SlidingMessages.d.ts +7 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.d.ts +9 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/StackedMessages.d.ts +7 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/WorkstreamTabs.d.ts +21 -0
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +23 -0
- package/lib/types/features/agent/chat/SlidingThinkingIndicator.d.ts +17 -0
- package/lib/types/features/agent/chat/WaitingMessages.d.ts +1 -0
- package/lib/types/features/agent/chat/index.d.ts +4 -0
- package/lib/types/features/agent/index.d.ts +2 -0
- package/lib/types/features/errors/PanelErrorBoundary.d.ts +4 -0
- package/lib/types/features/errors/RowErrorBoundary.d.ts +7 -0
- package/lib/types/features/errors/VertesiaErrorBoundary.d.ts +11 -0
- package/lib/types/features/errors/WidgetErrorBoundary.d.ts +4 -0
- package/lib/types/features/errors/index.d.ts +4 -0
- package/lib/types/features/facets/EnvironmentFacet.d.ts +9 -0
- package/lib/types/features/facets/FacetsNav.d.ts +6 -0
- package/lib/types/features/facets/InteractionFacet.d.ts +9 -0
- package/lib/types/features/facets/StringFacet.d.ts +10 -0
- package/lib/types/features/facets/StringListFacet.d.ts +10 -0
- package/lib/types/features/facets/TypeFacet.d.ts +15 -0
- package/lib/types/features/facets/TypeOptions.d.ts +3 -0
- package/lib/types/features/facets/UserFacet.d.ts +11 -0
- package/lib/types/features/facets/VFacetsNav.d.ts +7 -0
- package/lib/types/features/facets/VStringFacet.d.ts +15 -0
- package/lib/types/features/facets/VTypeFacet.d.ts +8 -0
- package/lib/types/features/facets/VUserFacet.d.ts +9 -0
- package/lib/types/features/facets/index.d.ts +11 -0
- package/lib/types/features/facets/utils.d.ts +3 -0
- package/lib/types/features/index.d.ts +9 -1
- package/lib/types/features/layout/GenericPageNavHeader.d.ts +12 -0
- package/lib/types/features/layout/NotFoundView.d.ts +4 -0
- package/lib/types/features/layout/index.d.ts +2 -0
- package/lib/types/features/magic-pdf/DownloadPopover.d.ts +6 -0
- package/lib/types/features/magic-pdf/MagicPdfView.d.ts +6 -0
- package/lib/types/features/magic-pdf/PageSlider.d.ts +7 -0
- package/lib/types/features/magic-pdf/PdfPageProvider.d.ts +28 -0
- package/lib/types/features/magic-pdf/TextPageView.d.ts +7 -0
- package/lib/types/features/magic-pdf/index.d.ts +1 -0
- package/lib/types/features/magic-pdf/types.d.ts +1 -0
- package/lib/types/features/magic-pdf/useResizeOnDrag.d.ts +8 -0
- package/lib/types/features/store/collections/BrowseCollectionView.d.ts +6 -0
- package/lib/types/features/store/collections/CollectionView.d.ts +5 -0
- package/lib/types/features/store/collections/CollectionsTable.d.ts +5 -0
- package/lib/types/features/store/collections/CollectionsView.d.ts +10 -0
- package/lib/types/features/store/collections/EditCollectionView.d.ts +7 -0
- package/lib/types/features/store/collections/index.d.ts +5 -0
- package/lib/types/features/store/index.d.ts +3 -0
- package/lib/types/features/store/objects/DocumentPreviewPanel.d.ts +7 -0
- package/lib/types/features/store/objects/DocumentSearchResults.d.ts +19 -0
- package/lib/types/features/store/objects/DocumentSelectionProvider.d.ts +32 -0
- package/lib/types/features/store/objects/DocumentTable.d.ts +20 -0
- package/lib/types/features/store/objects/ExportPropertiesModal.d.ts +11 -0
- package/lib/types/features/store/objects/components/ContentDispositionButton.d.ts +8 -0
- package/lib/types/features/store/objects/components/ContentOverview.d.ts +7 -0
- package/lib/types/features/store/objects/components/DocumentIcon.d.ts +10 -0
- package/lib/types/features/store/objects/components/DocumentInput.d.ts +7 -0
- package/lib/types/features/store/objects/components/PropertiesEditorModal.d.ts +7 -0
- package/lib/types/features/store/objects/components/SaveVersionConfirmModal.d.ts +8 -0
- package/lib/types/features/store/objects/components/SelectDocument.d.ts +8 -0
- package/lib/types/features/store/objects/components/SelectDocumentModal.d.ts +8 -0
- package/lib/types/features/store/objects/components/VectorSearchWidget.d.ts +10 -0
- package/lib/types/features/store/objects/components/index.d.ts +9 -0
- package/lib/types/features/store/objects/components/useDownloadObject.d.ts +3 -0
- package/lib/types/features/store/objects/index.d.ts +10 -0
- package/lib/types/features/store/objects/layout/DocumentTableColumn.d.ts +16 -0
- package/lib/types/features/store/objects/layout/documentLayout.d.ts +17 -0
- package/lib/types/features/store/objects/layout/index.d.ts +2 -0
- package/lib/types/features/store/objects/layout/renderers.d.ts +2 -0
- package/lib/types/features/store/objects/search/DocumentSearchContext.d.ts +48 -0
- package/lib/types/features/store/objects/search/DocumentSearchProvider.d.ts +15 -0
- package/lib/types/features/store/objects/search/index.d.ts +2 -0
- package/lib/types/features/store/objects/selection/ObjectsActionContext.d.ts +25 -0
- package/lib/types/features/store/objects/selection/ObjectsActionSpec.d.ts +27 -0
- package/lib/types/features/store/objects/selection/SelectionActions.d.ts +4 -0
- package/lib/types/features/store/objects/selection/actions/AddToCollectionAction.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/ChangeTypeAction.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/ConfirmAction.d.ts +15 -0
- package/lib/types/features/store/objects/selection/actions/DeleteObjectsAction.d.ts +2 -0
- package/lib/types/features/store/objects/selection/actions/ExportPropertiesAction.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/RemoveFromCollectionAction.d.ts +2 -0
- package/lib/types/features/store/objects/selection/actions/StartWorkflowComponent.d.ts +3 -0
- package/lib/types/features/store/objects/selection/actions/index.d.ts +7 -0
- package/lib/types/features/store/objects/selection/index.d.ts +4 -0
- package/lib/types/features/store/objects/upload/DocumentUploadModal.d.ts +37 -0
- package/lib/types/features/store/objects/upload/index.d.ts +3 -0
- package/lib/types/features/store/objects/upload/useSmartFileUploadProcessing.d.ts +29 -0
- package/lib/types/features/store/objects/upload/useUploadHandler.d.ts +49 -0
- package/lib/types/features/store/types/ContentObjectTypeView.d.ts +5 -0
- package/lib/types/features/store/types/ContentObjectTypesSearch.d.ts +5 -0
- package/lib/types/features/store/types/ContentObjectTypesTable.d.ts +7 -0
- package/lib/types/features/store/types/ContentObjectTypesView.d.ts +8 -0
- package/lib/types/features/store/types/CreateOrUpdateTypeModal.d.ts +14 -0
- package/lib/types/features/store/types/ObjectSchemaEditor.d.ts +7 -0
- package/lib/types/features/store/types/SelectContentType.d.ts +10 -0
- package/lib/types/features/store/types/SelectContentTypeModal.d.ts +32 -0
- package/lib/types/features/store/types/TableLayoutEditor.d.ts +8 -0
- package/lib/types/features/store/types/index.d.ts +10 -0
- package/lib/types/features/store/types/search/ObjectTypeSearchContext.d.ts +35 -0
- package/lib/types/features/store/types/search/ObjectTypeSearchProvider.d.ts +10 -0
- package/lib/types/features/store/types/search/index.d.ts +2 -0
- package/lib/types/features/user/UserAvatar.d.ts +8 -0
- package/lib/types/features/user/UserInfo.d.ts +36 -0
- package/lib/types/features/user/index.d.ts +2 -0
- package/lib/types/features/utils/index.d.ts +3 -0
- package/lib/types/features/utils/mimeType.d.ts +4 -0
- package/lib/types/features/utils/rendition.d.ts +3 -0
- package/lib/types/features/utils/text.d.ts +2 -0
- package/lib/types/layout/Sidebar.d.ts +2 -1
- package/lib/types/widgets/Progress.d.ts +5 -0
- package/lib/types/widgets/form/schema.d.ts +4 -3
- package/lib/types/widgets/index.d.ts +4 -0
- package/lib/types/widgets/popover/Popover.d.ts +37 -0
- package/lib/types/widgets/popover/context.d.ts +7 -0
- package/lib/types/widgets/popover/index.d.ts +2 -0
- package/lib/types/widgets/popover/slots.d.ts +4 -0
- package/lib/types/widgets/properties/PropertiesView.d.ts +10 -0
- package/lib/types/widgets/properties/index.d.ts +1 -0
- package/lib/types/widgets/upload/DropZone.d.ts +40 -0
- package/lib/types/widgets/upload/UploadResultCategory.d.ts +25 -0
- package/lib/types/widgets/upload/UploadSummary.d.ts +37 -0
- package/lib/types/widgets/upload/index.d.ts +3 -0
- package/lib/vertesia-ui-core.js +1 -1
- package/lib/vertesia-ui-core.js.map +1 -1
- package/lib/vertesia-ui-features.js +1 -1
- package/lib/vertesia-ui-features.js.map +1 -1
- package/lib/vertesia-ui-layout.js +1 -1
- package/lib/vertesia-ui-layout.js.map +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-session.js.map +1 -1
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +13 -5
- package/src/core/components/FormItem.tsx +35 -0
- package/src/core/components/InputList.tsx +4 -3
- package/src/core/components/index.ts +3 -3
- package/src/core/components/shadcn/button.tsx +68 -8
- package/src/core/components/shadcn/dialog.tsx +3 -3
- package/src/core/components/shadcn/filters/DynamicLabel.tsx +45 -0
- package/src/core/components/shadcn/filters/comboBox.tsx +56 -52
- package/src/core/components/shadcn/filters/dateFilter.tsx +24 -25
- package/src/core/components/shadcn/filters/filterBar.tsx +53 -47
- package/src/core/components/shadcn/filters/filters.tsx +43 -30
- package/src/core/components/shadcn/filters/selectFilter.tsx +53 -34
- package/src/core/components/shadcn/filters/textFilter.tsx +6 -3
- package/src/core/components/shadcn/filters/types.ts +8 -1
- package/src/core/components/shadcn/input.tsx +5 -5
- package/src/core/components/shadcn/selectBox.tsx +138 -33
- package/src/core/components/styles.ts +1 -1
- package/src/core/components/table/index.tsx +8 -0
- package/src/core/index.ts +2 -1
- package/src/core/utils/cn.ts +6 -0
- package/src/core/utils/index.ts +1 -0
- package/src/features/agent/PayloadBuilder.tsx +208 -0
- package/src/features/agent/chat/AnimatedThinkingDots.tsx +350 -0
- package/src/features/agent/chat/JumpingDots.tsx +16 -0
- package/src/features/agent/chat/ModernAgentConversation.tsx +708 -0
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +246 -0
- package/src/features/agent/chat/ModernAgentOutput/Header.tsx +231 -0
- package/src/features/agent/chat/ModernAgentOutput/InlineSlideInPanel.tsx +66 -0
- package/src/features/agent/chat/ModernAgentOutput/InlineSlidingPlanPanel.tsx +282 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageInput.tsx +125 -0
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +562 -0
- package/src/features/agent/chat/ModernAgentOutput/MessagesContainer.tsx +51 -0
- package/src/features/agent/chat/ModernAgentOutput/PlanPanel.tsx +123 -0
- package/src/features/agent/chat/ModernAgentOutput/README-image-support.md +43 -0
- package/src/features/agent/chat/ModernAgentOutput/SlideInPanel.tsx +72 -0
- package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +96 -0
- package/src/features/agent/chat/ModernAgentOutput/SlidingPlanPanel.tsx +185 -0
- package/src/features/agent/chat/ModernAgentOutput/StackedMessages.tsx +33 -0
- package/src/features/agent/chat/ModernAgentOutput/WorkstreamTabs.tsx +167 -0
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +195 -0
- package/src/features/agent/chat/ModernAgentOutput/with-types.d.ts +15 -0
- package/src/features/agent/chat/SlidingThinkingIndicator.tsx +459 -0
- package/src/features/agent/chat/WaitingMessages.ts +66 -0
- package/src/features/agent/chat/index.ts +4 -0
- package/src/features/agent/index.ts +2 -0
- package/src/features/errors/PanelErrorBoundary.tsx +30 -0
- package/src/features/errors/RowErrorBoundary.tsx +28 -0
- package/src/features/errors/VertesiaErrorBoundary.tsx +28 -0
- package/src/features/errors/WidgetErrorBoundary.tsx +27 -0
- package/src/features/errors/index.ts +4 -0
- package/src/features/facets/EnvironmentFacet.tsx +53 -0
- package/src/features/facets/FacetsNav.tsx +19 -0
- package/src/features/facets/InteractionFacet.tsx +53 -0
- package/src/features/facets/StringFacet.tsx +23 -0
- package/src/features/facets/StringListFacet.tsx +22 -0
- package/src/features/facets/TypeFacet.tsx +59 -0
- package/src/features/facets/TypeOptions.tsx +22 -0
- package/src/features/facets/UserFacet.tsx +61 -0
- package/src/features/facets/VFacetsNav.tsx +139 -0
- package/src/features/facets/VStringFacet.tsx +34 -0
- package/src/features/facets/VTypeFacet.tsx +72 -0
- package/src/features/facets/VUserFacet.tsx +47 -0
- package/src/features/facets/index.ts +11 -0
- package/src/features/facets/utils.tsx +9 -0
- package/src/features/index.ts +9 -1
- package/src/features/layout/GenericPageNavHeader.tsx +48 -0
- package/src/features/layout/NotFoundView.tsx +11 -0
- package/src/features/layout/index.ts +2 -0
- package/src/features/magic-pdf/DownloadPopover.tsx +32 -0
- package/src/features/magic-pdf/MagicPdfView.tsx +102 -0
- package/src/features/magic-pdf/PageSlider.tsx +112 -0
- package/src/features/magic-pdf/PdfPageProvider.tsx +229 -0
- package/src/features/magic-pdf/TextPageView.tsx +65 -0
- package/src/features/magic-pdf/index.ts +1 -0
- package/src/features/magic-pdf/types.ts +1 -0
- package/src/features/magic-pdf/useResizeOnDrag.ts +42 -0
- package/src/features/store/collections/BrowseCollectionView.tsx +45 -0
- package/src/features/store/collections/CollectionView.tsx +94 -0
- package/src/features/store/collections/CollectionsTable.tsx +115 -0
- package/src/features/store/collections/CollectionsView.tsx +166 -0
- package/src/features/store/collections/EditCollectionView.tsx +253 -0
- package/src/features/store/collections/index.ts +5 -0
- package/src/features/store/index.ts +3 -0
- package/src/features/store/objects/DocumentPreviewPanel.tsx +417 -0
- package/src/features/store/objects/DocumentSearchResults.tsx +209 -0
- package/src/features/store/objects/DocumentSelectionProvider.tsx +99 -0
- package/src/features/store/objects/DocumentTable.tsx +409 -0
- package/src/features/store/objects/ExportPropertiesModal.tsx +89 -0
- package/src/features/store/objects/components/ContentDispositionButton.tsx +45 -0
- package/src/features/store/objects/components/ContentOverview.tsx +466 -0
- package/src/features/store/objects/components/DocumentIcon.tsx +87 -0
- package/src/features/store/objects/components/DocumentInput.tsx +90 -0
- package/src/features/store/objects/components/PropertiesEditorModal.tsx +253 -0
- package/src/features/store/objects/components/SaveVersionConfirmModal.tsx +136 -0
- package/src/features/store/objects/components/SelectDocument.tsx +69 -0
- package/src/features/store/objects/components/SelectDocumentModal.tsx +20 -0
- package/src/features/store/objects/components/VectorSearchWidget.tsx +115 -0
- package/src/features/store/objects/components/index.ts +9 -0
- package/src/features/store/objects/components/useDownloadObject.ts +24 -0
- package/src/features/store/objects/index.ts +10 -0
- package/src/features/store/objects/layout/DocumentTableColumn.tsx +84 -0
- package/src/features/store/objects/layout/documentLayout.tsx +69 -0
- package/src/features/store/objects/layout/index.ts +2 -0
- package/src/features/store/objects/layout/knowledge.md +238 -0
- package/src/features/store/objects/layout/renderers.tsx +139 -0
- package/src/features/store/objects/search/DocumentSearchContext.ts +181 -0
- package/src/features/store/objects/search/DocumentSearchProvider.tsx +54 -0
- package/src/features/store/objects/search/index.ts +2 -0
- package/src/features/store/objects/selection/ObjectsActionContext.tsx +196 -0
- package/src/features/store/objects/selection/ObjectsActionSpec.ts +31 -0
- package/src/features/store/objects/selection/SelectionActions.tsx +160 -0
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +114 -0
- package/src/features/store/objects/selection/actions/ChangeTypeAction.tsx +76 -0
- package/src/features/store/objects/selection/actions/ConfirmAction.tsx +46 -0
- package/src/features/store/objects/selection/actions/DeleteObjectsAction.tsx +77 -0
- package/src/features/store/objects/selection/actions/ExportPropertiesAction.tsx +117 -0
- package/src/features/store/objects/selection/actions/RemoveFromCollectionAction.tsx +77 -0
- package/src/features/store/objects/selection/actions/StartWorkflowComponent.tsx +122 -0
- package/src/features/store/objects/selection/actions/index.ts +7 -0
- package/src/features/store/objects/selection/index.ts +4 -0
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +970 -0
- package/src/features/store/objects/upload/index.ts +3 -0
- package/src/features/store/objects/upload/useSmartFileUploadProcessing.ts +250 -0
- package/src/features/store/objects/upload/useUploadHandler.ts +325 -0
- package/src/features/store/types/ContentObjectTypeView.tsx +244 -0
- package/src/features/store/types/ContentObjectTypesSearch.tsx +111 -0
- package/src/features/store/types/ContentObjectTypesTable.tsx +38 -0
- package/src/features/store/types/ContentObjectTypesView.tsx +71 -0
- package/src/features/store/types/CreateOrUpdateTypeModal.tsx +70 -0
- package/src/features/store/types/ObjectSchemaEditor.tsx +127 -0
- package/src/features/store/types/SelectContentType.tsx +88 -0
- package/src/features/store/types/SelectContentTypeModal.tsx +142 -0
- package/src/features/store/types/TableLayoutEditor.tsx +104 -0
- package/src/features/store/types/index.ts +10 -0
- package/src/features/store/types/search/ObjectTypeSearchContext.tsx +119 -0
- package/src/features/store/types/search/ObjectTypeSearchProvider.tsx +24 -0
- package/src/features/store/types/search/index.ts +2 -0
- package/src/features/user/UserAvatar.tsx +34 -0
- package/src/features/user/UserInfo.tsx +215 -0
- package/src/features/user/index.ts +2 -0
- package/src/features/utils/index.ts +3 -0
- package/src/features/utils/mimeType.ts +9 -0
- package/src/features/utils/rendition.ts +75 -0
- package/src/features/utils/text.ts +10 -0
- package/src/layout/FullHeightLayout.tsx +1 -1
- package/src/layout/Sidebar.tsx +12 -2
- package/src/widgets/Progress.tsx +10 -0
- package/src/widgets/codemirror/CodeMirrorEditor.tsx +1 -1
- package/src/widgets/form/Form.tsx +2 -2
- package/src/widgets/form/schema.ts +14 -7
- package/src/widgets/index.ts +5 -1
- package/src/widgets/popover/Popover.tsx +171 -0
- package/src/widgets/popover/context.ts +15 -0
- package/src/widgets/popover/index.ts +2 -0
- package/src/widgets/popover/slots.ts +24 -0
- package/src/widgets/properties/PropertiesView.tsx +26 -0
- package/src/widgets/properties/index.ts +1 -0
- package/src/widgets/schema-editor/JSONSchemaEditorModal.tsx +1 -2
- package/src/widgets/schema-editor/editor/Editable.tsx +12 -13
- package/src/widgets/schema-editor/editor/PropertyViewer.tsx +1 -1
- package/src/widgets/schema-editor/editor/SchemaEditor.tsx +4 -4
- package/src/widgets/upload/DropZone.tsx +257 -0
- package/src/widgets/upload/UploadResultCategory.tsx +81 -0
- package/src/widgets/upload/UploadSummary.tsx +116 -0
- package/src/widgets/upload/index.ts +3 -0
- package/lib/esm/code/index.js +0 -3
- package/lib/esm/code/index.js.map +0 -1
- package/lib/esm/core/components/Input.js +0 -16
- package/lib/esm/core/components/Input.js.map +0 -1
- package/lib/esm/form/index.js +0 -3
- package/lib/esm/form/index.js.map +0 -1
- package/lib/types/code/index.d.ts +0 -0
- package/lib/types/core/components/Input.d.ts +0 -8
- package/lib/types/form/index.d.ts +0 -0
- package/lib/vertesia-ui-code.js +0 -2
- package/lib/vertesia-ui-code.js.map +0 -1
- package/lib/vertesia-ui-form.js +0 -2
- package/lib/vertesia-ui-form.js.map +0 -1
- package/src/code/index.ts +0 -1
- package/src/core/components/Input.tsx +0 -43
- package/src/form/index.ts +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { VTooltip } from './shadcn/tooltip';
|
|
4
|
+
import { Info } from 'lucide-react';
|
|
5
|
+
export function FormItem({ description, required, label, className, direction = "column", children }) {
|
|
6
|
+
return (_jsxs("div", { className: clsx("flex w-full space-y-1", className, direction === "row" ? "flex-row justify-between" : "flex-col"), children: [_jsxs("div", { className: 'flex items-center gap-1', children: [_jsxs("label", { className: "text-sm font-medium mb-1", children: [label, required ? _jsx("span", { className: 'text-destructive -mt-4 ml-1', children: "*" }) : ""] }), description &&
|
|
7
|
+
_jsx("div", { className: 'mx-2 flex w-4 items-center', children: _jsx(VTooltip, { description: description, children: _jsx(Info, { className: "size-3 text-muted" }) }) })] }), children] }));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=FormItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormItem.js","sourceRoot":"","sources":["../../../../src/core/components/FormItem.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAGxB,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAUpC,MAAM,UAAU,QAAQ,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,GAAG,QAAQ,EAAE,QAAQ,EAAiB;IAC/G,OAAO,CACH,eAAK,SAAS,EAAE,IAAI,CAAC,uBAAuB,EAAE,SAAS,EAAE,SAAS,KAAK,KAAK,CAAC,CAAC,CAAC,0BAA0B,CAAC,CAAC,CAAC,UAAU,CAAC,aACnH,eAAK,SAAS,EAAC,yBAAyB,aACpC,iBAAO,SAAS,EAAC,0BAA0B,aACtC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,6BAA6B,kBAAS,CAAC,CAAC,CAAC,EAAE,IAC1E,EAEJ,WAAW;wBACX,cAAK,SAAS,EAAC,4BAA4B,YACvC,KAAC,QAAQ,IACL,WAAW,EAAE,WAAW,YACxB,KAAC,IAAI,IAAC,SAAS,EAAC,mBAAmB,GAAG,GAC/B,GACT,IAER,EACL,QAAQ,IACP,CACT,CAAC;AACN,CAAC"}
|
|
@@ -2,7 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Badge } from './Badge';
|
|
5
|
-
import {
|
|
5
|
+
import { Input } from './shadcn/input';
|
|
6
|
+
import { Styles } from './styles';
|
|
6
7
|
export function InputList({ value = [], onChange, className, delimiters = ", ", placeholder }) {
|
|
7
8
|
const [text, setText] = useState('');
|
|
8
9
|
const onBlur = (ev) => {
|
|
@@ -36,7 +37,7 @@ export function InputList({ value = [], onChange, className, delimiters = ", ",
|
|
|
36
37
|
onChange([...value]);
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
|
-
return (_jsxs("div", { className: clsx(className, 'w-full space-x-1 space-y-1
|
|
40
|
-
(value.map((v, index) => _jsx(Badge, { variant: "secondary", onClick: () => _onClick(index), style: { whiteSpace: 'nowrap' }, className: 'cursor-pointer', children: v }, index))), _jsx("div", { children: _jsx(
|
|
40
|
+
return (_jsxs("div", { className: clsx(className, 'w-full space-x-1 space-y-1 p-2', Styles.INPUT), children: [value && value.length > 0 &&
|
|
41
|
+
(value.map((v, index) => _jsx(Badge, { variant: "secondary", onClick: () => _onClick(index), style: { whiteSpace: 'nowrap' }, className: 'cursor-pointer', children: v }, index))), _jsx("div", { children: _jsx(Input, { clearable: false, className: 'placeholder:text-muted-foreground px-1', variant: 'unstyled', type: 'text', value: text, onBlur: onBlur, onKeyDown: onKeyDown, onChange: setText, placeholder: !value || value.length === 0 ? placeholder : '' }) })] }));
|
|
41
42
|
}
|
|
42
43
|
//# sourceMappingURL=InputList.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputList.js","sourceRoot":"","sources":["../../../../src/core/components/InputList.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"InputList.js","sourceRoot":"","sources":["../../../../src/core/components/InputList.tsx"],"names":[],"mappings":";AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUlC,MAAM,UAAU,SAAS,CAAC,EAAE,KAAK,GAAG,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,GAAG,IAAI,EAAE,WAAW,EAAkB;IACzG,MAAM,CAAC,IAAI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E;QAClC,IAAI,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC5B,KAAK,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;YACvB,QAAQ,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC;QACzB,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,CACH,eAAK,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,gCAAgC,EAAE,MAAM,CAAC,KAAK,CAAC,aAEvE,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;gBACzB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CACpB,KAAC,KAAK,IAAC,OAAO,EAAE,WAAW,EAAc,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,SAAS,EAAC,gBAAgB,YAC/H,CAAC,IAD4B,KAAK,CAE/B,CACX,CAAC,EAEN,wBACI,KAAC,KAAK,IACF,SAAS,EAAE,KAAK,EAChB,SAAS,EAAC,wCAAwC,EAClD,OAAO,EAAC,UAAU,EAClB,IAAI,EAAC,MAAM,EACX,KAAK,EAAE,IAAI,EACX,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,OAAO,EACjB,WAAW,EAAE,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,GAC9D,GACA,IACJ,CACT,CAAA;AACL,CAAC"}
|
|
@@ -5,12 +5,11 @@ export * from "./ComboBox.js";
|
|
|
5
5
|
export * from "./ConfirmModal.js";
|
|
6
6
|
export * from "./DeleteModal.js";
|
|
7
7
|
export * from "./Divider.js";
|
|
8
|
-
export * from "./SidePanel.js";
|
|
9
8
|
export * from "./Dropdown.js";
|
|
10
9
|
export * from "./DropdownList.js";
|
|
11
10
|
export * from "./EmptyCollection.js";
|
|
12
11
|
export * from "./FileUpload.js";
|
|
13
|
-
export * from "./
|
|
12
|
+
export * from "./FormItem.js";
|
|
14
13
|
export * from "./InputList.js";
|
|
15
14
|
export * from "./Link.js";
|
|
16
15
|
export * from "./MenuList.js";
|
|
@@ -23,6 +22,8 @@ export * from "./RadioGroup.js";
|
|
|
23
22
|
export * from "./SelectBox.js";
|
|
24
23
|
export * from "./SelectList.js";
|
|
25
24
|
export * from "./SelectStack.js";
|
|
25
|
+
export * from "./shadcn/index.js";
|
|
26
|
+
export * from "./SidePanel.js";
|
|
26
27
|
export * from "./Spinner.js";
|
|
27
28
|
export * from "./styles.js";
|
|
28
29
|
export * from "./Switch.js";
|
|
@@ -30,5 +31,4 @@ export * from "./table/index.js";
|
|
|
30
31
|
export * from "./tabs/index.js";
|
|
31
32
|
export * from "./Textarea.js";
|
|
32
33
|
export * from "./toast/index.js";
|
|
33
|
-
export * from "./shadcn/index.js";
|
|
34
34
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/components/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/components/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC"}
|
|
@@ -2,25 +2,25 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { Slot } from "@radix-ui/react-slot";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
|
-
import { VTooltip } from "
|
|
5
|
+
import { VTooltip } from "@vertesia/ui/core";
|
|
6
6
|
import { cn } from "../libs/utils";
|
|
7
|
-
import { Loader2 } from "lucide-react";
|
|
7
|
+
import { Check, CopyIcon, Loader2 } from "lucide-react";
|
|
8
8
|
import clsx from "clsx";
|
|
9
|
+
import { useState } from "react";
|
|
9
10
|
const buttonVariants = cva("hover:cursor-pointer inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0", {
|
|
10
11
|
variants: {
|
|
11
12
|
variant: {
|
|
12
13
|
destructive: "bg-destructive dark:bg-destructive/10 text-destructive ring-1 ring-inset ring-destructive-muted/50 dark:ring-destructive-muted/50 shadow-xs hover:bg-destructive/50",
|
|
13
14
|
outline: "border border-input bg-background shadow-xs hover:bg-muted ring-inset",
|
|
14
|
-
secondary: "bg-
|
|
15
|
+
secondary: "bg-primary/5 dark:bg-primary/10 text-primary shadow-xs hover:bg-primary/10 dark:hover:bg-primary/20 ring-inset",
|
|
15
16
|
ghost: "hover:bg-muted/50 dark:hover:bg-muted/20 ring-inset",
|
|
16
17
|
link: "text-white underline-offset-4 hover:underline ring-inset",
|
|
17
18
|
primary: "bg-primary text-white shadow-xs hover:bg-primary/90 ring-inset",
|
|
18
|
-
soft: "bg-primary/5 dark:bg-primary/10 text-primary shadow-xs hover:bg-primary/10 dark:hover:bg-primary/20 ring-inset",
|
|
19
19
|
unstyled: ""
|
|
20
20
|
},
|
|
21
21
|
size: {
|
|
22
22
|
xs: 'h-7 rounded px-2 py-1 text-xs gap-x-1',
|
|
23
|
-
sm: "h-8 rounded px-
|
|
23
|
+
sm: "h-8 rounded px-3 text-xs",
|
|
24
24
|
md: "h-9 rounded-md px-4 py-2",
|
|
25
25
|
lg: "h-10 rounded-md px-3",
|
|
26
26
|
xl: 'rounded-md px-3.5 py-2.5 text-sm gap-x-2',
|
|
@@ -34,12 +34,42 @@ const buttonVariants = cva("hover:cursor-pointer inline-flex items-center justif
|
|
|
34
34
|
});
|
|
35
35
|
const Button = React.forwardRef(({ className, variant, size, asChild = false, alt, isDisabled, isLoading, title, onClick, type, ...props }, ref) => {
|
|
36
36
|
const Comp = asChild ? Slot : "button";
|
|
37
|
-
const buttonElement = (_jsxs(Comp, { className: clsx(
|
|
37
|
+
const buttonElement = (_jsxs(Comp, { className: clsx(cn(buttonVariants({ variant, size })), className), disabled: isDisabled || isLoading || props.disabled, ref: ref, onClick: onClick, type: type, autoFocus: false, ...props, children: [isLoading && _jsx(Loader2, { className: "animate-spin" }), props.children] }));
|
|
38
38
|
if (alt || title) {
|
|
39
39
|
return (_jsx(VTooltip, { description: alt || title, asChild: true, className: "cursor-pointer", size: "xs", placement: "top", children: buttonElement }));
|
|
40
40
|
}
|
|
41
41
|
return buttonElement;
|
|
42
42
|
});
|
|
43
43
|
Button.displayName = "Button";
|
|
44
|
-
|
|
44
|
+
const CopyButton = React.forwardRef(({ size, content, toast, className, alt, ...props }, ref) => {
|
|
45
|
+
const [isCopied, setIsCopied] = useState(false);
|
|
46
|
+
const handleCopy = () => {
|
|
47
|
+
navigator.clipboard.writeText(content).then(() => {
|
|
48
|
+
setIsCopied(true);
|
|
49
|
+
setTimeout(() => setIsCopied(false), 2000);
|
|
50
|
+
if (!toast || !toast.toast) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
toast.toast({
|
|
54
|
+
status: "success",
|
|
55
|
+
title: toast.message || "Copied to clipboard",
|
|
56
|
+
duration: 2000,
|
|
57
|
+
});
|
|
58
|
+
}).catch((err) => {
|
|
59
|
+
console.error("Failed to copy text: ", err);
|
|
60
|
+
if (toast && toast.toast)
|
|
61
|
+
toast.toast({
|
|
62
|
+
status: "error",
|
|
63
|
+
title: "Failed to copy",
|
|
64
|
+
duration: 2000,
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
return (_jsx(Button, { ref: ref, className: cn(className), variant: "unstyled", size: size || "sm", onClick: handleCopy, ...props, alt: alt ?? "Copy", children: isCopied ?
|
|
69
|
+
_jsx(Check, { className: "text-success" })
|
|
70
|
+
:
|
|
71
|
+
_jsx(CopyIcon, { className: "size-4" }) }));
|
|
72
|
+
});
|
|
73
|
+
CopyButton.displayName = "CopyButton";
|
|
74
|
+
export { Button, CopyButton, buttonVariants };
|
|
45
75
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../../src/core/components/shadcn/button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../../../src/core/components/shadcn/button.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAC3C,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE5C,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAA;AAClC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhC,MAAM,cAAc,GAAG,GAAG,CACxB,8TAA8T,EAC9T;IACE,QAAQ,EAAE;QACR,OAAO,EAAE;YACP,WAAW,EACT,qKAAqK;YACvK,OAAO,EACL,uEAAuE;YACzE,SAAS,EACP,gHAAgH;YAClH,KAAK,EAAE,qDAAqD;YAC5D,IAAI,EAAE,0DAA0D;YAChE,OAAO,EACL,gEAAgE;YAClE,QAAQ,EACN,EAAE;SACL;QACD,IAAI,EAAE;YACJ,EAAE,EAAE,uCAAuC;YAC3C,EAAE,EAAE,0BAA0B;YAC9B,EAAE,EAAE,0BAA0B;YAC9B,EAAE,EAAE,sBAAsB;YAC1B,EAAE,EAAE,0CAA0C;YAC9C,IAAI,EAAE,sBAAsB;SAC7B;KACF;IACD,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,IAAI;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AQ,IAAC,SAAS,EAAC,QAAQ,GAAG,GAE1B,CACV,CAAA;AACH,CAAC,CACF,CAAA;AACD,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA;AAErC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -24,16 +24,16 @@ export function VModal({ className, children, isOpen, onClose, description = "Mo
|
|
|
24
24
|
if (!disableCloseOnClickOutside || open) {
|
|
25
25
|
handleOpenChange(open);
|
|
26
26
|
}
|
|
27
|
-
}, children: [allowOverflow && _jsx(DialogOverlay, { className: "z-50 fixed inset-0 bg-black/80" }), _jsx(VisuallyHidden, { children: _jsx(DialogDescription, { children: description }) }), _jsxs(DialogContent, { className: cn("min-h-20 p-
|
|
27
|
+
}, children: [allowOverflow && _jsx(DialogOverlay, { className: "z-50 fixed inset-0 bg-black/80" }), _jsx(VisuallyHidden, { children: _jsx(DialogDescription, { children: description }) }), _jsxs(DialogContent, { className: cn("min-h-20 p-4", "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] border bg-background shadow-lg duration-200 sm:rounded-lg", className), children: [!noCloseButton && (_jsx(DialogClose, { onClick: () => handleOpenChange(false), asChild: true, autoFocus: false, children: _jsx(Button, { variant: "outline", alt: "Close", className: "top-4 right-4 absolute data-[state=open]:bg-accent opacity-70 hover:opacity-100 rounded-sm focus:outline-none focus:ring-2 focus:ring-ring ring-offset-background focus:ring-offset-2 data-[state=open]:text-muted-foreground transition-opacity disabled:pointer-events-none", children: _jsx(X, { className: "w-4 h-4" }) }) })), _jsx(ModalContextProvider, { children: children })] })] }));
|
|
28
28
|
}
|
|
29
29
|
export const VModalTitle = ({ children, show = true, className, ...props }) => {
|
|
30
30
|
if (!show) {
|
|
31
31
|
return (_jsx(VisuallyHidden, { children: _jsx(DialogTitle, { children: children }) }));
|
|
32
32
|
}
|
|
33
|
-
return (_jsx(DialogTitle, { className: cn("text-lg font-semibold leading-6 tracking-tight
|
|
33
|
+
return (_jsx(DialogTitle, { className: cn("text-lg font-semibold leading-6 tracking-tight py-2", className), ...props, children: children }));
|
|
34
34
|
};
|
|
35
35
|
export const VModalBody = ({ children, className, ...props }) => {
|
|
36
|
-
return (_jsx("div", { className: cn("text-sm
|
|
36
|
+
return (_jsx("div", { className: cn("text-sm max-h-[80vh] overflow-y-auto", className), ...props, children: children }));
|
|
37
37
|
};
|
|
38
38
|
export const VModalFooter = ({ align = "right", children, className, ...props }) => {
|
|
39
39
|
const alignClass = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../../../src/core/components/shadcn/dialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAYlD,MAAM,YAAY,GAAG,aAAa,CAAU,KAAK,CAAC,CAAA;AAClD,MAAM,UAAU,YAAY;IACxB,OAAO,CAAC,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC;AACtC,CAAC;AACD,MAAM,UAAU,oBAAoB,CAAC,EAAE,QAAQ,EAAiC;IAC5E,OAAO,KAAC,YAAY,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI,YAAG,QAAQ,GAAyB,CAAA;AACjF,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,EACnB,SAAS,EACT,QAAQ,EACR,MAAM,EACN,OAAO,EACP,WAAW,GAAG,mBAAmB,EACjC,aAAa,GAAG,KAAK,EACrB,aAAa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AK,EAChB,eAAe,EAAE,CAAC,KAAK,EAAE,EAAE;gBACvB,KAAK,CAAC,cAAc,EAAE,CAAC;YAC3B,CAAC,EACD,SAAS,EAAE,EAAE,CACT,yfAAyf,EACzf,SAAS,CACZ,KACG,KAAK,YAER,QAAQ,GACa,IACf,CAClB,CAAC,CAAC;AACH,aAAa,CAAC,WAAW,GAAG,eAAe,CAAC,OAAO,CAAC,WAAW,CAAC;AAEhE,MAAM,iBAAiB,GAAG,KAAK,CAAC,UAAU,CAGxC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,KAAC,eAAe,CAAC,WAAW,IACxB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CAAC,+BAA+B,EAAE,SAAS,CAAC,KACrD,KAAK,GACX,CACL,CAAC,CAAA;AACF,iBAAiB,CAAC,WAAW,GAAG,eAAe,CAAC,WAAW,CAAC,WAAW,CAAA;AAEvE,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAGlC,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CAChC,KAAC,eAAe,CAAC,KAAK,IAClB,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,EAAE,CACT,mDAAmD,EACnD,SAAS,CACZ,KACG,KAAK,GACX,CACL,CAAC,CAAA;AACF,WAAW,CAAC,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,WAAW,CAAA;AAG3D,OAAO,EACH,MAAM,EACN,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,WAAW,EACX,iBAAiB,GACpB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
export function DynamicLabel({ value, labelRenderer, fallbackLabel }) {
|
|
4
|
+
const [label, setLabel] = useState(fallbackLabel || value);
|
|
5
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (!labelRenderer) {
|
|
8
|
+
setLabel(fallbackLabel || value);
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
const renderLabel = async () => {
|
|
12
|
+
setIsLoading(true);
|
|
13
|
+
try {
|
|
14
|
+
const result = labelRenderer(value);
|
|
15
|
+
if (result instanceof Promise) {
|
|
16
|
+
const resolvedLabel = await result;
|
|
17
|
+
setLabel(resolvedLabel);
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
setLabel(result);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error('Error rendering label:', error);
|
|
25
|
+
setLabel(fallbackLabel || value);
|
|
26
|
+
}
|
|
27
|
+
finally {
|
|
28
|
+
setIsLoading(false);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
renderLabel();
|
|
32
|
+
}, [value, labelRenderer, fallbackLabel]);
|
|
33
|
+
if (isLoading) {
|
|
34
|
+
return _jsx("span", { className: "text-muted-foreground", children: "Loading..." });
|
|
35
|
+
}
|
|
36
|
+
return _jsx(_Fragment, { children: label });
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=DynamicLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DynamicLabel.js","sourceRoot":"","sources":["../../../../../../src/core/components/shadcn/filters/DynamicLabel.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAQnD,MAAM,UAAU,YAAY,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,EAAqB;IACrF,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAkB,aAAa,IAAI,KAAK,CAAC,CAAC;IAC5E,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElD,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,CAAC,aAAa,EAAE,CAAC;YACnB,QAAQ,CAAC,aAAa,IAAI,KAAK,CAAC,CAAC;YACjC,OAAO;QACT,CAAC;QAED,MAAM,WAAW,GAAG,KAAK,IAAI,EAAE;YAC7B,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;gBACpC,IAAI,MAAM,YAAY,OAAO,EAAE,CAAC;oBAC9B,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC;oBACnC,QAAQ,CAAC,aAAa,CAAC,CAAC;gBAC1B,CAAC;qBAAM,CAAC;oBACN,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACnB,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;gBAC/C,QAAQ,CAAC,aAAa,IAAI,KAAK,CAAC,CAAC;YACnC,CAAC;oBAAS,CAAC;gBACT,YAAY,CAAC,KAAK,CAAC,CAAC;YACtB,CAAC;QACH,CAAC,CAAC;QAEF,WAAW,EAAE,CAAC;IAChB,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC;IAE1C,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,eAAM,SAAS,EAAC,uBAAuB,2BAAkB,CAAC;IACnE,CAAC;IAED,OAAO,4BAAG,KAAK,GAAI,CAAC;AACtB,CAAC"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { useRef, useState } from "react";
|
|
3
3
|
// import { AnimatePresence, motion } from "motion/react";
|
|
4
|
+
import dayjs from "dayjs";
|
|
4
5
|
import { Calendar } from "../calendar";
|
|
5
|
-
import {
|
|
6
|
+
import { Button } from "../button";
|
|
6
7
|
import { Checkbox } from "../checkbox";
|
|
7
8
|
import { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from "../command";
|
|
9
|
+
import { Input } from "../input";
|
|
8
10
|
import { Popover, PopoverContent, PopoverTrigger } from "../popover";
|
|
9
11
|
import { AnimateChangeInHeight } from "./animateChangeInHeight";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
export const SelectionCombobox = ({ filterType, filterValues, setFilterValues, options, }) => {
|
|
12
|
+
import { DynamicLabel } from "./DynamicLabel";
|
|
13
|
+
export const SelectionCombobox = ({ filterType, filterValues, setFilterValues, options, labelRenderer, }) => {
|
|
13
14
|
const [open, setOpen] = useState(false);
|
|
14
15
|
const [commandInput, setCommandInput] = useState("");
|
|
15
16
|
const commandInputRef = useRef(null);
|
|
@@ -21,10 +22,10 @@ export const SelectionCombobox = ({ filterType, filterValues, setFilterValues, o
|
|
|
21
22
|
setCommandInput("");
|
|
22
23
|
}, 200);
|
|
23
24
|
}
|
|
24
|
-
}, children: [_jsx(PopoverTrigger, { className: "rounded-none
|
|
25
|
+
}, children: [_jsx(PopoverTrigger, { className: "rounded-none p-1 h-8 bg-muted hover:bg-muted/50 transition text-muted hover:text-primary shrink-0", children: _jsx("div", { className: "flex gap-1.5 items-center", children: filterValues?.length === 1 ? ((() => {
|
|
25
26
|
const option = filterValues[0];
|
|
26
|
-
return option.label;
|
|
27
|
-
})()) : (`${filterValues?.length} selected`) }) }), _jsx(PopoverContent, { className: "w-[
|
|
27
|
+
return (_jsx(DynamicLabel, { value: option.value || '', labelRenderer: labelRenderer, fallbackLabel: option.label }));
|
|
28
|
+
})()) : (`${filterValues?.length} selected`) }) }), _jsx(PopoverContent, { className: "w-[300px] p-0", children: _jsx(AnimateChangeInHeight, { children: _jsxs(Command, { children: [_jsx(CommandInput, { placeholder: filterType, className: "h-9", value: commandInput, onInputCapture: (e) => {
|
|
28
29
|
setCommandInput(e.currentTarget.value);
|
|
29
30
|
}, ref: commandInputRef }), _jsxs(CommandList, { children: [_jsx(CommandEmpty, { children: "No results found." }), _jsx(CommandGroup, { children: filterValues.map((value) => {
|
|
30
31
|
return (_jsxs(CommandItem, { className: "group flex gap-2 items-center", onSelect: () => {
|
|
@@ -33,34 +34,31 @@ export const SelectionCombobox = ({ filterType, filterValues, setFilterValues, o
|
|
|
33
34
|
setCommandInput("");
|
|
34
35
|
}, 200);
|
|
35
36
|
setOpen(false);
|
|
36
|
-
}, children: [_jsx(Checkbox, { checked: true }), value.label] }, value.value));
|
|
37
|
+
}, children: [_jsx(Checkbox, { checked: true }), _jsx(DynamicLabel, { value: value.value || '', labelRenderer: labelRenderer, fallbackLabel: value.label })] }, value.value));
|
|
37
38
|
}) }), nonSelectedFilterValues?.length > 0 && (_jsxs(_Fragment, { children: [_jsx(CommandSeparator, {}), _jsx(CommandGroup, { children: nonSelectedFilterValues
|
|
38
|
-
.filter(option => String(option.label).toLowerCase().includes(commandInput.toLowerCase()))
|
|
39
|
-
.map((filter) => (_jsxs(CommandItem, { className: "group flex gap-2 items-center", value: String(filter.label), onSelect: () => {
|
|
40
|
-
setFilterValues([...filterValues,
|
|
39
|
+
.filter(option => String(option.label || option.value).toLowerCase().includes(commandInput.toLowerCase()))
|
|
40
|
+
.map((filter) => (_jsxs(CommandItem, { className: "group flex gap-2 items-center", value: String(filter.label || filter.value), onSelect: () => {
|
|
41
|
+
setFilterValues([...filterValues, {
|
|
42
|
+
value: filter.value,
|
|
43
|
+
label: filter.label
|
|
44
|
+
}]);
|
|
41
45
|
setTimeout(() => {
|
|
42
46
|
setCommandInput("");
|
|
43
47
|
}, 200);
|
|
44
48
|
setOpen(false);
|
|
45
|
-
}, children: [_jsx(Checkbox, { checked: false, className: "opacity-0 group-data-[selected=true]:opacity-100" }), _jsx("span", { className: "text-
|
|
49
|
+
}, children: [_jsx(Checkbox, { checked: false, className: "opacity-0 group-data-[selected=true]:opacity-100" }), _jsx("span", { className: "text-muted", children: _jsx(DynamicLabel, { value: filter.value || '', labelRenderer: filter.labelRenderer || labelRenderer, fallbackLabel: filter.label }) })] }, filter.value))) })] }))] })] }) }) })] }));
|
|
46
50
|
};
|
|
47
51
|
export const DateCombobox = ({ filterValues, setFilterValues, }) => {
|
|
48
52
|
const [open, setOpen] = useState(false);
|
|
49
|
-
const [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
setDateRange(range);
|
|
55
|
-
if (range?.from) {
|
|
56
|
-
setFilterValues([
|
|
57
|
-
format(range.from, "yyyy-MM-dd"),
|
|
58
|
-
range.to ? format(range.to, "yyyy-MM-dd") : "",
|
|
59
|
-
]);
|
|
53
|
+
const selectedDate = filterValues[0] ? new Date(filterValues[0]) : undefined;
|
|
54
|
+
return (_jsxs(Popover, { _open: open, onOpenChange: setOpen, children: [_jsx(PopoverTrigger, { className: "rounded-none p-1 h-8 bg-muted hover:bg-muted/50 text-muted hover:text-primary shrink-0 transition", children: _jsx("div", { className: "flex gap-1.5 items-center", children: selectedDate ? (dayjs(selectedDate).format("MMM D, YYYY")) : (_jsx("span", { children: "Pick a date" })) }) }), _jsx(PopoverContent, { className: "w-auto p-0", align: "start", children: _jsx(Calendar, { mode: "single", className: "p-0", defaultMonth: selectedDate, selected: selectedDate, onSelect: (date) => {
|
|
55
|
+
if (date) {
|
|
56
|
+
setFilterValues([dayjs(date).format("YYYY-MM-DD")]);
|
|
57
|
+
setOpen(false);
|
|
60
58
|
}
|
|
61
|
-
}
|
|
59
|
+
} }) })] }));
|
|
62
60
|
};
|
|
63
|
-
export const TextCombobox = ({ filterValue, setFilterValue, }) => {
|
|
61
|
+
export const TextCombobox = ({ filterType, filterValue, setFilterValue, }) => {
|
|
64
62
|
const [open, setOpen] = useState(false);
|
|
65
63
|
const [inputValue, setInputValue] = useState(filterValue);
|
|
66
64
|
const handleKeyDown = (event) => {
|
|
@@ -74,7 +72,7 @@ export const TextCombobox = ({ filterValue, setFilterValue, }) => {
|
|
|
74
72
|
if (!open && inputValue !== filterValue) {
|
|
75
73
|
setInputValue(filterValue);
|
|
76
74
|
}
|
|
77
|
-
}, children: [_jsx(PopoverTrigger, { className: "rounded-none
|
|
75
|
+
}, children: [_jsx(PopoverTrigger, { className: "rounded-none p-1 h-8 bg-muted hover:bg-muted/50 text-muted hover:text-primary shrink-0 transition", children: _jsx("div", { className: "flex gap-1.5 items-center", children: filterValue || "Enter text..." }) }), _jsx(PopoverContent, { className: "w-[300px] p-3", children: _jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("div", { className: "flex items-center p-1.5 text-xs text-muted", children: _jsx("span", { children: filterType }) }), _jsx(Input, { autoFocus: true, type: "text", size: "sm", value: inputValue, onChange: setInputValue, onKeyDown: handleKeyDown, placeholder: "Enter text..." }), _jsx(Button, { size: "sm", variant: "outline", onClick: () => {
|
|
78
76
|
setFilterValue(inputValue);
|
|
79
77
|
setOpen(false);
|
|
80
78
|
}, children: "Apply" })] }) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comboBox.js","sourceRoot":"","sources":["../../../../../../src/core/components/shadcn/filters/comboBox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzC,0DAA0D;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"comboBox.js","sourceRoot":"","sources":["../../../../../../src/core/components/shadcn/filters/comboBox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzC,0DAA0D;AAC1D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,O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SAAS,EAC5B,OAAO,EAAE,GAAG,EAAE;gCACV,cAAc,CAAC,UAAU,CAAC,CAAC;gCAC3B,OAAO,CAAC,KAAK,CAAC,CAAC;4BACnB,CAAC,sBAGI,IACP,GACO,IACX,CACb,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import dayjs from "dayjs";
|
|
2
3
|
import { Calendar } from "../calendar";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (range?.from && range?.to) {
|
|
4
|
+
export default function DateFilter({ selectedView, selectedDate, setSelectedDate, setFilters, filters, handleClose, filterGroups, }) {
|
|
5
|
+
const handleDateSelect = (date) => {
|
|
6
|
+
setSelectedDate(date);
|
|
7
|
+
if (date) {
|
|
8
8
|
const selectedGroup = filterGroups.find(g => g.name === selectedView);
|
|
9
|
+
// Set date to start of day (00:00)
|
|
10
|
+
const selectedDateStart = new Date(date);
|
|
11
|
+
selectedDateStart.setHours(0, 0, 0, 0);
|
|
9
12
|
setFilters([
|
|
10
13
|
...filters,
|
|
11
14
|
{
|
|
12
15
|
name: selectedView || "",
|
|
16
|
+
placeholder: selectedGroup?.placeholder,
|
|
13
17
|
value: [
|
|
14
18
|
{
|
|
15
|
-
value:
|
|
16
|
-
label: format(
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
value: format(range.to, "yyyy-MM-dd"),
|
|
20
|
-
label: format(range.to, "LLL dd, y")
|
|
19
|
+
value: selectedDateStart.toISOString(),
|
|
20
|
+
label: dayjs(selectedDateStart).format("LLL dd, y"),
|
|
21
21
|
}
|
|
22
22
|
],
|
|
23
23
|
type: selectedGroup?.type || "date",
|
|
@@ -26,6 +26,6 @@ export default function DateFilter({ selectedView, dateRange, setDateRange, setF
|
|
|
26
26
|
handleClose();
|
|
27
27
|
}
|
|
28
28
|
};
|
|
29
|
-
return (_jsx("div", { className: "p-2", children: _jsx(Calendar, {
|
|
29
|
+
return (_jsx("div", { className: "p-2", children: _jsx(Calendar, { mode: "single", defaultMonth: selectedDate, selected: selectedDate, onSelect: handleDateSelect, size: "sm" }) }));
|
|
30
30
|
}
|
|
31
31
|
//# sourceMappingURL=dateFilter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateFilter.js","sourceRoot":"","sources":["../../../../../../src/core/components/shadcn/filters/dateFilter.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"dateFilter.js","sourceRoot":"","sources":["../../../../../../src/core/components/shadcn/filters/dateFilter.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAavC,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,UAAU,EACV,OAAO,EACP,WAAW,EACX,YAAY,GACI;IAChB,MAAM,gBAAgB,GAAG,CAAC,IAAsB,EAAE,EAAE;QAClD,eAAe,CAAC,IAAI,CAAC,CAAC;QACtB,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC,CAAC;YAEtE,mCAAmC;YACnC,MAAM,iBAAiB,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,CAAC;YACzC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;YAEvC,UAAU,CAAC;gBACT,GAAG,OAAO;gBACV;oBACE,IAAI,EAAE,YAAY,IAAI,EAAE;oBACxB,WAAW,EAAE,aAAa,EAAE,WAAW;oBACvC,KAAK,EAAE;wBACL;4BACE,KAAK,EAAE,iBAAiB,CAAC,WAAW,EAAE;4BACtC,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;yBACpD;qBACF;oBACD,IAAI,EAAE,aAAa,EAAE,IAAI,IAAI,MAAM;iBAC1B;aACZ,CAAC,CAAC;YAEG,WAAW,EAAE,CAAC;QAClB,CAAC;IACL,CAAC,CAAC;IAEJ,OAAO,CACL,cAAK,SAAS,EAAC,KAAK,YAClB,KAAC,QAAQ,IACP,IAAI,EAAC,QAAQ,EACb,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,YAAY,EACtB,QAAQ,EAAE,gBAAgB,EAC1B,IAAI,EAAC,IAAI,GACT,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -12,7 +12,7 @@ export function FilterBar({ filters, setFilters, filterGroups }) {
|
|
|
12
12
|
const [selectedView, setSelectedView] = React.useState(null);
|
|
13
13
|
const [commandInput, setCommandInput] = React.useState("");
|
|
14
14
|
const commandInputRef = React.useRef(null);
|
|
15
|
-
const [
|
|
15
|
+
const [selectedDate, setSelectedDate] = React.useState();
|
|
16
16
|
const [textValue, setTextValue] = React.useState("");
|
|
17
17
|
const handleSelect = (groupName) => {
|
|
18
18
|
setSelectedView(groupName);
|
|
@@ -42,7 +42,7 @@ export function FilterBar({ filters, setFilters, filterGroups }) {
|
|
|
42
42
|
setTimeout(() => {
|
|
43
43
|
setSelectedView(null);
|
|
44
44
|
setCommandInput("");
|
|
45
|
-
|
|
45
|
+
setSelectedDate(undefined);
|
|
46
46
|
}, 200);
|
|
47
47
|
};
|
|
48
48
|
const handleOpen = (open) => {
|
|
@@ -64,7 +64,7 @@ export function FilterBar({ filters, setFilters, filterGroups }) {
|
|
|
64
64
|
const selectedGroupType = filterGroups.find(g => g.name === selectedView)?.type;
|
|
65
65
|
switch (selectedGroupType) {
|
|
66
66
|
case "date":
|
|
67
|
-
return (_jsx(DateFilter, { selectedView: selectedView,
|
|
67
|
+
return (_jsx(DateFilter, { selectedView: selectedView, selectedDate: selectedDate, setSelectedDate: setSelectedDate, setFilters: setFilters, filters: filters, handleClose: handleClose, filterGroups: filterGroups }));
|
|
68
68
|
case "text":
|
|
69
69
|
return (_jsx(TextFilter, { selectedView: selectedView, textValue: textValue, setTextValue: setTextValue, setFilters: setFilters, handleClose: handleClose, filterGroups: filterGroups }));
|
|
70
70
|
default:
|
|
@@ -75,22 +75,16 @@ export function FilterBar({ filters, setFilters, filterGroups }) {
|
|
|
75
75
|
const searchParams = url.searchParams;
|
|
76
76
|
useEffect(() => {
|
|
77
77
|
try {
|
|
78
|
-
const urlSafeFilters = filters.map(filter => {
|
|
79
|
-
const safeValue = Array.isArray(filter.value)
|
|
80
|
-
? filter.value.map(item => ({
|
|
81
|
-
value: item.value
|
|
82
|
-
}))
|
|
83
|
-
: filter.value;
|
|
84
|
-
return {
|
|
85
|
-
name: filter.name,
|
|
86
|
-
type: filter.type,
|
|
87
|
-
value: safeValue,
|
|
88
|
-
placeholder: filter.placeholder
|
|
89
|
-
};
|
|
90
|
-
});
|
|
91
78
|
const params = new URLSearchParams(searchParams.toString());
|
|
92
79
|
if (filters.length > 0) {
|
|
93
|
-
|
|
80
|
+
// Convert filters to simple format with URL-safe encoding: filterName:value,value;filterName2:value
|
|
81
|
+
const filterString = filters.map(filter => {
|
|
82
|
+
const values = Array.isArray(filter.value)
|
|
83
|
+
? filter.value.map(item => encodeURIComponent(item.value || '')).join(',')
|
|
84
|
+
: encodeURIComponent(filter.value || '');
|
|
85
|
+
return `${encodeURIComponent(filter.name)}:${values}`;
|
|
86
|
+
}).join(';');
|
|
87
|
+
params.set('filters', filterString);
|
|
94
88
|
}
|
|
95
89
|
else {
|
|
96
90
|
params.delete('filters');
|
|
@@ -106,34 +100,53 @@ export function FilterBar({ filters, setFilters, filterGroups }) {
|
|
|
106
100
|
const filtersParam = searchParams.get('filters');
|
|
107
101
|
if (filtersParam) {
|
|
108
102
|
try {
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
103
|
+
// Parse simple format with URL-safe decoding: filterName:value,value;filterName2:value
|
|
104
|
+
const filterPairs = filtersParam.split(';');
|
|
105
|
+
const parsedFilters = filterPairs.map(pair => {
|
|
106
|
+
const [encodedName, valuesString] = pair.split(':');
|
|
107
|
+
const name = decodeURIComponent(encodedName);
|
|
108
|
+
const values = valuesString.split(',').map(encodedValue => decodeURIComponent(encodedValue));
|
|
109
|
+
const group = filterGroups.find(g => g.name === name);
|
|
110
|
+
console.log("group", group);
|
|
111
|
+
const filterOptions = values.map(value => {
|
|
112
|
+
if (group?.type === 'text') {
|
|
113
|
+
return { value, label: value };
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
// Try to find option with label, or use labelRenderer, or fallback to value
|
|
117
|
+
const matchingOption = group?.options?.find(opt => opt.value === value);
|
|
118
|
+
let label = value;
|
|
119
|
+
if (matchingOption?.label) {
|
|
120
|
+
label = String(matchingOption.label);
|
|
121
|
+
}
|
|
122
|
+
else if (matchingOption?.labelRenderer) {
|
|
123
|
+
label = String(matchingOption.labelRenderer(value));
|
|
124
|
+
}
|
|
125
|
+
else if (group?.labelRenderer) {
|
|
126
|
+
label = String(group.labelRenderer(value));
|
|
127
|
+
}
|
|
116
128
|
return {
|
|
117
|
-
value
|
|
118
|
-
label
|
|
129
|
+
value,
|
|
130
|
+
label
|
|
119
131
|
};
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
console.log("valuesWithLabels", filterOptions);
|
|
135
|
+
return {
|
|
136
|
+
name,
|
|
137
|
+
type: group?.type || 'select',
|
|
138
|
+
placeholder: group?.placeholder,
|
|
139
|
+
value: filterOptions
|
|
140
|
+
};
|
|
128
141
|
});
|
|
129
|
-
setFilters(
|
|
142
|
+
setFilters(parsedFilters);
|
|
130
143
|
}
|
|
131
144
|
catch (error) {
|
|
132
145
|
console.error("Failed to parse filters from URL:", error);
|
|
133
146
|
}
|
|
134
147
|
}
|
|
135
148
|
}, []);
|
|
136
|
-
return (_jsxs("div", { className: "flex gap-2 flex-wrap justify-start w-full items-center", children: [_jsx("div", { className: "flex gap-2 items-center", children: _jsxs(Popover, { _open: open, onOpenChange: handleOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", role: "combobox", "aria-expanded": open, size: "md", className: cn("transition group flex gap-1.5"), children: [_jsx(ListFilter, { className: "size-4 shrink-0 transition-all text-muted" }), "Filter"] }) }), _jsx(PopoverContent, { className: "w-[
|
|
149
|
+
return (_jsxs("div", { className: "flex gap-2 flex-wrap justify-start w-full items-center", children: [_jsx("div", { className: "flex gap-2 items-center", children: _jsxs(Popover, { _open: open, onOpenChange: handleOpen, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsxs(Button, { variant: "ghost", role: "combobox", "aria-expanded": open, size: "md", className: cn("transition group flex gap-1.5"), children: [_jsx(ListFilter, { className: "size-4 shrink-0 transition-all text-muted" }), "Filter"] }) }), _jsx(PopoverContent, { className: "w-[300px] p-0", align: "start", children: _jsxs(Command, { children: [filterGroups.find(group => group.name === selectedView)?.type === "select" ? (_jsx(CommandInput, { placeholder: selectedView ? `Filter by ${selectedView}` : "Filter...", className: "h-9 ring-0", value: commandInput, onValueChange: (value) => {
|
|
137
150
|
setCommandInput(value);
|
|
138
151
|
}, ref: commandInputRef, autoFocus: true })) : null, _jsx(CommandList, { className: "max-h-[300px] overflow-y-auto", children: _jsx(CommandGroup, { children: !selectedView ? getAvailableFilterGroups() : renderFilterOptions() }) })] }) })] }) }), _jsx(Filters, { filters: filters, setFilters: setFilters, filterGroups: filterGroups }), filters.filter((filter) => filter.value?.length > 0).length > 0 && _jsx(ButtonClearFilter, {})] }));
|
|
139
152
|
}
|