react-big-schedule 5.2.0-beta.0 → 5.2.0
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/AddMorePopover.js +2 -2
- package/dist/components/DnDContext.js +0 -3
- package/dist/components/ResourceEvents.js +4 -6
- package/dist/components/SchedulerData.js +2 -2
- package/dist/components/SchedulerHeader.js +21 -12
- package/dist/components/index.js +2 -2
- package/dist/css/style.css +65 -69
- package/dist/helper/behaviors.js +0 -8
- package/package.json +12 -6
|
@@ -69,12 +69,12 @@ function AddMorePopover(props) {
|
|
|
69
69
|
return null;
|
|
70
70
|
});
|
|
71
71
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
72
|
-
className: "add-more-popover-overlay",
|
|
72
|
+
className: "rbs-add-more-popover-overlay",
|
|
73
73
|
style: {
|
|
74
74
|
left: left,
|
|
75
75
|
top: top,
|
|
76
76
|
height: height,
|
|
77
|
-
|
|
77
|
+
minWidth: '170px'
|
|
78
78
|
},
|
|
79
79
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Row, {
|
|
80
80
|
justify: "space-between",
|
|
@@ -85,13 +85,10 @@ var DnDContext = exports["default"] = /*#__PURE__*/_createClass(function DnDCont
|
|
|
85
85
|
var pos = (0, _utility.getPos)(component.eventContainer);
|
|
86
86
|
var cellWidth = schedulerData.getContentCellWidth();
|
|
87
87
|
var initialStart = null;
|
|
88
|
-
// let initialEnd = null;
|
|
89
88
|
if (type === _default.DnDTypes.EVENT) {
|
|
90
|
-
// const { initialStart: iStart, initialEnd: iEnd } = this.extractInitialTimes(monitor, pos, cellWidth, resourceEvents, cellUnit, localeDayjs);
|
|
91
89
|
var _this$extractInitialT2 = _this.extractInitialTimes(monitor, pos, cellWidth, resourceEvents, cellUnit, localeDayjs),
|
|
92
90
|
iStart = _this$extractInitialT2.initialStart;
|
|
93
91
|
initialStart = iStart;
|
|
94
|
-
// initialEnd = iEnd;
|
|
95
92
|
}
|
|
96
93
|
var point = monitor.getClientOffset();
|
|
97
94
|
var leftIndex = Math.floor((point.x - pos.x) / cellWidth);
|
|
@@ -41,7 +41,7 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
|
|
|
41
41
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
42
42
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
43
43
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
44
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
44
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
45
45
|
var ResourceEvents = /*#__PURE__*/function (_Component) {
|
|
46
46
|
function ResourceEvents(props) {
|
|
47
47
|
var _this;
|
|
@@ -299,9 +299,7 @@ var ResourceEvents = /*#__PURE__*/function (_Component) {
|
|
|
299
299
|
var _this$props3 = this.props,
|
|
300
300
|
resourceEvents = _this$props3.resourceEvents,
|
|
301
301
|
schedulerData = _this$props3.schedulerData,
|
|
302
|
-
dndSource = _this$props3.dndSource
|
|
303
|
-
dropRef = _this$props3.dropRef,
|
|
304
|
-
isOver = _this$props3.isOver;
|
|
302
|
+
dndSource = _this$props3.dndSource;
|
|
305
303
|
var cellUnit = schedulerData.cellUnit,
|
|
306
304
|
startDate = schedulerData.startDate,
|
|
307
305
|
endDate = schedulerData.endDate,
|
|
@@ -424,7 +422,7 @@ _defineProperty(ResourceEvents, "propTypes", {
|
|
|
424
422
|
newEvent: _propTypes.PropTypes.func,
|
|
425
423
|
eventItemTemplateResolver: _propTypes.PropTypes.func
|
|
426
424
|
});
|
|
427
|
-
var ResourceEventsWithDnD =
|
|
425
|
+
var ResourceEventsWithDnD = function ResourceEventsWithDnD(props) {
|
|
428
426
|
var schedulerData = props.schedulerData,
|
|
429
427
|
dndContext = props.dndContext;
|
|
430
428
|
var config = schedulerData.config;
|
|
@@ -477,6 +475,6 @@ var ResourceEventsWithDnD = /*#__PURE__*/_react["default"].forwardRef(function (
|
|
|
477
475
|
isOver: isOver,
|
|
478
476
|
canDrop: canDrop
|
|
479
477
|
}));
|
|
480
|
-
}
|
|
478
|
+
};
|
|
481
479
|
ResourceEventsWithDnD.displayName = 'ResourceEventsWithDnD';
|
|
482
480
|
var _default = exports["default"] = ResourceEventsWithDnD;
|
|
@@ -342,7 +342,7 @@ var SchedulerData = exports["default"] = /*#__PURE__*/function () {
|
|
|
342
342
|
return parseInt(validBaseHeight * Number(this.config.schedulerHeight.slice(0, -1)) / 100, 10);
|
|
343
343
|
}
|
|
344
344
|
// fallback to max height if set, else just use base height
|
|
345
|
-
return this.config.
|
|
345
|
+
return this.config.schedulerMaxHeight || validBaseHeight;
|
|
346
346
|
}
|
|
347
347
|
}, {
|
|
348
348
|
key: "getResourceTableWidth",
|
|
@@ -724,7 +724,7 @@ var SchedulerData = exports["default"] = /*#__PURE__*/function () {
|
|
|
724
724
|
this.cellUnit = customDate.cellUnit;
|
|
725
725
|
}
|
|
726
726
|
} else {
|
|
727
|
-
throw new Error('This is a custom view type, set behaviors.getCustomDateFunc func to resolve the time window (startDate and endDate) yourself');
|
|
727
|
+
throw new Error('This is a custom view type, set behaviors.getCustomDateFunc func ' + 'to resolve the time window (startDate and endDate) yourself');
|
|
728
728
|
}
|
|
729
729
|
break;
|
|
730
730
|
default:
|
|
@@ -57,25 +57,35 @@ var SchedulerHeader = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
|
|
|
57
57
|
var selectDate = schedulerData.getSelectedDate();
|
|
58
58
|
var calendarLocale = (_schedulerData$getCal = schedulerData.getCalendarPopoverLocale()) === null || _schedulerData$getCal === void 0 || (_schedulerData$getCal = _schedulerData$getCal["default"]) === null || _schedulerData$getCal === void 0 ? void 0 : _schedulerData$getCal.Calendar;
|
|
59
59
|
var defaultValue = "".concat(viewType).concat(showAgenda ? 1 : 0).concat(isEventPerspective ? 1 : 0);
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
60
|
+
var isMountedRef = (0, _react.useRef)(true);
|
|
61
|
+
(0, _react.useEffect)(function () {
|
|
62
|
+
return function () {
|
|
63
|
+
isMountedRef.current = false;
|
|
64
|
+
};
|
|
65
|
+
}, []);
|
|
66
|
+
var handleEvents = function handleEvents(func, isViewSpinning, funcArg) {
|
|
67
|
+
var isSpinEnabled = isViewSpinning ? config.viewChangeSpinEnabled : config.dateChangeSpinEnabled;
|
|
68
|
+
var setSpin = isViewSpinning ? setViewSpinning : setDateSpinning;
|
|
69
|
+
if (isSpinEnabled) {
|
|
70
|
+
setSpin(true);
|
|
71
|
+
}
|
|
65
72
|
var coreFunc = function coreFunc() {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
73
|
+
try {
|
|
74
|
+
funcArg !== undefined ? func(funcArg) : func();
|
|
75
|
+
} finally {
|
|
76
|
+
if (isSpinEnabled && isMountedRef.current) {
|
|
77
|
+
setSpin(false);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
70
80
|
};
|
|
71
|
-
if (
|
|
81
|
+
if (isSpinEnabled) {
|
|
72
82
|
setTimeout(coreFunc, config.schedulerHeaderEventsFuncsTimeoutMs);
|
|
73
83
|
} else {
|
|
74
84
|
coreFunc();
|
|
75
85
|
}
|
|
76
86
|
};
|
|
77
87
|
var popover = /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
78
|
-
className: "popover-calendar",
|
|
88
|
+
className: "rbs-popover-calendar",
|
|
79
89
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antd.Calendar, {
|
|
80
90
|
locale: calendarLocale,
|
|
81
91
|
defaultValue: (0, _dayjs["default"])(selectDate),
|
|
@@ -100,7 +110,6 @@ var SchedulerHeader = /*#__PURE__*/_react["default"].forwardRef(function (_ref,
|
|
|
100
110
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_antd.Row, {
|
|
101
111
|
ref: ref,
|
|
102
112
|
gutter: [10, 10],
|
|
103
|
-
type: "flex",
|
|
104
113
|
align: "middle",
|
|
105
114
|
justify: "space-between",
|
|
106
115
|
style: _objectSpread({}, style),
|
package/dist/components/index.js
CHANGED
|
@@ -603,8 +603,8 @@ function Scheduler(props) {
|
|
|
603
603
|
leftCustomHeader: leftCustomHeader
|
|
604
604
|
});
|
|
605
605
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("table", {
|
|
606
|
-
id: "
|
|
607
|
-
className: "
|
|
606
|
+
id: "rbs-root",
|
|
607
|
+
className: "rbs",
|
|
608
608
|
style: {
|
|
609
609
|
width: "".concat(width, "px")
|
|
610
610
|
},
|
package/dist/css/style.css
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
.
|
|
2
|
-
.
|
|
3
|
-
.
|
|
1
|
+
.rbs *,
|
|
2
|
+
.rbs *::before,
|
|
3
|
+
.rbs *::after {
|
|
4
4
|
box-sizing: border-box;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
/* Text Styles */
|
|
8
|
-
.
|
|
8
|
+
.rbs .header1-text {
|
|
9
9
|
font-size: 25px;
|
|
10
10
|
color: #90cdf9;
|
|
11
11
|
font-weight: 500;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
.
|
|
15
|
-
.
|
|
16
|
-
.
|
|
17
|
-
.
|
|
18
|
-
.
|
|
14
|
+
.rbs .header2-text,
|
|
15
|
+
.rbs .header3-text,
|
|
16
|
+
.rbs .base-text,
|
|
17
|
+
.rbs .help-text,
|
|
18
|
+
.rbs .disabled-text {
|
|
19
19
|
font-size: 12px;
|
|
20
20
|
font-weight: 500;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.
|
|
23
|
+
.rbs .header2-text {
|
|
24
24
|
font-size: 14px;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
.
|
|
27
|
+
.rbs .help-text {
|
|
28
28
|
color: #999;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.
|
|
31
|
+
.rbs .disabled-text {
|
|
32
32
|
color: #ccc;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
/* Scheduler Components */
|
|
36
|
-
.
|
|
36
|
+
.rbs {
|
|
37
37
|
margin: 20px auto;
|
|
38
38
|
border-spacing: 0;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.
|
|
41
|
+
.rbs td {
|
|
42
42
|
padding: 0;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
.
|
|
45
|
+
.rbs .resource-view {
|
|
46
46
|
border: 1px solid #e9e9e9;
|
|
47
47
|
overflow: hidden;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.
|
|
50
|
+
.rbs .scheduler-view {
|
|
51
51
|
border: 1px solid #e9e9e9;
|
|
52
52
|
margin: 0 0 0 -1px;
|
|
53
53
|
padding: 0;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
/* Positioning */
|
|
57
|
-
.
|
|
57
|
+
.rbs .scheduler-content {
|
|
58
58
|
position: relative;
|
|
59
59
|
z-index: 2;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.
|
|
62
|
+
.rbs .scheduler-bg {
|
|
63
63
|
position: absolute;
|
|
64
64
|
top: 0;
|
|
65
65
|
left: 0;
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
z-index: 1;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
.
|
|
71
|
+
.rbs .expander-space {
|
|
72
72
|
overflow: hidden;
|
|
73
73
|
display: inline-block;
|
|
74
74
|
width: 1em;
|
|
@@ -80,80 +80,80 @@
|
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
/* Tables */
|
|
83
|
-
.
|
|
84
|
-
.
|
|
85
|
-
.
|
|
86
|
-
.
|
|
83
|
+
.rbs table.resource-table,
|
|
84
|
+
.rbs table.scheduler-bg-table,
|
|
85
|
+
.rbs table.scheduler-table,
|
|
86
|
+
.rbs table.scheduler-content-table {
|
|
87
87
|
width: 100%;
|
|
88
88
|
margin: 0;
|
|
89
89
|
padding: 0;
|
|
90
90
|
border-spacing: 0;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
.
|
|
94
|
-
.
|
|
95
|
-
.
|
|
93
|
+
.rbs table.resource-table,
|
|
94
|
+
.rbs table.scheduler-bg-table,
|
|
95
|
+
.rbs table.scheduler-table {
|
|
96
96
|
text-align: center;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.
|
|
99
|
+
.rbs table.scheduler-table {
|
|
100
100
|
border: 1px solid #e9e9e9;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
.
|
|
103
|
+
.rbs table.scheduler-content-table {
|
|
104
104
|
border: 0 solid #e9e9e9;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
/* Table Borders */
|
|
108
|
-
.
|
|
109
|
-
.
|
|
110
|
-
.
|
|
108
|
+
.rbs table.resource-table tr,
|
|
109
|
+
.rbs table.scheduler-bg-table tr,
|
|
110
|
+
.rbs table.scheduler-table tr {
|
|
111
111
|
border-bottom: 1px solid #e9e9e9;
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
.
|
|
115
|
-
.
|
|
116
|
-
.
|
|
117
|
-
.
|
|
118
|
-
.
|
|
119
|
-
.
|
|
114
|
+
.rbs table.resource-table th,
|
|
115
|
+
.rbs table.scheduler-table th,
|
|
116
|
+
.rbs table.resource-table td,
|
|
117
|
+
.rbs table.scheduler-bg-table td,
|
|
118
|
+
.rbs table.scheduler-table td,
|
|
119
|
+
.rbs table.scheduler-bg-table th {
|
|
120
120
|
border-right: 1px solid #e9e9e9;
|
|
121
121
|
border-bottom: 1px solid #e9e9e9;
|
|
122
122
|
}
|
|
123
123
|
|
|
124
|
-
.
|
|
125
|
-
.
|
|
126
|
-
.
|
|
127
|
-
.
|
|
124
|
+
.rbs table.resource-table tr th:last-child,
|
|
125
|
+
.rbs table.scheduler-table tr th:last-child,
|
|
126
|
+
.rbs table.resource-table tr td:last-child,
|
|
127
|
+
.rbs table.scheduler-table tr td:last-child {
|
|
128
128
|
border-right: 0;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
-
.
|
|
131
|
+
.rbs table.scheduler-table tr:last-child td {
|
|
132
132
|
border-bottom: 0;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
/* Events */
|
|
136
|
-
.
|
|
136
|
+
.rbs .timeline-event {
|
|
137
137
|
position: absolute;
|
|
138
138
|
cursor: pointer;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
.
|
|
141
|
+
.rbs .day-event {
|
|
142
142
|
position: relative;
|
|
143
143
|
display: inline-block;
|
|
144
144
|
margin: 0 5px;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
.
|
|
147
|
+
.rbs .day-event-container {
|
|
148
148
|
text-align: left;
|
|
149
149
|
padding: 5px 5px 0;
|
|
150
150
|
}
|
|
151
151
|
|
|
152
|
-
.
|
|
152
|
+
.rbs .event-container {
|
|
153
153
|
position: relative;
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
.
|
|
156
|
+
.rbs .event-item {
|
|
157
157
|
margin: 1px 0;
|
|
158
158
|
width: 100%;
|
|
159
159
|
overflow: hidden;
|
|
@@ -164,65 +164,65 @@
|
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
/* Rounded Borders */
|
|
167
|
-
.
|
|
167
|
+
.rbs .round-all {
|
|
168
168
|
border-radius: 14px;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.
|
|
171
|
+
.rbs .round-head {
|
|
172
172
|
border-radius: 14px 0 0 14px;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
.
|
|
175
|
+
.rbs .round-tail {
|
|
176
176
|
border-radius: 0 14px 14px 0;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
.
|
|
179
|
+
.rbs .round-none {
|
|
180
180
|
border-radius: 0;
|
|
181
181
|
}
|
|
182
182
|
|
|
183
183
|
/* Utilities */
|
|
184
|
-
.
|
|
184
|
+
.rbs .overflow-text {
|
|
185
185
|
overflow: hidden;
|
|
186
186
|
text-overflow: ellipsis;
|
|
187
187
|
white-space: nowrap;
|
|
188
188
|
padding-right: 5px !important;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
.
|
|
191
|
+
.rbs .status-dot {
|
|
192
192
|
width: 14px;
|
|
193
193
|
height: 14px;
|
|
194
194
|
border-radius: 7px;
|
|
195
195
|
}
|
|
196
196
|
|
|
197
|
-
.
|
|
197
|
+
.rbs .selected-area {
|
|
198
198
|
position: absolute;
|
|
199
199
|
}
|
|
200
200
|
|
|
201
201
|
/* Slots and Cells */
|
|
202
|
-
.
|
|
203
|
-
.
|
|
202
|
+
.rbs .slot-cell,
|
|
203
|
+
.rbs .slot-text {
|
|
204
204
|
padding-left: 4px;
|
|
205
205
|
padding-right: 4px;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
.
|
|
208
|
+
.rbs .slot-text {
|
|
209
209
|
display: inline-block;
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
/* ANT Design Components */
|
|
213
|
-
.
|
|
213
|
+
.rbs .ant-radio-button-wrapper-checked {
|
|
214
214
|
background-color: #108ee9;
|
|
215
215
|
color: #ffffff;
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
.
|
|
218
|
+
.rbs .icon-nav:hover {
|
|
219
219
|
color: #1e90ff !important;
|
|
220
220
|
box-shadow: 0 0 0 !important;
|
|
221
221
|
cursor: pointer;
|
|
222
222
|
}
|
|
223
223
|
|
|
224
224
|
/* Popover and Overlay */
|
|
225
|
-
.
|
|
225
|
+
.rbs-add-more-popover-overlay {
|
|
226
226
|
position: absolute;
|
|
227
227
|
z-index: 5;
|
|
228
228
|
border: 1px solid #e5e5e5;
|
|
@@ -231,16 +231,12 @@
|
|
|
231
231
|
padding: 10px;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
.
|
|
234
|
+
.rbs-popover-calendar {
|
|
235
235
|
width: 300px;
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
.react-big-schedule .popover-calendar .ant-calendar {
|
|
239
|
-
box-shadow: 0 1px 6px rgba(0, 0, 0, 0) !important;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
238
|
/* Resizable Elements */
|
|
243
|
-
.
|
|
239
|
+
.rbs .event-resizer {
|
|
244
240
|
position: absolute;
|
|
245
241
|
z-index: 4;
|
|
246
242
|
display: block;
|
|
@@ -249,18 +245,18 @@
|
|
|
249
245
|
bottom: -1px;
|
|
250
246
|
}
|
|
251
247
|
|
|
252
|
-
.
|
|
248
|
+
.rbs .event-start-resizer {
|
|
253
249
|
cursor: w-resize;
|
|
254
250
|
left: -1px;
|
|
255
251
|
}
|
|
256
252
|
|
|
257
|
-
.
|
|
253
|
+
.rbs .event-end-resizer {
|
|
258
254
|
cursor: e-resize;
|
|
259
255
|
right: -1px;
|
|
260
256
|
}
|
|
261
257
|
|
|
262
258
|
/* Buttons */
|
|
263
|
-
.
|
|
259
|
+
.rbs .txt-btn-dis {
|
|
264
260
|
border: none;
|
|
265
261
|
background-color: transparent;
|
|
266
262
|
}
|
package/dist/helper/behaviors.js
CHANGED
|
@@ -5,8 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.isNonWorkingTime = exports.getSummary = exports.getScrollSpecialDayjs = exports.getNonAgendaViewBodyCellBgColor = exports.getEventText = exports.getDateLabel = exports.getCustomDate = exports["default"] = void 0;
|
|
7
7
|
var _default2 = require("../config/default");
|
|
8
|
-
// getSummary func example
|
|
9
|
-
// export const getSummary = (schedulerData, headerEvents, slotId, slotName, headerStart, headerEnd) => ({ text: 'Summary', color: 'red', fontSize: '1.2rem' });
|
|
10
8
|
var getSummary = exports.getSummary = function getSummary() {
|
|
11
9
|
return {
|
|
12
10
|
text: 'Summary',
|
|
@@ -14,8 +12,6 @@ var getSummary = exports.getSummary = function getSummary() {
|
|
|
14
12
|
fontSize: '1.2rem'
|
|
15
13
|
};
|
|
16
14
|
};
|
|
17
|
-
|
|
18
|
-
// getCustomDate example
|
|
19
15
|
var getCustomDate = exports.getCustomDate = function getCustomDate(schedulerData, num) {
|
|
20
16
|
var date = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : schedulerData.startDate;
|
|
21
17
|
var viewType = schedulerData.viewType,
|
|
@@ -44,13 +40,9 @@ var getCustomDate = exports.getCustomDate = function getCustomDate(schedulerData
|
|
|
44
40
|
cellUnit: cellUnit
|
|
45
41
|
};
|
|
46
42
|
};
|
|
47
|
-
|
|
48
|
-
// getNonAgendaViewBodyCellBgColor example
|
|
49
43
|
var getNonAgendaViewBodyCellBgColor = exports.getNonAgendaViewBodyCellBgColor = function getNonAgendaViewBodyCellBgColor(schedulerData, slotId, header) {
|
|
50
44
|
return header.nonWorkingTime ? undefined : '#87e8de';
|
|
51
45
|
};
|
|
52
|
-
|
|
53
|
-
// getDateLabel func example
|
|
54
46
|
var getDateLabel = exports.getDateLabel = function getDateLabel(schedulerData, viewType, startDate, endDate) {
|
|
55
47
|
var localeDayjs = schedulerData.localeDayjs;
|
|
56
48
|
var start = localeDayjs(new Date(startDate));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-big-schedule",
|
|
3
|
-
"version": "5.2.0
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "React Big Schedule is a powerful and intuitive scheduler and resource planning solution built with React. Seamlessly integrate this modern browser-compatible component into your applications to effectively manage time, appointments, and resources. With drag-and-drop functionality, interactive UI, and granular views, react-big-schedule empowers users to effortlessly schedule and allocate resources with precision. Enhance productivity and streamline your workflow with this React-based solution, designed to optimize time management and simplify calendar-based operations. Perfect for applications requiring advanced scheduling capabilities, react-big-schedule offers a seamless and intuitive experience for managing appointments, resource allocation, and time slots. Unlock the potential of your React projects with react-big-schedule and revolutionize the way you handle scheduling and resource planning. It is the updated version of react-big-scheduler",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react-big-schedule",
|
|
@@ -57,18 +57,21 @@
|
|
|
57
57
|
"build:lib": "node scripts/build.js",
|
|
58
58
|
"clean": "npx rimraf dist",
|
|
59
59
|
"lint": "eslint ./src",
|
|
60
|
-
"lint:fix": "eslint ./src
|
|
60
|
+
"lint:fix": "eslint ./src --fix",
|
|
61
|
+
"prettier": "prettier --check \"src/**/*.{js,jsx,json,css}\"",
|
|
62
|
+
"prettier:fix": "prettier --write \"src/**/*.{js,jsx,json,css}\"",
|
|
63
|
+
"format": "npm run prettier:fix && npm run lint:fix"
|
|
61
64
|
},
|
|
62
65
|
"dependencies": {
|
|
63
66
|
"@ant-design/icons": "^6.1.0",
|
|
64
|
-
"antd": "^5.
|
|
67
|
+
"antd": "^5.29.3",
|
|
65
68
|
"dayjs": "^1.11.19",
|
|
66
69
|
"prop-types": "^15.8.1",
|
|
67
70
|
"react": "^19.2.3",
|
|
68
71
|
"react-dnd": "^16.0.1",
|
|
69
72
|
"react-dnd-html5-backend": "^16.0.1",
|
|
70
73
|
"react-dom": "^19.2.3",
|
|
71
|
-
"react-router-dom": "^7.
|
|
74
|
+
"react-router-dom": "^7.11.0",
|
|
72
75
|
"rrule": "^2.8.1"
|
|
73
76
|
},
|
|
74
77
|
"devDependencies": {
|
|
@@ -81,15 +84,18 @@
|
|
|
81
84
|
"copy-webpack-plugin": "^13.0.1",
|
|
82
85
|
"css-loader": "^7.1.2",
|
|
83
86
|
"eslint": "^9.39.2",
|
|
87
|
+
"eslint-config-prettier": "^10.1.8",
|
|
84
88
|
"eslint-plugin-import": "^2.32.0",
|
|
85
89
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
90
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
86
91
|
"eslint-plugin-react": "^7.37.5",
|
|
87
92
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
88
93
|
"eslint-webpack-plugin": "^5.0.2",
|
|
89
|
-
"fs-extra": "^11.3.
|
|
94
|
+
"fs-extra": "^11.3.3",
|
|
90
95
|
"html-webpack-plugin": "^5.6.5",
|
|
96
|
+
"prettier": "^3.7.4",
|
|
91
97
|
"style-loader": "^4.0.0",
|
|
92
|
-
"webpack": "^5.104.
|
|
98
|
+
"webpack": "^5.104.1",
|
|
93
99
|
"webpack-cli": "^6.0.1",
|
|
94
100
|
"webpack-dev-server": "^5.2.2"
|
|
95
101
|
}
|