@react-stately/datepicker 3.7.0 → 3.9.0
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/import.mjs +602 -99
- package/dist/main.js +601 -97
- package/dist/main.js.map +1 -1
- package/dist/module.js +602 -99
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +10 -9
- package/dist/types.d.ts.map +1 -1
- package/package.json +7 -6
- package/src/useDateFieldState.ts +23 -5
- package/src/useDatePickerState.ts +38 -18
- package/src/useDateRangePickerState.ts +40 -17
- package/src/useTimeFieldState.ts +5 -3
- package/src/utils.ts +103 -5
package/dist/main.js
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
var $h2qOe$internationalizeddate = require("@internationalized/date");
|
|
2
|
+
var $h2qOe$reactstatelyform = require("@react-stately/form");
|
|
2
3
|
var $h2qOe$reactstatelyoverlays = require("@react-stately/overlays");
|
|
3
4
|
var $h2qOe$reactstatelyutils = require("@react-stately/utils");
|
|
4
5
|
var $h2qOe$react = require("react");
|
|
5
6
|
var $h2qOe$internationalizedstring = require("@internationalized/string");
|
|
6
7
|
|
|
8
|
+
|
|
7
9
|
function $parcel$export(e, n, v, s) {
|
|
8
10
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
9
11
|
}
|
|
10
12
|
|
|
13
|
+
function $parcel$interopDefault(a) {
|
|
14
|
+
return a && a.__esModule ? a.default : a;
|
|
15
|
+
}
|
|
16
|
+
|
|
11
17
|
$parcel$export(module.exports, "useDatePickerState", () => $aaab7a647e17e1fd$export$87194bb378cc3ac2);
|
|
12
18
|
$parcel$export(module.exports, "useDateFieldState", () => $596a1f0f523d6752$export$60e84778edff6d26);
|
|
13
19
|
$parcel$export(module.exports, "useDateRangePickerState", () => $7072d26f58deb33b$export$e50a61c1de9f574);
|
|
@@ -44,9 +50,415 @@ $parcel$export(module.exports, "useTimeFieldState", () => $2654e87be0231a69$expo
|
|
|
44
50
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
45
51
|
* governing permissions and limitations under the License.
|
|
46
52
|
*/
|
|
53
|
+
var $5294278fb5cc815e$exports = {};
|
|
54
|
+
var $a16eae39a66f3afd$exports = {};
|
|
55
|
+
$a16eae39a66f3afd$exports = {
|
|
56
|
+
"rangeOverflow": (args)=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${args.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,
|
|
57
|
+
"rangeReversed": `\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{628}\u{62F}\u{621} \u{64A}\u{62C}\u{628} \u{623}\u{646} \u{64A}\u{643}\u{648}\u{646} \u{642}\u{628}\u{644} \u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{627}\u{644}\u{627}\u{646}\u{62A}\u{647}\u{627}\u{621}.`,
|
|
58
|
+
"rangeUnderflow": (args)=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${args.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,
|
|
59
|
+
"unavailableDate": `\u{627}\u{644}\u{628}\u{64A}\u{627}\u{646}\u{627}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}\u{629} \u{63A}\u{64A}\u{631} \u{645}\u{62A}\u{627}\u{62D}\u{629}.`
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
var $be973442240b2918$exports = {};
|
|
64
|
+
$be973442240b2918$exports = {
|
|
65
|
+
"rangeOverflow": (args)=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${args.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,
|
|
66
|
+
"rangeReversed": `\u{41D}\u{430}\u{447}\u{430}\u{43B}\u{43D}\u{430}\u{442}\u{430} \u{434}\u{430}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} \u{43F}\u{440}\u{435}\u{434}\u{438} \u{43A}\u{440}\u{430}\u{439}\u{43D}\u{430}\u{442}\u{430}.`,
|
|
67
|
+
"rangeUnderflow": (args)=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${args.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,
|
|
68
|
+
"unavailableDate": `\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430}\u{442}\u{430} \u{434}\u{430}\u{442}\u{430} \u{43D}\u{435} \u{435} \u{43D}\u{430}\u{43B}\u{438}\u{447}\u{43D}\u{430}.`
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
var $a1709037331f64d7$exports = {};
|
|
73
|
+
$a1709037331f64d7$exports = {
|
|
74
|
+
"rangeOverflow": (args)=>`Hodnota mus\xed b\xfdt ${args.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,
|
|
75
|
+
"rangeReversed": `Datum zah\xe1jen\xed mus\xed p\u{159}edch\xe1zet datu ukon\u{10D}en\xed.`,
|
|
76
|
+
"rangeUnderflow": (args)=>`Hodnota mus\xed b\xfdt ${args.minValue} nebo pozd\u{11B}j\u{161}\xed.`,
|
|
77
|
+
"unavailableDate": `Vybran\xe9 datum nen\xed k dispozici.`
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
var $1896523498fa2f44$exports = {};
|
|
82
|
+
$1896523498fa2f44$exports = {
|
|
83
|
+
"rangeOverflow": (args)=>`V\xe6rdien skal v\xe6re ${args.maxValue} eller tidligere.`,
|
|
84
|
+
"rangeReversed": `Startdatoen skal v\xe6re f\xf8r slutdatoen.`,
|
|
85
|
+
"rangeUnderflow": (args)=>`V\xe6rdien skal v\xe6re ${args.minValue} eller nyere.`,
|
|
86
|
+
"unavailableDate": `Den valgte dato er ikke tilg\xe6ngelig.`
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
var $169837a5a815615d$exports = {};
|
|
91
|
+
$169837a5a815615d$exports = {
|
|
92
|
+
"rangeOverflow": (args)=>`Der Wert muss ${args.maxValue} oder fr\xfcher sein.`,
|
|
93
|
+
"rangeReversed": `Das Anfangsdatum muss vor dem Enddatum liegen.`,
|
|
94
|
+
"rangeUnderflow": (args)=>`Der Wert muss ${args.minValue} oder sp\xe4ter sein.`,
|
|
95
|
+
"unavailableDate": `Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar.`
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
var $cfb55132d6925036$exports = {};
|
|
100
|
+
$cfb55132d6925036$exports = {
|
|
101
|
+
"rangeOverflow": (args)=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${args.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,
|
|
102
|
+
"rangeReversed": `\u{397} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3AD}\u{3BD}\u{3B1}\u{3C1}\u{3BE}\u{3B7}\u{3C2} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} \u{3C0}\u{3C1}\u{3B9}\u{3BD} \u{3B1}\u{3C0}\u{3CC} \u{3C4}\u{3B7}\u{3BD} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3BB}\u{3AE}\u{3BE}\u{3B7}\u{3C2}.`,
|
|
103
|
+
"rangeUnderflow": (args)=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${args.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,
|
|
104
|
+
"unavailableDate": `\u{397} \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1} \u{3B4}\u{3B5}\u{3BD} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} \u{3B4}\u{3B9}\u{3B1}\u{3B8}\u{3AD}\u{3C3}\u{3B9}\u{3BC}\u{3B7}.`
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
var $384a6c8de1da1e62$exports = {};
|
|
109
|
+
$384a6c8de1da1e62$exports = {
|
|
110
|
+
"rangeUnderflow": (args)=>`Value must be ${args.minValue} or later.`,
|
|
111
|
+
"rangeOverflow": (args)=>`Value must be ${args.maxValue} or earlier.`,
|
|
112
|
+
"rangeReversed": `Start date must be before end date.`,
|
|
113
|
+
"unavailableDate": `Selected date unavailable.`
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
var $be8241903709dc6e$exports = {};
|
|
118
|
+
$be8241903709dc6e$exports = {
|
|
119
|
+
"rangeOverflow": (args)=>`El valor debe ser ${args.maxValue} o anterior.`,
|
|
120
|
+
"rangeReversed": `La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.`,
|
|
121
|
+
"rangeUnderflow": (args)=>`El valor debe ser ${args.minValue} o posterior.`,
|
|
122
|
+
"unavailableDate": `Fecha seleccionada no disponible.`
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
var $63e1eb192205ecbf$exports = {};
|
|
127
|
+
$63e1eb192205ecbf$exports = {
|
|
128
|
+
"rangeOverflow": (args)=>`V\xe4\xe4rtus peab olema ${args.maxValue} v\xf5i varasem.`,
|
|
129
|
+
"rangeReversed": `Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.`,
|
|
130
|
+
"rangeUnderflow": (args)=>`V\xe4\xe4rtus peab olema ${args.minValue} v\xf5i hilisem.`,
|
|
131
|
+
"unavailableDate": `Valitud kuup\xe4ev pole saadaval.`
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
var $41dc33071b9981dc$exports = {};
|
|
136
|
+
$41dc33071b9981dc$exports = {
|
|
137
|
+
"rangeOverflow": (args)=>`Arvon on oltava ${args.maxValue} tai sit\xe4 aikaisempi.`,
|
|
138
|
+
"rangeReversed": `Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.`,
|
|
139
|
+
"rangeUnderflow": (args)=>`Arvon on oltava ${args.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,
|
|
140
|
+
"unavailableDate": `Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4.`
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
var $c75ba81d7768253e$exports = {};
|
|
145
|
+
$c75ba81d7768253e$exports = {
|
|
146
|
+
"rangeOverflow": (args)=>`La valeur doit \xeatre ${args.maxValue} ou ant\xe9rieure.`,
|
|
147
|
+
"rangeReversed": `La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.`,
|
|
148
|
+
"rangeUnderflow": (args)=>`La valeur doit \xeatre ${args.minValue} ou ult\xe9rieure.`,
|
|
149
|
+
"unavailableDate": `La date s\xe9lectionn\xe9e n\u{2019}est pas disponible.`
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
var $f678f4bf27dcdd12$exports = {};
|
|
154
|
+
$f678f4bf27dcdd12$exports = {
|
|
155
|
+
"rangeOverflow": (args)=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${args.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,
|
|
156
|
+
"rangeReversed": `\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5D4}\u{5EA}\u{5D7}\u{5DC}\u{5D4} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} \u{5DC}\u{5E4}\u{5E0}\u{5D9} \u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5E1}\u{5D9}\u{5D5}\u{5DD}.`,
|
|
157
|
+
"rangeUnderflow": (args)=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${args.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,
|
|
158
|
+
"unavailableDate": `\u{5D4}\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5D4}\u{5E0}\u{5D1}\u{5D7}\u{5E8} \u{5D0}\u{5D9}\u{5E0}\u{5D5} \u{5D6}\u{5DE}\u{5D9}\u{5DF}.`
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
var $d23f6e75dc589b55$exports = {};
|
|
163
|
+
$d23f6e75dc589b55$exports = {
|
|
164
|
+
"rangeOverflow": (args)=>`Vrijednost mora biti ${args.maxValue} ili ranije.`,
|
|
165
|
+
"rangeReversed": `Datum po\u{10D}etka mora biti prije datuma zavr\u{161}etka.`,
|
|
166
|
+
"rangeUnderflow": (args)=>`Vrijednost mora biti ${args.minValue} ili kasnije.`,
|
|
167
|
+
"unavailableDate": `Odabrani datum nije dostupan.`
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
var $439e34e0a9a3f4c1$exports = {};
|
|
172
|
+
$439e34e0a9a3f4c1$exports = {
|
|
173
|
+
"rangeOverflow": (args)=>`Az \xe9rt\xe9knek ${args.maxValue} vagy kor\xe1bbinak kell lennie.`,
|
|
174
|
+
"rangeReversed": `A kezd\u{151} d\xe1tumnak a befejez\u{151} d\xe1tumn\xe1l kor\xe1bbinak kell lennie.`,
|
|
175
|
+
"rangeUnderflow": (args)=>`Az \xe9rt\xe9knek ${args.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,
|
|
176
|
+
"unavailableDate": `A kiv\xe1lasztott d\xe1tum nem \xe9rhet\u{151} el.`
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
var $449973ba87982f00$exports = {};
|
|
181
|
+
$449973ba87982f00$exports = {
|
|
182
|
+
"rangeOverflow": (args)=>`Il valore deve essere ${args.maxValue} o precedente.`,
|
|
183
|
+
"rangeReversed": `La data di inizio deve essere antecedente alla data di fine.`,
|
|
184
|
+
"rangeUnderflow": (args)=>`Il valore deve essere ${args.minValue} o successivo.`,
|
|
185
|
+
"unavailableDate": `Data selezionata non disponibile.`
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
var $902560907618d6e6$exports = {};
|
|
190
|
+
$902560907618d6e6$exports = {
|
|
191
|
+
"rangeOverflow": (args)=>`\u{5024}\u{306F} ${args.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,
|
|
192
|
+
"rangeReversed": `\u{958B}\u{59CB}\u{65E5}\u{306F}\u{7D42}\u{4E86}\u{65E5}\u{3088}\u{308A}\u{524D}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,
|
|
193
|
+
"rangeUnderflow": (args)=>`\u{5024}\u{306F} ${args.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,
|
|
194
|
+
"unavailableDate": `\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8}\u{306F}\u{4F7F}\u{7528}\u{3067}\u{304D}\u{307E}\u{305B}\u{3093}\u{3002}`
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
var $8c0f39c970bc2860$exports = {};
|
|
199
|
+
$8c0f39c970bc2860$exports = {
|
|
200
|
+
"rangeOverflow": (args)=>`\u{AC12}\u{C740} ${args.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,
|
|
201
|
+
"rangeReversed": `\u{C2DC}\u{C791}\u{C77C}\u{C740} \u{C885}\u{B8CC}\u{C77C} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,
|
|
202
|
+
"rangeUnderflow": (args)=>`\u{AC12}\u{C740} ${args.minValue} \u{C774}\u{C0C1}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,
|
|
203
|
+
"unavailableDate": `\u{C120}\u{D0DD}\u{D55C} \u{B0A0}\u{C9DC}\u{B97C} \u{C0AC}\u{C6A9}\u{D560} \u{C218} \u{C5C6}\u{C2B5}\u{B2C8}\u{B2E4}.`
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
var $db03bc54746c5caa$exports = {};
|
|
208
|
+
$db03bc54746c5caa$exports = {
|
|
209
|
+
"rangeOverflow": (args)=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${args.maxValue} arba ankstesn\u{117}.`,
|
|
210
|
+
"rangeReversed": `Prad\u{17E}ios data turi b\u{16B}ti ankstesn\u{117} nei pabaigos data.`,
|
|
211
|
+
"rangeUnderflow": (args)=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${args.minValue} arba naujesn\u{117}.`,
|
|
212
|
+
"unavailableDate": `Pasirinkta data nepasiekiama.`
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
var $3f356a0921f4d37a$exports = {};
|
|
217
|
+
$3f356a0921f4d37a$exports = {
|
|
218
|
+
"rangeOverflow": (args)=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${args.maxValue} vai agr\u{101}kai.`,
|
|
219
|
+
"rangeReversed": `S\u{101}kuma datumam ir j\u{101}b\u{16B}t pirms beigu datuma.`,
|
|
220
|
+
"rangeUnderflow": (args)=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${args.minValue} vai v\u{113}l\u{101}kai.`,
|
|
221
|
+
"unavailableDate": `Atlas\u{12B}tais datums nav pieejams.`
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
var $1265d19da9735bfb$exports = {};
|
|
226
|
+
$1265d19da9735bfb$exports = {
|
|
227
|
+
"rangeOverflow": (args)=>`Verdien m\xe5 v\xe6re ${args.maxValue} eller tidligere.`,
|
|
228
|
+
"rangeReversed": `Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.`,
|
|
229
|
+
"rangeUnderflow": (args)=>`Verdien m\xe5 v\xe6re ${args.minValue} eller senere.`,
|
|
230
|
+
"unavailableDate": `Valgt dato utilgjengelig.`
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
var $7b57f991f3f6edd1$exports = {};
|
|
235
|
+
$7b57f991f3f6edd1$exports = {
|
|
236
|
+
"rangeOverflow": (args)=>`Waarde moet ${args.maxValue} of eerder zijn.`,
|
|
237
|
+
"rangeReversed": `De startdatum moet voor de einddatum liggen.`,
|
|
238
|
+
"rangeUnderflow": (args)=>`Waarde moet ${args.minValue} of later zijn.`,
|
|
239
|
+
"unavailableDate": `Geselecteerde datum niet beschikbaar.`
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
var $04fe5f1360210d7c$exports = {};
|
|
244
|
+
$04fe5f1360210d7c$exports = {
|
|
245
|
+
"rangeOverflow": (args)=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${args.maxValue} lub wcze\u{15B}niejsz\u{105}.`,
|
|
246
|
+
"rangeReversed": `Data rozpocz\u{119}cia musi by\u{107} wcze\u{15B}niejsza ni\u{17C} data zako\u{144}czenia.`,
|
|
247
|
+
"rangeUnderflow": (args)=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${args.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,
|
|
248
|
+
"unavailableDate": `Wybrana data jest niedost\u{119}pna.`
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
var $e64ffd0cafbe4c46$exports = {};
|
|
253
|
+
$e64ffd0cafbe4c46$exports = {
|
|
254
|
+
"rangeOverflow": (args)=>`O valor deve ser ${args.maxValue} ou anterior.`,
|
|
255
|
+
"rangeReversed": `A data inicial deve ser anterior \xe0 data final.`,
|
|
256
|
+
"rangeUnderflow": (args)=>`O valor deve ser ${args.minValue} ou posterior.`,
|
|
257
|
+
"unavailableDate": `Data selecionada indispon\xedvel.`
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
var $f7b4a5fc25c8f238$exports = {};
|
|
262
|
+
$f7b4a5fc25c8f238$exports = {
|
|
263
|
+
"rangeOverflow": (args)=>`O valor tem de ser ${args.maxValue} ou anterior.`,
|
|
264
|
+
"rangeReversed": `A data de in\xedcio deve ser anterior \xe0 data de fim.`,
|
|
265
|
+
"rangeUnderflow": (args)=>`O valor tem de ser ${args.minValue} ou posterior.`,
|
|
266
|
+
"unavailableDate": `Data selecionada indispon\xedvel.`
|
|
267
|
+
};
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
var $cf72ee454c27a2e7$exports = {};
|
|
271
|
+
$cf72ee454c27a2e7$exports = {
|
|
272
|
+
"rangeOverflow": (args)=>`Valoarea trebuie s\u{103} fie ${args.maxValue} sau anterioar\u{103}.`,
|
|
273
|
+
"rangeReversed": `Data de \xeenceput trebuie s\u{103} fie anterioar\u{103} datei de sf\xe2r\u{219}it.`,
|
|
274
|
+
"rangeUnderflow": (args)=>`Valoarea trebuie s\u{103} fie ${args.minValue} sau ulterioar\u{103}.`,
|
|
275
|
+
"unavailableDate": `Data selectat\u{103} nu este disponibil\u{103}.`
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
var $a41511fa599c2cbe$exports = {};
|
|
280
|
+
$a41511fa599c2cbe$exports = {
|
|
281
|
+
"rangeOverflow": (args)=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${args.maxValue}.`,
|
|
282
|
+
"rangeReversed": `\u{414}\u{430}\u{442}\u{430} \u{43D}\u{430}\u{447}\u{430}\u{43B}\u{430} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{430} \u{43F}\u{440}\u{435}\u{434}\u{448}\u{435}\u{441}\u{442}\u{432}\u{43E}\u{432}\u{430}\u{442}\u{44C} \u{434}\u{430}\u{442}\u{435} \u{43E}\u{43A}\u{43E}\u{43D}\u{447}\u{430}\u{43D}\u{438}\u{44F}.`,
|
|
283
|
+
"rangeUnderflow": (args)=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${args.minValue}.`,
|
|
284
|
+
"unavailableDate": `\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430} \u{43D}\u{435}\u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430}.`
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
|
|
288
|
+
var $2fedc389afac088d$exports = {};
|
|
289
|
+
$2fedc389afac088d$exports = {
|
|
290
|
+
"rangeOverflow": (args)=>`Hodnota mus\xed by\u{165} ${args.maxValue} alebo skor\u{161}ia.`,
|
|
291
|
+
"rangeReversed": `D\xe1tum za\u{10D}iatku mus\xed by\u{165} skor\u{161}\xed ako d\xe1tum konca.`,
|
|
292
|
+
"rangeUnderflow": (args)=>`Hodnota mus\xed by\u{165} ${args.minValue} alebo neskor\u{161}ia.`,
|
|
293
|
+
"unavailableDate": `Vybrat\xfd d\xe1tum je nedostupn\xfd.`
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
var $b0aebb8d8c040cc9$exports = {};
|
|
298
|
+
$b0aebb8d8c040cc9$exports = {
|
|
299
|
+
"rangeOverflow": (args)=>`Vrednost mora biti ${args.maxValue} ali starej\u{161}a.`,
|
|
300
|
+
"rangeReversed": `Za\u{10D}etni datum mora biti pred kon\u{10D}nim datumom.`,
|
|
301
|
+
"rangeUnderflow": (args)=>`Vrednost mora biti ${args.minValue} ali novej\u{161}a.`,
|
|
302
|
+
"unavailableDate": `Izbrani datum ni na voljo.`
|
|
303
|
+
};
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
var $67017d9b82b5d17e$exports = {};
|
|
307
|
+
$67017d9b82b5d17e$exports = {
|
|
308
|
+
"rangeOverflow": (args)=>`Vrednost mora da bude ${args.maxValue} ili starija.`,
|
|
309
|
+
"rangeReversed": `Datum po\u{10D}etka mora biti pre datuma zavr\u{161}etka.`,
|
|
310
|
+
"rangeUnderflow": (args)=>`Vrednost mora da bude ${args.minValue} ili novija.`,
|
|
311
|
+
"unavailableDate": `Izabrani datum nije dostupan.`
|
|
312
|
+
};
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
var $833e86f5dac82c23$exports = {};
|
|
316
|
+
$833e86f5dac82c23$exports = {
|
|
317
|
+
"rangeOverflow": (args)=>`V\xe4rdet m\xe5ste vara ${args.maxValue} eller tidigare.`,
|
|
318
|
+
"rangeReversed": `Startdatumet m\xe5ste vara f\xf6re slutdatumet.`,
|
|
319
|
+
"rangeUnderflow": (args)=>`V\xe4rdet m\xe5ste vara ${args.minValue} eller senare.`,
|
|
320
|
+
"unavailableDate": `Det valda datumet \xe4r inte tillg\xe4ngligt.`
|
|
321
|
+
};
|
|
322
|
+
|
|
47
323
|
|
|
48
|
-
|
|
49
|
-
|
|
324
|
+
var $5b72687d362158b0$exports = {};
|
|
325
|
+
$5b72687d362158b0$exports = {
|
|
326
|
+
"rangeOverflow": (args)=>`De\u{11F}er, ${args.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,
|
|
327
|
+
"rangeReversed": `Ba\u{15F}lang\u{131}\xe7 tarihi biti\u{15F} tarihinden \xf6nce olmal\u{131}d\u{131}r.`,
|
|
328
|
+
"rangeUnderflow": (args)=>`De\u{11F}er, ${args.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,
|
|
329
|
+
"unavailableDate": `Se\xe7ilen tarih kullan\u{131}lam\u{131}yor.`
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
var $5d2b1be67024bd70$exports = {};
|
|
334
|
+
$5d2b1be67024bd70$exports = {
|
|
335
|
+
"rangeOverflow": (args)=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${args.maxValue}.`,
|
|
336
|
+
"rangeReversed": `\u{414}\u{430}\u{442}\u{430} \u{43F}\u{43E}\u{447}\u{430}\u{442}\u{43A}\u{443} \u{43C}\u{430}\u{454} \u{43F}\u{435}\u{440}\u{435}\u{434}\u{443}\u{432}\u{430}\u{442}\u{438} \u{434}\u{430}\u{442}\u{456} \u{437}\u{430}\u{432}\u{435}\u{440}\u{448}\u{435}\u{43D}\u{43D}\u{44F}.`,
|
|
337
|
+
"rangeUnderflow": (args)=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${args.minValue}.`,
|
|
338
|
+
"unavailableDate": `\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430} \u{43D}\u{435}\u{434}\u{43E}\u{441}\u{442}\u{443}\u{43F}\u{43D}\u{430}.`
|
|
339
|
+
};
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
var $644f5cd034787834$exports = {};
|
|
343
|
+
$644f5cd034787834$exports = {
|
|
344
|
+
"rangeOverflow": (args)=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${args.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,
|
|
345
|
+
"rangeReversed": `\u{5F00}\u{59CB}\u{65E5}\u{671F}\u{5FC5}\u{987B}\u{65E9}\u{4E8E}\u{7ED3}\u{675F}\u{65E5}\u{671F}\u{3002}`,
|
|
346
|
+
"rangeUnderflow": (args)=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${args.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,
|
|
347
|
+
"unavailableDate": `\u{6240}\u{9009}\u{65E5}\u{671F}\u{4E0D}\u{53EF}\u{7528}\u{3002}`
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
var $11c20589c8b82ee8$exports = {};
|
|
352
|
+
$11c20589c8b82ee8$exports = {
|
|
353
|
+
"rangeOverflow": (args)=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${args.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,
|
|
354
|
+
"rangeReversed": `\u{958B}\u{59CB}\u{65E5}\u{671F}\u{5FC5}\u{9808}\u{5728}\u{7D50}\u{675F}\u{65E5}\u{671F}\u{4E4B}\u{524D}\u{3002}`,
|
|
355
|
+
"rangeUnderflow": (args)=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${args.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,
|
|
356
|
+
"unavailableDate": `\u{6240}\u{9078}\u{65E5}\u{671F}\u{7121}\u{6CD5}\u{4F7F}\u{7528}\u{3002}`
|
|
357
|
+
};
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
$5294278fb5cc815e$exports = {
|
|
361
|
+
"ar-AE": $a16eae39a66f3afd$exports,
|
|
362
|
+
"bg-BG": $be973442240b2918$exports,
|
|
363
|
+
"cs-CZ": $a1709037331f64d7$exports,
|
|
364
|
+
"da-DK": $1896523498fa2f44$exports,
|
|
365
|
+
"de-DE": $169837a5a815615d$exports,
|
|
366
|
+
"el-GR": $cfb55132d6925036$exports,
|
|
367
|
+
"en-US": $384a6c8de1da1e62$exports,
|
|
368
|
+
"es-ES": $be8241903709dc6e$exports,
|
|
369
|
+
"et-EE": $63e1eb192205ecbf$exports,
|
|
370
|
+
"fi-FI": $41dc33071b9981dc$exports,
|
|
371
|
+
"fr-FR": $c75ba81d7768253e$exports,
|
|
372
|
+
"he-IL": $f678f4bf27dcdd12$exports,
|
|
373
|
+
"hr-HR": $d23f6e75dc589b55$exports,
|
|
374
|
+
"hu-HU": $439e34e0a9a3f4c1$exports,
|
|
375
|
+
"it-IT": $449973ba87982f00$exports,
|
|
376
|
+
"ja-JP": $902560907618d6e6$exports,
|
|
377
|
+
"ko-KR": $8c0f39c970bc2860$exports,
|
|
378
|
+
"lt-LT": $db03bc54746c5caa$exports,
|
|
379
|
+
"lv-LV": $3f356a0921f4d37a$exports,
|
|
380
|
+
"nb-NO": $1265d19da9735bfb$exports,
|
|
381
|
+
"nl-NL": $7b57f991f3f6edd1$exports,
|
|
382
|
+
"pl-PL": $04fe5f1360210d7c$exports,
|
|
383
|
+
"pt-BR": $e64ffd0cafbe4c46$exports,
|
|
384
|
+
"pt-PT": $f7b4a5fc25c8f238$exports,
|
|
385
|
+
"ro-RO": $cf72ee454c27a2e7$exports,
|
|
386
|
+
"ru-RU": $a41511fa599c2cbe$exports,
|
|
387
|
+
"sk-SK": $2fedc389afac088d$exports,
|
|
388
|
+
"sl-SI": $b0aebb8d8c040cc9$exports,
|
|
389
|
+
"sr-SP": $67017d9b82b5d17e$exports,
|
|
390
|
+
"sv-SE": $833e86f5dac82c23$exports,
|
|
391
|
+
"tr-TR": $5b72687d362158b0$exports,
|
|
392
|
+
"uk-UA": $5d2b1be67024bd70$exports,
|
|
393
|
+
"zh-CN": $644f5cd034787834$exports,
|
|
394
|
+
"zh-TW": $11c20589c8b82ee8$exports
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
const $50d5d6a623389320$var$dictionary = new (0, $h2qOe$internationalizedstring.LocalizedStringDictionary)((0, (/*@__PURE__*/$parcel$interopDefault($5294278fb5cc815e$exports))));
|
|
402
|
+
function $50d5d6a623389320$var$getLocale() {
|
|
403
|
+
// Match browser language setting here, NOT react-aria's I18nProvider, so that we match other browser-provided
|
|
404
|
+
// validation messages, which to not respect our provider's language.
|
|
405
|
+
// @ts-ignore
|
|
406
|
+
return typeof navigator !== "undefined" && (navigator.language || navigator.userLanguage) || "en-US";
|
|
407
|
+
}
|
|
408
|
+
function $50d5d6a623389320$export$f18627323ab57ac0(value, minValue, maxValue, isDateUnavailable, options) {
|
|
409
|
+
let rangeOverflow = value != null && maxValue != null && value.compare(maxValue) > 0;
|
|
410
|
+
let rangeUnderflow = value != null && minValue != null && value.compare(minValue) < 0;
|
|
411
|
+
let isUnavailable = value != null && (isDateUnavailable === null || isDateUnavailable === void 0 ? void 0 : isDateUnavailable(value)) || false;
|
|
412
|
+
let isInvalid = rangeOverflow || rangeUnderflow || isUnavailable;
|
|
413
|
+
let errors = [];
|
|
414
|
+
if (isInvalid) {
|
|
415
|
+
let locale = $50d5d6a623389320$var$getLocale();
|
|
416
|
+
let formatter = new (0, $h2qOe$internationalizedstring.LocalizedStringFormatter)(locale, $50d5d6a623389320$var$dictionary);
|
|
417
|
+
let dateFormatter = new (0, $h2qOe$internationalizeddate.DateFormatter)(locale, $50d5d6a623389320$export$7e319ea407e63bc0({}, options));
|
|
418
|
+
let timeZone = dateFormatter.resolvedOptions().timeZone;
|
|
419
|
+
if (rangeUnderflow) errors.push(formatter.format("rangeUnderflow", {
|
|
420
|
+
minValue: dateFormatter.format(minValue.toDate(timeZone))
|
|
421
|
+
}));
|
|
422
|
+
if (rangeOverflow) errors.push(formatter.format("rangeOverflow", {
|
|
423
|
+
maxValue: dateFormatter.format(maxValue.toDate(timeZone))
|
|
424
|
+
}));
|
|
425
|
+
if (isUnavailable) errors.push(formatter.format("unavailableDate"));
|
|
426
|
+
}
|
|
427
|
+
return {
|
|
428
|
+
isInvalid: isInvalid,
|
|
429
|
+
validationErrors: errors,
|
|
430
|
+
validationDetails: {
|
|
431
|
+
badInput: isUnavailable,
|
|
432
|
+
customError: false,
|
|
433
|
+
patternMismatch: false,
|
|
434
|
+
rangeOverflow: rangeOverflow,
|
|
435
|
+
rangeUnderflow: rangeUnderflow,
|
|
436
|
+
stepMismatch: false,
|
|
437
|
+
tooLong: false,
|
|
438
|
+
tooShort: false,
|
|
439
|
+
typeMismatch: false,
|
|
440
|
+
valueMissing: false,
|
|
441
|
+
valid: !isInvalid
|
|
442
|
+
}
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
function $50d5d6a623389320$export$80ff8fc0ae339c13(value, minValue, maxValue, isDateUnavailable, options) {
|
|
446
|
+
let startValidation = $50d5d6a623389320$export$f18627323ab57ac0(value === null || value === void 0 ? void 0 : value.start, minValue, maxValue, isDateUnavailable, options);
|
|
447
|
+
let endValidation = $50d5d6a623389320$export$f18627323ab57ac0(value === null || value === void 0 ? void 0 : value.end, minValue, maxValue, isDateUnavailable, options);
|
|
448
|
+
let result = (0, $h2qOe$reactstatelyform.mergeValidation)(startValidation, endValidation);
|
|
449
|
+
if (value.end != null && value.start != null && value.end.compare(value.start) < 0) result = (0, $h2qOe$reactstatelyform.mergeValidation)(result, {
|
|
450
|
+
isInvalid: true,
|
|
451
|
+
validationErrors: [
|
|
452
|
+
$50d5d6a623389320$var$dictionary.getStringForLocale("rangeReversed", $50d5d6a623389320$var$getLocale())
|
|
453
|
+
],
|
|
454
|
+
validationDetails: {
|
|
455
|
+
...(0, $h2qOe$reactstatelyform.VALID_VALIDITY_STATE),
|
|
456
|
+
rangeUnderflow: true,
|
|
457
|
+
rangeOverflow: true,
|
|
458
|
+
valid: false
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
return result;
|
|
50
462
|
}
|
|
51
463
|
const $50d5d6a623389320$var$DEFAULT_FIELD_OPTIONS = {
|
|
52
464
|
year: "numeric",
|
|
@@ -137,8 +549,8 @@ function $50d5d6a623389320$export$2440da353cedad43(v, granularity) {
|
|
|
137
549
|
|
|
138
550
|
|
|
139
551
|
|
|
552
|
+
|
|
140
553
|
function $aaab7a647e17e1fd$export$87194bb378cc3ac2(props) {
|
|
141
|
-
var _props_isDateUnavailable;
|
|
142
554
|
let overlayState = (0, $h2qOe$reactstatelyoverlays.useOverlayTriggerState)(props);
|
|
143
555
|
let [value, setValue] = (0, $h2qOe$reactstatelyutils.useControlledState)(props.value, props.defaultValue || null, props.onChange);
|
|
144
556
|
let v = value || props.placeholderValue;
|
|
@@ -155,10 +567,42 @@ function $aaab7a647e17e1fd$export$87194bb378cc3ac2(props) {
|
|
|
155
567
|
}
|
|
156
568
|
// props.granularity must actually exist in the value if one is provided.
|
|
157
569
|
if (v && !(granularity in v)) throw new Error("Invalid granularity " + granularity + " for value " + v.toString());
|
|
570
|
+
let showEra = (value === null || value === void 0 ? void 0 : value.calendar.identifier) === "gregory" && value.era === "BC";
|
|
571
|
+
let formatOpts = (0, $h2qOe$react.useMemo)(()=>({
|
|
572
|
+
granularity: granularity,
|
|
573
|
+
timeZone: defaultTimeZone,
|
|
574
|
+
hideTimeZone: props.hideTimeZone,
|
|
575
|
+
hourCycle: props.hourCycle,
|
|
576
|
+
shouldForceLeadingZeros: props.shouldForceLeadingZeros,
|
|
577
|
+
showEra: showEra
|
|
578
|
+
}), [
|
|
579
|
+
granularity,
|
|
580
|
+
props.hourCycle,
|
|
581
|
+
props.shouldForceLeadingZeros,
|
|
582
|
+
defaultTimeZone,
|
|
583
|
+
props.hideTimeZone,
|
|
584
|
+
showEra
|
|
585
|
+
]);
|
|
586
|
+
let { minValue: minValue, maxValue: maxValue, isDateUnavailable: isDateUnavailable } = props;
|
|
587
|
+
let builtinValidation = (0, $h2qOe$react.useMemo)(()=>(0, $50d5d6a623389320$export$f18627323ab57ac0)(value, minValue, maxValue, isDateUnavailable, formatOpts), [
|
|
588
|
+
value,
|
|
589
|
+
minValue,
|
|
590
|
+
maxValue,
|
|
591
|
+
isDateUnavailable,
|
|
592
|
+
formatOpts
|
|
593
|
+
]);
|
|
594
|
+
let validation = (0, $h2qOe$reactstatelyform.useFormValidationState)({
|
|
595
|
+
...props,
|
|
596
|
+
value: value,
|
|
597
|
+
builtinValidation: builtinValidation
|
|
598
|
+
});
|
|
599
|
+
let isValueInvalid = validation.displayValidation.isInvalid;
|
|
600
|
+
let validationState = props.validationState || (isValueInvalid ? "invalid" : null);
|
|
158
601
|
let commitValue = (date, time)=>{
|
|
159
602
|
setValue("timeZone" in time ? time.set((0, $h2qOe$internationalizeddate.toCalendarDate)(date)) : (0, $h2qOe$internationalizeddate.toCalendarDateTime)(date, time));
|
|
160
603
|
setSelectedDate(null);
|
|
161
604
|
setSelectedTime(null);
|
|
605
|
+
validation.commitValidation();
|
|
162
606
|
};
|
|
163
607
|
// Intercept setValue to make sure the Time section is not changed by date selection in Calendar
|
|
164
608
|
let selectDate = (newValue)=>{
|
|
@@ -166,16 +610,18 @@ function $aaab7a647e17e1fd$export$87194bb378cc3ac2(props) {
|
|
|
166
610
|
if (hasTime) {
|
|
167
611
|
if (selectedTime || shouldClose) commitValue(newValue, selectedTime || (0, $50d5d6a623389320$export$c5221a78ef73c5e9)(props.placeholderValue));
|
|
168
612
|
else setSelectedDate(newValue);
|
|
169
|
-
} else
|
|
613
|
+
} else {
|
|
614
|
+
setValue(newValue);
|
|
615
|
+
validation.commitValidation();
|
|
616
|
+
}
|
|
170
617
|
if (shouldClose) overlayState.setOpen(false);
|
|
171
618
|
};
|
|
172
619
|
let selectTime = (newValue)=>{
|
|
173
620
|
if (selectedDate && newValue) commitValue(selectedDate, newValue);
|
|
174
621
|
else setSelectedTime(newValue);
|
|
175
622
|
};
|
|
176
|
-
let isValueInvalid = props.isInvalid || props.validationState === "invalid" || (0, $50d5d6a623389320$export$eac50920cf2fd59a)(value, props.minValue, props.maxValue) || value && ((_props_isDateUnavailable = props.isDateUnavailable) === null || _props_isDateUnavailable === void 0 ? void 0 : _props_isDateUnavailable.call(props, value));
|
|
177
|
-
let validationState = props.validationState || (isValueInvalid ? "invalid" : null);
|
|
178
623
|
return {
|
|
624
|
+
...validation,
|
|
179
625
|
value: value,
|
|
180
626
|
setValue: setValue,
|
|
181
627
|
dateValue: selectedDate,
|
|
@@ -196,13 +642,7 @@ function $aaab7a647e17e1fd$export$87194bb378cc3ac2(props) {
|
|
|
196
642
|
isInvalid: isValueInvalid,
|
|
197
643
|
formatValue (locale, fieldOptions) {
|
|
198
644
|
if (!dateValue) return "";
|
|
199
|
-
let formatOptions = (0, $50d5d6a623389320$export$7e319ea407e63bc0)(fieldOptions,
|
|
200
|
-
granularity: granularity,
|
|
201
|
-
timeZone: defaultTimeZone,
|
|
202
|
-
hideTimeZone: props.hideTimeZone,
|
|
203
|
-
hourCycle: props.hourCycle,
|
|
204
|
-
showEra: value.calendar.identifier === "gregory" && value.era === "BC"
|
|
205
|
-
});
|
|
645
|
+
let formatOptions = (0, $50d5d6a623389320$export$7e319ea407e63bc0)(fieldOptions, formatOpts);
|
|
206
646
|
let formatter = new (0, $h2qOe$internationalizeddate.DateFormatter)(locale, formatOptions);
|
|
207
647
|
return formatter.format(dateValue);
|
|
208
648
|
}
|
|
@@ -222,6 +662,7 @@ function $aaab7a647e17e1fd$export$87194bb378cc3ac2(props) {
|
|
|
222
662
|
* governing permissions and limitations under the License.
|
|
223
663
|
*/
|
|
224
664
|
|
|
665
|
+
|
|
225
666
|
/*
|
|
226
667
|
* Copyright 2020 Adobe. All rights reserved.
|
|
227
668
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -248,9 +689,9 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
248
689
|
day: "dd"
|
|
249
690
|
},
|
|
250
691
|
am: {
|
|
251
|
-
year: "
|
|
252
|
-
month: "
|
|
253
|
-
day: "
|
|
692
|
+
year: "\u12D3\u12D3\u12D3\u12D3",
|
|
693
|
+
month: "\u121A\u121C",
|
|
694
|
+
day: "\u1240\u1240"
|
|
254
695
|
},
|
|
255
696
|
an: {
|
|
256
697
|
year: "aaaa",
|
|
@@ -258,9 +699,9 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
258
699
|
day: "dd"
|
|
259
700
|
},
|
|
260
701
|
ar: {
|
|
261
|
-
year: "
|
|
262
|
-
month: "
|
|
263
|
-
day: "
|
|
702
|
+
year: "\u0633\u0646\u0629",
|
|
703
|
+
month: "\u0634\u0647\u0631",
|
|
704
|
+
day: "\u064A\u0648\u0645"
|
|
264
705
|
},
|
|
265
706
|
ast: {
|
|
266
707
|
year: "aaaa",
|
|
@@ -273,18 +714,18 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
273
714
|
day: "gg"
|
|
274
715
|
},
|
|
275
716
|
be: {
|
|
276
|
-
year: "
|
|
277
|
-
month: "
|
|
278
|
-
day: "
|
|
717
|
+
year: "\u0433\u0433\u0433\u0433",
|
|
718
|
+
month: "\u043C\u043C",
|
|
719
|
+
day: "\u0434\u0434"
|
|
279
720
|
},
|
|
280
721
|
bg: {
|
|
281
|
-
year: "
|
|
282
|
-
month: "
|
|
283
|
-
day: "
|
|
722
|
+
year: "\u0433\u0433\u0433\u0433",
|
|
723
|
+
month: "\u043C\u043C",
|
|
724
|
+
day: "\u0434\u0434"
|
|
284
725
|
},
|
|
285
726
|
bn: {
|
|
286
727
|
year: "yyyy",
|
|
287
|
-
month: "
|
|
728
|
+
month: "\u09AE\u09BF\u09AE\u09BF",
|
|
288
729
|
day: "dd"
|
|
289
730
|
},
|
|
290
731
|
br: {
|
|
@@ -308,9 +749,9 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
308
749
|
day: "q'q'"
|
|
309
750
|
},
|
|
310
751
|
ckb: {
|
|
311
|
-
year: "
|
|
312
|
-
month: "
|
|
313
|
-
day: "
|
|
752
|
+
year: "\u0633\u0627\u06B5",
|
|
753
|
+
month: "\u0645\u0627\u0646\u06AF",
|
|
754
|
+
day: "\u0695\u06C6\u0698"
|
|
314
755
|
},
|
|
315
756
|
cs: {
|
|
316
757
|
year: "rrrr",
|
|
@@ -335,12 +776,12 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
335
776
|
dsb: {
|
|
336
777
|
year: "llll",
|
|
337
778
|
month: "mm",
|
|
338
|
-
day: "
|
|
779
|
+
day: "\u017A\u017A"
|
|
339
780
|
},
|
|
340
781
|
el: {
|
|
341
|
-
year: "
|
|
342
|
-
month: "
|
|
343
|
-
day: "
|
|
782
|
+
year: "\u03B5\u03B5\u03B5\u03B5",
|
|
783
|
+
month: "\u03BC\u03BC",
|
|
784
|
+
day: "\u03B7\u03B7"
|
|
344
785
|
},
|
|
345
786
|
en: {
|
|
346
787
|
year: "yyyy",
|
|
@@ -368,9 +809,9 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
368
809
|
day: "ee"
|
|
369
810
|
},
|
|
370
811
|
fa: {
|
|
371
|
-
year: "
|
|
372
|
-
month: "
|
|
373
|
-
day: "
|
|
812
|
+
year: "\u0633\u0627\u0644",
|
|
813
|
+
month: "\u0645\u0627\u0647",
|
|
814
|
+
day: "\u0631\u0648\u0632"
|
|
374
815
|
},
|
|
375
816
|
ff: {
|
|
376
817
|
year: "hhhh",
|
|
@@ -408,9 +849,9 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
408
849
|
day: "dd"
|
|
409
850
|
},
|
|
410
851
|
he: {
|
|
411
|
-
year: "
|
|
412
|
-
month: "
|
|
413
|
-
day: "
|
|
852
|
+
year: "\u05E9\u05E0\u05D4",
|
|
853
|
+
month: "\u05D7\u05D5\u05D3\u05E9",
|
|
854
|
+
day: "\u05D9\u05D5\u05DD"
|
|
414
855
|
},
|
|
415
856
|
hr: {
|
|
416
857
|
year: "gggg",
|
|
@@ -443,29 +884,29 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
443
884
|
day: "gg"
|
|
444
885
|
},
|
|
445
886
|
ja: {
|
|
446
|
-
year: "
|
|
447
|
-
month: "
|
|
448
|
-
day: "
|
|
887
|
+
year: " \u5E74 ",
|
|
888
|
+
month: "\u6708",
|
|
889
|
+
day: "\u65E5"
|
|
449
890
|
},
|
|
450
891
|
ka: {
|
|
451
|
-
year: "
|
|
452
|
-
month: "
|
|
453
|
-
day: "
|
|
892
|
+
year: "\u10EC\u10EC\u10EC\u10EC",
|
|
893
|
+
month: "\u10D7\u10D7",
|
|
894
|
+
day: "\u10E0\u10E0"
|
|
454
895
|
},
|
|
455
896
|
kk: {
|
|
456
|
-
year: "
|
|
457
|
-
month: "
|
|
458
|
-
day: "
|
|
897
|
+
year: "\u0436\u0436\u0436\u0436",
|
|
898
|
+
month: "\u0430\u0430",
|
|
899
|
+
day: "\u043A\u043A"
|
|
459
900
|
},
|
|
460
901
|
kn: {
|
|
461
|
-
year: "
|
|
462
|
-
month: "
|
|
463
|
-
day: "
|
|
902
|
+
year: "\u0CB5\u0CB5\u0CB5\u0CB5",
|
|
903
|
+
month: "\u0CAE\u0CBF\u0CAE\u0CC0",
|
|
904
|
+
day: "\u0CA6\u0CBF\u0CA6\u0CBF"
|
|
464
905
|
},
|
|
465
906
|
ko: {
|
|
466
|
-
year: "
|
|
467
|
-
month: "
|
|
468
|
-
day: "
|
|
907
|
+
year: "\uC5F0\uB3C4",
|
|
908
|
+
month: "\uC6D4",
|
|
909
|
+
day: "\uC77C"
|
|
469
910
|
},
|
|
470
911
|
lb: {
|
|
471
912
|
year: "jjjj",
|
|
@@ -473,9 +914,9 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
473
914
|
day: "dd"
|
|
474
915
|
},
|
|
475
916
|
lo: {
|
|
476
|
-
year: "
|
|
477
|
-
month: "
|
|
478
|
-
day: "
|
|
917
|
+
year: "\u0E9B\u0E9B\u0E9B\u0E9B",
|
|
918
|
+
month: "\u0E94\u0E94",
|
|
919
|
+
day: "\u0EA7\u0EA7"
|
|
479
920
|
},
|
|
480
921
|
lt: {
|
|
481
922
|
year: "mmmm",
|
|
@@ -493,9 +934,9 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
493
934
|
day: "dd"
|
|
494
935
|
},
|
|
495
936
|
ml: {
|
|
496
|
-
year: "
|
|
497
|
-
month: "
|
|
498
|
-
day: "
|
|
937
|
+
year: "\u0D35\u0D7C\u0D37\u0D02",
|
|
938
|
+
month: "\u0D2E\u0D3E\u0D38\u0D02",
|
|
939
|
+
day: "\u0D24\u0D40\u0D2F\u0D24\u0D3F"
|
|
499
940
|
},
|
|
500
941
|
ms: {
|
|
501
942
|
year: "tttt",
|
|
@@ -543,9 +984,9 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
543
984
|
day: "zz"
|
|
544
985
|
},
|
|
545
986
|
ru: {
|
|
546
|
-
year: "
|
|
547
|
-
month: "
|
|
548
|
-
day: "
|
|
987
|
+
year: "\u0433\u0433\u0433\u0433",
|
|
988
|
+
month: "\u043C\u043C",
|
|
989
|
+
day: "\u0434\u0434"
|
|
549
990
|
},
|
|
550
991
|
sc: {
|
|
551
992
|
year: "aaaa",
|
|
@@ -568,9 +1009,9 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
568
1009
|
day: "dd"
|
|
569
1010
|
},
|
|
570
1011
|
sr: {
|
|
571
|
-
year: "
|
|
572
|
-
month: "
|
|
573
|
-
day: "
|
|
1012
|
+
year: "\u0433\u0433\u0433\u0433",
|
|
1013
|
+
month: "\u043C\u043C",
|
|
1014
|
+
day: "\u0434\u0434"
|
|
574
1015
|
},
|
|
575
1016
|
sv: {
|
|
576
1017
|
year: "\xe5\xe5\xe5\xe5",
|
|
@@ -583,14 +1024,14 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
583
1024
|
day: "dd"
|
|
584
1025
|
},
|
|
585
1026
|
tg: {
|
|
586
|
-
year: "
|
|
587
|
-
month: "
|
|
588
|
-
day: "
|
|
1027
|
+
year: "\u0441\u0441\u0441\u0441",
|
|
1028
|
+
month: "\u043C\u043C",
|
|
1029
|
+
day: "\u0440\u0440"
|
|
589
1030
|
},
|
|
590
1031
|
th: {
|
|
591
|
-
year: "
|
|
592
|
-
month: "
|
|
593
|
-
day: "
|
|
1032
|
+
year: "\u0E1B\u0E1B\u0E1B\u0E1B",
|
|
1033
|
+
month: "\u0E14\u0E14",
|
|
1034
|
+
day: "\u0E27\u0E27"
|
|
594
1035
|
},
|
|
595
1036
|
tr: {
|
|
596
1037
|
year: "yyyy",
|
|
@@ -598,19 +1039,19 @@ const $e1e8ada727fae1a1$var$placeholders = new (0, $h2qOe$internationalizedstrin
|
|
|
598
1039
|
day: "gg"
|
|
599
1040
|
},
|
|
600
1041
|
uk: {
|
|
601
|
-
year: "
|
|
602
|
-
month: "
|
|
603
|
-
day: "
|
|
1042
|
+
year: "\u0440\u0440\u0440\u0440",
|
|
1043
|
+
month: "\u043C\u043C",
|
|
1044
|
+
day: "\u0434\u0434"
|
|
604
1045
|
},
|
|
605
1046
|
"zh-CN": {
|
|
606
|
-
year: "
|
|
607
|
-
month: "
|
|
608
|
-
day: "
|
|
1047
|
+
year: "\u5E74",
|
|
1048
|
+
month: "\u6708",
|
|
1049
|
+
day: "\u65E5"
|
|
609
1050
|
},
|
|
610
1051
|
"zh-TW": {
|
|
611
|
-
year: "
|
|
612
|
-
month: "
|
|
613
|
-
day: "
|
|
1052
|
+
year: "\u5E74",
|
|
1053
|
+
month: "\u6708",
|
|
1054
|
+
day: "\u65E5"
|
|
614
1055
|
}
|
|
615
1056
|
}, "en");
|
|
616
1057
|
function $e1e8ada727fae1a1$export$d3f5c5e0a5023fa0(field, value, locale) {
|
|
@@ -618,7 +1059,7 @@ function $e1e8ada727fae1a1$export$d3f5c5e0a5023fa0(field, value, locale) {
|
|
|
618
1059
|
if (field === "era" || field === "dayPeriod") return value;
|
|
619
1060
|
if (field === "year" || field === "month" || field === "day") return $e1e8ada727fae1a1$var$placeholders.getStringForLocale(field, locale);
|
|
620
1061
|
// For time fields (e.g. hour, minute, etc.), use two dashes as the placeholder.
|
|
621
|
-
return "
|
|
1062
|
+
return "\u2013\u2013";
|
|
622
1063
|
}
|
|
623
1064
|
|
|
624
1065
|
|
|
@@ -647,7 +1088,7 @@ const $596a1f0f523d6752$var$TYPE_MAPPING = {
|
|
|
647
1088
|
dayperiod: "dayPeriod"
|
|
648
1089
|
};
|
|
649
1090
|
function $596a1f0f523d6752$export$60e84778edff6d26(props) {
|
|
650
|
-
let { locale: locale
|
|
1091
|
+
let { locale: locale, createCalendar: createCalendar, hideTimeZone: hideTimeZone, isDisabled: isDisabled, isReadOnly: isReadOnly, isRequired: isRequired, minValue: minValue, maxValue: maxValue, isDateUnavailable: isDateUnavailable } = props;
|
|
651
1092
|
let v = props.value || props.defaultValue || props.placeholderValue;
|
|
652
1093
|
let [granularity, defaultTimeZone] = (0, $50d5d6a623389320$export$2440da353cedad43)(v, props.granularity);
|
|
653
1094
|
let timeZone = defaultTimeZone || "UTC";
|
|
@@ -672,8 +1113,9 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
|
|
|
672
1113
|
let [placeholderDate, setPlaceholderDate] = (0, $h2qOe$react.useState)(()=>(0, $50d5d6a623389320$export$66aa2b09de4b1ea5)(props.placeholderValue, granularity, calendar, defaultTimeZone));
|
|
673
1114
|
let val = calendarValue || placeholderDate;
|
|
674
1115
|
let showEra = calendar.identifier === "gregory" && val.era === "BC";
|
|
675
|
-
|
|
676
|
-
|
|
1116
|
+
let formatOpts = (0, $h2qOe$react.useMemo)(()=>{
|
|
1117
|
+
var _props_maxGranularity;
|
|
1118
|
+
return {
|
|
677
1119
|
granularity: granularity,
|
|
678
1120
|
maxGranularity: (_props_maxGranularity = props.maxGranularity) !== null && _props_maxGranularity !== void 0 ? _props_maxGranularity : "year",
|
|
679
1121
|
timeZone: defaultTimeZone,
|
|
@@ -681,7 +1123,8 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
|
|
|
681
1123
|
hourCycle: props.hourCycle,
|
|
682
1124
|
showEra: showEra,
|
|
683
1125
|
shouldForceLeadingZeros: props.shouldForceLeadingZeros
|
|
684
|
-
}
|
|
1126
|
+
};
|
|
1127
|
+
}, [
|
|
685
1128
|
props.maxGranularity,
|
|
686
1129
|
granularity,
|
|
687
1130
|
props.hourCycle,
|
|
@@ -809,10 +1252,23 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
|
|
|
809
1252
|
if (validKeys.length >= allKeys.length || validKeys.length === allKeys.length - 1 && allSegments.dayPeriod && !validSegments.dayPeriod) setValue(displayValue);
|
|
810
1253
|
} else setValue($596a1f0f523d6752$var$addSegment(displayValue, type, amount, resolvedOptions));
|
|
811
1254
|
};
|
|
812
|
-
let
|
|
1255
|
+
let builtinValidation = (0, $h2qOe$react.useMemo)(()=>(0, $50d5d6a623389320$export$f18627323ab57ac0)(value, minValue, maxValue, isDateUnavailable, formatOpts), [
|
|
1256
|
+
value,
|
|
1257
|
+
minValue,
|
|
1258
|
+
maxValue,
|
|
1259
|
+
isDateUnavailable,
|
|
1260
|
+
formatOpts
|
|
1261
|
+
]);
|
|
1262
|
+
let validation = (0, $h2qOe$reactstatelyform.useFormValidationState)({
|
|
1263
|
+
...props,
|
|
1264
|
+
value: value,
|
|
1265
|
+
builtinValidation: builtinValidation
|
|
1266
|
+
});
|
|
1267
|
+
let isValueInvalid = validation.displayValidation.isInvalid;
|
|
813
1268
|
let validationState = props.validationState || (isValueInvalid ? "invalid" : null);
|
|
814
|
-
var
|
|
1269
|
+
var _props_maxGranularity;
|
|
815
1270
|
return {
|
|
1271
|
+
...validation,
|
|
816
1272
|
value: calendarValue,
|
|
817
1273
|
dateValue: dateValue,
|
|
818
1274
|
calendar: calendar,
|
|
@@ -822,7 +1278,7 @@ function $596a1f0f523d6752$export$60e84778edff6d26(props) {
|
|
|
822
1278
|
validationState: validationState,
|
|
823
1279
|
isInvalid: isValueInvalid,
|
|
824
1280
|
granularity: granularity,
|
|
825
|
-
maxGranularity: (
|
|
1281
|
+
maxGranularity: (_props_maxGranularity = props.maxGranularity) !== null && _props_maxGranularity !== void 0 ? _props_maxGranularity : "year",
|
|
826
1282
|
isDisabled: isDisabled,
|
|
827
1283
|
isReadOnly: isReadOnly,
|
|
828
1284
|
isRequired: isRequired,
|
|
@@ -1035,8 +1491,9 @@ function $596a1f0f523d6752$var$setSegment(value, part, segmentValue, options) {
|
|
|
1035
1491
|
|
|
1036
1492
|
|
|
1037
1493
|
|
|
1494
|
+
|
|
1038
1495
|
function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
|
|
1039
|
-
var
|
|
1496
|
+
var _value_start, _value_end;
|
|
1040
1497
|
let overlayState = (0, $h2qOe$reactstatelyoverlays.useOverlayTriggerState)(props);
|
|
1041
1498
|
let [controlledValue, setControlledValue] = (0, $h2qOe$reactstatelyutils.useControlledState)(props.value, props.defaultValue || null, props.onChange);
|
|
1042
1499
|
let [placeholderValue, setPlaceholderValue] = (0, $h2qOe$react.useState)(()=>controlledValue || {
|
|
@@ -1053,12 +1510,15 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
|
|
|
1053
1510
|
}
|
|
1054
1511
|
let value = controlledValue || placeholderValue;
|
|
1055
1512
|
let setValue = (value)=>{
|
|
1056
|
-
setPlaceholderValue(value
|
|
1513
|
+
setPlaceholderValue(value || {
|
|
1514
|
+
start: null,
|
|
1515
|
+
end: null
|
|
1516
|
+
});
|
|
1057
1517
|
if ((value === null || value === void 0 ? void 0 : value.start) && value.end) setControlledValue(value);
|
|
1058
1518
|
else setControlledValue(null);
|
|
1059
1519
|
};
|
|
1060
1520
|
let v = (value === null || value === void 0 ? void 0 : value.start) || (value === null || value === void 0 ? void 0 : value.end) || props.placeholderValue;
|
|
1061
|
-
let [granularity] = (0, $50d5d6a623389320$export$2440da353cedad43)(v, props.granularity);
|
|
1521
|
+
let [granularity, defaultTimeZone] = (0, $50d5d6a623389320$export$2440da353cedad43)(v, props.granularity);
|
|
1062
1522
|
let hasTime = granularity === "hour" || granularity === "minute" || granularity === "second";
|
|
1063
1523
|
var _props_shouldCloseOnSelect;
|
|
1064
1524
|
let shouldCloseOnSelect = (_props_shouldCloseOnSelect = props.shouldCloseOnSelect) !== null && _props_shouldCloseOnSelect !== void 0 ? _props_shouldCloseOnSelect : true;
|
|
@@ -1075,6 +1535,7 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
|
|
|
1075
1535
|
});
|
|
1076
1536
|
setSelectedDateRange(null);
|
|
1077
1537
|
setSelectedTimeRange(null);
|
|
1538
|
+
validation.commitValidation();
|
|
1078
1539
|
};
|
|
1079
1540
|
// Intercept setValue to make sure the Time section is not changed by date selection in Calendar
|
|
1080
1541
|
let setDateRange = (range)=>{
|
|
@@ -1085,17 +1546,56 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
|
|
|
1085
1546
|
end: (timeRange === null || timeRange === void 0 ? void 0 : timeRange.end) || (0, $50d5d6a623389320$export$c5221a78ef73c5e9)(props.placeholderValue)
|
|
1086
1547
|
});
|
|
1087
1548
|
else setSelectedDateRange(range);
|
|
1088
|
-
} else if (range.start && range.end)
|
|
1089
|
-
|
|
1549
|
+
} else if (range.start && range.end) {
|
|
1550
|
+
setValue(range);
|
|
1551
|
+
validation.commitValidation();
|
|
1552
|
+
} else setSelectedDateRange(range);
|
|
1090
1553
|
if (shouldClose) overlayState.setOpen(false);
|
|
1091
1554
|
};
|
|
1092
1555
|
let setTimeRange = (range)=>{
|
|
1093
1556
|
if ((dateRange === null || dateRange === void 0 ? void 0 : dateRange.start) && (dateRange === null || dateRange === void 0 ? void 0 : dateRange.end) && range.start && range.end) commitValue(dateRange, range);
|
|
1094
1557
|
else setSelectedTimeRange(range);
|
|
1095
1558
|
};
|
|
1096
|
-
let
|
|
1559
|
+
let showEra = (value === null || value === void 0 ? void 0 : (_value_start = value.start) === null || _value_start === void 0 ? void 0 : _value_start.calendar.identifier) === "gregory" && value.start.era === "BC" || (value === null || value === void 0 ? void 0 : (_value_end = value.end) === null || _value_end === void 0 ? void 0 : _value_end.calendar.identifier) === "gregory" && value.end.era === "BC";
|
|
1560
|
+
let formatOpts = (0, $h2qOe$react.useMemo)(()=>({
|
|
1561
|
+
granularity: granularity,
|
|
1562
|
+
timeZone: defaultTimeZone,
|
|
1563
|
+
hideTimeZone: props.hideTimeZone,
|
|
1564
|
+
hourCycle: props.hourCycle,
|
|
1565
|
+
shouldForceLeadingZeros: props.shouldForceLeadingZeros,
|
|
1566
|
+
showEra: showEra
|
|
1567
|
+
}), [
|
|
1568
|
+
granularity,
|
|
1569
|
+
props.hourCycle,
|
|
1570
|
+
props.shouldForceLeadingZeros,
|
|
1571
|
+
defaultTimeZone,
|
|
1572
|
+
props.hideTimeZone,
|
|
1573
|
+
showEra
|
|
1574
|
+
]);
|
|
1575
|
+
let { minValue: minValue, maxValue: maxValue, isDateUnavailable: isDateUnavailable } = props;
|
|
1576
|
+
let builtinValidation = (0, $h2qOe$react.useMemo)(()=>(0, $50d5d6a623389320$export$80ff8fc0ae339c13)(value, minValue, maxValue, isDateUnavailable, formatOpts), [
|
|
1577
|
+
value,
|
|
1578
|
+
minValue,
|
|
1579
|
+
maxValue,
|
|
1580
|
+
isDateUnavailable,
|
|
1581
|
+
formatOpts
|
|
1582
|
+
]);
|
|
1583
|
+
let validation = (0, $h2qOe$reactstatelyform.useFormValidationState)({
|
|
1584
|
+
...props,
|
|
1585
|
+
value: controlledValue,
|
|
1586
|
+
name: (0, $h2qOe$react.useMemo)(()=>[
|
|
1587
|
+
props.startName,
|
|
1588
|
+
props.endName
|
|
1589
|
+
], [
|
|
1590
|
+
props.startName,
|
|
1591
|
+
props.endName
|
|
1592
|
+
]),
|
|
1593
|
+
builtinValidation: builtinValidation
|
|
1594
|
+
});
|
|
1595
|
+
let isValueInvalid = validation.displayValidation.isInvalid;
|
|
1097
1596
|
let validationState = props.validationState || (isValueInvalid ? "invalid" : null);
|
|
1098
1597
|
return {
|
|
1598
|
+
...validation,
|
|
1099
1599
|
value: value,
|
|
1100
1600
|
setValue: setValue,
|
|
1101
1601
|
dateRange: dateRange,
|
|
@@ -1214,7 +1714,7 @@ function $7072d26f58deb33b$export$e50a61c1de9f574(props) {
|
|
|
1214
1714
|
|
|
1215
1715
|
|
|
1216
1716
|
function $2654e87be0231a69$export$fd53cef0cc796101(props) {
|
|
1217
|
-
let { placeholderValue: placeholderValue = new (0, $h2qOe$internationalizeddate.Time)()
|
|
1717
|
+
let { placeholderValue: placeholderValue = new (0, $h2qOe$internationalizeddate.Time)(), minValue: minValue, maxValue: maxValue, granularity: granularity, validate: validate } = props;
|
|
1218
1718
|
let [value, setValue] = (0, $h2qOe$reactstatelyutils.useControlledState)(props.value, props.defaultValue, props.onChange);
|
|
1219
1719
|
let v = value || placeholderValue;
|
|
1220
1720
|
let day = v && "day" in v ? v : undefined;
|
|
@@ -1255,7 +1755,11 @@ function $2654e87be0231a69$export$fd53cef0cc796101(props) {
|
|
|
1255
1755
|
maxGranularity: "hour",
|
|
1256
1756
|
placeholderValue: placeholderDate,
|
|
1257
1757
|
// Calendar should not matter for time fields.
|
|
1258
|
-
createCalendar: ()=>new (0, $h2qOe$internationalizeddate.GregorianCalendar)()
|
|
1758
|
+
createCalendar: ()=>new (0, $h2qOe$internationalizeddate.GregorianCalendar)(),
|
|
1759
|
+
validate: (0, $h2qOe$react.useCallback)(()=>validate === null || validate === void 0 ? void 0 : validate(value), [
|
|
1760
|
+
validate,
|
|
1761
|
+
value
|
|
1762
|
+
])
|
|
1259
1763
|
});
|
|
1260
1764
|
return {
|
|
1261
1765
|
...state,
|