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