schummar-table 0.41.0 → 0.42.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/index.cjs +31 -29
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +31 -29
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2182,6 +2182,7 @@ function DatePicker(props) {
|
|
|
2182
2182
|
firstDayOfWeek = 1,
|
|
2183
2183
|
defaultDateInView,
|
|
2184
2184
|
quickOptions = ["today", "thisWeek"],
|
|
2185
|
+
noReset,
|
|
2185
2186
|
minDate,
|
|
2186
2187
|
maxDate,
|
|
2187
2188
|
showCalendarWeek,
|
|
@@ -2265,37 +2266,38 @@ function DatePicker(props) {
|
|
|
2265
2266
|
}
|
|
2266
2267
|
const min = dirty ? dirty.min : value instanceof Date ? value : value == null ? void 0 : value.min;
|
|
2267
2268
|
const max = dirty ? dirty.max : value instanceof Date ? value : value == null ? void 0 : value.max;
|
|
2268
|
-
const resolvedQuickOptions = [
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2269
|
+
const resolvedQuickOptions = [
|
|
2270
|
+
...quickOptions,
|
|
2271
|
+
...noReset ? [] : [{ label: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(Text, { id: "reset" }), value: null }]
|
|
2272
|
+
].map((option, index) => {
|
|
2273
|
+
if (option instanceof Function) {
|
|
2274
|
+
return option((value3) => {
|
|
2275
|
+
setDirty(void 0);
|
|
2276
|
+
onChange(value3, "quickOption");
|
|
2277
|
+
});
|
|
2278
|
+
}
|
|
2279
|
+
const { label, value: value2 } = typeof option === "string" ? commonQuickOptions[option] : option;
|
|
2280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
2281
|
+
Button2,
|
|
2282
|
+
{
|
|
2283
|
+
variant: "text",
|
|
2284
|
+
type: "button",
|
|
2285
|
+
css: {
|
|
2286
|
+
color: "inherit"
|
|
2287
|
+
},
|
|
2288
|
+
onClick: () => {
|
|
2272
2289
|
setDirty(void 0);
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
Button2,
|
|
2279
|
-
{
|
|
2280
|
-
variant: "text",
|
|
2281
|
-
type: "button",
|
|
2282
|
-
css: {
|
|
2283
|
-
color: "inherit"
|
|
2284
|
-
},
|
|
2285
|
-
onClick: () => {
|
|
2286
|
-
setDirty(void 0);
|
|
2287
|
-
if (value2 instanceof Function) {
|
|
2288
|
-
onChange(value2(props), "quickOption");
|
|
2289
|
-
} else {
|
|
2290
|
-
onChange(value2, "quickOption");
|
|
2291
|
-
}
|
|
2292
|
-
},
|
|
2293
|
-
children: label
|
|
2290
|
+
if (value2 instanceof Function) {
|
|
2291
|
+
onChange(value2(props), "quickOption");
|
|
2292
|
+
} else {
|
|
2293
|
+
onChange(value2, "quickOption");
|
|
2294
|
+
}
|
|
2294
2295
|
},
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2296
|
+
children: label
|
|
2297
|
+
},
|
|
2298
|
+
index
|
|
2299
|
+
);
|
|
2300
|
+
});
|
|
2299
2301
|
const { calendars, getBackProps, getForwardProps, getDateProps } = (0, import_dayzed.useDayzed)({
|
|
2300
2302
|
onDateSelected: () => void 0,
|
|
2301
2303
|
firstDayOfWeek,
|