@pdg/react-form 1.0.72 → 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 +6 -6
- package/dist/index.esm.js +30 -12
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +30 -12
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/@types/types.d.ts
CHANGED
|
@@ -76,9 +76,9 @@ export interface FormRangeValueItemNameCommands {
|
|
|
76
76
|
}
|
|
77
77
|
export interface FormYearMonthValueItemCommands {
|
|
78
78
|
getYear(): number | null;
|
|
79
|
-
setYear(year: number): void;
|
|
79
|
+
setYear(year: number | null): void;
|
|
80
80
|
getMonth(): number | null;
|
|
81
|
-
setMonth(month: number): void;
|
|
81
|
+
setMonth(month: number | null): void;
|
|
82
82
|
}
|
|
83
83
|
export interface FormYearMonthValueItemNameCommands {
|
|
84
84
|
getFormValueYearNameSuffix(): string;
|
|
@@ -88,13 +88,13 @@ export interface FormYearMonthValueItemNameCommands {
|
|
|
88
88
|
}
|
|
89
89
|
export interface FormYearMonthRangeValueItemCommands {
|
|
90
90
|
getFromYear(): number | null;
|
|
91
|
-
setFromYear(year: number): void;
|
|
91
|
+
setFromYear(year: number | null): void;
|
|
92
92
|
getFromMonth(): number | null;
|
|
93
|
-
setFromMonth(month: number): void;
|
|
93
|
+
setFromMonth(month: number | null): void;
|
|
94
94
|
getToYear(): number | null;
|
|
95
|
-
setToYear(year: number): void;
|
|
95
|
+
setToYear(year: number | null): void;
|
|
96
96
|
getToMonth(): number | null;
|
|
97
|
-
setToMonth(month: number): void;
|
|
97
|
+
setToMonth(month: number | null): void;
|
|
98
98
|
}
|
|
99
99
|
export interface FormYearMonthRangeValueItemNameCommands {
|
|
100
100
|
getFormValueFromYearNameSuffix(): string;
|
package/dist/index.esm.js
CHANGED
|
@@ -14240,14 +14240,20 @@ var FormMonthPicker = React__default.forwardRef(function (_a, ref) {
|
|
|
14240
14240
|
},
|
|
14241
14241
|
getYear: function () { return (lastValue ? lastValue.year : null); },
|
|
14242
14242
|
setYear: function (year) {
|
|
14243
|
-
lastValue = getFinalValue(
|
|
14244
|
-
?
|
|
14245
|
-
:
|
|
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 });
|
|
14246
14248
|
setValue(lastValue);
|
|
14247
14249
|
},
|
|
14248
14250
|
getMonth: function () { return (lastValue ? lastValue.month : null); },
|
|
14249
14251
|
setMonth: function (month) {
|
|
14250
|
-
lastValue = getFinalValue(
|
|
14252
|
+
lastValue = getFinalValue(month === null
|
|
14253
|
+
? null
|
|
14254
|
+
: lastValue
|
|
14255
|
+
? { year: lastValue.year, month: month }
|
|
14256
|
+
: { year: new Date().getFullYear(), month: month });
|
|
14251
14257
|
setValue(lastValue);
|
|
14252
14258
|
},
|
|
14253
14259
|
isExceptValue: function () { return !!exceptValue; },
|
|
@@ -14623,9 +14629,11 @@ var FormMonthRangePicker = React__default.forwardRef(function (_a, ref) {
|
|
|
14623
14629
|
getFromYear: function () { return (lastValue[0] ? lastValue[0].year : null); },
|
|
14624
14630
|
setFromYear: function (year) {
|
|
14625
14631
|
lastValue = getFinalValue([
|
|
14626
|
-
|
|
14627
|
-
?
|
|
14628
|
-
:
|
|
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 },
|
|
14629
14637
|
lastValue[1],
|
|
14630
14638
|
]);
|
|
14631
14639
|
setValue(lastValue);
|
|
@@ -14633,7 +14641,11 @@ var FormMonthRangePicker = React__default.forwardRef(function (_a, ref) {
|
|
|
14633
14641
|
getFromMonth: function () { return (lastValue[0] ? lastValue[0].month : null); },
|
|
14634
14642
|
setFromMonth: function (month) {
|
|
14635
14643
|
lastValue = getFinalValue([
|
|
14636
|
-
|
|
14644
|
+
month === null
|
|
14645
|
+
? null
|
|
14646
|
+
: lastValue[0]
|
|
14647
|
+
? { year: lastValue[0].year, month: month }
|
|
14648
|
+
: { year: new Date().getFullYear(), month: month },
|
|
14637
14649
|
lastValue[1],
|
|
14638
14650
|
]);
|
|
14639
14651
|
setValue(lastValue);
|
|
@@ -14642,9 +14654,11 @@ var FormMonthRangePicker = React__default.forwardRef(function (_a, ref) {
|
|
|
14642
14654
|
setToYear: function (year) {
|
|
14643
14655
|
lastValue = getFinalValue([
|
|
14644
14656
|
lastValue[0],
|
|
14645
|
-
|
|
14646
|
-
?
|
|
14647
|
-
:
|
|
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 },
|
|
14648
14662
|
]);
|
|
14649
14663
|
setValue(lastValue);
|
|
14650
14664
|
},
|
|
@@ -14652,7 +14666,11 @@ var FormMonthRangePicker = React__default.forwardRef(function (_a, ref) {
|
|
|
14652
14666
|
setToMonth: function (month) {
|
|
14653
14667
|
lastValue = getFinalValue([
|
|
14654
14668
|
lastValue[0],
|
|
14655
|
-
|
|
14669
|
+
month === null
|
|
14670
|
+
? null
|
|
14671
|
+
: lastValue[1]
|
|
14672
|
+
? { year: lastValue[1].year, month: month }
|
|
14673
|
+
: { year: new Date().getFullYear(), month: month },
|
|
14656
14674
|
]);
|
|
14657
14675
|
setValue(lastValue);
|
|
14658
14676
|
},
|