react-big-schedule 4.4.2 → 4.4.4
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/AddMore.js +12 -19
- package/dist/components/AddMorePopover.js +31 -41
- package/dist/components/AgendaEventItem.js +22 -29
- package/dist/components/AgendaResourceEvents.js +21 -28
- package/dist/components/AgendaView.js +18 -25
- package/dist/components/BodyView.js +8 -15
- package/dist/components/DnDContext.js +23 -28
- package/dist/components/DnDSource.js +12 -17
- package/dist/components/EventItem.js +51 -59
- package/dist/components/EventItemPopover.js +38 -45
- package/dist/components/HeaderView.js +15 -23
- package/dist/components/ResourceEvents.js +41 -50
- package/dist/components/ResourceView.js +22 -29
- package/dist/components/SchedulerData.js +74 -80
- package/dist/components/SchedulerHeader.js +35 -45
- package/dist/components/SelectedArea.js +7 -14
- package/dist/components/Summary.js +13 -20
- package/dist/components/WrapperFun.js +7 -15
- package/dist/components/index.js +88 -159
- package/dist/config/default.js +6 -12
- package/dist/config/scheduler.js +8 -14
- package/dist/helper/behaviors.js +20 -25
- package/dist/helper/utility.js +2 -8
- package/dist/index.js +1 -78
- package/dist/sample-data/sample1.js +1 -7
- package/package.json +2 -2
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _default2 = require("../config/default");
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
12
2
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
3
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
4
|
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; }
|
|
15
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
16
6
|
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); }
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { SummaryPos } from '../config/default';
|
|
17
10
|
function Summary(_ref) {
|
|
18
11
|
var schedulerData = _ref.schedulerData,
|
|
19
12
|
summary = _ref.summary,
|
|
@@ -23,9 +16,9 @@ function Summary(_ref) {
|
|
|
23
16
|
var config = schedulerData.config;
|
|
24
17
|
var color = summary.color !== undefined ? summary.color : config.summaryColor;
|
|
25
18
|
var textAlign = 'center';
|
|
26
|
-
if (config.summaryPos ===
|
|
19
|
+
if (config.summaryPos === SummaryPos.TopRight || config.summaryPos === SummaryPos.BottomRight) {
|
|
27
20
|
textAlign = 'right';
|
|
28
|
-
} else if (config.summaryPos ===
|
|
21
|
+
} else if (config.summaryPos === SummaryPos.TopLeft || config.summaryPos === SummaryPos.BottomLeft) {
|
|
29
22
|
textAlign = 'left';
|
|
30
23
|
}
|
|
31
24
|
var style = _objectSpread({
|
|
@@ -37,7 +30,7 @@ function Summary(_ref) {
|
|
|
37
30
|
}, summary.fontSize !== undefined ? {
|
|
38
31
|
fontSize: summary.fontSize
|
|
39
32
|
} : {});
|
|
40
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
41
34
|
className: "timeline-event header2-text",
|
|
42
35
|
style: {
|
|
43
36
|
left: left,
|
|
@@ -45,15 +38,15 @@ function Summary(_ref) {
|
|
|
45
38
|
top: top,
|
|
46
39
|
cursor: 'default'
|
|
47
40
|
}
|
|
48
|
-
}, /*#__PURE__*/
|
|
41
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
49
42
|
style: style
|
|
50
43
|
}, summary.text));
|
|
51
44
|
}
|
|
52
45
|
Summary.propTypes = {
|
|
53
|
-
schedulerData:
|
|
54
|
-
summary:
|
|
55
|
-
left:
|
|
56
|
-
width:
|
|
57
|
-
top:
|
|
46
|
+
schedulerData: PropTypes.object.isRequired,
|
|
47
|
+
summary: PropTypes.object.isRequired,
|
|
48
|
+
left: PropTypes.number.isRequired,
|
|
49
|
+
width: PropTypes.number.isRequired,
|
|
50
|
+
top: PropTypes.number.isRequired
|
|
58
51
|
};
|
|
59
|
-
|
|
52
|
+
export default Summary;
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = WrapperFun;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactDnd = require("react-dnd");
|
|
9
|
-
var _reactDndHtml5Backend = require("react-dnd-html5-backend");
|
|
10
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
11
1
|
/* eslint-disable react/jsx-props-no-spreading */
|
|
12
|
-
|
|
13
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { DndProvider } from 'react-dnd';
|
|
4
|
+
import { HTML5Backend } from 'react-dnd-html5-backend';
|
|
5
|
+
export default function WrapperFun(Component) {
|
|
14
6
|
return function WrappedComponent(props) {
|
|
15
|
-
return /*#__PURE__*/
|
|
16
|
-
backend:
|
|
17
|
-
}, /*#__PURE__*/
|
|
7
|
+
return /*#__PURE__*/React.createElement(DndProvider, {
|
|
8
|
+
backend: HTML5Backend
|
|
9
|
+
}, /*#__PURE__*/React.createElement(Component, props));
|
|
18
10
|
};
|
|
19
11
|
}
|
package/dist/components/index.js
CHANGED
|
@@ -1,94 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "AddMorePopover", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _AddMorePopover["default"];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "CellUnit", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _default.CellUnit;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "DATETIME_FORMAT", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function get() {
|
|
21
|
-
return _default.DATETIME_FORMAT;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "DATE_FORMAT", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function get() {
|
|
27
|
-
return _default.DATE_FORMAT;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "DemoData", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function get() {
|
|
33
|
-
return _sample["default"];
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "DnDContext", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function get() {
|
|
39
|
-
return _DnDContext["default"];
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "DnDSource", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function get() {
|
|
45
|
-
return _DnDSource["default"];
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
exports.Scheduler = void 0;
|
|
49
|
-
Object.defineProperty(exports, "SchedulerData", {
|
|
50
|
-
enumerable: true,
|
|
51
|
-
get: function get() {
|
|
52
|
-
return _SchedulerData["default"];
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
Object.defineProperty(exports, "SummaryPos", {
|
|
56
|
-
enumerable: true,
|
|
57
|
-
get: function get() {
|
|
58
|
-
return _default.SummaryPos;
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
Object.defineProperty(exports, "ViewType", {
|
|
62
|
-
enumerable: true,
|
|
63
|
-
get: function get() {
|
|
64
|
-
return _default.ViewType;
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
Object.defineProperty(exports, "wrapperFun", {
|
|
68
|
-
enumerable: true,
|
|
69
|
-
get: function get() {
|
|
70
|
-
return _WrapperFun["default"];
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
74
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
75
|
-
var _EventItem = _interopRequireDefault(require("./EventItem"));
|
|
76
|
-
var _DnDSource = _interopRequireDefault(require("./DnDSource"));
|
|
77
|
-
var _DnDContext = _interopRequireDefault(require("./DnDContext"));
|
|
78
|
-
var _ResourceView = _interopRequireDefault(require("./ResourceView"));
|
|
79
|
-
var _HeaderView = _interopRequireDefault(require("./HeaderView"));
|
|
80
|
-
var _BodyView = _interopRequireDefault(require("./BodyView"));
|
|
81
|
-
var _ResourceEvents = _interopRequireDefault(require("./ResourceEvents"));
|
|
82
|
-
var _AgendaView = _interopRequireDefault(require("./AgendaView"));
|
|
83
|
-
var _AddMorePopover = _interopRequireDefault(require("./AddMorePopover"));
|
|
84
|
-
var _SchedulerData = _interopRequireDefault(require("./SchedulerData"));
|
|
85
|
-
var _sample = _interopRequireDefault(require("../sample-data/sample1"));
|
|
86
|
-
var _SchedulerHeader = _interopRequireDefault(require("./SchedulerHeader"));
|
|
87
|
-
var _default = require("../config/default");
|
|
88
|
-
var _WrapperFun = _interopRequireDefault(require("./WrapperFun"));
|
|
89
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
90
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
91
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
|
92
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
93
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
94
3
|
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
@@ -111,7 +20,11 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
|
|
|
111
20
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
112
21
|
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; }
|
|
113
22
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
114
|
-
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); }
|
|
23
|
+
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); }
|
|
24
|
+
import React, { Component } from 'react';
|
|
25
|
+
import PropTypes from 'prop-types';
|
|
26
|
+
|
|
27
|
+
// Col, Row and Icon do not have their own less files for styling. They use
|
|
115
28
|
// rules declared in antd's global css. If these styles are imported directly
|
|
116
29
|
// from within antd, they'll include, for instance, reset rules. These will
|
|
117
30
|
// affect everything on the page and in essence would leak antd's global styles
|
|
@@ -128,7 +41,22 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
128
41
|
// The next components have their own specific stylesheets which we import
|
|
129
42
|
// separately here to avoid importing from files which have required the global
|
|
130
43
|
// antd styles.
|
|
131
|
-
|
|
44
|
+
|
|
45
|
+
import EventItem from './EventItem';
|
|
46
|
+
import DnDSource from './DnDSource';
|
|
47
|
+
import DnDContext from './DnDContext';
|
|
48
|
+
import ResourceView from './ResourceView';
|
|
49
|
+
import HeaderView from './HeaderView';
|
|
50
|
+
import BodyView from './BodyView';
|
|
51
|
+
import ResourceEvents from './ResourceEvents';
|
|
52
|
+
import AgendaView from './AgendaView';
|
|
53
|
+
import AddMorePopover from './AddMorePopover';
|
|
54
|
+
import SchedulerData from './SchedulerData';
|
|
55
|
+
import DemoData from '../sample-data/sample1';
|
|
56
|
+
import SchedulerHeader from './SchedulerHeader';
|
|
57
|
+
import { ViewType, CellUnit, DATETIME_FORMAT, DATE_FORMAT, SummaryPos } from '../config/default';
|
|
58
|
+
import wrapperFun from './WrapperFun';
|
|
59
|
+
var Scheduler = /*#__PURE__*/function (_Component) {
|
|
132
60
|
function Scheduler(props) {
|
|
133
61
|
var _this;
|
|
134
62
|
_classCallCheck(this, Scheduler);
|
|
@@ -294,13 +222,13 @@ var Scheduler = exports.Scheduler = /*#__PURE__*/function (_Component) {
|
|
|
294
222
|
dndSources = props.dndSources,
|
|
295
223
|
parentRef = props.parentRef;
|
|
296
224
|
var sources = [];
|
|
297
|
-
sources.push(new
|
|
225
|
+
sources.push(new DnDSource(function (dndProps) {
|
|
298
226
|
return dndProps.eventItem;
|
|
299
|
-
},
|
|
227
|
+
}, EventItem, _schedulerData.config.dragAndDropEnabled));
|
|
300
228
|
if (dndSources !== undefined && dndSources.length > 0) {
|
|
301
229
|
sources = [].concat(_toConsumableArray(sources), _toConsumableArray(dndSources));
|
|
302
230
|
}
|
|
303
|
-
var dndContext = new
|
|
231
|
+
var dndContext = new DnDContext(sources, ResourceEvents);
|
|
304
232
|
_this.currentArea = -1;
|
|
305
233
|
_this.state = {
|
|
306
234
|
dndContext: dndContext,
|
|
@@ -383,9 +311,9 @@ var Scheduler = exports.Scheduler = /*#__PURE__*/function (_Component) {
|
|
|
383
311
|
showAgenda = schedulerData.showAgenda,
|
|
384
312
|
config = schedulerData.config;
|
|
385
313
|
var width = schedulerData.getSchedulerWidth();
|
|
386
|
-
var tbodyContent = /*#__PURE__*/
|
|
314
|
+
var tbodyContent = /*#__PURE__*/React.createElement("tr", null);
|
|
387
315
|
if (showAgenda) {
|
|
388
|
-
tbodyContent = /*#__PURE__*/
|
|
316
|
+
tbodyContent = /*#__PURE__*/React.createElement(AgendaView, this.props);
|
|
389
317
|
} else {
|
|
390
318
|
var resourceTableWidth = schedulerData.getResourceTableWidth();
|
|
391
319
|
var schedulerContainerWidth = width - (config.resourceViewEnabled ? resourceTableWidth : 0);
|
|
@@ -396,7 +324,7 @@ var Scheduler = exports.Scheduler = /*#__PURE__*/function (_Component) {
|
|
|
396
324
|
return o.render;
|
|
397
325
|
});
|
|
398
326
|
var resourceEventsList = displayRenderData.map(function (item) {
|
|
399
|
-
return /*#__PURE__*/
|
|
327
|
+
return /*#__PURE__*/React.createElement(DndResourceEvents, _extends({}, _this3.props, {
|
|
400
328
|
key: item.slotId,
|
|
401
329
|
resourceEvents: item,
|
|
402
330
|
dndSource: eventDndSource
|
|
@@ -410,7 +338,7 @@ var Scheduler = exports.Scheduler = /*#__PURE__*/function (_Component) {
|
|
|
410
338
|
var resourcePaddingBottom = resourceScrollbarHeight === 0 ? contentScrollbarHeight : 0;
|
|
411
339
|
var contentPaddingBottom = contentScrollbarHeight === 0 ? resourceScrollbarHeight : 0;
|
|
412
340
|
var schedulerContentStyle = {
|
|
413
|
-
overflowX: viewType ===
|
|
341
|
+
overflowX: viewType === ViewType.Week ? 'hidden' : 'auto',
|
|
414
342
|
overflowY: 'auto',
|
|
415
343
|
margin: '0px',
|
|
416
344
|
position: 'relative',
|
|
@@ -433,55 +361,55 @@ var Scheduler = exports.Scheduler = /*#__PURE__*/function (_Component) {
|
|
|
433
361
|
});
|
|
434
362
|
}
|
|
435
363
|
var resourceName = schedulerData.isEventPerspective ? config.taskName : config.resourceName;
|
|
436
|
-
tbodyContent = /*#__PURE__*/
|
|
364
|
+
tbodyContent = /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
437
365
|
style: {
|
|
438
366
|
display: config.resourceViewEnabled ? undefined : 'none',
|
|
439
367
|
width: resourceTableWidth,
|
|
440
368
|
verticalAlign: 'top'
|
|
441
369
|
}
|
|
442
|
-
}, /*#__PURE__*/
|
|
370
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
443
371
|
className: "resource-view"
|
|
444
|
-
}, /*#__PURE__*/
|
|
372
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
445
373
|
style: {
|
|
446
374
|
overflow: 'hidden',
|
|
447
375
|
borderBottom: '1px solid #e9e9e9',
|
|
448
376
|
height: config.tableHeaderHeight
|
|
449
377
|
}
|
|
450
|
-
}, /*#__PURE__*/
|
|
378
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
451
379
|
style: {
|
|
452
380
|
overflowX: 'scroll',
|
|
453
381
|
overflowY: 'hidden',
|
|
454
382
|
margin: "0px 0px -".concat(contentScrollbarHeight, "px")
|
|
455
383
|
}
|
|
456
|
-
}, /*#__PURE__*/
|
|
384
|
+
}, /*#__PURE__*/React.createElement("table", {
|
|
457
385
|
className: "resource-table"
|
|
458
|
-
}, /*#__PURE__*/
|
|
386
|
+
}, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", {
|
|
459
387
|
style: {
|
|
460
388
|
height: config.tableHeaderHeight
|
|
461
389
|
}
|
|
462
|
-
}, /*#__PURE__*/
|
|
390
|
+
}, /*#__PURE__*/React.createElement("th", {
|
|
463
391
|
className: "header3-text"
|
|
464
|
-
}, resourceName)))))), /*#__PURE__*/
|
|
392
|
+
}, resourceName)))))), /*#__PURE__*/React.createElement("div", {
|
|
465
393
|
style: resourceContentStyle,
|
|
466
394
|
ref: this.schedulerResourceRef,
|
|
467
395
|
onMouseOver: this.onSchedulerResourceMouseOver,
|
|
468
396
|
onMouseOut: this.onSchedulerResourceMouseOut,
|
|
469
397
|
onScroll: this.onSchedulerResourceScroll
|
|
470
|
-
}, /*#__PURE__*/
|
|
398
|
+
}, /*#__PURE__*/React.createElement(ResourceView, _extends({}, this.props, {
|
|
471
399
|
contentScrollbarHeight: resourcePaddingBottom
|
|
472
|
-
}))))), /*#__PURE__*/
|
|
400
|
+
}))))), /*#__PURE__*/React.createElement("td", null, /*#__PURE__*/React.createElement("div", {
|
|
473
401
|
className: "scheduler-view",
|
|
474
402
|
style: {
|
|
475
403
|
width: schedulerContainerWidth,
|
|
476
404
|
verticalAlign: 'top'
|
|
477
405
|
}
|
|
478
|
-
}, /*#__PURE__*/
|
|
406
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
479
407
|
style: {
|
|
480
408
|
overflow: 'hidden',
|
|
481
409
|
borderBottom: '1px solid #e9e9e9',
|
|
482
410
|
height: config.tableHeaderHeight
|
|
483
411
|
}
|
|
484
|
-
}, /*#__PURE__*/
|
|
412
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
485
413
|
style: {
|
|
486
414
|
overflowX: 'scroll',
|
|
487
415
|
overflowY: 'hidden',
|
|
@@ -491,40 +419,40 @@ var Scheduler = exports.Scheduler = /*#__PURE__*/function (_Component) {
|
|
|
491
419
|
onMouseOver: this.onSchedulerHeadMouseOver,
|
|
492
420
|
onMouseOut: this.onSchedulerHeadMouseOut,
|
|
493
421
|
onScroll: this.onSchedulerHeadScroll
|
|
494
|
-
}, /*#__PURE__*/
|
|
422
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
495
423
|
style: {
|
|
496
424
|
paddingRight: "".concat(contentScrollbarWidth, "px"),
|
|
497
425
|
width: schedulerWidth + contentScrollbarWidth
|
|
498
426
|
}
|
|
499
|
-
}, /*#__PURE__*/
|
|
427
|
+
}, /*#__PURE__*/React.createElement("table", {
|
|
500
428
|
className: "scheduler-bg-table"
|
|
501
|
-
}, /*#__PURE__*/
|
|
429
|
+
}, /*#__PURE__*/React.createElement(HeaderView, this.props))))), /*#__PURE__*/React.createElement("div", {
|
|
502
430
|
style: schedulerContentStyle,
|
|
503
431
|
ref: this.schedulerContentRef,
|
|
504
432
|
onMouseOver: this.onSchedulerContentMouseOver,
|
|
505
433
|
onMouseOut: this.onSchedulerContentMouseOut,
|
|
506
434
|
onScroll: this.onSchedulerContentScroll
|
|
507
|
-
}, /*#__PURE__*/
|
|
435
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
508
436
|
style: {
|
|
509
437
|
width: schedulerWidth
|
|
510
438
|
}
|
|
511
|
-
}, /*#__PURE__*/
|
|
439
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
512
440
|
className: "scheduler-content"
|
|
513
|
-
}, /*#__PURE__*/
|
|
441
|
+
}, /*#__PURE__*/React.createElement("table", {
|
|
514
442
|
className: "scheduler-content-table"
|
|
515
|
-
}, /*#__PURE__*/
|
|
443
|
+
}, /*#__PURE__*/React.createElement("tbody", null, resourceEventsList))), /*#__PURE__*/React.createElement("div", {
|
|
516
444
|
className: "scheduler-bg"
|
|
517
|
-
}, /*#__PURE__*/
|
|
445
|
+
}, /*#__PURE__*/React.createElement("table", {
|
|
518
446
|
className: "scheduler-bg-table",
|
|
519
447
|
style: {
|
|
520
448
|
width: schedulerWidth
|
|
521
449
|
},
|
|
522
450
|
ref: this.schedulerContentBgTableRef
|
|
523
|
-
}, /*#__PURE__*/
|
|
451
|
+
}, /*#__PURE__*/React.createElement(BodyView, this.props))))))));
|
|
524
452
|
}
|
|
525
|
-
var schedulerHeader = /*#__PURE__*/
|
|
453
|
+
var schedulerHeader = /*#__PURE__*/React.createElement("div", null);
|
|
526
454
|
if (config.headerEnabled) {
|
|
527
|
-
schedulerHeader = /*#__PURE__*/
|
|
455
|
+
schedulerHeader = /*#__PURE__*/React.createElement(SchedulerHeader, {
|
|
528
456
|
onViewChange: this.onViewChange,
|
|
529
457
|
schedulerData: schedulerData,
|
|
530
458
|
onSelectDate: this.onSelect,
|
|
@@ -534,48 +462,49 @@ var Scheduler = exports.Scheduler = /*#__PURE__*/function (_Component) {
|
|
|
534
462
|
leftCustomHeader: leftCustomHeader
|
|
535
463
|
});
|
|
536
464
|
}
|
|
537
|
-
return /*#__PURE__*/
|
|
465
|
+
return /*#__PURE__*/React.createElement("table", {
|
|
538
466
|
id: "RBS-Scheduler-root",
|
|
539
467
|
className: "scheduler",
|
|
540
468
|
style: {
|
|
541
469
|
width: "".concat(width, "px")
|
|
542
470
|
}
|
|
543
|
-
}, /*#__PURE__*/
|
|
471
|
+
}, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
|
|
544
472
|
colSpan: "2"
|
|
545
|
-
}, schedulerHeader))), /*#__PURE__*/
|
|
473
|
+
}, schedulerHeader))), /*#__PURE__*/React.createElement("tbody", null, tbodyContent));
|
|
546
474
|
}
|
|
547
475
|
}]);
|
|
548
|
-
}(
|
|
476
|
+
}(Component);
|
|
549
477
|
_defineProperty(Scheduler, "propTypes", {
|
|
550
|
-
parentRef:
|
|
551
|
-
schedulerData:
|
|
552
|
-
prevClick:
|
|
553
|
-
nextClick:
|
|
554
|
-
onViewChange:
|
|
555
|
-
onSelectDate:
|
|
556
|
-
onSetAddMoreState:
|
|
557
|
-
updateEventStart:
|
|
558
|
-
updateEventEnd:
|
|
559
|
-
moveEvent:
|
|
560
|
-
movingEvent:
|
|
561
|
-
leftCustomHeader:
|
|
562
|
-
rightCustomHeader:
|
|
563
|
-
newEvent:
|
|
564
|
-
subtitleGetter:
|
|
565
|
-
eventItemClick:
|
|
566
|
-
viewEventClick:
|
|
567
|
-
viewEventText:
|
|
568
|
-
viewEvent2Click:
|
|
569
|
-
viewEvent2Text:
|
|
570
|
-
conflictOccurred:
|
|
571
|
-
eventItemTemplateResolver:
|
|
572
|
-
dndSources:
|
|
573
|
-
slotClickedFunc:
|
|
574
|
-
toggleExpandFunc:
|
|
575
|
-
slotItemTemplateResolver:
|
|
576
|
-
nonAgendaCellHeaderTemplateResolver:
|
|
577
|
-
onScrollLeft:
|
|
578
|
-
onScrollRight:
|
|
579
|
-
onScrollTop:
|
|
580
|
-
onScrollBottom:
|
|
581
|
-
});
|
|
478
|
+
parentRef: PropTypes.object,
|
|
479
|
+
schedulerData: PropTypes.object.isRequired,
|
|
480
|
+
prevClick: PropTypes.func.isRequired,
|
|
481
|
+
nextClick: PropTypes.func.isRequired,
|
|
482
|
+
onViewChange: PropTypes.func.isRequired,
|
|
483
|
+
onSelectDate: PropTypes.func.isRequired,
|
|
484
|
+
onSetAddMoreState: PropTypes.func,
|
|
485
|
+
updateEventStart: PropTypes.func,
|
|
486
|
+
updateEventEnd: PropTypes.func,
|
|
487
|
+
moveEvent: PropTypes.func,
|
|
488
|
+
movingEvent: PropTypes.func,
|
|
489
|
+
leftCustomHeader: PropTypes.object,
|
|
490
|
+
rightCustomHeader: PropTypes.object,
|
|
491
|
+
newEvent: PropTypes.func,
|
|
492
|
+
subtitleGetter: PropTypes.func,
|
|
493
|
+
eventItemClick: PropTypes.func,
|
|
494
|
+
viewEventClick: PropTypes.func,
|
|
495
|
+
viewEventText: PropTypes.string,
|
|
496
|
+
viewEvent2Click: PropTypes.func,
|
|
497
|
+
viewEvent2Text: PropTypes.string,
|
|
498
|
+
conflictOccurred: PropTypes.func,
|
|
499
|
+
eventItemTemplateResolver: PropTypes.func,
|
|
500
|
+
dndSources: PropTypes.array,
|
|
501
|
+
slotClickedFunc: PropTypes.func,
|
|
502
|
+
toggleExpandFunc: PropTypes.func,
|
|
503
|
+
slotItemTemplateResolver: PropTypes.func,
|
|
504
|
+
nonAgendaCellHeaderTemplateResolver: PropTypes.func,
|
|
505
|
+
onScrollLeft: PropTypes.func,
|
|
506
|
+
onScrollRight: PropTypes.func,
|
|
507
|
+
onScrollTop: PropTypes.func,
|
|
508
|
+
onScrollBottom: PropTypes.func
|
|
509
|
+
});
|
|
510
|
+
export { DATE_FORMAT, DATETIME_FORMAT, Scheduler, SchedulerData, ViewType, CellUnit, SummaryPos, DnDSource, DnDContext, AddMorePopover, DemoData, wrapperFun };
|
package/dist/config/default.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ViewType = exports.SummaryPos = exports.DnDTypes = exports.DATE_FORMAT = exports.DATETIME_FORMAT = exports.CellUnit = void 0;
|
|
7
|
-
var DATE_FORMAT = exports.DATE_FORMAT = 'YYYY-MM-DD';
|
|
8
|
-
var DATETIME_FORMAT = exports.DATETIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';
|
|
9
|
-
var ViewType = exports.ViewType = {
|
|
1
|
+
export var DATE_FORMAT = 'YYYY-MM-DD';
|
|
2
|
+
export var DATETIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';
|
|
3
|
+
export var ViewType = {
|
|
10
4
|
Day: 0,
|
|
11
5
|
Week: 1,
|
|
12
6
|
Month: 2,
|
|
@@ -16,14 +10,14 @@ var ViewType = exports.ViewType = {
|
|
|
16
10
|
Custom1: 6,
|
|
17
11
|
Custom2: 7
|
|
18
12
|
};
|
|
19
|
-
var CellUnit =
|
|
13
|
+
export var CellUnit = {
|
|
20
14
|
Day: 0,
|
|
21
15
|
Hour: 1,
|
|
22
16
|
Week: 2,
|
|
23
17
|
Month: 3,
|
|
24
18
|
Year: 4
|
|
25
19
|
};
|
|
26
|
-
var SummaryPos =
|
|
20
|
+
export var SummaryPos = {
|
|
27
21
|
Top: 0,
|
|
28
22
|
TopRight: 1,
|
|
29
23
|
TopLeft: 2,
|
|
@@ -31,6 +25,6 @@ var SummaryPos = exports.SummaryPos = {
|
|
|
31
25
|
BottomRight: 4,
|
|
32
26
|
BottomLeft: 5
|
|
33
27
|
};
|
|
34
|
-
var DnDTypes =
|
|
28
|
+
export var DnDTypes = {
|
|
35
29
|
EVENT: 'event'
|
|
36
30
|
};
|
package/dist/config/scheduler.js
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _default2 = require("./default");
|
|
8
|
-
var _default = exports["default"] = {
|
|
1
|
+
import { ViewType, SummaryPos } from './default';
|
|
2
|
+
export default {
|
|
9
3
|
schedulerWidth: '100%',
|
|
10
4
|
besidesWidth: 20,
|
|
11
5
|
schedulerMaxHeight: 0,
|
|
@@ -46,7 +40,7 @@ var _default = exports["default"] = {
|
|
|
46
40
|
nonWorkingTimeHeadBgColor: '#fff0f6',
|
|
47
41
|
nonWorkingTimeBodyBgColor: '#fff0f6',
|
|
48
42
|
summaryColor: '#666',
|
|
49
|
-
summaryPos:
|
|
43
|
+
summaryPos: SummaryPos.TopRight,
|
|
50
44
|
groupOnlySlotColor: '#F8F8F8',
|
|
51
45
|
startResizable: true,
|
|
52
46
|
endResizable: true,
|
|
@@ -81,27 +75,27 @@ var _default = exports["default"] = {
|
|
|
81
75
|
minuteStep: 30,
|
|
82
76
|
views: [{
|
|
83
77
|
viewName: 'Day',
|
|
84
|
-
viewType:
|
|
78
|
+
viewType: ViewType.Day,
|
|
85
79
|
showAgenda: false,
|
|
86
80
|
isEventPerspective: false
|
|
87
81
|
}, {
|
|
88
82
|
viewName: 'Week',
|
|
89
|
-
viewType:
|
|
83
|
+
viewType: ViewType.Week,
|
|
90
84
|
showAgenda: false,
|
|
91
85
|
isEventPerspective: false
|
|
92
86
|
}, {
|
|
93
87
|
viewName: 'Month',
|
|
94
|
-
viewType:
|
|
88
|
+
viewType: ViewType.Month,
|
|
95
89
|
showAgenda: false,
|
|
96
90
|
isEventPerspective: false
|
|
97
91
|
}, {
|
|
98
92
|
viewName: 'Quarter',
|
|
99
|
-
viewType:
|
|
93
|
+
viewType: ViewType.Quarter,
|
|
100
94
|
showAgenda: false,
|
|
101
95
|
isEventPerspective: false
|
|
102
96
|
}, {
|
|
103
97
|
viewName: 'Year',
|
|
104
|
-
viewType:
|
|
98
|
+
viewType: ViewType.Year,
|
|
105
99
|
showAgenda: false,
|
|
106
100
|
isEventPerspective: false
|
|
107
101
|
}]
|