wargerm 0.3.13 → 0.3.16
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/dist/components/WDatePicker/index.d.ts +1 -0
- package/dist/index.esm.js +15 -6
- package/dist/index.js +15 -6
- package/package.json +1 -1
@@ -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
@@ -729,7 +729,12 @@ var WSelect = function WSelect(props) {
|
|
729
729
|
onLoad && onLoad(options);
|
730
730
|
setValueEnumList(valueEnumNode);
|
731
731
|
}, [JSON.stringify(resList), JSON.stringify(request), JSON.stringify(params || {})]);
|
732
|
-
return /*#__PURE__*/React.createElement(_Select, _objectSpread2({
|
732
|
+
return /*#__PURE__*/React.createElement(_Select, _objectSpread2({
|
733
|
+
showSearch: true,
|
734
|
+
filterOption: function filterOption(input, option) {
|
735
|
+
return option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
736
|
+
}
|
737
|
+
}, extraProps), request ? childrenNode : valueEnum ? valueEnumList : children);
|
733
738
|
};
|
734
739
|
|
735
740
|
WSelect.defaultProps = {};
|
@@ -6407,7 +6412,7 @@ hooks.HTML5_FMT = {
|
|
6407
6412
|
};
|
6408
6413
|
|
6409
6414
|
var _excluded$3 = ["defaultValue", "format", "value", "onChange"],
|
6410
|
-
_excluded2$1 = ["defaultValue", "value", "format", "onChange"];
|
6415
|
+
_excluded2$1 = ["defaultValue", "value", "format", "showTime", "onChange"];
|
6411
6416
|
|
6412
6417
|
var momentValue = function momentValue(value) {
|
6413
6418
|
if (value) {
|
@@ -6430,7 +6435,7 @@ var WDatePicker$1 = function WDatePicker(props) {
|
|
6430
6435
|
onChange: function onChange(v) {
|
6431
6436
|
var _momentValue2, _momentValue3;
|
6432
6437
|
|
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'));
|
6438
|
+
_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
6439
|
}
|
6435
6440
|
}, extraProps));
|
6436
6441
|
};
|
@@ -6441,16 +6446,18 @@ var RangePicker$1 = function RangePicker(props) {
|
|
6441
6446
|
var defaultValue = props.defaultValue,
|
6442
6447
|
value = props.value,
|
6443
6448
|
format = props.format,
|
6449
|
+
showTime = props.showTime,
|
6444
6450
|
_onChange2 = props.onChange,
|
6445
6451
|
extraProps = _objectWithoutProperties(props, _excluded2$1);
|
6446
6452
|
|
6447
6453
|
return /*#__PURE__*/React.createElement(_DatePicker.RangePicker, _objectSpread2({
|
6454
|
+
showTime: showTime,
|
6448
6455
|
defaultValue: defaultValue ? [momentValue(defaultValue[0]), momentValue(defaultValue[1])] : undefined,
|
6449
6456
|
value: value ? [momentValue(value[0]), momentValue(value[1])] : undefined,
|
6450
6457
|
onChange: function onChange(v) {
|
6451
6458
|
var _momentValue4, _momentValue5, _momentValue6, _momentValue7;
|
6452
6459
|
|
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')) || '']);
|
6460
|
+
_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
6461
|
}
|
6455
6462
|
}, extraProps));
|
6456
6463
|
};
|
@@ -6620,6 +6627,7 @@ var TreeSelect = function TreeSelect(_ref) {
|
|
6620
6627
|
}))();
|
6621
6628
|
}, []);
|
6622
6629
|
return /*#__PURE__*/React.createElement(_TreeSelect, _objectSpread2({
|
6630
|
+
showSearch: true,
|
6623
6631
|
treeDefaultExpandAll: true
|
6624
6632
|
}, props), !props.children ? renderTree(treeData) : props.children);
|
6625
6633
|
};
|
@@ -10126,7 +10134,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
10126
10134
|
|
10127
10135
|
var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
|
10128
10136
|
|
10129
|
-
var _excluded$h = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"],
|
10137
|
+
var _excluded$h = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig", "pagination"],
|
10130
10138
|
_excluded2$3 = ["actionMethod"];
|
10131
10139
|
|
10132
10140
|
var TabelCard = function TabelCard(props, ref) {
|
@@ -10142,6 +10150,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10142
10150
|
onFormChange = props.onFormChange,
|
10143
10151
|
modalConfig = props.modalConfig,
|
10144
10152
|
optionColumnConfig = props.optionColumnConfig,
|
10153
|
+
pagination = props.pagination,
|
10145
10154
|
extraProps = _objectWithoutProperties(props, _excluded$h);
|
10146
10155
|
|
10147
10156
|
var actionRef = useRef();
|
@@ -10620,7 +10629,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10620
10629
|
return obj;
|
10621
10630
|
}),
|
10622
10631
|
search: false,
|
10623
|
-
pagination: {
|
10632
|
+
pagination: pagination || {
|
10624
10633
|
pageSize: 20
|
10625
10634
|
}
|
10626
10635
|
}, extraProps)));
|
package/dist/index.js
CHANGED
@@ -763,7 +763,12 @@ var WSelect = function WSelect(props) {
|
|
763
763
|
onLoad && onLoad(options);
|
764
764
|
setValueEnumList(valueEnumNode);
|
765
765
|
}, [JSON.stringify(resList), JSON.stringify(request), JSON.stringify(params || {})]);
|
766
|
-
return /*#__PURE__*/React__default['default'].createElement(_Select__default['default'], _objectSpread2({
|
766
|
+
return /*#__PURE__*/React__default['default'].createElement(_Select__default['default'], _objectSpread2({
|
767
|
+
showSearch: true,
|
768
|
+
filterOption: function filterOption(input, option) {
|
769
|
+
return option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
770
|
+
}
|
771
|
+
}, extraProps), request ? childrenNode : valueEnum ? valueEnumList : children);
|
767
772
|
};
|
768
773
|
|
769
774
|
WSelect.defaultProps = {};
|
@@ -6441,7 +6446,7 @@ hooks.HTML5_FMT = {
|
|
6441
6446
|
};
|
6442
6447
|
|
6443
6448
|
var _excluded$3 = ["defaultValue", "format", "value", "onChange"],
|
6444
|
-
_excluded2$1 = ["defaultValue", "value", "format", "onChange"];
|
6449
|
+
_excluded2$1 = ["defaultValue", "value", "format", "showTime", "onChange"];
|
6445
6450
|
|
6446
6451
|
var momentValue = function momentValue(value) {
|
6447
6452
|
if (value) {
|
@@ -6464,7 +6469,7 @@ var WDatePicker$1 = function WDatePicker(props) {
|
|
6464
6469
|
onChange: function onChange(v) {
|
6465
6470
|
var _momentValue2, _momentValue3;
|
6466
6471
|
|
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'));
|
6472
|
+
_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
6473
|
}
|
6469
6474
|
}, extraProps));
|
6470
6475
|
};
|
@@ -6475,16 +6480,18 @@ var RangePicker$1 = function RangePicker(props) {
|
|
6475
6480
|
var defaultValue = props.defaultValue,
|
6476
6481
|
value = props.value,
|
6477
6482
|
format = props.format,
|
6483
|
+
showTime = props.showTime,
|
6478
6484
|
_onChange2 = props.onChange,
|
6479
6485
|
extraProps = _objectWithoutProperties(props, _excluded2$1);
|
6480
6486
|
|
6481
6487
|
return /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'].RangePicker, _objectSpread2({
|
6488
|
+
showTime: showTime,
|
6482
6489
|
defaultValue: defaultValue ? [momentValue(defaultValue[0]), momentValue(defaultValue[1])] : undefined,
|
6483
6490
|
value: value ? [momentValue(value[0]), momentValue(value[1])] : undefined,
|
6484
6491
|
onChange: function onChange(v) {
|
6485
6492
|
var _momentValue4, _momentValue5, _momentValue6, _momentValue7;
|
6486
6493
|
|
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')) || '']);
|
6494
|
+
_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
6495
|
}
|
6489
6496
|
}, extraProps));
|
6490
6497
|
};
|
@@ -6654,6 +6661,7 @@ var TreeSelect = function TreeSelect(_ref) {
|
|
6654
6661
|
}))();
|
6655
6662
|
}, []);
|
6656
6663
|
return /*#__PURE__*/React__default['default'].createElement(_TreeSelect__default['default'], _objectSpread2({
|
6664
|
+
showSearch: true,
|
6657
6665
|
treeDefaultExpandAll: true
|
6658
6666
|
}, props), !props.children ? renderTree(treeData) : props.children);
|
6659
6667
|
};
|
@@ -10160,7 +10168,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
10160
10168
|
|
10161
10169
|
var ModalForm$1 = /*#__PURE__*/React__default['default'].forwardRef(ModalForm);
|
10162
10170
|
|
10163
|
-
var _excluded$h = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig"],
|
10171
|
+
var _excluded$h = ["columns", "extraColumns", "request", "modalFormSearch", "search", "tableAction", "renderTableBar", "className", "style", "onFormChange", "modalConfig", "optionColumnConfig", "pagination"],
|
10164
10172
|
_excluded2$3 = ["actionMethod"];
|
10165
10173
|
|
10166
10174
|
var TabelCard = function TabelCard(props, ref) {
|
@@ -10176,6 +10184,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10176
10184
|
onFormChange = props.onFormChange,
|
10177
10185
|
modalConfig = props.modalConfig,
|
10178
10186
|
optionColumnConfig = props.optionColumnConfig,
|
10187
|
+
pagination = props.pagination,
|
10179
10188
|
extraProps = _objectWithoutProperties(props, _excluded$h);
|
10180
10189
|
|
10181
10190
|
var actionRef = React.useRef();
|
@@ -10654,7 +10663,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
10654
10663
|
return obj;
|
10655
10664
|
}),
|
10656
10665
|
search: false,
|
10657
|
-
pagination: {
|
10666
|
+
pagination: pagination || {
|
10658
10667
|
pageSize: 20
|
10659
10668
|
}
|
10660
10669
|
}, extraProps)));
|