Merge pull request #869 from SuanmoSuanyangTechnology/fix/v0.3.0_zy
Fix/v0.3.0 zy
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2026-02-03 18:32:53
|
* @Date: 2026-02-03 18:32:53
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-03-16 14:27:12
|
* @Last Modified time: 2026-04-13 13:37:43
|
||||||
*/
|
*/
|
||||||
import { useEffect, useState, forwardRef, useImperativeHandle, useRef } from 'react'
|
import { useEffect, useState, forwardRef, useImperativeHandle, useRef } from 'react'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
@@ -93,7 +93,7 @@ const InterestAreas = forwardRef<{ handleRefresh: () => void; }>((_props, ref) =
|
|||||||
ref={chartRef}
|
ref={chartRef}
|
||||||
option={{
|
option={{
|
||||||
color: Colors,
|
color: Colors,
|
||||||
grid: { top: 8, left: 38, right: 8, bottom: 24 },
|
grid: { top: 14, left: 38, right: 8, bottom: 24 },
|
||||||
xAxis: {
|
xAxis: {
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: keys.map(k => t(`implicitDetail.${k}`)),
|
data: keys.map(k => t(`implicitDetail.${k}`)),
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
* @Author: ZhaoYing
|
* @Author: ZhaoYing
|
||||||
* @Date: 2025-12-23 16:22:51
|
* @Date: 2025-12-23 16:22:51
|
||||||
* @Last Modified by: ZhaoYing
|
* @Last Modified by: ZhaoYing
|
||||||
* @Last Modified time: 2026-04-13 11:12:18
|
* @Last Modified time: 2026-04-13 14:00:07
|
||||||
*/
|
*/
|
||||||
import { useEffect, useLayoutEffect, useState, useRef, type FC } from 'react';
|
import { useEffect, useLayoutEffect, useState, useRef, type FC } from 'react';
|
||||||
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
import { useLexicalComposerContext } from '@lexical/react/LexicalComposerContext';
|
||||||
@@ -285,23 +285,24 @@ const AutocompletePlugin: FC<{ options: Suggestion[] }> = ({ options }) => {
|
|||||||
ref={popupRef}
|
ref={popupRef}
|
||||||
data-autocomplete-popup="true"
|
data-autocomplete-popup="true"
|
||||||
onMouseDown={(e) => e.preventDefault()}
|
onMouseDown={(e) => e.preventDefault()}
|
||||||
className="rb:min-w-70 rb:max-h-57.5 rb:overflow-y-auto rb:fixed rb:z-1000 rb:bg-white rb:rounded-lg rb:border-[0.5px] rb:border-[#EBEBEB] rb:shadow-[0px_2px_6px_0px_rgba(0,0,0,0.1)] rb:py-3 rb:px-2"
|
className="rb:fixed rb:z-1000 rb:bg-white rb:rounded-lg rb:border-[0.5px] rb:border-[#EBEBEB] rb:shadow-[0px_2px_6px_0px_rgba(0,0,0,0.1)] rb:py-3 rb:px-2"
|
||||||
style={{
|
style={{
|
||||||
top: popupPosition.top,
|
top: popupPosition.top,
|
||||||
left: popupPosition.left,
|
left: popupPosition.left,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Flex vertical gap={12}>
|
<div className="rb:min-w-70 rb:max-h-57.5 rb:overflow-y-auto">
|
||||||
{Object.entries(groupedSuggestions).map(([nodeId, nodeOptions]) => {
|
<Flex vertical gap={12}>
|
||||||
const nodeName = nodeOptions[0]?.nodeData?.name || nodeId;
|
{Object.entries(groupedSuggestions).map(([nodeId, nodeOptions]) => {
|
||||||
return (
|
const nodeName = nodeOptions[0]?.nodeData?.name || nodeId;
|
||||||
<div key={nodeId} className="rb:text-[12px]">
|
return (
|
||||||
{nodeName !== 'undefined' &&
|
<div key={nodeId} className="rb:text-[12px]">
|
||||||
<div className="rb:px-2 rb:leading-4.25 rb:mb-1.25 rb:font-medium rb:text-[#5B6167]">
|
{nodeName !== 'undefined' &&
|
||||||
{nodeName}
|
<div className="rb:px-2 rb:leading-4.25 rb:mb-1.25 rb:font-medium rb:text-[#5B6167]">
|
||||||
</div>
|
{nodeName}
|
||||||
}
|
</div>
|
||||||
<Flex vertical gap={2}>
|
}
|
||||||
|
<Flex vertical gap={2}>
|
||||||
{nodeOptions.map((option) => {
|
{nodeOptions.map((option) => {
|
||||||
const globalIndex = flatOptions.indexOf(option);
|
const globalIndex = flatOptions.indexOf(option);
|
||||||
const isExpanded = expandedParent?.key === option.key;
|
const isExpanded = expandedParent?.key === option.key;
|
||||||
@@ -344,20 +345,21 @@ const AutocompletePlugin: FC<{ options: Suggestion[] }> = ({ options }) => {
|
|||||||
}
|
}
|
||||||
<Space size={2}>
|
<Space size={2}>
|
||||||
{option.dataType && <span>{option.dataType}</span>}
|
{option.dataType && <span>{option.dataType}</span>}
|
||||||
{hasChildren && <div className="rb:size-3 rb:bg-cover rb:bg-[url('src/assets/images/common/arrow_up.svg')] rb:rotate-90"></div>}
|
{hasChildren && <div className="rb:size-3 rb:bg-cover rb:bg-[url('@/assets/images/common/arrow_up.svg')] rb:rotate-90"></div>}
|
||||||
</Space>
|
</Space>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</Flex>
|
</Flex>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</Flex>
|
</Flex>
|
||||||
|
</div>
|
||||||
{/* Child variables panel - floats to the left */}
|
{/* Child variables panel - floats to the left */}
|
||||||
{expandedParent?.children?.length && (
|
{expandedParent?.children?.length && (
|
||||||
<div
|
<div
|
||||||
className="rb:min-w-70 rb:max-h-57.5 rb:overflow-y-auto rb:text-[12px] rb:fixed rb:z-1000 rb:bg-white rb:rounded-lg rb:border-[0.5px] rb:border-[#EBEBEB] rb:shadow-[0px_2px_6px_0px_rgba(0,0,0,0.1)] rb:py-3 rb:px-2"
|
className="rb:absolute rb:min-w-70 rb:max-h-57.5 rb:overflow-y-auto rb:text-[12px] rb:z-1000 rb:bg-white rb:rounded-lg rb:border-[0.5px] rb:border-[#EBEBEB] rb:shadow-[0px_2px_6px_0px_rgba(0,0,0,0.1)] rb:py-3 rb:px-2"
|
||||||
style={{
|
style={{
|
||||||
top: childPanelTop,
|
top: childPanelTop,
|
||||||
right: 'calc(100% + 8px)',
|
right: 'calc(100% + 8px)',
|
||||||
@@ -387,7 +389,9 @@ const AutocompletePlugin: FC<{ options: Suggestion[] }> = ({ options }) => {
|
|||||||
onClick={() => !child.disabled && insertMention(child)}
|
onClick={() => !child.disabled && insertMention(child)}
|
||||||
onMouseEnter={() => setSelectedIndex(childIndex)}
|
onMouseEnter={() => setSelectedIndex(childIndex)}
|
||||||
>
|
>
|
||||||
<span className="rb:font-medium">{child.label}</span>
|
<span className="rb:font-medium">
|
||||||
|
<span className="rb:text-[#155EEF]">{`{x}`}</span> {child.label}
|
||||||
|
</span>
|
||||||
{child.dataType && <span>{child.dataType}</span>}
|
{child.dataType && <span>{child.dataType}</span>}
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ const VariableSelect: FC<VariableSelectProps> = ({
|
|||||||
|
|
||||||
<Space size={2}>
|
<Space size={2}>
|
||||||
{s.dataType && <span>{s.dataType}</span>}
|
{s.dataType && <span>{s.dataType}</span>}
|
||||||
{hasChildren && <div className="rb:size-3 rb:bg-cover rb:bg-[url('src/assets/images/common/arrow_up.svg')] rb:rotate-90"></div>}
|
{hasChildren && <div className="rb:size-3 rb:bg-cover rb:bg-[url('@/assets/images/common/arrow_up.svg')] rb:rotate-90"></div>}
|
||||||
</Space>
|
</Space>
|
||||||
</Flex>
|
</Flex>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user