@douyinfe/semi-foundation 2.17.0-beta.1 → 2.17.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.
- package/_portal/portal.scss +1 -1
- package/lib/cjs/_portal/portal.css +1 -1
- package/lib/cjs/_portal/portal.scss +1 -1
- package/lib/cjs/timePicker/foundation.js +12 -15
- package/lib/es/_portal/portal.css +1 -1
- package/lib/es/_portal/portal.scss +1 -1
- package/lib/es/timePicker/foundation.js +12 -15
- package/package.json +2 -2
- package/timePicker/foundation.ts +18 -19
package/_portal/portal.scss
CHANGED
|
@@ -215,23 +215,20 @@ class TimePickerFoundation extends _foundation.default {
|
|
|
215
215
|
timeZone,
|
|
216
216
|
__prevTimeZone
|
|
217
217
|
} = props;
|
|
218
|
+
let dates = this.parseValue(value);
|
|
219
|
+
const invalid = this.validateDates(dates);
|
|
218
220
|
|
|
219
|
-
if (!
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
if (!invalid) {
|
|
224
|
-
if (this.isValidTimeZone(timeZone)) {
|
|
225
|
-
dates = (0, _map.default)(dates).call(dates, date => (0, _dateFnsExtra.utcToZonedTime)(this.isValidTimeZone(__prevTimeZone) ? (0, _dateFnsExtra.zonedTimeToUtc)(date, __prevTimeZone) : date, timeZone));
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
const inputValue = this.formatValue(dates);
|
|
229
|
-
this.setState({
|
|
230
|
-
value: dates,
|
|
231
|
-
invalid,
|
|
232
|
-
inputValue
|
|
233
|
-
});
|
|
221
|
+
if (!invalid) {
|
|
222
|
+
if (this.isValidTimeZone(timeZone)) {
|
|
223
|
+
dates = (0, _map.default)(dates).call(dates, date => (0, _dateFnsExtra.utcToZonedTime)(this.isValidTimeZone(__prevTimeZone) ? (0, _dateFnsExtra.zonedTimeToUtc)(date, __prevTimeZone) : date, timeZone));
|
|
234
224
|
}
|
|
225
|
+
|
|
226
|
+
const inputValue = this.formatValue(dates);
|
|
227
|
+
this.setState({
|
|
228
|
+
value: dates,
|
|
229
|
+
invalid,
|
|
230
|
+
inputValue
|
|
231
|
+
});
|
|
235
232
|
}
|
|
236
233
|
}
|
|
237
234
|
|
|
@@ -192,23 +192,20 @@ class TimePickerFoundation extends BaseFoundation {
|
|
|
192
192
|
timeZone,
|
|
193
193
|
__prevTimeZone
|
|
194
194
|
} = props;
|
|
195
|
+
let dates = this.parseValue(value);
|
|
196
|
+
const invalid = this.validateDates(dates);
|
|
195
197
|
|
|
196
|
-
if (!
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
if (!invalid) {
|
|
201
|
-
if (this.isValidTimeZone(timeZone)) {
|
|
202
|
-
dates = _mapInstanceProperty(dates).call(dates, date => utcToZonedTime(this.isValidTimeZone(__prevTimeZone) ? zonedTimeToUtc(date, __prevTimeZone) : date, timeZone));
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
const inputValue = this.formatValue(dates);
|
|
206
|
-
this.setState({
|
|
207
|
-
value: dates,
|
|
208
|
-
invalid,
|
|
209
|
-
inputValue
|
|
210
|
-
});
|
|
198
|
+
if (!invalid) {
|
|
199
|
+
if (this.isValidTimeZone(timeZone)) {
|
|
200
|
+
dates = _mapInstanceProperty(dates).call(dates, date => utcToZonedTime(this.isValidTimeZone(__prevTimeZone) ? zonedTimeToUtc(date, __prevTimeZone) : date, timeZone));
|
|
211
201
|
}
|
|
202
|
+
|
|
203
|
+
const inputValue = this.formatValue(dates);
|
|
204
|
+
this.setState({
|
|
205
|
+
value: dates,
|
|
206
|
+
invalid,
|
|
207
|
+
inputValue
|
|
208
|
+
});
|
|
212
209
|
}
|
|
213
210
|
}
|
|
214
211
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.17.0
|
|
3
|
+
"version": "2.17.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"*.scss",
|
|
25
25
|
"*.css"
|
|
26
26
|
],
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "802e57ecc50de44c7ad4b2322bdd864eb9727cc3",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/plugin-proposal-decorators": "^7.15.8",
|
|
30
30
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
package/timePicker/foundation.ts
CHANGED
|
@@ -203,27 +203,26 @@ class TimePickerFoundation<P = Record<string, any>, S = Record<string, any>> ext
|
|
|
203
203
|
|
|
204
204
|
refreshProps(props: any = {}) {
|
|
205
205
|
const { value, timeZone, __prevTimeZone } = props;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
if (!invalid) {
|
|
211
|
-
if (this.isValidTimeZone(timeZone)) {
|
|
212
|
-
dates = dates.map(date =>
|
|
213
|
-
utcToZonedTime(
|
|
214
|
-
this.isValidTimeZone(__prevTimeZone) ? zonedTimeToUtc(date, __prevTimeZone) : date,
|
|
215
|
-
timeZone
|
|
216
|
-
)
|
|
217
|
-
);
|
|
218
|
-
}
|
|
219
|
-
const inputValue = this.formatValue(dates);
|
|
206
|
+
|
|
207
|
+
let dates = this.parseValue(value);
|
|
208
|
+
const invalid = this.validateDates(dates);
|
|
220
209
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
210
|
+
if (!invalid) {
|
|
211
|
+
if (this.isValidTimeZone(timeZone)) {
|
|
212
|
+
dates = dates.map(date =>
|
|
213
|
+
utcToZonedTime(
|
|
214
|
+
this.isValidTimeZone(__prevTimeZone) ? zonedTimeToUtc(date, __prevTimeZone) : date,
|
|
215
|
+
timeZone
|
|
216
|
+
)
|
|
217
|
+
);
|
|
226
218
|
}
|
|
219
|
+
const inputValue = this.formatValue(dates);
|
|
220
|
+
|
|
221
|
+
this.setState({
|
|
222
|
+
value: dates,
|
|
223
|
+
invalid,
|
|
224
|
+
inputValue,
|
|
225
|
+
} as any);
|
|
227
226
|
}
|
|
228
227
|
}
|
|
229
228
|
|