openxiangda 1.0.39 → 1.0.40
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/README.md +2 -2
- package/openxiangda-skills/SKILL.md +6 -3
- package/openxiangda-skills/references/best-practices.md +29 -5
- package/openxiangda-skills/references/component-guide.md +79 -45
- package/openxiangda-skills/references/forms/component-registry.md +33 -1
- package/openxiangda-skills/skills/openxiangda-core/SKILL.md +2 -2
- package/openxiangda-skills/skills/openxiangda-form/SKILL.md +9 -2
- package/openxiangda-skills/skills/openxiangda-page/SKILL.md +5 -3
- package/package.json +1 -1
- package/packages/sdk/dist/runtime/index.cjs +546 -0
- package/packages/sdk/dist/runtime/index.cjs.map +1 -1
- package/packages/sdk/dist/runtime/index.mjs +546 -0
- package/packages/sdk/dist/runtime/index.mjs.map +1 -1
- package/packages/sdk/src/build-source/scripts/build-forms.mjs +5 -1
- package/templates/sy-lowcode-app-workspace/.cursor/rules/openxiangda-form.mdc +4 -0
- package/templates/sy-lowcode-app-workspace/.cursor/rules/openxiangda-page.mdc +2 -0
- package/templates/sy-lowcode-app-workspace/.cursor/rules/openxiangda.mdc +3 -0
- package/templates/sy-lowcode-app-workspace/.qoder/rules/openxiangda-form.md +4 -0
- package/templates/sy-lowcode-app-workspace/.qoder/rules/openxiangda-page.md +2 -0
- package/templates/sy-lowcode-app-workspace/.qoder/rules/openxiangda.md +3 -0
- package/templates/sy-lowcode-app-workspace/AGENTS.md +5 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/README.md +8 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/catalog.json +32 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/decision-guide.md +20 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/design-style.md +48 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/glass-home-dashboard/App.tsx +8 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/glass-home-dashboard/GlassHomeDashboard.tsx +232 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/glass-home-dashboard/index.tsx +10 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/glass-home-dashboard/page.config.ts +14 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/glass-home-dashboard/styles.css +196 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mint-analytics-dashboard/App.tsx +8 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mint-analytics-dashboard/MintAnalyticsDashboard.tsx +279 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mint-analytics-dashboard/index.tsx +10 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mint-analytics-dashboard/page.config.ts +14 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/mint-analytics-dashboard/styles.css +163 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/ops-monitor-dashboard/App.tsx +8 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/ops-monitor-dashboard/OpsMonitorDashboard.tsx +306 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/ops-monitor-dashboard/index.tsx +10 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/ops-monitor-dashboard/page.config.ts +14 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/ops-monitor-dashboard/styles.css +248 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/work-order-list-drawer/App.tsx +8 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/work-order-list-drawer/WorkOrderListDrawerPage.tsx +371 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/work-order-list-drawer/index.tsx +10 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/work-order-list-drawer/page.config.ts +14 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/pages/work-order-list-drawer/styles.css +182 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/admin-ui-templates/DashboardPrimitives.tsx +832 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/admin-ui-templates/chartOptions.ts +140 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/admin-ui-templates/sampleData.ts +466 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/admin-ui-templates/styles.css +874 -0
- package/templates/sy-lowcode-app-workspace/examples/best-practices/src/shared/components/admin-ui-templates/types.ts +150 -0
- package/templates/sy-lowcode-app-workspace/src/forms/README.md +4 -0
- package/templates/sy-lowcode-app-workspace/src/main.tsx +4 -0
|
@@ -1395,6 +1395,550 @@ var createPageSdk = (context) => {
|
|
|
1395
1395
|
var import_cssinjs = require("@ant-design/cssinjs");
|
|
1396
1396
|
var import_antd = require("antd");
|
|
1397
1397
|
var import_zh_CN = __toESM(require("antd/locale/zh_CN.js"));
|
|
1398
|
+
var import_dayjs = __toESM(require("dayjs"));
|
|
1399
|
+
|
|
1400
|
+
// node_modules/dayjs/esm/constant.js
|
|
1401
|
+
var SECONDS_A_MINUTE = 60;
|
|
1402
|
+
var SECONDS_A_HOUR = SECONDS_A_MINUTE * 60;
|
|
1403
|
+
var SECONDS_A_DAY = SECONDS_A_HOUR * 24;
|
|
1404
|
+
var SECONDS_A_WEEK = SECONDS_A_DAY * 7;
|
|
1405
|
+
var MILLISECONDS_A_SECOND = 1e3;
|
|
1406
|
+
var MILLISECONDS_A_MINUTE = SECONDS_A_MINUTE * MILLISECONDS_A_SECOND;
|
|
1407
|
+
var MILLISECONDS_A_HOUR = SECONDS_A_HOUR * MILLISECONDS_A_SECOND;
|
|
1408
|
+
var MILLISECONDS_A_DAY = SECONDS_A_DAY * MILLISECONDS_A_SECOND;
|
|
1409
|
+
var MILLISECONDS_A_WEEK = SECONDS_A_WEEK * MILLISECONDS_A_SECOND;
|
|
1410
|
+
var MS = "millisecond";
|
|
1411
|
+
var S = "second";
|
|
1412
|
+
var MIN = "minute";
|
|
1413
|
+
var H = "hour";
|
|
1414
|
+
var D = "day";
|
|
1415
|
+
var W = "week";
|
|
1416
|
+
var M = "month";
|
|
1417
|
+
var Q = "quarter";
|
|
1418
|
+
var Y = "year";
|
|
1419
|
+
var DATE = "date";
|
|
1420
|
+
var FORMAT_DEFAULT = "YYYY-MM-DDTHH:mm:ssZ";
|
|
1421
|
+
var INVALID_DATE_STRING = "Invalid Date";
|
|
1422
|
+
var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/;
|
|
1423
|
+
var REGEX_FORMAT = /\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
|
|
1424
|
+
|
|
1425
|
+
// node_modules/dayjs/esm/locale/en.js
|
|
1426
|
+
var en_default = {
|
|
1427
|
+
name: "en",
|
|
1428
|
+
weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
|
|
1429
|
+
months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
|
|
1430
|
+
ordinal: function ordinal(n) {
|
|
1431
|
+
var s = ["th", "st", "nd", "rd"];
|
|
1432
|
+
var v = n % 100;
|
|
1433
|
+
return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]";
|
|
1434
|
+
}
|
|
1435
|
+
};
|
|
1436
|
+
|
|
1437
|
+
// node_modules/dayjs/esm/utils.js
|
|
1438
|
+
var padStart = function padStart2(string, length, pad) {
|
|
1439
|
+
var s = String(string);
|
|
1440
|
+
if (!s || s.length >= length) return string;
|
|
1441
|
+
return "" + Array(length + 1 - s.length).join(pad) + string;
|
|
1442
|
+
};
|
|
1443
|
+
var padZoneStr = function padZoneStr2(instance) {
|
|
1444
|
+
var negMinutes = -instance.utcOffset();
|
|
1445
|
+
var minutes = Math.abs(negMinutes);
|
|
1446
|
+
var hourOffset = Math.floor(minutes / 60);
|
|
1447
|
+
var minuteOffset = minutes % 60;
|
|
1448
|
+
return (negMinutes <= 0 ? "+" : "-") + padStart(hourOffset, 2, "0") + ":" + padStart(minuteOffset, 2, "0");
|
|
1449
|
+
};
|
|
1450
|
+
var monthDiff = function monthDiff2(a, b) {
|
|
1451
|
+
if (a.date() < b.date()) return -monthDiff2(b, a);
|
|
1452
|
+
var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month());
|
|
1453
|
+
var anchor = a.clone().add(wholeMonthDiff, M);
|
|
1454
|
+
var c = b - anchor < 0;
|
|
1455
|
+
var anchor2 = a.clone().add(wholeMonthDiff + (c ? -1 : 1), M);
|
|
1456
|
+
return +(-(wholeMonthDiff + (b - anchor) / (c ? anchor - anchor2 : anchor2 - anchor)) || 0);
|
|
1457
|
+
};
|
|
1458
|
+
var absFloor = function absFloor2(n) {
|
|
1459
|
+
return n < 0 ? Math.ceil(n) || 0 : Math.floor(n);
|
|
1460
|
+
};
|
|
1461
|
+
var prettyUnit = function prettyUnit2(u) {
|
|
1462
|
+
var special = {
|
|
1463
|
+
M,
|
|
1464
|
+
y: Y,
|
|
1465
|
+
w: W,
|
|
1466
|
+
d: D,
|
|
1467
|
+
D: DATE,
|
|
1468
|
+
h: H,
|
|
1469
|
+
m: MIN,
|
|
1470
|
+
s: S,
|
|
1471
|
+
ms: MS,
|
|
1472
|
+
Q
|
|
1473
|
+
};
|
|
1474
|
+
return special[u] || String(u || "").toLowerCase().replace(/s$/, "");
|
|
1475
|
+
};
|
|
1476
|
+
var isUndefined = function isUndefined2(s) {
|
|
1477
|
+
return s === void 0;
|
|
1478
|
+
};
|
|
1479
|
+
var utils_default = {
|
|
1480
|
+
s: padStart,
|
|
1481
|
+
z: padZoneStr,
|
|
1482
|
+
m: monthDiff,
|
|
1483
|
+
a: absFloor,
|
|
1484
|
+
p: prettyUnit,
|
|
1485
|
+
u: isUndefined
|
|
1486
|
+
};
|
|
1487
|
+
|
|
1488
|
+
// node_modules/dayjs/esm/index.js
|
|
1489
|
+
var L = "en";
|
|
1490
|
+
var Ls = {};
|
|
1491
|
+
Ls[L] = en_default;
|
|
1492
|
+
var IS_DAYJS = "$isDayjsObject";
|
|
1493
|
+
var isDayjs = function isDayjs2(d) {
|
|
1494
|
+
return d instanceof Dayjs || !!(d && d[IS_DAYJS]);
|
|
1495
|
+
};
|
|
1496
|
+
var parseLocale = function parseLocale2(preset, object, isLocal) {
|
|
1497
|
+
var l;
|
|
1498
|
+
if (!preset) return L;
|
|
1499
|
+
if (typeof preset === "string") {
|
|
1500
|
+
var presetLower = preset.toLowerCase();
|
|
1501
|
+
if (Ls[presetLower]) {
|
|
1502
|
+
l = presetLower;
|
|
1503
|
+
}
|
|
1504
|
+
if (object) {
|
|
1505
|
+
Ls[presetLower] = object;
|
|
1506
|
+
l = presetLower;
|
|
1507
|
+
}
|
|
1508
|
+
var presetSplit = preset.split("-");
|
|
1509
|
+
if (!l && presetSplit.length > 1) {
|
|
1510
|
+
return parseLocale2(presetSplit[0]);
|
|
1511
|
+
}
|
|
1512
|
+
} else {
|
|
1513
|
+
var name = preset.name;
|
|
1514
|
+
Ls[name] = preset;
|
|
1515
|
+
l = name;
|
|
1516
|
+
}
|
|
1517
|
+
if (!isLocal && l) L = l;
|
|
1518
|
+
return l || !isLocal && L;
|
|
1519
|
+
};
|
|
1520
|
+
var dayjs = function dayjs2(date, c) {
|
|
1521
|
+
if (isDayjs(date)) {
|
|
1522
|
+
return date.clone();
|
|
1523
|
+
}
|
|
1524
|
+
var cfg = typeof c === "object" ? c : {};
|
|
1525
|
+
cfg.date = date;
|
|
1526
|
+
cfg.args = arguments;
|
|
1527
|
+
return new Dayjs(cfg);
|
|
1528
|
+
};
|
|
1529
|
+
var wrapper = function wrapper2(date, instance) {
|
|
1530
|
+
return dayjs(date, {
|
|
1531
|
+
locale: instance.$L,
|
|
1532
|
+
utc: instance.$u,
|
|
1533
|
+
x: instance.$x,
|
|
1534
|
+
$offset: instance.$offset
|
|
1535
|
+
// todo: refactor; do not use this.$offset in you code
|
|
1536
|
+
});
|
|
1537
|
+
};
|
|
1538
|
+
var Utils = utils_default;
|
|
1539
|
+
Utils.l = parseLocale;
|
|
1540
|
+
Utils.i = isDayjs;
|
|
1541
|
+
Utils.w = wrapper;
|
|
1542
|
+
var parseDate = function parseDate2(cfg) {
|
|
1543
|
+
var date = cfg.date, utc = cfg.utc;
|
|
1544
|
+
if (date === null) return /* @__PURE__ */ new Date(NaN);
|
|
1545
|
+
if (Utils.u(date)) return /* @__PURE__ */ new Date();
|
|
1546
|
+
if (date instanceof Date) return new Date(date);
|
|
1547
|
+
if (typeof date === "string" && !/Z$/i.test(date)) {
|
|
1548
|
+
var d = date.match(REGEX_PARSE);
|
|
1549
|
+
if (d) {
|
|
1550
|
+
var m = d[2] - 1 || 0;
|
|
1551
|
+
var ms = (d[7] || "0").substring(0, 3);
|
|
1552
|
+
if (utc) {
|
|
1553
|
+
return new Date(Date.UTC(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms));
|
|
1554
|
+
}
|
|
1555
|
+
return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
return new Date(date);
|
|
1559
|
+
};
|
|
1560
|
+
var Dayjs = /* @__PURE__ */ (function() {
|
|
1561
|
+
function Dayjs2(cfg) {
|
|
1562
|
+
this.$L = parseLocale(cfg.locale, null, true);
|
|
1563
|
+
this.parse(cfg);
|
|
1564
|
+
this.$x = this.$x || cfg.x || {};
|
|
1565
|
+
this[IS_DAYJS] = true;
|
|
1566
|
+
}
|
|
1567
|
+
var _proto = Dayjs2.prototype;
|
|
1568
|
+
_proto.parse = function parse(cfg) {
|
|
1569
|
+
this.$d = parseDate(cfg);
|
|
1570
|
+
this.init();
|
|
1571
|
+
};
|
|
1572
|
+
_proto.init = function init() {
|
|
1573
|
+
var $d = this.$d;
|
|
1574
|
+
this.$y = $d.getFullYear();
|
|
1575
|
+
this.$M = $d.getMonth();
|
|
1576
|
+
this.$D = $d.getDate();
|
|
1577
|
+
this.$W = $d.getDay();
|
|
1578
|
+
this.$H = $d.getHours();
|
|
1579
|
+
this.$m = $d.getMinutes();
|
|
1580
|
+
this.$s = $d.getSeconds();
|
|
1581
|
+
this.$ms = $d.getMilliseconds();
|
|
1582
|
+
};
|
|
1583
|
+
_proto.$utils = function $utils() {
|
|
1584
|
+
return Utils;
|
|
1585
|
+
};
|
|
1586
|
+
_proto.isValid = function isValid() {
|
|
1587
|
+
return !(this.$d.toString() === INVALID_DATE_STRING);
|
|
1588
|
+
};
|
|
1589
|
+
_proto.isSame = function isSame(that, units) {
|
|
1590
|
+
var other = dayjs(that);
|
|
1591
|
+
return this.startOf(units) <= other && other <= this.endOf(units);
|
|
1592
|
+
};
|
|
1593
|
+
_proto.isAfter = function isAfter(that, units) {
|
|
1594
|
+
return dayjs(that) < this.startOf(units);
|
|
1595
|
+
};
|
|
1596
|
+
_proto.isBefore = function isBefore(that, units) {
|
|
1597
|
+
return this.endOf(units) < dayjs(that);
|
|
1598
|
+
};
|
|
1599
|
+
_proto.$g = function $g(input, get, set) {
|
|
1600
|
+
if (Utils.u(input)) return this[get];
|
|
1601
|
+
return this.set(set, input);
|
|
1602
|
+
};
|
|
1603
|
+
_proto.unix = function unix() {
|
|
1604
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
1605
|
+
};
|
|
1606
|
+
_proto.valueOf = function valueOf() {
|
|
1607
|
+
return this.$d.getTime();
|
|
1608
|
+
};
|
|
1609
|
+
_proto.startOf = function startOf(units, _startOf) {
|
|
1610
|
+
var _this = this;
|
|
1611
|
+
var isStartOf = !Utils.u(_startOf) ? _startOf : true;
|
|
1612
|
+
var unit = Utils.p(units);
|
|
1613
|
+
var instanceFactory = function instanceFactory2(d, m) {
|
|
1614
|
+
var ins = Utils.w(_this.$u ? Date.UTC(_this.$y, m, d) : new Date(_this.$y, m, d), _this);
|
|
1615
|
+
return isStartOf ? ins : ins.endOf(D);
|
|
1616
|
+
};
|
|
1617
|
+
var instanceFactorySet = function instanceFactorySet2(method, slice) {
|
|
1618
|
+
var argumentStart = [0, 0, 0, 0];
|
|
1619
|
+
var argumentEnd = [23, 59, 59, 999];
|
|
1620
|
+
return Utils.w(_this.toDate()[method].apply(
|
|
1621
|
+
// eslint-disable-line prefer-spread
|
|
1622
|
+
_this.toDate("s"),
|
|
1623
|
+
(isStartOf ? argumentStart : argumentEnd).slice(slice)
|
|
1624
|
+
), _this);
|
|
1625
|
+
};
|
|
1626
|
+
var $W = this.$W, $M = this.$M, $D = this.$D;
|
|
1627
|
+
var utcPad = "set" + (this.$u ? "UTC" : "");
|
|
1628
|
+
switch (unit) {
|
|
1629
|
+
case Y:
|
|
1630
|
+
return isStartOf ? instanceFactory(1, 0) : instanceFactory(31, 11);
|
|
1631
|
+
case M:
|
|
1632
|
+
return isStartOf ? instanceFactory(1, $M) : instanceFactory(0, $M + 1);
|
|
1633
|
+
case W: {
|
|
1634
|
+
var weekStart = this.$locale().weekStart || 0;
|
|
1635
|
+
var gap = ($W < weekStart ? $W + 7 : $W) - weekStart;
|
|
1636
|
+
return instanceFactory(isStartOf ? $D - gap : $D + (6 - gap), $M);
|
|
1637
|
+
}
|
|
1638
|
+
case D:
|
|
1639
|
+
case DATE:
|
|
1640
|
+
return instanceFactorySet(utcPad + "Hours", 0);
|
|
1641
|
+
case H:
|
|
1642
|
+
return instanceFactorySet(utcPad + "Minutes", 1);
|
|
1643
|
+
case MIN:
|
|
1644
|
+
return instanceFactorySet(utcPad + "Seconds", 2);
|
|
1645
|
+
case S:
|
|
1646
|
+
return instanceFactorySet(utcPad + "Milliseconds", 3);
|
|
1647
|
+
default:
|
|
1648
|
+
return this.clone();
|
|
1649
|
+
}
|
|
1650
|
+
};
|
|
1651
|
+
_proto.endOf = function endOf(arg) {
|
|
1652
|
+
return this.startOf(arg, false);
|
|
1653
|
+
};
|
|
1654
|
+
_proto.$set = function $set(units, _int) {
|
|
1655
|
+
var _C$D$C$DATE$C$M$C$Y$C;
|
|
1656
|
+
var unit = Utils.p(units);
|
|
1657
|
+
var utcPad = "set" + (this.$u ? "UTC" : "");
|
|
1658
|
+
var name = (_C$D$C$DATE$C$M$C$Y$C = {}, _C$D$C$DATE$C$M$C$Y$C[D] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[DATE] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[M] = utcPad + "Month", _C$D$C$DATE$C$M$C$Y$C[Y] = utcPad + "FullYear", _C$D$C$DATE$C$M$C$Y$C[H] = utcPad + "Hours", _C$D$C$DATE$C$M$C$Y$C[MIN] = utcPad + "Minutes", _C$D$C$DATE$C$M$C$Y$C[S] = utcPad + "Seconds", _C$D$C$DATE$C$M$C$Y$C[MS] = utcPad + "Milliseconds", _C$D$C$DATE$C$M$C$Y$C)[unit];
|
|
1659
|
+
var arg = unit === D ? this.$D + (_int - this.$W) : _int;
|
|
1660
|
+
if (unit === M || unit === Y) {
|
|
1661
|
+
var date = this.clone().set(DATE, 1);
|
|
1662
|
+
date.$d[name](arg);
|
|
1663
|
+
date.init();
|
|
1664
|
+
this.$d = date.set(DATE, Math.min(this.$D, date.daysInMonth())).$d;
|
|
1665
|
+
} else if (name) this.$d[name](arg);
|
|
1666
|
+
this.init();
|
|
1667
|
+
return this;
|
|
1668
|
+
};
|
|
1669
|
+
_proto.set = function set(string, _int2) {
|
|
1670
|
+
return this.clone().$set(string, _int2);
|
|
1671
|
+
};
|
|
1672
|
+
_proto.get = function get(unit) {
|
|
1673
|
+
return this[Utils.p(unit)]();
|
|
1674
|
+
};
|
|
1675
|
+
_proto.add = function add(number, units) {
|
|
1676
|
+
var _this2 = this, _C$MIN$C$H$C$S$unit;
|
|
1677
|
+
number = Number(number);
|
|
1678
|
+
var unit = Utils.p(units);
|
|
1679
|
+
var instanceFactorySet = function instanceFactorySet2(n) {
|
|
1680
|
+
var d = dayjs(_this2);
|
|
1681
|
+
return Utils.w(d.date(d.date() + Math.round(n * number)), _this2);
|
|
1682
|
+
};
|
|
1683
|
+
if (unit === M) {
|
|
1684
|
+
return this.set(M, this.$M + number);
|
|
1685
|
+
}
|
|
1686
|
+
if (unit === Y) {
|
|
1687
|
+
return this.set(Y, this.$y + number);
|
|
1688
|
+
}
|
|
1689
|
+
if (unit === D) {
|
|
1690
|
+
return instanceFactorySet(1);
|
|
1691
|
+
}
|
|
1692
|
+
if (unit === W) {
|
|
1693
|
+
return instanceFactorySet(7);
|
|
1694
|
+
}
|
|
1695
|
+
var step = (_C$MIN$C$H$C$S$unit = {}, _C$MIN$C$H$C$S$unit[MIN] = MILLISECONDS_A_MINUTE, _C$MIN$C$H$C$S$unit[H] = MILLISECONDS_A_HOUR, _C$MIN$C$H$C$S$unit[S] = MILLISECONDS_A_SECOND, _C$MIN$C$H$C$S$unit)[unit] || 1;
|
|
1696
|
+
var nextTimeStamp = this.$d.getTime() + number * step;
|
|
1697
|
+
return Utils.w(nextTimeStamp, this);
|
|
1698
|
+
};
|
|
1699
|
+
_proto.subtract = function subtract(number, string) {
|
|
1700
|
+
return this.add(number * -1, string);
|
|
1701
|
+
};
|
|
1702
|
+
_proto.format = function format(formatStr) {
|
|
1703
|
+
var _this3 = this;
|
|
1704
|
+
var locale2 = this.$locale();
|
|
1705
|
+
if (!this.isValid()) return locale2.invalidDate || INVALID_DATE_STRING;
|
|
1706
|
+
var str = formatStr || FORMAT_DEFAULT;
|
|
1707
|
+
var zoneStr = Utils.z(this);
|
|
1708
|
+
var $H = this.$H, $m = this.$m, $M = this.$M;
|
|
1709
|
+
var weekdays = locale2.weekdays, months = locale2.months, meridiem2 = locale2.meridiem;
|
|
1710
|
+
var getShort = function getShort2(arr, index, full, length) {
|
|
1711
|
+
return arr && (arr[index] || arr(_this3, str)) || full[index].slice(0, length);
|
|
1712
|
+
};
|
|
1713
|
+
var get$H = function get$H2(num) {
|
|
1714
|
+
return Utils.s($H % 12 || 12, num, "0");
|
|
1715
|
+
};
|
|
1716
|
+
var meridiemFunc = meridiem2 || function(hour, minute, isLowercase) {
|
|
1717
|
+
var m = hour < 12 ? "AM" : "PM";
|
|
1718
|
+
return isLowercase ? m.toLowerCase() : m;
|
|
1719
|
+
};
|
|
1720
|
+
var matches = function matches2(match) {
|
|
1721
|
+
switch (match) {
|
|
1722
|
+
case "YY":
|
|
1723
|
+
return String(_this3.$y).slice(-2);
|
|
1724
|
+
case "YYYY":
|
|
1725
|
+
return Utils.s(_this3.$y, 4, "0");
|
|
1726
|
+
case "M":
|
|
1727
|
+
return $M + 1;
|
|
1728
|
+
case "MM":
|
|
1729
|
+
return Utils.s($M + 1, 2, "0");
|
|
1730
|
+
case "MMM":
|
|
1731
|
+
return getShort(locale2.monthsShort, $M, months, 3);
|
|
1732
|
+
case "MMMM":
|
|
1733
|
+
return getShort(months, $M);
|
|
1734
|
+
case "D":
|
|
1735
|
+
return _this3.$D;
|
|
1736
|
+
case "DD":
|
|
1737
|
+
return Utils.s(_this3.$D, 2, "0");
|
|
1738
|
+
case "d":
|
|
1739
|
+
return String(_this3.$W);
|
|
1740
|
+
case "dd":
|
|
1741
|
+
return getShort(locale2.weekdaysMin, _this3.$W, weekdays, 2);
|
|
1742
|
+
case "ddd":
|
|
1743
|
+
return getShort(locale2.weekdaysShort, _this3.$W, weekdays, 3);
|
|
1744
|
+
case "dddd":
|
|
1745
|
+
return weekdays[_this3.$W];
|
|
1746
|
+
case "H":
|
|
1747
|
+
return String($H);
|
|
1748
|
+
case "HH":
|
|
1749
|
+
return Utils.s($H, 2, "0");
|
|
1750
|
+
case "h":
|
|
1751
|
+
return get$H(1);
|
|
1752
|
+
case "hh":
|
|
1753
|
+
return get$H(2);
|
|
1754
|
+
case "a":
|
|
1755
|
+
return meridiemFunc($H, $m, true);
|
|
1756
|
+
case "A":
|
|
1757
|
+
return meridiemFunc($H, $m, false);
|
|
1758
|
+
case "m":
|
|
1759
|
+
return String($m);
|
|
1760
|
+
case "mm":
|
|
1761
|
+
return Utils.s($m, 2, "0");
|
|
1762
|
+
case "s":
|
|
1763
|
+
return String(_this3.$s);
|
|
1764
|
+
case "ss":
|
|
1765
|
+
return Utils.s(_this3.$s, 2, "0");
|
|
1766
|
+
case "SSS":
|
|
1767
|
+
return Utils.s(_this3.$ms, 3, "0");
|
|
1768
|
+
case "Z":
|
|
1769
|
+
return zoneStr;
|
|
1770
|
+
// 'ZZ' logic below
|
|
1771
|
+
default:
|
|
1772
|
+
break;
|
|
1773
|
+
}
|
|
1774
|
+
return null;
|
|
1775
|
+
};
|
|
1776
|
+
return str.replace(REGEX_FORMAT, function(match, $1) {
|
|
1777
|
+
return $1 || matches(match) || zoneStr.replace(":", "");
|
|
1778
|
+
});
|
|
1779
|
+
};
|
|
1780
|
+
_proto.utcOffset = function utcOffset() {
|
|
1781
|
+
return -Math.round(this.$d.getTimezoneOffset() / 15) * 15;
|
|
1782
|
+
};
|
|
1783
|
+
_proto.diff = function diff(input, units, _float) {
|
|
1784
|
+
var _this4 = this;
|
|
1785
|
+
var unit = Utils.p(units);
|
|
1786
|
+
var that = dayjs(input);
|
|
1787
|
+
var zoneDelta = (that.utcOffset() - this.utcOffset()) * MILLISECONDS_A_MINUTE;
|
|
1788
|
+
var diff2 = this - that;
|
|
1789
|
+
var getMonth = function getMonth2() {
|
|
1790
|
+
return Utils.m(_this4, that);
|
|
1791
|
+
};
|
|
1792
|
+
var result;
|
|
1793
|
+
switch (unit) {
|
|
1794
|
+
case Y:
|
|
1795
|
+
result = getMonth() / 12;
|
|
1796
|
+
break;
|
|
1797
|
+
case M:
|
|
1798
|
+
result = getMonth();
|
|
1799
|
+
break;
|
|
1800
|
+
case Q:
|
|
1801
|
+
result = getMonth() / 3;
|
|
1802
|
+
break;
|
|
1803
|
+
case W:
|
|
1804
|
+
result = (diff2 - zoneDelta) / MILLISECONDS_A_WEEK;
|
|
1805
|
+
break;
|
|
1806
|
+
case D:
|
|
1807
|
+
result = (diff2 - zoneDelta) / MILLISECONDS_A_DAY;
|
|
1808
|
+
break;
|
|
1809
|
+
case H:
|
|
1810
|
+
result = diff2 / MILLISECONDS_A_HOUR;
|
|
1811
|
+
break;
|
|
1812
|
+
case MIN:
|
|
1813
|
+
result = diff2 / MILLISECONDS_A_MINUTE;
|
|
1814
|
+
break;
|
|
1815
|
+
case S:
|
|
1816
|
+
result = diff2 / MILLISECONDS_A_SECOND;
|
|
1817
|
+
break;
|
|
1818
|
+
default:
|
|
1819
|
+
result = diff2;
|
|
1820
|
+
break;
|
|
1821
|
+
}
|
|
1822
|
+
return _float ? result : Utils.a(result);
|
|
1823
|
+
};
|
|
1824
|
+
_proto.daysInMonth = function daysInMonth() {
|
|
1825
|
+
return this.endOf(M).$D;
|
|
1826
|
+
};
|
|
1827
|
+
_proto.$locale = function $locale() {
|
|
1828
|
+
return Ls[this.$L];
|
|
1829
|
+
};
|
|
1830
|
+
_proto.locale = function locale2(preset, object) {
|
|
1831
|
+
if (!preset) return this.$L;
|
|
1832
|
+
var that = this.clone();
|
|
1833
|
+
var nextLocaleName = parseLocale(preset, object, true);
|
|
1834
|
+
if (nextLocaleName) that.$L = nextLocaleName;
|
|
1835
|
+
return that;
|
|
1836
|
+
};
|
|
1837
|
+
_proto.clone = function clone() {
|
|
1838
|
+
return Utils.w(this.$d, this);
|
|
1839
|
+
};
|
|
1840
|
+
_proto.toDate = function toDate() {
|
|
1841
|
+
return new Date(this.valueOf());
|
|
1842
|
+
};
|
|
1843
|
+
_proto.toJSON = function toJSON() {
|
|
1844
|
+
return this.isValid() ? this.toISOString() : null;
|
|
1845
|
+
};
|
|
1846
|
+
_proto.toISOString = function toISOString() {
|
|
1847
|
+
return this.$d.toISOString();
|
|
1848
|
+
};
|
|
1849
|
+
_proto.toString = function toString() {
|
|
1850
|
+
return this.$d.toUTCString();
|
|
1851
|
+
};
|
|
1852
|
+
return Dayjs2;
|
|
1853
|
+
})();
|
|
1854
|
+
var proto = Dayjs.prototype;
|
|
1855
|
+
dayjs.prototype = proto;
|
|
1856
|
+
[["$ms", MS], ["$s", S], ["$m", MIN], ["$H", H], ["$W", D], ["$M", M], ["$y", Y], ["$D", DATE]].forEach(function(g) {
|
|
1857
|
+
proto[g[1]] = function(input) {
|
|
1858
|
+
return this.$g(input, g[0], g[1]);
|
|
1859
|
+
};
|
|
1860
|
+
});
|
|
1861
|
+
dayjs.extend = function(plugin, option) {
|
|
1862
|
+
if (!plugin.$i) {
|
|
1863
|
+
plugin(option, Dayjs, dayjs);
|
|
1864
|
+
plugin.$i = true;
|
|
1865
|
+
}
|
|
1866
|
+
return dayjs;
|
|
1867
|
+
};
|
|
1868
|
+
dayjs.locale = parseLocale;
|
|
1869
|
+
dayjs.isDayjs = isDayjs;
|
|
1870
|
+
dayjs.unix = function(timestamp) {
|
|
1871
|
+
return dayjs(timestamp * 1e3);
|
|
1872
|
+
};
|
|
1873
|
+
dayjs.en = Ls[L];
|
|
1874
|
+
dayjs.Ls = Ls;
|
|
1875
|
+
dayjs.p = {};
|
|
1876
|
+
var esm_default = dayjs;
|
|
1877
|
+
|
|
1878
|
+
// node_modules/dayjs/esm/locale/zh-cn.js
|
|
1879
|
+
var locale = {
|
|
1880
|
+
name: "zh-cn",
|
|
1881
|
+
weekdays: "\u661F\u671F\u65E5_\u661F\u671F\u4E00_\u661F\u671F\u4E8C_\u661F\u671F\u4E09_\u661F\u671F\u56DB_\u661F\u671F\u4E94_\u661F\u671F\u516D".split("_"),
|
|
1882
|
+
weekdaysShort: "\u5468\u65E5_\u5468\u4E00_\u5468\u4E8C_\u5468\u4E09_\u5468\u56DB_\u5468\u4E94_\u5468\u516D".split("_"),
|
|
1883
|
+
weekdaysMin: "\u65E5_\u4E00_\u4E8C_\u4E09_\u56DB_\u4E94_\u516D".split("_"),
|
|
1884
|
+
months: "\u4E00\u6708_\u4E8C\u6708_\u4E09\u6708_\u56DB\u6708_\u4E94\u6708_\u516D\u6708_\u4E03\u6708_\u516B\u6708_\u4E5D\u6708_\u5341\u6708_\u5341\u4E00\u6708_\u5341\u4E8C\u6708".split("_"),
|
|
1885
|
+
monthsShort: "1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),
|
|
1886
|
+
ordinal: function ordinal2(number, period) {
|
|
1887
|
+
switch (period) {
|
|
1888
|
+
case "W":
|
|
1889
|
+
return number + "\u5468";
|
|
1890
|
+
default:
|
|
1891
|
+
return number + "\u65E5";
|
|
1892
|
+
}
|
|
1893
|
+
},
|
|
1894
|
+
weekStart: 1,
|
|
1895
|
+
yearStart: 4,
|
|
1896
|
+
formats: {
|
|
1897
|
+
LT: "HH:mm",
|
|
1898
|
+
LTS: "HH:mm:ss",
|
|
1899
|
+
L: "YYYY/MM/DD",
|
|
1900
|
+
LL: "YYYY\u5E74M\u6708D\u65E5",
|
|
1901
|
+
LLL: "YYYY\u5E74M\u6708D\u65E5Ah\u70B9mm\u5206",
|
|
1902
|
+
LLLL: "YYYY\u5E74M\u6708D\u65E5ddddAh\u70B9mm\u5206",
|
|
1903
|
+
l: "YYYY/M/D",
|
|
1904
|
+
ll: "YYYY\u5E74M\u6708D\u65E5",
|
|
1905
|
+
lll: "YYYY\u5E74M\u6708D\u65E5 HH:mm",
|
|
1906
|
+
llll: "YYYY\u5E74M\u6708D\u65E5dddd HH:mm"
|
|
1907
|
+
},
|
|
1908
|
+
relativeTime: {
|
|
1909
|
+
future: "%s\u5185",
|
|
1910
|
+
past: "%s\u524D",
|
|
1911
|
+
s: "\u51E0\u79D2",
|
|
1912
|
+
m: "1 \u5206\u949F",
|
|
1913
|
+
mm: "%d \u5206\u949F",
|
|
1914
|
+
h: "1 \u5C0F\u65F6",
|
|
1915
|
+
hh: "%d \u5C0F\u65F6",
|
|
1916
|
+
d: "1 \u5929",
|
|
1917
|
+
dd: "%d \u5929",
|
|
1918
|
+
M: "1 \u4E2A\u6708",
|
|
1919
|
+
MM: "%d \u4E2A\u6708",
|
|
1920
|
+
y: "1 \u5E74",
|
|
1921
|
+
yy: "%d \u5E74"
|
|
1922
|
+
},
|
|
1923
|
+
meridiem: function meridiem(hour, minute) {
|
|
1924
|
+
var hm = hour * 100 + minute;
|
|
1925
|
+
if (hm < 600) {
|
|
1926
|
+
return "\u51CC\u6668";
|
|
1927
|
+
} else if (hm < 900) {
|
|
1928
|
+
return "\u65E9\u4E0A";
|
|
1929
|
+
} else if (hm < 1100) {
|
|
1930
|
+
return "\u4E0A\u5348";
|
|
1931
|
+
} else if (hm < 1300) {
|
|
1932
|
+
return "\u4E2D\u5348";
|
|
1933
|
+
} else if (hm < 1800) {
|
|
1934
|
+
return "\u4E0B\u5348";
|
|
1935
|
+
}
|
|
1936
|
+
return "\u665A\u4E0A";
|
|
1937
|
+
}
|
|
1938
|
+
};
|
|
1939
|
+
esm_default.locale(locale, null, true);
|
|
1940
|
+
|
|
1941
|
+
// packages/sdk/src/runtime/react/createReactPage.tsx
|
|
1398
1942
|
var import_react3 = __toESM(require("react"));
|
|
1399
1943
|
var import_client2 = require("react-dom/client");
|
|
1400
1944
|
|
|
@@ -1468,6 +2012,7 @@ var legacyAntdTheme = {
|
|
|
1468
2012
|
|
|
1469
2013
|
// packages/sdk/src/runtime/react/createReactPage.tsx
|
|
1470
2014
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
2015
|
+
import_dayjs.default.locale("zh-cn");
|
|
1471
2016
|
var NAMESPACE_ROOT_CLASS = "sy-app-workspace";
|
|
1472
2017
|
var RUNTIME_PORTAL_ATTR = "data-sy-runtime-portal";
|
|
1473
2018
|
var PORTAL_CONTAINER_STACK_GLOBAL = "__OPENXIANGDA_PORTAL_CONTAINER_STACK__";
|
|
@@ -1633,6 +2178,7 @@ var installAntdStaticHolder = (el, portalContainer, cssIsolation) => {
|
|
|
1633
2178
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
1634
2179
|
import_antd.ConfigProvider,
|
|
1635
2180
|
{
|
|
2181
|
+
locale: import_zh_CN.default,
|
|
1636
2182
|
prefixCls: antdOptions.prefixCls,
|
|
1637
2183
|
iconPrefixCls: antdOptions.iconPrefixCls,
|
|
1638
2184
|
theme: antdOptions.theme,
|