Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
YyumeiZhang committed Dec 15, 2023
2 parents 260a104 + aa959f0 commit 9df610b
Show file tree
Hide file tree
Showing 57 changed files with 680 additions and 298 deletions.
1 change: 1 addition & 0 deletions content/input/datepicker/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -927,6 +927,7 @@ function Demo() {
| startDateOffset | When type is dateRange, set the start date of the selected range | (selectedDate?: Date) => Date; | - | **1.10.0** |
| startYear | start year of the year scroll panel | number | 100 years before current year | **2.36.0** |
| endYear | end year of the year scroll panel | number | 100 years after current year | **2.36.0** |
| stopPropagation | Whether to prevent click events on the popup layer from bubbling | boolean | true | |
| syncSwitchMonth | In the scene of range, it supports synchronous switching of the month of the dual panel |boolean|false|**1.28.0**|
| timePickerOpts | For other parameters that can be transparently passed to the time selector, see [TimePicker·API Reference](/en-US/input/timepicker#API%20Reference) | | object | **1.1.0** |
| topSlot | Render the top extra area | ReactNode | | **1.22.0** |
Expand Down
2 changes: 1 addition & 1 deletion content/input/datepicker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,7 @@ function Demo() {
| startDateOffset | type 为 dateRange 时,设置单击选择范围的开始日期 | <ApiType detail='(selectedDate?: Date) => Date '>(selectedDate) => Date </ApiType>| - | **1.10.0** |
| startYear | 滚轮的开始年 | number | 当前年前 100 年 | **2.36.0** |
| endYear | 滚轮的结束年,结束年需要大于开始年 | number | 当前年后 100 年 | **2.36.0** |
| stopPropagation | 是否阻止弹出层上的点击事件冒泡 | boolean | false | |
| stopPropagation | 是否阻止弹出层上的点击事件冒泡 | boolean | true | |
| style | 自定义样式 | CSSProperties | | |
| syncSwitchMonth | 在范围选择的场景中,支持同步切换双面板的月份 | boolean | false | **1.28.0** |
| timePickerOpts | 其他可以透传给时间选择器的参数,详见 [TimePicker·API 参考](/zh-CN/input/timepicker#API_参考) | | object | **1.1.0** |
Expand Down
1 change: 1 addition & 0 deletions content/input/timepicker/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ function Demo(props = {}) {
| scrollItemProps | The props passed through to ScrollItem. The optional values are the same as [ScrollList#API](/zh-CN/show/scrolllist#ScrollItem) | object | | **0.31.0** |
| secondStep | Second option interval | number | 1 |
| showClear | Whether to show the clear button | boolean | true | **0.35.0**|
| stopPropagation | Whether to prevent click events on the popup layer from bubbling | boolean | true | **2.49.0** |
| size | Size of input box, one of 'default', 'small' and 'large' | string | 'default' | |
| triggerRender | Custom trigger rendering method | ({ placeholder: string }) => ReactNode | | **0.34.0** |
| type | type | "time"\|"timeRange" | "time" |
Expand Down
1 change: 1 addition & 0 deletions content/input/timepicker/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ function Demo(props = {}) {
| scrollItemProps | 透传给 scrollItem 的属性,可选值同[ScrollList#API](/zh-CN/show/scrolllist#ScrollItem) | object | | **0.31.0** |
| secondStep | 秒选项间隔 | number | 1 | |
| showClear | 是否展示清除按钮 **v>=0.35.0** | boolean | true | |
| stopPropagation | 是否阻止弹出层上的点击事件冒泡 | boolean | true | **2.49.0** |
| size | 输入框的大小,可选 'default','small','large' | string | 'default' | |
| triggerRender | 自定义触发器渲染方法 | ({ placeholder: string }) => ReactNode | - | **0.34.0** |
| type | 类型 | "time"\|"timeRange" | "time" | |
Expand Down
3 changes: 3 additions & 0 deletions content/show/calendar/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ class Demo extends React.Component {
{
key: '6',
start: new Date(2019, 6, 23, 8, 32, 0),
end: new Date(2019, 6, 23, 8,42, 0),
children: <div style={dailyStyle}>July 23 8:32</div>,
},
{
Expand Down Expand Up @@ -229,6 +230,7 @@ class Demo extends React.Component {
mode={mode}
displayValue={displayValue}
events={events}
minEventHeight={40}
range={mode === 'range' ? [new Date(2019, 6, 23), new Date(2019, 6, 26)] : []}
></Calendar>
</>
Expand Down Expand Up @@ -356,6 +358,7 @@ import { Avatar, Calendar } from '@douyinfe/semi-ui';
| header | Header | React.Node | - |
| height | Height | string\|number | 600 |
| markWeekend | Toggle whether to distinguish weekend column with grey background from weekdays | boolean | false |
| minEventHeight | The minimum height of events in daily view, multi-day view and weekly view(**>=2.49.0**) | number | Number.MIN_SAFE_INTEGER |
| mode | Mode, one of `day`, `week`, `month`, `range`(**>=1.5.0**) | "day" \| "week" \| "month" \| "range" | `week` |
| onClick | Callback invoked when clicking on date, basic unit for day and week mode is 0.5h, for month mode is 1d | function(e: Event, date: Date) | - |
| onClose | Callback invoked when event display card close in the month mode | function(e: Event) | - |
Expand Down
3 changes: 3 additions & 0 deletions content/show/calendar/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ class Demo extends React.Component {
{
key: '6',
start: new Date(2019, 6, 23, 8, 32, 0),
end: new Date(2019, 6, 23, 8, 42, 0),
children: <div style={dailyStyle}>7238:32</div>,
},
{
Expand Down Expand Up @@ -221,6 +222,7 @@ class Demo extends React.Component {
mode={mode}
displayValue={displayValue}
events={events}
minEventHeight={40}
range={mode === 'range' ? [new Date(2019, 6, 23), new Date(2019, 6, 26)] : []}
></Calendar>
</>
Expand Down Expand Up @@ -333,6 +335,7 @@ import { Avatar, Calendar } from '@douyinfe/semi-ui';
| header | 自定义头部内容 | ReactNode | - |
| height | 日历高度 | string\|number | 600 |
| markWeekend | 区分周末列和工作日,以灰色显示 | boolean | false |
| minEventHeight | 日视图、多日视图以及周视图下事件的最小高度(**>=2.49.0**) | number | Number.MIN_SAFE_INTEGER |
| mode | 初始模式,`day`, `week`, `month`, `range`(**>=1.5.0**) | "day" \| "week" \| "month" \| "range" | `week` |
| onClick | 单击日期格的回调,日视图和周视图以半小时为单位,月视图以日为单位 | function(e: Event, date: Date) | - |
| onClose | 月视图下,展示所有 event 的卡片关闭时的回调 | function(e: Event) | - |
Expand Down
1 change: 1 addition & 0 deletions content/show/sidesheet/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ class Demo extends React.Component {
| bodyStyle | Content style | CSSProperties | - | - |
| className | Class name | string | - | - |
| closable | Toggle whether to show close button | boolean | true | - |
| closeIcon | Icon for close button | ReactNode | <IconClose /\> | - |
| closeOnEsc | oggle whether to allow close modal by keyboard event Esc | boolean | false | 1.0.0 |
| disableScroll | Toggle whether to add `overflow: hidden` to document.body element. Only works when not setting `getPopupContainer` | boolean | true | - |
| footer | Footer | ReactNode | null | 1.3.0 |
Expand Down
1 change: 1 addition & 0 deletions content/show/sidesheet/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ class Demo extends React.Component {
| bodyStyle | 面板内容的样式 | CSSProperties | - | - |
| className | 类名 | string | - | - |
| closable | 是否允许通过右上角的关闭按钮关闭 | boolean | true | - |
| closeIcon | 关闭按钮的 icon | ReactNode | <IconClose /\> | - |
| closeOnEsc | 允许通过键盘事件 Esc 触发关闭 | boolean | false | 1.0.0 |
| disableScroll | 默认渲染在 document.body 层时是否禁止 body 的滚动,即给 body 添加 `overflow: hidden` | boolean | true | - |
| footer | 侧边栏底部 | ReactNode | null | 1.3.0 |
Expand Down
1 change: 1 addition & 0 deletions content/show/table/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -4992,6 +4992,7 @@ render(App);
| groupBy | Grouping basis, generally a method of a key name or a return value of a string or number in the dataSource element | string\|number<br/>\|(record: any) => string\|number | | **0.29.0** |
| hideExpandedColumn | Whether to hide the expansion button column and turn off the rendering of the expansion button when it is turned on | boolean | true |
| indentSize | indent size of TableCell | number | 20 |
| keepDOM | Whether to not destroy the collapsed DOM when folding a row | boolean | false |
| loading | Table is loading or not | boolean | false |
| pagination | Paging component configuration | boolean\|TablePaginationProps | true |
| prefixCls | Style name prefix | string | |
Expand Down
1 change: 1 addition & 0 deletions content/show/table/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5003,6 +5003,7 @@ render(App);
| groupBy | 分组依据,一般为 dataSource 元素中某个键名或者返回值为字符串、数字的一个方法 | string\|number<br/>\|(record: RecordType) => string\|number | | **0.29.0** |
| hideExpandedColumn | 当表格可展开时,展开按钮默认会与第一列文案渲染在同一个单元格内,设为 false 时默认将展开按钮单独作为一列渲染 | boolean | true |
| indentSize | 树形结构 TableCell 的缩进大小 | number | 20 |
| keepDOM | 折叠行时是否不销毁被折叠的 DOM | boolean | false |
| loading | 页面是否加载中 | boolean | false |
| pagination | 分页组件配置 | boolean\|TablePaginationProps | true |
| prefixCls | 样式名前缀 | string | |
Expand Down
16 changes: 15 additions & 1 deletion content/start/changelog/index-en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,28 @@ Version:Major.Minor.Patch (follow the **Semver** specification)

---


#### 🎉 2.49.0-beta.0 (2023-12-11)
- 【Feat】
- Table supports keepDOM and does not destroy folded rows when folding [#1969](https://github.com/DouyinFE/semi-design/pull/1969)
- Calendar adds the minEventHeight api to support the display of the event dom structure with a minimum height when the event start and end are very close in day, multi-day and week views [#702](https://github.com/DouyinFE/semi-design/issues/702)
- Timepicker adds stopPropagation to determine whether to prevent click events on the popup layer from bubbling [#1966](https://github.com/DouyinFE/semi-design/pull/1966)
- The SideSheet component supports custom closeIcon [@LonelySnowman](https://github.com/LonelySnowman) [#1948](https://github.com/DouyinFE/semi-design/issues/1948)
- 【Fix】
- Fixed the issue where the tooltip on the Slider handle occasionally flickers when dragging [#1935](https://github.com/DouyinFE/semi-design/pull/1935)
- Fixed typography JS truncation calculation error for non-wrapped text [@marshcat0](https://github.com/marshcat0)
- Fixed the issue where Radio pure card clicks on the hotspot incorrectly under Safari [@nekocode](https://github.com/nekocode) [#1959](https://github.com/DouyinFE/semi-design/issues/1959)
- 【Docs】
- Add VChart chart introduction


#### 🎉 2.48.0 (2023-12-01)
- 【Fix】
- fixed the issue of incorrect defaultValue setting when TimePicker format is HH. (Note: If the value type originally passed in default or value is illegal, for example, a timestamp in numeric format is passed in in string form, type conversion will no longer be attempted)
- 【Docs】
- add @douyinfe/semi-icons-lab description



#### 🎉 2.48.0-beta.0 (2023-11-27)
- 【Feat】
- Slider adds `showMarkLabel` to control the visibility of the label, `tooltipOnMark` to display the tooltip on the mark, and `showArrow` to control the visibility of the tooltip triangle.
Expand Down
14 changes: 14 additions & 0 deletions content/start/changelog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,20 @@ Semi 版本号遵循 **Semver** 规范(主版本号-次版本号-修订版本
- 修订版本号(patch):仅会进行 bugfix,发布时间不限
- 不同版本间的详细关系,可查阅 [FAQ](/zh-CN/start/faq)

#### 🎉 2.49.0-beta.0 (2023-12-11)
- 【Feat】
- Table 支持 keepDOM,在折叠时不销毁被折叠的行 [#1969](https://github.com/DouyinFE/semi-design/pull/1969)
- Calendar 新增 minEventHeight api 以支持在日、多日以及周视图下,当 event start 和 end 非常接近时,event dom 结构存在且有最小高度的展示 [#702](https://github.com/DouyinFE/semi-design/issues/702)
- Timepicker 新增 stopPropagation 用于判断是否阻止弹出层上的点击事件冒泡 [#1966](https://github.com/DouyinFE/semi-design/pull/1966)
- SideSheet 组件支持自定义 closeIcon [@LonelySnowman](https://github.com/LonelySnowman) [#1948](https://github.com/DouyinFE/semi-design/issues/1948)
- 【Fix】
- 修复 Slider 把手上的tooltip 在拖动时偶尔闪烁的问题 [#1935](https://github.com/DouyinFE/semi-design/pull/1935)
- 修复 Typography JS截断对于不换行文本的计算错误 [@marshcat0](https://github.com/marshcat0)
- 修复 Radio pure card 在 Safari 下点击热区不正确的问题 [@nekocode](https://github.com/nekocode) [#1959](https://github.com/DouyinFE/semi-design/issues/1959)
- 【Docs】
- 新增 VChart 图表介绍


#### 🎉 2.48.0 (2023-12-01)
- 【Fix】
- 修复 TimePicker format 为 HH 时,defaultValue 设置不正确问题。(注意:若原先 default 或 value 传入的值类型不合法,例如数字格式的时间戳以字符串形式传入,将不再尝试进行类型转换)
Expand Down
11 changes: 11 additions & 0 deletions cypress/e2e/table.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,15 @@ describe('table', () => {
expect(style.height).eq('0px');
});
})

it('test keepDOM', () => {
cy.visit('http://localhost:6006/iframe.html?id=table--keep-dom&viewMode=story');
cy.get('[data-cy=expand] .semi-table-row-hidden').should('have.length', 3);
cy.get('[data-cy=tree] .semi-table-row-hidden').should('have.length', 5);
cy.get('[data-cy=tree] .semi-table-expand-icon').eq(0).click();
cy.get('[data-cy=tree] .semi-table-row-hidden').should('have.length', 3);
cy.get('[data-cy=section] .semi-table-row-hidden').should('have.length', 10);
cy.get('[data-cy=section] .semi-table-expand-icon').eq(0).click({ force: true });
cy.get('[data-cy=section] .semi-table-row-hidden').should('have.length', 7);
});
});
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"useWorkspaces": true,
"npmClient": "yarn",
"version": "2.48.0"
"version": "2.49.0-beta.0"
}
Loading

0 comments on commit 9df610b

Please sign in to comment.