@cloudtower/eagle 0.27.12 → 0.27.13
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/components.css +1042 -952
- package/dist/coreX/SummaryTable/SummaryTable.stories.d.ts +5 -0
- package/dist/coreX/SummaryTable/index.d.ts +10 -0
- package/dist/esm/index.js +1701 -1600
- package/dist/esm/stats1.html +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/spec/base.d.ts +30 -0
- package/dist/style.css +2017 -1927
- package/dist/umd/index.js +1701 -1600
- package/dist/umd/stats1.html +1 -1
- package/package.json +5 -5
package/dist/umd/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@linaria/core'), require('@cloudtower/parrot'), require('react-i18next'), require('antd'), require('@cloudtower/icons-react'), require('classnames'), require('linaria/react'), require('lodash'), require('react-svg-unique-id'), require('react-transition-group'), require('@linaria/react'), require('recharts'), require('
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', '@linaria/core', '@cloudtower/parrot', 'react-i18next', 'antd', '@cloudtower/icons-react', 'classnames', 'linaria/react', 'lodash', 'react-svg-unique-id', 'react-transition-group', '@linaria/react', 'recharts', 'dayjs', 'linaria', 'moment', '
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.index = {}, global.React, global.core, global.parrot, global.reactI18next, global.antd, global.iconsReact, global.cs, global.react, global._, global.reactSvgUniqueId, global.reactTransitionGroup, global.react$1, global.recharts, global.
|
|
5
|
-
})(this, (function (exports, React, core, parrot, reactI18next, antd, iconsReact, cs, react, _, reactSvgUniqueId, reactTransitionGroup, react$1, recharts, dayjs, linaria, moment, reactDom, reactIs,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@linaria/core'), require('@cloudtower/parrot'), require('react-i18next'), require('antd'), require('@cloudtower/icons-react'), require('classnames'), require('linaria/react'), require('lodash'), require('react-svg-unique-id'), require('react-transition-group'), require('@linaria/react'), require('recharts'), require('@ant-design/icons'), require('dayjs'), require('linaria'), require('moment'), require('dayjs/plugin/utc'), require('react-dom'), require('react-is'), require('dayjs/plugin/customParseFormat'), require('@ant-design/icons/CheckCircleFilled'), require('@ant-design/icons/CloseCircleFilled'), require('@ant-design/icons/ExclamationCircleFilled'), require('@ant-design/icons/InfoCircleFilled'), require('@ant-design/icons/LoadingOutlined'), require('@cloudtower/rc-notification'), require('redux'), require('react-redux'), require('react-beautiful-dnd'), require('timezones.json'), require('antd/lib/locale/en_US'), require('antd/lib/locale/zh_CN')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react', '@linaria/core', '@cloudtower/parrot', 'react-i18next', 'antd', '@cloudtower/icons-react', 'classnames', 'linaria/react', 'lodash', 'react-svg-unique-id', 'react-transition-group', '@linaria/react', 'recharts', '@ant-design/icons', 'dayjs', 'linaria', 'moment', 'dayjs/plugin/utc', 'react-dom', 'react-is', 'dayjs/plugin/customParseFormat', '@ant-design/icons/CheckCircleFilled', '@ant-design/icons/CloseCircleFilled', '@ant-design/icons/ExclamationCircleFilled', '@ant-design/icons/InfoCircleFilled', '@ant-design/icons/LoadingOutlined', '@cloudtower/rc-notification', 'redux', 'react-redux', 'react-beautiful-dnd', 'timezones.json', 'antd/lib/locale/en_US', 'antd/lib/locale/zh_CN'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.index = {}, global.React, global.core, global.parrot, global.reactI18next, global.antd, global.iconsReact, global.cs, global.react, global._, global.reactSvgUniqueId, global.reactTransitionGroup, global.react$1, global.recharts, global.icons, global.dayjs, global.linaria, global.moment, global.UTC, global.reactDom, global.reactIs, global.customParseFormat, global.CheckCircleFilled, global.CloseCircleFilled, global.ExclamationCircleFilled, global.InfoCircleFilled, global.LoadingOutlined, global.RCNotification, global.redux, global.reactRedux, global.reactBeautifulDnd, global.TimeZones, global.enUS, global.zhCN));
|
|
5
|
+
})(this, (function (exports, React, core, parrot, reactI18next, antd, iconsReact, cs, react, _, reactSvgUniqueId, reactTransitionGroup, react$1, recharts, icons, dayjs, linaria, moment, UTC, reactDom, reactIs, customParseFormat, CheckCircleFilled, CloseCircleFilled, ExclamationCircleFilled, InfoCircleFilled, LoadingOutlined, RCNotification, redux, reactRedux, reactBeautifulDnd, TimeZones, enUS, zhCN) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
8
8
|
|
|
@@ -1316,8 +1316,8 @@
|
|
|
1316
1316
|
class: "c14wcxf0",
|
|
1317
1317
|
propsAsIs: false
|
|
1318
1318
|
});
|
|
1319
|
-
const _exp$
|
|
1320
|
-
const ChartTooltipTitle = /*#__PURE__*/react$1.styled(_exp$
|
|
1319
|
+
const _exp$5 = () => ChartTooltipRow;
|
|
1320
|
+
const ChartTooltipTitle = /*#__PURE__*/react$1.styled(_exp$5())({
|
|
1321
1321
|
name: "ChartTooltipTitle",
|
|
1322
1322
|
class: "coy29mj",
|
|
1323
1323
|
propsAsIs: true
|
|
@@ -1438,1362 +1438,1490 @@
|
|
|
1438
1438
|
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, render());
|
|
1439
1439
|
};
|
|
1440
1440
|
|
|
1441
|
-
const HoverableElement = (props) => {
|
|
1442
|
-
const { className, hover = false, icon, hoverEle } = props;
|
|
1443
|
-
if (hover) {
|
|
1444
|
-
return hoverEle != null ? React__namespace.default.cloneElement(hoverEle, { className }) : null;
|
|
1445
|
-
}
|
|
1446
|
-
return icon != null ? React__namespace.default.cloneElement(icon, { className }) : null;
|
|
1447
|
-
};
|
|
1448
|
-
|
|
1449
1441
|
var __defProp$Q = Object.defineProperty;
|
|
1450
1442
|
var __getOwnPropSymbols$R = Object.getOwnPropertySymbols;
|
|
1451
1443
|
var __hasOwnProp$R = Object.prototype.hasOwnProperty;
|
|
1452
1444
|
var __propIsEnum$R = Object.prototype.propertyIsEnumerable;
|
|
1453
|
-
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, {
|
|
1454
|
-
enumerable: true,
|
|
1455
|
-
configurable: true,
|
|
1456
|
-
writable: true,
|
|
1457
|
-
value
|
|
1458
|
-
}) : obj[key] = value;
|
|
1445
|
+
var __defNormalProp$Q = (obj, key, value) => key in obj ? __defProp$Q(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1459
1446
|
var __spreadValues$P = (a, b) => {
|
|
1460
|
-
for (var prop in b || (b = {}))
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1447
|
+
for (var prop in b || (b = {}))
|
|
1448
|
+
if (__hasOwnProp$R.call(b, prop))
|
|
1449
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
1450
|
+
if (__getOwnPropSymbols$R)
|
|
1451
|
+
for (var prop of __getOwnPropSymbols$R(b)) {
|
|
1452
|
+
if (__propIsEnum$R.call(b, prop))
|
|
1453
|
+
__defNormalProp$Q(a, prop, b[prop]);
|
|
1454
|
+
}
|
|
1464
1455
|
return a;
|
|
1465
1456
|
};
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
return
|
|
1457
|
+
const Calendar = (props) => /* @__PURE__ */ React__namespace.default.createElement(antd.Calendar, __spreadValues$P({}, props));
|
|
1458
|
+
|
|
1459
|
+
var __defProp$P = Object.defineProperty;
|
|
1460
|
+
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1461
|
+
var __publicField$1 = (obj, key, value) => {
|
|
1462
|
+
__defNormalProp$P(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
1463
|
+
return value;
|
|
1473
1464
|
};
|
|
1474
|
-
|
|
1475
|
-
const
|
|
1476
|
-
|
|
1477
|
-
|
|
1465
|
+
dayjs__default.default.extend(UTC__default.default);
|
|
1466
|
+
const CONSTRAINTS = [
|
|
1467
|
+
[0, 59],
|
|
1468
|
+
[0, 59],
|
|
1469
|
+
[0, 23],
|
|
1470
|
+
[1, 31],
|
|
1471
|
+
[0, 11],
|
|
1472
|
+
[0, 6]
|
|
1473
|
+
];
|
|
1474
|
+
const MONTH_CONSTRAINTS = [
|
|
1475
|
+
31,
|
|
1476
|
+
29,
|
|
1477
|
+
// support leap year...not perfect
|
|
1478
|
+
31,
|
|
1479
|
+
30,
|
|
1480
|
+
31,
|
|
1481
|
+
30,
|
|
1482
|
+
31,
|
|
1483
|
+
31,
|
|
1484
|
+
30,
|
|
1485
|
+
31,
|
|
1486
|
+
30,
|
|
1487
|
+
31
|
|
1488
|
+
];
|
|
1489
|
+
const PARSE_DEFAULTS = ["0", "*", "*", "*", "*", "*"];
|
|
1490
|
+
const ALIASES = {
|
|
1491
|
+
jan: 0,
|
|
1492
|
+
feb: 1,
|
|
1493
|
+
mar: 2,
|
|
1494
|
+
apr: 3,
|
|
1495
|
+
may: 4,
|
|
1496
|
+
jun: 5,
|
|
1497
|
+
jul: 6,
|
|
1498
|
+
aug: 7,
|
|
1499
|
+
sep: 8,
|
|
1500
|
+
oct: 9,
|
|
1501
|
+
nov: 10,
|
|
1502
|
+
dec: 11,
|
|
1503
|
+
sun: 0,
|
|
1504
|
+
mon: 1,
|
|
1505
|
+
tue: 2,
|
|
1506
|
+
wed: 3,
|
|
1507
|
+
thu: 4,
|
|
1508
|
+
fri: 5,
|
|
1509
|
+
sat: 6
|
|
1478
1510
|
};
|
|
1479
|
-
const
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
setStatus("hover");
|
|
1511
|
+
const TIME_UNITS = [
|
|
1512
|
+
"second",
|
|
1513
|
+
"minute",
|
|
1514
|
+
"hour",
|
|
1515
|
+
"dayOfMonth",
|
|
1516
|
+
"month",
|
|
1517
|
+
"dayOfWeek"
|
|
1518
|
+
];
|
|
1519
|
+
const TIME_UNITS_LEN = TIME_UNITS.length;
|
|
1520
|
+
const PRESETS = {
|
|
1521
|
+
"@monthly": {
|
|
1522
|
+
expression: () => "0 0 0 1 * *",
|
|
1523
|
+
validation: () => true
|
|
1524
|
+
},
|
|
1525
|
+
"@weekly": { expression: () => "0 0 0 * * 0", validation: () => true },
|
|
1526
|
+
"@daily": { expression: () => "0 0 0 * * *", validation: () => true },
|
|
1527
|
+
"@hourly": { expression: () => "0 0 * * * *", validation: () => true },
|
|
1528
|
+
"@minutely": { expression: () => "0 * * * * *", validation: () => true },
|
|
1529
|
+
"@secondly": { expression: () => "* * * * * *", validation: () => true },
|
|
1530
|
+
"@weekdays": { expression: () => "0 0 0 * * 1-5", validation: () => true },
|
|
1531
|
+
"@weekends": { expression: () => "0 0 0 * * 0,6", validation: () => true },
|
|
1532
|
+
"@x-every-n-day": {
|
|
1533
|
+
expression: (args) => `0 ${args[0]} ${args[1]} * * *`,
|
|
1534
|
+
validation: ({ date, lastSendAt, args }) => {
|
|
1535
|
+
if (!lastSendAt) {
|
|
1536
|
+
return true;
|
|
1506
1537
|
}
|
|
1538
|
+
return date.diff(lastSendAt) >= parseInt(args[2], 10) * (864e5 - 6e4) - 1e4;
|
|
1507
1539
|
},
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1540
|
+
step: (_args) => 864e5 - 6e4
|
|
1541
|
+
},
|
|
1542
|
+
"@x-every-n-week": {
|
|
1543
|
+
expression: (args) => {
|
|
1544
|
+
const days = args.slice(3);
|
|
1545
|
+
return `0 ${args[0]} ${args[1]} * * ${days.includes("*") ? "*" : days.join(",")}`;
|
|
1546
|
+
},
|
|
1547
|
+
validation: ({ lastSendAt, date, args }) => {
|
|
1548
|
+
if (!lastSendAt) {
|
|
1549
|
+
return true;
|
|
1512
1550
|
}
|
|
1551
|
+
if (date.isAfter(lastSendAt) && date.day(0).isSame(lastSendAt.day(0))) {
|
|
1552
|
+
return true;
|
|
1553
|
+
}
|
|
1554
|
+
return date.day(0).diff(lastSendAt.day(0)) >= parseInt(args[2], 10) * (6048e5 - 6e4) - 1e4;
|
|
1513
1555
|
},
|
|
1514
|
-
|
|
1515
|
-
},
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
hoverEle: hoverSuffixIcon,
|
|
1523
|
-
hover: status === "hover",
|
|
1524
|
-
className: !onlyIcon ? "button-suffix-icon" : ""
|
|
1525
|
-
}));
|
|
1526
|
-
});
|
|
1527
|
-
|
|
1528
|
-
var __defProp$P = Object.defineProperty;
|
|
1529
|
-
var __defProps$E = Object.defineProperties;
|
|
1530
|
-
var __getOwnPropDescs$E = Object.getOwnPropertyDescriptors;
|
|
1531
|
-
var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
|
|
1532
|
-
var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
|
|
1533
|
-
var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
|
|
1534
|
-
var __defNormalProp$P = (obj, key, value) => key in obj ? __defProp$P(obj, key, {
|
|
1535
|
-
enumerable: true,
|
|
1536
|
-
configurable: true,
|
|
1537
|
-
writable: true,
|
|
1538
|
-
value
|
|
1539
|
-
}) : obj[key] = value;
|
|
1540
|
-
var __spreadValues$O = (a, b) => {
|
|
1541
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$Q.call(b, prop)) __defNormalProp$P(a, prop, b[prop]);
|
|
1542
|
-
if (__getOwnPropSymbols$Q) for (var prop of __getOwnPropSymbols$Q(b)) {
|
|
1543
|
-
if (__propIsEnum$Q.call(b, prop)) __defNormalProp$P(a, prop, b[prop]);
|
|
1544
|
-
}
|
|
1545
|
-
return a;
|
|
1546
|
-
};
|
|
1547
|
-
var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
|
|
1548
|
-
var __objRest$x = (source, exclude) => {
|
|
1549
|
-
var target = {};
|
|
1550
|
-
for (var prop in source) if (__hasOwnProp$Q.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
1551
|
-
if (source != null && __getOwnPropSymbols$Q) for (var prop of __getOwnPropSymbols$Q(source)) {
|
|
1552
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$Q.call(source, prop)) target[prop] = source[prop];
|
|
1556
|
+
step: (_args) => 6048e5 - 6e4
|
|
1557
|
+
},
|
|
1558
|
+
"@x-last-day": {
|
|
1559
|
+
expression: (args) => `0 ${args[0]} ${args[1]} 28-31 ${args[2]} *`,
|
|
1560
|
+
validation: ({ date }) => {
|
|
1561
|
+
const lastDayInMonth = MONTH_CONSTRAINTS[date.month()];
|
|
1562
|
+
return lastDayInMonth === date.date();
|
|
1563
|
+
}
|
|
1553
1564
|
}
|
|
1554
|
-
return target;
|
|
1555
|
-
};
|
|
1556
|
-
const CheckboxStyle = "c198s9j3";
|
|
1557
|
-
const Checkbox = _a => {
|
|
1558
|
-
var _b = _a,
|
|
1559
|
-
{
|
|
1560
|
-
className,
|
|
1561
|
-
children,
|
|
1562
|
-
description,
|
|
1563
|
-
compact
|
|
1564
|
-
} = _b,
|
|
1565
|
-
props = __objRest$x(_b, ["className", "children", "description", "compact"]);
|
|
1566
|
-
return /* @__PURE__ */React__namespace.default.createElement(antd.Checkbox, __spreadProps$E(__spreadValues$O({}, props), {
|
|
1567
|
-
"data-test": props["data-test"] || props.value,
|
|
1568
|
-
className: cs__default.default(className, CheckboxStyle, compact && "compact")
|
|
1569
|
-
}), children ? /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
1570
|
-
className: cs__default.default("main", Typo.Label.l2_regular)
|
|
1571
|
-
}, children), description ? /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
1572
|
-
className: cs__default.default("sub", Typo.Label.l4_regular)
|
|
1573
|
-
}, description) : null) : null);
|
|
1574
1565
|
};
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1566
|
+
const RE_WILDCARDS = /\*/g;
|
|
1567
|
+
const RE_RANGE = /^(\d+)(?:-(\d+))?(?:\/(\d+))?$/g;
|
|
1568
|
+
class CronTime {
|
|
1569
|
+
constructor(source, startAt, utcOffset) {
|
|
1570
|
+
__publicField$1(this, "source");
|
|
1571
|
+
__publicField$1(this, "presetValidation");
|
|
1572
|
+
__publicField$1(this, "presetArgs");
|
|
1573
|
+
__publicField$1(this, "presetStep");
|
|
1574
|
+
__publicField$1(this, "realDate", false);
|
|
1575
|
+
__publicField$1(this, "utcOffset");
|
|
1576
|
+
__publicField$1(this, "startAt");
|
|
1577
|
+
__publicField$1(this, "unitMap", {});
|
|
1578
|
+
// TODO: find a better way to do stateful cron?
|
|
1579
|
+
__publicField$1(this, "lastSendAt", null);
|
|
1580
|
+
if (typeof utcOffset !== "undefined") {
|
|
1581
|
+
this.utcOffset = utcOffset;
|
|
1589
1582
|
}
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1583
|
+
if (startAt !== void 0) {
|
|
1584
|
+
this.startAt = startAt;
|
|
1585
|
+
}
|
|
1586
|
+
TIME_UNITS.forEach((timeUnit) => {
|
|
1587
|
+
this.unitMap[timeUnit] = {};
|
|
1588
|
+
});
|
|
1589
|
+
if (source instanceof Date) {
|
|
1590
|
+
this.source = dayjs__default.default(source);
|
|
1591
|
+
this.realDate = true;
|
|
1592
|
+
} else {
|
|
1593
|
+
this.source = source;
|
|
1594
|
+
this.parse(this.source);
|
|
1595
|
+
this.verifyParse();
|
|
1601
1596
|
}
|
|
1602
|
-
return target;
|
|
1603
|
-
};
|
|
1604
|
-
const FieldsBoolean = (_a) => {
|
|
1605
|
-
var _b = _a, { input, children } = _b, props = __objRest$w(_b, ["input", "children"]);
|
|
1606
|
-
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
1607
|
-
Checkbox,
|
|
1608
|
-
__spreadValues$N({
|
|
1609
|
-
checked: Boolean(input.value),
|
|
1610
|
-
onChange: (e) => input.onChange(e.target.checked)
|
|
1611
|
-
}, props),
|
|
1612
|
-
children
|
|
1613
|
-
));
|
|
1614
|
-
};
|
|
1615
|
-
|
|
1616
|
-
const FieldsDateTime = ({ input }) => /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
1617
|
-
antd.DatePicker,
|
|
1618
|
-
{
|
|
1619
|
-
onFocus: () => {
|
|
1620
|
-
var _a;
|
|
1621
|
-
return (_a = input.onFocus) == null ? void 0 : _a.call(input);
|
|
1622
|
-
},
|
|
1623
|
-
onBlur: () => {
|
|
1624
|
-
var _a;
|
|
1625
|
-
return (_a = input.onBlur) == null ? void 0 : _a.call(input);
|
|
1626
|
-
},
|
|
1627
|
-
showTime: true,
|
|
1628
|
-
defaultValue: input.value,
|
|
1629
|
-
onOk: input.onChange
|
|
1630
1597
|
}
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
|
|
1636
|
-
var __objRest$v = (source, exclude) => {
|
|
1637
|
-
var target = {};
|
|
1638
|
-
for (var prop in source)
|
|
1639
|
-
if (__hasOwnProp$O.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1640
|
-
target[prop] = source[prop];
|
|
1641
|
-
if (source != null && __getOwnPropSymbols$O)
|
|
1642
|
-
for (var prop of __getOwnPropSymbols$O(source)) {
|
|
1643
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$O.call(source, prop))
|
|
1644
|
-
target[prop] = source[prop];
|
|
1598
|
+
sendAt(i) {
|
|
1599
|
+
let date = this.realDate ? this.source : dayjs__default.default();
|
|
1600
|
+
if (typeof this.utcOffset !== "undefined") {
|
|
1601
|
+
date = dayjs__default.default(date).utcOffset(this.utcOffset);
|
|
1645
1602
|
}
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
} = _b, props = __objRest$v(_b, [
|
|
1652
|
-
"input"
|
|
1653
|
-
]);
|
|
1654
|
-
var _a2, _b2;
|
|
1655
|
-
return /* @__PURE__ */ React__namespace.default.createElement("div", { className: "datatime-range" }, /* @__PURE__ */ React__namespace.default.createElement(
|
|
1656
|
-
antd.DatePicker.RangePicker,
|
|
1657
|
-
{
|
|
1658
|
-
onFocus: () => {
|
|
1659
|
-
var _a3;
|
|
1660
|
-
return (_a3 = input.onFocus) == null ? void 0 : _a3.call(input);
|
|
1661
|
-
},
|
|
1662
|
-
onBlur: () => {
|
|
1663
|
-
var _a3;
|
|
1664
|
-
return (_a3 = input.onBlur) == null ? void 0 : _a3.call(input);
|
|
1665
|
-
},
|
|
1666
|
-
showTime: true,
|
|
1667
|
-
defaultValue: (_a2 = input.value) == null ? void 0 : _a2.map((v) => v && moment__default.default(v)),
|
|
1668
|
-
onChange: input.onChange,
|
|
1669
|
-
value: (_b2 = input.value) == null ? void 0 : _b2.map((v) => v && moment__default.default(v)),
|
|
1670
|
-
format: props.format
|
|
1603
|
+
if (this.realDate) {
|
|
1604
|
+
if (dayjs__default.default().isAfter(date)) {
|
|
1605
|
+
throw new Error("WARNING: Date in past. Will never be fired.");
|
|
1606
|
+
}
|
|
1607
|
+
return date;
|
|
1671
1608
|
}
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
var __hasOwnProp$N = Object.prototype.hasOwnProperty;
|
|
1685
|
-
var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
|
|
1686
|
-
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1687
|
-
var __spreadValues$M = (a, b) => {
|
|
1688
|
-
for (var prop in b || (b = {}))
|
|
1689
|
-
if (__hasOwnProp$N.call(b, prop))
|
|
1690
|
-
__defNormalProp$N(a, prop, b[prop]);
|
|
1691
|
-
if (__getOwnPropSymbols$N)
|
|
1692
|
-
for (var prop of __getOwnPropSymbols$N(b)) {
|
|
1693
|
-
if (__propIsEnum$N.call(b, prop))
|
|
1694
|
-
__defNormalProp$N(a, prop, b[prop]);
|
|
1609
|
+
if (typeof i === "number" && i <= 0) {
|
|
1610
|
+
i = 1;
|
|
1611
|
+
}
|
|
1612
|
+
if (i === void 0) {
|
|
1613
|
+
return this.getNextDateFromWithValidation(date);
|
|
1614
|
+
} else {
|
|
1615
|
+
const dates = [];
|
|
1616
|
+
for (; i > 0; i--) {
|
|
1617
|
+
date = this.getNextDateFromWithValidation(date);
|
|
1618
|
+
dates.push(date);
|
|
1619
|
+
}
|
|
1620
|
+
return dates;
|
|
1695
1621
|
}
|
|
1696
|
-
return a;
|
|
1697
|
-
};
|
|
1698
|
-
var __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b));
|
|
1699
|
-
const Loading = ({ fullView = true }) => {
|
|
1700
|
-
const Wrapper = fullView ? FullView : React.Fragment;
|
|
1701
|
-
const props = fullView ? { className: "loading-full-view" } : {};
|
|
1702
|
-
return /* @__PURE__ */ React__namespace.default.createElement(Wrapper, __spreadProps$D(__spreadValues$M({}, props), { "data-testid": "loading" }), /* @__PURE__ */ React__namespace.default.createElement("div", { className: LoadingWrapper }, /* @__PURE__ */ React__namespace.default.createElement("div", { className: LoadingLine1 }), /* @__PURE__ */ React__namespace.default.createElement("div", { className: LoadingLine2 }), /* @__PURE__ */ React__namespace.default.createElement("div", { className: LoadingLine3 })));
|
|
1703
|
-
};
|
|
1704
|
-
|
|
1705
|
-
var __defProp$M = Object.defineProperty;
|
|
1706
|
-
var __defProps$C = Object.defineProperties;
|
|
1707
|
-
var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
|
|
1708
|
-
var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
|
|
1709
|
-
var __hasOwnProp$M = Object.prototype.hasOwnProperty;
|
|
1710
|
-
var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
|
|
1711
|
-
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, {
|
|
1712
|
-
enumerable: true,
|
|
1713
|
-
configurable: true,
|
|
1714
|
-
writable: true,
|
|
1715
|
-
value
|
|
1716
|
-
}) : obj[key] = value;
|
|
1717
|
-
var __spreadValues$L = (a, b) => {
|
|
1718
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$M.call(b, prop)) __defNormalProp$M(a, prop, b[prop]);
|
|
1719
|
-
if (__getOwnPropSymbols$M) for (var prop of __getOwnPropSymbols$M(b)) {
|
|
1720
|
-
if (__propIsEnum$M.call(b, prop)) __defNormalProp$M(a, prop, b[prop]);
|
|
1721
1622
|
}
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
for (var prop in source) if (__hasOwnProp$M.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
1728
|
-
if (source != null && __getOwnPropSymbols$M) for (var prop of __getOwnPropSymbols$M(source)) {
|
|
1729
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$M.call(source, prop)) target[prop] = source[prop];
|
|
1623
|
+
/**
|
|
1624
|
+
* Get the number of milliseconds in the future at which to fire our callbacks.
|
|
1625
|
+
*/
|
|
1626
|
+
getTimeout() {
|
|
1627
|
+
return Math.max(-1, this.sendAt().diff(dayjs__default.default()));
|
|
1730
1628
|
}
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1629
|
+
/**
|
|
1630
|
+
* writes out a cron string
|
|
1631
|
+
*/
|
|
1632
|
+
toString() {
|
|
1633
|
+
return this.toJSON().join(" ");
|
|
1634
|
+
}
|
|
1635
|
+
/**
|
|
1636
|
+
* Json representation of the parsed cron syntax.
|
|
1637
|
+
*/
|
|
1638
|
+
toJSON() {
|
|
1639
|
+
return TIME_UNITS.map((timeName) => {
|
|
1640
|
+
return this.wcOrAll(timeName);
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
setLastSendAt(date) {
|
|
1644
|
+
this.lastSendAt = date;
|
|
1645
|
+
}
|
|
1646
|
+
/*
|
|
1647
|
+
* Parse the cron syntax into something useful for selecting the next execution time.
|
|
1648
|
+
*
|
|
1649
|
+
* Algorithm:
|
|
1650
|
+
* - Replace preset
|
|
1651
|
+
* - Replace aliases in the source.
|
|
1652
|
+
* - Trim string and split for processing.
|
|
1653
|
+
* - Loop over split options (ms -> month):
|
|
1654
|
+
* - Get the value (or default) in the current position.
|
|
1655
|
+
* - Parse the value.
|
|
1656
|
+
*/
|
|
1657
|
+
parse(source) {
|
|
1658
|
+
source = source.toLowerCase();
|
|
1659
|
+
if (/^@/.test(source)) {
|
|
1660
|
+
const { key, args } = this.parsePrestArgs(source);
|
|
1661
|
+
const { expression, validation, step } = PRESETS[key];
|
|
1662
|
+
this.presetValidation = validation;
|
|
1663
|
+
this.presetArgs = args;
|
|
1664
|
+
this.presetStep = step == null ? void 0 : step(args);
|
|
1665
|
+
source = expression(args);
|
|
1768
1666
|
}
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1667
|
+
source = source.replace(/[a-z]{1,3}/gi, (alias) => {
|
|
1668
|
+
if (alias in ALIASES) {
|
|
1669
|
+
return ALIASES[alias].toString();
|
|
1670
|
+
}
|
|
1671
|
+
throw new Error(`Unknown alias: ${alias}`);
|
|
1672
|
+
});
|
|
1673
|
+
const units = source.trim().split(/\s+/);
|
|
1674
|
+
if (units.length < TIME_UNITS_LEN - 1) {
|
|
1675
|
+
throw new Error("Too few fields");
|
|
1775
1676
|
}
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
const inputDom = realDom.getElementsByClassName("ant-select-selection-search-input")[0];
|
|
1779
|
-
const item = realDom.getElementsByClassName("ant-select-selection-item")[0];
|
|
1780
|
-
inputDom && (placeholder || item) && inputDom.setAttribute("data-test", String(placeholder || item.textContent));
|
|
1677
|
+
if (units.length > TIME_UNITS_LEN) {
|
|
1678
|
+
throw new Error("Too many fields");
|
|
1781
1679
|
}
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
value: multiple ? input.value || [] : input.value || void 0,
|
|
1787
|
-
onChange: (e, option) => {
|
|
1788
|
-
var _a3, _b2;
|
|
1789
|
-
if (Array.isArray(e) && e.some(v => v === "")) {
|
|
1790
|
-
(_a3 = input.onChange) == null ? void 0 : _a3.call(input, [], option);
|
|
1791
|
-
} else {
|
|
1792
|
-
(_b2 = input.onChange) == null ? void 0 : _b2.call(input, e, option);
|
|
1793
|
-
}
|
|
1794
|
-
},
|
|
1795
|
-
onBlur: () => {
|
|
1796
|
-
var _a3;
|
|
1797
|
-
return (_a3 = input.onBlur) == null ? void 0 : _a3.call(input);
|
|
1798
|
-
},
|
|
1799
|
-
mode: multiple ? "multiple" : void 0,
|
|
1800
|
-
className: cs__default.default(SelectStyle$1, "select", className, limitExceeded && "select-event-none", _danger ? "select-error" : "", typo),
|
|
1801
|
-
"data-size": size,
|
|
1802
|
-
dropdownClassName: cs__default.default(dropdownClassName, limitExceeded && "display-none"),
|
|
1803
|
-
showSearch: multiple ? void 0 : typeof showSearch === "undefined" ? Boolean(onSearch) : showSearch,
|
|
1804
|
-
filterOption: onSearch === void 0 ? filterOption === void 0 ? (input2, option) => {
|
|
1805
|
-
const label = option == null ? void 0 : option.label;
|
|
1806
|
-
if (!label || typeof label !== "string") {
|
|
1807
|
-
return false;
|
|
1808
|
-
}
|
|
1809
|
-
return label.toLowerCase().includes(input2.toLowerCase());
|
|
1810
|
-
} : filterOption : false,
|
|
1811
|
-
onSearch: onSearch && ___default.default.debounce(onSearch, 100),
|
|
1812
|
-
onPopupScroll: e => {
|
|
1813
|
-
onPopupScroll == null ? void 0 : onPopupScroll(e);
|
|
1814
|
-
const el = e.currentTarget;
|
|
1815
|
-
if (el.scrollHeight - el.offsetHeight - el.scrollTop <= scrollBottomBuffer) {
|
|
1816
|
-
onScrollBottom == null ? void 0 : onScrollBottom();
|
|
1817
|
-
}
|
|
1818
|
-
},
|
|
1819
|
-
notFoundContent: loading ? /* @__PURE__ */React__namespace.default.createElement(Loading, null) : notFoundContent,
|
|
1820
|
-
dropdownRender: menu => /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, error || menu),
|
|
1821
|
-
loading,
|
|
1822
|
-
placeholder
|
|
1823
|
-
}), restProps), React__namespace.default.Children.map(children, child => {
|
|
1824
|
-
return reactIs.isElement(child) ? __spreadProps$C(__spreadValues$L({}, child), {
|
|
1825
|
-
props: __spreadProps$C(__spreadValues$L({}, child.props), {
|
|
1826
|
-
"data-test": child.props.value
|
|
1827
|
-
})
|
|
1828
|
-
}) : child;
|
|
1829
|
-
}));
|
|
1830
|
-
};
|
|
1831
|
-
|
|
1832
|
-
var __defProp$L = Object.defineProperty;
|
|
1833
|
-
var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
|
|
1834
|
-
var __hasOwnProp$L = Object.prototype.hasOwnProperty;
|
|
1835
|
-
var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
|
|
1836
|
-
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1837
|
-
var __spreadValues$K = (a, b) => {
|
|
1838
|
-
for (var prop in b || (b = {}))
|
|
1839
|
-
if (__hasOwnProp$L.call(b, prop))
|
|
1840
|
-
__defNormalProp$L(a, prop, b[prop]);
|
|
1841
|
-
if (__getOwnPropSymbols$L)
|
|
1842
|
-
for (var prop of __getOwnPropSymbols$L(b)) {
|
|
1843
|
-
if (__propIsEnum$L.call(b, prop))
|
|
1844
|
-
__defNormalProp$L(a, prop, b[prop]);
|
|
1845
|
-
}
|
|
1846
|
-
return a;
|
|
1847
|
-
};
|
|
1848
|
-
var __objRest$t = (source, exclude) => {
|
|
1849
|
-
var target = {};
|
|
1850
|
-
for (var prop in source)
|
|
1851
|
-
if (__hasOwnProp$L.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
1852
|
-
target[prop] = source[prop];
|
|
1853
|
-
if (source != null && __getOwnPropSymbols$L)
|
|
1854
|
-
for (var prop of __getOwnPropSymbols$L(source)) {
|
|
1855
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$L.call(source, prop))
|
|
1856
|
-
target[prop] = source[prop];
|
|
1680
|
+
const unitsLen = units.length;
|
|
1681
|
+
for (let i = 0; i < TIME_UNITS_LEN; i++) {
|
|
1682
|
+
const cur = units[i - (TIME_UNITS_LEN - unitsLen)] || PARSE_DEFAULTS[i];
|
|
1683
|
+
this.parseField(cur, TIME_UNITS[i], CONSTRAINTS[i]);
|
|
1857
1684
|
}
|
|
1858
|
-
return target;
|
|
1859
|
-
};
|
|
1860
|
-
const FieldsEnum = (_a) => {
|
|
1861
|
-
var _b = _a, {
|
|
1862
|
-
meta: __,
|
|
1863
|
-
enumValues,
|
|
1864
|
-
emptyLabel
|
|
1865
|
-
} = _b, restProps = __objRest$t(_b, [
|
|
1866
|
-
"meta",
|
|
1867
|
-
"enumValues",
|
|
1868
|
-
"emptyLabel"
|
|
1869
|
-
]);
|
|
1870
|
-
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(Select, __spreadValues$K({}, restProps), emptyLabel && /* @__PURE__ */ React__namespace.default.createElement(antd.Select.Option, { value: "" }, emptyLabel), enumValues.map((v) => {
|
|
1871
|
-
const item = typeof v === "string" ? { value: v, text: v } : v;
|
|
1872
|
-
return /* @__PURE__ */ React__namespace.default.createElement(
|
|
1873
|
-
antd.Select.Option,
|
|
1874
|
-
{
|
|
1875
|
-
key: item.value,
|
|
1876
|
-
value: item.value,
|
|
1877
|
-
label: item.text
|
|
1878
|
-
},
|
|
1879
|
-
item.text
|
|
1880
|
-
);
|
|
1881
|
-
})));
|
|
1882
|
-
};
|
|
1883
|
-
|
|
1884
|
-
var __defProp$K = Object.defineProperty;
|
|
1885
|
-
var __defProps$B = Object.defineProperties;
|
|
1886
|
-
var __getOwnPropDescs$B = Object.getOwnPropertyDescriptors;
|
|
1887
|
-
var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
|
|
1888
|
-
var __hasOwnProp$K = Object.prototype.hasOwnProperty;
|
|
1889
|
-
var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
|
|
1890
|
-
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, {
|
|
1891
|
-
enumerable: true,
|
|
1892
|
-
configurable: true,
|
|
1893
|
-
writable: true,
|
|
1894
|
-
value
|
|
1895
|
-
}) : obj[key] = value;
|
|
1896
|
-
var __spreadValues$J = (a, b) => {
|
|
1897
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$K.call(b, prop)) __defNormalProp$K(a, prop, b[prop]);
|
|
1898
|
-
if (__getOwnPropSymbols$K) for (var prop of __getOwnPropSymbols$K(b)) {
|
|
1899
|
-
if (__propIsEnum$K.call(b, prop)) __defNormalProp$K(a, prop, b[prop]);
|
|
1900
1685
|
}
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1686
|
+
parsePrestArgs(source) {
|
|
1687
|
+
const matchedArr = source.match(/(@[a-zA-Z-]+)(\((\S+)\)|)/);
|
|
1688
|
+
if (!matchedArr) {
|
|
1689
|
+
throw new Error(`Invalid preset ${source}`);
|
|
1690
|
+
}
|
|
1691
|
+
if (!matchedArr[3]) {
|
|
1692
|
+
return {
|
|
1693
|
+
key: matchedArr[1],
|
|
1694
|
+
args: []
|
|
1695
|
+
};
|
|
1696
|
+
}
|
|
1697
|
+
return {
|
|
1698
|
+
key: matchedArr[1],
|
|
1699
|
+
args: matchedArr[3].split(",")
|
|
1700
|
+
};
|
|
1909
1701
|
}
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1702
|
+
/*
|
|
1703
|
+
* Parse individual field from the cron syntax provided.
|
|
1704
|
+
*
|
|
1705
|
+
* Algorithm:
|
|
1706
|
+
* - Split field by commas aand check for wildcards to ensure proper user.
|
|
1707
|
+
* - Replace wildcard values with <low>-<high> boundaries.
|
|
1708
|
+
* - Split field by commas and then iterate over ranges inside field.
|
|
1709
|
+
* - If range matches pattern then map over matches using replace (to parse the range by the regex pattern)
|
|
1710
|
+
* - Starting with the lower bounds of the range iterate by step up to the upper bounds and toggle the CronTime field value flag on.
|
|
1711
|
+
*/
|
|
1712
|
+
parseField(value, type, constraints) {
|
|
1713
|
+
const typeObj = this.unitMap[type];
|
|
1714
|
+
let pointer;
|
|
1715
|
+
const low = constraints[0];
|
|
1716
|
+
const high = constraints[1];
|
|
1717
|
+
const fields = value.split(",");
|
|
1718
|
+
fields.forEach((field) => {
|
|
1719
|
+
const wildcardIndex = field.indexOf("*");
|
|
1720
|
+
if (wildcardIndex !== -1 && wildcardIndex !== 0) {
|
|
1721
|
+
throw new Error(`Field (${field}) has an invalid wildcard expression`);
|
|
1722
|
+
}
|
|
1723
|
+
});
|
|
1724
|
+
value = value.replace(RE_WILDCARDS, `${low}-${high}`);
|
|
1725
|
+
const allRanges = value.split(",");
|
|
1726
|
+
for (let i = 0; i < allRanges.length; i++) {
|
|
1727
|
+
if (allRanges[i].match(RE_RANGE)) {
|
|
1728
|
+
allRanges[i].replace(RE_RANGE, ($0, _lower, _upper, step) => {
|
|
1729
|
+
let lower = parseInt(_lower, 10);
|
|
1730
|
+
let upper = parseInt(_upper, 10) || void 0;
|
|
1731
|
+
const wasStepDefined = !isNaN(parseInt(step, 10));
|
|
1732
|
+
if (step === "0") {
|
|
1733
|
+
throw new Error(`Field (${type}) has a step of zero`);
|
|
1734
|
+
}
|
|
1735
|
+
step = parseInt(step, 10) || 1;
|
|
1736
|
+
if (upper && lower > upper) {
|
|
1737
|
+
throw new Error(`Field (${type}) has an invalid range`);
|
|
1738
|
+
}
|
|
1739
|
+
const outOfRangeError = lower < low || upper && upper > high || !upper && lower > high;
|
|
1740
|
+
if (outOfRangeError) {
|
|
1741
|
+
throw new Error(`Field value (${value}) is out of range`);
|
|
1742
|
+
}
|
|
1743
|
+
lower = Math.min(Math.max(low, ~~Math.abs(lower)), high);
|
|
1744
|
+
if (upper) {
|
|
1745
|
+
upper = Math.min(high, ~~Math.abs(upper));
|
|
1746
|
+
} else {
|
|
1747
|
+
upper = wasStepDefined ? high : lower;
|
|
1748
|
+
}
|
|
1749
|
+
pointer = lower;
|
|
1750
|
+
do {
|
|
1751
|
+
typeObj[pointer] = true;
|
|
1752
|
+
pointer += step;
|
|
1753
|
+
} while (pointer <= upper);
|
|
1754
|
+
return "";
|
|
1755
|
+
});
|
|
1756
|
+
} else {
|
|
1757
|
+
throw new Error(`Field (${type}) cannot be parsed`);
|
|
1758
|
+
}
|
|
1759
|
+
}
|
|
1932
1760
|
}
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
"data-test": props.name,
|
|
1954
|
-
suffix: controls ? "" : suffix,
|
|
1955
|
-
prefix,
|
|
1956
|
-
className: cs__default.default(className, InputStyle, typo, error ? "error" : "")
|
|
1957
|
-
}));
|
|
1958
|
-
};
|
|
1959
|
-
|
|
1960
|
-
var __defProp$J = Object.defineProperty;
|
|
1961
|
-
var __defProps$A = Object.defineProperties;
|
|
1962
|
-
var __getOwnPropDescs$A = Object.getOwnPropertyDescriptors;
|
|
1963
|
-
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
1964
|
-
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
1965
|
-
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
1966
|
-
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
1967
|
-
var __spreadValues$I = (a, b) => {
|
|
1968
|
-
for (var prop in b || (b = {}))
|
|
1969
|
-
if (__hasOwnProp$J.call(b, prop))
|
|
1970
|
-
__defNormalProp$J(a, prop, b[prop]);
|
|
1971
|
-
if (__getOwnPropSymbols$J)
|
|
1972
|
-
for (var prop of __getOwnPropSymbols$J(b)) {
|
|
1973
|
-
if (__propIsEnum$J.call(b, prop))
|
|
1974
|
-
__defNormalProp$J(a, prop, b[prop]);
|
|
1761
|
+
/*
|
|
1762
|
+
* Ensure that the syntax parsed correctly and correct the specified values if needed.
|
|
1763
|
+
*/
|
|
1764
|
+
verifyParse() {
|
|
1765
|
+
const months = Object.keys(this.unitMap.month);
|
|
1766
|
+
const dom = Object.keys(this.unitMap.dayOfMonth);
|
|
1767
|
+
let ok = false;
|
|
1768
|
+
let lastWrongMonth = NaN;
|
|
1769
|
+
for (let i = 0; i < months.length; i++) {
|
|
1770
|
+
const m = months[i];
|
|
1771
|
+
const con = MONTH_CONSTRAINTS[parseInt(m, 10)];
|
|
1772
|
+
for (const day of dom) {
|
|
1773
|
+
if (parseInt(day, 10) <= con) {
|
|
1774
|
+
ok = true;
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
if (!ok) {
|
|
1778
|
+
lastWrongMonth = parseInt(m, 10);
|
|
1779
|
+
console.warn(`Month '${m}' is limited to '${con}' days.`);
|
|
1780
|
+
}
|
|
1975
1781
|
}
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
for (var prop of __getOwnPropSymbols$J(source)) {
|
|
1986
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop))
|
|
1987
|
-
target[prop] = source[prop];
|
|
1782
|
+
if (!ok) {
|
|
1783
|
+
const notOkCon = MONTH_CONSTRAINTS[lastWrongMonth];
|
|
1784
|
+
for (const notOkDay of dom) {
|
|
1785
|
+
if (parseInt(notOkDay, 10) > notOkCon) {
|
|
1786
|
+
delete this.unitMap.dayOfMonth[notOkDay];
|
|
1787
|
+
const fixedDay = Number(notOkDay) % notOkCon;
|
|
1788
|
+
this.unitMap.dayOfMonth[fixedDay] = true;
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1988
1791
|
}
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
meta,
|
|
1995
|
-
onBlur,
|
|
1996
|
-
autoComplete = "off"
|
|
1997
|
-
} = _b, props = __objRest$r(_b, [
|
|
1998
|
-
"input",
|
|
1999
|
-
"meta",
|
|
2000
|
-
"onBlur",
|
|
2001
|
-
"autoComplete"
|
|
2002
|
-
]);
|
|
2003
|
-
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
2004
|
-
InputNumber,
|
|
2005
|
-
__spreadValues$I(__spreadProps$A(__spreadValues$I({}, input), {
|
|
2006
|
-
onBlur: (e) => onBlur ? onBlur(input, e) : input.onBlur(e),
|
|
2007
|
-
autoComplete,
|
|
2008
|
-
error: meta.touched && (meta.error || !meta.dirtySinceLastSubmit && meta.submitError)
|
|
2009
|
-
}), props)
|
|
2010
|
-
));
|
|
2011
|
-
};
|
|
2012
|
-
|
|
2013
|
-
var __defProp$I = Object.defineProperty;
|
|
2014
|
-
var __defProps$z = Object.defineProperties;
|
|
2015
|
-
var __getOwnPropDescs$z = Object.getOwnPropertyDescriptors;
|
|
2016
|
-
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
2017
|
-
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
2018
|
-
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
2019
|
-
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2020
|
-
var __spreadValues$H = (a, b) => {
|
|
2021
|
-
for (var prop in b || (b = {}))
|
|
2022
|
-
if (__hasOwnProp$I.call(b, prop))
|
|
2023
|
-
__defNormalProp$I(a, prop, b[prop]);
|
|
2024
|
-
if (__getOwnPropSymbols$I)
|
|
2025
|
-
for (var prop of __getOwnPropSymbols$I(b)) {
|
|
2026
|
-
if (__propIsEnum$I.call(b, prop))
|
|
2027
|
-
__defNormalProp$I(a, prop, b[prop]);
|
|
2028
|
-
}
|
|
2029
|
-
return a;
|
|
2030
|
-
};
|
|
2031
|
-
var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b));
|
|
2032
|
-
var __objRest$q = (source, exclude) => {
|
|
2033
|
-
var target = {};
|
|
2034
|
-
for (var prop in source)
|
|
2035
|
-
if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2036
|
-
target[prop] = source[prop];
|
|
2037
|
-
if (source != null && __getOwnPropSymbols$I)
|
|
2038
|
-
for (var prop of __getOwnPropSymbols$I(source)) {
|
|
2039
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
|
|
2040
|
-
target[prop] = source[prop];
|
|
1792
|
+
}
|
|
1793
|
+
getNextDateFromWithValidation(start) {
|
|
1794
|
+
let nextDate = this.getNextDateFrom(start);
|
|
1795
|
+
if (this.startAt && nextDate.isBefore(this.startAt)) {
|
|
1796
|
+
return this.getNextDateFromWithValidation(nextDate);
|
|
2041
1797
|
}
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
} = _b, props = __objRest$q(_b, [
|
|
2050
|
-
"className",
|
|
2051
|
-
"error",
|
|
2052
|
-
"size"
|
|
2053
|
-
]);
|
|
2054
|
-
const typo = {
|
|
2055
|
-
large: Typo.Label.l2_regular,
|
|
2056
|
-
middle: Typo.Label.l3_regular,
|
|
2057
|
-
small: Typo.Label.l4_regular
|
|
2058
|
-
}[size];
|
|
2059
|
-
return /* @__PURE__ */ React__namespace.default.createElement(
|
|
2060
|
-
antd.Input,
|
|
2061
|
-
__spreadProps$z(__spreadValues$H({}, props), {
|
|
2062
|
-
size,
|
|
2063
|
-
"data-test": props.name,
|
|
2064
|
-
className: cs__default.default(className, InputStyle, typo, error ? "error" : "")
|
|
2065
|
-
})
|
|
2066
|
-
);
|
|
2067
|
-
};
|
|
2068
|
-
|
|
2069
|
-
var __defProp$H = Object.defineProperty;
|
|
2070
|
-
var __defProps$y = Object.defineProperties;
|
|
2071
|
-
var __getOwnPropDescs$y = Object.getOwnPropertyDescriptors;
|
|
2072
|
-
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
2073
|
-
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
2074
|
-
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
2075
|
-
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2076
|
-
var __spreadValues$G = (a, b) => {
|
|
2077
|
-
for (var prop in b || (b = {}))
|
|
2078
|
-
if (__hasOwnProp$H.call(b, prop))
|
|
2079
|
-
__defNormalProp$H(a, prop, b[prop]);
|
|
2080
|
-
if (__getOwnPropSymbols$H)
|
|
2081
|
-
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
2082
|
-
if (__propIsEnum$H.call(b, prop))
|
|
2083
|
-
__defNormalProp$H(a, prop, b[prop]);
|
|
1798
|
+
const valid = this.presetValidation ? this.presetValidation({
|
|
1799
|
+
date: nextDate,
|
|
1800
|
+
lastSendAt: this.lastSendAt,
|
|
1801
|
+
args: this.presetArgs || []
|
|
1802
|
+
}) : true;
|
|
1803
|
+
if (valid) {
|
|
1804
|
+
return nextDate;
|
|
2084
1805
|
}
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
|
|
2088
|
-
var __objRest$p = (source, exclude) => {
|
|
2089
|
-
var target = {};
|
|
2090
|
-
for (var prop in source)
|
|
2091
|
-
if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2092
|
-
target[prop] = source[prop];
|
|
2093
|
-
if (source != null && __getOwnPropSymbols$H)
|
|
2094
|
-
for (var prop of __getOwnPropSymbols$H(source)) {
|
|
2095
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
|
|
2096
|
-
target[prop] = source[prop];
|
|
1806
|
+
if (this.presetStep) {
|
|
1807
|
+
nextDate = nextDate.add(this.presetStep, "ms");
|
|
2097
1808
|
}
|
|
2098
|
-
|
|
2099
|
-
};
|
|
2100
|
-
const FieldsInt = (_a) => {
|
|
2101
|
-
var _b = _a, {
|
|
2102
|
-
input,
|
|
2103
|
-
meta,
|
|
2104
|
-
onBlur,
|
|
2105
|
-
autoComplete = "off",
|
|
2106
|
-
supportNegativeValue = false
|
|
2107
|
-
} = _b, props = __objRest$p(_b, [
|
|
2108
|
-
"input",
|
|
2109
|
-
"meta",
|
|
2110
|
-
"onBlur",
|
|
2111
|
-
"autoComplete",
|
|
2112
|
-
"supportNegativeValue"
|
|
2113
|
-
]);
|
|
2114
|
-
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
2115
|
-
Input,
|
|
2116
|
-
__spreadValues$G(__spreadProps$y(__spreadValues$G({}, input), {
|
|
2117
|
-
onChange: (e) => {
|
|
2118
|
-
const value = e.currentTarget.value;
|
|
2119
|
-
if (supportNegativeValue) {
|
|
2120
|
-
if (value === "" || value === "-") {
|
|
2121
|
-
input.onChange(value);
|
|
2122
|
-
} else if (/^(-)?\d+$/.test(value)) {
|
|
2123
|
-
const v = parseInt(value);
|
|
2124
|
-
input.onChange(!Number.isNaN(v) ? v : void 0);
|
|
2125
|
-
}
|
|
2126
|
-
} else if (value === "" || /^\d+$/.test(value)) {
|
|
2127
|
-
const v = parseInt(value);
|
|
2128
|
-
input.onChange(!Number.isNaN(v) ? v : void 0);
|
|
2129
|
-
}
|
|
2130
|
-
},
|
|
2131
|
-
onBlur: (e) => {
|
|
2132
|
-
onBlur ? onBlur(input, e) : input.onBlur(e);
|
|
2133
|
-
},
|
|
2134
|
-
autoComplete,
|
|
2135
|
-
error: meta.touched && (meta.error || !meta.dirtySinceLastSubmit && meta.submitError)
|
|
2136
|
-
}), props)
|
|
2137
|
-
));
|
|
2138
|
-
};
|
|
2139
|
-
|
|
2140
|
-
const formatterInteger = (value) => {
|
|
2141
|
-
const reg = /^\.|[^\d]/g;
|
|
2142
|
-
if (typeof value === "string") {
|
|
2143
|
-
return !isNaN(Number(value.replace(reg, ""))) ? value.replace(reg, "") : "";
|
|
2144
|
-
} else if (typeof value === "number") {
|
|
2145
|
-
return !isNaN(value) ? String(value).replace(reg, "") : "";
|
|
2146
|
-
} else {
|
|
2147
|
-
return "";
|
|
1809
|
+
return this.getNextDateFromWithValidation(nextDate);
|
|
2148
1810
|
}
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
1811
|
+
/**
|
|
1812
|
+
* Get next date matching the specified cron time.
|
|
1813
|
+
*
|
|
1814
|
+
* Algorithm:
|
|
1815
|
+
* - Start with a start date and a parsed crontime.
|
|
1816
|
+
* - Loop until 5 seconds have passed, or we found the next date.
|
|
1817
|
+
* - Within the loop:
|
|
1818
|
+
* - If it took longer than 5 seconds to select a date, throw an exception.
|
|
1819
|
+
* - Find the next month to run at.
|
|
1820
|
+
* - Find the next day of the month to run at.
|
|
1821
|
+
* - Find the next day of the week to run at.
|
|
1822
|
+
* - Find the next hour to run at.
|
|
1823
|
+
* - Find the next minute to run at.
|
|
1824
|
+
* - Find the next second to run at.
|
|
1825
|
+
* - Check that the chosen time does not equal the current execution.
|
|
1826
|
+
* - Return the selected date object.
|
|
1827
|
+
*/
|
|
1828
|
+
getNextDateFrom(start) {
|
|
1829
|
+
let date = start;
|
|
1830
|
+
const firstDate = start;
|
|
1831
|
+
if (date.millisecond() > 0) {
|
|
1832
|
+
date = date.millisecond(0).second(date.second() + 1);
|
|
1833
|
+
}
|
|
1834
|
+
const timeout = Date.now() + 5e3;
|
|
1835
|
+
while (true) {
|
|
1836
|
+
const diff = date.diff(start);
|
|
1837
|
+
if (Date.now() > timeout) {
|
|
1838
|
+
throw new Error(
|
|
1839
|
+
`Something went wrong. cron reached maximum iterations.
|
|
1840
|
+
Cron String: ${this} - UTC offset: ${date} - current Date: ${dayjs__default.default().toString()}`
|
|
1841
|
+
);
|
|
1842
|
+
}
|
|
1843
|
+
if (!(date.month() - 1 in this.unitMap.month) && Object.keys(this.unitMap.month).length !== 12) {
|
|
1844
|
+
date = date.add(1, "month").day(1).hour(0).minute(0).second(0);
|
|
1845
|
+
continue;
|
|
1846
|
+
}
|
|
1847
|
+
if (!(date.date() in this.unitMap.dayOfMonth) && Object.keys(this.unitMap.dayOfMonth).length !== 31 && !(date.day() in this.unitMap.dayOfWeek && Object.keys(this.unitMap.dayOfWeek).length !== 7)) {
|
|
1848
|
+
date = date.add(1, "day").hour(0).minute(0).second(0);
|
|
1849
|
+
continue;
|
|
1850
|
+
}
|
|
1851
|
+
if (!(date.day() in this.unitMap.dayOfWeek) && Object.keys(this.unitMap.dayOfWeek).length !== 7 && !(date.date() in this.unitMap.dayOfMonth && Object.keys(this.unitMap.dayOfMonth).length !== 31)) {
|
|
1852
|
+
date = date.add(1, "day").hour(0).minute(0).second(0);
|
|
1853
|
+
continue;
|
|
1854
|
+
}
|
|
1855
|
+
if (!(date.hour() in this.unitMap.hour) && Object.keys(this.unitMap.hour).length !== 24) {
|
|
1856
|
+
date = date.hour(date.hour() === 23 && diff > 864e5 ? 0 : date.hour() + 1).minute(0).second(0);
|
|
1857
|
+
continue;
|
|
1858
|
+
}
|
|
1859
|
+
if (!(date.minute() in this.unitMap.minute) && Object.keys(this.unitMap.minute).length !== 60) {
|
|
1860
|
+
date = date.minute(
|
|
1861
|
+
date.minute() === 59 && diff > 36e5 ? 0 : date.minute() + 1
|
|
1862
|
+
).second(0);
|
|
1863
|
+
continue;
|
|
1864
|
+
}
|
|
1865
|
+
if (!(date.second() in this.unitMap.second) && Object.keys(this.unitMap.second).length !== 60) {
|
|
1866
|
+
date = date.second(
|
|
1867
|
+
date.second() === 59 && diff > 6e4 ? 0 : date.second() + 1
|
|
1868
|
+
);
|
|
1869
|
+
continue;
|
|
1870
|
+
}
|
|
1871
|
+
if (date.isSame(firstDate)) {
|
|
1872
|
+
date = date.add(1, "second");
|
|
1873
|
+
continue;
|
|
1874
|
+
}
|
|
1875
|
+
break;
|
|
1876
|
+
}
|
|
1877
|
+
return date;
|
|
2167
1878
|
}
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
1879
|
+
/**
|
|
1880
|
+
* wildcard, or all params in array (for to string)
|
|
1881
|
+
*/
|
|
1882
|
+
wcOrAll(type) {
|
|
1883
|
+
if (this.hasAll(type)) {
|
|
1884
|
+
return "*";
|
|
1885
|
+
}
|
|
1886
|
+
const all = [];
|
|
1887
|
+
for (const time in this.unitMap[type]) {
|
|
1888
|
+
all.push(time);
|
|
1889
|
+
}
|
|
1890
|
+
return all.join(",");
|
|
2176
1891
|
}
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
const _exp5 = () => props => `"${props.prefix ? props.prefix : ""}"`;
|
|
2186
|
-
const _exp6 = () => ({
|
|
2187
|
-
prefix
|
|
2188
|
-
}) => prefix ? "flex" : "none";
|
|
2189
|
-
const AntdIntStyled = /*#__PURE__*/react$1.styled(_exp$2())({
|
|
2190
|
-
name: "AntdIntStyled",
|
|
2191
|
-
class: "at4ovwe",
|
|
2192
|
-
propsAsIs: true,
|
|
2193
|
-
vars: {
|
|
2194
|
-
"at4ovwe-0": [_exp2()],
|
|
2195
|
-
"at4ovwe-1": [_exp3()],
|
|
2196
|
-
"at4ovwe-2": [_exp4()],
|
|
2197
|
-
"at4ovwe-3": [_exp5()],
|
|
2198
|
-
"at4ovwe-4": [_exp6()]
|
|
1892
|
+
hasAll(type) {
|
|
1893
|
+
const constraints = CONSTRAINTS[TIME_UNITS.indexOf(type)];
|
|
1894
|
+
for (let i = constraints[0], n = constraints[1]; i < n; i++) {
|
|
1895
|
+
if (!(i in this.unitMap[type])) {
|
|
1896
|
+
return false;
|
|
1897
|
+
}
|
|
1898
|
+
}
|
|
1899
|
+
return true;
|
|
2199
1900
|
}
|
|
2200
|
-
}
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
large: Typo.Label.l2_regular,
|
|
2216
|
-
middle: Typo.Label.l3_regular,
|
|
2217
|
-
small: Typo.Label.l4_regular
|
|
2218
|
-
}[size];
|
|
2219
|
-
return /* @__PURE__ */React__namespace.default.createElement(AntdIntStyled, __spreadProps$x(__spreadValues$F({}, props), {
|
|
2220
|
-
size,
|
|
2221
|
-
formatter: formatterInteger,
|
|
2222
|
-
parser: formatterInteger,
|
|
2223
|
-
min,
|
|
2224
|
-
max,
|
|
2225
|
-
controls,
|
|
2226
|
-
"data-test": props.name,
|
|
2227
|
-
suffix: controls ? "" : suffix,
|
|
2228
|
-
prefix,
|
|
2229
|
-
className: cs__default.default(className, InputStyle, typo, error ? "error" : "")
|
|
2230
|
-
}));
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
const MonthText = {
|
|
1904
|
+
"1": "January",
|
|
1905
|
+
"2": "February",
|
|
1906
|
+
"3": "March",
|
|
1907
|
+
"4": "April",
|
|
1908
|
+
"5": "May",
|
|
1909
|
+
"6": "June",
|
|
1910
|
+
"7": "July",
|
|
1911
|
+
"8": "August",
|
|
1912
|
+
"9": "September",
|
|
1913
|
+
"10": "October",
|
|
1914
|
+
"11": "November",
|
|
1915
|
+
"12": "December"
|
|
2231
1916
|
};
|
|
1917
|
+
function getCalendarTitle(month, t, i18n2) {
|
|
1918
|
+
if (i18n2.language === parrot.ParrotLngs.zh) {
|
|
1919
|
+
return `${month} ${t("common.month")}`;
|
|
1920
|
+
}
|
|
1921
|
+
return MonthText[month];
|
|
1922
|
+
}
|
|
2232
1923
|
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
1924
|
+
const CronCalendarWrapper = "clm1wy1";
|
|
1925
|
+
const Title = "t1tsm00v";
|
|
1926
|
+
const Control = "c167wnad";
|
|
1927
|
+
const Cell = "cxhf7dh";
|
|
1928
|
+
const CronCalendar = ({
|
|
1929
|
+
plans
|
|
1930
|
+
}) => {
|
|
1931
|
+
const {
|
|
1932
|
+
t,
|
|
1933
|
+
i18n
|
|
1934
|
+
} = useParrotTranslation();
|
|
1935
|
+
const [value, setValue] = React.useState(moment__default.default());
|
|
1936
|
+
const days = React.useMemo(() => {
|
|
1937
|
+
const sendAt = [];
|
|
1938
|
+
const lastDayOfMonth = dayjs__default.default(value.valueOf()).endOf("month");
|
|
1939
|
+
for (const plan of plans) {
|
|
1940
|
+
if (plan.empty) {
|
|
1941
|
+
continue;
|
|
1942
|
+
}
|
|
1943
|
+
const cronTime = new CronTime(plan.expression, plan.startAt);
|
|
1944
|
+
let current = cronTime["getNextDateFromWithValidation"](dayjs__default.default());
|
|
1945
|
+
while (current.isBefore(lastDayOfMonth)) {
|
|
1946
|
+
sendAt.push(current);
|
|
1947
|
+
cronTime.setLastSendAt(current);
|
|
1948
|
+
current = cronTime["getNextDateFromWithValidation"](current);
|
|
1949
|
+
}
|
|
1950
|
+
}
|
|
1951
|
+
return sendAt;
|
|
1952
|
+
}, [value, plans]);
|
|
1953
|
+
return /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
1954
|
+
className: CronCalendarWrapper
|
|
1955
|
+
}, /* @__PURE__ */React__namespace.default.createElement(Calendar, {
|
|
1956
|
+
onChange: setValue,
|
|
1957
|
+
value,
|
|
1958
|
+
fullscreen: false,
|
|
1959
|
+
headerRender: ({
|
|
1960
|
+
value: value2,
|
|
1961
|
+
onChange
|
|
1962
|
+
}) => /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
1963
|
+
className: linaria.cx(Title, Typo.Label.l4_bold)
|
|
1964
|
+
}, t("components.generate_date_preview")), /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
1965
|
+
className: linaria.cx(Control, Typo.Label.l4_regular)
|
|
1966
|
+
}, /* @__PURE__ */React__namespace.default.createElement(icons.LeftOutlined, {
|
|
1967
|
+
onClick: () => onChange(value2.clone().subtract(1, "month"))
|
|
1968
|
+
}), t("components.date_with_year_and_month", {
|
|
1969
|
+
year: value2.format("YYYY"),
|
|
1970
|
+
month: getCalendarTitle(value2.format("M"), t, i18n),
|
|
1971
|
+
interpolation: {
|
|
1972
|
+
escapeValue: false
|
|
1973
|
+
}
|
|
1974
|
+
}), /* @__PURE__ */React__namespace.default.createElement(icons.RightOutlined, {
|
|
1975
|
+
onClick: () => onChange(value2.clone().add(1, "month"))
|
|
1976
|
+
}))),
|
|
1977
|
+
dateFullCellRender: date => {
|
|
1978
|
+
const activeDays = days.filter(d => d.startOf("day").isSame(dayjs__default.default(date.valueOf()).startOf("day")));
|
|
1979
|
+
return /* @__PURE__ */React__namespace.default.createElement(Tooltip, {
|
|
1980
|
+
title: activeDays.length === 0 ? null : activeDays.length === 1 ?
|
|
1981
|
+
// TODO pass the callback via props and remove this
|
|
1982
|
+
t("components.will_generate_one_reporte_with_date_and_time", {
|
|
1983
|
+
date: activeDays[0].format("YYYY/M/D"),
|
|
1984
|
+
time: activeDays[0].format("HH:mm"),
|
|
1985
|
+
interpolation: {
|
|
1986
|
+
escapeValue: false
|
|
1987
|
+
}
|
|
1988
|
+
}) : /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, t("components.will_generate_report_will_date_and_count", {
|
|
1989
|
+
date: activeDays[0].format("YYYY/M/D"),
|
|
1990
|
+
count: activeDays.length,
|
|
1991
|
+
interpolation: {
|
|
1992
|
+
escapeValue: false
|
|
1993
|
+
}
|
|
1994
|
+
}), /* @__PURE__ */React__namespace.default.createElement("br", null), activeDays.map((d, idx) => /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
1995
|
+
key: idx
|
|
1996
|
+
}, d.format("HH:mm"), /* @__PURE__ */React__namespace.default.createElement("br", null)))),
|
|
1997
|
+
placement: "bottom"
|
|
1998
|
+
}, /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
1999
|
+
className: linaria.cx(Cell, Typo.Label.l4_regular, activeDays.length > 0 && "active"),
|
|
2000
|
+
title: ""
|
|
2001
|
+
}, date.date(), /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
2002
|
+
className: "dots"
|
|
2003
|
+
}, activeDays.length < 4 && activeDays.map((_, idx) => /* @__PURE__ */React__namespace.default.createElement("span", {
|
|
2004
|
+
className: "dot",
|
|
2005
|
+
key: idx
|
|
2006
|
+
})), activeDays.length >= 4 && /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
2007
|
+
className: "bar"
|
|
2008
|
+
}))));
|
|
2248
2009
|
}
|
|
2010
|
+
}));
|
|
2011
|
+
};
|
|
2012
|
+
|
|
2013
|
+
const HoverableElement = (props) => {
|
|
2014
|
+
const { className, hover = false, icon, hoverEle } = props;
|
|
2015
|
+
if (hover) {
|
|
2016
|
+
return hoverEle != null ? React__namespace.default.cloneElement(hoverEle, { className }) : null;
|
|
2017
|
+
}
|
|
2018
|
+
return icon != null ? React__namespace.default.cloneElement(icon, { className }) : null;
|
|
2019
|
+
};
|
|
2020
|
+
|
|
2021
|
+
var __defProp$O = Object.defineProperty;
|
|
2022
|
+
var __getOwnPropSymbols$Q = Object.getOwnPropertySymbols;
|
|
2023
|
+
var __hasOwnProp$Q = Object.prototype.hasOwnProperty;
|
|
2024
|
+
var __propIsEnum$Q = Object.prototype.propertyIsEnumerable;
|
|
2025
|
+
var __defNormalProp$O = (obj, key, value) => key in obj ? __defProp$O(obj, key, {
|
|
2026
|
+
enumerable: true,
|
|
2027
|
+
configurable: true,
|
|
2028
|
+
writable: true,
|
|
2029
|
+
value
|
|
2030
|
+
}) : obj[key] = value;
|
|
2031
|
+
var __spreadValues$O = (a, b) => {
|
|
2032
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$Q.call(b, prop)) __defNormalProp$O(a, prop, b[prop]);
|
|
2033
|
+
if (__getOwnPropSymbols$Q) for (var prop of __getOwnPropSymbols$Q(b)) {
|
|
2034
|
+
if (__propIsEnum$Q.call(b, prop)) __defNormalProp$O(a, prop, b[prop]);
|
|
2035
|
+
}
|
|
2249
2036
|
return a;
|
|
2250
2037
|
};
|
|
2251
|
-
var
|
|
2252
|
-
var __objRest$n = (source, exclude) => {
|
|
2038
|
+
var __objRest$y = (source, exclude) => {
|
|
2253
2039
|
var target = {};
|
|
2254
|
-
for (var prop in source)
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
for (var prop of __getOwnPropSymbols$F(source)) {
|
|
2259
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop))
|
|
2260
|
-
target[prop] = source[prop];
|
|
2261
|
-
}
|
|
2040
|
+
for (var prop in source) if (__hasOwnProp$Q.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
2041
|
+
if (source != null && __getOwnPropSymbols$Q) for (var prop of __getOwnPropSymbols$Q(source)) {
|
|
2042
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$Q.call(source, prop)) target[prop] = source[prop];
|
|
2043
|
+
}
|
|
2262
2044
|
return target;
|
|
2263
2045
|
};
|
|
2264
|
-
const
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
onBlur
|
|
2269
|
-
} = _b, props = __objRest$n(_b, [
|
|
2270
|
-
"meta",
|
|
2271
|
-
"input",
|
|
2272
|
-
"onBlur"
|
|
2273
|
-
]);
|
|
2274
|
-
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
2275
|
-
InputInteger,
|
|
2276
|
-
__spreadProps$w(__spreadValues$E(__spreadValues$E({}, props), input), {
|
|
2277
|
-
onBlur: (e) => onBlur ? onBlur(input, e) : input.onBlur(e),
|
|
2278
|
-
error: meta.touched && (meta.error || !meta.dirtySinceLastSubmit && meta.submitError)
|
|
2279
|
-
})
|
|
2280
|
-
));
|
|
2281
|
-
};
|
|
2282
|
-
|
|
2283
|
-
const InputTagItem = /*#__PURE__*/react$1.styled('span')({
|
|
2284
|
-
name: "InputTagItem",
|
|
2285
|
-
class: "iap75of",
|
|
2286
|
-
propsAsIs: false
|
|
2287
|
-
});
|
|
2288
|
-
|
|
2289
|
-
const transformToArray = (stringOrArray) => {
|
|
2290
|
-
return stringOrArray instanceof Array ? stringOrArray : [stringOrArray];
|
|
2046
|
+
const ButtonStyle$1 = "buj61ew";
|
|
2047
|
+
const NoPadding = "nchllas";
|
|
2048
|
+
const isAntdButtonTypes = type => {
|
|
2049
|
+
return Boolean(type && ["default", "primary", "ghost", "dashed", "link", "text"].includes(type));
|
|
2291
2050
|
};
|
|
2292
|
-
const
|
|
2293
|
-
const
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
const
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2051
|
+
const Button = React__namespace.default.forwardRef((props, ref) => {
|
|
2052
|
+
const _a = props,
|
|
2053
|
+
{
|
|
2054
|
+
type,
|
|
2055
|
+
className,
|
|
2056
|
+
children,
|
|
2057
|
+
prefixIcon,
|
|
2058
|
+
hoverPrefixIcon,
|
|
2059
|
+
suffixIcon,
|
|
2060
|
+
hoverSuffixIcon,
|
|
2061
|
+
onMouseEnter,
|
|
2062
|
+
onMouseLeave,
|
|
2063
|
+
size = "middle"
|
|
2064
|
+
} = _a,
|
|
2065
|
+
restProps = __objRest$y(_a, ["type", "className", "children", "prefixIcon", "hoverPrefixIcon", "suffixIcon", "hoverSuffixIcon", "onMouseEnter", "onMouseLeave", "size"]);
|
|
2066
|
+
const [status, setStatus] = React.useState("normal");
|
|
2067
|
+
const hasIcon = prefixIcon || suffixIcon;
|
|
2068
|
+
const hasHoverIcon = hoverPrefixIcon || hoverSuffixIcon;
|
|
2069
|
+
const onlyIcon = !children && (prefixIcon || suffixIcon);
|
|
2070
|
+
return /* @__PURE__ */React__namespace.default.createElement(antd.Button, __spreadValues$O({
|
|
2071
|
+
ref,
|
|
2072
|
+
className: cs__default.default(className, ButtonStyle$1, type === "link" && NoPadding, size === "large" && Typo.Label.l1_regular_title, size === "middle" && Typo.Label.l2_regular_title, size === "small" && Typo.Label.l3_regular_title, type && `ant-btn-${type}`, onlyIcon && "ant-btn-icon-only"),
|
|
2073
|
+
type: isAntdButtonTypes(type) ? type : void 0,
|
|
2074
|
+
onMouseEnter: e => {
|
|
2075
|
+
onMouseEnter == null ? void 0 : onMouseEnter(e);
|
|
2076
|
+
if (hasIcon && hasHoverIcon) {
|
|
2077
|
+
setStatus("hover");
|
|
2078
|
+
}
|
|
2079
|
+
},
|
|
2080
|
+
onMouseLeave: e => {
|
|
2081
|
+
onMouseLeave == null ? void 0 : onMouseLeave(e);
|
|
2082
|
+
if (hasIcon && hasHoverIcon) {
|
|
2083
|
+
setStatus("normal");
|
|
2084
|
+
}
|
|
2085
|
+
},
|
|
2086
|
+
size
|
|
2087
|
+
}, restProps), prefixIcon && /* @__PURE__ */React__namespace.default.createElement(HoverableElement, {
|
|
2088
|
+
icon: prefixIcon,
|
|
2089
|
+
hoverEle: hoverPrefixIcon,
|
|
2090
|
+
hover: status === "hover",
|
|
2091
|
+
className: !onlyIcon ? "button-prefix-icon" : ""
|
|
2092
|
+
}), children, suffixIcon && /* @__PURE__ */React__namespace.default.createElement(HoverableElement, {
|
|
2093
|
+
icon: suffixIcon,
|
|
2094
|
+
hoverEle: hoverSuffixIcon,
|
|
2095
|
+
hover: status === "hover",
|
|
2096
|
+
className: !onlyIcon ? "button-suffix-icon" : ""
|
|
2097
|
+
}));
|
|
2098
|
+
});
|
|
2099
|
+
|
|
2100
|
+
var __defProp$N = Object.defineProperty;
|
|
2101
|
+
var __defProps$E = Object.defineProperties;
|
|
2102
|
+
var __getOwnPropDescs$E = Object.getOwnPropertyDescriptors;
|
|
2103
|
+
var __getOwnPropSymbols$P = Object.getOwnPropertySymbols;
|
|
2104
|
+
var __hasOwnProp$P = Object.prototype.hasOwnProperty;
|
|
2105
|
+
var __propIsEnum$P = Object.prototype.propertyIsEnumerable;
|
|
2106
|
+
var __defNormalProp$N = (obj, key, value) => key in obj ? __defProp$N(obj, key, {
|
|
2107
|
+
enumerable: true,
|
|
2108
|
+
configurable: true,
|
|
2109
|
+
writable: true,
|
|
2110
|
+
value
|
|
2111
|
+
}) : obj[key] = value;
|
|
2112
|
+
var __spreadValues$N = (a, b) => {
|
|
2113
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$P.call(b, prop)) __defNormalProp$N(a, prop, b[prop]);
|
|
2114
|
+
if (__getOwnPropSymbols$P) for (var prop of __getOwnPropSymbols$P(b)) {
|
|
2115
|
+
if (__propIsEnum$P.call(b, prop)) __defNormalProp$N(a, prop, b[prop]);
|
|
2116
|
+
}
|
|
2117
|
+
return a;
|
|
2320
2118
|
};
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
const arr = Array.from(
|
|
2330
|
-
document.querySelectorAll(klass2)
|
|
2331
|
-
);
|
|
2332
|
-
if (arr.length > 0) {
|
|
2333
|
-
els = [...els, ...arr];
|
|
2334
|
-
}
|
|
2335
|
-
});
|
|
2336
|
-
}
|
|
2337
|
-
if (!els.length)
|
|
2338
|
-
return;
|
|
2339
|
-
if (typeof ResizeObserver === "function") {
|
|
2340
|
-
const resizeObserver = new ResizeObserver(cb);
|
|
2341
|
-
els.forEach((el) => {
|
|
2342
|
-
resizeObserver.observe(el);
|
|
2343
|
-
});
|
|
2344
|
-
return () => resizeObserver.disconnect();
|
|
2345
|
-
} else {
|
|
2346
|
-
return onResizeElem(Array.from(els), cb);
|
|
2347
|
-
}
|
|
2348
|
-
}, [cb, ...depend || []]);
|
|
2119
|
+
var __spreadProps$E = (a, b) => __defProps$E(a, __getOwnPropDescs$E(b));
|
|
2120
|
+
var __objRest$x = (source, exclude) => {
|
|
2121
|
+
var target = {};
|
|
2122
|
+
for (var prop in source) if (__hasOwnProp$P.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
2123
|
+
if (source != null && __getOwnPropSymbols$P) for (var prop of __getOwnPropSymbols$P(source)) {
|
|
2124
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$P.call(source, prop)) target[prop] = source[prop];
|
|
2125
|
+
}
|
|
2126
|
+
return target;
|
|
2349
2127
|
};
|
|
2350
|
-
|
|
2351
|
-
const
|
|
2128
|
+
const CheckboxStyle = "c198s9j3";
|
|
2129
|
+
const Checkbox = _a => {
|
|
2130
|
+
var _b = _a,
|
|
2131
|
+
{
|
|
2132
|
+
className,
|
|
2133
|
+
children,
|
|
2134
|
+
description,
|
|
2135
|
+
compact
|
|
2136
|
+
} = _b,
|
|
2137
|
+
props = __objRest$x(_b, ["className", "children", "description", "compact"]);
|
|
2138
|
+
return /* @__PURE__ */React__namespace.default.createElement(antd.Checkbox, __spreadProps$E(__spreadValues$N({}, props), {
|
|
2139
|
+
"data-test": props["data-test"] || props.value,
|
|
2140
|
+
className: cs__default.default(className, CheckboxStyle, compact && "compact")
|
|
2141
|
+
}), children ? /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
2142
|
+
className: cs__default.default("main", Typo.Label.l2_regular)
|
|
2143
|
+
}, children), description ? /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
2144
|
+
className: cs__default.default("sub", Typo.Label.l4_regular)
|
|
2145
|
+
}, description) : null) : null);
|
|
2352
2146
|
};
|
|
2353
2147
|
|
|
2354
|
-
var __defProp$
|
|
2355
|
-
var
|
|
2356
|
-
var
|
|
2357
|
-
|
|
2358
|
-
|
|
2148
|
+
var __defProp$M = Object.defineProperty;
|
|
2149
|
+
var __getOwnPropSymbols$O = Object.getOwnPropertySymbols;
|
|
2150
|
+
var __hasOwnProp$O = Object.prototype.hasOwnProperty;
|
|
2151
|
+
var __propIsEnum$O = Object.prototype.propertyIsEnumerable;
|
|
2152
|
+
var __defNormalProp$M = (obj, key, value) => key in obj ? __defProp$M(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2153
|
+
var __spreadValues$M = (a, b) => {
|
|
2154
|
+
for (var prop in b || (b = {}))
|
|
2155
|
+
if (__hasOwnProp$O.call(b, prop))
|
|
2156
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
2157
|
+
if (__getOwnPropSymbols$O)
|
|
2158
|
+
for (var prop of __getOwnPropSymbols$O(b)) {
|
|
2159
|
+
if (__propIsEnum$O.call(b, prop))
|
|
2160
|
+
__defNormalProp$M(a, prop, b[prop]);
|
|
2161
|
+
}
|
|
2162
|
+
return a;
|
|
2359
2163
|
};
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
29,
|
|
2372
|
-
// support leap year...not perfect
|
|
2373
|
-
31,
|
|
2374
|
-
30,
|
|
2375
|
-
31,
|
|
2376
|
-
30,
|
|
2377
|
-
31,
|
|
2378
|
-
31,
|
|
2379
|
-
30,
|
|
2380
|
-
31,
|
|
2381
|
-
30,
|
|
2382
|
-
31
|
|
2383
|
-
];
|
|
2384
|
-
const PARSE_DEFAULTS = ["0", "*", "*", "*", "*", "*"];
|
|
2385
|
-
const ALIASES = {
|
|
2386
|
-
jan: 0,
|
|
2387
|
-
feb: 1,
|
|
2388
|
-
mar: 2,
|
|
2389
|
-
apr: 3,
|
|
2390
|
-
may: 4,
|
|
2391
|
-
jun: 5,
|
|
2392
|
-
jul: 6,
|
|
2393
|
-
aug: 7,
|
|
2394
|
-
sep: 8,
|
|
2395
|
-
oct: 9,
|
|
2396
|
-
nov: 10,
|
|
2397
|
-
dec: 11,
|
|
2398
|
-
sun: 0,
|
|
2399
|
-
mon: 1,
|
|
2400
|
-
tue: 2,
|
|
2401
|
-
wed: 3,
|
|
2402
|
-
thu: 4,
|
|
2403
|
-
fri: 5,
|
|
2404
|
-
sat: 6
|
|
2164
|
+
var __objRest$w = (source, exclude) => {
|
|
2165
|
+
var target = {};
|
|
2166
|
+
for (var prop in source)
|
|
2167
|
+
if (__hasOwnProp$O.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2168
|
+
target[prop] = source[prop];
|
|
2169
|
+
if (source != null && __getOwnPropSymbols$O)
|
|
2170
|
+
for (var prop of __getOwnPropSymbols$O(source)) {
|
|
2171
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$O.call(source, prop))
|
|
2172
|
+
target[prop] = source[prop];
|
|
2173
|
+
}
|
|
2174
|
+
return target;
|
|
2405
2175
|
};
|
|
2406
|
-
const
|
|
2407
|
-
"
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
"@secondly": { expression: () => "* * * * * *", validation: () => true },
|
|
2425
|
-
"@weekdays": { expression: () => "0 0 0 * * 1-5", validation: () => true },
|
|
2426
|
-
"@weekends": { expression: () => "0 0 0 * * 0,6", validation: () => true },
|
|
2427
|
-
"@x-every-n-day": {
|
|
2428
|
-
expression: (args) => `0 ${args[0]} ${args[1]} * * *`,
|
|
2429
|
-
validation: ({ date, lastSendAt, args }) => {
|
|
2430
|
-
if (!lastSendAt) {
|
|
2431
|
-
return true;
|
|
2432
|
-
}
|
|
2433
|
-
return date.diff(lastSendAt) >= parseInt(args[2], 10) * (864e5 - 6e4) - 1e4;
|
|
2434
|
-
},
|
|
2435
|
-
step: (_args) => 864e5 - 6e4
|
|
2436
|
-
},
|
|
2437
|
-
"@x-every-n-week": {
|
|
2438
|
-
expression: (args) => {
|
|
2439
|
-
const days = args.slice(3);
|
|
2440
|
-
return `0 ${args[0]} ${args[1]} * * ${days.includes("*") ? "*" : days.join(",")}`;
|
|
2176
|
+
const FieldsBoolean = (_a) => {
|
|
2177
|
+
var _b = _a, { input, children } = _b, props = __objRest$w(_b, ["input", "children"]);
|
|
2178
|
+
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
2179
|
+
Checkbox,
|
|
2180
|
+
__spreadValues$M({
|
|
2181
|
+
checked: Boolean(input.value),
|
|
2182
|
+
onChange: (e) => input.onChange(e.target.checked)
|
|
2183
|
+
}, props),
|
|
2184
|
+
children
|
|
2185
|
+
));
|
|
2186
|
+
};
|
|
2187
|
+
|
|
2188
|
+
const FieldsDateTime = ({ input }) => /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
2189
|
+
antd.DatePicker,
|
|
2190
|
+
{
|
|
2191
|
+
onFocus: () => {
|
|
2192
|
+
var _a;
|
|
2193
|
+
return (_a = input.onFocus) == null ? void 0 : _a.call(input);
|
|
2441
2194
|
},
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
}
|
|
2446
|
-
if (date.isAfter(lastSendAt) && date.day(0).isSame(lastSendAt.day(0))) {
|
|
2447
|
-
return true;
|
|
2448
|
-
}
|
|
2449
|
-
return date.day(0).diff(lastSendAt.day(0)) >= parseInt(args[2], 10) * (6048e5 - 6e4) - 1e4;
|
|
2195
|
+
onBlur: () => {
|
|
2196
|
+
var _a;
|
|
2197
|
+
return (_a = input.onBlur) == null ? void 0 : _a.call(input);
|
|
2450
2198
|
},
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
expression: (args) => `0 ${args[0]} ${args[1]} 28-31 ${args[2]} *`,
|
|
2455
|
-
validation: ({ date }) => {
|
|
2456
|
-
const lastDayInMonth = MONTH_CONSTRAINTS[date.month()];
|
|
2457
|
-
return lastDayInMonth === date.date();
|
|
2458
|
-
}
|
|
2199
|
+
showTime: true,
|
|
2200
|
+
defaultValue: input.value,
|
|
2201
|
+
onOk: input.onChange
|
|
2459
2202
|
}
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
__publicField$1(this, "lastSendAt", null);
|
|
2475
|
-
if (typeof utcOffset !== "undefined") {
|
|
2476
|
-
this.utcOffset = utcOffset;
|
|
2203
|
+
));
|
|
2204
|
+
|
|
2205
|
+
var __getOwnPropSymbols$N = Object.getOwnPropertySymbols;
|
|
2206
|
+
var __hasOwnProp$N = Object.prototype.hasOwnProperty;
|
|
2207
|
+
var __propIsEnum$N = Object.prototype.propertyIsEnumerable;
|
|
2208
|
+
var __objRest$v = (source, exclude) => {
|
|
2209
|
+
var target = {};
|
|
2210
|
+
for (var prop in source)
|
|
2211
|
+
if (__hasOwnProp$N.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2212
|
+
target[prop] = source[prop];
|
|
2213
|
+
if (source != null && __getOwnPropSymbols$N)
|
|
2214
|
+
for (var prop of __getOwnPropSymbols$N(source)) {
|
|
2215
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$N.call(source, prop))
|
|
2216
|
+
target[prop] = source[prop];
|
|
2477
2217
|
}
|
|
2478
|
-
|
|
2479
|
-
|
|
2218
|
+
return target;
|
|
2219
|
+
};
|
|
2220
|
+
const FieldsDateTimeRange = (_a) => {
|
|
2221
|
+
var _b = _a, {
|
|
2222
|
+
input
|
|
2223
|
+
} = _b, props = __objRest$v(_b, [
|
|
2224
|
+
"input"
|
|
2225
|
+
]);
|
|
2226
|
+
var _a2, _b2;
|
|
2227
|
+
return /* @__PURE__ */ React__namespace.default.createElement("div", { className: "datatime-range" }, /* @__PURE__ */ React__namespace.default.createElement(
|
|
2228
|
+
antd.DatePicker.RangePicker,
|
|
2229
|
+
{
|
|
2230
|
+
onFocus: () => {
|
|
2231
|
+
var _a3;
|
|
2232
|
+
return (_a3 = input.onFocus) == null ? void 0 : _a3.call(input);
|
|
2233
|
+
},
|
|
2234
|
+
onBlur: () => {
|
|
2235
|
+
var _a3;
|
|
2236
|
+
return (_a3 = input.onBlur) == null ? void 0 : _a3.call(input);
|
|
2237
|
+
},
|
|
2238
|
+
showTime: true,
|
|
2239
|
+
defaultValue: (_a2 = input.value) == null ? void 0 : _a2.map((v) => v && moment__default.default(v)),
|
|
2240
|
+
onChange: input.onChange,
|
|
2241
|
+
value: (_b2 = input.value) == null ? void 0 : _b2.map((v) => v && moment__default.default(v)),
|
|
2242
|
+
format: props.format
|
|
2480
2243
|
}
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2244
|
+
));
|
|
2245
|
+
};
|
|
2246
|
+
|
|
2247
|
+
const LoadingWrapper = "l4bld33";
|
|
2248
|
+
const LoadingLine1 = "lgitjoj";
|
|
2249
|
+
const LoadingLine2 = "l13g0exg";
|
|
2250
|
+
const LoadingLine3 = "l1exo3h6";
|
|
2251
|
+
|
|
2252
|
+
var __defProp$L = Object.defineProperty;
|
|
2253
|
+
var __defProps$D = Object.defineProperties;
|
|
2254
|
+
var __getOwnPropDescs$D = Object.getOwnPropertyDescriptors;
|
|
2255
|
+
var __getOwnPropSymbols$M = Object.getOwnPropertySymbols;
|
|
2256
|
+
var __hasOwnProp$M = Object.prototype.hasOwnProperty;
|
|
2257
|
+
var __propIsEnum$M = Object.prototype.propertyIsEnumerable;
|
|
2258
|
+
var __defNormalProp$L = (obj, key, value) => key in obj ? __defProp$L(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2259
|
+
var __spreadValues$L = (a, b) => {
|
|
2260
|
+
for (var prop in b || (b = {}))
|
|
2261
|
+
if (__hasOwnProp$M.call(b, prop))
|
|
2262
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
2263
|
+
if (__getOwnPropSymbols$M)
|
|
2264
|
+
for (var prop of __getOwnPropSymbols$M(b)) {
|
|
2265
|
+
if (__propIsEnum$M.call(b, prop))
|
|
2266
|
+
__defNormalProp$L(a, prop, b[prop]);
|
|
2491
2267
|
}
|
|
2268
|
+
return a;
|
|
2269
|
+
};
|
|
2270
|
+
var __spreadProps$D = (a, b) => __defProps$D(a, __getOwnPropDescs$D(b));
|
|
2271
|
+
const Loading = ({ fullView = true }) => {
|
|
2272
|
+
const Wrapper = fullView ? FullView : React.Fragment;
|
|
2273
|
+
const props = fullView ? { className: "loading-full-view" } : {};
|
|
2274
|
+
return /* @__PURE__ */ React__namespace.default.createElement(Wrapper, __spreadProps$D(__spreadValues$L({}, props), { "data-testid": "loading" }), /* @__PURE__ */ React__namespace.default.createElement("div", { className: LoadingWrapper }, /* @__PURE__ */ React__namespace.default.createElement("div", { className: LoadingLine1 }), /* @__PURE__ */ React__namespace.default.createElement("div", { className: LoadingLine2 }), /* @__PURE__ */ React__namespace.default.createElement("div", { className: LoadingLine3 })));
|
|
2275
|
+
};
|
|
2276
|
+
|
|
2277
|
+
var __defProp$K = Object.defineProperty;
|
|
2278
|
+
var __defProps$C = Object.defineProperties;
|
|
2279
|
+
var __getOwnPropDescs$C = Object.getOwnPropertyDescriptors;
|
|
2280
|
+
var __getOwnPropSymbols$L = Object.getOwnPropertySymbols;
|
|
2281
|
+
var __hasOwnProp$L = Object.prototype.hasOwnProperty;
|
|
2282
|
+
var __propIsEnum$L = Object.prototype.propertyIsEnumerable;
|
|
2283
|
+
var __defNormalProp$K = (obj, key, value) => key in obj ? __defProp$K(obj, key, {
|
|
2284
|
+
enumerable: true,
|
|
2285
|
+
configurable: true,
|
|
2286
|
+
writable: true,
|
|
2287
|
+
value
|
|
2288
|
+
}) : obj[key] = value;
|
|
2289
|
+
var __spreadValues$K = (a, b) => {
|
|
2290
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$L.call(b, prop)) __defNormalProp$K(a, prop, b[prop]);
|
|
2291
|
+
if (__getOwnPropSymbols$L) for (var prop of __getOwnPropSymbols$L(b)) {
|
|
2292
|
+
if (__propIsEnum$L.call(b, prop)) __defNormalProp$K(a, prop, b[prop]);
|
|
2492
2293
|
}
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2294
|
+
return a;
|
|
2295
|
+
};
|
|
2296
|
+
var __spreadProps$C = (a, b) => __defProps$C(a, __getOwnPropDescs$C(b));
|
|
2297
|
+
var __objRest$u = (source, exclude) => {
|
|
2298
|
+
var target = {};
|
|
2299
|
+
for (var prop in source) if (__hasOwnProp$L.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
2300
|
+
if (source != null && __getOwnPropSymbols$L) for (var prop of __getOwnPropSymbols$L(source)) {
|
|
2301
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$L.call(source, prop)) target[prop] = source[prop];
|
|
2302
|
+
}
|
|
2303
|
+
return target;
|
|
2304
|
+
};
|
|
2305
|
+
const SelectStyle$1 = "shq1k1g";
|
|
2306
|
+
const Select = _a => {
|
|
2307
|
+
var _b = _a,
|
|
2308
|
+
{
|
|
2309
|
+
input,
|
|
2310
|
+
multiple,
|
|
2311
|
+
className,
|
|
2312
|
+
scrollBottomBuffer = 0,
|
|
2313
|
+
onScrollBottom,
|
|
2314
|
+
onPopupScroll,
|
|
2315
|
+
onSearch,
|
|
2316
|
+
showSearch,
|
|
2317
|
+
filterOption,
|
|
2318
|
+
loading,
|
|
2319
|
+
notFoundContent,
|
|
2320
|
+
children,
|
|
2321
|
+
error,
|
|
2322
|
+
selectLimit,
|
|
2323
|
+
dropdownClassName,
|
|
2324
|
+
danger,
|
|
2325
|
+
size = "middle",
|
|
2326
|
+
meta,
|
|
2327
|
+
placeholder
|
|
2328
|
+
} = _b,
|
|
2329
|
+
restProps = __objRest$u(_b, ["input", "multiple", "className", "scrollBottomBuffer", "onScrollBottom", "onPopupScroll", "onSearch", "showSearch", "filterOption", "loading", "notFoundContent", "children", "error", "selectLimit", "dropdownClassName", "danger", "size", "meta", "placeholder"]);
|
|
2330
|
+
var _a2;
|
|
2331
|
+
const limitExceeded = multiple && selectLimit && selectLimit <= (((_a2 = input.value) == null ? void 0 : _a2.length) || 0);
|
|
2332
|
+
const typo = {
|
|
2333
|
+
large: Typo.Label.l2_regular,
|
|
2334
|
+
middle: Typo.Label.l3_regular,
|
|
2335
|
+
small: Typo.Label.l4_regular
|
|
2336
|
+
}[size];
|
|
2337
|
+
const _danger = React.useMemo(() => {
|
|
2338
|
+
if (danger !== void 0) {
|
|
2339
|
+
return danger;
|
|
2497
2340
|
}
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2341
|
+
return (meta == null ? void 0 : meta.touched) && meta.invalid;
|
|
2342
|
+
}, [danger, meta]);
|
|
2343
|
+
const selectRef = React.useRef(null);
|
|
2344
|
+
React.useEffect(() => {
|
|
2345
|
+
if (!selectRef.current) {
|
|
2346
|
+
return;
|
|
2503
2347
|
}
|
|
2504
|
-
|
|
2505
|
-
|
|
2348
|
+
const realDom = reactDom.findDOMNode(selectRef.current);
|
|
2349
|
+
if (realDom) {
|
|
2350
|
+
const inputDom = realDom.getElementsByClassName("ant-select-selection-search-input")[0];
|
|
2351
|
+
const item = realDom.getElementsByClassName("ant-select-selection-item")[0];
|
|
2352
|
+
inputDom && (placeholder || item) && inputDom.setAttribute("data-test", String(placeholder || item.textContent));
|
|
2506
2353
|
}
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2354
|
+
}, [selectRef, placeholder]);
|
|
2355
|
+
return /* @__PURE__ */React__namespace.default.createElement(antd.Select, __spreadValues$K(__spreadProps$C(__spreadValues$K({}, input), {
|
|
2356
|
+
ref: selectRef,
|
|
2357
|
+
size,
|
|
2358
|
+
value: multiple ? input.value || [] : input.value || void 0,
|
|
2359
|
+
onChange: (e, option) => {
|
|
2360
|
+
var _a3, _b2;
|
|
2361
|
+
if (Array.isArray(e) && e.some(v => v === "")) {
|
|
2362
|
+
(_a3 = input.onChange) == null ? void 0 : _a3.call(input, [], option);
|
|
2363
|
+
} else {
|
|
2364
|
+
(_b2 = input.onChange) == null ? void 0 : _b2.call(input, e, option);
|
|
2514
2365
|
}
|
|
2515
|
-
|
|
2366
|
+
},
|
|
2367
|
+
onBlur: () => {
|
|
2368
|
+
var _a3;
|
|
2369
|
+
return (_a3 = input.onBlur) == null ? void 0 : _a3.call(input);
|
|
2370
|
+
},
|
|
2371
|
+
mode: multiple ? "multiple" : void 0,
|
|
2372
|
+
className: cs__default.default(SelectStyle$1, "select", className, limitExceeded && "select-event-none", _danger ? "select-error" : "", typo),
|
|
2373
|
+
"data-size": size,
|
|
2374
|
+
dropdownClassName: cs__default.default(dropdownClassName, limitExceeded && "display-none"),
|
|
2375
|
+
showSearch: multiple ? void 0 : typeof showSearch === "undefined" ? Boolean(onSearch) : showSearch,
|
|
2376
|
+
filterOption: onSearch === void 0 ? filterOption === void 0 ? (input2, option) => {
|
|
2377
|
+
const label = option == null ? void 0 : option.label;
|
|
2378
|
+
if (!label || typeof label !== "string") {
|
|
2379
|
+
return false;
|
|
2380
|
+
}
|
|
2381
|
+
return label.toLowerCase().includes(input2.toLowerCase());
|
|
2382
|
+
} : filterOption : false,
|
|
2383
|
+
onSearch: onSearch && ___default.default.debounce(onSearch, 100),
|
|
2384
|
+
onPopupScroll: e => {
|
|
2385
|
+
onPopupScroll == null ? void 0 : onPopupScroll(e);
|
|
2386
|
+
const el = e.currentTarget;
|
|
2387
|
+
if (el.scrollHeight - el.offsetHeight - el.scrollTop <= scrollBottomBuffer) {
|
|
2388
|
+
onScrollBottom == null ? void 0 : onScrollBottom();
|
|
2389
|
+
}
|
|
2390
|
+
},
|
|
2391
|
+
notFoundContent: loading ? /* @__PURE__ */React__namespace.default.createElement(Loading, null) : notFoundContent,
|
|
2392
|
+
dropdownRender: menu => /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, error || menu),
|
|
2393
|
+
loading,
|
|
2394
|
+
placeholder
|
|
2395
|
+
}), restProps), React__namespace.default.Children.map(children, child => {
|
|
2396
|
+
return reactIs.isElement(child) ? __spreadProps$C(__spreadValues$K({}, child), {
|
|
2397
|
+
props: __spreadProps$C(__spreadValues$K({}, child.props), {
|
|
2398
|
+
"data-test": child.props.value
|
|
2399
|
+
})
|
|
2400
|
+
}) : child;
|
|
2401
|
+
}));
|
|
2402
|
+
};
|
|
2403
|
+
|
|
2404
|
+
var __defProp$J = Object.defineProperty;
|
|
2405
|
+
var __getOwnPropSymbols$K = Object.getOwnPropertySymbols;
|
|
2406
|
+
var __hasOwnProp$K = Object.prototype.hasOwnProperty;
|
|
2407
|
+
var __propIsEnum$K = Object.prototype.propertyIsEnumerable;
|
|
2408
|
+
var __defNormalProp$J = (obj, key, value) => key in obj ? __defProp$J(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2409
|
+
var __spreadValues$J = (a, b) => {
|
|
2410
|
+
for (var prop in b || (b = {}))
|
|
2411
|
+
if (__hasOwnProp$K.call(b, prop))
|
|
2412
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
2413
|
+
if (__getOwnPropSymbols$K)
|
|
2414
|
+
for (var prop of __getOwnPropSymbols$K(b)) {
|
|
2415
|
+
if (__propIsEnum$K.call(b, prop))
|
|
2416
|
+
__defNormalProp$J(a, prop, b[prop]);
|
|
2516
2417
|
}
|
|
2418
|
+
return a;
|
|
2419
|
+
};
|
|
2420
|
+
var __objRest$t = (source, exclude) => {
|
|
2421
|
+
var target = {};
|
|
2422
|
+
for (var prop in source)
|
|
2423
|
+
if (__hasOwnProp$K.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2424
|
+
target[prop] = source[prop];
|
|
2425
|
+
if (source != null && __getOwnPropSymbols$K)
|
|
2426
|
+
for (var prop of __getOwnPropSymbols$K(source)) {
|
|
2427
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$K.call(source, prop))
|
|
2428
|
+
target[prop] = source[prop];
|
|
2429
|
+
}
|
|
2430
|
+
return target;
|
|
2431
|
+
};
|
|
2432
|
+
const FieldsEnum = (_a) => {
|
|
2433
|
+
var _b = _a, {
|
|
2434
|
+
meta: __,
|
|
2435
|
+
enumValues,
|
|
2436
|
+
emptyLabel
|
|
2437
|
+
} = _b, restProps = __objRest$t(_b, [
|
|
2438
|
+
"meta",
|
|
2439
|
+
"enumValues",
|
|
2440
|
+
"emptyLabel"
|
|
2441
|
+
]);
|
|
2442
|
+
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(Select, __spreadValues$J({}, restProps), emptyLabel && /* @__PURE__ */ React__namespace.default.createElement(antd.Select.Option, { value: "" }, emptyLabel), enumValues.map((v) => {
|
|
2443
|
+
const item = typeof v === "string" ? { value: v, text: v } : v;
|
|
2444
|
+
return /* @__PURE__ */ React__namespace.default.createElement(
|
|
2445
|
+
antd.Select.Option,
|
|
2446
|
+
{
|
|
2447
|
+
key: item.value,
|
|
2448
|
+
value: item.value,
|
|
2449
|
+
label: item.text
|
|
2450
|
+
},
|
|
2451
|
+
item.text
|
|
2452
|
+
);
|
|
2453
|
+
})));
|
|
2454
|
+
};
|
|
2455
|
+
|
|
2456
|
+
var __defProp$I = Object.defineProperty;
|
|
2457
|
+
var __defProps$B = Object.defineProperties;
|
|
2458
|
+
var __getOwnPropDescs$B = Object.getOwnPropertyDescriptors;
|
|
2459
|
+
var __getOwnPropSymbols$J = Object.getOwnPropertySymbols;
|
|
2460
|
+
var __hasOwnProp$J = Object.prototype.hasOwnProperty;
|
|
2461
|
+
var __propIsEnum$J = Object.prototype.propertyIsEnumerable;
|
|
2462
|
+
var __defNormalProp$I = (obj, key, value) => key in obj ? __defProp$I(obj, key, {
|
|
2463
|
+
enumerable: true,
|
|
2464
|
+
configurable: true,
|
|
2465
|
+
writable: true,
|
|
2466
|
+
value
|
|
2467
|
+
}) : obj[key] = value;
|
|
2468
|
+
var __spreadValues$I = (a, b) => {
|
|
2469
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$J.call(b, prop)) __defNormalProp$I(a, prop, b[prop]);
|
|
2470
|
+
if (__getOwnPropSymbols$J) for (var prop of __getOwnPropSymbols$J(b)) {
|
|
2471
|
+
if (__propIsEnum$J.call(b, prop)) __defNormalProp$I(a, prop, b[prop]);
|
|
2517
2472
|
}
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
*/
|
|
2527
|
-
toString() {
|
|
2528
|
-
return this.toJSON().join(" ");
|
|
2529
|
-
}
|
|
2530
|
-
/**
|
|
2531
|
-
* Json representation of the parsed cron syntax.
|
|
2532
|
-
*/
|
|
2533
|
-
toJSON() {
|
|
2534
|
-
return TIME_UNITS.map((timeName) => {
|
|
2535
|
-
return this.wcOrAll(timeName);
|
|
2536
|
-
});
|
|
2537
|
-
}
|
|
2538
|
-
setLastSendAt(date) {
|
|
2539
|
-
this.lastSendAt = date;
|
|
2473
|
+
return a;
|
|
2474
|
+
};
|
|
2475
|
+
var __spreadProps$B = (a, b) => __defProps$B(a, __getOwnPropDescs$B(b));
|
|
2476
|
+
var __objRest$s = (source, exclude) => {
|
|
2477
|
+
var target = {};
|
|
2478
|
+
for (var prop in source) if (__hasOwnProp$J.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
2479
|
+
if (source != null && __getOwnPropSymbols$J) for (var prop of __getOwnPropSymbols$J(source)) {
|
|
2480
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$J.call(source, prop)) target[prop] = source[prop];
|
|
2540
2481
|
}
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2482
|
+
return target;
|
|
2483
|
+
};
|
|
2484
|
+
const _exp$4 = () => antd.InputNumber;
|
|
2485
|
+
const _exp2$1 = () => props => props.controls ? "initial" : "none";
|
|
2486
|
+
const _exp3$1 = () => props => `"${props.suffix ? props.suffix : ""}"`;
|
|
2487
|
+
const _exp4$1 = () => ({
|
|
2488
|
+
suffix
|
|
2489
|
+
}) => suffix ? "flex" : "none";
|
|
2490
|
+
const _exp5$1 = () => props => `"${props.prefix ? props.prefix : ""}"`;
|
|
2491
|
+
const _exp6$1 = () => ({
|
|
2492
|
+
prefix
|
|
2493
|
+
}) => prefix ? "flex" : "none";
|
|
2494
|
+
const AntdInputNumberStyled = /*#__PURE__*/react$1.styled(_exp$4())({
|
|
2495
|
+
name: "AntdInputNumberStyled",
|
|
2496
|
+
class: "a6dbbkm",
|
|
2497
|
+
propsAsIs: true,
|
|
2498
|
+
vars: {
|
|
2499
|
+
"a6dbbkm-0": [_exp2$1()],
|
|
2500
|
+
"a6dbbkm-1": [_exp3$1()],
|
|
2501
|
+
"a6dbbkm-2": [_exp4$1()],
|
|
2502
|
+
"a6dbbkm-3": [_exp5$1()],
|
|
2503
|
+
"a6dbbkm-4": [_exp6$1()]
|
|
2504
|
+
}
|
|
2505
|
+
});
|
|
2506
|
+
const InputNumber = _a => {
|
|
2507
|
+
var _b = _a,
|
|
2508
|
+
{
|
|
2509
|
+
className,
|
|
2510
|
+
error,
|
|
2511
|
+
size = "middle",
|
|
2512
|
+
suffix,
|
|
2513
|
+
prefix,
|
|
2514
|
+
controls = true
|
|
2515
|
+
} = _b,
|
|
2516
|
+
props = __objRest$s(_b, ["className", "error", "size", "suffix", "prefix", "controls"]);
|
|
2517
|
+
const typo = {
|
|
2518
|
+
large: Typo.Label.l2_regular,
|
|
2519
|
+
middle: Typo.Label.l3_regular,
|
|
2520
|
+
small: Typo.Label.l4_regular
|
|
2521
|
+
}[size];
|
|
2522
|
+
return /* @__PURE__ */React__namespace.default.createElement(AntdInputNumberStyled, __spreadProps$B(__spreadValues$I({}, props), {
|
|
2523
|
+
size,
|
|
2524
|
+
controls,
|
|
2525
|
+
"data-test": props.name,
|
|
2526
|
+
suffix: controls ? "" : suffix,
|
|
2527
|
+
prefix,
|
|
2528
|
+
className: cs__default.default(className, InputStyle, typo, error ? "error" : "")
|
|
2529
|
+
}));
|
|
2530
|
+
};
|
|
2531
|
+
|
|
2532
|
+
var __defProp$H = Object.defineProperty;
|
|
2533
|
+
var __defProps$A = Object.defineProperties;
|
|
2534
|
+
var __getOwnPropDescs$A = Object.getOwnPropertyDescriptors;
|
|
2535
|
+
var __getOwnPropSymbols$I = Object.getOwnPropertySymbols;
|
|
2536
|
+
var __hasOwnProp$I = Object.prototype.hasOwnProperty;
|
|
2537
|
+
var __propIsEnum$I = Object.prototype.propertyIsEnumerable;
|
|
2538
|
+
var __defNormalProp$H = (obj, key, value) => key in obj ? __defProp$H(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2539
|
+
var __spreadValues$H = (a, b) => {
|
|
2540
|
+
for (var prop in b || (b = {}))
|
|
2541
|
+
if (__hasOwnProp$I.call(b, prop))
|
|
2542
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
2543
|
+
if (__getOwnPropSymbols$I)
|
|
2544
|
+
for (var prop of __getOwnPropSymbols$I(b)) {
|
|
2545
|
+
if (__propIsEnum$I.call(b, prop))
|
|
2546
|
+
__defNormalProp$H(a, prop, b[prop]);
|
|
2561
2547
|
}
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2548
|
+
return a;
|
|
2549
|
+
};
|
|
2550
|
+
var __spreadProps$A = (a, b) => __defProps$A(a, __getOwnPropDescs$A(b));
|
|
2551
|
+
var __objRest$r = (source, exclude) => {
|
|
2552
|
+
var target = {};
|
|
2553
|
+
for (var prop in source)
|
|
2554
|
+
if (__hasOwnProp$I.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2555
|
+
target[prop] = source[prop];
|
|
2556
|
+
if (source != null && __getOwnPropSymbols$I)
|
|
2557
|
+
for (var prop of __getOwnPropSymbols$I(source)) {
|
|
2558
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$I.call(source, prop))
|
|
2559
|
+
target[prop] = source[prop];
|
|
2571
2560
|
}
|
|
2572
|
-
|
|
2573
|
-
|
|
2561
|
+
return target;
|
|
2562
|
+
};
|
|
2563
|
+
const FieldsFloat = (_a) => {
|
|
2564
|
+
var _b = _a, {
|
|
2565
|
+
input,
|
|
2566
|
+
meta,
|
|
2567
|
+
onBlur,
|
|
2568
|
+
autoComplete = "off"
|
|
2569
|
+
} = _b, props = __objRest$r(_b, [
|
|
2570
|
+
"input",
|
|
2571
|
+
"meta",
|
|
2572
|
+
"onBlur",
|
|
2573
|
+
"autoComplete"
|
|
2574
|
+
]);
|
|
2575
|
+
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
2576
|
+
InputNumber,
|
|
2577
|
+
__spreadValues$H(__spreadProps$A(__spreadValues$H({}, input), {
|
|
2578
|
+
onBlur: (e) => onBlur ? onBlur(input, e) : input.onBlur(e),
|
|
2579
|
+
autoComplete,
|
|
2580
|
+
error: meta.touched && (meta.error || !meta.dirtySinceLastSubmit && meta.submitError)
|
|
2581
|
+
}), props)
|
|
2582
|
+
));
|
|
2583
|
+
};
|
|
2584
|
+
|
|
2585
|
+
var __defProp$G = Object.defineProperty;
|
|
2586
|
+
var __defProps$z = Object.defineProperties;
|
|
2587
|
+
var __getOwnPropDescs$z = Object.getOwnPropertyDescriptors;
|
|
2588
|
+
var __getOwnPropSymbols$H = Object.getOwnPropertySymbols;
|
|
2589
|
+
var __hasOwnProp$H = Object.prototype.hasOwnProperty;
|
|
2590
|
+
var __propIsEnum$H = Object.prototype.propertyIsEnumerable;
|
|
2591
|
+
var __defNormalProp$G = (obj, key, value) => key in obj ? __defProp$G(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2592
|
+
var __spreadValues$G = (a, b) => {
|
|
2593
|
+
for (var prop in b || (b = {}))
|
|
2594
|
+
if (__hasOwnProp$H.call(b, prop))
|
|
2595
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
2596
|
+
if (__getOwnPropSymbols$H)
|
|
2597
|
+
for (var prop of __getOwnPropSymbols$H(b)) {
|
|
2598
|
+
if (__propIsEnum$H.call(b, prop))
|
|
2599
|
+
__defNormalProp$G(a, prop, b[prop]);
|
|
2574
2600
|
}
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2601
|
+
return a;
|
|
2602
|
+
};
|
|
2603
|
+
var __spreadProps$z = (a, b) => __defProps$z(a, __getOwnPropDescs$z(b));
|
|
2604
|
+
var __objRest$q = (source, exclude) => {
|
|
2605
|
+
var target = {};
|
|
2606
|
+
for (var prop in source)
|
|
2607
|
+
if (__hasOwnProp$H.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2608
|
+
target[prop] = source[prop];
|
|
2609
|
+
if (source != null && __getOwnPropSymbols$H)
|
|
2610
|
+
for (var prop of __getOwnPropSymbols$H(source)) {
|
|
2611
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$H.call(source, prop))
|
|
2612
|
+
target[prop] = source[prop];
|
|
2579
2613
|
}
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2614
|
+
return target;
|
|
2615
|
+
};
|
|
2616
|
+
const Input = (_a) => {
|
|
2617
|
+
var _b = _a, {
|
|
2618
|
+
className,
|
|
2619
|
+
error,
|
|
2620
|
+
size = "middle"
|
|
2621
|
+
} = _b, props = __objRest$q(_b, [
|
|
2622
|
+
"className",
|
|
2623
|
+
"error",
|
|
2624
|
+
"size"
|
|
2625
|
+
]);
|
|
2626
|
+
const typo = {
|
|
2627
|
+
large: Typo.Label.l2_regular,
|
|
2628
|
+
middle: Typo.Label.l3_regular,
|
|
2629
|
+
small: Typo.Label.l4_regular
|
|
2630
|
+
}[size];
|
|
2631
|
+
return /* @__PURE__ */ React__namespace.default.createElement(
|
|
2632
|
+
antd.Input,
|
|
2633
|
+
__spreadProps$z(__spreadValues$G({}, props), {
|
|
2634
|
+
size,
|
|
2635
|
+
"data-test": props.name,
|
|
2636
|
+
className: cs__default.default(className, InputStyle, typo, error ? "error" : "")
|
|
2637
|
+
})
|
|
2638
|
+
);
|
|
2639
|
+
};
|
|
2640
|
+
|
|
2641
|
+
var __defProp$F = Object.defineProperty;
|
|
2642
|
+
var __defProps$y = Object.defineProperties;
|
|
2643
|
+
var __getOwnPropDescs$y = Object.getOwnPropertyDescriptors;
|
|
2644
|
+
var __getOwnPropSymbols$G = Object.getOwnPropertySymbols;
|
|
2645
|
+
var __hasOwnProp$G = Object.prototype.hasOwnProperty;
|
|
2646
|
+
var __propIsEnum$G = Object.prototype.propertyIsEnumerable;
|
|
2647
|
+
var __defNormalProp$F = (obj, key, value) => key in obj ? __defProp$F(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2648
|
+
var __spreadValues$F = (a, b) => {
|
|
2649
|
+
for (var prop in b || (b = {}))
|
|
2650
|
+
if (__hasOwnProp$G.call(b, prop))
|
|
2651
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
2652
|
+
if (__getOwnPropSymbols$G)
|
|
2653
|
+
for (var prop of __getOwnPropSymbols$G(b)) {
|
|
2654
|
+
if (__propIsEnum$G.call(b, prop))
|
|
2655
|
+
__defNormalProp$F(a, prop, b[prop]);
|
|
2585
2656
|
}
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2657
|
+
return a;
|
|
2658
|
+
};
|
|
2659
|
+
var __spreadProps$y = (a, b) => __defProps$y(a, __getOwnPropDescs$y(b));
|
|
2660
|
+
var __objRest$p = (source, exclude) => {
|
|
2661
|
+
var target = {};
|
|
2662
|
+
for (var prop in source)
|
|
2663
|
+
if (__hasOwnProp$G.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2664
|
+
target[prop] = source[prop];
|
|
2665
|
+
if (source != null && __getOwnPropSymbols$G)
|
|
2666
|
+
for (var prop of __getOwnPropSymbols$G(source)) {
|
|
2667
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$G.call(source, prop))
|
|
2668
|
+
target[prop] = source[prop];
|
|
2591
2669
|
}
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
value = value.replace(RE_WILDCARDS, `${low}-${high}`);
|
|
2620
|
-
const allRanges = value.split(",");
|
|
2621
|
-
for (let i = 0; i < allRanges.length; i++) {
|
|
2622
|
-
if (allRanges[i].match(RE_RANGE)) {
|
|
2623
|
-
allRanges[i].replace(RE_RANGE, ($0, _lower, _upper, step) => {
|
|
2624
|
-
let lower = parseInt(_lower, 10);
|
|
2625
|
-
let upper = parseInt(_upper, 10) || void 0;
|
|
2626
|
-
const wasStepDefined = !isNaN(parseInt(step, 10));
|
|
2627
|
-
if (step === "0") {
|
|
2628
|
-
throw new Error(`Field (${type}) has a step of zero`);
|
|
2629
|
-
}
|
|
2630
|
-
step = parseInt(step, 10) || 1;
|
|
2631
|
-
if (upper && lower > upper) {
|
|
2632
|
-
throw new Error(`Field (${type}) has an invalid range`);
|
|
2633
|
-
}
|
|
2634
|
-
const outOfRangeError = lower < low || upper && upper > high || !upper && lower > high;
|
|
2635
|
-
if (outOfRangeError) {
|
|
2636
|
-
throw new Error(`Field value (${value}) is out of range`);
|
|
2637
|
-
}
|
|
2638
|
-
lower = Math.min(Math.max(low, ~~Math.abs(lower)), high);
|
|
2639
|
-
if (upper) {
|
|
2640
|
-
upper = Math.min(high, ~~Math.abs(upper));
|
|
2641
|
-
} else {
|
|
2642
|
-
upper = wasStepDefined ? high : lower;
|
|
2670
|
+
return target;
|
|
2671
|
+
};
|
|
2672
|
+
const FieldsInt = (_a) => {
|
|
2673
|
+
var _b = _a, {
|
|
2674
|
+
input,
|
|
2675
|
+
meta,
|
|
2676
|
+
onBlur,
|
|
2677
|
+
autoComplete = "off",
|
|
2678
|
+
supportNegativeValue = false
|
|
2679
|
+
} = _b, props = __objRest$p(_b, [
|
|
2680
|
+
"input",
|
|
2681
|
+
"meta",
|
|
2682
|
+
"onBlur",
|
|
2683
|
+
"autoComplete",
|
|
2684
|
+
"supportNegativeValue"
|
|
2685
|
+
]);
|
|
2686
|
+
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
2687
|
+
Input,
|
|
2688
|
+
__spreadValues$F(__spreadProps$y(__spreadValues$F({}, input), {
|
|
2689
|
+
onChange: (e) => {
|
|
2690
|
+
const value = e.currentTarget.value;
|
|
2691
|
+
if (supportNegativeValue) {
|
|
2692
|
+
if (value === "" || value === "-") {
|
|
2693
|
+
input.onChange(value);
|
|
2694
|
+
} else if (/^(-)?\d+$/.test(value)) {
|
|
2695
|
+
const v = parseInt(value);
|
|
2696
|
+
input.onChange(!Number.isNaN(v) ? v : void 0);
|
|
2643
2697
|
}
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
pointer += step;
|
|
2648
|
-
} while (pointer <= upper);
|
|
2649
|
-
return "";
|
|
2650
|
-
});
|
|
2651
|
-
} else {
|
|
2652
|
-
throw new Error(`Field (${type}) cannot be parsed`);
|
|
2653
|
-
}
|
|
2654
|
-
}
|
|
2655
|
-
}
|
|
2656
|
-
/*
|
|
2657
|
-
* Ensure that the syntax parsed correctly and correct the specified values if needed.
|
|
2658
|
-
*/
|
|
2659
|
-
verifyParse() {
|
|
2660
|
-
const months = Object.keys(this.unitMap.month);
|
|
2661
|
-
const dom = Object.keys(this.unitMap.dayOfMonth);
|
|
2662
|
-
let ok = false;
|
|
2663
|
-
let lastWrongMonth = NaN;
|
|
2664
|
-
for (let i = 0; i < months.length; i++) {
|
|
2665
|
-
const m = months[i];
|
|
2666
|
-
const con = MONTH_CONSTRAINTS[parseInt(m, 10)];
|
|
2667
|
-
for (const day of dom) {
|
|
2668
|
-
if (parseInt(day, 10) <= con) {
|
|
2669
|
-
ok = true;
|
|
2670
|
-
}
|
|
2671
|
-
}
|
|
2672
|
-
if (!ok) {
|
|
2673
|
-
lastWrongMonth = parseInt(m, 10);
|
|
2674
|
-
console.warn(`Month '${m}' is limited to '${con}' days.`);
|
|
2675
|
-
}
|
|
2676
|
-
}
|
|
2677
|
-
if (!ok) {
|
|
2678
|
-
const notOkCon = MONTH_CONSTRAINTS[lastWrongMonth];
|
|
2679
|
-
for (const notOkDay of dom) {
|
|
2680
|
-
if (parseInt(notOkDay, 10) > notOkCon) {
|
|
2681
|
-
delete this.unitMap.dayOfMonth[notOkDay];
|
|
2682
|
-
const fixedDay = Number(notOkDay) % notOkCon;
|
|
2683
|
-
this.unitMap.dayOfMonth[fixedDay] = true;
|
|
2698
|
+
} else if (value === "" || /^\d+$/.test(value)) {
|
|
2699
|
+
const v = parseInt(value);
|
|
2700
|
+
input.onChange(!Number.isNaN(v) ? v : void 0);
|
|
2684
2701
|
}
|
|
2685
|
-
}
|
|
2686
|
-
|
|
2702
|
+
},
|
|
2703
|
+
onBlur: (e) => {
|
|
2704
|
+
onBlur ? onBlur(input, e) : input.onBlur(e);
|
|
2705
|
+
},
|
|
2706
|
+
autoComplete,
|
|
2707
|
+
error: meta.touched && (meta.error || !meta.dirtySinceLastSubmit && meta.submitError)
|
|
2708
|
+
}), props)
|
|
2709
|
+
));
|
|
2710
|
+
};
|
|
2711
|
+
|
|
2712
|
+
const formatterInteger = (value) => {
|
|
2713
|
+
const reg = /^\.|[^\d]/g;
|
|
2714
|
+
if (typeof value === "string") {
|
|
2715
|
+
return !isNaN(Number(value.replace(reg, ""))) ? value.replace(reg, "") : "";
|
|
2716
|
+
} else if (typeof value === "number") {
|
|
2717
|
+
return !isNaN(value) ? String(value).replace(reg, "") : "";
|
|
2718
|
+
} else {
|
|
2719
|
+
return "";
|
|
2687
2720
|
}
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2721
|
+
};
|
|
2722
|
+
|
|
2723
|
+
var __defProp$E = Object.defineProperty;
|
|
2724
|
+
var __defProps$x = Object.defineProperties;
|
|
2725
|
+
var __getOwnPropDescs$x = Object.getOwnPropertyDescriptors;
|
|
2726
|
+
var __getOwnPropSymbols$F = Object.getOwnPropertySymbols;
|
|
2727
|
+
var __hasOwnProp$F = Object.prototype.hasOwnProperty;
|
|
2728
|
+
var __propIsEnum$F = Object.prototype.propertyIsEnumerable;
|
|
2729
|
+
var __defNormalProp$E = (obj, key, value) => key in obj ? __defProp$E(obj, key, {
|
|
2730
|
+
enumerable: true,
|
|
2731
|
+
configurable: true,
|
|
2732
|
+
writable: true,
|
|
2733
|
+
value
|
|
2734
|
+
}) : obj[key] = value;
|
|
2735
|
+
var __spreadValues$E = (a, b) => {
|
|
2736
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$F.call(b, prop)) __defNormalProp$E(a, prop, b[prop]);
|
|
2737
|
+
if (__getOwnPropSymbols$F) for (var prop of __getOwnPropSymbols$F(b)) {
|
|
2738
|
+
if (__propIsEnum$F.call(b, prop)) __defNormalProp$E(a, prop, b[prop]);
|
|
2705
2739
|
}
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2740
|
+
return a;
|
|
2741
|
+
};
|
|
2742
|
+
var __spreadProps$x = (a, b) => __defProps$x(a, __getOwnPropDescs$x(b));
|
|
2743
|
+
var __objRest$o = (source, exclude) => {
|
|
2744
|
+
var target = {};
|
|
2745
|
+
for (var prop in source) if (__hasOwnProp$F.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
2746
|
+
if (source != null && __getOwnPropSymbols$F) for (var prop of __getOwnPropSymbols$F(source)) {
|
|
2747
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$F.call(source, prop)) target[prop] = source[prop];
|
|
2748
|
+
}
|
|
2749
|
+
return target;
|
|
2750
|
+
};
|
|
2751
|
+
const _exp$3 = () => antd.InputNumber;
|
|
2752
|
+
const _exp2 = () => props => props.controls ? "initial" : "none";
|
|
2753
|
+
const _exp3 = () => props => `"${props.suffix ? props.suffix : ""}"`;
|
|
2754
|
+
const _exp4 = () => ({
|
|
2755
|
+
suffix
|
|
2756
|
+
}) => suffix ? "flex" : "none";
|
|
2757
|
+
const _exp5 = () => props => `"${props.prefix ? props.prefix : ""}"`;
|
|
2758
|
+
const _exp6 = () => ({
|
|
2759
|
+
prefix
|
|
2760
|
+
}) => prefix ? "flex" : "none";
|
|
2761
|
+
const AntdIntStyled = /*#__PURE__*/react$1.styled(_exp$3())({
|
|
2762
|
+
name: "AntdIntStyled",
|
|
2763
|
+
class: "at4ovwe",
|
|
2764
|
+
propsAsIs: true,
|
|
2765
|
+
vars: {
|
|
2766
|
+
"at4ovwe-0": [_exp2()],
|
|
2767
|
+
"at4ovwe-1": [_exp3()],
|
|
2768
|
+
"at4ovwe-2": [_exp4()],
|
|
2769
|
+
"at4ovwe-3": [_exp5()],
|
|
2770
|
+
"at4ovwe-4": [_exp6()]
|
|
2771
|
+
}
|
|
2772
|
+
});
|
|
2773
|
+
const InputInteger = _a => {
|
|
2774
|
+
var _b = _a,
|
|
2775
|
+
{
|
|
2776
|
+
className,
|
|
2777
|
+
error,
|
|
2778
|
+
size = "middle",
|
|
2779
|
+
suffix,
|
|
2780
|
+
prefix,
|
|
2781
|
+
max,
|
|
2782
|
+
min,
|
|
2783
|
+
controls = false
|
|
2784
|
+
} = _b,
|
|
2785
|
+
props = __objRest$o(_b, ["className", "error", "size", "suffix", "prefix", "max", "min", "controls"]);
|
|
2786
|
+
const typo = {
|
|
2787
|
+
large: Typo.Label.l2_regular,
|
|
2788
|
+
middle: Typo.Label.l3_regular,
|
|
2789
|
+
small: Typo.Label.l4_regular
|
|
2790
|
+
}[size];
|
|
2791
|
+
return /* @__PURE__ */React__namespace.default.createElement(AntdIntStyled, __spreadProps$x(__spreadValues$E({}, props), {
|
|
2792
|
+
size,
|
|
2793
|
+
formatter: formatterInteger,
|
|
2794
|
+
parser: formatterInteger,
|
|
2795
|
+
min,
|
|
2796
|
+
max,
|
|
2797
|
+
controls,
|
|
2798
|
+
"data-test": props.name,
|
|
2799
|
+
suffix: controls ? "" : suffix,
|
|
2800
|
+
prefix,
|
|
2801
|
+
className: cs__default.default(className, InputStyle, typo, error ? "error" : "")
|
|
2802
|
+
}));
|
|
2803
|
+
};
|
|
2804
|
+
|
|
2805
|
+
var __defProp$D = Object.defineProperty;
|
|
2806
|
+
var __defProps$w = Object.defineProperties;
|
|
2807
|
+
var __getOwnPropDescs$w = Object.getOwnPropertyDescriptors;
|
|
2808
|
+
var __getOwnPropSymbols$E = Object.getOwnPropertySymbols;
|
|
2809
|
+
var __hasOwnProp$E = Object.prototype.hasOwnProperty;
|
|
2810
|
+
var __propIsEnum$E = Object.prototype.propertyIsEnumerable;
|
|
2811
|
+
var __defNormalProp$D = (obj, key, value) => key in obj ? __defProp$D(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2812
|
+
var __spreadValues$D = (a, b) => {
|
|
2813
|
+
for (var prop in b || (b = {}))
|
|
2814
|
+
if (__hasOwnProp$E.call(b, prop))
|
|
2815
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
2816
|
+
if (__getOwnPropSymbols$E)
|
|
2817
|
+
for (var prop of __getOwnPropSymbols$E(b)) {
|
|
2818
|
+
if (__propIsEnum$E.call(b, prop))
|
|
2819
|
+
__defNormalProp$D(a, prop, b[prop]);
|
|
2728
2820
|
}
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
}
|
|
2742
|
-
if (!(date.date() in this.unitMap.dayOfMonth) && Object.keys(this.unitMap.dayOfMonth).length !== 31 && !(date.day() in this.unitMap.dayOfWeek && Object.keys(this.unitMap.dayOfWeek).length !== 7)) {
|
|
2743
|
-
date = date.add(1, "day").hour(0).minute(0).second(0);
|
|
2744
|
-
continue;
|
|
2745
|
-
}
|
|
2746
|
-
if (!(date.day() in this.unitMap.dayOfWeek) && Object.keys(this.unitMap.dayOfWeek).length !== 7 && !(date.date() in this.unitMap.dayOfMonth && Object.keys(this.unitMap.dayOfMonth).length !== 31)) {
|
|
2747
|
-
date = date.add(1, "day").hour(0).minute(0).second(0);
|
|
2748
|
-
continue;
|
|
2749
|
-
}
|
|
2750
|
-
if (!(date.hour() in this.unitMap.hour) && Object.keys(this.unitMap.hour).length !== 24) {
|
|
2751
|
-
date = date.hour(date.hour() === 23 && diff > 864e5 ? 0 : date.hour() + 1).minute(0).second(0);
|
|
2752
|
-
continue;
|
|
2753
|
-
}
|
|
2754
|
-
if (!(date.minute() in this.unitMap.minute) && Object.keys(this.unitMap.minute).length !== 60) {
|
|
2755
|
-
date = date.minute(
|
|
2756
|
-
date.minute() === 59 && diff > 36e5 ? 0 : date.minute() + 1
|
|
2757
|
-
).second(0);
|
|
2758
|
-
continue;
|
|
2759
|
-
}
|
|
2760
|
-
if (!(date.second() in this.unitMap.second) && Object.keys(this.unitMap.second).length !== 60) {
|
|
2761
|
-
date = date.second(
|
|
2762
|
-
date.second() === 59 && diff > 6e4 ? 0 : date.second() + 1
|
|
2763
|
-
);
|
|
2764
|
-
continue;
|
|
2765
|
-
}
|
|
2766
|
-
if (date.isSame(firstDate)) {
|
|
2767
|
-
date = date.add(1, "second");
|
|
2768
|
-
continue;
|
|
2769
|
-
}
|
|
2770
|
-
break;
|
|
2821
|
+
return a;
|
|
2822
|
+
};
|
|
2823
|
+
var __spreadProps$w = (a, b) => __defProps$w(a, __getOwnPropDescs$w(b));
|
|
2824
|
+
var __objRest$n = (source, exclude) => {
|
|
2825
|
+
var target = {};
|
|
2826
|
+
for (var prop in source)
|
|
2827
|
+
if (__hasOwnProp$E.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
2828
|
+
target[prop] = source[prop];
|
|
2829
|
+
if (source != null && __getOwnPropSymbols$E)
|
|
2830
|
+
for (var prop of __getOwnPropSymbols$E(source)) {
|
|
2831
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$E.call(source, prop))
|
|
2832
|
+
target[prop] = source[prop];
|
|
2771
2833
|
}
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2834
|
+
return target;
|
|
2835
|
+
};
|
|
2836
|
+
const FieldsInteger = (_a) => {
|
|
2837
|
+
var _b = _a, {
|
|
2838
|
+
meta,
|
|
2839
|
+
input,
|
|
2840
|
+
onBlur
|
|
2841
|
+
} = _b, props = __objRest$n(_b, [
|
|
2842
|
+
"meta",
|
|
2843
|
+
"input",
|
|
2844
|
+
"onBlur"
|
|
2845
|
+
]);
|
|
2846
|
+
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
2847
|
+
InputInteger,
|
|
2848
|
+
__spreadProps$w(__spreadValues$D(__spreadValues$D({}, props), input), {
|
|
2849
|
+
onBlur: (e) => onBlur ? onBlur(input, e) : input.onBlur(e),
|
|
2850
|
+
error: meta.touched && (meta.error || !meta.dirtySinceLastSubmit && meta.submitError)
|
|
2851
|
+
})
|
|
2852
|
+
));
|
|
2853
|
+
};
|
|
2854
|
+
|
|
2855
|
+
const InputTagItem = /*#__PURE__*/react$1.styled('span')({
|
|
2856
|
+
name: "InputTagItem",
|
|
2857
|
+
class: "iap75of",
|
|
2858
|
+
propsAsIs: false
|
|
2859
|
+
});
|
|
2860
|
+
|
|
2861
|
+
const transformToArray = (stringOrArray) => {
|
|
2862
|
+
return stringOrArray instanceof Array ? stringOrArray : [stringOrArray];
|
|
2863
|
+
};
|
|
2864
|
+
const onResizeElem = (element, callback) => {
|
|
2865
|
+
const els = transformToArray(element);
|
|
2866
|
+
const data = {
|
|
2867
|
+
els,
|
|
2868
|
+
offsetWidth: els.map((el) => el.offsetWidth),
|
|
2869
|
+
offsetHeight: els.map((el) => el.offsetHeight),
|
|
2870
|
+
callback
|
|
2871
|
+
};
|
|
2872
|
+
const checkForChanges = () => {
|
|
2873
|
+
const nextOffsetWidth = data.els.map((el) => el.offsetWidth);
|
|
2874
|
+
const nextOffsetHeight = data.els.map((el) => el.offsetWidth);
|
|
2875
|
+
if (!___default.default.isEqual(nextOffsetWidth, data.offsetWidth) || ___default.default.isEqual(nextOffsetHeight, data.offsetHeight)) {
|
|
2876
|
+
data.offsetWidth = nextOffsetWidth;
|
|
2877
|
+
data.offsetHeight = nextOffsetHeight;
|
|
2878
|
+
data.callback();
|
|
2780
2879
|
}
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2880
|
+
};
|
|
2881
|
+
const mutationObserver = new MutationObserver(checkForChanges);
|
|
2882
|
+
mutationObserver.observe(document.body, {
|
|
2883
|
+
attributes: true,
|
|
2884
|
+
subtree: true
|
|
2885
|
+
});
|
|
2886
|
+
window.addEventListener("resize", checkForChanges);
|
|
2887
|
+
const disconnect = () => {
|
|
2888
|
+
window.removeEventListener("resize", checkForChanges);
|
|
2889
|
+
mutationObserver.disconnect();
|
|
2890
|
+
};
|
|
2891
|
+
return disconnect;
|
|
2892
|
+
};
|
|
2893
|
+
const useElementResize = (klass, cb, depend) => {
|
|
2894
|
+
const klasses = transformToArray(klass);
|
|
2895
|
+
React.useEffect(() => {
|
|
2896
|
+
let els = [];
|
|
2897
|
+
if (typeof klass === "object" && "current" in klass) {
|
|
2898
|
+
els = klass.current ? [klass.current] : [];
|
|
2899
|
+
} else {
|
|
2900
|
+
klasses.forEach((klass2) => {
|
|
2901
|
+
const arr = Array.from(
|
|
2902
|
+
document.querySelectorAll(klass2)
|
|
2903
|
+
);
|
|
2904
|
+
if (arr.length > 0) {
|
|
2905
|
+
els = [...els, ...arr];
|
|
2906
|
+
}
|
|
2907
|
+
});
|
|
2784
2908
|
}
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2909
|
+
if (!els.length)
|
|
2910
|
+
return;
|
|
2911
|
+
if (typeof ResizeObserver === "function") {
|
|
2912
|
+
const resizeObserver = new ResizeObserver(cb);
|
|
2913
|
+
els.forEach((el) => {
|
|
2914
|
+
resizeObserver.observe(el);
|
|
2915
|
+
});
|
|
2916
|
+
return () => resizeObserver.disconnect();
|
|
2917
|
+
} else {
|
|
2918
|
+
return onResizeElem(Array.from(els), cb);
|
|
2793
2919
|
}
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2920
|
+
}, [cb, ...depend || []]);
|
|
2921
|
+
};
|
|
2922
|
+
|
|
2923
|
+
const EMPTY_FUNCTION = () => {
|
|
2924
|
+
};
|
|
2797
2925
|
|
|
2798
2926
|
function getSize(el) {
|
|
2799
2927
|
if (!el) {
|
|
@@ -2985,21 +3113,21 @@
|
|
|
2985
3113
|
}, children), showOverflow && /* @__PURE__ */React__namespace.default.createElement("span", null, overflow));
|
|
2986
3114
|
};
|
|
2987
3115
|
|
|
2988
|
-
var __defProp$
|
|
3116
|
+
var __defProp$C = Object.defineProperty;
|
|
2989
3117
|
var __defProps$v = Object.defineProperties;
|
|
2990
3118
|
var __getOwnPropDescs$v = Object.getOwnPropertyDescriptors;
|
|
2991
|
-
var __getOwnPropSymbols$
|
|
2992
|
-
var __hasOwnProp$
|
|
2993
|
-
var __propIsEnum$
|
|
2994
|
-
var __defNormalProp$
|
|
2995
|
-
var __spreadValues$
|
|
3119
|
+
var __getOwnPropSymbols$D = Object.getOwnPropertySymbols;
|
|
3120
|
+
var __hasOwnProp$D = Object.prototype.hasOwnProperty;
|
|
3121
|
+
var __propIsEnum$D = Object.prototype.propertyIsEnumerable;
|
|
3122
|
+
var __defNormalProp$C = (obj, key, value) => key in obj ? __defProp$C(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3123
|
+
var __spreadValues$C = (a, b) => {
|
|
2996
3124
|
for (var prop in b || (b = {}))
|
|
2997
|
-
if (__hasOwnProp$
|
|
2998
|
-
__defNormalProp$
|
|
2999
|
-
if (__getOwnPropSymbols$
|
|
3000
|
-
for (var prop of __getOwnPropSymbols$
|
|
3001
|
-
if (__propIsEnum$
|
|
3002
|
-
__defNormalProp$
|
|
3125
|
+
if (__hasOwnProp$D.call(b, prop))
|
|
3126
|
+
__defNormalProp$C(a, prop, b[prop]);
|
|
3127
|
+
if (__getOwnPropSymbols$D)
|
|
3128
|
+
for (var prop of __getOwnPropSymbols$D(b)) {
|
|
3129
|
+
if (__propIsEnum$D.call(b, prop))
|
|
3130
|
+
__defNormalProp$C(a, prop, b[prop]);
|
|
3003
3131
|
}
|
|
3004
3132
|
return a;
|
|
3005
3133
|
};
|
|
@@ -3007,11 +3135,11 @@
|
|
|
3007
3135
|
var __objRest$m = (source, exclude) => {
|
|
3008
3136
|
var target = {};
|
|
3009
3137
|
for (var prop in source)
|
|
3010
|
-
if (__hasOwnProp$
|
|
3138
|
+
if (__hasOwnProp$D.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3011
3139
|
target[prop] = source[prop];
|
|
3012
|
-
if (source != null && __getOwnPropSymbols$
|
|
3013
|
-
for (var prop of __getOwnPropSymbols$
|
|
3014
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3140
|
+
if (source != null && __getOwnPropSymbols$D)
|
|
3141
|
+
for (var prop of __getOwnPropSymbols$D(source)) {
|
|
3142
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$D.call(source, prop))
|
|
3015
3143
|
target[prop] = source[prop];
|
|
3016
3144
|
}
|
|
3017
3145
|
return target;
|
|
@@ -3062,7 +3190,7 @@
|
|
|
3062
3190
|
}
|
|
3063
3191
|
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
3064
3192
|
Input,
|
|
3065
|
-
__spreadProps$v(__spreadValues$
|
|
3193
|
+
__spreadProps$v(__spreadValues$C(__spreadProps$v(__spreadValues$C({
|
|
3066
3194
|
className: cs__default.default(
|
|
3067
3195
|
className,
|
|
3068
3196
|
KitInputStyle,
|
|
@@ -3087,21 +3215,21 @@
|
|
|
3087
3215
|
));
|
|
3088
3216
|
};
|
|
3089
3217
|
|
|
3090
|
-
var __defProp$
|
|
3218
|
+
var __defProp$B = Object.defineProperty;
|
|
3091
3219
|
var __defProps$u = Object.defineProperties;
|
|
3092
3220
|
var __getOwnPropDescs$u = Object.getOwnPropertyDescriptors;
|
|
3093
|
-
var __getOwnPropSymbols$
|
|
3094
|
-
var __hasOwnProp$
|
|
3095
|
-
var __propIsEnum$
|
|
3096
|
-
var __defNormalProp$
|
|
3097
|
-
var __spreadValues$
|
|
3221
|
+
var __getOwnPropSymbols$C = Object.getOwnPropertySymbols;
|
|
3222
|
+
var __hasOwnProp$C = Object.prototype.hasOwnProperty;
|
|
3223
|
+
var __propIsEnum$C = Object.prototype.propertyIsEnumerable;
|
|
3224
|
+
var __defNormalProp$B = (obj, key, value) => key in obj ? __defProp$B(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3225
|
+
var __spreadValues$B = (a, b) => {
|
|
3098
3226
|
for (var prop in b || (b = {}))
|
|
3099
|
-
if (__hasOwnProp$
|
|
3100
|
-
__defNormalProp$
|
|
3101
|
-
if (__getOwnPropSymbols$
|
|
3102
|
-
for (var prop of __getOwnPropSymbols$
|
|
3103
|
-
if (__propIsEnum$
|
|
3104
|
-
__defNormalProp$
|
|
3227
|
+
if (__hasOwnProp$C.call(b, prop))
|
|
3228
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
3229
|
+
if (__getOwnPropSymbols$C)
|
|
3230
|
+
for (var prop of __getOwnPropSymbols$C(b)) {
|
|
3231
|
+
if (__propIsEnum$C.call(b, prop))
|
|
3232
|
+
__defNormalProp$B(a, prop, b[prop]);
|
|
3105
3233
|
}
|
|
3106
3234
|
return a;
|
|
3107
3235
|
};
|
|
@@ -3109,11 +3237,11 @@
|
|
|
3109
3237
|
var __objRest$l = (source, exclude) => {
|
|
3110
3238
|
var target = {};
|
|
3111
3239
|
for (var prop in source)
|
|
3112
|
-
if (__hasOwnProp$
|
|
3240
|
+
if (__hasOwnProp$C.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3113
3241
|
target[prop] = source[prop];
|
|
3114
|
-
if (source != null && __getOwnPropSymbols$
|
|
3115
|
-
for (var prop of __getOwnPropSymbols$
|
|
3116
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3242
|
+
if (source != null && __getOwnPropSymbols$C)
|
|
3243
|
+
for (var prop of __getOwnPropSymbols$C(source)) {
|
|
3244
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$C.call(source, prop))
|
|
3117
3245
|
target[prop] = source[prop];
|
|
3118
3246
|
}
|
|
3119
3247
|
return target;
|
|
@@ -3135,7 +3263,7 @@
|
|
|
3135
3263
|
}[size];
|
|
3136
3264
|
return /* @__PURE__ */ React__namespace.default.createElement(
|
|
3137
3265
|
antd.Input.TextArea,
|
|
3138
|
-
__spreadProps$u(__spreadValues$
|
|
3266
|
+
__spreadProps$u(__spreadValues$B({}, props), {
|
|
3139
3267
|
className: cs__default.default(
|
|
3140
3268
|
className,
|
|
3141
3269
|
InputStyle,
|
|
@@ -3149,21 +3277,21 @@
|
|
|
3149
3277
|
);
|
|
3150
3278
|
};
|
|
3151
3279
|
|
|
3152
|
-
var __defProp$
|
|
3280
|
+
var __defProp$A = Object.defineProperty;
|
|
3153
3281
|
var __defProps$t = Object.defineProperties;
|
|
3154
3282
|
var __getOwnPropDescs$t = Object.getOwnPropertyDescriptors;
|
|
3155
|
-
var __getOwnPropSymbols$
|
|
3156
|
-
var __hasOwnProp$
|
|
3157
|
-
var __propIsEnum$
|
|
3158
|
-
var __defNormalProp$
|
|
3159
|
-
var __spreadValues$
|
|
3283
|
+
var __getOwnPropSymbols$B = Object.getOwnPropertySymbols;
|
|
3284
|
+
var __hasOwnProp$B = Object.prototype.hasOwnProperty;
|
|
3285
|
+
var __propIsEnum$B = Object.prototype.propertyIsEnumerable;
|
|
3286
|
+
var __defNormalProp$A = (obj, key, value) => key in obj ? __defProp$A(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3287
|
+
var __spreadValues$A = (a, b) => {
|
|
3160
3288
|
for (var prop in b || (b = {}))
|
|
3161
|
-
if (__hasOwnProp$
|
|
3162
|
-
__defNormalProp$
|
|
3163
|
-
if (__getOwnPropSymbols$
|
|
3164
|
-
for (var prop of __getOwnPropSymbols$
|
|
3165
|
-
if (__propIsEnum$
|
|
3166
|
-
__defNormalProp$
|
|
3289
|
+
if (__hasOwnProp$B.call(b, prop))
|
|
3290
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
3291
|
+
if (__getOwnPropSymbols$B)
|
|
3292
|
+
for (var prop of __getOwnPropSymbols$B(b)) {
|
|
3293
|
+
if (__propIsEnum$B.call(b, prop))
|
|
3294
|
+
__defNormalProp$A(a, prop, b[prop]);
|
|
3167
3295
|
}
|
|
3168
3296
|
return a;
|
|
3169
3297
|
};
|
|
@@ -3171,11 +3299,11 @@
|
|
|
3171
3299
|
var __objRest$k = (source, exclude) => {
|
|
3172
3300
|
var target = {};
|
|
3173
3301
|
for (var prop in source)
|
|
3174
|
-
if (__hasOwnProp$
|
|
3302
|
+
if (__hasOwnProp$B.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3175
3303
|
target[prop] = source[prop];
|
|
3176
|
-
if (source != null && __getOwnPropSymbols$
|
|
3177
|
-
for (var prop of __getOwnPropSymbols$
|
|
3178
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3304
|
+
if (source != null && __getOwnPropSymbols$B)
|
|
3305
|
+
for (var prop of __getOwnPropSymbols$B(source)) {
|
|
3306
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$B.call(source, prop))
|
|
3179
3307
|
target[prop] = source[prop];
|
|
3180
3308
|
}
|
|
3181
3309
|
return target;
|
|
@@ -3192,7 +3320,7 @@
|
|
|
3192
3320
|
]);
|
|
3193
3321
|
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
3194
3322
|
TextArea,
|
|
3195
|
-
__spreadProps$t(__spreadValues$
|
|
3323
|
+
__spreadProps$t(__spreadValues$A(__spreadValues$A({}, input), props), {
|
|
3196
3324
|
error: meta.touched && (meta.error || !meta.dirtySinceLastSubmit && meta.submitError),
|
|
3197
3325
|
onFocus: (e) => {
|
|
3198
3326
|
input.onFocus(e);
|
|
@@ -3206,21 +3334,21 @@
|
|
|
3206
3334
|
));
|
|
3207
3335
|
};
|
|
3208
3336
|
|
|
3209
|
-
var __defProp$
|
|
3337
|
+
var __defProp$z = Object.defineProperty;
|
|
3210
3338
|
var __defProps$s = Object.defineProperties;
|
|
3211
3339
|
var __getOwnPropDescs$s = Object.getOwnPropertyDescriptors;
|
|
3212
|
-
var __getOwnPropSymbols$
|
|
3213
|
-
var __hasOwnProp$
|
|
3214
|
-
var __propIsEnum$
|
|
3215
|
-
var __defNormalProp$
|
|
3216
|
-
var __spreadValues$
|
|
3340
|
+
var __getOwnPropSymbols$A = Object.getOwnPropertySymbols;
|
|
3341
|
+
var __hasOwnProp$A = Object.prototype.hasOwnProperty;
|
|
3342
|
+
var __propIsEnum$A = Object.prototype.propertyIsEnumerable;
|
|
3343
|
+
var __defNormalProp$z = (obj, key, value) => key in obj ? __defProp$z(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3344
|
+
var __spreadValues$z = (a, b) => {
|
|
3217
3345
|
for (var prop in b || (b = {}))
|
|
3218
|
-
if (__hasOwnProp$
|
|
3219
|
-
__defNormalProp$
|
|
3220
|
-
if (__getOwnPropSymbols$
|
|
3221
|
-
for (var prop of __getOwnPropSymbols$
|
|
3222
|
-
if (__propIsEnum$
|
|
3223
|
-
__defNormalProp$
|
|
3346
|
+
if (__hasOwnProp$A.call(b, prop))
|
|
3347
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
3348
|
+
if (__getOwnPropSymbols$A)
|
|
3349
|
+
for (var prop of __getOwnPropSymbols$A(b)) {
|
|
3350
|
+
if (__propIsEnum$A.call(b, prop))
|
|
3351
|
+
__defNormalProp$z(a, prop, b[prop]);
|
|
3224
3352
|
}
|
|
3225
3353
|
return a;
|
|
3226
3354
|
};
|
|
@@ -3228,11 +3356,11 @@
|
|
|
3228
3356
|
var __objRest$j = (source, exclude) => {
|
|
3229
3357
|
var target = {};
|
|
3230
3358
|
for (var prop in source)
|
|
3231
|
-
if (__hasOwnProp$
|
|
3359
|
+
if (__hasOwnProp$A.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3232
3360
|
target[prop] = source[prop];
|
|
3233
|
-
if (source != null && __getOwnPropSymbols$
|
|
3234
|
-
for (var prop of __getOwnPropSymbols$
|
|
3235
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3361
|
+
if (source != null && __getOwnPropSymbols$A)
|
|
3362
|
+
for (var prop of __getOwnPropSymbols$A(source)) {
|
|
3363
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$A.call(source, prop))
|
|
3236
3364
|
target[prop] = source[prop];
|
|
3237
3365
|
}
|
|
3238
3366
|
return target;
|
|
@@ -3254,7 +3382,7 @@
|
|
|
3254
3382
|
}[size];
|
|
3255
3383
|
return /* @__PURE__ */ React__namespace.default.createElement(
|
|
3256
3384
|
antd.TimePicker,
|
|
3257
|
-
__spreadProps$s(__spreadValues$
|
|
3385
|
+
__spreadProps$s(__spreadValues$z({}, props), {
|
|
3258
3386
|
size,
|
|
3259
3387
|
"data-test": props.name,
|
|
3260
3388
|
className: cs__default.default(className, InputStyle, typo, error ? "error" : "")
|
|
@@ -3262,21 +3390,21 @@
|
|
|
3262
3390
|
);
|
|
3263
3391
|
};
|
|
3264
3392
|
|
|
3265
|
-
var __defProp$
|
|
3393
|
+
var __defProp$y = Object.defineProperty;
|
|
3266
3394
|
var __defProps$r = Object.defineProperties;
|
|
3267
3395
|
var __getOwnPropDescs$r = Object.getOwnPropertyDescriptors;
|
|
3268
|
-
var __getOwnPropSymbols$
|
|
3269
|
-
var __hasOwnProp$
|
|
3270
|
-
var __propIsEnum$
|
|
3271
|
-
var __defNormalProp$
|
|
3272
|
-
var __spreadValues$
|
|
3396
|
+
var __getOwnPropSymbols$z = Object.getOwnPropertySymbols;
|
|
3397
|
+
var __hasOwnProp$z = Object.prototype.hasOwnProperty;
|
|
3398
|
+
var __propIsEnum$z = Object.prototype.propertyIsEnumerable;
|
|
3399
|
+
var __defNormalProp$y = (obj, key, value) => key in obj ? __defProp$y(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3400
|
+
var __spreadValues$y = (a, b) => {
|
|
3273
3401
|
for (var prop in b || (b = {}))
|
|
3274
|
-
if (__hasOwnProp$
|
|
3275
|
-
__defNormalProp$
|
|
3276
|
-
if (__getOwnPropSymbols$
|
|
3277
|
-
for (var prop of __getOwnPropSymbols$
|
|
3278
|
-
if (__propIsEnum$
|
|
3279
|
-
__defNormalProp$
|
|
3402
|
+
if (__hasOwnProp$z.call(b, prop))
|
|
3403
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
3404
|
+
if (__getOwnPropSymbols$z)
|
|
3405
|
+
for (var prop of __getOwnPropSymbols$z(b)) {
|
|
3406
|
+
if (__propIsEnum$z.call(b, prop))
|
|
3407
|
+
__defNormalProp$y(a, prop, b[prop]);
|
|
3280
3408
|
}
|
|
3281
3409
|
return a;
|
|
3282
3410
|
};
|
|
@@ -3284,11 +3412,11 @@
|
|
|
3284
3412
|
var __objRest$i = (source, exclude) => {
|
|
3285
3413
|
var target = {};
|
|
3286
3414
|
for (var prop in source)
|
|
3287
|
-
if (__hasOwnProp$
|
|
3415
|
+
if (__hasOwnProp$z.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
3288
3416
|
target[prop] = source[prop];
|
|
3289
|
-
if (source != null && __getOwnPropSymbols$
|
|
3290
|
-
for (var prop of __getOwnPropSymbols$
|
|
3291
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3417
|
+
if (source != null && __getOwnPropSymbols$z)
|
|
3418
|
+
for (var prop of __getOwnPropSymbols$z(source)) {
|
|
3419
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$z.call(source, prop))
|
|
3292
3420
|
target[prop] = source[prop];
|
|
3293
3421
|
}
|
|
3294
3422
|
return target;
|
|
@@ -3303,7 +3431,7 @@
|
|
|
3303
3431
|
]);
|
|
3304
3432
|
return /* @__PURE__ */ React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */ React__namespace.default.createElement(
|
|
3305
3433
|
TimePicker,
|
|
3306
|
-
__spreadValues$
|
|
3434
|
+
__spreadValues$y(__spreadProps$r(__spreadValues$y({}, input), {
|
|
3307
3435
|
error: meta.touched && (meta.error || !meta.dirtySinceLastSubmit && meta.submitError)
|
|
3308
3436
|
}), props)
|
|
3309
3437
|
));
|
|
@@ -3322,31 +3450,31 @@
|
|
|
3322
3450
|
DateTimeRange: FieldsDateTimeRange
|
|
3323
3451
|
};
|
|
3324
3452
|
|
|
3325
|
-
var __defProp$
|
|
3453
|
+
var __defProp$x = Object.defineProperty;
|
|
3326
3454
|
var __defProps$q = Object.defineProperties;
|
|
3327
3455
|
var __getOwnPropDescs$q = Object.getOwnPropertyDescriptors;
|
|
3328
|
-
var __getOwnPropSymbols$
|
|
3329
|
-
var __hasOwnProp$
|
|
3330
|
-
var __propIsEnum$
|
|
3331
|
-
var __defNormalProp$
|
|
3456
|
+
var __getOwnPropSymbols$y = Object.getOwnPropertySymbols;
|
|
3457
|
+
var __hasOwnProp$y = Object.prototype.hasOwnProperty;
|
|
3458
|
+
var __propIsEnum$y = Object.prototype.propertyIsEnumerable;
|
|
3459
|
+
var __defNormalProp$x = (obj, key, value) => key in obj ? __defProp$x(obj, key, {
|
|
3332
3460
|
enumerable: true,
|
|
3333
3461
|
configurable: true,
|
|
3334
3462
|
writable: true,
|
|
3335
3463
|
value
|
|
3336
3464
|
}) : obj[key] = value;
|
|
3337
|
-
var __spreadValues$
|
|
3338
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
3339
|
-
if (__getOwnPropSymbols$
|
|
3340
|
-
if (__propIsEnum$
|
|
3465
|
+
var __spreadValues$x = (a, b) => {
|
|
3466
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$y.call(b, prop)) __defNormalProp$x(a, prop, b[prop]);
|
|
3467
|
+
if (__getOwnPropSymbols$y) for (var prop of __getOwnPropSymbols$y(b)) {
|
|
3468
|
+
if (__propIsEnum$y.call(b, prop)) __defNormalProp$x(a, prop, b[prop]);
|
|
3341
3469
|
}
|
|
3342
3470
|
return a;
|
|
3343
3471
|
};
|
|
3344
3472
|
var __spreadProps$q = (a, b) => __defProps$q(a, __getOwnPropDescs$q(b));
|
|
3345
3473
|
var __objRest$h = (source, exclude) => {
|
|
3346
3474
|
var target = {};
|
|
3347
|
-
for (var prop in source) if (__hasOwnProp$
|
|
3348
|
-
if (source != null && __getOwnPropSymbols$
|
|
3349
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
3475
|
+
for (var prop in source) if (__hasOwnProp$y.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
3476
|
+
if (source != null && __getOwnPropSymbols$y) for (var prop of __getOwnPropSymbols$y(source)) {
|
|
3477
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$y.call(source, prop)) target[prop] = source[prop];
|
|
3350
3478
|
}
|
|
3351
3479
|
return target;
|
|
3352
3480
|
};
|
|
@@ -3366,7 +3494,7 @@
|
|
|
3366
3494
|
});
|
|
3367
3495
|
const classNames = [className, SwitchStyle, "switch"];
|
|
3368
3496
|
if (props.size === "large") classNames.push("ant-switch-large");
|
|
3369
|
-
return /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */React__namespace.default.createElement(antd.Switch, __spreadProps$q(__spreadValues$
|
|
3497
|
+
return /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */React__namespace.default.createElement(antd.Switch, __spreadProps$q(__spreadValues$x({
|
|
3370
3498
|
className: core.cx(...classNames),
|
|
3371
3499
|
checked: checked || false
|
|
3372
3500
|
}, props), {
|
|
@@ -3374,22 +3502,22 @@
|
|
|
3374
3502
|
})), children ? /* @__PURE__ */React__namespace.default.createElement(Content, null, children) : null);
|
|
3375
3503
|
};
|
|
3376
3504
|
|
|
3377
|
-
var __defProp$
|
|
3378
|
-
var __defProps$p = Object.defineProperties;
|
|
3379
|
-
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
3380
|
-
var __getOwnPropSymbols$
|
|
3381
|
-
var __hasOwnProp$
|
|
3382
|
-
var __propIsEnum$
|
|
3383
|
-
var __defNormalProp$
|
|
3505
|
+
var __defProp$w = Object.defineProperty;
|
|
3506
|
+
var __defProps$p = Object.defineProperties;
|
|
3507
|
+
var __getOwnPropDescs$p = Object.getOwnPropertyDescriptors;
|
|
3508
|
+
var __getOwnPropSymbols$x = Object.getOwnPropertySymbols;
|
|
3509
|
+
var __hasOwnProp$x = Object.prototype.hasOwnProperty;
|
|
3510
|
+
var __propIsEnum$x = Object.prototype.propertyIsEnumerable;
|
|
3511
|
+
var __defNormalProp$w = (obj, key, value) => key in obj ? __defProp$w(obj, key, {
|
|
3384
3512
|
enumerable: true,
|
|
3385
3513
|
configurable: true,
|
|
3386
3514
|
writable: true,
|
|
3387
3515
|
value
|
|
3388
3516
|
}) : obj[key] = value;
|
|
3389
|
-
var __spreadValues$
|
|
3390
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
3391
|
-
if (__getOwnPropSymbols$
|
|
3392
|
-
if (__propIsEnum$
|
|
3517
|
+
var __spreadValues$w = (a, b) => {
|
|
3518
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$x.call(b, prop)) __defNormalProp$w(a, prop, b[prop]);
|
|
3519
|
+
if (__getOwnPropSymbols$x) for (var prop of __getOwnPropSymbols$x(b)) {
|
|
3520
|
+
if (__propIsEnum$x.call(b, prop)) __defNormalProp$w(a, prop, b[prop]);
|
|
3393
3521
|
}
|
|
3394
3522
|
return a;
|
|
3395
3523
|
};
|
|
@@ -3488,7 +3616,7 @@
|
|
|
3488
3616
|
input: {
|
|
3489
3617
|
value: daily.step,
|
|
3490
3618
|
onChange: value => {
|
|
3491
|
-
setDaily(__spreadProps$p(__spreadValues$
|
|
3619
|
+
setDaily(__spreadProps$p(__spreadValues$w({}, daily), {
|
|
3492
3620
|
step: value
|
|
3493
3621
|
}));
|
|
3494
3622
|
},
|
|
@@ -3502,7 +3630,7 @@
|
|
|
3502
3630
|
value: daily.time,
|
|
3503
3631
|
onChange: value => {
|
|
3504
3632
|
if (value) {
|
|
3505
|
-
setDaily(__spreadProps$p(__spreadValues$
|
|
3633
|
+
setDaily(__spreadProps$p(__spreadValues$w({}, daily), {
|
|
3506
3634
|
time: value
|
|
3507
3635
|
}));
|
|
3508
3636
|
}
|
|
@@ -3557,7 +3685,7 @@
|
|
|
3557
3685
|
input: {
|
|
3558
3686
|
value: weekly.step,
|
|
3559
3687
|
onChange: value => {
|
|
3560
|
-
setWeekly(__spreadProps$p(__spreadValues$
|
|
3688
|
+
setWeekly(__spreadProps$p(__spreadValues$w({}, weekly), {
|
|
3561
3689
|
step: value
|
|
3562
3690
|
}));
|
|
3563
3691
|
},
|
|
@@ -3574,7 +3702,7 @@
|
|
|
3574
3702
|
className: linaria.cx("week-day-option", active && "active", i18n.language === parrot.ParrotLngs.en && "en-text"),
|
|
3575
3703
|
type: "default",
|
|
3576
3704
|
key: d.value,
|
|
3577
|
-
onClick: () => setWeekly(__spreadProps$p(__spreadValues$
|
|
3705
|
+
onClick: () => setWeekly(__spreadProps$p(__spreadValues$w({}, weekly), {
|
|
3578
3706
|
days: active ? weekly.days.filter(day => day !== d.value) : weekly.days.concat(d.value).sort((a, b) => a - b)
|
|
3579
3707
|
}))
|
|
3580
3708
|
}, d.text);
|
|
@@ -3586,7 +3714,7 @@
|
|
|
3586
3714
|
value: weekly.time,
|
|
3587
3715
|
onChange: value => {
|
|
3588
3716
|
if (value) {
|
|
3589
|
-
setWeekly(__spreadProps$p(__spreadValues$
|
|
3717
|
+
setWeekly(__spreadProps$p(__spreadValues$w({}, weekly), {
|
|
3590
3718
|
time: value
|
|
3591
3719
|
}));
|
|
3592
3720
|
}
|
|
@@ -3613,7 +3741,7 @@
|
|
|
3613
3741
|
input: {
|
|
3614
3742
|
value: monthly.step,
|
|
3615
3743
|
onChange: value => {
|
|
3616
|
-
setMonthly(__spreadProps$p(__spreadValues$
|
|
3744
|
+
setMonthly(__spreadProps$p(__spreadValues$w({}, monthly), {
|
|
3617
3745
|
step: value
|
|
3618
3746
|
}));
|
|
3619
3747
|
},
|
|
@@ -3630,7 +3758,7 @@
|
|
|
3630
3758
|
className: linaria.cx("month-day-option", active && "active"),
|
|
3631
3759
|
type: "default",
|
|
3632
3760
|
key: d,
|
|
3633
|
-
onClick: () => setMonthly(__spreadProps$p(__spreadValues$
|
|
3761
|
+
onClick: () => setMonthly(__spreadProps$p(__spreadValues$w({}, monthly), {
|
|
3634
3762
|
days: active ? monthly.days.filter(day => day !== d) : monthly.days.concat(d).sort((a, b) => a - b)
|
|
3635
3763
|
}))
|
|
3636
3764
|
}, d);
|
|
@@ -3646,7 +3774,7 @@
|
|
|
3646
3774
|
value: monthly.time,
|
|
3647
3775
|
onChange: value => {
|
|
3648
3776
|
if (value) {
|
|
3649
|
-
setMonthly(__spreadProps$p(__spreadValues$
|
|
3777
|
+
setMonthly(__spreadProps$p(__spreadValues$w({}, monthly), {
|
|
3650
3778
|
time: value
|
|
3651
3779
|
}));
|
|
3652
3780
|
}
|
|
@@ -3670,7 +3798,7 @@
|
|
|
3670
3798
|
}, [value]);
|
|
3671
3799
|
const sendAtDate = React.useMemo(() => cronTime.sendAt(), [cronTime]);
|
|
3672
3800
|
const changeValue = newValue => {
|
|
3673
|
-
onChange(__spreadValues$
|
|
3801
|
+
onChange(__spreadValues$w(__spreadValues$w({}, value), newValue));
|
|
3674
3802
|
};
|
|
3675
3803
|
const [mode, setMode] = React.useState(getMode(cronTime["source"]));
|
|
3676
3804
|
const source = cronTime["source"];
|
|
@@ -3678,19 +3806,19 @@
|
|
|
3678
3806
|
const time = getTime(cronTime);
|
|
3679
3807
|
const [daily, setDaily] = React.useState(() => {
|
|
3680
3808
|
const rawDaily = getDaily(mode, source, time);
|
|
3681
|
-
return __spreadProps$p(__spreadValues$
|
|
3809
|
+
return __spreadProps$p(__spreadValues$w({}, rawDaily), {
|
|
3682
3810
|
time: moment__default.default(rawDaily.time.format())
|
|
3683
3811
|
});
|
|
3684
3812
|
});
|
|
3685
3813
|
const [weekly, setWeekly] = React.useState(() => {
|
|
3686
3814
|
const rawWeekly = getWeekly(mode, source, time);
|
|
3687
|
-
return __spreadProps$p(__spreadValues$
|
|
3815
|
+
return __spreadProps$p(__spreadValues$w({}, rawWeekly), {
|
|
3688
3816
|
time: moment__default.default(rawWeekly.time.format())
|
|
3689
3817
|
});
|
|
3690
3818
|
});
|
|
3691
3819
|
const [monthly, setMonthly] = React.useState(() => {
|
|
3692
3820
|
const rawMonthly = getMonthly(mode, month, day, time);
|
|
3693
|
-
return __spreadProps$p(__spreadValues$
|
|
3821
|
+
return __spreadProps$p(__spreadValues$w({}, rawMonthly), {
|
|
3694
3822
|
time: moment__default.default(rawMonthly.time.format())
|
|
3695
3823
|
});
|
|
3696
3824
|
});
|
|
@@ -3873,28 +4001,128 @@
|
|
|
3873
4001
|
}, children));
|
|
3874
4002
|
};
|
|
3875
4003
|
|
|
3876
|
-
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
|
|
3880
|
-
|
|
4004
|
+
const Table$1 = /*#__PURE__*/react$1.styled('div')({
|
|
4005
|
+
name: "Table",
|
|
4006
|
+
class: "t1sqg15u",
|
|
4007
|
+
propsAsIs: false
|
|
4008
|
+
});
|
|
4009
|
+
const TableHeader = /*#__PURE__*/react$1.styled('header')({
|
|
4010
|
+
name: "TableHeader",
|
|
4011
|
+
class: "t4zczcp",
|
|
4012
|
+
propsAsIs: false
|
|
4013
|
+
});
|
|
4014
|
+
const TableContent = /*#__PURE__*/react$1.styled('div')({
|
|
4015
|
+
name: "TableContent",
|
|
4016
|
+
class: "t1s7goww",
|
|
4017
|
+
propsAsIs: false
|
|
4018
|
+
});
|
|
4019
|
+
const TableRow = /*#__PURE__*/react$1.styled('div')({
|
|
4020
|
+
name: "TableRow",
|
|
4021
|
+
class: "t93e4cf",
|
|
4022
|
+
propsAsIs: false
|
|
4023
|
+
});
|
|
4024
|
+
const _exp$2 = () => props => props.width;
|
|
4025
|
+
const RowLabel = /*#__PURE__*/react$1.styled('label')({
|
|
4026
|
+
name: "RowLabel",
|
|
4027
|
+
class: "rhz2uv5",
|
|
4028
|
+
propsAsIs: false,
|
|
4029
|
+
vars: {
|
|
4030
|
+
"rhz2uv5-0": [_exp$2()]
|
|
4031
|
+
}
|
|
4032
|
+
});
|
|
4033
|
+
const SummaryTableRow = props => {
|
|
4034
|
+
const {
|
|
4035
|
+
labelWidth = "42%",
|
|
4036
|
+
title,
|
|
4037
|
+
children,
|
|
4038
|
+
hiddenTitle = false,
|
|
4039
|
+
hiddenBorder = false
|
|
4040
|
+
} = props;
|
|
4041
|
+
return /* @__PURE__ */React__namespace.default.createElement(TableRow, {
|
|
4042
|
+
className: cs__default.default("table-row", {
|
|
4043
|
+
hiddenBorder
|
|
4044
|
+
})
|
|
4045
|
+
}, /* @__PURE__ */React__namespace.default.createElement(RowLabel, {
|
|
4046
|
+
width: labelWidth,
|
|
4047
|
+
className: cs__default.default({
|
|
4048
|
+
hidden: hiddenTitle
|
|
4049
|
+
})
|
|
4050
|
+
}, title), /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
4051
|
+
className: "content"
|
|
4052
|
+
}, children));
|
|
4053
|
+
};
|
|
4054
|
+
const SummaryTableContent = props => {
|
|
4055
|
+
const {
|
|
4056
|
+
items,
|
|
4057
|
+
labelWidth,
|
|
4058
|
+
dataSource
|
|
4059
|
+
} = props;
|
|
4060
|
+
return /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, items.map(item => {
|
|
4061
|
+
console.log("item", item);
|
|
4062
|
+
if (item.dataIndex === "[__typename]") {
|
|
4063
|
+
return null;
|
|
4064
|
+
}
|
|
4065
|
+
const value = ___default.default.get(dataSource, item.dataIndex);
|
|
4066
|
+
return /* @__PURE__ */React__namespace.default.createElement(SummaryTableRow, {
|
|
4067
|
+
key: item.key,
|
|
4068
|
+
labelWidth,
|
|
4069
|
+
hiddenTitle: item == null ? void 0 : item.hiddenTitle,
|
|
4070
|
+
hiddenBorder: item == null ? void 0 : item.hiddenBorder,
|
|
4071
|
+
title: item.title
|
|
4072
|
+
}, item.render ? item.render(value, dataSource) : ___default.default.isNull(value) || ___default.default.isUndefined(value) || value === "" ? Empty : value);
|
|
4073
|
+
}));
|
|
4074
|
+
};
|
|
4075
|
+
const SummaryTable = props => {
|
|
4076
|
+
const {
|
|
4077
|
+
showHeader = true,
|
|
4078
|
+
border = true,
|
|
4079
|
+
className,
|
|
4080
|
+
title,
|
|
4081
|
+
showEdit,
|
|
4082
|
+
onEdit,
|
|
4083
|
+
rightAlign,
|
|
4084
|
+
layout = "horizontal"
|
|
4085
|
+
} = props;
|
|
4086
|
+
return /* @__PURE__ */React__namespace.default.createElement(Table$1, {
|
|
4087
|
+
className: cs__default.default(["summary-table", className, border ? "has-border" : "", rightAlign ? "align-right" : "", layout])
|
|
4088
|
+
}, showHeader && /* @__PURE__ */React__namespace.default.createElement(TableHeader, {
|
|
4089
|
+
className: "table-header"
|
|
4090
|
+
}, /* @__PURE__ */React__namespace.default.createElement("span", {
|
|
4091
|
+
className: "table-title"
|
|
4092
|
+
}, title), showEdit && /* @__PURE__ */React__namespace.default.createElement(icons.FormOutlined, {
|
|
4093
|
+
className: "edit-icon",
|
|
4094
|
+
onClick: () => {
|
|
4095
|
+
onEdit && onEdit();
|
|
4096
|
+
}
|
|
4097
|
+
})), /* @__PURE__ */React__namespace.default.createElement(TableContent, null, "children" in props ? props.children : /* @__PURE__ */React__namespace.default.createElement(SummaryTableContent, {
|
|
4098
|
+
items: props.items,
|
|
4099
|
+
labelWidth: props.labelWidth,
|
|
4100
|
+
dataSource: props.dataSource
|
|
4101
|
+
})));
|
|
4102
|
+
};
|
|
4103
|
+
|
|
4104
|
+
var __defProp$v = Object.defineProperty;
|
|
4105
|
+
var __getOwnPropSymbols$w = Object.getOwnPropertySymbols;
|
|
4106
|
+
var __hasOwnProp$w = Object.prototype.hasOwnProperty;
|
|
4107
|
+
var __propIsEnum$w = Object.prototype.propertyIsEnumerable;
|
|
4108
|
+
var __defNormalProp$v = (obj, key, value) => key in obj ? __defProp$v(obj, key, {
|
|
3881
4109
|
enumerable: true,
|
|
3882
4110
|
configurable: true,
|
|
3883
4111
|
writable: true,
|
|
3884
4112
|
value
|
|
3885
4113
|
}) : obj[key] = value;
|
|
3886
|
-
var __spreadValues$
|
|
3887
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
3888
|
-
if (__getOwnPropSymbols$
|
|
3889
|
-
if (__propIsEnum$
|
|
4114
|
+
var __spreadValues$v = (a, b) => {
|
|
4115
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$w.call(b, prop)) __defNormalProp$v(a, prop, b[prop]);
|
|
4116
|
+
if (__getOwnPropSymbols$w) for (var prop of __getOwnPropSymbols$w(b)) {
|
|
4117
|
+
if (__propIsEnum$w.call(b, prop)) __defNormalProp$v(a, prop, b[prop]);
|
|
3890
4118
|
}
|
|
3891
4119
|
return a;
|
|
3892
4120
|
};
|
|
3893
4121
|
var __objRest$g = (source, exclude) => {
|
|
3894
4122
|
var target = {};
|
|
3895
|
-
for (var prop in source) if (__hasOwnProp$
|
|
3896
|
-
if (source != null && __getOwnPropSymbols$
|
|
3897
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
4123
|
+
for (var prop in source) if (__hasOwnProp$w.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
4124
|
+
if (source != null && __getOwnPropSymbols$w) for (var prop of __getOwnPropSymbols$w(source)) {
|
|
4125
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$w.call(source, prop)) target[prop] = source[prop];
|
|
3898
4126
|
}
|
|
3899
4127
|
return target;
|
|
3900
4128
|
};
|
|
@@ -3920,34 +4148,34 @@
|
|
|
3920
4148
|
onClick: e => e.stopPropagation()
|
|
3921
4149
|
}, /* @__PURE__ */React__namespace.default.createElement("span", {
|
|
3922
4150
|
className: "enabled-text"
|
|
3923
|
-
}, _props.checked ? text.checked : text.unchecked), /* @__PURE__ */React__namespace.default.createElement(Switch, __spreadValues$
|
|
4151
|
+
}, _props.checked ? text.checked : text.unchecked), /* @__PURE__ */React__namespace.default.createElement(Switch, __spreadValues$v({}, _props)));
|
|
3924
4152
|
};
|
|
3925
4153
|
|
|
3926
|
-
var __defProp$
|
|
4154
|
+
var __defProp$u = Object.defineProperty;
|
|
3927
4155
|
var __defProps$o = Object.defineProperties;
|
|
3928
4156
|
var __getOwnPropDescs$o = Object.getOwnPropertyDescriptors;
|
|
3929
|
-
var __getOwnPropSymbols$
|
|
3930
|
-
var __hasOwnProp$
|
|
3931
|
-
var __propIsEnum$
|
|
3932
|
-
var __defNormalProp$
|
|
4157
|
+
var __getOwnPropSymbols$v = Object.getOwnPropertySymbols;
|
|
4158
|
+
var __hasOwnProp$v = Object.prototype.hasOwnProperty;
|
|
4159
|
+
var __propIsEnum$v = Object.prototype.propertyIsEnumerable;
|
|
4160
|
+
var __defNormalProp$u = (obj, key, value) => key in obj ? __defProp$u(obj, key, {
|
|
3933
4161
|
enumerable: true,
|
|
3934
4162
|
configurable: true,
|
|
3935
4163
|
writable: true,
|
|
3936
4164
|
value
|
|
3937
4165
|
}) : obj[key] = value;
|
|
3938
|
-
var __spreadValues$
|
|
3939
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
3940
|
-
if (__getOwnPropSymbols$
|
|
3941
|
-
if (__propIsEnum$
|
|
4166
|
+
var __spreadValues$u = (a, b) => {
|
|
4167
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$v.call(b, prop)) __defNormalProp$u(a, prop, b[prop]);
|
|
4168
|
+
if (__getOwnPropSymbols$v) for (var prop of __getOwnPropSymbols$v(b)) {
|
|
4169
|
+
if (__propIsEnum$v.call(b, prop)) __defNormalProp$u(a, prop, b[prop]);
|
|
3942
4170
|
}
|
|
3943
4171
|
return a;
|
|
3944
4172
|
};
|
|
3945
4173
|
var __spreadProps$o = (a, b) => __defProps$o(a, __getOwnPropDescs$o(b));
|
|
3946
4174
|
var __objRest$f = (source, exclude) => {
|
|
3947
4175
|
var target = {};
|
|
3948
|
-
for (var prop in source) if (__hasOwnProp$
|
|
3949
|
-
if (source != null && __getOwnPropSymbols$
|
|
3950
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
4176
|
+
for (var prop in source) if (__hasOwnProp$v.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
4177
|
+
if (source != null && __getOwnPropSymbols$v) for (var prop of __getOwnPropSymbols$v(source)) {
|
|
4178
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$v.call(source, prop)) target[prop] = source[prop];
|
|
3951
4179
|
}
|
|
3952
4180
|
return target;
|
|
3953
4181
|
};
|
|
@@ -3978,37 +4206,37 @@
|
|
|
3978
4206
|
ref: textWrapper,
|
|
3979
4207
|
className: textWrapperCls
|
|
3980
4208
|
}, text);
|
|
3981
|
-
return isTextTruncated ? /* @__PURE__ */React__namespace.default.createElement(Tooltip, __spreadProps$o(__spreadValues$
|
|
4209
|
+
return isTextTruncated ? /* @__PURE__ */React__namespace.default.createElement(Tooltip, __spreadProps$o(__spreadValues$u({}, restProps), {
|
|
3982
4210
|
title: text,
|
|
3983
4211
|
"data-testid": "text-tooltip"
|
|
3984
4212
|
}), /* @__PURE__ */React__namespace.default.createElement(TruncatedTextWrapper, null, renderName())) : renderName();
|
|
3985
4213
|
};
|
|
3986
4214
|
|
|
3987
|
-
var __defProp$
|
|
4215
|
+
var __defProp$t = Object.defineProperty;
|
|
3988
4216
|
var __defProps$n = Object.defineProperties;
|
|
3989
4217
|
var __getOwnPropDescs$n = Object.getOwnPropertyDescriptors;
|
|
3990
|
-
var __getOwnPropSymbols$
|
|
3991
|
-
var __hasOwnProp$
|
|
3992
|
-
var __propIsEnum$
|
|
3993
|
-
var __defNormalProp$
|
|
4218
|
+
var __getOwnPropSymbols$u = Object.getOwnPropertySymbols;
|
|
4219
|
+
var __hasOwnProp$u = Object.prototype.hasOwnProperty;
|
|
4220
|
+
var __propIsEnum$u = Object.prototype.propertyIsEnumerable;
|
|
4221
|
+
var __defNormalProp$t = (obj, key, value) => key in obj ? __defProp$t(obj, key, {
|
|
3994
4222
|
enumerable: true,
|
|
3995
4223
|
configurable: true,
|
|
3996
4224
|
writable: true,
|
|
3997
4225
|
value
|
|
3998
4226
|
}) : obj[key] = value;
|
|
3999
|
-
var __spreadValues$
|
|
4000
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
4001
|
-
if (__getOwnPropSymbols$
|
|
4002
|
-
if (__propIsEnum$
|
|
4227
|
+
var __spreadValues$t = (a, b) => {
|
|
4228
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$u.call(b, prop)) __defNormalProp$t(a, prop, b[prop]);
|
|
4229
|
+
if (__getOwnPropSymbols$u) for (var prop of __getOwnPropSymbols$u(b)) {
|
|
4230
|
+
if (__propIsEnum$u.call(b, prop)) __defNormalProp$t(a, prop, b[prop]);
|
|
4003
4231
|
}
|
|
4004
4232
|
return a;
|
|
4005
4233
|
};
|
|
4006
4234
|
var __spreadProps$n = (a, b) => __defProps$n(a, __getOwnPropDescs$n(b));
|
|
4007
4235
|
var __objRest$e = (source, exclude) => {
|
|
4008
4236
|
var target = {};
|
|
4009
|
-
for (var prop in source) if (__hasOwnProp$
|
|
4010
|
-
if (source != null && __getOwnPropSymbols$
|
|
4011
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
4237
|
+
for (var prop in source) if (__hasOwnProp$u.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
4238
|
+
if (source != null && __getOwnPropSymbols$u) for (var prop of __getOwnPropSymbols$u(source)) {
|
|
4239
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$u.call(source, prop)) target[prop] = source[prop];
|
|
4012
4240
|
}
|
|
4013
4241
|
return target;
|
|
4014
4242
|
};
|
|
@@ -4032,7 +4260,7 @@
|
|
|
4032
4260
|
src: getAlertIcon(type)
|
|
4033
4261
|
});
|
|
4034
4262
|
const _type = type === "normal" ? "info" : type;
|
|
4035
|
-
return /* @__PURE__ */React__namespace.default.createElement(antd.Alert, __spreadProps$n(__spreadValues$
|
|
4263
|
+
return /* @__PURE__ */React__namespace.default.createElement(antd.Alert, __spreadProps$n(__spreadValues$t({}, props), {
|
|
4036
4264
|
className: cs__default.default(AlertStyle, type ? `alert-${type}` : "", className, {
|
|
4037
4265
|
action
|
|
4038
4266
|
}),
|
|
@@ -4064,21 +4292,21 @@
|
|
|
4064
4292
|
return /* @__PURE__ */ React__namespace.default.createElement("span", null, text);
|
|
4065
4293
|
};
|
|
4066
4294
|
|
|
4067
|
-
var __defProp$
|
|
4295
|
+
var __defProp$s = Object.defineProperty;
|
|
4068
4296
|
var __defProps$m = Object.defineProperties;
|
|
4069
4297
|
var __getOwnPropDescs$m = Object.getOwnPropertyDescriptors;
|
|
4070
|
-
var __getOwnPropSymbols$
|
|
4071
|
-
var __hasOwnProp$
|
|
4072
|
-
var __propIsEnum$
|
|
4073
|
-
var __defNormalProp$
|
|
4074
|
-
var __spreadValues$
|
|
4298
|
+
var __getOwnPropSymbols$t = Object.getOwnPropertySymbols;
|
|
4299
|
+
var __hasOwnProp$t = Object.prototype.hasOwnProperty;
|
|
4300
|
+
var __propIsEnum$t = Object.prototype.propertyIsEnumerable;
|
|
4301
|
+
var __defNormalProp$s = (obj, key, value) => key in obj ? __defProp$s(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4302
|
+
var __spreadValues$s = (a, b) => {
|
|
4075
4303
|
for (var prop in b || (b = {}))
|
|
4076
|
-
if (__hasOwnProp$
|
|
4077
|
-
__defNormalProp$
|
|
4078
|
-
if (__getOwnPropSymbols$
|
|
4079
|
-
for (var prop of __getOwnPropSymbols$
|
|
4080
|
-
if (__propIsEnum$
|
|
4081
|
-
__defNormalProp$
|
|
4304
|
+
if (__hasOwnProp$t.call(b, prop))
|
|
4305
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
4306
|
+
if (__getOwnPropSymbols$t)
|
|
4307
|
+
for (var prop of __getOwnPropSymbols$t(b)) {
|
|
4308
|
+
if (__propIsEnum$t.call(b, prop))
|
|
4309
|
+
__defNormalProp$s(a, prop, b[prop]);
|
|
4082
4310
|
}
|
|
4083
4311
|
return a;
|
|
4084
4312
|
};
|
|
@@ -4086,11 +4314,11 @@
|
|
|
4086
4314
|
var __objRest$d = (source, exclude) => {
|
|
4087
4315
|
var target = {};
|
|
4088
4316
|
for (var prop in source)
|
|
4089
|
-
if (__hasOwnProp$
|
|
4317
|
+
if (__hasOwnProp$t.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
4090
4318
|
target[prop] = source[prop];
|
|
4091
|
-
if (source != null && __getOwnPropSymbols$
|
|
4092
|
-
for (var prop of __getOwnPropSymbols$
|
|
4093
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
4319
|
+
if (source != null && __getOwnPropSymbols$t)
|
|
4320
|
+
for (var prop of __getOwnPropSymbols$t(source)) {
|
|
4321
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$t.call(source, prop))
|
|
4094
4322
|
target[prop] = source[prop];
|
|
4095
4323
|
}
|
|
4096
4324
|
return target;
|
|
@@ -4099,7 +4327,7 @@
|
|
|
4099
4327
|
var _b = _a, { type = "error", className } = _b, props = __objRest$d(_b, ["type", "className"]);
|
|
4100
4328
|
return /* @__PURE__ */ React__namespace.default.createElement(
|
|
4101
4329
|
antd.Badge,
|
|
4102
|
-
__spreadProps$m(__spreadValues$
|
|
4330
|
+
__spreadProps$m(__spreadValues$s({
|
|
4103
4331
|
className: core.cx(`badge-${type}`, className)
|
|
4104
4332
|
}, props), {
|
|
4105
4333
|
showZero: false
|
|
@@ -4107,28 +4335,28 @@
|
|
|
4107
4335
|
);
|
|
4108
4336
|
};
|
|
4109
4337
|
|
|
4110
|
-
var __defProp$
|
|
4111
|
-
var __getOwnPropSymbols$
|
|
4112
|
-
var __hasOwnProp$
|
|
4113
|
-
var __propIsEnum$
|
|
4114
|
-
var __defNormalProp$
|
|
4338
|
+
var __defProp$r = Object.defineProperty;
|
|
4339
|
+
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
4340
|
+
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
4341
|
+
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
4342
|
+
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, {
|
|
4115
4343
|
enumerable: true,
|
|
4116
4344
|
configurable: true,
|
|
4117
4345
|
writable: true,
|
|
4118
4346
|
value
|
|
4119
4347
|
}) : obj[key] = value;
|
|
4120
|
-
var __spreadValues$
|
|
4121
|
-
for (var prop in b || (b = {})) if (__hasOwnProp$
|
|
4122
|
-
if (__getOwnPropSymbols$
|
|
4123
|
-
if (__propIsEnum$
|
|
4348
|
+
var __spreadValues$r = (a, b) => {
|
|
4349
|
+
for (var prop in b || (b = {})) if (__hasOwnProp$s.call(b, prop)) __defNormalProp$r(a, prop, b[prop]);
|
|
4350
|
+
if (__getOwnPropSymbols$s) for (var prop of __getOwnPropSymbols$s(b)) {
|
|
4351
|
+
if (__propIsEnum$s.call(b, prop)) __defNormalProp$r(a, prop, b[prop]);
|
|
4124
4352
|
}
|
|
4125
4353
|
return a;
|
|
4126
4354
|
};
|
|
4127
4355
|
var __objRest$c = (source, exclude) => {
|
|
4128
4356
|
var target = {};
|
|
4129
|
-
for (var prop in source) if (__hasOwnProp$
|
|
4130
|
-
if (source != null && __getOwnPropSymbols$
|
|
4131
|
-
if (exclude.indexOf(prop) < 0 && __propIsEnum$
|
|
4357
|
+
for (var prop in source) if (__hasOwnProp$s.call(source, prop) && exclude.indexOf(prop) < 0) target[prop] = source[prop];
|
|
4358
|
+
if (source != null && __getOwnPropSymbols$s) for (var prop of __getOwnPropSymbols$s(source)) {
|
|
4359
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum$s.call(source, prop)) target[prop] = source[prop];
|
|
4132
4360
|
}
|
|
4133
4361
|
return target;
|
|
4134
4362
|
};
|
|
@@ -4172,7 +4400,7 @@
|
|
|
4172
4400
|
style: {
|
|
4173
4401
|
cursor: "not-allowed"
|
|
4174
4402
|
}
|
|
4175
|
-
}, /* @__PURE__ */React__namespace.default.createElement(Button, __spreadValues$
|
|
4403
|
+
}, /* @__PURE__ */React__namespace.default.createElement(Button, __spreadValues$r({
|
|
4176
4404
|
style: {
|
|
4177
4405
|
pointerEvents: "none"
|
|
4178
4406
|
},
|
|
@@ -4182,7 +4410,7 @@
|
|
|
4182
4410
|
ghost,
|
|
4183
4411
|
className: core.cx(ButtonStyle, className2),
|
|
4184
4412
|
prefixIcon: icon
|
|
4185
|
-
}, buttonPropArgs))) : /* @__PURE__ */React__namespace.default.createElement(Button, __spreadValues$
|
|
4413
|
+
}, buttonPropArgs))) : /* @__PURE__ */React__namespace.default.createElement(Button, __spreadValues$r({
|
|
4186
4414
|
type,
|
|
4187
4415
|
size,
|
|
4188
4416
|
danger,
|
|
@@ -4191,7 +4419,7 @@
|
|
|
4191
4419
|
prefixIcon: icon
|
|
4192
4420
|
}, buttonPropArgs)));
|
|
4193
4421
|
}
|
|
4194
|
-
return /* @__PURE__ */React__namespace.default.createElement(Button, __spreadValues$
|
|
4422
|
+
return /* @__PURE__ */React__namespace.default.createElement(Button, __spreadValues$r({
|
|
4195
4423
|
key: key || index,
|
|
4196
4424
|
type,
|
|
4197
4425
|
size,
|
|
@@ -4205,24 +4433,6 @@
|
|
|
4205
4433
|
}));
|
|
4206
4434
|
});
|
|
4207
4435
|
|
|
4208
|
-
var __defProp$r = Object.defineProperty;
|
|
4209
|
-
var __getOwnPropSymbols$s = Object.getOwnPropertySymbols;
|
|
4210
|
-
var __hasOwnProp$s = Object.prototype.hasOwnProperty;
|
|
4211
|
-
var __propIsEnum$s = Object.prototype.propertyIsEnumerable;
|
|
4212
|
-
var __defNormalProp$r = (obj, key, value) => key in obj ? __defProp$r(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4213
|
-
var __spreadValues$r = (a, b) => {
|
|
4214
|
-
for (var prop in b || (b = {}))
|
|
4215
|
-
if (__hasOwnProp$s.call(b, prop))
|
|
4216
|
-
__defNormalProp$r(a, prop, b[prop]);
|
|
4217
|
-
if (__getOwnPropSymbols$s)
|
|
4218
|
-
for (var prop of __getOwnPropSymbols$s(b)) {
|
|
4219
|
-
if (__propIsEnum$s.call(b, prop))
|
|
4220
|
-
__defNormalProp$r(a, prop, b[prop]);
|
|
4221
|
-
}
|
|
4222
|
-
return a;
|
|
4223
|
-
};
|
|
4224
|
-
const Calendar = (props) => /* @__PURE__ */ React__namespace.default.createElement(antd.Calendar, __spreadValues$r({}, props));
|
|
4225
|
-
|
|
4226
4436
|
const CardBody = /*#__PURE__*/react$1.styled('div')({
|
|
4227
4437
|
name: "CardBody",
|
|
4228
4438
|
class: "c1k4vanq",
|
|
@@ -7296,116 +7506,6 @@
|
|
|
7296
7506
|
}, Text);
|
|
7297
7507
|
};
|
|
7298
7508
|
|
|
7299
|
-
const MonthText = {
|
|
7300
|
-
"1": "January",
|
|
7301
|
-
"2": "February",
|
|
7302
|
-
"3": "March",
|
|
7303
|
-
"4": "April",
|
|
7304
|
-
"5": "May",
|
|
7305
|
-
"6": "June",
|
|
7306
|
-
"7": "July",
|
|
7307
|
-
"8": "August",
|
|
7308
|
-
"9": "September",
|
|
7309
|
-
"10": "October",
|
|
7310
|
-
"11": "November",
|
|
7311
|
-
"12": "December"
|
|
7312
|
-
};
|
|
7313
|
-
function getCalendarTitle(month, t, i18n2) {
|
|
7314
|
-
if (i18n2.language === parrot.ParrotLngs.zh) {
|
|
7315
|
-
return `${month} ${t("common.month")}`;
|
|
7316
|
-
}
|
|
7317
|
-
return MonthText[month];
|
|
7318
|
-
}
|
|
7319
|
-
|
|
7320
|
-
const CronCalendarWrapper = "clm1wy1";
|
|
7321
|
-
const Title = "t1tsm00v";
|
|
7322
|
-
const Control = "c167wnad";
|
|
7323
|
-
const Cell = "cxhf7dh";
|
|
7324
|
-
const CronCalendar = ({
|
|
7325
|
-
plans
|
|
7326
|
-
}) => {
|
|
7327
|
-
const {
|
|
7328
|
-
t,
|
|
7329
|
-
i18n
|
|
7330
|
-
} = useParrotTranslation();
|
|
7331
|
-
const [value, setValue] = React.useState(moment__default.default());
|
|
7332
|
-
const days = React.useMemo(() => {
|
|
7333
|
-
const sendAt = [];
|
|
7334
|
-
const lastDayOfMonth = dayjs__default.default(value.valueOf()).endOf("month");
|
|
7335
|
-
for (const plan of plans) {
|
|
7336
|
-
if (plan.empty) {
|
|
7337
|
-
continue;
|
|
7338
|
-
}
|
|
7339
|
-
const cronTime = new CronTime(plan.expression, plan.startAt);
|
|
7340
|
-
let current = cronTime["getNextDateFromWithValidation"](dayjs__default.default());
|
|
7341
|
-
while (current.isBefore(lastDayOfMonth)) {
|
|
7342
|
-
sendAt.push(current);
|
|
7343
|
-
cronTime.setLastSendAt(current);
|
|
7344
|
-
current = cronTime["getNextDateFromWithValidation"](current);
|
|
7345
|
-
}
|
|
7346
|
-
}
|
|
7347
|
-
return sendAt;
|
|
7348
|
-
}, [value, plans]);
|
|
7349
|
-
return /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
7350
|
-
className: CronCalendarWrapper
|
|
7351
|
-
}, /* @__PURE__ */React__namespace.default.createElement(Calendar, {
|
|
7352
|
-
onChange: setValue,
|
|
7353
|
-
value,
|
|
7354
|
-
fullscreen: false,
|
|
7355
|
-
headerRender: ({
|
|
7356
|
-
value: value2,
|
|
7357
|
-
onChange
|
|
7358
|
-
}) => /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
7359
|
-
className: linaria.cx(Title, Typo.Label.l4_bold)
|
|
7360
|
-
}, t("components.generate_date_preview")), /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
7361
|
-
className: linaria.cx(Control, Typo.Label.l4_regular)
|
|
7362
|
-
}, /* @__PURE__ */React__namespace.default.createElement(icons.LeftOutlined, {
|
|
7363
|
-
onClick: () => onChange(value2.clone().subtract(1, "month"))
|
|
7364
|
-
}), t("components.date_with_year_and_month", {
|
|
7365
|
-
year: value2.format("YYYY"),
|
|
7366
|
-
month: getCalendarTitle(value2.format("M"), t, i18n),
|
|
7367
|
-
interpolation: {
|
|
7368
|
-
escapeValue: false
|
|
7369
|
-
}
|
|
7370
|
-
}), /* @__PURE__ */React__namespace.default.createElement(icons.RightOutlined, {
|
|
7371
|
-
onClick: () => onChange(value2.clone().add(1, "month"))
|
|
7372
|
-
}))),
|
|
7373
|
-
dateFullCellRender: date => {
|
|
7374
|
-
const activeDays = days.filter(d => d.startOf("day").isSame(dayjs__default.default(date.valueOf()).startOf("day")));
|
|
7375
|
-
return /* @__PURE__ */React__namespace.default.createElement(Tooltip, {
|
|
7376
|
-
title: activeDays.length === 0 ? null : activeDays.length === 1 ?
|
|
7377
|
-
// TODO pass the callback via props and remove this
|
|
7378
|
-
t("components.will_generate_one_reporte_with_date_and_time", {
|
|
7379
|
-
date: activeDays[0].format("YYYY/M/D"),
|
|
7380
|
-
time: activeDays[0].format("HH:mm"),
|
|
7381
|
-
interpolation: {
|
|
7382
|
-
escapeValue: false
|
|
7383
|
-
}
|
|
7384
|
-
}) : /* @__PURE__ */React__namespace.default.createElement(React__namespace.default.Fragment, null, t("components.will_generate_report_will_date_and_count", {
|
|
7385
|
-
date: activeDays[0].format("YYYY/M/D"),
|
|
7386
|
-
count: activeDays.length,
|
|
7387
|
-
interpolation: {
|
|
7388
|
-
escapeValue: false
|
|
7389
|
-
}
|
|
7390
|
-
}), /* @__PURE__ */React__namespace.default.createElement("br", null), activeDays.map((d, idx) => /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
7391
|
-
key: idx
|
|
7392
|
-
}, d.format("HH:mm"), /* @__PURE__ */React__namespace.default.createElement("br", null)))),
|
|
7393
|
-
placement: "bottom"
|
|
7394
|
-
}, /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
7395
|
-
className: linaria.cx(Cell, Typo.Label.l4_regular, activeDays.length > 0 && "active"),
|
|
7396
|
-
title: ""
|
|
7397
|
-
}, date.date(), /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
7398
|
-
className: "dots"
|
|
7399
|
-
}, activeDays.length < 4 && activeDays.map((_, idx) => /* @__PURE__ */React__namespace.default.createElement("span", {
|
|
7400
|
-
className: "dot",
|
|
7401
|
-
key: idx
|
|
7402
|
-
})), activeDays.length >= 4 && /* @__PURE__ */React__namespace.default.createElement("div", {
|
|
7403
|
-
className: "bar"
|
|
7404
|
-
}))));
|
|
7405
|
-
}
|
|
7406
|
-
}));
|
|
7407
|
-
};
|
|
7408
|
-
|
|
7409
7509
|
function getAntdKit() {
|
|
7410
7510
|
const kit = {
|
|
7411
7511
|
loading: Loading,
|
|
@@ -7521,7 +7621,8 @@
|
|
|
7521
7621
|
ChartWithUnit,
|
|
7522
7622
|
DonutChart,
|
|
7523
7623
|
UnitWithChart,
|
|
7524
|
-
GoBackButton: GobackButton
|
|
7624
|
+
GoBackButton: GobackButton,
|
|
7625
|
+
SummaryTable
|
|
7525
7626
|
};
|
|
7526
7627
|
kit.option.isSelectOption = true;
|
|
7527
7628
|
kit.button.__ANT_BUTTON = true;
|