Skip to content

Commit

Permalink
Merge pull request #20024 from ant-design/merge-feature
Browse files Browse the repository at this point in the history
chore: Master merge feature
  • Loading branch information
zombieJ committed Dec 1, 2019
2 parents d7e8102 + 1d516d7 commit a713a6a
Show file tree
Hide file tree
Showing 36 changed files with 8,266 additions and 2,621 deletions.
2 changes: 1 addition & 1 deletion components/calendar/__tests__/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ describe('Calendar', () => {

for (let index = start; index < end; index += 1) {
monthOptions.push(
<Select.Option className="month-item" key={`${index}`}>
<Select.Option className="month-item" key={`${index}`} value={index}>
{months[index]}
</Select.Option>,
);
Expand Down
3 changes: 3 additions & 0 deletions components/calendar/locale/mk_MK.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import mk_MK from '../../date-picker/locale/mk_MK';

export default mk_MK;
2 changes: 1 addition & 1 deletion components/date-picker/interface.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface SinglePickerProps {
}

const DatePickerModes = tuple('time', 'date', 'month', 'year', 'decade');
export type DatePickerMode = (typeof DatePickerModes)[number];
export type DatePickerMode = typeof DatePickerModes[number];

export interface DatePickerProps extends PickerProps, SinglePickerProps {
showTime?: TimePickerProps | boolean;
Expand Down
19 changes: 19 additions & 0 deletions components/date-picker/locale/mk_MK.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import CalendarLocale from 'rc-calendar/lib/locale/mk_MK';
import TimePickerLocale from '../../time-picker/locale/mk_MK';

// Merge into a locale object
const locale = {
lang: {
placeholder: 'Избери датум',
rangePlaceholder: ['Од датум', 'До датум'],
...CalendarLocale,
},
timePickerLocale: {
...TimePickerLocale,
},
};

// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json

export default locale;
2 changes: 1 addition & 1 deletion components/drawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type EventType =
type getContainerFunc = () => HTMLElement;

const PlacementTypes = tuple('top', 'right', 'bottom', 'left');
type placementType = (typeof PlacementTypes)[number];
type placementType = typeof PlacementTypes[number];
export interface DrawerProps {
closable?: boolean;
destroyOnClose?: boolean;
Expand Down
7 changes: 4 additions & 3 deletions components/form/FormItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const ValidateStatuses = tuple('success', 'warning', 'error', 'validating', '');

const FormLabelAligns = tuple('left', 'right');

export type FormLabelAlign = (typeof FormLabelAligns)[number];
export type FormLabelAlign = typeof FormLabelAligns[number];

export interface FormItemProps {
prefixCls?: string;
Expand All @@ -30,7 +30,7 @@ export interface FormItemProps {
wrapperCol?: ColProps;
help?: React.ReactNode;
extra?: React.ReactNode;
validateStatus?: (typeof ValidateStatuses)[number];
validateStatus?: typeof ValidateStatuses[number];
hasFeedback?: boolean;
required?: boolean;
style?: React.CSSProperties;
Expand Down Expand Up @@ -66,7 +66,8 @@ export default class FormItem extends React.Component<FormItemProps, any> {
const { children, help, validateStatus, id } = this.props;
warning(
this.getControls(children, true).length <= 1 ||
(help !== undefined || validateStatus !== undefined),
help !== undefined ||
validateStatus !== undefined,
'Form.Item',
'Cannot generate `validateStatus` and `help` automatically, ' +
'while there are more than one `getFieldDecorator` in it.',
Expand Down
4 changes: 1 addition & 3 deletions components/form/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4151,9 +4151,7 @@ exports[`renders ./components/form/demo/validate-other.md correctly 1`] = `
<span
class="ant-form-item-children"
>
<span
class=""
>
<span>
<div
class="ant-upload ant-upload-drag"
/>
Expand Down

0 comments on commit a713a6a

Please sign in to comment.