@douyinfe/semi-foundation 2.34.0-alpha.1 → 2.34.0

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.
Files changed (78) hide show
  1. package/breadcrumb/breadcrumb.scss +4 -4
  2. package/calendar/eventUtil.ts +9 -7
  3. package/calendar/foundation.ts +4 -4
  4. package/cascader/foundation.ts +24 -13
  5. package/lib/cjs/breadcrumb/breadcrumb.css +0 -3
  6. package/lib/cjs/breadcrumb/breadcrumb.scss +4 -4
  7. package/lib/cjs/calendar/eventUtil.d.ts +7 -6
  8. package/lib/cjs/calendar/eventUtil.js +8 -6
  9. package/lib/cjs/calendar/foundation.d.ts +2 -2
  10. package/lib/cjs/calendar/foundation.js +2 -2
  11. package/lib/cjs/cascader/foundation.d.ts +3 -1
  12. package/lib/cjs/cascader/foundation.js +26 -8
  13. package/lib/cjs/navigation/itemFoundation.d.ts +0 -2
  14. package/lib/cjs/navigation/navigation.css +7 -77
  15. package/lib/cjs/navigation/navigation.scss +7 -119
  16. package/lib/cjs/navigation/subNavFoundation.d.ts +0 -2
  17. package/lib/cjs/radio/radio.css +1 -0
  18. package/lib/cjs/radio/radio.scss +1 -0
  19. package/lib/cjs/steps/bacisSteps.scss +238 -287
  20. package/lib/cjs/steps/fillSteps.scss +142 -153
  21. package/lib/cjs/steps/navSteps.scss +40 -61
  22. package/lib/cjs/steps/steps.css +28 -392
  23. package/lib/cjs/table/foundation.d.ts +5 -0
  24. package/lib/cjs/table/table.css +23 -5
  25. package/lib/cjs/table/table.scss +25 -5
  26. package/lib/cjs/table/utils.d.ts +2 -0
  27. package/lib/cjs/table/utils.js +6 -0
  28. package/lib/cjs/timePicker/foundation.js +15 -1
  29. package/lib/cjs/timeline/timeline.css +0 -36
  30. package/lib/cjs/timeline/timeline.scss +46 -96
  31. package/lib/cjs/tree/treeUtil.d.ts +1 -1
  32. package/lib/cjs/typography/typography.css +8 -0
  33. package/lib/cjs/typography/typography.scss +13 -0
  34. package/lib/cjs/upload/constants.d.ts +1 -1
  35. package/lib/es/breadcrumb/breadcrumb.css +0 -3
  36. package/lib/es/breadcrumb/breadcrumb.scss +4 -4
  37. package/lib/es/calendar/eventUtil.d.ts +7 -6
  38. package/lib/es/calendar/eventUtil.js +8 -6
  39. package/lib/es/calendar/foundation.d.ts +2 -2
  40. package/lib/es/calendar/foundation.js +2 -2
  41. package/lib/es/cascader/foundation.d.ts +3 -1
  42. package/lib/es/cascader/foundation.js +26 -8
  43. package/lib/es/navigation/itemFoundation.d.ts +0 -2
  44. package/lib/es/navigation/navigation.css +7 -77
  45. package/lib/es/navigation/navigation.scss +7 -119
  46. package/lib/es/navigation/subNavFoundation.d.ts +0 -2
  47. package/lib/es/radio/radio.css +1 -0
  48. package/lib/es/radio/radio.scss +1 -0
  49. package/lib/es/steps/bacisSteps.scss +238 -287
  50. package/lib/es/steps/fillSteps.scss +142 -153
  51. package/lib/es/steps/navSteps.scss +40 -61
  52. package/lib/es/steps/steps.css +28 -392
  53. package/lib/es/table/foundation.d.ts +5 -0
  54. package/lib/es/table/table.css +23 -5
  55. package/lib/es/table/table.scss +25 -5
  56. package/lib/es/table/utils.d.ts +2 -0
  57. package/lib/es/table/utils.js +5 -0
  58. package/lib/es/timePicker/foundation.js +14 -1
  59. package/lib/es/timeline/timeline.css +0 -36
  60. package/lib/es/timeline/timeline.scss +46 -96
  61. package/lib/es/tree/treeUtil.d.ts +1 -1
  62. package/lib/es/typography/typography.css +8 -0
  63. package/lib/es/typography/typography.scss +13 -0
  64. package/lib/es/upload/constants.d.ts +1 -1
  65. package/navigation/itemFoundation.ts +1 -3
  66. package/navigation/navigation.scss +7 -119
  67. package/navigation/subNavFoundation.ts +1 -3
  68. package/package.json +2 -2
  69. package/radio/radio.scss +1 -0
  70. package/steps/bacisSteps.scss +238 -287
  71. package/steps/fillSteps.scss +142 -153
  72. package/steps/navSteps.scss +40 -61
  73. package/table/foundation.ts +6 -2
  74. package/table/table.scss +25 -5
  75. package/table/utils.ts +6 -0
  76. package/timePicker/foundation.ts +12 -3
  77. package/timeline/timeline.scss +46 -96
  78. package/typography/typography.scss +13 -0
@@ -1,4 +1,5 @@
1
1
  import { strings } from './constants';
2
+ import type { BaseEllipsis } from './foundation';
2
3
  export declare function equalWith(value: any, other: any, customizer?: (...args: any[]) => boolean): boolean;
3
4
  export declare function getColumnKey(column: any, keyPropNames: any[]): any;
4
5
  /**
@@ -151,3 +152,4 @@ export declare function isTreeTable({ dataSource, childrenRecordName }: {
151
152
  childrenRecordName?: string;
152
153
  }): boolean;
153
154
  export declare function getRTLAlign(align: typeof strings.ALIGNS[number], direction?: 'ltr' | 'rtl'): typeof strings.ALIGNS[number];
155
+ export declare function shouldShowEllipsisTitle(ellipsis: BaseEllipsis): any;
@@ -38,6 +38,7 @@ exports.isSelected = isSelected;
38
38
  exports.isSelectionColumn = isSelectionColumn;
39
39
  exports.isTreeTable = isTreeTable;
40
40
  exports.mergeQueries = mergeQueries;
41
+ exports.shouldShowEllipsisTitle = shouldShowEllipsisTitle;
41
42
  exports.sliceColumnsByLevel = sliceColumnsByLevel;
42
43
  exports.warnIfNoDataIndex = warnIfNoDataIndex;
43
44
  exports.withResizeWidth = withResizeWidth;
@@ -592,4 +593,9 @@ function getRTLAlign(align, direction) {
592
593
  }
593
594
 
594
595
  return align;
596
+ }
597
+
598
+ function shouldShowEllipsisTitle(ellipsis) {
599
+ const shouldShowTitle = ellipsis === true || (0, _get2.default)(ellipsis, 'showTitle', true);
600
+ return shouldShowTitle;
595
601
  }
@@ -5,6 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
+ var _isUndefined2 = _interopRequireDefault(require("lodash/isUndefined"));
9
+
8
10
  var _split2 = _interopRequireDefault(require("lodash/split"));
9
11
 
10
12
  var _constants = require("./constants");
@@ -374,7 +376,19 @@ class TimePickerFoundation extends _foundation.default {
374
376
  }
375
377
 
376
378
  if (_dates && Array.isArray(_dates)) {
377
- return _dates.map(date => (0, _utils.formatToString)(date, validFormat, dateFnsLocale)).join(rangeSeparator);
379
+ const result = _dates.map(date => {
380
+ let str;
381
+
382
+ if ((0, _isUndefined2.default)(date)) {
383
+ str = '';
384
+ } else {
385
+ str = (0, _utils.formatToString)(date, validFormat, dateFnsLocale);
386
+ }
387
+
388
+ return str;
389
+ });
390
+
391
+ return result.join(rangeSeparator);
378
392
  }
379
393
 
380
394
  return undefined;
@@ -126,42 +126,6 @@
126
126
  width: calc(100% - 28px);
127
127
  }
128
128
 
129
- .semi-timeline-item-alternate .semi-timeline-item-tail, .semi-timeline-item-alternate .semi-timeline-item-head, .semi-timeline-item-alternate .semi-timeline-item-head-custom, .semi-timeline-item-mode-right .semi-timeline-item-tail, .semi-timeline-item-mode-right .semi-timeline-item-head, .semi-timeline-item-mode-right .semi-timeline-item-head-custom, .semi-timeline-item-center .semi-timeline-item-tail, .semi-timeline-item-center .semi-timeline-item-head, .semi-timeline-item-center .semi-timeline-item-head-custom {
130
- left: 50%;
131
- }
132
- .semi-timeline-item-alternate .semi-timeline-item-head.semi-timeline-item-head-custom, .semi-timeline-item-mode-right .semi-timeline-item-head.semi-timeline-item-head-custom, .semi-timeline-item-center .semi-timeline-item-head.semi-timeline-item-head-custom {
133
- margin-left: 0;
134
- }
135
- .semi-timeline-item-alternate .semi-timeline-item-head, .semi-timeline-item-mode-right .semi-timeline-item-head, .semi-timeline-item-center .semi-timeline-item-head {
136
- margin-left: -4px;
137
- }
138
- .semi-timeline-item-alternate.semi-timeline-item-left .semi-timeline-item-content, .semi-timeline-item-mode-right.semi-timeline-item-left .semi-timeline-item-content, .semi-timeline-item-center.semi-timeline-item-left .semi-timeline-item-content {
139
- left: calc(50% - 4px);
140
- width: calc(50% - 14px);
141
- text-align: left;
142
- }
143
- .semi-timeline-item-alternate.semi-timeline-item-right .semi-timeline-item-content, .semi-timeline-item-mode-right.semi-timeline-item-right .semi-timeline-item-content, .semi-timeline-item-center.semi-timeline-item-right .semi-timeline-item-content {
144
- width: calc(50% - 20px);
145
- margin: 0;
146
- text-align: right;
147
- }
148
- .semi-timeline-item-alternate.semi-timeline-item.semi-timeline-item-not-last-child > .semi-timeline-item-tail, .semi-timeline-item-mode-right.semi-timeline-item.semi-timeline-item-not-last-child > .semi-timeline-item-tail, .semi-timeline-item-center.semi-timeline-item.semi-timeline-item-not-last-child > .semi-timeline-item-tail, .semi-timeline-item-left.semi-timeline-item.semi-timeline-item-not-last-child > .semi-timeline-item-tail {
149
- border-left: 1px solid var(--semi-color-text-3);
150
- }
151
- .semi-timeline-item-center .semi-timeline-item-content-time {
152
- position: absolute;
153
- top: -2px;
154
- margin-left: calc(-40px - 100%);
155
- width: 100%;
156
- text-align: right;
157
- }
158
- .semi-timeline-item-mode-right.semi-timeline-item-right .semi-timeline-item-tail, .semi-timeline-item-mode-right.semi-timeline-item-right .semi-timeline-item-head, .semi-timeline-item-mode-right.semi-timeline-item-right .semi-timeline-item-head-custom {
159
- left: calc(100% - 9px);
160
- }
161
- .semi-timeline-item-mode-right.semi-timeline-item-right .semi-timeline-item-content {
162
- width: calc(100% - 28px);
163
- }
164
-
165
129
  .semi-rtl .semi-timeline,
166
130
  .semi-portal-rtl .semi-timeline {
167
131
  direction: rtl;
@@ -2,68 +2,6 @@
2
2
 
3
3
  $module: #{$prefix}-timeline;
4
4
 
5
- @mixin item-children {
6
- &-tail,
7
- &-head,
8
- &-head-custom {
9
- left: $spacing-timeline_item_head_custom-left;
10
- }
11
- &-head{
12
- &.#{$module}-item-head-custom{
13
- margin-left: 0;
14
- }
15
- }
16
- &-head {
17
- margin-left: $spacing-timeline_item_head-marginLeft;
18
- }
19
- }
20
-
21
- @mixin item-direction {
22
- &-left {
23
- .#{$module}-item-content {
24
- left: $spacing-timeline_item_left_item_content-left;
25
- width: $width-timeline_item_left_item_content;
26
- text-align: left;
27
- }
28
- }
29
-
30
- &-right {
31
- .#{$module}-item-content {
32
- width: $width-timeline_item_right_item_content;
33
- margin: $spacing-timeline_item_right_item_content;
34
- text-align: right;
35
- }
36
- }
37
- }
38
-
39
- @mixin item-center {
40
- &-center {
41
- .#{$module}-item {
42
- &-content-time {
43
- position: absolute;
44
- top: $spacing-timeline_time-top;
45
- margin-left: $spacing-timeline_item_content_time-marginLeft;
46
- width: $width-timeline_item_content_time;
47
- text-align: right;
48
- }
49
- }
50
- }
51
- }
52
-
53
- @mixin item-right {
54
- .#{$module}-item {
55
- &-tail,
56
- &-head,
57
- &-head-custom {
58
- left: $spacing-timeline_item_right_item-left;
59
- }
60
-
61
- &-content {
62
- width: $width-timeline_item_right_content;
63
- }
64
- }
65
- }
66
-
67
5
  .#{$module} {
68
6
  margin: $spacing-timeline-margin;
69
7
  padding: $spacing-timeline-padding;
@@ -177,53 +115,65 @@ $module: #{$prefix}-timeline;
177
115
  &-right,
178
116
  &-center {
179
117
  .#{$module}-item {
180
- @include item-children;
181
- @include item-direction;
182
- }
183
- }
118
+ &-tail,
119
+ &-head,
120
+ &-head-custom {
121
+ left: $spacing-timeline_item_head_custom-left;
122
+ }
123
+ &-head{
124
+ &.#{$module}-item-head-custom{
125
+ margin-left: 0;
126
+ }
127
+ }
128
+ &-head {
129
+ margin-left: $spacing-timeline_item_head-marginLeft;
130
+ }
184
131
 
185
-
186
- @include item-center;
132
+ &-left {
133
+ .#{$module}-item-content {
134
+ left: $spacing-timeline_item_left_item_content-left;
135
+ width: $width-timeline_item_left_item_content;
136
+ text-align: left;
137
+ }
138
+ }
187
139
 
188
- &-right {
189
- .#{$module}-item-right {
190
- @include item-right;
140
+ &-right {
141
+ .#{$module}-item-content {
142
+ width: $width-timeline_item_right_item_content;
143
+ margin: $spacing-timeline_item_right_item_content;
144
+ text-align: right;
145
+ }
146
+ }
191
147
  }
192
148
  }
193
- }
194
149
 
195
- // for c2d
196
- .#{$module}-item {
197
- &-alternate,
198
- &-mode-right,
199
150
  &-center {
200
151
  .#{$module}-item {
201
- @include item-children;
202
- }
203
- &.#{$module}-item {
204
- @include item-direction;
205
- }
206
- }
207
-
208
- &-alternate,
209
- &-mode-right,
210
- &-center,
211
- &-left {
212
- &.#{$module}-item {
213
- &.#{$module}-item-not-last-child {
214
- & > .#{$module}-item-tail {
215
- border-left: $width-timeline_tail-border solid $color-timeline_tail-border;
216
- }
152
+ &-content-time {
153
+ position: absolute;
154
+ top: $spacing-timeline_time-top;
155
+ margin-left: $spacing-timeline_item_content_time-marginLeft;
156
+ width: $width-timeline_item_content_time;
157
+ text-align: right;
217
158
  }
218
159
  }
219
160
  }
220
161
 
221
- @include item-center;
162
+ &-right {
163
+ .#{$module}-item-right {
164
+ .#{$module}-item {
165
+ &-tail,
166
+ &-head,
167
+ &-head-custom {
168
+ left: $spacing-timeline_item_right_item-left;
169
+ }
222
170
 
223
- &-mode-right {
224
- &.#{$module}-item-right {
225
- @include item-right;
171
+ &-content {
172
+ width: $width-timeline_item_right_content;
173
+ }
174
+ }
226
175
  }
227
176
  }
228
177
  }
178
+
229
179
  @import './rtl.scss';
@@ -75,6 +75,6 @@ export declare function getValueOrKey(data: any): any;
75
75
  export declare function normalizeValue(value: any, withObject: boolean): any;
76
76
  export declare function updateKeys(keySet: Set<string> | string[], keyEntities: KeyEntities): string[];
77
77
  export declare function calcDisabledKeys(keyEntities: KeyEntities): Set<string>;
78
- export declare function calcDropRelativePosition(event: any, treeNode: any): 0 | 1 | -1;
78
+ export declare function calcDropRelativePosition(event: any, treeNode: any): 1 | -1 | 0;
79
79
  export declare function getDragNodesKeys(key: string, keyEntities: KeyEntities): string[];
80
80
  export declare function calcDropActualPosition(pos: string, relativeDropPos: any): any;
@@ -98,11 +98,19 @@
98
98
  -webkit-box-orient: vertical;
99
99
  overflow: hidden;
100
100
  }
101
+ .semi-typography-ellipsis-multiple-line.semi-typography-ellipsis-multiple-line-text {
102
+ display: -webkit-inline-box;
103
+ }
101
104
  .semi-typography-ellipsis-overflow-ellipsis {
102
105
  display: block;
103
106
  white-space: nowrap;
104
107
  text-overflow: ellipsis;
105
108
  }
109
+ .semi-typography-ellipsis-overflow-ellipsis.semi-typography-ellipsis-overflow-ellipsis-text {
110
+ display: inline-block;
111
+ max-width: 100%;
112
+ vertical-align: top;
113
+ }
106
114
  .semi-typography-ellipsis-expand {
107
115
  display: inline;
108
116
  margin-left: 8px;
@@ -123,12 +123,25 @@ $module: #{$prefix}-typography;
123
123
  display: -webkit-box;
124
124
  -webkit-box-orient: vertical;
125
125
  overflow: hidden;
126
+
127
+ &.#{$module}-ellipsis-multiple-line-text {
128
+ // inline-block only works in the Text component, keeping the original external inline performance
129
+ display: -webkit-inline-box;
130
+ }
126
131
  }
127
132
 
128
133
  &-ellipsis-overflow-ellipsis {
129
134
  display: block;
130
135
  white-space: nowrap;
131
136
  text-overflow: ellipsis;
137
+
138
+ &.#{$module}-ellipsis-overflow-ellipsis-text {
139
+ // inline-block only works in the Text component, keeping the original external inline performance
140
+ display: inline-block;
141
+ // Ensure that Text component can be limited by the parent's width when no specific width is set
142
+ max-width: 100%;
143
+ vertical-align: top;
144
+ }
132
145
  }
133
146
 
134
147
  &-ellipsis-expand {
@@ -18,7 +18,7 @@ declare const strings: {
18
18
  DRAG_AREA_ILLEGAL: string;
19
19
  TRIGGER_AUTO: "auto";
20
20
  TRIGGER_CUSTOM: "custom";
21
- UPLOAD_TRIGGER: ("custom" | "auto")[];
21
+ UPLOAD_TRIGGER: ("auto" | "custom")[];
22
22
  VALIDATE_STATUS: readonly ["default", "error", "warning", "success"];
23
23
  PROMPT_POSITION: readonly ["left", "right", "bottom"];
24
24
  };
@@ -54,9 +54,6 @@
54
54
  .semi-breadcrumb-item-more svg {
55
55
  vertical-align: middle;
56
56
  }
57
- .semi-breadcrumb-item-icon + .semi-breadcrumb-item-title {
58
- margin-left: 4px;
59
- }
60
57
  .semi-breadcrumb-item-link {
61
58
  display: inline-flex;
62
59
  align-items: center;
@@ -82,14 +82,14 @@ $module: #{$prefix}-breadcrumb;
82
82
  }
83
83
  }
84
84
 
85
- &-item-icon+&-item-title {
86
- margin-left: $spacing-breadcrumb_item_text-marginLeft;
87
- }
85
+ // &-item-icon+&-item-title {
86
+ // margin-left: $spacing-breadcrumb_item_text-marginLeft;
87
+ // }
88
88
 
89
89
  &-item-link {
90
90
  display: inline-flex;
91
91
  align-items: center;
92
- column-gap: 4px;
92
+ column-gap: $spacing-breadcrumb_item_text-marginLeft;
93
93
  text-decoration: inherit;
94
94
  transition: color $transition_duration-breadcrumb_link-text $transition-function_breadcrumb_link-text $transition_delay-breadcrumb_link-text;
95
95
  transform: scale($transform_scale-breadcrumb_link-text);
@@ -30,17 +30,18 @@ export interface DateObj {
30
30
  isSameMonth: boolean;
31
31
  month: string;
32
32
  }
33
- export declare type weeekStartsOnEnum = 0 | 1 | 2 | 3 | 4 | 5 | 6;
34
- export declare const calcRangeData: (value: Date, start: Date, rangeLen: number, mode: string, locale: Locale, weekStartsOn: weeekStartsOnEnum) => DateObj[];
33
+ export declare type weekStartsOnEnum = 0 | 1 | 2 | 3 | 4 | 5 | 6;
34
+ export declare const calcRangeData: (value: Date, start: Date, rangeLen: number, mode: string, locale: Locale, weekStartsOn: weekStartsOnEnum) => DateObj[];
35
35
  /**
36
36
  *
37
- * @param {value} date
37
+ * @param {Date} date
38
+ * @param {Date} monthStart current month start date, using for month mode
38
39
  * @param {string} mode
39
40
  * @param {string} locale
40
41
  * @returns {object[]} { date: Date, dayString: string, ind: number, isToday: boolean, isWeekend: boolean, weekday: string }
41
42
  * create weekly object array
42
43
  */
43
- export declare const calcWeekData: (value: Date, mode: string, locale: Locale, weekStartsOn: weeekStartsOnEnum) => DateObj[];
44
+ export declare const calcWeekData: (value: Date, monthStart: Date | null, mode: string, locale: Locale, weekStartsOn: weekStartsOnEnum) => DateObj[];
44
45
  /**
45
46
  *
46
47
  * @param {object} event
@@ -74,7 +75,7 @@ export declare const filterEvents: (events: Map<string, EventObject[]>, start: D
74
75
  * @returns {arr}
75
76
  * filter out event that is not in the week range
76
77
  */
77
- export declare const filterWeeklyEvents: (events: Map<string, EventObject[]>, weekStart: Date, weekStartsOn: weeekStartsOnEnum) => Map<string, EventObject[]>;
78
+ export declare const filterWeeklyEvents: (events: Map<string, EventObject[]>, weekStart: Date, weekStartsOn: weekStartsOnEnum) => Map<string, EventObject[]>;
78
79
  /**
79
80
  * @returns {arr}
80
81
  * arrange and sort all day event for a range
@@ -84,7 +85,7 @@ export declare const parseRangeAllDayEvent: (event: EventObject[], startDate: Da
84
85
  * @returns {arr}
85
86
  * arrange and sort weekly all day event
86
87
  */
87
- export declare const parseWeeklyAllDayEvent: (event: EventObject[], startDate: Date, weekStart: Date, parsed: Array<Array<ParsedRangeEvent>>, weekStartsOn: weeekStartsOnEnum) => ParsedRangeEvent[][];
88
+ export declare const parseWeeklyAllDayEvent: (event: EventObject[], startDate: Date, weekStart: Date, parsed: Array<Array<ParsedRangeEvent>>, weekStartsOn: weekStartsOnEnum) => ParsedRangeEvent[][];
88
89
  export declare const collectDailyEvents: (events: ParsedRangeEvent[][]) => ParsedRangeEvent[][];
89
90
  export declare const renderDailyEvent: (event: EventObject) => {
90
91
  startPos: number;
@@ -96,21 +96,23 @@ export const calcRangeData = (value, start, rangeLen, mode, locale, weekStartsOn
96
96
  };
97
97
  /**
98
98
  *
99
- * @param {value} date
99
+ * @param {Date} date
100
+ * @param {Date} monthStart current month start date, using for month mode
100
101
  * @param {string} mode
101
102
  * @param {string} locale
102
103
  * @returns {object[]} { date: Date, dayString: string, ind: number, isToday: boolean, isWeekend: boolean, weekday: string }
103
104
  * create weekly object array
104
105
  */
105
106
 
106
- export const calcWeekData = function (value) {
107
- let mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'week';
108
- let locale = arguments.length > 2 ? arguments[2] : undefined;
109
- let weekStartsOn = arguments.length > 3 ? arguments[3] : undefined;
107
+ export const calcWeekData = function (value, monthStart) {
108
+ let mode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'week';
109
+ let locale = arguments.length > 3 ? arguments[3] : undefined;
110
+ let weekStartsOn = arguments.length > 4 ? arguments[4] : undefined;
110
111
  const start = startOfWeek(value, {
111
112
  weekStartsOn
112
113
  });
113
- return calcRangeData(value, start, 7, mode, locale, weekStartsOn);
114
+ const realValue = monthStart || value;
115
+ return calcRangeData(realValue, start, 7, mode, locale, weekStartsOn);
114
116
  };
115
117
  /**
116
118
  *
@@ -1,8 +1,8 @@
1
1
  import BaseFoundation, { DefaultAdapter } from '../base/foundation';
2
2
  import { Locale } from 'date-fns';
3
3
  import { DateObj } from './eventUtil';
4
- import type { weeekStartsOnEnum } from './eventUtil';
5
- export { weeekStartsOnEnum };
4
+ import type { weekStartsOnEnum } from './eventUtil';
5
+ export { weekStartsOnEnum };
6
6
  export interface EventObject {
7
7
  [x: string]: any;
8
8
  key: string;
@@ -107,7 +107,7 @@ export default class CalendarFoundation extends BaseFoundation {
107
107
  locale: dateFnsLocale,
108
108
  weekStartsOn
109
109
  });
110
- data.week = calcWeekData(value, 'week', dateFnsLocale, weekStartsOn);
110
+ data.week = calcWeekData(value, null, 'week', dateFnsLocale, weekStartsOn);
111
111
 
112
112
  this._adapter.setWeeklyData(data);
113
113
 
@@ -142,7 +142,7 @@ export default class CalendarFoundation extends BaseFoundation {
142
142
  weekStartsOn
143
143
  });
144
144
  [...Array(numberOfWeek).keys()].map(ind => {
145
- data[ind] = calcWeekData(addDays(monthStart, ind * 7), 'month', dateFnsLocale, weekStartsOn);
145
+ data[ind] = calcWeekData(addDays(monthStart, ind * 7), monthStart, 'month', dateFnsLocale, weekStartsOn);
146
146
  });
147
147
 
148
148
  this._adapter.setMonthlyData(data);
@@ -149,6 +149,7 @@ export interface CascaderAdapter extends DefaultAdapter<BasicCascaderProps, Basi
149
149
  updateInputValue: (value: string) => void;
150
150
  updateInputPlaceHolder: (value: string) => void;
151
151
  focusInput: () => void;
152
+ blurInput: () => void;
152
153
  registerClickOutsideHandler: (cb: (e: any) => void) => void;
153
154
  unregisterClickOutsideHandler: () => void;
154
155
  rePositionDropdown: () => void;
@@ -196,8 +197,9 @@ export default class CascaderFoundation extends BaseFoundation<CascaderAdapter,
196
197
  open(): void;
197
198
  reCalcActiveKeys(): void;
198
199
  close(e: any, key?: string): void;
200
+ focus(): void;
201
+ blur(): void;
199
202
  toggle2SearchInput(isShow: boolean): void;
200
- focusInput(): void;
201
203
  updateSearching: (isSearching: boolean) => void;
202
204
  handleItemClick(e: any, item: BasicEntity | BasicData): void;
203
205
  handleItemHover(e: any, item: BasicEntity): void;
@@ -55,7 +55,7 @@ export default class CascaderFoundation extends BaseFoundation {
55
55
 
56
56
  if (multiple) {
57
57
  const valuePath = []; // eslint-disable-next-line @typescript-eslint/ban-ts-comment
58
- // @ts-ignore
58
+ // @ts-ignore
59
59
 
60
60
  item.forEach(checkedKey => {
61
61
  const valuePathItem = this.getItemPropPath(checkedKey, valueProp);
@@ -425,20 +425,38 @@ export default class CascaderFoundation extends BaseFoundation {
425
425
  this._notifyBlur(e);
426
426
  }
427
427
 
428
+ focus() {
429
+ const {
430
+ filterTreeNode
431
+ } = this.getProps();
432
+
433
+ if (filterTreeNode) {
434
+ this._adapter.focusInput();
435
+ }
436
+
437
+ this._adapter.updateFocusState(true);
438
+ }
439
+
440
+ blur() {
441
+ const {
442
+ filterTreeNode
443
+ } = this.getProps();
444
+
445
+ if (filterTreeNode) {
446
+ this._adapter.blurInput();
447
+ }
448
+
449
+ this._adapter.updateFocusState(false);
450
+ }
451
+
428
452
  toggle2SearchInput(isShow) {
429
453
  if (isShow) {
430
- this._adapter.toggleInputShow(isShow, () => this.focusInput());
454
+ this._adapter.toggleInputShow(isShow, () => this.focus());
431
455
  } else {
432
456
  this._adapter.toggleInputShow(isShow, () => undefined);
433
457
  }
434
458
  }
435
459
 
436
- focusInput() {
437
- this._adapter.focusInput();
438
-
439
- this._adapter.updateFocusState(true);
440
- }
441
-
442
460
  handleItemClick(e, item) {
443
461
  const isDisabled = this._isDisabled();
444
462
 
@@ -34,8 +34,6 @@ export interface ItemAdapter<P = Record<string, any>, S = Record<string, any>> e
34
34
  getIsCollapsed(): boolean;
35
35
  getSelected(): boolean;
36
36
  getIsOpen(): boolean;
37
- getIsInSubNav(): boolean;
38
- getMode(): string;
39
37
  }
40
38
  export default class ItemFoundation<P = Record<string, any>, S = Record<string, any>> extends BaseFoundation<ItemAdapter<P, S>, P, S> {
41
39
  _timer: number;