Skip to content

Commit

Permalink
refactor: 树状层级结构构造取消分割符分割节点 (#1310)
Browse files Browse the repository at this point in the history
* chore(release): 🔖@antv/[email protected]  @antv/[email protected]

* chore(release): 🔖 @antv/[email protected]  @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.3.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.3.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.4.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.4.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.5.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.5.0 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected] (#1003)

* chore(release): 🤖 @antv/s2-v1.6.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.6.0 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected] (#1046)

* chore(release): 🤖 @antv/s2-v1.7.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.7.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.8.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.8.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.9.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.9.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.9.1 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.9.1 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.10.0-alpha.1 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.10.0-alpha.1 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.10.0-alpha.2 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.10.0-alpha.2 [skip ci]

* chore: 🤖 更新 lock 和 changelog 文件 (#1101)

* chore(release): 🔖@antv/[email protected]  @antv/[email protected]

* chore(release): 🔖 @antv/[email protected]  @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.3.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.3.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.4.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.4.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.5.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.5.0 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected] (#1003)

* chore(release): 🤖 @antv/s2-v1.6.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.6.0 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected] (#1046)

* chore(release): 🤖 @antv/s2-v1.7.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.7.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.8.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.8.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.9.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.9.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.9.1 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.9.1 [skip ci]

* chore: 🤖 更新 lock 和 changelog 文件

Co-authored-by: yingying.xwy <[email protected]>
Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: xinhui.zxh <[email protected]>
Co-authored-by: wengyidong.wyd <[email protected]>
Co-authored-by: YardWill <[email protected]>
Co-authored-by: Jinke Li <[email protected]>

* feat(interaction): 透视表支持隐藏列头 (#1081)

* feat(interaction): 透视表支持隐藏列头

* fix: 修复默认隐藏不生效

* docs: 修改文档错别字

* docs: 优化文档

* test: 修复测试

* style(drilldown): 下钻组件增加自定义dom节点 (#1102)

* style(drilldown): 下钻组件增加自定义dom节点

* docs: 补充下钻配置文档

* fix: 修复行头为空无默认角头指标文字问题 (#1104)

* fix: 修复行头为空无默认角头指标文字问题

* test: 增加角头单元格文本单测

* style: 代码优化

* style: 代码优化

* feat(tooltip): tooltip 自定义操作项点击事件透出 cell 信息 close #1106 (#1107)

* feat(tooltip): tooltip 自定义操作项点击事件透出 cell 信息 close #1106

* docs: 完善文档

* fix: 不添加总计时错误地添加了小计节点 (#1111)

* fix: 不添加总计时错误地添加了小计节点

* test: 增加总计节点测试

* docs: 新增获取单元格数据文档 (#1117)

* fix: 增加行头收起展开按钮回调事件的透传参数 (#1121)

* fix: 增加行头收起展开按钮回调事件的透传参数

* test: 单测修复

* fix: 修复头部cell错误使用meta中formatter的问题,close #1014 (#1120)

* fix: 修复头部cell错误format问题

* test: 补充头部cell单测

* fix: 移除col cell中无用的formatter属性

* fix: 对于 extra 字段单独处理

* fix: 明细表锁行/列时分割线阴影显隐逻辑 (#1123)

* fix(facet): 明细表分界线阴影按需绘制

* fix(facet): 兼容分页情况

* fix(copy): 当异步复制失败时降级为同步复制 (#1125)

* fix(copy): 当异步复制失败时降级为同步复制

* docs: 更新文档

* docs: 更新demo

* test: 更新测试

* fix: rename

* test: 修复测试

* fix: 梳理单元格对齐方式, close #1084 (#1128)

* fix: 修复row cell 文本对齐

* fix: 修复corner cell 文本对齐

* refactor: remove unused import

* docs: shrink icon size

* docs: add custom alignment docs

* docs: add alt for img

* docs: add space between word and Chinese

* feat: ✨ 支持覆盖默认icon (#1130)

* fix: corner 事件监听失效(之前只有点击文字时生效) (#1131)

* fix: 修复对全局鼠标按下事件的污染 (#1132)

* fix(interaction): 修复开启复制后, 无法复制表格外的文字 (#1134)

* fix(interaction): 修复开启复制后, 无法复制表格外的文字

* chore: 语法问题

* docs: 新增如何提问 faq (#1118)

* docs: 新增如何提问 faq

* chore: 更新 pr reviewers

* chore: 润湿文档 & s2options => s2Options

* feat: ✨ 允许用户自定义行头单元格宽度 (#1135)

* feat: 维度切换组件增加allowEmpty配置 close #533 (#1136)

* feat: add allowEmpty config for switcher

* docs: update swithcer docs for allow empty config

* docs: add demo gif in docs

* feat: adaptive 的 container 自适应包含 header 和 page (#1133)

* feat: adaptive 的 container 自适应包含 header 和 page

* refactor: adaptive 自适应,使用flex 替代直接获取 element height的方式

* fix: 修复单测报错,1 changeSize 命名 g-base 重复,导致部分代码调用出错。2 添加 wrapper 参数

* test: adaptive 为 false 时,options width 和 height 改变不需要触发 changeSheetSize 方法

* refactor: 添加 changeSize 别名方法,兼容线上使用

* refactor: 样式合并

* feat(tooltip): 支持自定义挂载节点 (#1139)

* feat(tooltip): 支持自定义挂载节点

* test: 修复测试

* test: 修改测试断言描述

* test: 修复测试

* test: 修复测试

* fix: 修复未开启tooltip, 还是会渲染 container 节点的问题

* test: 修复测试

* chore(release): @antv/[email protected] @antv/[email protected] (#1141)

* chore(release): 🤖 @antv/s2-v1.10.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.10.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.11.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.11.0 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected] (#1168)

* chore(release): 🤖 @antv/s2-v1.12.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.11.1 [skip ci]

* chore(release): 🔖@antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.12.1 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-react-v1.11.2 [skip ci]

* fix: 指标列头对齐样式修复升级

* fix: 指标列头对齐样式修复升级

* chore(release): 🔖@antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.12.2 [skip ci]

* chore(release): 🔖@antv/[email protected]

* chore(release): 🤖 @antv/s2-react-v1.11.3 [skip ci]

* feat: 增加根据主题色生成对应主题风格色板功能

* fix: 修复lint报错

* chore(release): @antv/[email protected] @antv/[email protected] (#1198)

* chore(release): 🤖 @antv/s2-v1.13.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.12.0 [skip ci]

* feat: 固定背景色

* chore(release): @antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.14.0-alpha.1 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.13.0-alpha.1 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.13.1 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.12.1 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.14.0-alpha.2 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.13.0-alpha.2 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-react-v1.13.0-alpha.3 [skip ci]

* refactor: 改用hsl颜色

* chore: type

* feat: hsl分量作用方式从
绝对比例改为各自区间相对比例

* chore(release): @antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.14.0-alpha.3 [skip ci]

* feat: 增加搜索高亮交互状态及主题色 (#1240)

* feat: 增加搜索高亮交互状态及主题色

* chore: 修改默认主题值

* chore: 修改版本号

* chore(release): 🔖@antv/[email protected]   @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.14.0-alpha.4 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.13.0-alpha.4 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected] (#1247)

* chore(release): 🤖 @antv/s2-v1.14.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.13.0 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.15.0-alpha.1 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.14.0-alpha.1 [skip ci]

* fix(s2): 如果是 table mode,列头不需要被格式化 (#1249)

* fix(s2): 如果是 table mode,列头不需要被格式化

* fix(s2): 添加明细和聚合模式下,表头的格式化单测

* chore(release): @antv/s2-v1.15.0-alpha.2

* chore(release): 🤖 @antv/s2-v1.15.0-alpha.2 [skip ci]

* chore(release): @antv/[email protected]

* chore(release): 🤖 @antv/s2-react-v1.14.0-alpha.2 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.15.0-alpha.3 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.14.0-alpha.3 [skip ci]

* fix: 添加当多个数值在行头显示时,小计展示被遮挡的问题 (#1267)

* fix: 优先计算样本坐标和宽度

* refactor: 删除 sampleNodeByLevel 这个中间变量,因为本质还是修改 sampleNodesForAllLevels 的引用

* test: 添加当多个数值在行头显示时,小计展示位置单测

* chore(release): @antv/s2-v1.15.0-alpha.4

* chore(release): @antv/s2-v1.15.0-alpha.4

* chore(release): 🤖 @antv/s2-v1.15.0-alpha.4 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.14.0-alpha.4 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.15.0-alpha.5 [skip ci]

* fix: 为第一个子层级时,parentNode.id === ROOT_ID 时,不需要通过分割获取当前节点的真实 value (#1285)

* chore(release): @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.15.0-alpha.6 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.14.0-alpha.5 [skip ci]

* chore(release): @antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.15.0 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.14.0 [skip ci]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🔖@antv/[email protected] @antv/[email protected]

* chore(release): 🤖 @antv/s2-v1.16.0-alpha.1 [skip ci]

* chore(release): 🤖 @antv/s2-react-v1.15.0-alpha.1 [skip ci]

* refactor: 不需要通过 root[&] 进行分割,仍可以获取正确的展示值 (#1304)

Co-authored-by: semantic-release-bot <[email protected]>
Co-authored-by: xinhui.zxh <[email protected]>
Co-authored-by: wengyidong.wyd <[email protected]>
Co-authored-by: YardWill <[email protected]>
Co-authored-by: Jinke Li <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: 刘嘉一 <[email protected]>
Co-authored-by: Wenjun Xu <[email protected]>
Co-authored-by: stone <[email protected]>
Co-authored-by: stone <[email protected]>
  • Loading branch information
11 people authored May 6, 2022
1 parent 1afcbe7 commit 8075b34
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 15 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
"vue:build": "yarn workspace @antv/s2-vue build",
"vue:test": "yarn workspace @antv/s2-vue test",
"vue:watch": " yarn workspace @antv/s2-vue watch",
"build": "lerna run build --include-dependencies --stream",
"build:esm": "lerna run build:esm --include-dependencies --stream",
"build:umd": "lerna run build:umd --include-dependencies --stream",
"build": "lerna run build --include-dependencies --stream --concurrency 1",
"build:esm": "lerna run build:esm --include-dependencies --stream --concurrency 1",
"build:umd": "lerna run build:umd --include-dependencies --stream --concurrency 1",
"bundle:size": "lerna run bundle:size --stream",
"release": "lerna exec --concurrency 1 --ignore @antv/s2-vue -- npx --no-install semantic-release",
"prepublish:manual": "yarn build",
Expand Down
21 changes: 21 additions & 0 deletions packages/s2-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# [@antv/s2-v1.16.0-alpha.1](https://github.com/antvis/S2/compare/@antv/s2-v1.15.0...@antv/s2-v1.16.0-alpha.1) (2022-04-26)


### Bug Fixes

* **s2:** 如果是 table mode,列头不需要被格式化 ([#1249](https://github.com/antvis/S2/issues/1249)) ([d3141d3](https://github.com/antvis/S2/commit/d3141d3b2ca5bc8a68e7333e3e8f720bc121e52d))
* **strategySheet:** 隐藏列兼容趋势分析表衍生指标场景 ([#1299](https://github.com/antvis/S2/issues/1299)) ([f67731e](https://github.com/antvis/S2/commit/f67731ee2d39a806d0f886658d8332646108865c))
* 为第一个子层级时,parentNode.id === ROOT_ID 时,不需要通过分割获取当前节点的真实 value ([#1285](https://github.com/antvis/S2/issues/1285)) ([d488615](https://github.com/antvis/S2/commit/d488615fb68788e316f757eb1ff7da92ebf97628))
* 修复lint报错 ([cbba5d9](https://github.com/antvis/S2/commit/cbba5d9c3ef0dee5026472aac51b3c0e13eadda2))
* 修正auto reset 的 canvas 外判断逻辑 ([#1293](https://github.com/antvis/S2/issues/1293)) ([307963c](https://github.com/antvis/S2/commit/307963ce76325edfdb339abdacdb07ab6e554121))
* 添加当多个数值在行头显示时,小计展示被遮挡的问题 ([#1267](https://github.com/antvis/S2/issues/1267)) ([87127d0](https://github.com/antvis/S2/commit/87127d08cfa3be1a34922a619e4244475f0aa8ff))


### Features

* hsl分量作用方式从 ([2edce7b](https://github.com/antvis/S2/commit/2edce7be4d7e0cf7719dc3988d3a6d6b34ec0b86))
* 固定背景色 ([3c24dad](https://github.com/antvis/S2/commit/3c24dadd93409c648aa417ee0e261c744a016081))
* 增加搜索高亮交互状态及主题色 ([#1240](https://github.com/antvis/S2/issues/1240)) ([0897888](https://github.com/antvis/S2/commit/0897888772172b1afe38f815d95994433cc68915))
* 增加根据主题色生成对应主题风格色板功能 ([9928227](https://github.com/antvis/S2/commit/992822784d65611eed2a1aa80d685e1b0a6d48c3))
* 树状层级样式优化 ([#1302](https://github.com/antvis/S2/issues/1302)) ([ef907db](https://github.com/antvis/S2/commit/ef907db2e870638115e5b905ccf6963de4c4ddd1))

# [@antv/s2-v1.15.0](https://github.com/antvis/S2/compare/@antv/s2-v1.14.0...@antv/s2-v1.15.0) (2022-04-22)


Expand Down
2 changes: 1 addition & 1 deletion packages/s2-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/s2",
"version": "1.15.0",
"version": "1.16.0-alpha.1",
"main": "lib/index.js",
"module": "esm/index.js",
"unpkg": "dist/index.min.js",
Expand Down
11 changes: 1 addition & 10 deletions packages/s2-core/src/facet/layout/build-row-tree-hierarchy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { SpreadSheet } from '@/sheet-type';
import { getListBySorted, filterUndefined } from '@/utils/data-set-operate';
import { getDimensionsWithoutPathPre } from '@/utils/dataset/pivot-data-set';
import { PivotDataSet } from '@/data-set';
import { ID_SEPARATOR, ROOT_ID } from '@/common/constant';

const addTotals = (
spreadsheet: SpreadSheet,
Expand Down Expand Up @@ -41,18 +40,10 @@ export const buildRowTreeHierarchy = (params: TreeHeaderParams) => {
const sortedDimensionValues =
(dataSet as PivotDataSet)?.sortedDimensionValues?.[currentField] || [];

// 为第一个子层级时,parentNode.id === ROOT_ID 时,不需要通过分割获取当前节点的真实 value
const dimensions =
ROOT_ID === id
? sortedDimensionValues
: sortedDimensionValues?.filter((item) =>
item?.includes(id?.split(`${ROOT_ID}${ID_SEPARATOR}`)[1]),
);

const dimValues = filterUndefined(
getListBySorted(
[...(pivotMeta.keys() || [])],
[...getDimensionsWithoutPathPre([...dimensions])],
[...getDimensionsWithoutPathPre([...sortedDimensionValues])],
),
);

Expand Down
7 changes: 7 additions & 0 deletions packages/s2-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [@antv/s2-react-v1.15.0-alpha.1](https://github.com/antvis/S2/compare/@antv/s2-react-v1.14.0...@antv/s2-react-v1.15.0-alpha.1) (2022-04-26)


### Features

* 增加根据主题色生成对应主题风格色板功能 ([9928227](https://github.com/antvis/S2/commit/992822784d65611eed2a1aa80d685e1b0a6d48c3))

# [@antv/s2-react-v1.14.0](https://github.com/antvis/S2/compare/@antv/s2-react-v1.13.0...@antv/s2-react-v1.14.0) (2022-04-22)


Expand Down
2 changes: 1 addition & 1 deletion packages/s2-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/s2-react",
"version": "1.14.0",
"version": "1.15.0-alpha.1",
"main": "lib/index.js",
"module": "esm/index.js",
"unpkg": "dist/index.min.js",
Expand Down

0 comments on commit 8075b34

Please sign in to comment.