diff --git a/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/HiddenOptions.jsx b/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/HiddenOptions.jsx index c2055f4b8e..a2a4cebf80 100644 --- a/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/HiddenOptions.jsx +++ b/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/HiddenOptions.jsx @@ -74,7 +74,7 @@ export const HiddenOptions = (props) => { {renderOptions()} { setShowMenu((prev) => !prev); setActionClicked((prev) => !prev); }} - className="copy-menu-options-icon" + className="node-action-icon" style={{ outline: 'none', + ...(showMenu && { backgroundColor: 'var(--button-outline-pressed, rgba(136, 144, 153, 0.18)' }), }} > - + diff --git a/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/JSONTreeViewerV2.jsx b/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/JSONTreeViewerV2.jsx index 43d29ed12c..a47d9fa060 100644 --- a/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/JSONTreeViewerV2.jsx +++ b/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/JSONTreeViewerV2.jsx @@ -7,6 +7,7 @@ import JSONViewer from './JSONViewer'; import { SearchBox } from '@/_components'; import { Node } from './Node'; import { v4 as uuidv4 } from 'uuid'; +import InputComponent from '@/components/ui/Input/Index'; import { isEmpty } from 'lodash'; const JSONTreeViewerV2 = ({ data = {}, iconsList = [], darkMode, searchablePaths = new Set() }) => { @@ -128,8 +129,8 @@ const JSONTreeViewerV2 = ({ data = {}, iconsList = [], darkMode, searchablePaths <> {!selectedNodePath || (typeof selectedData == 'object' && isEmpty(selectedData)) ? (
-
- + {/* setSearchValue(e.target.value)} @@ -138,6 +139,16 @@ const JSONTreeViewerV2 = ({ data = {}, iconsList = [], darkMode, searchablePaths customClass={`tj-inspector-search-input tj-text-xsm`} showClearButton={false} width={300} + /> */} + + setSearchValue(e.target.value)} + onClear={() => setSearchValue('')} + size="medium" + placeholder="Search" + value={searchValue} + {...(searchValue && { trailingAction: 'clear' })} />
diff --git a/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/Node.jsx b/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/Node.jsx index 1b01f48daf..86dffbf180 100644 --- a/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/Node.jsx +++ b/frontend/src/AppBuilder/LeftSidebar/LeftSidebarInspector/Node.jsx @@ -19,20 +19,21 @@ const renderNodeIcons = (node, iconsList, darkMode) => { ); } + if (icon && icon.jsx) { if (icon?.tooltipMessage) { return ( -
{icon.jsx()}
+
{icon.jsx({ height: 14, width: 14 })}
); } - return icon.jsx(); + return icon.jsx({ height: 14, width: 14 }); } }; @@ -91,30 +92,31 @@ export const Node = (props) => { //
1 ? 12 : 0, + // marginLeft: level > 1 ? 12 : 0, // paddingLeft: '16px', opacity: isDisabled ? 0.5 : 1, - height: level === 1 ? '28px' : '32px', + height: '20px', display: 'flex', alignItems: 'center', color: level === 1 ? 'var(--text-placeholder, #6A727C)' : 'var(--text-default, #1B1F24)', + fontWeight: level === 1 ? 500 : 400, // borderLeft: level > 1 ? '1px solid var(--slate6, #D7DBDF)' : 'none', }} > - {!['queries', 'globals', 'variables'].includes(type) && ( -
- {(isBranch || level === 1 || path === 'page.variables') && ( - onExpand(props)} - variant="ghost" - fill="var(--icon-default,#ACB2B9)" - size="small" - /> - )} -
- )} + {/* {!['queries', 'globals', 'variables'].includes(type) && ( */} +
+ {(isBranch || level === 1 || path === 'page.variables') && ( + onExpand(props)} + variant="ghost" + fill="var(--icon-default,#ACB2B9)" + size="small" + /> + )} +
+ {/* )} */}
onSelect(props)} @@ -134,7 +136,7 @@ export const Node = (props) => { />
-
+
{ return (
-
+ {/*
+
*/} +
+ {parentNode.charAt(0).toUpperCase() + parentNode.slice(1)} + + {pathArray.length > 1 && + pathArray.slice(1).map((item, index) => ( + <> + + + {item.charAt(0).toUpperCase() + item.slice(1)} + + + ))}
- - {parentNode.charAt(0).toUpperCase() + parentNode.slice(1)} - - - {pathArray.length > 1 && - pathArray.slice(1).map((item, index) => ( - <> - - - {item.charAt(0).toUpperCase() + item.slice(1)} - - - ))} - { const query = dataQueries.find((dataQuery) => dataQuery.id === queryId); if (!isEmpty(query)) { - return { iconName: query?.name, jsx: () => }; + return { + iconName: query?.name, + jsx: ({ height = 16, width = 16 }) => , + }; } }); @@ -37,7 +40,9 @@ const useIconList = ({ exposedComponentsVariables, componentIdNameMapping, expos if (componentExposedVariables.disable) { icons.push({ iconName: 'disable', - jsx: () => , + jsx: ({ height = 16, width = 16 }) => ( + + ), className: 'component-icon', tooltipMessage: 'This function will be deprecated soon, You can use setDisable as an alternative', isInfoIcon: true, @@ -47,7 +52,9 @@ const useIconList = ({ exposedComponentsVariables, componentIdNameMapping, expos if (componentExposedVariables.visibility) { icons.push({ iconName: 'visibility', - jsx: () => , + jsx: ({ height = 16, width = 16 }) => ( + + ), className: 'component-icon', tooltipMessage: 'This function will be deprecated soon, You can use setVisibility as an alternative', isInfoIcon: true, @@ -62,7 +69,9 @@ const useIconList = ({ exposedComponentsVariables, componentIdNameMapping, expos if (componentExposedVariables.setChecked) { icons.push({ iconName: 'setChecked', - jsx: () => , + jsx: ({ height = 16, width = 16 }) => ( + + ), className: 'component-icon', tooltipMessage: 'This function will be deprecated soon, You can use setValue as an alternative', isInfoIcon: true, @@ -78,7 +87,9 @@ const useIconList = ({ exposedComponentsVariables, componentIdNameMapping, expos if (componentExposedVariables.disable) { icons.push({ iconName: 'disable', - jsx: () => , + jsx: ({ height = 16, width = 16 }) => ( + + ), className: 'component-icon', tooltipMessage: 'This function will be deprecated soon, You can use setDisable as an alternative', isInfoIcon: true, @@ -88,7 +99,9 @@ const useIconList = ({ exposedComponentsVariables, componentIdNameMapping, expos if (componentExposedVariables.visibility) { icons.push({ iconName: 'visibility', - jsx: () => , + jsx: ({ height = 16, width = 16 }) => ( + + ), className: 'component-icon', tooltipMessage: 'This function will be deprecated soon, You can use setVisibility as an alternative', isInfoIcon: true, @@ -98,7 +111,9 @@ const useIconList = ({ exposedComponentsVariables, componentIdNameMapping, expos if (componentExposedVariables.loading) { icons.push({ iconName: 'loading', - jsx: () => , + jsx: ({ height = 16, width = 16 }) => ( + + ), className: 'component-icon', tooltipMessage: 'This function will be deprecated soon, You can use setLoading as an alternative', isInfoIcon: true, @@ -112,7 +127,9 @@ const useIconList = ({ exposedComponentsVariables, componentIdNameMapping, expos return [ { iconName: 'visibility', - jsx: () => , + jsx: ({ height = 16, width = 16 }) => ( + + ), className: 'component-icon', tooltipMessage: 'This function will be deprecated soon, You can use setVisibility as an alternative', isInfoIcon: true, diff --git a/frontend/src/_styles/components.scss b/frontend/src/_styles/components.scss index 9fbe2f33f4..27736f0a6e 100644 --- a/frontend/src/_styles/components.scss +++ b/frontend/src/_styles/components.scss @@ -95,10 +95,7 @@ $btn-dark-color: #FFFFFF; } .leftsidebar-panel-header { - // background-color: var(--slate3); - padding: 12px 16px 8px 16px; - min-height: 52px; - // border-bottom: 1px solid var(--slate5); + padding: 12px 16px 0px 16px; .panel-header-container { diff --git a/frontend/src/_styles/theme.scss b/frontend/src/_styles/theme.scss index 993dd6bdf3..03d5f363a9 100644 --- a/frontend/src/_styles/theme.scss +++ b/frontend/src/_styles/theme.scss @@ -18878,13 +18878,24 @@ section.ai-message-prompt-input-wrapper { } .json-tree-view { - ul { - margin-left:16px !important; - border-left: 1px solid var(--slate6, #D7DBDF); - } + // ul { + // margin-left:16px !important; + // border-left: 1px solid var(--slate6, #D7DBDF); + // } ul[role="tree"] { + margin-left:16px !important; border-left: none !important; + ul { + margin-left:16px !important; + border-left: none !important; + ul { + margin-left:10px !important; + padding-left:16px !important; + border-left: 1px solid var(--slate6, #D7DBDF) !important; + } + } + } } @@ -18936,9 +18947,11 @@ section.ai-message-prompt-input-wrapper { .node-icon { display: flex; - align-items: center; + align-items: flex-end; justify-content: center; margin-right: 6px; + height: 14px; + width: 14px; } .node-label { @@ -18964,10 +18977,10 @@ section.ai-message-prompt-input-wrapper { .node-content { display: flex; align-items: center; - padding: 0px 8px; + padding: 0px 0px 0px 8px; height: 100%; width: 100%; - border-radius: 6px; + } .node-content-active { @@ -18978,6 +18991,7 @@ section.ai-message-prompt-input-wrapper { .node-content-hoverable:hover, .node-content-active { background-color: var(--interactive-overlays-fill-hover); + cursor: pointer; .node-actions { display: flex; } @@ -19014,9 +19028,13 @@ section.ai-message-prompt-input-wrapper { font-weight: 500; display: flex; flex-direction: row; - margin-left:20px; - margin-bottom:18px; + margin-left:16px; + margin-bottom:12px; margin-right: 18px; + margin-top: 8px; + height:28px; + align-items: center; + } .json-viewer-back-btn { @@ -19058,11 +19076,9 @@ section.ai-message-prompt-input-wrapper { } .node-actions { - justify-content: center; align-items: center; margin-left:auto; - margin-right: 24px; display: none; gap: 4px; } @@ -19104,6 +19120,7 @@ section.ai-message-prompt-input-wrapper { border: none; background: transparent; border-radius: 10px; + top: -5px !important; &.dark-theme { .popover-body { box-shadow: 0px 0px 1px 0px rgba(0, 0, 0, 0.9), 0px 8px 16px 0px #000000; diff --git a/frontend/src/components/ui/Input/CommonInput/TextInput.jsx b/frontend/src/components/ui/Input/CommonInput/TextInput.jsx index 1834d4799d..1dc3ce8d67 100644 --- a/frontend/src/components/ui/Input/CommonInput/TextInput.jsx +++ b/frontend/src/components/ui/Input/CommonInput/TextInput.jsx @@ -46,6 +46,7 @@ const TextInput = ({ diff --git a/frontend/src/components/ui/Input/Index.jsx b/frontend/src/components/ui/Input/Index.jsx index 139019a198..dbb6806d6b 100644 --- a/frontend/src/components/ui/Input/Index.jsx +++ b/frontend/src/components/ui/Input/Index.jsx @@ -13,6 +13,7 @@ InputComponent.propTypes = { type: PropTypes.oneOf(['text', 'number', 'editable title', 'password', 'email']), value: PropTypes.string, onChange: PropTypes.func, + onClear: PropTypes.func, placeholder: PropTypes.string, name: PropTypes.string, id: PropTypes.string, @@ -32,6 +33,7 @@ InputComponent.propTypes = { InputComponent.defaultProps = { type: 'text', onChange: (e, validateObj) => {}, + onClear: () => {}, placeholder: '', name: '', id: '', diff --git a/frontend/src/components/ui/Input/Input.jsx b/frontend/src/components/ui/Input/Input.jsx index 33c3194f0b..610232eadf 100644 --- a/frontend/src/components/ui/Input/Input.jsx +++ b/frontend/src/components/ui/Input/Input.jsx @@ -19,7 +19,7 @@ const Input = React.forwardRef(({ className, size, type, ...props }, ref) => { type={isPasswordField && isPasswordVisible ? 'text' : type} className={cn( inputVariants({ size }), - `tw-relative tw-peer tw-flex tw-text-[12px]/[18px] tw-w-full tw-rounded-[8px] tw-border-[1px] tw-border-solid tw-bg-background-surface-layer-01 tw-py-[7px] tw-text-text-default focus-visible:tw-ring-[1px] focus-visible:tw-ring-offset-[1px] focus-visible:tw-ring-border-accent-strong focus-visible:tw-ring-offset-border-accent-strong focus-visible:tw-border-transparent disabled:tw-cursor-not-allowed ${props.styles}`, + `tw-peer tw-flex tw-text-[12px]/[18px] tw-w-full tw-rounded-[8px] tw-border-[1px] tw-border-solid tw-bg-background-surface-layer-01 tw-py-[7px] tw-text-text-default focus-visible:tw-ring-[1px] focus-visible:tw-ring-offset-[1px] focus-visible:tw-ring-border-accent-strong focus-visible:tw-ring-offset-border-accent-strong focus-visible:tw-border-transparent disabled:tw-cursor-not-allowed ${props.styles}`, className )} ref={ref}