@vertesia/ui 0.67.0 → 0.69.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/Badge.js +1 -1
- package/lib/esm/core/components/Badge.js.map +1 -1
- package/lib/esm/core/components/FormItem.js +2 -2
- package/lib/esm/core/components/FormItem.js.map +1 -1
- package/lib/esm/core/components/InputList.js +2 -2
- package/lib/esm/core/components/InputList.js.map +1 -1
- package/lib/esm/core/components/shadcn/checkbox.js +1 -1
- package/lib/esm/core/components/shadcn/checkbox.js.map +1 -1
- package/lib/esm/core/components/shadcn/command.js +1 -1
- package/lib/esm/core/components/shadcn/command.js.map +1 -1
- package/lib/esm/core/components/shadcn/dialog.js +6 -6
- package/lib/esm/core/components/shadcn/dialog.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/DynamicLabel.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js +129 -0
- package/lib/esm/core/components/shadcn/filters/comboBox/DateCombobox.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js +46 -0
- package/lib/esm/core/components/shadcn/filters/comboBox/SelectCombobox.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js +23 -0
- package/lib/esm/core/components/shadcn/filters/comboBox/StringListCombobox.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/comboBox/TextCombobox.js +28 -0
- package/lib/esm/core/components/shadcn/filters/comboBox/TextCombobox.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/comboBox/comboBox.js +5 -0
- package/lib/esm/core/components/shadcn/filters/comboBox/comboBox.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/filter/SelectFilter.js +101 -0
- package/lib/esm/core/components/shadcn/filters/filter/SelectFilter.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/{stringListFilter.js → filter/StringListFilter.js} +3 -3
- package/lib/esm/core/components/shadcn/filters/filter/StringListFilter.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/{textFilter.js → filter/TextFilter.js} +4 -4
- package/lib/esm/core/components/shadcn/filters/filter/TextFilter.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js +161 -0
- package/lib/esm/core/components/shadcn/filters/filter/dateFilter.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/filter-styles.js +88 -0
- package/lib/esm/core/components/shadcn/filters/filter-styles.js.map +1 -0
- package/lib/esm/core/components/shadcn/filters/filterBar.js +128 -87
- package/lib/esm/core/components/shadcn/filters/filterBar.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/filters.js +7 -6
- package/lib/esm/core/components/shadcn/filters/filters.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/index.js +1 -1
- package/lib/esm/core/components/shadcn/filters/index.js.map +1 -1
- package/lib/esm/core/components/shadcn/filters/types.js.map +1 -1
- package/lib/esm/core/components/toast/NotificationPanel.js +24 -18
- package/lib/esm/core/components/toast/NotificationPanel.js.map +1 -1
- package/lib/esm/features/agent/PayloadBuilder.js +47 -27
- package/lib/esm/features/agent/PayloadBuilder.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentConversation.js +9 -3
- package/lib/esm/features/agent/chat/ModernAgentConversation.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js +7 -6
- package/lib/esm/features/agent/chat/ModernAgentOutput/AllMessagesMixed.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js +12 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/MessageItem.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js +2 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/SlidingMessages.js.map +1 -1
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js +10 -4
- package/lib/esm/features/agent/chat/ModernAgentOutput/utils.js.map +1 -1
- package/lib/esm/features/facets/DocumentsFacetsNav.js +133 -0
- package/lib/esm/features/facets/DocumentsFacetsNav.js.map +1 -0
- package/lib/esm/features/facets/RunsFacetsNav.js +125 -0
- package/lib/esm/features/facets/RunsFacetsNav.js.map +1 -0
- package/lib/esm/features/facets/VFacetsNav.js +4 -113
- package/lib/esm/features/facets/VFacetsNav.js.map +1 -1
- package/lib/esm/features/facets/VStringFacet.js +6 -4
- package/lib/esm/features/facets/VStringFacet.js.map +1 -1
- package/lib/esm/features/facets/VTypeFacet.js +4 -5
- package/lib/esm/features/facets/VTypeFacet.js.map +1 -1
- package/lib/esm/features/facets/VUserFacet.js +1 -1
- package/lib/esm/features/facets/VUserFacet.js.map +1 -1
- package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js +98 -0
- package/lib/esm/features/facets/WorkflowExecutionsFacetsNav.js.map +1 -0
- package/lib/esm/features/facets/index.js +3 -2
- package/lib/esm/features/facets/index.js.map +1 -1
- package/lib/esm/features/store/collections/CollectionsTable.js +1 -1
- package/lib/esm/features/store/collections/CollectionsTable.js.map +1 -1
- package/lib/esm/features/store/collections/CreateCollection.js +10 -9
- package/lib/esm/features/store/collections/CreateCollection.js.map +1 -1
- package/lib/esm/features/store/collections/EditCollectionView.js +10 -9
- package/lib/esm/features/store/collections/EditCollectionView.js.map +1 -1
- package/lib/esm/features/store/collections/SelectCollection.js +1 -1
- package/lib/esm/features/store/collections/SelectCollection.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js +0 -1
- package/lib/esm/features/store/objects/DocumentPreviewPanel.js.map +1 -1
- package/lib/esm/features/store/objects/DocumentSearchResults.js +37 -2
- package/lib/esm/features/store/objects/DocumentSearchResults.js.map +1 -1
- package/lib/esm/features/store/objects/components/ContentOverview.js +0 -2
- package/lib/esm/features/store/objects/components/ContentOverview.js.map +1 -1
- package/lib/esm/features/store/objects/components/SelectDocument.js +2 -2
- package/lib/esm/features/store/objects/components/SelectDocument.js.map +1 -1
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js +1 -1
- package/lib/esm/features/store/objects/components/VectorSearchWidget.js.map +1 -1
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js +16 -4
- package/lib/esm/features/store/objects/selection/actions/AddToCollectionAction.js.map +1 -1
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js +72 -37
- package/lib/esm/features/store/objects/upload/DocumentUploadModal.js.map +1 -1
- package/lib/esm/features/store/types/ObjectSchemaEditor.js +15 -0
- package/lib/esm/features/store/types/ObjectSchemaEditor.js.map +1 -1
- package/lib/esm/features/user/UserInfo.js +8 -8
- package/lib/esm/features/user/UserInfo.js.map +1 -1
- package/lib/esm/router/HistoryNavigator.js +2 -2
- package/lib/esm/router/HistoryNavigator.js.map +1 -1
- package/lib/esm/shell/SplashScreen.js +19 -0
- package/lib/esm/shell/SplashScreen.js.map +1 -0
- package/lib/esm/shell/VertesiaShell.js +10 -0
- package/lib/esm/shell/VertesiaShell.js.map +1 -0
- package/lib/esm/shell/index.js +7 -0
- package/lib/esm/shell/index.js.map +1 -0
- package/lib/esm/shell/login/EnterpriseSigninButton.js +81 -0
- package/lib/esm/shell/login/EnterpriseSigninButton.js.map +1 -0
- package/lib/esm/shell/login/GitHubSignInButton.js +24 -0
- package/lib/esm/shell/login/GitHubSignInButton.js.map +1 -0
- package/lib/esm/shell/login/GoogleSignInButton.js +25 -0
- package/lib/esm/shell/login/GoogleSignInButton.js.map +1 -0
- package/lib/esm/shell/login/InviteAcceptModal.js +45 -0
- package/lib/esm/shell/login/InviteAcceptModal.js.map +1 -0
- package/lib/esm/shell/login/MicrosoftSigninButton.js +19 -0
- package/lib/esm/shell/login/MicrosoftSigninButton.js.map +1 -0
- package/lib/esm/shell/login/PreviewIcon.js +23 -0
- package/lib/esm/shell/login/PreviewIcon.js.map +1 -0
- package/lib/esm/shell/login/SignInModal.js +9 -0
- package/lib/esm/shell/login/SignInModal.js.map +1 -0
- package/lib/esm/shell/login/SigninScreen.js +64 -0
- package/lib/esm/shell/login/SigninScreen.js.map +1 -0
- package/lib/esm/shell/login/SignupForm.js +91 -0
- package/lib/esm/shell/login/SignupForm.js.map +1 -0
- package/lib/esm/shell/login/TerminalLogin.js +179 -0
- package/lib/esm/shell/login/TerminalLogin.js.map +1 -0
- package/lib/esm/shell/login/UserInfo.js +40 -0
- package/lib/esm/shell/login/UserInfo.js.map +1 -0
- package/lib/esm/shell/login/UserSessionMenu.js +31 -0
- package/lib/esm/shell/login/UserSessionMenu.js.map +1 -0
- package/lib/esm/shell/utils.js +6 -0
- package/lib/esm/shell/utils.js.map +1 -0
- package/lib/esm/widgets/SvgIcon.js +36 -0
- package/lib/esm/widgets/SvgIcon.js.map +1 -0
- package/lib/esm/widgets/index.js +7 -6
- package/lib/esm/widgets/index.js.map +1 -1
- package/lib/esm/widgets/upload/UploadSummary.js +1 -1
- package/lib/esm/widgets/upload/UploadSummary.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/types/core/components/FormItem.d.ts +2 -1
- package/lib/types/core/components/shadcn/dialog.d.ts +2 -1
- package/lib/types/core/components/shadcn/filters/DynamicLabel.d.ts +1 -1
- package/lib/types/core/components/shadcn/filters/comboBox/DateCombobox.d.ts +5 -0
- package/lib/types/core/components/shadcn/filters/comboBox/SelectCombobox.d.ts +8 -0
- package/lib/types/core/components/shadcn/filters/comboBox/StringListCombobox.d.ts +5 -0
- package/lib/types/core/components/shadcn/filters/comboBox/TextCombobox.d.ts +5 -0
- package/lib/types/core/components/shadcn/filters/comboBox/comboBox.d.ts +4 -0
- package/lib/types/core/components/shadcn/filters/{selectFilter.d.ts → filter/SelectFilter.d.ts} +2 -2
- package/lib/types/core/components/shadcn/filters/{stringListFilter.d.ts → filter/StringListFilter.d.ts} +1 -1
- package/lib/types/core/components/shadcn/filters/{textFilter.d.ts → filter/TextFilter.d.ts} +1 -1
- package/lib/types/core/components/shadcn/filters/{dateFilter.d.ts → filter/dateFilter.d.ts} +1 -1
- package/lib/types/core/components/shadcn/filters/filter-styles.d.ts +1 -0
- package/lib/types/core/components/shadcn/filters/filterBar.d.ts +14 -4
- package/lib/types/core/components/shadcn/filters/index.d.ts +1 -1
- package/lib/types/core/components/shadcn/filters/types.d.ts +2 -0
- package/lib/types/features/agent/PayloadBuilder.d.ts +17 -8
- package/lib/types/features/agent/chat/ModernAgentOutput/utils.d.ts +2 -1
- package/lib/types/features/facets/DocumentsFacetsNav.d.ts +16 -0
- package/lib/types/features/facets/RunsFacetsNav.d.ts +18 -0
- package/lib/types/features/facets/VFacetsNav.d.ts +1 -1
- package/lib/types/features/facets/VStringFacet.d.ts +6 -2
- package/lib/types/features/facets/VTypeFacet.d.ts +3 -1
- package/lib/types/features/facets/WorkflowExecutionsFacetsNav.d.ts +13 -0
- package/lib/types/features/facets/index.d.ts +3 -2
- package/lib/types/shell/SplashScreen.d.ts +4 -0
- package/lib/types/shell/VertesiaShell.d.ts +7 -0
- package/lib/types/shell/index.d.ts +6 -0
- package/lib/types/shell/login/EnterpriseSigninButton.d.ts +5 -0
- package/lib/types/shell/login/GitHubSignInButton.d.ts +5 -0
- package/lib/types/shell/login/GoogleSignInButton.d.ts +5 -0
- package/lib/types/shell/login/InviteAcceptModal.d.ts +1 -0
- package/lib/types/shell/login/MicrosoftSigninButton.d.ts +5 -0
- package/lib/types/shell/login/PreviewIcon.d.ts +5 -0
- package/lib/types/shell/login/SignInModal.d.ts +6 -0
- package/lib/types/shell/login/SigninScreen.d.ts +8 -0
- package/lib/types/shell/login/SignupForm.d.ts +7 -0
- package/lib/types/shell/login/TerminalLogin.d.ts +1 -0
- package/lib/types/shell/login/UserInfo.d.ts +5 -0
- package/lib/types/shell/login/UserSessionMenu.d.ts +8 -0
- package/lib/types/shell/utils.d.ts +1 -0
- package/lib/types/widgets/SvgIcon.d.ts +6 -0
- package/lib/types/widgets/index.d.ts +7 -6
- 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-router.js +1 -1
- package/lib/vertesia-ui-router.js.map +1 -1
- package/lib/vertesia-ui-shell.js +2 -0
- package/lib/vertesia-ui-shell.js.map +1 -0
- package/lib/vertesia-ui-widgets.js +1 -1
- package/lib/vertesia-ui-widgets.js.map +1 -1
- package/package.json +14 -6
- package/src/core/components/Badge.tsx +12 -8
- package/src/core/components/FormItem.tsx +4 -3
- package/src/core/components/InputList.tsx +21 -17
- package/src/core/components/shadcn/checkbox.tsx +2 -2
- package/src/core/components/shadcn/command.tsx +1 -1
- package/src/core/components/shadcn/dialog.tsx +18 -9
- package/src/core/components/shadcn/filters/DynamicLabel.tsx +1 -2
- package/src/core/components/shadcn/filters/comboBox/DateCombobox.tsx +211 -0
- package/src/core/components/shadcn/filters/{comboBox.tsx → comboBox/SelectCombobox.tsx} +8 -192
- package/src/core/components/shadcn/filters/comboBox/StringListCombobox.tsx +76 -0
- package/src/core/components/shadcn/filters/comboBox/TextCombobox.tsx +81 -0
- package/src/core/components/shadcn/filters/comboBox/comboBox.tsx +4 -0
- package/src/core/components/shadcn/filters/filter/SelectFilter.tsx +161 -0
- package/src/core/components/shadcn/filters/{stringListFilter.tsx → filter/StringListFilter.tsx} +7 -7
- package/src/core/components/shadcn/filters/{textFilter.tsx → filter/TextFilter.tsx} +17 -11
- package/src/core/components/shadcn/filters/filter/dateFilter.tsx +256 -0
- package/src/core/components/shadcn/filters/filter-styles.ts +87 -0
- package/src/core/components/shadcn/filters/filterBar.tsx +208 -152
- package/src/core/components/shadcn/filters/filters.tsx +7 -5
- package/src/core/components/shadcn/filters/index.ts +1 -1
- package/src/core/components/shadcn/filters/types.ts +2 -0
- package/src/core/components/toast/NotificationPanel.tsx +38 -22
- package/src/features/agent/PayloadBuilder.tsx +56 -31
- package/src/features/agent/chat/ModernAgentConversation.tsx +10 -4
- package/src/features/agent/chat/ModernAgentOutput/AllMessagesMixed.tsx +7 -6
- package/src/features/agent/chat/ModernAgentOutput/MessageItem.tsx +12 -1
- package/src/features/agent/chat/ModernAgentOutput/SlidingMessages.tsx +2 -1
- package/src/features/agent/chat/ModernAgentOutput/utils.ts +12 -4
- package/src/features/facets/DocumentsFacetsNav.tsx +171 -0
- package/src/features/facets/RunsFacetsNav.tsx +166 -0
- package/src/features/facets/VFacetsNav.tsx +10 -126
- package/src/features/facets/VStringFacet.tsx +10 -4
- package/src/features/facets/VTypeFacet.tsx +6 -5
- package/src/features/facets/VUserFacet.tsx +5 -3
- package/src/features/facets/WorkflowExecutionsFacetsNav.tsx +132 -0
- package/src/features/facets/index.ts +5 -2
- package/src/features/store/collections/CollectionsTable.tsx +3 -2
- package/src/features/store/collections/CreateCollection.tsx +17 -15
- package/src/features/store/collections/EditCollectionView.tsx +19 -16
- package/src/features/store/collections/SelectCollection.tsx +1 -1
- package/src/features/store/objects/DocumentPreviewPanel.tsx +0 -1
- package/src/features/store/objects/DocumentSearchResults.tsx +80 -11
- package/src/features/store/objects/components/ContentOverview.tsx +0 -2
- package/src/features/store/objects/components/SelectDocument.tsx +2 -2
- package/src/features/store/objects/components/VectorSearchWidget.tsx +2 -2
- package/src/features/store/objects/selection/actions/AddToCollectionAction.tsx +40 -19
- package/src/features/store/objects/upload/DocumentUploadModal.tsx +160 -214
- package/src/features/store/types/ObjectSchemaEditor.tsx +15 -0
- package/src/features/user/UserInfo.tsx +17 -14
- package/src/router/HistoryNavigator.ts +2 -2
- package/src/shell/SplashScreen.tsx +41 -0
- package/src/shell/VertesiaShell.tsx +27 -0
- package/src/shell/index.tsx +6 -0
- package/src/shell/login/EnterpriseSigninButton.tsx +106 -0
- package/src/shell/login/GitHubSignInButton.tsx +40 -0
- package/src/shell/login/GoogleSignInButton.tsx +36 -0
- package/src/shell/login/InviteAcceptModal.tsx +78 -0
- package/src/shell/login/MicrosoftSigninButton.tsx +30 -0
- package/src/shell/login/PreviewIcon.tsx +29 -0
- package/src/shell/login/SignInModal.tsx +28 -0
- package/src/shell/login/SigninScreen.tsx +162 -0
- package/src/shell/login/SignupForm.tsx +178 -0
- package/src/shell/login/TerminalLogin.tsx +299 -0
- package/src/shell/login/UserInfo.tsx +76 -0
- package/src/shell/login/UserSessionMenu.tsx +81 -0
- package/src/shell/utils.tsx +7 -0
- package/src/widgets/SvgIcon.tsx +44 -0
- package/src/widgets/index.ts +7 -6
- package/src/widgets/upload/UploadSummary.tsx +3 -4
- package/lib/esm/core/components/shadcn/filters/comboBox.js +0 -101
- package/lib/esm/core/components/shadcn/filters/comboBox.js.map +0 -1
- package/lib/esm/core/components/shadcn/filters/dateFilter.js +0 -36
- package/lib/esm/core/components/shadcn/filters/dateFilter.js.map +0 -1
- package/lib/esm/core/components/shadcn/filters/selectFilter.js +0 -67
- package/lib/esm/core/components/shadcn/filters/selectFilter.js.map +0 -1
- package/lib/esm/core/components/shadcn/filters/stringListFilter.js.map +0 -1
- package/lib/esm/core/components/shadcn/filters/textFilter.js.map +0 -1
- package/lib/esm/features/facets/InteractionFacet.js +0 -39
- package/lib/esm/features/facets/InteractionFacet.js.map +0 -1
- package/lib/esm/features/facets/TypeOptions.js +0 -19
- package/lib/esm/features/facets/TypeOptions.js.map +0 -1
- package/lib/esm/features/facets/UserFacet.js +0 -33
- package/lib/esm/features/facets/UserFacet.js.map +0 -1
- package/lib/types/core/components/shadcn/filters/comboBox.d.ts +0 -22
- package/lib/types/features/facets/InteractionFacet.d.ts +0 -9
- package/lib/types/features/facets/TypeOptions.d.ts +0 -3
- package/lib/types/features/facets/UserFacet.d.ts +0 -11
- package/src/core/components/shadcn/filters/dateFilter.tsx +0 -82
- package/src/core/components/shadcn/filters/selectFilter.tsx +0 -110
- package/src/features/facets/InteractionFacet.tsx +0 -53
- package/src/features/facets/TypeOptions.tsx +0 -22
- package/src/features/facets/UserFacet.tsx +0 -61
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { FilterGroupOption, FilterOption } from "./types";
|
|
2
|
-
export declare const SelectionCombobox: ({ filterType, filterValues, setFilterValues, options, labelRenderer, }: {
|
|
3
|
-
filterType: string;
|
|
4
|
-
filterValues: FilterOption[];
|
|
5
|
-
setFilterValues: (filterValues: FilterOption[]) => void;
|
|
6
|
-
options: FilterGroupOption[];
|
|
7
|
-
labelRenderer?: (value: string) => React.ReactNode | Promise<React.ReactNode>;
|
|
8
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export declare const DateCombobox: ({ filterValues, setFilterValues, }: {
|
|
10
|
-
filterValues: string[];
|
|
11
|
-
setFilterValues: (values: string[]) => void;
|
|
12
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export declare const TextCombobox: ({ filterType, filterValue, setFilterValue, }: {
|
|
14
|
-
filterType: string;
|
|
15
|
-
filterValue: string;
|
|
16
|
-
setFilterValue: (value: string) => void;
|
|
17
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export declare const StringListCombobox: ({ filterType, filterValues, setFilterValues, }: {
|
|
19
|
-
filterType: string;
|
|
20
|
-
filterValues: string[];
|
|
21
|
-
setFilterValues: (values: string[]) => void;
|
|
22
|
-
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FacetBucket } from '@vertesia/common';
|
|
2
|
-
interface InteractionFacetProps {
|
|
3
|
-
search: any;
|
|
4
|
-
buckets: FacetBucket[];
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function InteractionFacet({ search, buckets, placeholder, className }: InteractionFacetProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FacetBucket } from "@vertesia/common";
|
|
2
|
-
export declare function facetOptionLabel(bucket: FacetBucket): string | import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
interface UserFacetProps {
|
|
4
|
-
search: any;
|
|
5
|
-
buckets: FacetBucket[];
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
className?: string;
|
|
8
|
-
name: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function UserFacet({ search, buckets, placeholder, className }: UserFacetProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import dayjs from "dayjs";
|
|
2
|
-
import React, { useState } from "react";
|
|
3
|
-
import DatePicker from "react-date-picker";
|
|
4
|
-
import { Popover, PopoverContent, PopoverTrigger } from "../popover";
|
|
5
|
-
import { Filter, FilterGroup } from "./types";
|
|
6
|
-
|
|
7
|
-
type ValuePiece = Date | null;
|
|
8
|
-
type Value = ValuePiece | [ValuePiece, ValuePiece];
|
|
9
|
-
|
|
10
|
-
interface DateFilterProps {
|
|
11
|
-
selectedView: string | null;
|
|
12
|
-
selectedDate: Date | undefined;
|
|
13
|
-
setSelectedDate: React.Dispatch<React.SetStateAction<Date | undefined>>;
|
|
14
|
-
setFilters: React.Dispatch<React.SetStateAction<Filter[]>>;
|
|
15
|
-
filters: Filter[];
|
|
16
|
-
handleClose: () => void;
|
|
17
|
-
filterGroups: FilterGroup[];
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export default function DateFilter({
|
|
21
|
-
selectedView,
|
|
22
|
-
selectedDate,
|
|
23
|
-
setSelectedDate,
|
|
24
|
-
setFilters,
|
|
25
|
-
filters,
|
|
26
|
-
handleClose,
|
|
27
|
-
filterGroups,
|
|
28
|
-
}: DateFilterProps) {
|
|
29
|
-
const [open, setOpen] = useState(true);
|
|
30
|
-
|
|
31
|
-
const handleDateChange = (value: Value) => {
|
|
32
|
-
const date = Array.isArray(value) ? value[0] : value;
|
|
33
|
-
setSelectedDate(date || undefined);
|
|
34
|
-
if (date) {
|
|
35
|
-
const selectedGroup = filterGroups.find(g => g.name === selectedView);
|
|
36
|
-
|
|
37
|
-
// Set date to start of day (00:00)
|
|
38
|
-
const selectedDateStart = new Date(date);
|
|
39
|
-
selectedDateStart.setHours(0, 0, 0, 0);
|
|
40
|
-
|
|
41
|
-
setFilters([
|
|
42
|
-
...filters,
|
|
43
|
-
{
|
|
44
|
-
name: selectedView || "",
|
|
45
|
-
placeholder: selectedGroup?.placeholder,
|
|
46
|
-
value: [
|
|
47
|
-
{
|
|
48
|
-
value: selectedDateStart.toISOString(),
|
|
49
|
-
label: dayjs(selectedDateStart).format("LLL dd, y"),
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
type: selectedGroup?.type || "date",
|
|
53
|
-
} as Filter,
|
|
54
|
-
]);
|
|
55
|
-
|
|
56
|
-
setOpen(false);
|
|
57
|
-
handleClose();
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
return (
|
|
62
|
-
<Popover _open={open} onOpenChange={setOpen}>
|
|
63
|
-
<PopoverTrigger className="w-full p-2 text-left hover:bg-muted/50 rounded-sm">
|
|
64
|
-
<div className="flex gap-1.5 items-center">
|
|
65
|
-
{selectedDate ? (
|
|
66
|
-
dayjs(selectedDate).format("MMM D, YYYY")
|
|
67
|
-
) : (
|
|
68
|
-
<span>Pick a date</span>
|
|
69
|
-
)}
|
|
70
|
-
</div>
|
|
71
|
-
</PopoverTrigger>
|
|
72
|
-
<PopoverContent className="w-auto p-0" align="start">
|
|
73
|
-
<DatePicker
|
|
74
|
-
value={selectedDate}
|
|
75
|
-
onChange={handleDateChange}
|
|
76
|
-
calendarIcon={false}
|
|
77
|
-
className="p-2"
|
|
78
|
-
/>
|
|
79
|
-
</PopoverContent>
|
|
80
|
-
</Popover>
|
|
81
|
-
);
|
|
82
|
-
}
|
|
@@ -1,110 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { CommandItem, CommandEmpty } from "../command";
|
|
3
|
-
import { Filter, FilterGroup, FilterGroupOption, FilterOption } from "./types";
|
|
4
|
-
import { DynamicLabel } from "./DynamicLabel";
|
|
5
|
-
|
|
6
|
-
interface SelectFilterProps {
|
|
7
|
-
selectedView: string | null;
|
|
8
|
-
commandInput: string;
|
|
9
|
-
setFilters: React.Dispatch<React.SetStateAction<Filter[]>>;
|
|
10
|
-
handleClose: () => void;
|
|
11
|
-
filterGroups: FilterGroup[];
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export default function SelectFilter({
|
|
15
|
-
selectedView,
|
|
16
|
-
commandInput,
|
|
17
|
-
setFilters,
|
|
18
|
-
handleClose,
|
|
19
|
-
filterGroups,
|
|
20
|
-
}: SelectFilterProps) {
|
|
21
|
-
const getFilteredOptions = (groupName: string) => {
|
|
22
|
-
const group = filterGroups.find(g => g.name === groupName);
|
|
23
|
-
if (!group) return [];
|
|
24
|
-
|
|
25
|
-
let filteredOptions = group.options || [];
|
|
26
|
-
|
|
27
|
-
if (!commandInput.trim()) {
|
|
28
|
-
return filteredOptions;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (group.filterBy) {
|
|
32
|
-
const filterLc = commandInput.toLowerCase();
|
|
33
|
-
const results = filteredOptions.filter(option => {
|
|
34
|
-
if (option.value === undefined) return false;
|
|
35
|
-
const result = group.filterBy!(option.value, filterLc);
|
|
36
|
-
return result;
|
|
37
|
-
});
|
|
38
|
-
return results;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const filterLc = commandInput.toLowerCase();
|
|
42
|
-
return filteredOptions.filter(option => {
|
|
43
|
-
const optionValue = String(option.value || '').toLowerCase();
|
|
44
|
-
return optionValue.includes(filterLc);
|
|
45
|
-
});
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
if (!selectedView) return null;
|
|
49
|
-
|
|
50
|
-
const options = getFilteredOptions(selectedView);
|
|
51
|
-
|
|
52
|
-
if (options.length === 0) {
|
|
53
|
-
return <CommandEmpty>No matching options</CommandEmpty>;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
const groupTitle = filterGroups.find(group => group.name === selectedView)?.placeholder || filterGroups.find(group => group.name === selectedView)?.name;
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
<>
|
|
60
|
-
<div className="flex items-center p-1.5 text-xs text-muted">
|
|
61
|
-
<span>{groupTitle}</span>
|
|
62
|
-
</div>
|
|
63
|
-
{options.map((option: FilterGroupOption) => {
|
|
64
|
-
const selectedGroup = filterGroups.find(g => g.name === selectedView);
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<CommandItem
|
|
68
|
-
key={option.value || `option-${Math.random()}`}
|
|
69
|
-
className="group flex gap-2 items-center w-full hover:bg-muted"
|
|
70
|
-
onSelect={() => {
|
|
71
|
-
setFilters((prev: Filter[]) => {
|
|
72
|
-
const existingFilterIndex = prev.findIndex(f => f.name === selectedView);
|
|
73
|
-
|
|
74
|
-
// Create filter option with value and label for storage
|
|
75
|
-
const filterOption = {
|
|
76
|
-
value: option.value,
|
|
77
|
-
label: option.label
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
if (existingFilterIndex >= 0) {
|
|
81
|
-
const updatedFilters = [...prev];
|
|
82
|
-
updatedFilters[existingFilterIndex] = {
|
|
83
|
-
...updatedFilters[existingFilterIndex],
|
|
84
|
-
value: [...(updatedFilters[existingFilterIndex].value as FilterOption[]), filterOption]
|
|
85
|
-
};
|
|
86
|
-
return updatedFilters;
|
|
87
|
-
} else {
|
|
88
|
-
return [...prev, {
|
|
89
|
-
name: selectedView || "",
|
|
90
|
-
placeholder: selectedGroup?.placeholder || "",
|
|
91
|
-
value: [filterOption],
|
|
92
|
-
type: selectedGroup?.type || "select",
|
|
93
|
-
}];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
handleClose();
|
|
98
|
-
}}
|
|
99
|
-
>
|
|
100
|
-
<DynamicLabel
|
|
101
|
-
value={option.value || ''}
|
|
102
|
-
labelRenderer={option.labelRenderer || selectedGroup?.labelRenderer}
|
|
103
|
-
fallbackLabel={option.label}
|
|
104
|
-
/>
|
|
105
|
-
</CommandItem>
|
|
106
|
-
);
|
|
107
|
-
})}
|
|
108
|
-
</>
|
|
109
|
-
);
|
|
110
|
-
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
|
|
3
|
-
import { FacetBucket, FacetNameBucket } from '@vertesia/common';
|
|
4
|
-
import { SelectBox } from '@vertesia/ui/core';
|
|
5
|
-
import { useUserSession } from '@vertesia/ui/session';
|
|
6
|
-
import { facetOptionNameLabel } from './utils';
|
|
7
|
-
|
|
8
|
-
interface InteractionFacetProps {
|
|
9
|
-
search: any;
|
|
10
|
-
buckets: FacetBucket[];
|
|
11
|
-
placeholder?: string;
|
|
12
|
-
className?: string;
|
|
13
|
-
}
|
|
14
|
-
export function InteractionFacet({ search, buckets, placeholder = "All Interactions", className }: InteractionFacetProps) {
|
|
15
|
-
const { client } = useUserSession();
|
|
16
|
-
|
|
17
|
-
const [options, setOptions] = useState<FacetNameBucket[]>([]);
|
|
18
|
-
|
|
19
|
-
const filterValue = search.getFilterValue("interaction") as string;
|
|
20
|
-
const onChange = (option: FacetBucket | undefined) => {
|
|
21
|
-
search.setFilterValue("interaction", option?._id);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
useEffect(() => {
|
|
25
|
-
if (client) {
|
|
26
|
-
const options = buckets.map(async (bucket) => {
|
|
27
|
-
let name;
|
|
28
|
-
await client.interactions.retrieve(bucket._id).then((interaction) => {
|
|
29
|
-
name = interaction.name;
|
|
30
|
-
}).catch(() => {
|
|
31
|
-
name = `${bucket._id} (deleted)`;
|
|
32
|
-
});
|
|
33
|
-
if (!name) {
|
|
34
|
-
name = bucket._id;
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
...bucket,
|
|
38
|
-
name
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
Promise.all(options).then(resolvedOptions => {
|
|
42
|
-
resolvedOptions.sort((a, b) => a.name.localeCompare(b.name));
|
|
43
|
-
setOptions(resolvedOptions);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}, [buckets, client]);
|
|
47
|
-
|
|
48
|
-
const value = options?.find((option) => option._id === filterValue);
|
|
49
|
-
|
|
50
|
-
return (
|
|
51
|
-
<SelectBox filterBy="name" className={className} isClearable optionLabel={facetOptionNameLabel} options={options} value={value} onChange={onChange} by='_id' placeholder={placeholder} />
|
|
52
|
-
)
|
|
53
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { useUserSession } from "@vertesia/ui/session";
|
|
2
|
-
import { FacetBucket } from "@vertesia/common";
|
|
3
|
-
import { FilterOption } from "@vertesia/ui/core";
|
|
4
|
-
|
|
5
|
-
export function TypeOptionLabel(buckets: FacetBucket[]): FilterOption[] {
|
|
6
|
-
const { typeRegistry } = useUserSession();
|
|
7
|
-
|
|
8
|
-
return buckets.map((bucket) => {
|
|
9
|
-
let name;
|
|
10
|
-
if (bucket._id == null) {
|
|
11
|
-
bucket._id = "Document";
|
|
12
|
-
name = "Document";
|
|
13
|
-
} else {
|
|
14
|
-
name = typeRegistry?.getTypeName(bucket._id) || bucket._id;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return {
|
|
18
|
-
name: `${name} (${bucket.count})`,
|
|
19
|
-
value: bucket._id,
|
|
20
|
-
};
|
|
21
|
-
}).sort((a, b) => a.name.localeCompare(b.name));
|
|
22
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { FacetBucket } from "@vertesia/common";
|
|
2
|
-
import { SelectBox } from "@vertesia/ui/core";
|
|
3
|
-
import { useEffect, useState } from "react";
|
|
4
|
-
import { UserInfo } from '../user/UserInfo';
|
|
5
|
-
|
|
6
|
-
export function facetOptionLabel(bucket: FacetBucket) {
|
|
7
|
-
if (bucket._id == null) {
|
|
8
|
-
return `UnKnown User (${bucket.count})`;
|
|
9
|
-
}
|
|
10
|
-
else {
|
|
11
|
-
return (
|
|
12
|
-
<UserInfo userRef={bucket._id} showTitle={true} size={"sm"} />
|
|
13
|
-
);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
interface UserFacetProps {
|
|
18
|
-
search: any;
|
|
19
|
-
buckets: FacetBucket[];
|
|
20
|
-
placeholder?: string;
|
|
21
|
-
className?: string;
|
|
22
|
-
name: string;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
export function UserFacet({ search, buckets, placeholder = "Filter by User", className }: UserFacetProps) {
|
|
26
|
-
const [options, setOptions] = useState<FacetBucket[]>([]);
|
|
27
|
-
const filterValue = search.getFilterValue("created_by") as string;
|
|
28
|
-
|
|
29
|
-
const onChange = (option: FacetBucket | undefined) => {
|
|
30
|
-
search.setFilterValue("created_by", option?._id);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
useEffect(() => {
|
|
34
|
-
const fetchOptions = async () => {
|
|
35
|
-
const options = await Promise.all(buckets.map(async (bucket) => {
|
|
36
|
-
return {
|
|
37
|
-
...bucket,
|
|
38
|
-
}
|
|
39
|
-
}));
|
|
40
|
-
setOptions(options);
|
|
41
|
-
};
|
|
42
|
-
fetchOptions();
|
|
43
|
-
}, [buckets]);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
const value = options?.find((option) => option._id === filterValue);
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<SelectBox
|
|
50
|
-
filterBy="name"
|
|
51
|
-
className={className}
|
|
52
|
-
isClearable
|
|
53
|
-
optionLabel={facetOptionLabel}
|
|
54
|
-
options={options}
|
|
55
|
-
value={value}
|
|
56
|
-
onChange={onChange}
|
|
57
|
-
by='_id'
|
|
58
|
-
placeholder={placeholder}
|
|
59
|
-
/>
|
|
60
|
-
)
|
|
61
|
-
}
|