Skip to content

Commit

Permalink
Merge 587be99 into 2f28e39
Browse files Browse the repository at this point in the history
  • Loading branch information
pointhalo authored Apr 20, 2023
2 parents 2f28e39 + 587be99 commit 1fda67d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 77 deletions.
15 changes: 12 additions & 3 deletions packages/semi-foundation/timePicker/foundation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
transformToArray,
isTimeFormatLike
} from './utils';
import { split } from 'lodash';
import { split, isUndefined } from 'lodash';
import { isValid, format, getHours } from 'date-fns';
import { utcToZonedTime, zonedTimeToUtc } from '../utils/date-fns-extra';
import isNullOrUndefined from '../utils/isNullOrUndefined';
Expand Down Expand Up @@ -182,7 +182,7 @@ class TimePickerFoundation<P = Record<string, any>, S = Record<string, any>> ext
isAM[index] = panelIsAM;
const inputValue = this.formatValue(value);

if (this.getState('isAM')[index] !== result.isAM){
if (this.getState('isAM')[index] !== result.isAM) {
this.setState({ isAM } as any);
}
if (!this._isControlledComponent('value')) {
Expand Down Expand Up @@ -369,7 +369,16 @@ class TimePickerFoundation<P = Record<string, any>, S = Record<string, any>> ext
}

if (_dates && Array.isArray(_dates)) {
return _dates.map(date => formatToString(date, validFormat, dateFnsLocale)).join(rangeSeparator);
const result = _dates.map(date => {
let str;
if (isUndefined(date)) {
str = '';
} else {
str = formatToString(date, validFormat, dateFnsLocale);
}
return str;
});
return result.join(rangeSeparator);
}
return undefined;
}
Expand Down
74 changes: 0 additions & 74 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1465,15 +1465,6 @@
"@douyinfe/semi-animation-styled" "2.23.2"
classnames "^2.2.6"

"@douyinfe/semi-animation-react@2.32.2":
version "2.32.2"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-animation-react/-/semi-animation-react-2.32.2.tgz#c388ed32d1713c13d0400d7c209d8816bc6579cf"
integrity sha512-ALi+M7fF5IPQaf2fjLmykMjV/NFiRl9IvaoQsDv4uNFlVLANrZXeuHjqxQb3en6RM2NCcrtq4KwWnvZ8y7V1jw==
dependencies:
"@douyinfe/semi-animation" "2.12.0"
"@douyinfe/semi-animation-styled" "2.23.2"
classnames "^2.2.6"

"@douyinfe/semi-animation-styled@2.23.2":
version "2.23.2"
resolved "https://registry.npmjs.org/@douyinfe/semi-animation-styled/-/semi-animation-styled-2.23.2.tgz"
Expand All @@ -1494,13 +1485,6 @@
dependencies:
bezier-easing "^2.1.0"

"@douyinfe/semi-animation@2.32.2":
version "2.32.2"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-animation/-/semi-animation-2.32.2.tgz#f0b1164941671fa335d4e54027a5a52e6c09ba2c"
integrity sha512-dW/1SpcgBWeEnPDshNysFeAu6L6FDcxiOeYHd7u0C6+Oet+4rtDXe/9HqxhFkVuLbjyy0MCLFI+izTgycUvH3w==
dependencies:
bezier-easing "^2.1.0"

"@douyinfe/semi-foundation@2.30.2":
version "2.30.2"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-foundation/-/semi-foundation-2.30.2.tgz#f7a3f983da02a2843c8e95604f10c08d5c8e922c"
Expand All @@ -1515,34 +1499,13 @@
memoize-one "^5.2.1"
scroll-into-view-if-needed "^2.2.24"

"@douyinfe/semi-foundation@2.32.2":
version "2.32.2"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-foundation/-/semi-foundation-2.32.2.tgz#c61a621e900fdc9a5605532012808a3722f97ac2"
integrity sha512-F+b3u1XvqlufKZilyM0eepk/COfBsnLED/XtEimt2uGWWk+Ftv9Th+CNcxs1mAW3fhM8hqw4EkVA5RYEogHq3g==
dependencies:
"@douyinfe/semi-animation" "2.12.0"
async-validator "^3.5.0"
classnames "^2.2.6"
date-fns "^2.29.3"
date-fns-tz "^1.3.8"
lodash "^4.17.21"
memoize-one "^5.2.1"
scroll-into-view-if-needed "^2.2.24"

"@douyinfe/semi-icons@2.30.2":
version "2.30.2"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-icons/-/semi-icons-2.30.2.tgz#03bf9a5ef99bf3b77557379d631908889767b8aa"
integrity sha512-Km8SEwDHIF/sZlvFEPW5vItlnSlWSme/N8Kd3pgsHXPIaslyhHcTaOq7LnHFahf4weTWcq6i6RTdDJKhzn6YGg==
dependencies:
classnames "^2.2.6"

"@douyinfe/semi-icons@2.32.2", "@douyinfe/semi-icons@^2.0.0":
version "2.32.2"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-icons/-/semi-icons-2.32.2.tgz#ba713d95ae4365bf7d05c1dbb78976ba29c7cf04"
integrity sha512-Bo085OU8xhqenTiFepKrEXjY63GI1u8310ZAynHQsg2vRNdSVmQH5RRV2Tgqj27Uq6Q3rtEtN0f/lGxE+MNYQw==
dependencies:
classnames "^2.2.6"

"@douyinfe/semi-icons@latest":
version "2.9.1"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-icons/-/semi-icons-2.9.1.tgz#7a04e1a77070220b04f63e6f65aac30155ed8ddd"
Expand All @@ -1556,11 +1519,6 @@
resolved "https://registry.yarnpkg.com/@douyinfe/semi-illustrations/-/semi-illustrations-2.30.2.tgz#e31007086d75c98c6b87789945bffcdb72cf195e"
integrity sha512-cjJ02F4Fg6wfWgVCpGSEUU/MDg/fc6zy2eAxMJ2yMqbERYI99y3Qk4RlckPcUnXx5LzfFAeFtM6E/ri+xMtIKQ==

"@douyinfe/semi-illustrations@2.32.2":
version "2.32.2"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-illustrations/-/semi-illustrations-2.32.2.tgz#a580339eea5e526bfc33196f6b5b1a5f07d005b6"
integrity sha512-DmDo1/DdjJiFgq0vs2se5zrtM8mFdne5F8dL0g96sHcPFAG2tzVYzlcpgQ11gVRiiCpBJKOcem1UwKe32jWv7w==

"@douyinfe/semi-scss-compile@2.23.2":
version "2.23.2"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-scss-compile/-/semi-scss-compile-2.23.2.tgz#30884bb194ee9ae1e81877985e5663c3297c1ced"
Expand Down Expand Up @@ -1634,38 +1592,6 @@
dependencies:
glob "^7.1.6"

"@douyinfe/semi-theme-default@2.32.2":
version "2.32.2"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-theme-default/-/semi-theme-default-2.32.2.tgz#5ad25f274b66508f9167e05f154db4fada921162"
integrity sha512-qjepAmNQ+1JY8dQVfaXAng0jD+n4dWsz33xWnbIRQ93lgmqBsvP7JRKKcNkOsWe5nbhxP3R0HZMQ5KeJoNm0Bg==
dependencies:
glob "^7.1.6"

"@douyinfe/semi-ui@^2.0.0":
version "2.32.2"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-ui/-/semi-ui-2.32.2.tgz#fb21c2ba6a6a6f650d460dcb35d274d608796dec"
integrity sha512-AVOLhJ16FIHZuL6izmlM5AYVyLiPcsUtFxbMdm47d6dgCMA2OevvwrkUZX/uMBvprnM62IP12SB3pfpOUoI0Fw==
dependencies:
"@douyinfe/semi-animation" "2.32.2"
"@douyinfe/semi-animation-react" "2.32.2"
"@douyinfe/semi-foundation" "2.32.2"
"@douyinfe/semi-icons" "2.32.2"
"@douyinfe/semi-illustrations" "2.32.2"
"@douyinfe/semi-theme-default" "2.32.2"
async-validator "^3.5.0"
classnames "^2.2.6"
copy-text-to-clipboard "^2.1.1"
date-fns "^2.29.3"
date-fns-tz "^1.3.8"
lodash "^4.17.21"
prop-types "^15.7.2"
react-resizable "^1.8.0"
react-sortable-hoc "^2.0.0"
react-window "^1.8.2"
resize-observer-polyfill "^1.5.1"
scroll-into-view-if-needed "^2.2.24"
utility-types "^3.10.0"

"@douyinfe/semi-ui@latest":
version "2.30.2"
resolved "https://registry.yarnpkg.com/@douyinfe/semi-ui/-/semi-ui-2.30.2.tgz#75c2ad58ead2f96845381d8af94d32a58dec3d45"
Expand Down

0 comments on commit 1fda67d

Please sign in to comment.