+ {children && (
+
focus())}>
+ {children}
+
+ )}
{!!props.value && onClear && (
@@ -66,11 +75,7 @@ export const InputWithIcon = forwardRef(function InputWithIcon
)}
- {children && (
-
focus())}>
- {children}
-
- )}
+ {props.endAdornment &&
{props.endAdornment}
}
);
diff --git a/designer/client/src/components/themed/SearchInput.tsx b/designer/client/src/components/themed/SearchInput.tsx
index 9cbbfc4e3e5..a495d420c38 100644
--- a/designer/client/src/components/themed/SearchInput.tsx
+++ b/designer/client/src/components/themed/SearchInput.tsx
@@ -3,7 +3,7 @@ import { InputWithIcon } from "./InputWithIcon";
export const SearchInputWithIcon = styled(InputWithIcon)(({ theme }) => ({
...theme.typography.body2,
- width: "100%",
+ width: "75%",
borderRadius: 0,
height: "36px !important",
color: theme.palette.text.secondary,
diff --git a/designer/client/src/components/tips/Styled.tsx b/designer/client/src/components/tips/Styled.tsx
index 8ce50317ade..93704643536 100644
--- a/designer/client/src/components/tips/Styled.tsx
+++ b/designer/client/src/components/tips/Styled.tsx
@@ -38,3 +38,8 @@ export const TipPanelStyled = styled("div")<{
outlineOffset: "-2px",
}),
}));
+
+export const SearchPanelStyled = styled("div")(({ theme }) => ({
+ width: "100%",
+ padding: theme.spacing(1, 1.25),
+}));
diff --git a/designer/client/src/components/toolbars/search/AdvancedSearchFilters.tsx b/designer/client/src/components/toolbars/search/AdvancedSearchFilters.tsx
new file mode 100644
index 00000000000..51f0f9bf713
--- /dev/null
+++ b/designer/client/src/components/toolbars/search/AdvancedSearchFilters.tsx
@@ -0,0 +1,139 @@
+import React, { MutableRefObject, useEffect, useMemo, useRef, useState } from "react";
+import { Button, Box, Typography } from "@mui/material";
+import { useTranslation } from "react-i18next";
+import { SearchLabeledInput } from "../../sidePanels/SearchLabeledInput";
+import { SearchLabel } from "../../sidePanels/SearchLabel";
+import { SearchQuery } from "./SearchResults";
+import { resolveSearchQuery } from "./utils";
+
+const transformInput = (input: string, fieldName: string) => {
+ return input === "" ? "" : `${fieldName}:(${input})`;
+};
+
+function extractSimpleSearchQuery(text: string): string {
+ const regex = /(\w+):\(([^)]*)\)/g;
+ let match: RegExpExecArray | null;
+ let lastIndex = 0;
+
+ while ((match = regex.exec(text)) !== null) {
+ lastIndex = regex.lastIndex;
+ }
+
+ const rest = text.slice(lastIndex).trim();
+
+ return rest;
+}
+
+export function AdvancedSearchFilters({
+ filter,
+ setFilter,
+ setCollapsedHandler,
+ refForm,
+}: {
+ filter: string;
+ setFilter: React.Dispatch