From 985c6300f400ed3ee474b48cd89eda1731566ade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A4=A7=E7=8C=AB=E5=85=BC=E7=BB=AD?= Date: Tue, 1 Aug 2023 19:44:23 +0800 Subject: [PATCH] :bug: fix: test snapshot udpate (#53) * :bug: fix: test snapshot udpate * :bug: fix: MappingAlgorithm no longer exported * :camera_flash: build: update snapshot * :tada: fix: MappingAlgorithm type position --- package.json | 20 +- src/theme/themes/darkAlgorithm.ts | 2 +- tests/__snapshots__/demo.test.tsx.snap | 241 +++++++++++-------------- 3 files changed, 115 insertions(+), 148 deletions(-) diff --git a/package.json b/package.json index 4977b339..31096737 100644 --- a/package.json +++ b/package.json @@ -57,8 +57,8 @@ ] }, "dependencies": { - "@ant-design/icons": "^5.1.4", - "@ant-design/pro-components": "^2.6.7", + "@ant-design/icons": "^5.2.1", + "@ant-design/pro-components": "^2.6.10", "@antv/dw-random": "^1.1.7", "@babel/runtime": "^7.22.6", "@dnd-kit/core": "^6.0.8", @@ -70,7 +70,7 @@ "@faker-js/faker": "^7.6.0", "@floating-ui/react": "^0.24.8", "@handsontable/react": "^12.4.0", - "@mui/material": "^5.14.1", + "@mui/material": "^5.14.2", "@textea/json-viewer": "^3.1.1", "ahooks": "^3.7.8", "classnames": "^2.3.2", @@ -111,7 +111,7 @@ "umi-request": "^1.4.0", "use-merge-value": "^1.2.0", "yjs": "^13.6.7", - "zustand": "^4.3.9", + "zustand": "^4.4.0", "zustand-middleware-yjs": "^1.3.1", "zustand-utils": "^1.3.0" }, @@ -122,20 +122,20 @@ "@testing-library/user-event": "^14.4.3", "@types/color": "^3.0.3", "@types/json-schema": "^7.0.12", - "@types/react": "^18.2.15", + "@types/react": "^18.2.18", "@types/react-dom": "^18.2.7", - "@umijs/lint": "^4.0.72", + "@umijs/lint": "^4.0.73", "@vitest/coverage-v8": "latest", - "antd": "^5.7.2", + "antd": "^5.8.0", "antd-style": "^3.4.3", "babel-plugin-antd-style": "^1.0.4", "commitlint": "^17.6.7", "commitlint-config-gitmoji": "^2.3.1", "conventional-changelog-gitmoji-config": "^1.5.2", - "dumi": "^2.2.1", + "dumi": "^2.2.4", "dumi-theme-antd-style": "latest", - "eslint": "^8.45.0", - "father": "^4.2.3", + "eslint": "^8.46.0", + "father": "^4.3.0", "gh-pages": "^5.0.0", "glob": "^10.3.3", "husky": "^8.0.3", diff --git a/src/theme/themes/darkAlgorithm.ts b/src/theme/themes/darkAlgorithm.ts index ddce6372..faa12d92 100644 --- a/src/theme/themes/darkAlgorithm.ts +++ b/src/theme/themes/darkAlgorithm.ts @@ -1,5 +1,5 @@ import { theme } from 'antd'; -import type { MappingAlgorithm } from 'antd/es/config-provider/context'; +import type { MappingAlgorithm } from 'antd/es/theme/interface'; /** * studio 暗色模式下算法 diff --git a/tests/__snapshots__/demo.test.tsx.snap b/tests/__snapshots__/demo.test.tsx.snap index 47bd0703..09dd459a 100644 --- a/tests/__snapshots__/demo.test.tsx.snap +++ b/tests/__snapshots__/demo.test.tsx.snap @@ -1112,7 +1112,6 @@ exports[` > renders actions.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders actions.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -1200,7 +1200,6 @@ exports[` > renders actions.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders actions.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -1408,7 +1408,6 @@ exports[` > renders actions.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders actions.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -1496,7 +1496,6 @@ exports[` > renders actions.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders actions.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -1704,7 +1704,6 @@ exports[` > renders actions.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders actions.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -1792,7 +1792,6 @@ exports[` > renders actions.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders actions.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -2358,7 +2358,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -2446,7 +2446,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -2625,7 +2625,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -2713,7 +2713,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -2892,7 +2892,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -2980,7 +2980,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -3159,7 +3159,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -3247,7 +3247,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -3426,7 +3426,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -3514,7 +3514,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -3693,7 +3693,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -3781,7 +3781,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -3960,7 +3960,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -4048,7 +4048,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -4227,7 +4227,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -4315,7 +4315,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -4494,7 +4494,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -4582,7 +4582,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -4761,7 +4761,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -4849,7 +4849,6 @@ exports[` > renders column.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders column.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -5386,7 +5386,6 @@ exports[` > renders controlled.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders controlled.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -5474,7 +5474,6 @@ exports[` > renders controlled.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders controlled.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -5653,7 +5653,6 @@ exports[` > renders controlled.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders controlled.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -5741,7 +5741,6 @@ exports[` > renders controlled.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders controlled.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -5920,7 +5920,6 @@ exports[` > renders controlled.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders controlled.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -6008,7 +6008,6 @@ exports[` > renders controlled.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders controlled.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -6545,7 +6545,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -6633,7 +6633,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -6812,7 +6812,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -6900,7 +6900,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -7079,7 +7079,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -7167,7 +7167,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -7346,7 +7346,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -7434,7 +7434,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -7613,7 +7613,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -7701,7 +7701,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -7880,7 +7880,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -7968,7 +7968,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -8147,7 +8147,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -8235,7 +8235,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -8414,7 +8414,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -8502,7 +8502,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -8681,7 +8681,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -8769,7 +8769,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -8948,7 +8948,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -9036,7 +9036,6 @@ exports[` > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` aria-hidden="true" data-icon="close-circle" fill="currentColor" + fill-rule="evenodd" focusable="false" height="1em" viewBox="64 64 896 896" width="1em" > @@ -16884,7 +16884,6 @@ exports[` > renders basic.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders theme.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders theme.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders theme.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders theme.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders actions.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders actions.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders actions.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders compact.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders compact.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders compact.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders custom.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders header.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders header.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders header.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders provider.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders provider.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders provider.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders ref.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders ref.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders ref.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders renderContent.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders renderContent.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders renderContent.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders useSortableList.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders useSortableList.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders useSortableList.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders select.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders select.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders select.tsx correctly 1`] = ` class="studio-select-selection-search" > > renders select.tsx correctly 1`] = ` class="studio-select-selection-search" >