@douyinfe/semi-foundation 2.43.1 → 2.43.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -230,7 +230,11 @@ export const filterEvents = (events: Map<string, EventObject[]>, start: Date, en
230
230
  const item = events.get(day);
231
231
  const date = new Date(day);
232
232
  if (isDateInRange(date, start, end)) {
233
- res.set(day, item);
233
+ if (res.has(day)) {
234
+ res.set(day, [...res.get(day), ...item]);
235
+ } else {
236
+ res.set(day, item);
237
+ }
234
238
  } else if (isBefore(end, date)) {
235
239
  // do nothing
236
240
  } else {
@@ -320,13 +320,13 @@ export default class CalendarFoundation<P = Record<string, any>, S = Record<stri
320
320
 
321
321
  convertMapToArray(weekMap: Map<string, EventObject[]>, weekStart: Date) {
322
322
  const eventArray = [];
323
+ const map = new Map();
323
324
  for (const entry of weekMap.entries()) {
324
325
  const [key, value] = entry;
325
- const map = new Map();
326
326
  map.set(key, value);
327
- const weekEvents = this._parseWeeklyEvents(map, weekStart);
328
- eventArray.push(...weekEvents);
329
327
  }
328
+ const weekEvents = this._parseWeeklyEvents(map, weekStart);
329
+ eventArray.push(...weekEvents);
330
330
  return eventArray;
331
331
  }
332
332
 
@@ -218,7 +218,11 @@ const filterEvents = (events, start, end) => {
218
218
  const item = events.get(day);
219
219
  const date = new Date(day);
220
220
  if (isDateInRange(date, start, end)) {
221
- res.set(day, item);
221
+ if (res.has(day)) {
222
+ res.set(day, [...res.get(day), ...item]);
223
+ } else {
224
+ res.set(day, item);
225
+ }
222
226
  } else if ((0, _dateFns.isBefore)(end, date)) {
223
227
  // do nothing
224
228
  } else {
@@ -225,13 +225,13 @@ class CalendarFoundation extends _foundation.default {
225
225
  }
226
226
  convertMapToArray(weekMap, weekStart) {
227
227
  const eventArray = [];
228
+ const map = new Map();
228
229
  for (const entry of weekMap.entries()) {
229
230
  const [key, value] = entry;
230
- const map = new Map();
231
231
  map.set(key, value);
232
- const weekEvents = this._parseWeeklyEvents(map, weekStart);
233
- eventArray.push(...weekEvents);
234
232
  }
233
+ const weekEvents = this._parseWeeklyEvents(map, weekStart);
234
+ eventArray.push(...weekEvents);
235
235
  return eventArray;
236
236
  }
237
237
  getParseMonthlyEvents(itemLimit) {
@@ -37,9 +37,11 @@
37
37
  flex-direction: column;
38
38
  }
39
39
  .semi-popconfirm-body {
40
- margin-left: 36px;
41
40
  color: var(--semi-color-text-2);
42
41
  }
42
+ .semi-popconfirm-body-withIcon {
43
+ margin-left: 36px;
44
+ }
43
45
  .semi-popconfirm-body > p {
44
46
  margin: 0;
45
47
  padding: 0;
@@ -46,8 +46,9 @@ $module: #{$prefix}-popconfirm;
46
46
  }
47
47
 
48
48
  &-body {
49
- margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
50
-
49
+ &-withIcon {
50
+ margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
51
+ }
51
52
  color: $color-popconfirm_body-text;
52
53
 
53
54
  & > p {
@@ -493,6 +493,11 @@
493
493
  transform: rotate(0deg);
494
494
  }
495
495
 
496
+ .semi-table-column-filter-dropdown .semi-dropdown-menu {
497
+ max-height: 290px;
498
+ overflow-y: auto;
499
+ }
500
+
496
501
  .semi-table-wrapper-rtl .semi-table {
497
502
  direction: rtl;
498
503
  text-align: right;
@@ -620,4 +620,11 @@ $module: #{$prefix}-table;
620
620
  }
621
621
  }
622
622
 
623
+ .#{$module}-column-filter-dropdown {
624
+ .#{$prefix}-dropdown-menu {
625
+ max-height: $height-table_column_filter_dropdown;
626
+ overflow-y: auto;
627
+ }
628
+ }
629
+
623
630
  @import './rtl.scss';
@@ -42,6 +42,7 @@ $width-table_cell_fixed_left_last: 1px; // 表格左上角单元格底部描边
42
42
  $width-table_cell_fixed_right_first: 1px; // 表格左上角单元格右侧描边宽度
43
43
  $width-table_react_resizable_handle: 9px; // 表格伸缩列调节热区宽度
44
44
  $height-table_pagination_outer_min: 60px; // 表格分页器高度
45
+ $height-table_column_filter_dropdown: 290px; // 表格过滤筛选列表最大高度
45
46
 
46
47
 
47
48
  // Color no need to change
@@ -199,7 +199,11 @@ export const filterEvents = (events, start, end) => {
199
199
  const item = events.get(day);
200
200
  const date = new Date(day);
201
201
  if (isDateInRange(date, start, end)) {
202
- res.set(day, item);
202
+ if (res.has(day)) {
203
+ res.set(day, [...res.get(day), ...item]);
204
+ } else {
205
+ res.set(day, item);
206
+ }
203
207
  } else if (isBefore(end, date)) {
204
208
  // do nothing
205
209
  } else {
@@ -218,13 +218,13 @@ export default class CalendarFoundation extends BaseFoundation {
218
218
  }
219
219
  convertMapToArray(weekMap, weekStart) {
220
220
  const eventArray = [];
221
+ const map = new Map();
221
222
  for (const entry of weekMap.entries()) {
222
223
  const [key, value] = entry;
223
- const map = new Map();
224
224
  map.set(key, value);
225
- const weekEvents = this._parseWeeklyEvents(map, weekStart);
226
- eventArray.push(...weekEvents);
227
225
  }
226
+ const weekEvents = this._parseWeeklyEvents(map, weekStart);
227
+ eventArray.push(...weekEvents);
228
228
  return eventArray;
229
229
  }
230
230
  getParseMonthlyEvents(itemLimit) {
@@ -37,9 +37,11 @@
37
37
  flex-direction: column;
38
38
  }
39
39
  .semi-popconfirm-body {
40
- margin-left: 36px;
41
40
  color: var(--semi-color-text-2);
42
41
  }
42
+ .semi-popconfirm-body-withIcon {
43
+ margin-left: 36px;
44
+ }
43
45
  .semi-popconfirm-body > p {
44
46
  margin: 0;
45
47
  padding: 0;
@@ -46,8 +46,9 @@ $module: #{$prefix}-popconfirm;
46
46
  }
47
47
 
48
48
  &-body {
49
- margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
50
-
49
+ &-withIcon {
50
+ margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
51
+ }
51
52
  color: $color-popconfirm_body-text;
52
53
 
53
54
  & > p {
@@ -493,6 +493,11 @@
493
493
  transform: rotate(0deg);
494
494
  }
495
495
 
496
+ .semi-table-column-filter-dropdown .semi-dropdown-menu {
497
+ max-height: 290px;
498
+ overflow-y: auto;
499
+ }
500
+
496
501
  .semi-table-wrapper-rtl .semi-table {
497
502
  direction: rtl;
498
503
  text-align: right;
@@ -620,4 +620,11 @@ $module: #{$prefix}-table;
620
620
  }
621
621
  }
622
622
 
623
+ .#{$module}-column-filter-dropdown {
624
+ .#{$prefix}-dropdown-menu {
625
+ max-height: $height-table_column_filter_dropdown;
626
+ overflow-y: auto;
627
+ }
628
+ }
629
+
623
630
  @import './rtl.scss';
@@ -42,6 +42,7 @@ $width-table_cell_fixed_left_last: 1px; // 表格左上角单元格底部描边
42
42
  $width-table_cell_fixed_right_first: 1px; // 表格左上角单元格右侧描边宽度
43
43
  $width-table_react_resizable_handle: 9px; // 表格伸缩列调节热区宽度
44
44
  $height-table_pagination_outer_min: 60px; // 表格分页器高度
45
+ $height-table_column_filter_dropdown: 290px; // 表格过滤筛选列表最大高度
45
46
 
46
47
 
47
48
  // Color no need to change
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.43.1",
3
+ "version": "2.43.2",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
7
7
  "prepublishOnly": "npm run build:lib"
8
8
  },
9
9
  "dependencies": {
10
- "@douyinfe/semi-animation": "2.43.1",
10
+ "@douyinfe/semi-animation": "2.43.2",
11
11
  "async-validator": "^3.5.0",
12
12
  "classnames": "^2.2.6",
13
13
  "date-fns": "^2.29.3",
@@ -23,7 +23,7 @@
23
23
  "*.scss",
24
24
  "*.css"
25
25
  ],
26
- "gitHead": "84abaef26e42768a44ba5db31b9891bf508a314e",
26
+ "gitHead": "6c7218869ff6a0c83525f49845b7dc7a858f3705",
27
27
  "devDependencies": {
28
28
  "@babel/plugin-transform-runtime": "^7.15.8",
29
29
  "@babel/preset-env": "^7.15.8",
@@ -46,8 +46,9 @@ $module: #{$prefix}-popconfirm;
46
46
  }
47
47
 
48
48
  &-body {
49
- margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
50
-
49
+ &-withIcon {
50
+ margin-left: $width-popconfirm-icon + $spacing-popconfirm_header_icon-marginRight;
51
+ }
51
52
  color: $color-popconfirm_body-text;
52
53
 
53
54
  & > p {
package/table/table.scss CHANGED
@@ -620,4 +620,11 @@ $module: #{$prefix}-table;
620
620
  }
621
621
  }
622
622
 
623
+ .#{$module}-column-filter-dropdown {
624
+ .#{$prefix}-dropdown-menu {
625
+ max-height: $height-table_column_filter_dropdown;
626
+ overflow-y: auto;
627
+ }
628
+ }
629
+
623
630
  @import './rtl.scss';
@@ -42,6 +42,7 @@ $width-table_cell_fixed_left_last: 1px; // 表格左上角单元格底部描边
42
42
  $width-table_cell_fixed_right_first: 1px; // 表格左上角单元格右侧描边宽度
43
43
  $width-table_react_resizable_handle: 9px; // 表格伸缩列调节热区宽度
44
44
  $height-table_pagination_outer_min: 60px; // 表格分页器高度
45
+ $height-table_column_filter_dropdown: 290px; // 表格过滤筛选列表最大高度
45
46
 
46
47
 
47
48
  // Color no need to change