@pdg/react-form 1.0.71 → 1.0.73
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/@types/types.d.ts +17 -1
- package/dist/FormItemCustom/FormMonthPicker/FormMonthPicker.types.d.ts +2 -2
- package/dist/FormItemCustom/FormMonthRangePicker/FormMonthRangePicker.types.d.ts +2 -2
- package/dist/index.esm.js +66 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +66 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14238,6 +14238,24 @@ var FormMonthPicker = React.forwardRef(function (_a, ref) {
|
|
|
14238
14238
|
lastData = data;
|
|
14239
14239
|
setData(data);
|
|
14240
14240
|
},
|
|
14241
|
+
getYear: function () { return (lastValue ? lastValue.year : null); },
|
|
14242
|
+
setYear: function (year) {
|
|
14243
|
+
lastValue = getFinalValue(year === null
|
|
14244
|
+
? null
|
|
14245
|
+
: lastValue
|
|
14246
|
+
? { year: year, month: lastValue.month }
|
|
14247
|
+
: { year: year, month: year === new Date().getFullYear() ? new Date().getMonth() + 1 : 1 });
|
|
14248
|
+
setValue(lastValue);
|
|
14249
|
+
},
|
|
14250
|
+
getMonth: function () { return (lastValue ? lastValue.month : null); },
|
|
14251
|
+
setMonth: function (month) {
|
|
14252
|
+
lastValue = getFinalValue(month === null
|
|
14253
|
+
? null
|
|
14254
|
+
: lastValue
|
|
14255
|
+
? { year: lastValue.year, month: month }
|
|
14256
|
+
: { year: new Date().getFullYear(), month: month });
|
|
14257
|
+
setValue(lastValue);
|
|
14258
|
+
},
|
|
14241
14259
|
isExceptValue: function () { return !!exceptValue; },
|
|
14242
14260
|
isDisabled: function () { return lastDisabled; },
|
|
14243
14261
|
setDisabled: function (disabled) {
|
|
@@ -14608,6 +14626,54 @@ var FormMonthRangePicker = React.forwardRef(function (_a, ref) {
|
|
|
14608
14626
|
lastValue = [lastValue[0], value];
|
|
14609
14627
|
setValue(lastValue);
|
|
14610
14628
|
},
|
|
14629
|
+
getFromYear: function () { return (lastValue[0] ? lastValue[0].year : null); },
|
|
14630
|
+
setFromYear: function (year) {
|
|
14631
|
+
lastValue = getFinalValue([
|
|
14632
|
+
year === null
|
|
14633
|
+
? null
|
|
14634
|
+
: lastValue[0]
|
|
14635
|
+
? { year: year, month: lastValue[0].month }
|
|
14636
|
+
: { year: year, month: year === new Date().getFullYear() ? new Date().getMonth() + 1 : 1 },
|
|
14637
|
+
lastValue[1],
|
|
14638
|
+
]);
|
|
14639
|
+
setValue(lastValue);
|
|
14640
|
+
},
|
|
14641
|
+
getFromMonth: function () { return (lastValue[0] ? lastValue[0].month : null); },
|
|
14642
|
+
setFromMonth: function (month) {
|
|
14643
|
+
lastValue = getFinalValue([
|
|
14644
|
+
month === null
|
|
14645
|
+
? null
|
|
14646
|
+
: lastValue[0]
|
|
14647
|
+
? { year: lastValue[0].year, month: month }
|
|
14648
|
+
: { year: new Date().getFullYear(), month: month },
|
|
14649
|
+
lastValue[1],
|
|
14650
|
+
]);
|
|
14651
|
+
setValue(lastValue);
|
|
14652
|
+
},
|
|
14653
|
+
getToYear: function () { return (lastValue[1] ? lastValue[1].year : null); },
|
|
14654
|
+
setToYear: function (year) {
|
|
14655
|
+
lastValue = getFinalValue([
|
|
14656
|
+
lastValue[0],
|
|
14657
|
+
year === null
|
|
14658
|
+
? null
|
|
14659
|
+
: lastValue[1]
|
|
14660
|
+
? { year: year, month: lastValue[1].month }
|
|
14661
|
+
: { year: year, month: year === new Date().getFullYear() ? new Date().getMonth() + 1 : 1 },
|
|
14662
|
+
]);
|
|
14663
|
+
setValue(lastValue);
|
|
14664
|
+
},
|
|
14665
|
+
getToMonth: function () { return (lastValue[1] ? lastValue[1].month : null); },
|
|
14666
|
+
setToMonth: function (month) {
|
|
14667
|
+
lastValue = getFinalValue([
|
|
14668
|
+
lastValue[0],
|
|
14669
|
+
month === null
|
|
14670
|
+
? null
|
|
14671
|
+
: lastValue[1]
|
|
14672
|
+
? { year: lastValue[1].year, month: month }
|
|
14673
|
+
: { year: new Date().getFullYear(), month: month },
|
|
14674
|
+
]);
|
|
14675
|
+
setValue(lastValue);
|
|
14676
|
+
},
|
|
14611
14677
|
isExceptValue: function () { return !!exceptValue; },
|
|
14612
14678
|
isDisabled: function () { return lastDisabled; },
|
|
14613
14679
|
setDisabled: function (disabled) {
|