wargerm 0.3.13 → 0.3.14

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.
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { DatePickerProps, RangePickerProps } from 'antd/lib/date-picker';
3
3
  export declare type IndexComponent = React.FC<DatePickerProps> & {
4
4
  RangePicker: React.FC<RangePickerProps>;
5
+ showTime: Object | boolean;
5
6
  };
6
7
  declare const Index: IndexComponent;
7
8
  export default Index;
package/dist/index.esm.js CHANGED
@@ -6407,7 +6407,7 @@ hooks.HTML5_FMT = {
6407
6407
  };
6408
6408
 
6409
6409
  var _excluded$3 = ["defaultValue", "format", "value", "onChange"],
6410
- _excluded2$1 = ["defaultValue", "value", "format", "onChange"];
6410
+ _excluded2$1 = ["defaultValue", "value", "format", "showTime", "onChange"];
6411
6411
 
6412
6412
  var momentValue = function momentValue(value) {
6413
6413
  if (value) {
@@ -6430,7 +6430,7 @@ var WDatePicker$1 = function WDatePicker(props) {
6430
6430
  onChange: function onChange(v) {
6431
6431
  var _momentValue2, _momentValue3;
6432
6432
 
6433
- _onChange === null || _onChange === void 0 ? void 0 : _onChange((_momentValue2 = momentValue(v)) === null || _momentValue2 === void 0 ? void 0 : _momentValue2.format(format || 'YYYY-MM-DD'), (_momentValue3 = momentValue(v)) === null || _momentValue3 === void 0 ? void 0 : _momentValue3.format(format || 'YYYY-MM-DD'));
6433
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange((_momentValue2 = momentValue(v)) === null || _momentValue2 === void 0 ? void 0 : _momentValue2.format(format || (extraProps.showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD')), (_momentValue3 = momentValue(v)) === null || _momentValue3 === void 0 ? void 0 : _momentValue3.format(format || (extraProps.showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD')));
6434
6434
  }
6435
6435
  }, extraProps));
6436
6436
  };
@@ -6441,16 +6441,18 @@ var RangePicker$1 = function RangePicker(props) {
6441
6441
  var defaultValue = props.defaultValue,
6442
6442
  value = props.value,
6443
6443
  format = props.format,
6444
+ showTime = props.showTime,
6444
6445
  _onChange2 = props.onChange,
6445
6446
  extraProps = _objectWithoutProperties(props, _excluded2$1);
6446
6447
 
6447
6448
  return /*#__PURE__*/React.createElement(_DatePicker.RangePicker, _objectSpread2({
6449
+ showTime: showTime,
6448
6450
  defaultValue: defaultValue ? [momentValue(defaultValue[0]), momentValue(defaultValue[1])] : undefined,
6449
6451
  value: value ? [momentValue(value[0]), momentValue(value[1])] : undefined,
6450
6452
  onChange: function onChange(v) {
6451
6453
  var _momentValue4, _momentValue5, _momentValue6, _momentValue7;
6452
6454
 
6453
- _onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([((_momentValue4 = momentValue(v[0])) === null || _momentValue4 === void 0 ? void 0 : _momentValue4.format(format || 'YYYY-MM-DD')) || '', ((_momentValue5 = momentValue(v[1])) === null || _momentValue5 === void 0 ? void 0 : _momentValue5.format(format || 'YYYY-MM-DD')) || ''], [((_momentValue6 = momentValue(v[0])) === null || _momentValue6 === void 0 ? void 0 : _momentValue6.format(format || 'YYYY-MM-DD')) || '', ((_momentValue7 = momentValue(v[1])) === null || _momentValue7 === void 0 ? void 0 : _momentValue7.format(format || 'YYYY-MM-DD')) || '']);
6455
+ _onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([((_momentValue4 = momentValue(v[0])) === null || _momentValue4 === void 0 ? void 0 : _momentValue4.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', ((_momentValue5 = momentValue(v[1])) === null || _momentValue5 === void 0 ? void 0 : _momentValue5.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || ''], [((_momentValue6 = momentValue(v[0])) === null || _momentValue6 === void 0 ? void 0 : _momentValue6.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', ((_momentValue7 = momentValue(v[1])) === null || _momentValue7 === void 0 ? void 0 : _momentValue7.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '']);
6454
6456
  }
6455
6457
  }, extraProps));
6456
6458
  };
package/dist/index.js CHANGED
@@ -6441,7 +6441,7 @@ hooks.HTML5_FMT = {
6441
6441
  };
6442
6442
 
6443
6443
  var _excluded$3 = ["defaultValue", "format", "value", "onChange"],
6444
- _excluded2$1 = ["defaultValue", "value", "format", "onChange"];
6444
+ _excluded2$1 = ["defaultValue", "value", "format", "showTime", "onChange"];
6445
6445
 
6446
6446
  var momentValue = function momentValue(value) {
6447
6447
  if (value) {
@@ -6464,7 +6464,7 @@ var WDatePicker$1 = function WDatePicker(props) {
6464
6464
  onChange: function onChange(v) {
6465
6465
  var _momentValue2, _momentValue3;
6466
6466
 
6467
- _onChange === null || _onChange === void 0 ? void 0 : _onChange((_momentValue2 = momentValue(v)) === null || _momentValue2 === void 0 ? void 0 : _momentValue2.format(format || 'YYYY-MM-DD'), (_momentValue3 = momentValue(v)) === null || _momentValue3 === void 0 ? void 0 : _momentValue3.format(format || 'YYYY-MM-DD'));
6467
+ _onChange === null || _onChange === void 0 ? void 0 : _onChange((_momentValue2 = momentValue(v)) === null || _momentValue2 === void 0 ? void 0 : _momentValue2.format(format || (extraProps.showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD')), (_momentValue3 = momentValue(v)) === null || _momentValue3 === void 0 ? void 0 : _momentValue3.format(format || (extraProps.showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD')));
6468
6468
  }
6469
6469
  }, extraProps));
6470
6470
  };
@@ -6475,16 +6475,18 @@ var RangePicker$1 = function RangePicker(props) {
6475
6475
  var defaultValue = props.defaultValue,
6476
6476
  value = props.value,
6477
6477
  format = props.format,
6478
+ showTime = props.showTime,
6478
6479
  _onChange2 = props.onChange,
6479
6480
  extraProps = _objectWithoutProperties(props, _excluded2$1);
6480
6481
 
6481
6482
  return /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'].RangePicker, _objectSpread2({
6483
+ showTime: showTime,
6482
6484
  defaultValue: defaultValue ? [momentValue(defaultValue[0]), momentValue(defaultValue[1])] : undefined,
6483
6485
  value: value ? [momentValue(value[0]), momentValue(value[1])] : undefined,
6484
6486
  onChange: function onChange(v) {
6485
6487
  var _momentValue4, _momentValue5, _momentValue6, _momentValue7;
6486
6488
 
6487
- _onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([((_momentValue4 = momentValue(v[0])) === null || _momentValue4 === void 0 ? void 0 : _momentValue4.format(format || 'YYYY-MM-DD')) || '', ((_momentValue5 = momentValue(v[1])) === null || _momentValue5 === void 0 ? void 0 : _momentValue5.format(format || 'YYYY-MM-DD')) || ''], [((_momentValue6 = momentValue(v[0])) === null || _momentValue6 === void 0 ? void 0 : _momentValue6.format(format || 'YYYY-MM-DD')) || '', ((_momentValue7 = momentValue(v[1])) === null || _momentValue7 === void 0 ? void 0 : _momentValue7.format(format || 'YYYY-MM-DD')) || '']);
6489
+ _onChange2 === null || _onChange2 === void 0 ? void 0 : _onChange2([((_momentValue4 = momentValue(v[0])) === null || _momentValue4 === void 0 ? void 0 : _momentValue4.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', ((_momentValue5 = momentValue(v[1])) === null || _momentValue5 === void 0 ? void 0 : _momentValue5.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || ''], [((_momentValue6 = momentValue(v[0])) === null || _momentValue6 === void 0 ? void 0 : _momentValue6.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '', ((_momentValue7 = momentValue(v[1])) === null || _momentValue7 === void 0 ? void 0 : _momentValue7.format(format || (showTime ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'))) || '']);
6488
6490
  }
6489
6491
  }, extraProps));
6490
6492
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.3.13",
4
+ "version": "0.3.14",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",
@@ -76,4 +76,4 @@
76
76
  "react": "^16.12.0",
77
77
  "yorkie": "^2.0.0"
78
78
  }
79
- }
79
+ }