wargerm 0.3.12 → 0.3.15
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
|
-
value: [momentValue(value[0]), momentValue(value[1])],
|
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
|
};
|
@@ -10126,7 +10128,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
10126
10128
|
|
10127
10129
|
var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
|
10128
10130
|
|
10129
|
-
var _excluded$h = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"],
|
10131
|
+
var _excluded$h = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig", "pagination"],
|
10130
10132
|
_excluded2$3 = ["actionMethod"];
|
10131
10133
|
|
10132
10134
|
var TabelCard = function TabelCard(props, ref) {
|
@@ -10142,6 +10144,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10142
10144
|
onFormChange = props.onFormChange,
|
10143
10145
|
modalConfig = props.modalConfig,
|
10144
10146
|
optionColumnConfig = props.optionColumnConfig,
|
10147
|
+
pagination = props.pagination,
|
10145
10148
|
extraProps = _objectWithoutProperties(props, _excluded$h);
|
10146
10149
|
|
10147
10150
|
var actionRef = useRef();
|
@@ -10620,7 +10623,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10620
10623
|
return obj;
|
10621
10624
|
}),
|
10622
10625
|
search: false,
|
10623
|
-
pagination: {
|
10626
|
+
pagination: pagination || {
|
10624
10627
|
pageSize: 20
|
10625
10628
|
}
|
10626
10629
|
}, extraProps)));
|
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
|
-
value: [momentValue(value[0]), momentValue(value[1])],
|
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
|
};
|
@@ -10160,7 +10162,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
10160
10162
|
|
10161
10163
|
var ModalForm$1 = /*#__PURE__*/React__default['default'].forwardRef(ModalForm);
|
10162
10164
|
|
10163
|
-
var _excluded$h = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"],
|
10165
|
+
var _excluded$h = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig", "pagination"],
|
10164
10166
|
_excluded2$3 = ["actionMethod"];
|
10165
10167
|
|
10166
10168
|
var TabelCard = function TabelCard(props, ref) {
|
@@ -10176,6 +10178,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10176
10178
|
onFormChange = props.onFormChange,
|
10177
10179
|
modalConfig = props.modalConfig,
|
10178
10180
|
optionColumnConfig = props.optionColumnConfig,
|
10181
|
+
pagination = props.pagination,
|
10179
10182
|
extraProps = _objectWithoutProperties(props, _excluded$h);
|
10180
10183
|
|
10181
10184
|
var actionRef = React.useRef();
|
@@ -10654,7 +10657,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10654
10657
|
return obj;
|
10655
10658
|
}),
|
10656
10659
|
search: false,
|
10657
|
-
pagination: {
|
10660
|
+
pagination: pagination || {
|
10658
10661
|
pageSize: 20
|
10659
10662
|
}
|
10660
10663
|
}, extraProps)));
|
package/package.json
CHANGED