wcz-test 3.0.0 → 3.1.1
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.js +56 -67
- package/dist/index.js.map +1 -1
- package/package.json +3 -4
package/dist/index.js
CHANGED
|
@@ -47,7 +47,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
47
47
|
var w = b ? Symbol.for("react.fundamental") : 60117;
|
|
48
48
|
var x = b ? Symbol.for("react.responder") : 60118;
|
|
49
49
|
var y = b ? Symbol.for("react.scope") : 60119;
|
|
50
|
-
function
|
|
50
|
+
function z(a) {
|
|
51
51
|
if ("object" === typeof a && null !== a) {
|
|
52
52
|
var u = a.$$typeof;
|
|
53
53
|
switch (u) {
|
|
@@ -78,7 +78,7 @@ var require_react_is_production_min = __commonJS({
|
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
function A(a) {
|
|
81
|
-
return
|
|
81
|
+
return z(a) === m;
|
|
82
82
|
}
|
|
83
83
|
exports.AsyncMode = l;
|
|
84
84
|
exports.ConcurrentMode = m;
|
|
@@ -94,46 +94,46 @@ var require_react_is_production_min = __commonJS({
|
|
|
94
94
|
exports.StrictMode = f;
|
|
95
95
|
exports.Suspense = p;
|
|
96
96
|
exports.isAsyncMode = function(a) {
|
|
97
|
-
return A(a) ||
|
|
97
|
+
return A(a) || z(a) === l;
|
|
98
98
|
};
|
|
99
99
|
exports.isConcurrentMode = A;
|
|
100
100
|
exports.isContextConsumer = function(a) {
|
|
101
|
-
return
|
|
101
|
+
return z(a) === k;
|
|
102
102
|
};
|
|
103
103
|
exports.isContextProvider = function(a) {
|
|
104
|
-
return
|
|
104
|
+
return z(a) === h;
|
|
105
105
|
};
|
|
106
106
|
exports.isElement = function(a) {
|
|
107
107
|
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
108
108
|
};
|
|
109
109
|
exports.isForwardRef = function(a) {
|
|
110
|
-
return
|
|
110
|
+
return z(a) === n;
|
|
111
111
|
};
|
|
112
112
|
exports.isFragment = function(a) {
|
|
113
|
-
return
|
|
113
|
+
return z(a) === e;
|
|
114
114
|
};
|
|
115
115
|
exports.isLazy = function(a) {
|
|
116
|
-
return
|
|
116
|
+
return z(a) === t2;
|
|
117
117
|
};
|
|
118
118
|
exports.isMemo = function(a) {
|
|
119
|
-
return
|
|
119
|
+
return z(a) === r;
|
|
120
120
|
};
|
|
121
121
|
exports.isPortal = function(a) {
|
|
122
|
-
return
|
|
122
|
+
return z(a) === d;
|
|
123
123
|
};
|
|
124
124
|
exports.isProfiler = function(a) {
|
|
125
|
-
return
|
|
125
|
+
return z(a) === g;
|
|
126
126
|
};
|
|
127
127
|
exports.isStrictMode = function(a) {
|
|
128
|
-
return
|
|
128
|
+
return z(a) === f;
|
|
129
129
|
};
|
|
130
130
|
exports.isSuspense = function(a) {
|
|
131
|
-
return
|
|
131
|
+
return z(a) === p;
|
|
132
132
|
};
|
|
133
133
|
exports.isValidElementType = function(a) {
|
|
134
134
|
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t2 || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
135
135
|
};
|
|
136
|
-
exports.typeOf =
|
|
136
|
+
exports.typeOf = z;
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
139
|
|
|
@@ -1387,16 +1387,16 @@ function warnOnce(message, gravity = "warning") {
|
|
|
1387
1387
|
}
|
|
1388
1388
|
|
|
1389
1389
|
// node_modules/@mui/x-date-pickers/esm/AdapterDayjs/AdapterDayjs.js
|
|
1390
|
-
import
|
|
1390
|
+
import dayjs from "dayjs";
|
|
1391
1391
|
import weekOfYearPlugin from "dayjs/plugin/weekOfYear.js";
|
|
1392
1392
|
import customParseFormatPlugin from "dayjs/plugin/customParseFormat.js";
|
|
1393
1393
|
import localizedFormatPlugin from "dayjs/plugin/localizedFormat.js";
|
|
1394
1394
|
import isBetweenPlugin from "dayjs/plugin/isBetween.js";
|
|
1395
1395
|
import advancedFormatPlugin from "dayjs/plugin/advancedFormat.js";
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1396
|
+
dayjs.extend(localizedFormatPlugin);
|
|
1397
|
+
dayjs.extend(weekOfYearPlugin);
|
|
1398
|
+
dayjs.extend(isBetweenPlugin);
|
|
1399
|
+
dayjs.extend(advancedFormatPlugin);
|
|
1400
1400
|
var formatTokenMap = {
|
|
1401
1401
|
// Year
|
|
1402
1402
|
YY: "year",
|
|
@@ -1505,7 +1505,6 @@ var defaultFormats = {
|
|
|
1505
1505
|
};
|
|
1506
1506
|
var MISSING_UTC_PLUGIN = ["Missing UTC plugin", "To be able to use UTC or timezones, you have to enable the `utc` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join("\n");
|
|
1507
1507
|
var MISSING_TIMEZONE_PLUGIN = ["Missing timezone plugin", "To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin", "Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join("\n");
|
|
1508
|
-
var withLocale = (dayjs3, locale) => !locale ? dayjs3 : (...args) => dayjs3(...args).locale(locale);
|
|
1509
1508
|
var AdapterDayjs = class {
|
|
1510
1509
|
constructor({
|
|
1511
1510
|
locale: _locale,
|
|
@@ -1514,7 +1513,6 @@ var AdapterDayjs = class {
|
|
|
1514
1513
|
this.isMUIAdapter = true;
|
|
1515
1514
|
this.isTimezoneCompatible = true;
|
|
1516
1515
|
this.lib = "dayjs";
|
|
1517
|
-
this.dayjs = void 0;
|
|
1518
1516
|
this.locale = void 0;
|
|
1519
1517
|
this.formats = void 0;
|
|
1520
1518
|
this.escapedCharacters = {
|
|
@@ -1529,8 +1527,8 @@ var AdapterDayjs = class {
|
|
|
1529
1527
|
}
|
|
1530
1528
|
return value.locale(expectedLocale);
|
|
1531
1529
|
};
|
|
1532
|
-
this.hasUTCPlugin = () => typeof
|
|
1533
|
-
this.hasTimezonePlugin = () => typeof
|
|
1530
|
+
this.hasUTCPlugin = () => typeof dayjs.utc !== "undefined";
|
|
1531
|
+
this.hasTimezonePlugin = () => typeof dayjs.tz !== "undefined";
|
|
1534
1532
|
this.isSame = (value, comparing, comparisonTemplate) => {
|
|
1535
1533
|
const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));
|
|
1536
1534
|
return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);
|
|
@@ -1541,7 +1539,7 @@ var AdapterDayjs = class {
|
|
|
1541
1539
|
return void 0;
|
|
1542
1540
|
}
|
|
1543
1541
|
case "system": {
|
|
1544
|
-
return
|
|
1542
|
+
return dayjs.tz.guess();
|
|
1545
1543
|
}
|
|
1546
1544
|
default: {
|
|
1547
1545
|
return timezone;
|
|
@@ -1549,20 +1547,24 @@ var AdapterDayjs = class {
|
|
|
1549
1547
|
}
|
|
1550
1548
|
};
|
|
1551
1549
|
this.createSystemDate = (value) => {
|
|
1550
|
+
let date;
|
|
1552
1551
|
if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {
|
|
1553
|
-
const timezone =
|
|
1554
|
-
if (timezone
|
|
1555
|
-
|
|
1552
|
+
const timezone = dayjs.tz.guess();
|
|
1553
|
+
if (timezone === "UTC") {
|
|
1554
|
+
date = dayjs(value);
|
|
1555
|
+
} else {
|
|
1556
|
+
date = dayjs.tz(value, timezone);
|
|
1556
1557
|
}
|
|
1557
|
-
|
|
1558
|
+
} else {
|
|
1559
|
+
date = dayjs(value);
|
|
1558
1560
|
}
|
|
1559
|
-
return
|
|
1561
|
+
return this.setLocaleToValue(date);
|
|
1560
1562
|
};
|
|
1561
1563
|
this.createUTCDate = (value) => {
|
|
1562
1564
|
if (!this.hasUTCPlugin()) {
|
|
1563
1565
|
throw new Error(MISSING_UTC_PLUGIN);
|
|
1564
1566
|
}
|
|
1565
|
-
return
|
|
1567
|
+
return this.setLocaleToValue(dayjs.utc(value));
|
|
1566
1568
|
};
|
|
1567
1569
|
this.createTZDate = (value, timezone) => {
|
|
1568
1570
|
if (!this.hasUTCPlugin()) {
|
|
@@ -1572,10 +1574,10 @@ var AdapterDayjs = class {
|
|
|
1572
1574
|
throw new Error(MISSING_TIMEZONE_PLUGIN);
|
|
1573
1575
|
}
|
|
1574
1576
|
const keepLocalTime = value !== void 0 && !value.endsWith("Z");
|
|
1575
|
-
return
|
|
1577
|
+
return this.setLocaleToValue(dayjs(value).tz(this.cleanTimezone(timezone), keepLocalTime));
|
|
1576
1578
|
};
|
|
1577
1579
|
this.getLocaleFormats = () => {
|
|
1578
|
-
const locales =
|
|
1580
|
+
const locales = dayjs.Ls;
|
|
1579
1581
|
const locale = this.locale || "en";
|
|
1580
1582
|
let localeObject = locales[locale];
|
|
1581
1583
|
if (localeObject === void 0) {
|
|
@@ -1604,20 +1606,15 @@ var AdapterDayjs = class {
|
|
|
1604
1606
|
if (value === null) {
|
|
1605
1607
|
return null;
|
|
1606
1608
|
}
|
|
1607
|
-
let parsedValue;
|
|
1608
1609
|
if (timezone === "UTC") {
|
|
1609
|
-
|
|
1610
|
-
} else if (timezone === "system" || timezone === "default" && !this.hasTimezonePlugin()) {
|
|
1611
|
-
parsedValue = this.createSystemDate(value);
|
|
1612
|
-
} else {
|
|
1613
|
-
parsedValue = this.createTZDate(value, timezone);
|
|
1610
|
+
return this.createUTCDate(value);
|
|
1614
1611
|
}
|
|
1615
|
-
if (
|
|
1616
|
-
return
|
|
1612
|
+
if (timezone === "system" || timezone === "default" && !this.hasTimezonePlugin()) {
|
|
1613
|
+
return this.createSystemDate(value);
|
|
1617
1614
|
}
|
|
1618
|
-
return
|
|
1615
|
+
return this.createTZDate(value, timezone);
|
|
1619
1616
|
};
|
|
1620
|
-
this.getInvalidDate = () =>
|
|
1617
|
+
this.getInvalidDate = () => dayjs(/* @__PURE__ */ new Date("Invalid date"));
|
|
1621
1618
|
this.getTimezone = (value) => {
|
|
1622
1619
|
if (this.hasTimezonePlugin()) {
|
|
1623
1620
|
const zone = value.$x?.$timezone;
|
|
@@ -1649,7 +1646,7 @@ var AdapterDayjs = class {
|
|
|
1649
1646
|
}
|
|
1650
1647
|
throw new Error(MISSING_TIMEZONE_PLUGIN);
|
|
1651
1648
|
}
|
|
1652
|
-
return
|
|
1649
|
+
return this.setLocaleToValue(dayjs.tz(value, this.cleanTimezone(timezone)));
|
|
1653
1650
|
};
|
|
1654
1651
|
this.toJsDate = (value) => {
|
|
1655
1652
|
return value.toDate();
|
|
@@ -1658,7 +1655,7 @@ var AdapterDayjs = class {
|
|
|
1658
1655
|
if (value === "") {
|
|
1659
1656
|
return null;
|
|
1660
1657
|
}
|
|
1661
|
-
return
|
|
1658
|
+
return dayjs(value, format, this.locale, true);
|
|
1662
1659
|
};
|
|
1663
1660
|
this.getCurrentLocaleCode = () => {
|
|
1664
1661
|
return this.locale || "en";
|
|
@@ -1684,7 +1681,7 @@ var AdapterDayjs = class {
|
|
|
1684
1681
|
return this.formatByString(value, this.formats[formatKey]);
|
|
1685
1682
|
};
|
|
1686
1683
|
this.formatByString = (value, formatString) => {
|
|
1687
|
-
return this.
|
|
1684
|
+
return this.setLocaleToValue(value).format(formatString);
|
|
1688
1685
|
};
|
|
1689
1686
|
this.formatNumber = (numberToFormat) => {
|
|
1690
1687
|
return numberToFormat;
|
|
@@ -1768,25 +1765,25 @@ var AdapterDayjs = class {
|
|
|
1768
1765
|
return this.adjustOffset(value.endOf("day"));
|
|
1769
1766
|
};
|
|
1770
1767
|
this.addYears = (value, amount) => {
|
|
1771
|
-
return this.adjustOffset(
|
|
1768
|
+
return this.adjustOffset(value.add(amount, "year"));
|
|
1772
1769
|
};
|
|
1773
1770
|
this.addMonths = (value, amount) => {
|
|
1774
|
-
return this.adjustOffset(
|
|
1771
|
+
return this.adjustOffset(value.add(amount, "month"));
|
|
1775
1772
|
};
|
|
1776
1773
|
this.addWeeks = (value, amount) => {
|
|
1777
|
-
return this.adjustOffset(
|
|
1774
|
+
return this.adjustOffset(value.add(amount, "week"));
|
|
1778
1775
|
};
|
|
1779
1776
|
this.addDays = (value, amount) => {
|
|
1780
|
-
return this.adjustOffset(
|
|
1777
|
+
return this.adjustOffset(value.add(amount, "day"));
|
|
1781
1778
|
};
|
|
1782
1779
|
this.addHours = (value, amount) => {
|
|
1783
|
-
return this.adjustOffset(
|
|
1780
|
+
return this.adjustOffset(value.add(amount, "hour"));
|
|
1784
1781
|
};
|
|
1785
1782
|
this.addMinutes = (value, amount) => {
|
|
1786
|
-
return this.adjustOffset(
|
|
1783
|
+
return this.adjustOffset(value.add(amount, "minute"));
|
|
1787
1784
|
};
|
|
1788
1785
|
this.addSeconds = (value, amount) => {
|
|
1789
|
-
return this.adjustOffset(
|
|
1786
|
+
return this.adjustOffset(value.add(amount, "second"));
|
|
1790
1787
|
};
|
|
1791
1788
|
this.getYear = (value) => {
|
|
1792
1789
|
return value.year();
|
|
@@ -1862,10 +1859,9 @@ var AdapterDayjs = class {
|
|
|
1862
1859
|
}
|
|
1863
1860
|
return years;
|
|
1864
1861
|
};
|
|
1865
|
-
this.dayjs = withLocale(defaultDayjs, _locale);
|
|
1866
1862
|
this.locale = _locale;
|
|
1867
1863
|
this.formats = _extends({}, defaultFormats, formats);
|
|
1868
|
-
|
|
1864
|
+
dayjs.extend(customParseFormatPlugin);
|
|
1869
1865
|
}
|
|
1870
1866
|
getDayOfWeek(value) {
|
|
1871
1867
|
return value.day() + 1;
|
|
@@ -2129,13 +2125,9 @@ var useGetTheme = (theme) => {
|
|
|
2129
2125
|
|
|
2130
2126
|
// src/utils/i18n.ts
|
|
2131
2127
|
import i18n from "i18next";
|
|
2132
|
-
import { initReactI18next } from "react-i18next";
|
|
2133
|
-
import HttpBackend from "i18next-http-backend";
|
|
2134
2128
|
import LanguageDetector from "i18next-browser-languagedetector";
|
|
2135
|
-
import
|
|
2136
|
-
import {
|
|
2137
|
-
import zodCsTranslations from "zod-i18n-map/locales/cs/zod.json";
|
|
2138
|
-
import zodEnTranslations from "zod-i18n-map/locales/en/zod.json";
|
|
2129
|
+
import HttpBackend from "i18next-http-backend";
|
|
2130
|
+
import { initReactI18next } from "react-i18next";
|
|
2139
2131
|
import { default as default2 } from "i18next";
|
|
2140
2132
|
i18n.use(HttpBackend).use(LanguageDetector).use(initReactI18next).init({
|
|
2141
2133
|
fallbackLng: "en",
|
|
@@ -2146,9 +2138,6 @@ i18n.use(HttpBackend).use(LanguageDetector).use(initReactI18next).init({
|
|
|
2146
2138
|
useSuspense: false
|
|
2147
2139
|
}
|
|
2148
2140
|
});
|
|
2149
|
-
i18n.addResourceBundle("en", "zod", zodEnTranslations);
|
|
2150
|
-
i18n.addResourceBundle("cs", "zod", zodCsTranslations);
|
|
2151
|
-
z.setErrorMap(zodI18nMap);
|
|
2152
2141
|
|
|
2153
2142
|
// src/providers/LayoutProvider.tsx
|
|
2154
2143
|
import { jsx as jsx15, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
@@ -2302,7 +2291,7 @@ var FormCheckbox = (props) => {
|
|
|
2302
2291
|
|
|
2303
2292
|
// src/components/form/FormDatePicker.tsx
|
|
2304
2293
|
import { DatePicker } from "@mui/x-date-pickers-pro";
|
|
2305
|
-
import
|
|
2294
|
+
import dayjs2 from "dayjs";
|
|
2306
2295
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
2307
2296
|
var FormDatePicker = (props) => {
|
|
2308
2297
|
const field = useFieldContext();
|
|
@@ -2311,7 +2300,7 @@ var FormDatePicker = (props) => {
|
|
|
2311
2300
|
DatePicker,
|
|
2312
2301
|
{
|
|
2313
2302
|
name: field.name,
|
|
2314
|
-
value: field.state.value ?
|
|
2303
|
+
value: field.state.value ? dayjs2(field.state.value) : null,
|
|
2315
2304
|
onChange: (value) => field.handleChange(value ? value.format() : null),
|
|
2316
2305
|
slotProps: {
|
|
2317
2306
|
textField: {
|
|
@@ -2330,7 +2319,7 @@ var FormDatePicker = (props) => {
|
|
|
2330
2319
|
|
|
2331
2320
|
// src/components/form/FormDateTimePicker.tsx
|
|
2332
2321
|
import { DateTimePicker } from "@mui/x-date-pickers-pro";
|
|
2333
|
-
import
|
|
2322
|
+
import dayjs3 from "dayjs";
|
|
2334
2323
|
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
2335
2324
|
var FormDateTimePicker = (props) => {
|
|
2336
2325
|
const field = useFieldContext();
|
|
@@ -2339,7 +2328,7 @@ var FormDateTimePicker = (props) => {
|
|
|
2339
2328
|
DateTimePicker,
|
|
2340
2329
|
{
|
|
2341
2330
|
name: field.name,
|
|
2342
|
-
value: field.state.value ?
|
|
2331
|
+
value: field.state.value ? dayjs3(field.state.value) : null,
|
|
2343
2332
|
onChange: (value) => field.handleChange(value ? value.format() : null),
|
|
2344
2333
|
slotProps: {
|
|
2345
2334
|
textField: {
|