@douyinfe/semi-ui 2.31.4 → 2.32.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 (101) hide show
  1. package/dist/css/semi.css +50 -14
  2. package/dist/css/semi.min.css +1 -1
  3. package/dist/umd/semi-ui.js +3833 -3561
  4. package/dist/umd/semi-ui.js.map +1 -1
  5. package/dist/umd/semi-ui.min.js +1 -1
  6. package/dist/umd/semi-ui.min.js.map +1 -1
  7. package/lib/cjs/cascader/index.d.ts +1 -0
  8. package/lib/cjs/cascader/index.js +10 -1
  9. package/lib/cjs/datePicker/dateInput.d.ts +5 -1
  10. package/lib/cjs/datePicker/dateInput.js +16 -9
  11. package/lib/cjs/datePicker/datePicker.d.ts +32 -4
  12. package/lib/cjs/datePicker/datePicker.js +104 -23
  13. package/lib/cjs/datePicker/index.d.ts +1 -0
  14. package/lib/cjs/datePicker/monthsGrid.d.ts +1 -1
  15. package/lib/cjs/datePicker/monthsGrid.js +11 -3
  16. package/lib/cjs/datePicker/yearAndMonth.d.ts +10 -6
  17. package/lib/cjs/datePicker/yearAndMonth.js +84 -30
  18. package/lib/cjs/form/baseForm.d.ts +2 -2
  19. package/lib/cjs/form/field.d.ts +1 -1
  20. package/lib/cjs/locale/interface.d.ts +1 -0
  21. package/lib/cjs/locale/source/ar.js +2 -1
  22. package/lib/cjs/locale/source/de.js +2 -1
  23. package/lib/cjs/locale/source/en_GB.js +2 -1
  24. package/lib/cjs/locale/source/en_US.js +2 -1
  25. package/lib/cjs/locale/source/es.js +2 -1
  26. package/lib/cjs/locale/source/fr.js +2 -1
  27. package/lib/cjs/locale/source/id_ID.js +2 -1
  28. package/lib/cjs/locale/source/it.js +2 -1
  29. package/lib/cjs/locale/source/ja_JP.js +2 -1
  30. package/lib/cjs/locale/source/ko_KR.js +2 -1
  31. package/lib/cjs/locale/source/ms_MY.js +2 -1
  32. package/lib/cjs/locale/source/nl_NL.js +2 -1
  33. package/lib/cjs/locale/source/pl_PL.js +2 -1
  34. package/lib/cjs/locale/source/pt_BR.js +2 -1
  35. package/lib/cjs/locale/source/ro.d.ts +1 -0
  36. package/lib/cjs/locale/source/ro.js +2 -1
  37. package/lib/cjs/locale/source/ru_RU.js +2 -1
  38. package/lib/cjs/locale/source/sv_SE.js +2 -1
  39. package/lib/cjs/locale/source/th_TH.js +2 -1
  40. package/lib/cjs/locale/source/tr_TR.js +2 -1
  41. package/lib/cjs/locale/source/vi_VN.js +2 -1
  42. package/lib/cjs/locale/source/zh_CN.js +2 -1
  43. package/lib/cjs/locale/source/zh_TW.js +2 -1
  44. package/lib/cjs/modal/Modal.js +7 -7
  45. package/lib/cjs/select/index.d.ts +18 -1
  46. package/lib/cjs/select/index.js +4 -1
  47. package/lib/cjs/sideSheet/SideSheetContent.d.ts +3 -1
  48. package/lib/cjs/sideSheet/SideSheetContent.js +3 -2
  49. package/lib/cjs/sideSheet/index.js +6 -3
  50. package/lib/cjs/space/index.js +5 -2
  51. package/lib/cjs/table/Table.js +2 -2
  52. package/lib/cjs/treeSelect/index.d.ts +1 -0
  53. package/lib/cjs/treeSelect/index.js +7 -3
  54. package/lib/es/cascader/index.d.ts +1 -0
  55. package/lib/es/cascader/index.js +10 -1
  56. package/lib/es/datePicker/dateInput.d.ts +5 -1
  57. package/lib/es/datePicker/dateInput.js +16 -9
  58. package/lib/es/datePicker/datePicker.d.ts +32 -4
  59. package/lib/es/datePicker/datePicker.js +109 -23
  60. package/lib/es/datePicker/index.d.ts +1 -0
  61. package/lib/es/datePicker/monthsGrid.d.ts +1 -1
  62. package/lib/es/datePicker/monthsGrid.js +11 -3
  63. package/lib/es/datePicker/yearAndMonth.d.ts +10 -6
  64. package/lib/es/datePicker/yearAndMonth.js +83 -29
  65. package/lib/es/form/baseForm.d.ts +2 -2
  66. package/lib/es/form/field.d.ts +1 -1
  67. package/lib/es/locale/interface.d.ts +1 -0
  68. package/lib/es/locale/source/ar.js +2 -1
  69. package/lib/es/locale/source/de.js +2 -1
  70. package/lib/es/locale/source/en_GB.js +2 -1
  71. package/lib/es/locale/source/en_US.js +2 -1
  72. package/lib/es/locale/source/es.js +2 -1
  73. package/lib/es/locale/source/fr.js +2 -1
  74. package/lib/es/locale/source/id_ID.js +2 -1
  75. package/lib/es/locale/source/it.js +2 -1
  76. package/lib/es/locale/source/ja_JP.js +2 -1
  77. package/lib/es/locale/source/ko_KR.js +2 -1
  78. package/lib/es/locale/source/ms_MY.js +2 -1
  79. package/lib/es/locale/source/nl_NL.js +2 -1
  80. package/lib/es/locale/source/pl_PL.js +2 -1
  81. package/lib/es/locale/source/pt_BR.js +2 -1
  82. package/lib/es/locale/source/ro.d.ts +1 -0
  83. package/lib/es/locale/source/ro.js +2 -1
  84. package/lib/es/locale/source/ru_RU.js +2 -1
  85. package/lib/es/locale/source/sv_SE.js +2 -1
  86. package/lib/es/locale/source/th_TH.js +2 -1
  87. package/lib/es/locale/source/tr_TR.js +2 -1
  88. package/lib/es/locale/source/vi_VN.js +2 -1
  89. package/lib/es/locale/source/zh_CN.js +2 -1
  90. package/lib/es/locale/source/zh_TW.js +2 -1
  91. package/lib/es/modal/Modal.js +7 -7
  92. package/lib/es/select/index.d.ts +18 -1
  93. package/lib/es/select/index.js +4 -1
  94. package/lib/es/sideSheet/SideSheetContent.d.ts +3 -1
  95. package/lib/es/sideSheet/SideSheetContent.js +3 -2
  96. package/lib/es/sideSheet/index.js +6 -3
  97. package/lib/es/space/index.js +4 -2
  98. package/lib/es/table/Table.js +2 -2
  99. package/lib/es/treeSelect/index.d.ts +1 -0
  100. package/lib/es/treeSelect/index.js +7 -3
  101. package/package.json +8 -8
@@ -4,14 +4,15 @@ import YearAndMonthFoundation, { MonthScrollItem, YearAndMonthAdapter, YearAndMo
4
4
  import BaseComponent, { BaseProps } from '../_base/baseComponent';
5
5
  import ScrollItem from '../scrollList/scrollItem';
6
6
  import { Locale } from '../locale/interface';
7
+ import { PanelType } from '@douyinfe/semi-foundation/lib/es/datePicker/monthsGridFoundation';
7
8
  export interface YearAndMonthProps extends YearAndMonthFoundationProps, BaseProps {
8
9
  locale?: Locale['DatePicker'];
9
10
  }
10
11
  export declare type YearAndMonthState = YearAndMonthFoundationState;
11
12
  declare class YearAndMonth extends BaseComponent<YearAndMonthProps, YearAndMonthState> {
12
13
  static propTypes: {
13
- currentYear: PropTypes.Requireable<number>;
14
- currentMonth: PropTypes.Requireable<number>;
14
+ currentYear: PropTypes.Requireable<object>;
15
+ currentMonth: PropTypes.Requireable<object>;
15
16
  onSelect: PropTypes.Requireable<(...args: any[]) => any>;
16
17
  locale: PropTypes.Requireable<object>;
17
18
  localeCode: PropTypes.Requireable<string>;
@@ -23,6 +24,7 @@ declare class YearAndMonth extends BaseComponent<YearAndMonthProps, YearAndMonth
23
24
  presetPosition: PropTypes.Requireable<"left" | "top" | "right" | "bottom">;
24
25
  renderQuickControls: PropTypes.Requireable<PropTypes.ReactNodeLike>;
25
26
  renderDateInput: PropTypes.Requireable<PropTypes.ReactNodeLike>;
27
+ type: PropTypes.Requireable<"dateTime" | "date" | "month" | "dateRange" | "year" | "monthRange" | "dateTimeRange">;
26
28
  };
27
29
  static defaultProps: {
28
30
  disabledDate: {
@@ -33,6 +35,7 @@ declare class YearAndMonth extends BaseComponent<YearAndMonthProps, YearAndMonth
33
35
  yearCycled: boolean;
34
36
  noBackBtn: boolean;
35
37
  onSelect: (...args: any[]) => void;
38
+ type: string;
36
39
  };
37
40
  foundation: YearAndMonthFoundation;
38
41
  yearRef: React.RefObject<ScrollItem<YearScrollItem>>;
@@ -40,12 +43,13 @@ declare class YearAndMonth extends BaseComponent<YearAndMonthProps, YearAndMonth
40
43
  constructor(props: YearAndMonthProps);
41
44
  get adapter(): YearAndMonthAdapter;
42
45
  static getDerivedStateFromProps(props: YearAndMonthProps, state: YearAndMonthState): Partial<YearAndMonthFoundationState>;
43
- renderColYear(): JSX.Element;
44
- selectYear: (item: YearScrollItem) => void;
45
- selectMonth: (item: MonthScrollItem) => void;
46
+ renderColYear(panelType: PanelType): JSX.Element;
47
+ selectYear: (item: YearScrollItem, panelType?: PanelType) => void;
48
+ selectMonth: (item: MonthScrollItem, panelType?: PanelType) => void;
46
49
  reselect: () => void;
47
- renderColMonth(): JSX.Element;
50
+ renderColMonth(panelType: PanelType): JSX.Element;
48
51
  backToMain: React.MouseEventHandler<HTMLButtonElement>;
52
+ renderPanel(panelType: PanelType): JSX.Element;
49
53
  render(): JSX.Element;
50
54
  }
51
55
  export default YearAndMonth;
@@ -1,3 +1,4 @@
1
+ import _isEqual from "lodash/isEqual";
1
2
  import _stubFalse from "lodash/stubFalse";
2
3
  import _noop from "lodash/noop";
3
4
 
@@ -9,7 +10,6 @@ import BaseComponent from '../_base/baseComponent';
9
10
  import ScrollList from '../scrollList/index';
10
11
  import ScrollItem from '../scrollList/scrollItem';
11
12
  import { getYears } from '@douyinfe/semi-foundation/lib/es/datePicker/_utils/index';
12
- import isNullOrUndefined from '@douyinfe/semi-foundation/lib/es/utils/isNullOrUndefined';
13
13
  import IconButton from '../iconButton';
14
14
  import { IconChevronLeft } from '@douyinfe/semi-icons';
15
15
  import { BASE_CLASS_PREFIX } from '@douyinfe/semi-foundation/lib/es/base/constants';
@@ -21,12 +21,12 @@ class YearAndMonth extends BaseComponent {
21
21
  constructor(props) {
22
22
  super(props);
23
23
 
24
- this.selectYear = item => {
25
- this.foundation.selectYear(item);
24
+ this.selectYear = (item, panelType) => {
25
+ this.foundation.selectYear(item, panelType);
26
26
  };
27
27
 
28
- this.selectMonth = item => {
29
- this.foundation.selectMonth(item);
28
+ this.selectMonth = (item, panelType) => {
29
+ this.foundation.selectMonth(item, panelType);
30
30
  };
31
31
 
32
32
  this.reselect = () => {
@@ -50,8 +50,16 @@ class YearAndMonth extends BaseComponent {
50
50
  currentYear,
51
51
  currentMonth
52
52
  } = props;
53
- currentYear = currentYear || now.getFullYear();
54
- currentMonth = currentMonth || now.getMonth() + 1;
53
+ const currentLeftYear = currentYear.left || now.getFullYear();
54
+ const currentLeftMonth = currentMonth.left || now.getMonth() + 1;
55
+ currentYear = {
56
+ left: currentLeftYear,
57
+ right: currentLeftYear
58
+ };
59
+ currentMonth = {
60
+ left: currentLeftMonth,
61
+ right: currentMonth.right || currentLeftMonth + 1
62
+ };
55
63
  this.state = {
56
64
  years: getYears().map(year => ({
57
65
  value: year,
@@ -79,6 +87,10 @@ class YearAndMonth extends BaseComponent {
79
87
  setCurrentMonth: currentMonth => this.setState({
80
88
  currentMonth
81
89
  }),
90
+ setCurrentYearAndMonth: (currentYear, currentMonth) => this.setState({
91
+ currentYear,
92
+ currentMonth
93
+ }),
82
94
  notifySelectYear: year => this.props.onSelect({
83
95
  currentMonth: this.state.currentMonth,
84
96
  currentYear: year
@@ -87,26 +99,29 @@ class YearAndMonth extends BaseComponent {
87
99
  currentYear: this.state.currentYear,
88
100
  currentMonth: month
89
101
  }),
102
+ notifySelectYearAndMonth: (year, month) => this.props.onSelect({
103
+ currentYear: year,
104
+ currentMonth: month
105
+ }),
90
106
  notifyBackToMain: () => this.props.onBackToMain()
91
107
  });
92
108
  }
93
109
 
94
110
  static getDerivedStateFromProps(props, state) {
95
111
  const willUpdateStates = {};
96
- const now = new Date();
97
112
 
98
- if (!isNullOrUndefined(props.currentMonth) && props.currentMonth !== state.currentMonth && props.currentMonth !== 0) {
99
- willUpdateStates.currentMonth = props.currentMonth || now.getMonth() + 1;
113
+ if (!_isEqual(props.currentYear, state.currentYear) && props.currentYear.left !== 0) {
114
+ willUpdateStates.currentYear = props.currentYear;
100
115
  }
101
116
 
102
- if (isNullOrUndefined(props.currentYear) && props.currentYear !== state.currentYear && props.currentYear !== 0) {
103
- willUpdateStates.currentYear = props.currentYear || now.getFullYear();
117
+ if (!_isEqual(props.currentMonth, state.currentMonth) && props.currentMonth.left !== 0) {
118
+ willUpdateStates.currentMonth = props.currentMonth;
104
119
  }
105
120
 
106
121
  return willUpdateStates;
107
122
  }
108
123
 
109
- renderColYear() {
124
+ renderColYear(panelType) {
110
125
  const {
111
126
  years,
112
127
  currentYear,
@@ -119,7 +134,22 @@ class YearAndMonth extends BaseComponent {
119
134
  yearCycled,
120
135
  yearAndMonthOpts
121
136
  } = this.props;
122
- const currentDate = setMonth(Date.now(), currentMonth - 1);
137
+ const currentDate = setMonth(Date.now(), currentMonth[panelType] - 1);
138
+ const left = strings.PANEL_TYPE_LEFT;
139
+ const right = strings.PANEL_TYPE_RIGHT;
140
+
141
+ const needDisabled = year => {
142
+ if (panelType === right && currentYear[left]) {
143
+ if (currentMonth[left] <= currentMonth[right]) {
144
+ return currentYear[left] > year;
145
+ } else {
146
+ return currentYear[left] >= year;
147
+ }
148
+ }
149
+
150
+ return false;
151
+ };
152
+
123
153
  const list = years.map(_ref => {
124
154
  let {
125
155
  value,
@@ -134,10 +164,11 @@ class YearAndMonth extends BaseComponent {
134
164
  month: month - 1
135
165
  }));
136
166
  });
167
+ const isRightPanelDisabled = needDisabled(year);
137
168
  return {
138
169
  year,
139
170
  value,
140
- disabled: isAllMonthDisabled
171
+ disabled: isAllMonthDisabled || isRightPanelDisabled
141
172
  };
142
173
  });
143
174
 
@@ -153,14 +184,14 @@ class YearAndMonth extends BaseComponent {
153
184
  cycled: yearCycled,
154
185
  list: list,
155
186
  transform: transform,
156
- selectedIndex: years.findIndex(item => item.value === currentYear),
187
+ selectedIndex: years.findIndex(item => item.value === currentYear[panelType]),
157
188
  type: "year",
158
- onSelect: this.selectYear,
189
+ onSelect: item => this.selectYear(item, panelType),
159
190
  mode: "normal"
160
191
  }, yearAndMonthOpts));
161
192
  }
162
193
 
163
- renderColMonth() {
194
+ renderColMonth(panelType) {
164
195
  const {
165
196
  months,
166
197
  currentMonth,
@@ -176,7 +207,9 @@ class YearAndMonth extends BaseComponent {
176
207
 
177
208
  let transform = val => val;
178
209
 
179
- const currentDate = setYear(Date.now(), currentYear);
210
+ const currentDate = setYear(Date.now(), currentYear[panelType]);
211
+ const left = strings.PANEL_TYPE_LEFT;
212
+ const right = strings.PANEL_TYPE_RIGHT;
180
213
 
181
214
  if (localeCode === 'zh-CN' || localeCode === 'zh-TW') {
182
215
  // Only Chinese needs to add [month] after the selected month
@@ -189,14 +222,15 @@ class YearAndMonth extends BaseComponent {
189
222
  value,
190
223
  month
191
224
  } = _ref3;
225
+ const isRightPanelDisabled = panelType === right && currentMonth[left] && currentYear[left] === currentYear[right] && currentMonth[left] > month;
192
226
  return {
193
227
  month,
194
- disabled: disabledDate(setMonth(currentDate, month - 1)),
228
+ disabled: disabledDate(setMonth(currentDate, month - 1)) || isRightPanelDisabled,
195
229
  value: locale.fullMonths[value] // Actual rendered text
196
230
 
197
231
  };
198
232
  });
199
- const selectedIndex = list.findIndex(item => item.month === currentMonth);
233
+ const selectedIndex = list.findIndex(item => item.month === currentMonth[panelType]);
200
234
  return /*#__PURE__*/React.createElement(ScrollItem, Object.assign({
201
235
  ref: this.monthRef,
202
236
  cycled: monthCycled,
@@ -204,11 +238,15 @@ class YearAndMonth extends BaseComponent {
204
238
  transform: transform,
205
239
  selectedIndex: selectedIndex,
206
240
  type: "month",
207
- onSelect: this.selectMonth,
241
+ onSelect: item => this.selectMonth(item, panelType),
208
242
  mode: 'normal'
209
243
  }, yearAndMonthOpts));
210
244
  }
211
245
 
246
+ renderPanel(panelType) {
247
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ScrollList, null, this.renderColYear(panelType), this.renderColMonth(panelType)));
248
+ }
249
+
212
250
  render() {
213
251
  const {
214
252
  locale,
@@ -216,13 +254,27 @@ class YearAndMonth extends BaseComponent {
216
254
  density,
217
255
  presetPosition,
218
256
  renderQuickControls,
219
- renderDateInput
257
+ renderDateInput,
258
+ type
220
259
  } = this.props;
221
- const prefix = `${prefixCls}-yearmonth-header`; // i18n
260
+ const prefix = `${prefixCls}-yearmonth-header`;
261
+ const bodyCls = `${prefixCls}-yearmonth-body`; // i18n
222
262
 
223
263
  const selectDateText = locale.selectDate;
224
264
  const iconSize = density === 'compact' ? 'default' : 'large';
225
265
  const buttonSize = density === 'compact' ? 'small' : 'default';
266
+ const panelTypeLeft = strings.PANEL_TYPE_LEFT;
267
+ const panelTypeRight = strings.PANEL_TYPE_RIGHT;
268
+ let content = null;
269
+
270
+ if (type === 'month') {
271
+ content = this.renderPanel(panelTypeLeft);
272
+ } else {
273
+ content = /*#__PURE__*/React.createElement("div", {
274
+ className: bodyCls
275
+ }, this.renderPanel(panelTypeLeft), this.renderPanel(panelTypeRight));
276
+ }
277
+
226
278
  return /*#__PURE__*/React.createElement(React.Fragment, null, noBackBtn ? null : /*#__PURE__*/React.createElement("div", {
227
279
  className: prefix
228
280
  }, /*#__PURE__*/React.createElement(IconButton, {
@@ -237,14 +289,14 @@ class YearAndMonth extends BaseComponent {
237
289
  style: {
238
290
  display: 'flex'
239
291
  }
240
- }, presetPosition === "left" && renderQuickControls, /*#__PURE__*/React.createElement("div", null, renderDateInput, /*#__PURE__*/React.createElement(ScrollList, null, this.renderColYear(), this.renderColMonth())), presetPosition === "right" && renderQuickControls) : /*#__PURE__*/React.createElement(React.Fragment, null, renderDateInput, /*#__PURE__*/React.createElement(ScrollList, null, this.renderColYear(), this.renderColMonth())));
292
+ }, presetPosition === "left" && type !== 'monthRange' && renderQuickControls, /*#__PURE__*/React.createElement("div", null, renderDateInput, content), presetPosition === "right" && type !== 'monthRange' && renderQuickControls) : /*#__PURE__*/React.createElement(React.Fragment, null, renderDateInput, content));
241
293
  }
242
294
 
243
295
  }
244
296
 
245
297
  YearAndMonth.propTypes = {
246
- currentYear: PropTypes.number,
247
- currentMonth: PropTypes.number,
298
+ currentYear: PropTypes.object,
299
+ currentMonth: PropTypes.object,
248
300
  onSelect: PropTypes.func,
249
301
  locale: PropTypes.object,
250
302
  localeCode: PropTypes.string,
@@ -255,13 +307,15 @@ YearAndMonth.propTypes = {
255
307
  density: PropTypes.string,
256
308
  presetPosition: PropTypes.oneOf(strings.PRESET_POSITION_SET),
257
309
  renderQuickControls: PropTypes.node,
258
- renderDateInput: PropTypes.node
310
+ renderDateInput: PropTypes.node,
311
+ type: PropTypes.oneOf(strings.TYPE_SET)
259
312
  };
260
313
  YearAndMonth.defaultProps = {
261
314
  disabledDate: _stubFalse,
262
315
  monthCycled: false,
263
316
  yearCycled: false,
264
317
  noBackBtn: false,
265
- onSelect: _noop
318
+ onSelect: _noop,
319
+ type: 'month'
266
320
  };
267
321
  export default YearAndMonth;
@@ -127,7 +127,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
127
127
  onDeselect?: (value: string | number | any[] | Record<string, any>, option: Record<string, any>) => void;
128
128
  onSelect?: (value: string | number | any[] | Record<string, any>, option: Record<string, any>) => void;
129
129
  allowCreate?: boolean;
130
- triggerRender?: (props?: any) => React.ReactNode;
130
+ triggerRender?: (props?: import("../select").TriggerRenderProps) => React.ReactNode;
131
131
  onClear?: () => void;
132
132
  virtualize?: import("../select").virtualListProps;
133
133
  onFocus?: (e: React.FocusEvent<Element, Element>) => void;
@@ -142,7 +142,7 @@ declare class Form<Values extends Record<string, any> = any> extends BaseCompone
142
142
  static CheckboxGroup: React.ComponentType<import("utility-types").Subtract<import("../checkbox").CheckboxGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
143
143
  static Radio: React.ComponentType<import("utility-types").Subtract<import("./interface").CommonFieldProps, import("./interface").RadioCheckboxExcludeProps> & import("../radio").RadioProps & import("./interface").RCIncludeType>;
144
144
  static RadioGroup: React.ComponentType<import("utility-types").Subtract<import("../radio").RadioGroupProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
145
- static DatePicker: React.ComponentType<import("utility-types").Subtract<import("../datePicker").DatePickerProps & React.RefAttributes<import("../datePicker/datePicker").default>, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
145
+ static DatePicker: React.ComponentType<import("utility-types").Subtract<import("../datePicker").DatePickerProps & React.RefAttributes<import("../datePicker").BaseDatePicker>, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
146
146
  static TimePicker: React.ComponentType<import("utility-types").Subtract<import("../timePicker").TimePickerProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
147
147
  static Switch: React.ComponentType<import("utility-types").Subtract<import("../switch").SwitchProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
148
148
  static Slider: React.ComponentType<import("utility-types").Subtract<import("../slider").SliderProps, import("./interface").CommonexcludeType> & import("./interface").CommonFieldProps & React.RefAttributes<any>>;
@@ -75,7 +75,7 @@ declare const FormSelect: import("react").ComponentType<import("utility-types").
75
75
  onDeselect?: (value: string | number | any[] | Record<string, any>, option: Record<string, any>) => void;
76
76
  onSelect?: (value: string | number | any[] | Record<string, any>, option: Record<string, any>) => void;
77
77
  allowCreate?: boolean;
78
- triggerRender?: (props?: any) => import("react").ReactNode;
78
+ triggerRender?: (props?: import("../select/index").TriggerRenderProps) => import("react").ReactNode;
79
79
  onClear?: () => void;
80
80
  virtualize?: import("../select/index").virtualListProps;
81
81
  onFocus?: (e: import("react").FocusEvent<Element, Element>) => void;
@@ -31,6 +31,7 @@ export interface Locale {
31
31
  dateTime: string;
32
32
  dateRange: [string, string];
33
33
  dateTimeRange: [string, string];
34
+ monthRange: [string, string];
34
35
  };
35
36
  footer: {
36
37
  confirm: string;
@@ -30,7 +30,8 @@ const local = {
30
30
  date: 'حدد تاريخ',
31
31
  dateTime: 'حدد التاريخ والوقت',
32
32
  dateRange: ['تاريخ البدء', 'تاريخ النهاية'],
33
- dateTimeRange: ['تاريخ البدء', 'تاريخ النهاية']
33
+ dateTimeRange: ['تاريخ البدء', 'تاريخ النهاية'],
34
+ monthRange: ['الشهر الأول', 'الشهر الأخير']
34
35
  },
35
36
  footer: {
36
37
  confirm: 'تؤكد',
@@ -30,7 +30,8 @@ const local = {
30
30
  date: 'Datum auswählen',
31
31
  dateTime: 'Datum und Uhrzeit auswählen',
32
32
  dateRange: ['Startdatum', 'Enddatum'],
33
- dateTimeRange: ['Startdatum', 'Enddatum']
33
+ dateTimeRange: ['Startdatum', 'Enddatum'],
34
+ monthRange: ['Startmonat', 'Endmonat']
34
35
  },
35
36
  footer: {
36
37
  confirm: 'Bestätigen',
@@ -30,7 +30,8 @@ const local = {
30
30
  date: 'Select date',
31
31
  dateTime: 'Select date and time',
32
32
  dateRange: ['Start date', 'End date'],
33
- dateTimeRange: ['Start date', 'End date']
33
+ dateTimeRange: ['Start date', 'End date'],
34
+ monthRange: ['Start month', 'End month']
34
35
  },
35
36
  footer: {
36
37
  confirm: 'Confirm',
@@ -30,7 +30,8 @@ const local = {
30
30
  date: 'Select date',
31
31
  dateTime: 'Select date and time',
32
32
  dateRange: ['Start date', 'End date'],
33
- dateTimeRange: ['Start date', 'End date']
33
+ dateTimeRange: ['Start date', 'End date'],
34
+ monthRange: ['Start month', 'End month']
34
35
  },
35
36
  footer: {
36
37
  confirm: 'Confirm',
@@ -35,7 +35,8 @@ const locale = {
35
35
  date: 'Seleccionar fecha',
36
36
  dateTime: 'Seleccionar hora y fecha',
37
37
  dateRange: ['Fecha inicial', 'Fecha final'],
38
- dateTimeRange: ['Fecha inicial', 'Fecha final']
38
+ dateTimeRange: ['Fecha inicial', 'Fecha final'],
39
+ monthRange: ['Mes inicial', 'Mes final']
39
40
  },
40
41
  footer: {
41
42
  confirm: 'Aceptar',
@@ -30,7 +30,8 @@ const local = {
30
30
  date: 'Sélectionner date',
31
31
  dateTime: 'Sélectionner date et temps',
32
32
  dateRange: ['Date de début', 'Date de fin'],
33
- dateTimeRange: ['Date de début', 'Date de fin']
33
+ dateTimeRange: ['Date de début', 'Date de fin'],
34
+ monthRange: ['Mois de début', 'Mois de fin']
34
35
  },
35
36
  footer: {
36
37
  confirm: 'Confirmer',
@@ -30,7 +30,8 @@ const local = {
30
30
  date: 'Pilih tanggal',
31
31
  dateTime: 'Pilih tanggal dan waktu',
32
32
  dateRange: ['Tanggal mulai', 'Tanggal akhir'],
33
- dateTimeRange: ['Tanggal mulai', 'Tanggal akhir']
33
+ dateTimeRange: ['Tanggal mulai', 'Tanggal akhir'],
34
+ monthRange: ['Bulan pertama', 'Bulan terakhir']
34
35
  },
35
36
  footer: {
36
37
  confirm: 'Konfirmasi',
@@ -30,7 +30,8 @@ const local = {
30
30
  date: 'Seleziona data',
31
31
  dateTime: 'Seleziona data e ora',
32
32
  dateRange: ['Data inizio', 'Data fine'],
33
- dateTimeRange: ['Data inizio', 'Data fine']
33
+ dateTimeRange: ['Data inizio', 'Data fine'],
34
+ monthRange: ['Mese inizio', 'Mese fine']
34
35
  },
35
36
  footer: {
36
37
  confirm: 'Conferma',
@@ -30,7 +30,8 @@ const local = {
30
30
  date: '日付を選択してください',
31
31
  dateTime: '日時を選択してください',
32
32
  dateRange: ['開始日', '終了日'],
33
- dateTimeRange: ['開始日', '終了日']
33
+ dateTimeRange: ['開始日', '終了日'],
34
+ monthRange: ['開始月', '終了月']
34
35
  },
35
36
  footer: {
36
37
  confirm: '確認する',
@@ -31,7 +31,8 @@ const local = {
31
31
  date: '날짜 선택',
32
32
  dateTime: '날짜 및 시간 선택',
33
33
  dateRange: ['시작 날짜', '종료일'],
34
- dateTimeRange: ['시작 날짜', '종료일']
34
+ dateTimeRange: ['시작 날짜', '종료일'],
35
+ monthRange: ['시작 월', '종료 월']
35
36
  },
36
37
  footer: {
37
38
  confirm: '확인',
@@ -30,7 +30,8 @@ const local = {
30
30
  date: 'Pilih tarikh',
31
31
  dateTime: 'Pilih tarikh dan masa',
32
32
  dateRange: ['Tarikh mula', 'Tarikh akhir'],
33
- dateTimeRange: ['Tarikh mula', 'Tarikh akhir']
33
+ dateTimeRange: ['Tarikh mula', 'Tarikh akhir'],
34
+ monthRange: ['Bulan mula', 'Bulan akhir']
34
35
  },
35
36
  footer: {
36
37
  confirm: 'Sahkan',
@@ -36,7 +36,8 @@ const local = {
36
36
  date: 'Datum selecteren',
37
37
  dateTime: 'Datum en tijd selecteren',
38
38
  dateRange: ['Begindatum', 'Einddatum'],
39
- dateTimeRange: ['Begindatum', 'Einddatum']
39
+ dateTimeRange: ['Begindatum', 'Einddatum'],
40
+ monthRange: ['Begindatum', 'Einddatum']
40
41
  },
41
42
  footer: {
42
43
  confirm: 'Bevestigen',
@@ -36,7 +36,8 @@ const local = {
36
36
  date: 'Wybierz datę',
37
37
  dateTime: 'Wybierz datę i godzinę',
38
38
  dateRange: ['Data rozpoczęcia', 'Data zakończenia'],
39
- dateTimeRange: ['Data rozpoczęcia', 'Data zakończenia']
39
+ dateTimeRange: ['Data rozpoczęcia', 'Data zakończenia'],
40
+ monthRange: ['Miesiąc rozpoczęcia', 'Miesiąc zakończenia']
40
41
  },
41
42
  footer: {
42
43
  confirm: 'Potwierdź',
@@ -30,7 +30,8 @@ const local = {
30
30
  date: 'Por favor selecione uma data',
31
31
  dateTime: 'Selecione a data e hora',
32
32
  dateRange: ['Data de início', 'Data de fim'],
33
- dateTimeRange: ['Data de início', 'Data de fim']
33
+ dateTimeRange: ['Data de início', 'Data de fim'],
34
+ monthRange: ['Mês de início', 'Mês de fim']
34
35
  },
35
36
  footer: {
36
37
  confirm: 'OK',
@@ -33,6 +33,7 @@ declare const _default: {
33
33
  dateTime: string;
34
34
  dateRange: string[];
35
35
  dateTimeRange: string[];
36
+ monthRange: string[];
36
37
  };
37
38
  footer: {
38
39
  confirm: string;
@@ -34,7 +34,8 @@ export default {
34
34
  date: 'Selectează data',
35
35
  dateTime: 'Selectează data și ora',
36
36
  dateRange: ['Data de început', 'Data de sfârșit'],
37
- dateTimeRange: ['Data de început', 'Data de sfârșit']
37
+ dateTimeRange: ['Data de început', 'Data de sfârșit'],
38
+ monthRange: ['Luna de început', 'Luna de sfârșit']
38
39
  },
39
40
  footer: {
40
41
  confirm: 'Confirmă',
@@ -33,7 +33,8 @@ const local = {
33
33
  date: 'Выбрать дату',
34
34
  dateTime: 'Выбрать дату и время',
35
35
  dateRange: ['Дата начала', 'Дата окончания'],
36
- dateTimeRange: ['Дата начала', 'Дата окончания']
36
+ dateTimeRange: ['Дата начала', 'Дата окончания'],
37
+ monthRange: ['Начальный месяц', 'Конечный месяц']
37
38
  },
38
39
  footer: {
39
40
  confirm: 'подтвердить',
@@ -35,7 +35,8 @@ const local = {
35
35
  date: 'Välj datum',
36
36
  dateTime: 'Välj datum och tid',
37
37
  dateRange: ['Startdatum', 'Slutdatum'],
38
- dateTimeRange: ['Startdatum', 'Slutdatum']
38
+ dateTimeRange: ['Startdatum', 'Slutdatum'],
39
+ monthRange: ['Startmånad', 'Slutmånad']
39
40
  },
40
41
  footer: {
41
42
  confirm: 'Bekräfta',
@@ -33,7 +33,8 @@ const local = {
33
33
  date: 'โปรดเลือกวันที่',
34
34
  dateTime: 'โปรดเลือกวันที่และเวลา',
35
35
  dateRange: ['วันที่เริ่มต้น', 'วันที่สิ้นสุด'],
36
- dateTimeRange: ['วันที่เริ่มต้น', 'วันที่สิ้นสุด']
36
+ dateTimeRange: ['วันที่เริ่มต้น', 'วันที่สิ้นสุด'],
37
+ monthRange: ['เดือนเริ่มต้น', 'เดือนสิ้นสุด']
37
38
  },
38
39
  footer: {
39
40
  confirm: 'ตกลง',
@@ -33,7 +33,8 @@ const local = {
33
33
  date: 'Lütfen bir tarih seçin',
34
34
  dateTime: 'Lütfen bir tarih ve saat seçin',
35
35
  dateRange: ['Başlangıç tarihi', 'Bitiş tarihi'],
36
- dateTimeRange: ['Başlangıç tarihi', 'Bitiş tarihi']
36
+ dateTimeRange: ['Başlangıç tarihi', 'Bitiş tarihi'],
37
+ monthRange: ['Başlangıç ​​ayı', 'Bitiş ayı']
37
38
  },
38
39
  footer: {
39
40
  confirm: 'Tamam',
@@ -33,7 +33,8 @@ const local = {
33
33
  date: 'Chọn ngày',
34
34
  dateTime: 'Chọn ngày và giờ',
35
35
  dateRange: ['Ngày bắt đầu', 'Ngày kết thúc'],
36
- dateTimeRange: ['Ngày bắt đầu', 'Ngày kết thúc']
36
+ dateTimeRange: ['Ngày bắt đầu', 'Ngày kết thúc'],
37
+ monthRange: ['Tháng bắt đầu', 'Tháng kết thúc']
37
38
  },
38
39
  footer: {
39
40
  confirm: 'Xác nhận',
@@ -30,7 +30,8 @@ const local = {
30
30
  date: '请选择日期',
31
31
  dateTime: '请选择日期及时间',
32
32
  dateRange: ['开始日期', '结束日期'],
33
- dateTimeRange: ['开始日期', '结束日期']
33
+ dateTimeRange: ['开始日期', '结束日期'],
34
+ monthRange: ['开始月份', '结束月份']
34
35
  },
35
36
  footer: {
36
37
  confirm: '确定',
@@ -30,7 +30,8 @@ const local = {
30
30
  date: '請選擇日期',
31
31
  dateTime: '請選擇日期及時間',
32
32
  dateRange: ['開始日期', '結束日期'],
33
- dateTimeRange: ['開始日期', '結束日期']
33
+ dateTimeRange: ['開始日期', '結束日期'],
34
+ monthRange: ['開始月份', '結束月份']
34
35
  },
35
36
  footer: {
36
37
  confirm: '確定',
@@ -135,10 +135,7 @@ class Modal extends BaseComponent {
135
135
  this._haveRendered = true;
136
136
  }
137
137
 
138
- return /*#__PURE__*/React.createElement(Portal, {
139
- style: wrapperStyle,
140
- getPopupContainer: getPopupContainer
141
- }, /*#__PURE__*/React.createElement(CSSAnimation, {
138
+ return /*#__PURE__*/React.createElement(CSSAnimation, {
142
139
  motion: this.props.motion,
143
140
  animationState: visible ? 'enter' : 'leave',
144
141
  startClassName: visible ? `${cssClasses.DIALOG}-content-animate-show` : `${cssClasses.DIALOG}-content-animate-hide`,
@@ -162,7 +159,10 @@ class Modal extends BaseComponent {
162
159
  animationClassName: maskAnimationClassName,
163
160
  animationEventsNeedBind: maskAnimationEventsNeedBind
164
161
  } = _ref2;
165
- return shouldRender ? /*#__PURE__*/React.createElement(ModalContent, Object.assign({}, restProps, {
162
+ return shouldRender ? /*#__PURE__*/React.createElement(Portal, {
163
+ style: wrapperStyle,
164
+ getPopupContainer: getPopupContainer
165
+ }, " ", /*#__PURE__*/React.createElement(ModalContent, Object.assign({}, restProps, {
166
166
  contentExtraProps: animationEventsNeedBind,
167
167
  maskExtraProps: maskAnimationEventsNeedBind,
168
168
  isFullScreen: this.state.isFullScreen,
@@ -175,9 +175,9 @@ class Modal extends BaseComponent {
175
175
  ref: this.modalRef,
176
176
  footer: renderFooter,
177
177
  onClose: this.handleCancel
178
- })) : /*#__PURE__*/React.createElement(React.Fragment, null);
178
+ }))) : /*#__PURE__*/React.createElement(React.Fragment, null);
179
179
  });
180
- }));
180
+ });
181
181
  };
182
182
 
183
183
  this.state = {