wargerm 0.5.30 → 0.5.33

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.
@@ -0,0 +1,6 @@
1
+ export declare const YEAER_MONTH_FORMAT_ZH = "YYYY\u5E74MM\u6708";
2
+ export declare const YEAER_MONTH_FORMAT_EN = "YYYY-MM";
3
+ export declare const YEAER_MONTH_FORMAT_FULL = "YYYY-MM-DD";
4
+ export declare const WEEk_HEADER: string[];
5
+ export declare const TOTAL_LENGTH: number;
6
+ export declare const INIT_DAYS: number[];
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export default function Tab4(): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>>;
3
+ export default _default;
@@ -0,0 +1,42 @@
1
+ import { Moment } from 'moment';
2
+ export declare function getMonthDays(date?: string | Moment): number;
3
+ /**
4
+ * 获取当前月第一天是星期几
5
+ */
6
+ export declare function getWeekDays(date?: Moment): number;
7
+ /**
8
+ * 获取当前星期第一天到星期天
9
+ */
10
+ export declare function getWeekList(date?: Moment): string[];
11
+ /**
12
+ * 获取上个月份
13
+ */
14
+ export declare function getLastMonth(date?: Moment): string;
15
+ /**
16
+ * 获取下个月份
17
+ */
18
+ export declare function getNextMonth(date?: Moment): string;
19
+ /**
20
+ * 格式化日期为两个单词,例如:‘1’号 格式为 ‘01’
21
+ * @param {*} dateNumber
22
+ */
23
+ export declare const formatDayWithTwoWords: (dateNumber: number) => string | number;
24
+ /**
25
+ * 初始化日历
26
+ */
27
+ export declare function initCalendar(date?: Moment): {
28
+ date: string;
29
+ text: string | number;
30
+ isCurrentMonth: boolean;
31
+ isCurrentDay: boolean;
32
+ }[];
33
+ /**
34
+ * 初始化日历
35
+ */
36
+ export declare function initWeekCalendar(type: string, date?: Moment): ({
37
+ text: string;
38
+ date?: undefined;
39
+ } | {
40
+ date: string;
41
+ text?: undefined;
42
+ })[];
package/dist/index.css CHANGED
@@ -12744,6 +12744,70 @@ button.swiper-pagination-bullet {
12744
12744
  cursor: se-resize;
12745
12745
  z-index: 101;
12746
12746
  }
12747
+ .content_container {
12748
+ width: 100%;
12749
+ height: 100%;
12750
+ }
12751
+ .content_container .toolbar_container {
12752
+ position: relative;
12753
+ display: flex;
12754
+ align-items: center;
12755
+ justify-content: center;
12756
+ height: 94px;
12757
+ background: white;
12758
+ border: 1px solid rgb(215 215 215);
12759
+ }
12760
+ .content_container .calendar_header_wrapper {
12761
+ display: grid;
12762
+ grid-template-columns: repeat(7, 1fr);
12763
+ width: 100%;
12764
+ height: 47px;
12765
+ color: #fff;
12766
+ background: #26958c;
12767
+ border: 1px solid rgb(215 215 215);
12768
+ }
12769
+ .content_container .content_wrapper {
12770
+ display: grid;
12771
+ grid-template-columns: repeat(7, 1fr);
12772
+ border: 1px solid rgb(215 215 215);
12773
+ }
12774
+ .content_container .content_wrapper .day_container {
12775
+ position: relative;
12776
+ display: flex;
12777
+ align-items: center;
12778
+ justify-content: center;
12779
+ height: 100px;
12780
+ color: #333;
12781
+ background: #f6f6f6;
12782
+ border-right: 1px solid rgb(215 215 215);
12783
+ border-bottom: 1px solid rgb(215 215 215);
12784
+ cursor: pointer;
12785
+ }
12786
+ .content_container .content_wrapper .day_container:hover {
12787
+ box-shadow: inset 0px 0px 5px 1px lightgreen;
12788
+ }
12789
+ .content_container .content_wrapper .date_title {
12790
+ display: inline-block;
12791
+ width: 24px;
12792
+ height: 20px;
12793
+ margin-left: 4px;
12794
+ color: rgb(103 113 122);
12795
+ font-weight: 400;
12796
+ font-size: 16px;
12797
+ font-family: PingFangSC-Regular, PingFang SC;
12798
+ line-height: 20px;
12799
+ text-align: center;
12800
+ }
12801
+ .content_container .content_wrapper .isCurrentMonth {
12802
+ color: #000;
12803
+ background: #fff;
12804
+ }
12805
+ .content_container .content_wrapper .isToday {
12806
+ background: lightgreen;
12807
+ }
12808
+ .content_container .content_wrapper .isCurrentDay {
12809
+ box-shadow: inset 0px 0px 5px 1px lightgreen;
12810
+ }
12747
12811
 
12748
12812
  /* Color
12749
12813
  ----------------------- */
package/dist/index.d.ts CHANGED
@@ -29,6 +29,7 @@ export { default as DragBox } from './components/DragBox';
29
29
  export { default as ModalForm } from './components/ModalForm';
30
30
  export { default as TabelCard } from './components/TabelCard';
31
31
  export { default as Cascader } from './components/Cascader';
32
+ export { default as Calendar } from './components/Calendar';
32
33
  export { default as WebsocketHeart } from './components/WebsocketHeart';
33
34
  export { default as VideoPlayer } from './components/VideoPlayer';
34
35
  export { default as Video } from './components/Video';
@@ -12744,6 +12744,70 @@ button.swiper-pagination-bullet {
12744
12744
  cursor: se-resize;
12745
12745
  z-index: 101;
12746
12746
  }
12747
+ .content_container {
12748
+ width: 100%;
12749
+ height: 100%;
12750
+ }
12751
+ .content_container .toolbar_container {
12752
+ position: relative;
12753
+ display: flex;
12754
+ align-items: center;
12755
+ justify-content: center;
12756
+ height: 94px;
12757
+ background: white;
12758
+ border: 1px solid rgb(215 215 215);
12759
+ }
12760
+ .content_container .calendar_header_wrapper {
12761
+ display: grid;
12762
+ grid-template-columns: repeat(7, 1fr);
12763
+ width: 100%;
12764
+ height: 47px;
12765
+ color: #fff;
12766
+ background: #26958c;
12767
+ border: 1px solid rgb(215 215 215);
12768
+ }
12769
+ .content_container .content_wrapper {
12770
+ display: grid;
12771
+ grid-template-columns: repeat(7, 1fr);
12772
+ border: 1px solid rgb(215 215 215);
12773
+ }
12774
+ .content_container .content_wrapper .day_container {
12775
+ position: relative;
12776
+ display: flex;
12777
+ align-items: center;
12778
+ justify-content: center;
12779
+ height: 100px;
12780
+ color: #333;
12781
+ background: #f6f6f6;
12782
+ border-right: 1px solid rgb(215 215 215);
12783
+ border-bottom: 1px solid rgb(215 215 215);
12784
+ cursor: pointer;
12785
+ }
12786
+ .content_container .content_wrapper .day_container:hover {
12787
+ box-shadow: inset 0px 0px 5px 1px lightgreen;
12788
+ }
12789
+ .content_container .content_wrapper .date_title {
12790
+ display: inline-block;
12791
+ width: 24px;
12792
+ height: 20px;
12793
+ margin-left: 4px;
12794
+ color: rgb(103 113 122);
12795
+ font-weight: 400;
12796
+ font-size: 16px;
12797
+ font-family: PingFangSC-Regular, PingFang SC;
12798
+ line-height: 20px;
12799
+ text-align: center;
12800
+ }
12801
+ .content_container .content_wrapper .isCurrentMonth {
12802
+ color: #000;
12803
+ background: #fff;
12804
+ }
12805
+ .content_container .content_wrapper .isToday {
12806
+ background: lightgreen;
12807
+ }
12808
+ .content_container .content_wrapper .isCurrentDay {
12809
+ box-shadow: inset 0px 0px 5px 1px lightgreen;
12810
+ }
12747
12811
 
12748
12812
  /* Color
12749
12813
  ----------------------- */
package/dist/index.esm.js CHANGED
@@ -6,7 +6,7 @@ import 'antd/es/dropdown/style';
6
6
  import _Dropdown from 'antd/es/dropdown';
7
7
  import 'antd/es/menu/style';
8
8
  import _Menu from 'antd/es/menu';
9
- import { createFromIconfontCN, PlusOutlined, SearchOutlined, ReloadOutlined, CloseCircleOutlined, EllipsisOutlined, ExclamationCircleOutlined, EyeOutlined, EditOutlined, DeleteOutlined } from '@ant-design/icons';
9
+ import { createFromIconfontCN, PlusOutlined, SearchOutlined, ReloadOutlined, CloseCircleOutlined, EllipsisOutlined, ExclamationCircleOutlined, EyeOutlined, EditOutlined, DeleteOutlined, LeftOutlined, RightOutlined } from '@ant-design/icons';
10
10
  import 'antd/es/input/style';
11
11
  import _Input from 'antd/es/input';
12
12
  import 'antd/es/modal/style';
@@ -53,6 +53,8 @@ import 'antd/es/breadcrumb/style';
53
53
  import _Breadcrumb from 'antd/es/breadcrumb';
54
54
  import ReactDOM from 'react-dom';
55
55
  import ProTable from '@ant-design/pro-table';
56
+ import 'antd/es/space/style';
57
+ import _Space from 'antd/es/space';
56
58
  import Player from 'xgplayer';
57
59
  import FlvPlayer from 'xgplayer-flv.js';
58
60
  import HlsJsPlayer from 'xgplayer-hls.js';
@@ -317,6 +319,10 @@ function _slicedToArray(arr, i) {
317
319
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
318
320
  }
319
321
 
322
+ function _toArray(arr) {
323
+ return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
324
+ }
325
+
320
326
  function _toConsumableArray(arr) {
321
327
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
322
328
  }
@@ -11121,12 +11127,6 @@ var TabelCard = function TabelCard(props, ref) {
11121
11127
  delete obj[item.dataIndex];
11122
11128
  });
11123
11129
  formSearchRef.current = obj;
11124
-
11125
- if (columns === null || columns === void 0 ? void 0 : columns.length) {
11126
- var _actionRef$current8;
11127
-
11128
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : _actionRef$current8.reload(true);
11129
- }
11130
11130
  }
11131
11131
  }, [columns]);
11132
11132
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ModalForm$1, _objectSpread2(_objectSpread2({
@@ -11296,6 +11296,364 @@ var TabelCard = function TabelCard(props, ref) {
11296
11296
 
11297
11297
  var index$3 = /*#__PURE__*/React.forwardRef(TabelCard);
11298
11298
 
11299
+ var YEAER_MONTH_FORMAT_EN = 'YYYY-MM';
11300
+
11301
+ var _moment$weekdaysMin = hooks.weekdaysMin(),
11302
+ _moment$weekdaysMin2 = _toArray(_moment$weekdaysMin),
11303
+ _ = _moment$weekdaysMin2[0],
11304
+ rest = _moment$weekdaysMin2.slice(1); // 将星期天放置数组最后
11305
+
11306
+
11307
+ var WEEk_HEADER = [].concat(_toConsumableArray(rest), [_]); // 日历布局为6 * 7单元格
11308
+
11309
+ var TOTAL_LENGTH = 6 * 7; // 初始化一下下
11310
+
11311
+ var INIT_DAYS = Array(TOTAL_LENGTH).fill(0).map(function (_, index) {
11312
+ return +index + 1;
11313
+ });
11314
+
11315
+ hooks.locale('zh-cn');
11316
+ /**
11317
+ * 获取当前月的天数
11318
+ */
11319
+
11320
+ console.log(hooks().format('YYYY-MM-DD'), 'moment()');
11321
+ function getMonthDays(date) {
11322
+ return hooks(date).daysInMonth();
11323
+ }
11324
+ /**
11325
+ * 获取当前月第一天是星期几
11326
+ */
11327
+
11328
+ function getWeekDays(date) {
11329
+ return hooks(date).startOf('month').weekday();
11330
+ }
11331
+ /**
11332
+ * 获取当前星期第一天到星期天
11333
+ */
11334
+
11335
+ function getWeekList(date) {
11336
+ var weekOfDay = parseInt(hooks(date).format('E')); //计算今天是这周第几天
11337
+ // let last_monday = moment().startOf('day').subtract(weekOfDay - 1, 'days').format('YYYY-MM-DD');//周一日期
11338
+ // let last_sunday = moment().startOf('day').subtract(weekOfDay - 7, 'days').format('YYYY-MM-DD');//周日日期
11339
+
11340
+ return ['时间'].concat(_toConsumableArray(new Array(7).fill('').map(function (item, index) {
11341
+ return hooks(date).startOf('day').subtract(weekOfDay - (index + 1), 'days').format('YYYY-MM-DD');
11342
+ })));
11343
+ }
11344
+ /**
11345
+ * 获取上个月份
11346
+ */
11347
+
11348
+ function getLastMonth(date) {
11349
+ return hooks(date).subtract(1, 'month').format(YEAER_MONTH_FORMAT_EN);
11350
+ }
11351
+ /**
11352
+ * 格式化日期为两个单词,例如:‘1’号 格式为 ‘01’
11353
+ * @param {*} dateNumber
11354
+ */
11355
+
11356
+ var formatDayWithTwoWords = function formatDayWithTwoWords(dateNumber) {
11357
+ if (dateNumber < 10) {
11358
+ return '0' + dateNumber;
11359
+ }
11360
+
11361
+ return dateNumber;
11362
+ };
11363
+ /**
11364
+ * 初始化日历
11365
+ */
11366
+
11367
+ function initCalendar(date) {
11368
+ // 当前月天数
11369
+ var totalDaysInMonth = getMonthDays(date); // 上个月天数
11370
+
11371
+ var totalDaysInLastMonth = getMonthDays(getLastMonth(date)); // 下个月开始日期
11372
+
11373
+ var nextFirstDate = 1;
11374
+ var lastDays = [],
11375
+ currentDays = [],
11376
+ nextDays = []; // 当前月第一天是星期几(索引值)
11377
+
11378
+ /**
11379
+ * 这里的索引值刚刚好是需要填充的上月的天数
11380
+ */
11381
+
11382
+ var currentWeekDay = getWeekDays(date);
11383
+
11384
+ for (var i = 0, len = 42; i < len; i++) {
11385
+ // 填充上个月的天数
11386
+ if (i < currentWeekDay) {
11387
+ // lastDays.push(totalDaysInLastMonth);
11388
+ var daySting = hooks(hooks(date).subtract(1, 'month').format(YEAER_MONTH_FORMAT_EN) + '-' + totalDaysInLastMonth).format('YYYY-MM-DD');
11389
+ lastDays.push({
11390
+ date: daySting,
11391
+ text: formatDayWithTwoWords(totalDaysInLastMonth),
11392
+ isCurrentMonth: false,
11393
+ isCurrentDay: hooks().format('YYYY-MM-DD') == daySting
11394
+ });
11395
+ totalDaysInLastMonth--;
11396
+ } // 填充下个月的天数
11397
+ else if (i >= totalDaysInMonth + currentWeekDay) {
11398
+ // nextDays.push(nextFirstDate);
11399
+ var _daySting = hooks(hooks(date).add(1, 'month').format(YEAER_MONTH_FORMAT_EN) + '-' + nextFirstDate).format('YYYY-MM-DD');
11400
+
11401
+ nextDays.push({
11402
+ date: _daySting,
11403
+ text: formatDayWithTwoWords(nextFirstDate),
11404
+ isCurrentMonth: false,
11405
+ isCurrentDay: hooks().format('YYYY-MM-DD') == _daySting
11406
+ });
11407
+ nextFirstDate++;
11408
+ } // 填充当前月天数
11409
+ else {
11410
+ // currentDays.push(i - currentWeekDay + 1);
11411
+ var _daySting2 = hooks(hooks(date).format(YEAER_MONTH_FORMAT_EN) + '-' + (i - currentWeekDay + 1)).format('YYYY-MM-DD');
11412
+
11413
+ currentDays.push({
11414
+ date: _daySting2,
11415
+ text: formatDayWithTwoWords(i - currentWeekDay + 1),
11416
+ isCurrentMonth: true,
11417
+ isCurrentDay: hooks().format('YYYY-MM-DD') == _daySting2
11418
+ });
11419
+ }
11420
+ } // 上个月需要倒序显示
11421
+
11422
+
11423
+ return [].concat(_toConsumableArray(lastDays.reverse()), currentDays, nextDays);
11424
+ }
11425
+ /**
11426
+ * 初始化日历
11427
+ */
11428
+
11429
+ function initWeekCalendar(type, date) {
11430
+ var weekLength = type == 'week' ? 8 : 2;
11431
+ var dayTime = ['08:00', '08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30'];
11432
+ var weekOfDay = parseInt(hooks(date).format('E')); //计算今天是这周第几天
11433
+
11434
+ var days = [];
11435
+
11436
+ for (var i = 0, len = weekLength * 20; i < len; i++) {
11437
+ var timeIndex = Math.floor(i / weekLength);
11438
+
11439
+ if (i % weekLength == 0) {
11440
+ days.push({
11441
+ text: dayTime[timeIndex]
11442
+ });
11443
+ } else {
11444
+ days.push({
11445
+ date: type == 'week' ? hooks(date).startOf('day').subtract(weekOfDay - i % weekLength, 'days').format('YYYY-MM-DD') + " ".concat(dayTime[timeIndex]) : hooks(date).format('YYYY-MM-DD') + " ".concat(dayTime[timeIndex])
11446
+ });
11447
+ }
11448
+ }
11449
+
11450
+ return days;
11451
+ }
11452
+
11453
+ hooks.locale('zh-cn');
11454
+
11455
+ function Calendar(_ref, ref) {
11456
+ var value = _ref.value,
11457
+ onChange = _ref.onChange,
11458
+ click = _ref.click,
11459
+ type = _ref.type,
11460
+ toolBarSolt = _ref.toolBarSolt,
11461
+ dateCellRender = _ref.dateCellRender,
11462
+ calendarBodyClassName = _ref.calendarBodyClassName;
11463
+
11464
+ var _useState = useState(initCalendar()),
11465
+ _useState2 = _slicedToArray(_useState, 2),
11466
+ days = _useState2[0],
11467
+ setDays = _useState2[1];
11468
+
11469
+ var _useState3 = useState(hooks()),
11470
+ _useState4 = _slicedToArray(_useState3, 2),
11471
+ datevalue = _useState4[0],
11472
+ setDatevalue = _useState4[1];
11473
+
11474
+ var _useState5 = useState(getWeekList()),
11475
+ _useState6 = _slicedToArray(_useState5, 2),
11476
+ oneWeekDays = _useState6[0],
11477
+ setOneWeekDays = _useState6[1];
11478
+
11479
+ var weekLabelArray = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'];
11480
+
11481
+ var getweekDay = function getweekDay(date) {
11482
+ var index = hooks(date).day();
11483
+
11484
+ if (index == 0) {
11485
+ index = 7;
11486
+ }
11487
+
11488
+ return [weekLabelArray[index - 1]];
11489
+ };
11490
+
11491
+ useEffect(function () {
11492
+ if (type == 'day' || type == 'week') {
11493
+ if (type == 'day') {
11494
+ setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(datevalue))));
11495
+ } else {
11496
+ setOneWeekDays(getWeekList(datevalue));
11497
+ }
11498
+
11499
+ setDays(initWeekCalendar(type, datevalue));
11500
+ } else {
11501
+ setDays(initCalendar(datevalue));
11502
+ }
11503
+ }, [type, datevalue]);
11504
+ useEffect(function () {
11505
+ setDatevalue(value || hooks());
11506
+ }, [value]);
11507
+ useEffect(function () {
11508
+ onChange && onChange(datevalue);
11509
+ }, [datevalue]);
11510
+
11511
+ var handleUp = function handleUp() {
11512
+ if (type == 'day' || type == 'week') {
11513
+ if (type == 'day') {
11514
+ var lastDay = hooks(datevalue).subtract(1, 'days');
11515
+ setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(lastDay))));
11516
+ setDays(initWeekCalendar(type, lastDay));
11517
+ setDatevalue(lastDay);
11518
+ } else {
11519
+ var lastWeek = hooks().week(hooks(datevalue).week() - 1);
11520
+ setOneWeekDays(getWeekList(lastWeek));
11521
+ setDays(initWeekCalendar(type, lastWeek));
11522
+ setDatevalue(lastWeek);
11523
+ }
11524
+ } else {
11525
+ var lastMonth = hooks(datevalue).subtract(1, 'month');
11526
+ setDays(initCalendar(lastMonth));
11527
+ setDatevalue(lastMonth);
11528
+ }
11529
+ };
11530
+
11531
+ var handleDown = function handleDown() {
11532
+ if (type == 'day' || type == 'week') {
11533
+ if (type == 'day') {
11534
+ var lastDay = hooks(datevalue).add(1, 'days');
11535
+ setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(lastDay))));
11536
+ setDays(initWeekCalendar(type, lastDay));
11537
+ setDatevalue(lastDay);
11538
+ } else {
11539
+ var lastWeek = hooks().week(hooks(datevalue).week() + 1);
11540
+ setOneWeekDays(getWeekList(lastWeek));
11541
+ setDays(initWeekCalendar(type, lastWeek));
11542
+ setDatevalue(lastWeek);
11543
+ }
11544
+ } else {
11545
+ var lastMonth = hooks(datevalue).add(1, 'month');
11546
+ setDays(initCalendar(lastMonth));
11547
+ setDatevalue(lastMonth);
11548
+ }
11549
+ };
11550
+
11551
+ var cellClick = function cellClick(info) {
11552
+ console.log(info);
11553
+ click && click(info);
11554
+ };
11555
+
11556
+ useImperativeHandle(ref, function () {
11557
+ return {
11558
+ datevalue: datevalue,
11559
+ handleUp: handleUp,
11560
+ handleDown: handleDown
11561
+ };
11562
+ });
11563
+ return /*#__PURE__*/React.createElement("div", {
11564
+ className: "content_container"
11565
+ }, /*#__PURE__*/React.createElement("div", {
11566
+ className: "toolbar_container"
11567
+ }, /*#__PURE__*/React.createElement(_Space, null, /*#__PURE__*/React.createElement(_Button, {
11568
+ icon: /*#__PURE__*/React.createElement(LeftOutlined, null),
11569
+ type: "text",
11570
+ onClick: handleUp
11571
+ }), type == 'day' ? /*#__PURE__*/React.createElement(_DatePicker, {
11572
+ value: datevalue,
11573
+ onChange: function onChange(date) {
11574
+ setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(date))));
11575
+ setDays(initWeekCalendar(type, date));
11576
+ setDatevalue(date);
11577
+ },
11578
+ style: {
11579
+ width: '250px'
11580
+ }
11581
+ }) : type == 'week' ? /*#__PURE__*/React.createElement(_DatePicker, {
11582
+ value: datevalue,
11583
+ style: {
11584
+ width: '250px'
11585
+ },
11586
+ format: "".concat(hooks(datevalue).startOf('week').format('YYYY-MM-DD'), " ~ ").concat(hooks(datevalue).endOf('week').format('YYYY-MM-DD')),
11587
+ picker: "week",
11588
+ onChange: function onChange(date) {
11589
+ setOneWeekDays(getWeekList(date));
11590
+ setDays(initWeekCalendar(type, date));
11591
+ setDatevalue(date);
11592
+ }
11593
+ }) : /*#__PURE__*/React.createElement(_DatePicker, {
11594
+ value: datevalue,
11595
+ picker: "month",
11596
+ onChange: function onChange(date) {
11597
+ setDays(initCalendar(date));
11598
+ setDatevalue(date);
11599
+ },
11600
+ style: {
11601
+ width: '250px'
11602
+ }
11603
+ }), /*#__PURE__*/React.createElement(_Button, {
11604
+ icon: /*#__PURE__*/React.createElement(RightOutlined, null),
11605
+ type: "text",
11606
+ onClick: handleDown
11607
+ })), /*#__PURE__*/React.createElement("div", {
11608
+ className: "pa r30 flex h100p ai-c ",
11609
+ style: {
11610
+ margin: 'auto 0'
11611
+ }
11612
+ }, toolBarSolt)), type == 'week' || type == 'day' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
11613
+ className: "calendar_header_wrapper",
11614
+ style: {
11615
+ gridTemplateColumns: type == 'week' ? 'repeat(8, 1fr)' : '1fr 7fr'
11616
+ }
11617
+ }, oneWeekDays.map(function (weekLabel) {
11618
+ return /*#__PURE__*/React.createElement("div", {
11619
+ key: weekLabel,
11620
+ className: "flex ai-c jc-c"
11621
+ }, weekLabel);
11622
+ })), /*#__PURE__*/React.createElement("div", {
11623
+ className: "content_wrapper ".concat(calendarBodyClassName),
11624
+ style: {
11625
+ gridTemplateColumns: type == 'week' ? 'repeat(8, 1fr)' : '1fr 7fr'
11626
+ }
11627
+ }, days === null || days === void 0 ? void 0 : days.map(function (day, index) {
11628
+ return /*#__PURE__*/React.createElement("div", {
11629
+ onClick: function onClick() {
11630
+ return cellClick(day);
11631
+ },
11632
+ className: "day_container ".concat(day.isCurrentDay ? 'isCurrentDay' : '', " ").concat(day.isCurrentMonth ? 'isCurrentMonth' : ''),
11633
+ key: index
11634
+ }, dateCellRender ? dateCellRender(day) : day.text);
11635
+ }))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
11636
+ className: "calendar_header_wrapper"
11637
+ }, weekLabelArray.map(function (weekLabel) {
11638
+ return /*#__PURE__*/React.createElement("div", {
11639
+ key: weekLabel,
11640
+ className: "flex ai-c jc-c"
11641
+ }, weekLabel);
11642
+ })), /*#__PURE__*/React.createElement("div", {
11643
+ className: "content_wrapper ".concat(calendarBodyClassName)
11644
+ }, days === null || days === void 0 ? void 0 : days.map(function (day, index) {
11645
+ return /*#__PURE__*/React.createElement("div", {
11646
+ onClick: function onClick() {
11647
+ return cellClick(day);
11648
+ },
11649
+ className: "day_container ".concat(day.isCurrentDay ? 'isCurrentDay' : '', " ").concat(day.isCurrentMonth ? 'isCurrentMonth' : ''),
11650
+ key: index
11651
+ }, dateCellRender ? dateCellRender(day) : day.text);
11652
+ }))));
11653
+ }
11654
+
11655
+ var index$4 = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(Calendar));
11656
+
11299
11657
  var WebsocketHeart = /*#__PURE__*/_createClass(function WebsocketHeart(_ref) {
11300
11658
  var _this = this;
11301
11659
 
@@ -11730,7 +12088,7 @@ function VideoPlayer(_ref, ref) {
11730
12088
  })) : null));
11731
12089
  }
11732
12090
 
11733
- var index$4 = /*#__PURE__*/forwardRef(VideoPlayer);
12091
+ var index$5 = /*#__PURE__*/forwardRef(VideoPlayer);
11734
12092
 
11735
12093
  var _excluded$j = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "visible", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
11736
12094
 
@@ -11739,7 +12097,7 @@ var DEFAULT_PLAY_BACK_RATE = [0.5, 0.75, 1, 1.5, 2]; // 默认记忆提示文字
11739
12097
  var DEFAULT_LAST_PLAY_TIME_DELAY = 5; // 默认音量大小
11740
12098
 
11741
12099
  var DEFAULT_VOLUME = 0.6;
11742
- var index$5 = (function (_ref) {
12100
+ var index$6 = (function (_ref) {
11743
12101
  var id = _ref.id,
11744
12102
  _ref$videoUrls = _ref.videoUrls,
11745
12103
  videoUrls = _ref$videoUrls === void 0 ? [] : _ref$videoUrls,
@@ -12741,4 +13099,4 @@ function WaterLevelCharts(config) {
12741
13099
  });
12742
13100
  }
12743
13101
 
12744
- export { Index$a as AutoScroll, Index$c as Breadcrumb, WButton as Button, index$2 as Card, WCascader as Cascader, Index$4 as Checkbox, Index$9 as CountUp, Index$2 as DatePicker, DragBox, index as IconFont, Index as Input, WInputNumber as InputNumber, LineEcharts, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, Index$8 as Number, NumericInput, Index$3 as Radio, Select, Index$b as Swiper, WSwitch as Switch, index$3 as TabelCard, index$1 as Table, Index$7 as TreeSelect, Upload, index$5 as Video, index$4 as VideoPlayer, Index$6 as WDatePicker, WForm$1 as WForm, WaterLevelCharts, WebsocketHeart, useEventEmitter };
13102
+ export { Index$a as AutoScroll, Index$c as Breadcrumb, WButton as Button, index$4 as Calendar, index$2 as Card, WCascader as Cascader, Index$4 as Checkbox, Index$9 as CountUp, Index$2 as DatePicker, DragBox, index as IconFont, Index as Input, WInputNumber as InputNumber, LineEcharts, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, Index$8 as Number, NumericInput, Index$3 as Radio, Select, Index$b as Swiper, WSwitch as Switch, index$3 as TabelCard, index$1 as Table, Index$7 as TreeSelect, Upload, index$6 as Video, index$5 as VideoPlayer, Index$6 as WDatePicker, WForm$1 as WForm, WaterLevelCharts, WebsocketHeart, useEventEmitter };
package/dist/index.js CHANGED
@@ -57,6 +57,8 @@ require('antd/es/breadcrumb/style');
57
57
  var _Breadcrumb = require('antd/es/breadcrumb');
58
58
  var ReactDOM = require('react-dom');
59
59
  var ProTable = require('@ant-design/pro-table');
60
+ require('antd/es/space/style');
61
+ var _Space = require('antd/es/space');
60
62
  var Player = require('xgplayer');
61
63
  var FlvPlayer = require('xgplayer-flv.js');
62
64
  var HlsJsPlayer = require('xgplayer-hls.js');
@@ -118,6 +120,7 @@ var SwiperCore__default = /*#__PURE__*/_interopDefaultLegacy(SwiperCore);
118
120
  var _Breadcrumb__default = /*#__PURE__*/_interopDefaultLegacy(_Breadcrumb);
119
121
  var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
120
122
  var ProTable__default = /*#__PURE__*/_interopDefaultLegacy(ProTable);
123
+ var _Space__default = /*#__PURE__*/_interopDefaultLegacy(_Space);
121
124
  var Player__default = /*#__PURE__*/_interopDefaultLegacy(Player);
122
125
  var FlvPlayer__default = /*#__PURE__*/_interopDefaultLegacy(FlvPlayer);
123
126
  var HlsJsPlayer__default = /*#__PURE__*/_interopDefaultLegacy(HlsJsPlayer);
@@ -378,6 +381,10 @@ function _slicedToArray(arr, i) {
378
381
  return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
379
382
  }
380
383
 
384
+ function _toArray(arr) {
385
+ return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
386
+ }
387
+
381
388
  function _toConsumableArray(arr) {
382
389
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
383
390
  }
@@ -11182,12 +11189,6 @@ var TabelCard = function TabelCard(props, ref) {
11182
11189
  delete obj[item.dataIndex];
11183
11190
  });
11184
11191
  formSearchRef.current = obj;
11185
-
11186
- if (columns === null || columns === void 0 ? void 0 : columns.length) {
11187
- var _actionRef$current8;
11188
-
11189
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : _actionRef$current8.reload(true);
11190
- }
11191
11192
  }
11192
11193
  }, [columns]);
11193
11194
  return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement(ModalForm$1, _objectSpread2(_objectSpread2({
@@ -11357,6 +11358,364 @@ var TabelCard = function TabelCard(props, ref) {
11357
11358
 
11358
11359
  var index$3 = /*#__PURE__*/React__default['default'].forwardRef(TabelCard);
11359
11360
 
11361
+ var YEAER_MONTH_FORMAT_EN = 'YYYY-MM';
11362
+
11363
+ var _moment$weekdaysMin = hooks.weekdaysMin(),
11364
+ _moment$weekdaysMin2 = _toArray(_moment$weekdaysMin),
11365
+ _ = _moment$weekdaysMin2[0],
11366
+ rest = _moment$weekdaysMin2.slice(1); // 将星期天放置数组最后
11367
+
11368
+
11369
+ var WEEk_HEADER = [].concat(_toConsumableArray(rest), [_]); // 日历布局为6 * 7单元格
11370
+
11371
+ var TOTAL_LENGTH = 6 * 7; // 初始化一下下
11372
+
11373
+ var INIT_DAYS = Array(TOTAL_LENGTH).fill(0).map(function (_, index) {
11374
+ return +index + 1;
11375
+ });
11376
+
11377
+ hooks.locale('zh-cn');
11378
+ /**
11379
+ * 获取当前月的天数
11380
+ */
11381
+
11382
+ console.log(hooks().format('YYYY-MM-DD'), 'moment()');
11383
+ function getMonthDays(date) {
11384
+ return hooks(date).daysInMonth();
11385
+ }
11386
+ /**
11387
+ * 获取当前月第一天是星期几
11388
+ */
11389
+
11390
+ function getWeekDays(date) {
11391
+ return hooks(date).startOf('month').weekday();
11392
+ }
11393
+ /**
11394
+ * 获取当前星期第一天到星期天
11395
+ */
11396
+
11397
+ function getWeekList(date) {
11398
+ var weekOfDay = parseInt(hooks(date).format('E')); //计算今天是这周第几天
11399
+ // let last_monday = moment().startOf('day').subtract(weekOfDay - 1, 'days').format('YYYY-MM-DD');//周一日期
11400
+ // let last_sunday = moment().startOf('day').subtract(weekOfDay - 7, 'days').format('YYYY-MM-DD');//周日日期
11401
+
11402
+ return ['时间'].concat(_toConsumableArray(new Array(7).fill('').map(function (item, index) {
11403
+ return hooks(date).startOf('day').subtract(weekOfDay - (index + 1), 'days').format('YYYY-MM-DD');
11404
+ })));
11405
+ }
11406
+ /**
11407
+ * 获取上个月份
11408
+ */
11409
+
11410
+ function getLastMonth(date) {
11411
+ return hooks(date).subtract(1, 'month').format(YEAER_MONTH_FORMAT_EN);
11412
+ }
11413
+ /**
11414
+ * 格式化日期为两个单词,例如:‘1’号 格式为 ‘01’
11415
+ * @param {*} dateNumber
11416
+ */
11417
+
11418
+ var formatDayWithTwoWords = function formatDayWithTwoWords(dateNumber) {
11419
+ if (dateNumber < 10) {
11420
+ return '0' + dateNumber;
11421
+ }
11422
+
11423
+ return dateNumber;
11424
+ };
11425
+ /**
11426
+ * 初始化日历
11427
+ */
11428
+
11429
+ function initCalendar(date) {
11430
+ // 当前月天数
11431
+ var totalDaysInMonth = getMonthDays(date); // 上个月天数
11432
+
11433
+ var totalDaysInLastMonth = getMonthDays(getLastMonth(date)); // 下个月开始日期
11434
+
11435
+ var nextFirstDate = 1;
11436
+ var lastDays = [],
11437
+ currentDays = [],
11438
+ nextDays = []; // 当前月第一天是星期几(索引值)
11439
+
11440
+ /**
11441
+ * 这里的索引值刚刚好是需要填充的上月的天数
11442
+ */
11443
+
11444
+ var currentWeekDay = getWeekDays(date);
11445
+
11446
+ for (var i = 0, len = 42; i < len; i++) {
11447
+ // 填充上个月的天数
11448
+ if (i < currentWeekDay) {
11449
+ // lastDays.push(totalDaysInLastMonth);
11450
+ var daySting = hooks(hooks(date).subtract(1, 'month').format(YEAER_MONTH_FORMAT_EN) + '-' + totalDaysInLastMonth).format('YYYY-MM-DD');
11451
+ lastDays.push({
11452
+ date: daySting,
11453
+ text: formatDayWithTwoWords(totalDaysInLastMonth),
11454
+ isCurrentMonth: false,
11455
+ isCurrentDay: hooks().format('YYYY-MM-DD') == daySting
11456
+ });
11457
+ totalDaysInLastMonth--;
11458
+ } // 填充下个月的天数
11459
+ else if (i >= totalDaysInMonth + currentWeekDay) {
11460
+ // nextDays.push(nextFirstDate);
11461
+ var _daySting = hooks(hooks(date).add(1, 'month').format(YEAER_MONTH_FORMAT_EN) + '-' + nextFirstDate).format('YYYY-MM-DD');
11462
+
11463
+ nextDays.push({
11464
+ date: _daySting,
11465
+ text: formatDayWithTwoWords(nextFirstDate),
11466
+ isCurrentMonth: false,
11467
+ isCurrentDay: hooks().format('YYYY-MM-DD') == _daySting
11468
+ });
11469
+ nextFirstDate++;
11470
+ } // 填充当前月天数
11471
+ else {
11472
+ // currentDays.push(i - currentWeekDay + 1);
11473
+ var _daySting2 = hooks(hooks(date).format(YEAER_MONTH_FORMAT_EN) + '-' + (i - currentWeekDay + 1)).format('YYYY-MM-DD');
11474
+
11475
+ currentDays.push({
11476
+ date: _daySting2,
11477
+ text: formatDayWithTwoWords(i - currentWeekDay + 1),
11478
+ isCurrentMonth: true,
11479
+ isCurrentDay: hooks().format('YYYY-MM-DD') == _daySting2
11480
+ });
11481
+ }
11482
+ } // 上个月需要倒序显示
11483
+
11484
+
11485
+ return [].concat(_toConsumableArray(lastDays.reverse()), currentDays, nextDays);
11486
+ }
11487
+ /**
11488
+ * 初始化日历
11489
+ */
11490
+
11491
+ function initWeekCalendar(type, date) {
11492
+ var weekLength = type == 'week' ? 8 : 2;
11493
+ var dayTime = ['08:00', '08:30', '09:00', '09:30', '10:00', '10:30', '11:00', '11:30', '12:00', '12:30', '13:00', '13:30', '14:00', '14:30', '15:00', '15:30', '16:00', '16:30', '17:00', '17:30'];
11494
+ var weekOfDay = parseInt(hooks(date).format('E')); //计算今天是这周第几天
11495
+
11496
+ var days = [];
11497
+
11498
+ for (var i = 0, len = weekLength * 20; i < len; i++) {
11499
+ var timeIndex = Math.floor(i / weekLength);
11500
+
11501
+ if (i % weekLength == 0) {
11502
+ days.push({
11503
+ text: dayTime[timeIndex]
11504
+ });
11505
+ } else {
11506
+ days.push({
11507
+ date: type == 'week' ? hooks(date).startOf('day').subtract(weekOfDay - i % weekLength, 'days').format('YYYY-MM-DD') + " ".concat(dayTime[timeIndex]) : hooks(date).format('YYYY-MM-DD') + " ".concat(dayTime[timeIndex])
11508
+ });
11509
+ }
11510
+ }
11511
+
11512
+ return days;
11513
+ }
11514
+
11515
+ hooks.locale('zh-cn');
11516
+
11517
+ function Calendar(_ref, ref) {
11518
+ var value = _ref.value,
11519
+ onChange = _ref.onChange,
11520
+ click = _ref.click,
11521
+ type = _ref.type,
11522
+ toolBarSolt = _ref.toolBarSolt,
11523
+ dateCellRender = _ref.dateCellRender,
11524
+ calendarBodyClassName = _ref.calendarBodyClassName;
11525
+
11526
+ var _useState = React.useState(initCalendar()),
11527
+ _useState2 = _slicedToArray(_useState, 2),
11528
+ days = _useState2[0],
11529
+ setDays = _useState2[1];
11530
+
11531
+ var _useState3 = React.useState(hooks()),
11532
+ _useState4 = _slicedToArray(_useState3, 2),
11533
+ datevalue = _useState4[0],
11534
+ setDatevalue = _useState4[1];
11535
+
11536
+ var _useState5 = React.useState(getWeekList()),
11537
+ _useState6 = _slicedToArray(_useState5, 2),
11538
+ oneWeekDays = _useState6[0],
11539
+ setOneWeekDays = _useState6[1];
11540
+
11541
+ var weekLabelArray = ['周一', '周二', '周三', '周四', '周五', '周六', '周日'];
11542
+
11543
+ var getweekDay = function getweekDay(date) {
11544
+ var index = hooks(date).day();
11545
+
11546
+ if (index == 0) {
11547
+ index = 7;
11548
+ }
11549
+
11550
+ return [weekLabelArray[index - 1]];
11551
+ };
11552
+
11553
+ React.useEffect(function () {
11554
+ if (type == 'day' || type == 'week') {
11555
+ if (type == 'day') {
11556
+ setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(datevalue))));
11557
+ } else {
11558
+ setOneWeekDays(getWeekList(datevalue));
11559
+ }
11560
+
11561
+ setDays(initWeekCalendar(type, datevalue));
11562
+ } else {
11563
+ setDays(initCalendar(datevalue));
11564
+ }
11565
+ }, [type, datevalue]);
11566
+ React.useEffect(function () {
11567
+ setDatevalue(value || hooks());
11568
+ }, [value]);
11569
+ React.useEffect(function () {
11570
+ onChange && onChange(datevalue);
11571
+ }, [datevalue]);
11572
+
11573
+ var handleUp = function handleUp() {
11574
+ if (type == 'day' || type == 'week') {
11575
+ if (type == 'day') {
11576
+ var lastDay = hooks(datevalue).subtract(1, 'days');
11577
+ setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(lastDay))));
11578
+ setDays(initWeekCalendar(type, lastDay));
11579
+ setDatevalue(lastDay);
11580
+ } else {
11581
+ var lastWeek = hooks().week(hooks(datevalue).week() - 1);
11582
+ setOneWeekDays(getWeekList(lastWeek));
11583
+ setDays(initWeekCalendar(type, lastWeek));
11584
+ setDatevalue(lastWeek);
11585
+ }
11586
+ } else {
11587
+ var lastMonth = hooks(datevalue).subtract(1, 'month');
11588
+ setDays(initCalendar(lastMonth));
11589
+ setDatevalue(lastMonth);
11590
+ }
11591
+ };
11592
+
11593
+ var handleDown = function handleDown() {
11594
+ if (type == 'day' || type == 'week') {
11595
+ if (type == 'day') {
11596
+ var lastDay = hooks(datevalue).add(1, 'days');
11597
+ setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(lastDay))));
11598
+ setDays(initWeekCalendar(type, lastDay));
11599
+ setDatevalue(lastDay);
11600
+ } else {
11601
+ var lastWeek = hooks().week(hooks(datevalue).week() + 1);
11602
+ setOneWeekDays(getWeekList(lastWeek));
11603
+ setDays(initWeekCalendar(type, lastWeek));
11604
+ setDatevalue(lastWeek);
11605
+ }
11606
+ } else {
11607
+ var lastMonth = hooks(datevalue).add(1, 'month');
11608
+ setDays(initCalendar(lastMonth));
11609
+ setDatevalue(lastMonth);
11610
+ }
11611
+ };
11612
+
11613
+ var cellClick = function cellClick(info) {
11614
+ console.log(info);
11615
+ click && click(info);
11616
+ };
11617
+
11618
+ React.useImperativeHandle(ref, function () {
11619
+ return {
11620
+ datevalue: datevalue,
11621
+ handleUp: handleUp,
11622
+ handleDown: handleDown
11623
+ };
11624
+ });
11625
+ return /*#__PURE__*/React__default['default'].createElement("div", {
11626
+ className: "content_container"
11627
+ }, /*#__PURE__*/React__default['default'].createElement("div", {
11628
+ className: "toolbar_container"
11629
+ }, /*#__PURE__*/React__default['default'].createElement(_Space__default['default'], null, /*#__PURE__*/React__default['default'].createElement(_Button__default['default'], {
11630
+ icon: /*#__PURE__*/React__default['default'].createElement(icons.LeftOutlined, null),
11631
+ type: "text",
11632
+ onClick: handleUp
11633
+ }), type == 'day' ? /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'], {
11634
+ value: datevalue,
11635
+ onChange: function onChange(date) {
11636
+ setOneWeekDays(['时间'].concat(_toConsumableArray(getweekDay(date))));
11637
+ setDays(initWeekCalendar(type, date));
11638
+ setDatevalue(date);
11639
+ },
11640
+ style: {
11641
+ width: '250px'
11642
+ }
11643
+ }) : type == 'week' ? /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'], {
11644
+ value: datevalue,
11645
+ style: {
11646
+ width: '250px'
11647
+ },
11648
+ format: "".concat(hooks(datevalue).startOf('week').format('YYYY-MM-DD'), " ~ ").concat(hooks(datevalue).endOf('week').format('YYYY-MM-DD')),
11649
+ picker: "week",
11650
+ onChange: function onChange(date) {
11651
+ setOneWeekDays(getWeekList(date));
11652
+ setDays(initWeekCalendar(type, date));
11653
+ setDatevalue(date);
11654
+ }
11655
+ }) : /*#__PURE__*/React__default['default'].createElement(_DatePicker__default['default'], {
11656
+ value: datevalue,
11657
+ picker: "month",
11658
+ onChange: function onChange(date) {
11659
+ setDays(initCalendar(date));
11660
+ setDatevalue(date);
11661
+ },
11662
+ style: {
11663
+ width: '250px'
11664
+ }
11665
+ }), /*#__PURE__*/React__default['default'].createElement(_Button__default['default'], {
11666
+ icon: /*#__PURE__*/React__default['default'].createElement(icons.RightOutlined, null),
11667
+ type: "text",
11668
+ onClick: handleDown
11669
+ })), /*#__PURE__*/React__default['default'].createElement("div", {
11670
+ className: "pa r30 flex h100p ai-c ",
11671
+ style: {
11672
+ margin: 'auto 0'
11673
+ }
11674
+ }, toolBarSolt)), type == 'week' || type == 'day' ? /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
11675
+ className: "calendar_header_wrapper",
11676
+ style: {
11677
+ gridTemplateColumns: type == 'week' ? 'repeat(8, 1fr)' : '1fr 7fr'
11678
+ }
11679
+ }, oneWeekDays.map(function (weekLabel) {
11680
+ return /*#__PURE__*/React__default['default'].createElement("div", {
11681
+ key: weekLabel,
11682
+ className: "flex ai-c jc-c"
11683
+ }, weekLabel);
11684
+ })), /*#__PURE__*/React__default['default'].createElement("div", {
11685
+ className: "content_wrapper ".concat(calendarBodyClassName),
11686
+ style: {
11687
+ gridTemplateColumns: type == 'week' ? 'repeat(8, 1fr)' : '1fr 7fr'
11688
+ }
11689
+ }, days === null || days === void 0 ? void 0 : days.map(function (day, index) {
11690
+ return /*#__PURE__*/React__default['default'].createElement("div", {
11691
+ onClick: function onClick() {
11692
+ return cellClick(day);
11693
+ },
11694
+ className: "day_container ".concat(day.isCurrentDay ? 'isCurrentDay' : '', " ").concat(day.isCurrentMonth ? 'isCurrentMonth' : ''),
11695
+ key: index
11696
+ }, dateCellRender ? dateCellRender(day) : day.text);
11697
+ }))) : /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, /*#__PURE__*/React__default['default'].createElement("div", {
11698
+ className: "calendar_header_wrapper"
11699
+ }, weekLabelArray.map(function (weekLabel) {
11700
+ return /*#__PURE__*/React__default['default'].createElement("div", {
11701
+ key: weekLabel,
11702
+ className: "flex ai-c jc-c"
11703
+ }, weekLabel);
11704
+ })), /*#__PURE__*/React__default['default'].createElement("div", {
11705
+ className: "content_wrapper ".concat(calendarBodyClassName)
11706
+ }, days === null || days === void 0 ? void 0 : days.map(function (day, index) {
11707
+ return /*#__PURE__*/React__default['default'].createElement("div", {
11708
+ onClick: function onClick() {
11709
+ return cellClick(day);
11710
+ },
11711
+ className: "day_container ".concat(day.isCurrentDay ? 'isCurrentDay' : '', " ").concat(day.isCurrentMonth ? 'isCurrentMonth' : ''),
11712
+ key: index
11713
+ }, dateCellRender ? dateCellRender(day) : day.text);
11714
+ }))));
11715
+ }
11716
+
11717
+ var index$4 = /*#__PURE__*/React.memo( /*#__PURE__*/React.forwardRef(Calendar));
11718
+
11360
11719
  var WebsocketHeart = /*#__PURE__*/_createClass(function WebsocketHeart(_ref) {
11361
11720
  var _this = this;
11362
11721
 
@@ -11791,7 +12150,7 @@ function VideoPlayer(_ref, ref) {
11791
12150
  })) : null));
11792
12151
  }
11793
12152
 
11794
- var index$4 = /*#__PURE__*/React.forwardRef(VideoPlayer);
12153
+ var index$5 = /*#__PURE__*/React.forwardRef(VideoPlayer);
11795
12154
 
11796
12155
  var _excluded$j = ["id", "videoUrls", "definitionList", "isLoop", "muted", "currentIndex", "setCurrentIndex", "className", "style", "visible", "autoplay", "videoInit", "enableMemory", "lastPlayTimeHideDelay"];
11797
12156
 
@@ -11800,7 +12159,7 @@ var DEFAULT_PLAY_BACK_RATE = [0.5, 0.75, 1, 1.5, 2]; // 默认记忆提示文字
11800
12159
  var DEFAULT_LAST_PLAY_TIME_DELAY = 5; // 默认音量大小
11801
12160
 
11802
12161
  var DEFAULT_VOLUME = 0.6;
11803
- var index$5 = (function (_ref) {
12162
+ var index$6 = (function (_ref) {
11804
12163
  var id = _ref.id,
11805
12164
  _ref$videoUrls = _ref.videoUrls,
11806
12165
  videoUrls = _ref$videoUrls === void 0 ? [] : _ref$videoUrls,
@@ -12805,6 +13164,7 @@ function WaterLevelCharts(config) {
12805
13164
  exports.AutoScroll = Index$a;
12806
13165
  exports.Breadcrumb = Index$c;
12807
13166
  exports.Button = WButton;
13167
+ exports.Calendar = index$4;
12808
13168
  exports.Card = index$2;
12809
13169
  exports.Cascader = WCascader;
12810
13170
  exports.Checkbox = Index$4;
@@ -12828,8 +13188,8 @@ exports.TabelCard = index$3;
12828
13188
  exports.Table = index$1;
12829
13189
  exports.TreeSelect = Index$7;
12830
13190
  exports.Upload = Upload;
12831
- exports.Video = index$5;
12832
- exports.VideoPlayer = index$4;
13191
+ exports.Video = index$6;
13192
+ exports.VideoPlayer = index$5;
12833
13193
  exports.WDatePicker = Index$6;
12834
13194
  exports.WForm = WForm$1;
12835
13195
  exports.WaterLevelCharts = WaterLevelCharts;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.5.30",
4
+ "version": "0.5.33",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",