From b643fcc4e55a49803f4a46af9d25f1c6b542ee48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E7=86=B1?= Date: Mon, 6 Jan 2025 12:03:36 +0800 Subject: [PATCH] fix: fix the case of import paths to ensure consistency --- examples/package.json | 1 + package.json | 2 +- .../rule-edit/{colorScale.tsx => ColorScale.tsx} | 0 .../panel/rule-edit/{dataBar.tsx => DataBar.tsx} | 0 .../panel/rule-edit/{formula.tsx => Formula.tsx} | 0 .../{highlightCell.tsx => HighlightCell.tsx} | 0 .../panel/rule-edit/{iconSet.tsx => IconSet.tsx} | 6 +++--- .../panel/rule-edit/{rank.tsx => Rank.tsx} | 0 .../src/components/panel/rule-edit/index.tsx | 12 ++++++------ pnpm-lock.yaml | 3 +++ 10 files changed, 14 insertions(+), 10 deletions(-) rename packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/{colorScale.tsx => ColorScale.tsx} (100%) rename packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/{dataBar.tsx => DataBar.tsx} (100%) rename packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/{formula.tsx => Formula.tsx} (100%) rename packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/{highlightCell.tsx => HighlightCell.tsx} (100%) rename packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/{iconSet.tsx => IconSet.tsx} (99%) rename packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/{rank.tsx => Rank.tsx} (100%) diff --git a/examples/package.json b/examples/package.json index 747f0a3edf4a..90fe7059c2ab 100644 --- a/examples/package.json +++ b/examples/package.json @@ -65,6 +65,7 @@ "@univerjs/uni-docs-ui": "workspace:*", "@univerjs/uni-formula": "workspace:*", "@univerjs/uni-formula-ui": "workspace:*", + "@univerjs/uni-sheets-ui": "workspace:*", "@univerjs/uni-slides-ui": "workspace:*", "@univerjs/uniscript": "workspace:*", "@univerjs/uniui": "workspace:*", diff --git a/package.json b/package.json index 96a9790eb643..a20cf27c1991 100644 --- a/package.json +++ b/package.json @@ -69,9 +69,9 @@ "eslint-plugin-react-refresh": "^0.4.16", "husky": "^9.1.7", "lint-staged": "^15.3.0", - "release-it": "^17.11.0", "react": "19.0.0", "react-dom": "19.0.0", + "release-it": "^17.11.0", "serve": "^14.2.4", "tsx": "^4.19.2", "turbo": "^2.3.3", diff --git a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/colorScale.tsx b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/ColorScale.tsx similarity index 100% rename from packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/colorScale.tsx rename to packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/ColorScale.tsx diff --git a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/dataBar.tsx b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/DataBar.tsx similarity index 100% rename from packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/dataBar.tsx rename to packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/DataBar.tsx diff --git a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/formula.tsx b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/Formula.tsx similarity index 100% rename from packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/formula.tsx rename to packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/Formula.tsx diff --git a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/highlightCell.tsx b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/HighlightCell.tsx similarity index 100% rename from packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/highlightCell.tsx rename to packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/HighlightCell.tsx diff --git a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/iconSet.tsx b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/IconSet.tsx similarity index 99% rename from packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/iconSet.tsx rename to packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/IconSet.tsx index 5ddeda7d8e47..5a98e03744d8 100644 --- a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/iconSet.tsx +++ b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/IconSet.tsx @@ -37,7 +37,7 @@ import { import { FormulaEditor } from '@univerjs/sheets-formula-ui'; import { ILayoutService, useScrollYOverContainer, useSidebarClick } from '@univerjs/ui'; -import React, { forwardRef, useEffect, useMemo, useRef, useState } from 'react'; +import React, { useEffect, useMemo, useRef, useState } from 'react'; import stylesBase from '../index.module.less'; import styles from './index.module.less'; @@ -108,7 +108,7 @@ interface IconGroupListProps { onClick: (iconType: IIconType) => void; iconType?: IIconType; }; -const IconGroupList = forwardRef((props, ref) => { +const IconGroupList = ({ ref, ...props }: IconGroupListProps & { ref: React.RefObject }) => { const localeService = useDependency(LocaleService); const handleClick = (iconType: IIconType) => { @@ -137,7 +137,7 @@ const IconGroupList = forwardRef((pro })} ); -}); +}; const IconItemList = (props: { onClick: (iconType: IIconType, iconId: string) => void; iconType?: IIconType; iconId: string }) => { const list = useMemo(() => { diff --git a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/rank.tsx b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/Rank.tsx similarity index 100% rename from packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/rank.tsx rename to packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/Rank.tsx diff --git a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/index.tsx b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/index.tsx index 6c0c30215029..3959e1eab0e9 100644 --- a/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/index.tsx +++ b/packages/sheets-conditional-formatting-ui/src/components/panel/rule-edit/index.tsx @@ -34,13 +34,13 @@ import { AddCfCommand } from '../../../commands/commands/add-cf.command'; import { SetCfCommand } from '../../../commands/commands/set-cf.command'; import styleBase from '../index.module.less'; -import { ColorScaleStyleEditor } from './colorScale'; -import { DataBarStyleEditor } from './dataBar'; -import { FormulaStyleEditor } from './formula'; -import { HighlightCellStyleEditor } from './highlightCell'; -import { IconSet } from './iconSet'; +import { ColorScaleStyleEditor } from './ColorScale'; +import { DataBarStyleEditor } from './DataBar'; +import { FormulaStyleEditor } from './Formula'; +import { HighlightCellStyleEditor } from './HighlightCell'; +import { IconSet } from './IconSet'; import styles from './index.module.less'; -import { RankStyleEditor } from './rank'; +import { RankStyleEditor } from './Rank'; import { beforeSubmit, submit } from './type'; interface IRuleEditProps { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 55252ea17585..73c2122a3217 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -424,6 +424,9 @@ importers: '@univerjs/uni-formula-ui': specifier: workspace:* version: link:../packages-experimental/uni-formula-ui + '@univerjs/uni-sheets-ui': + specifier: workspace:* + version: link:../packages-experimental/uni-sheets-ui '@univerjs/uni-slides-ui': specifier: workspace:* version: link:../packages-experimental/uni-slides-ui