react-big-schedule 4.2.3 → 4.2.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/README.md CHANGED
@@ -4,9 +4,9 @@
4
4
  [npm-image]: http://img.shields.io/npm/v/react-big-schedule.svg
5
5
  [npm-url]: http://npmjs.org/package/react-big-schedule
6
6
  [mit-image]: https://img.shields.io/badge/License-MIT-green.svg
7
- [mit-url]: https://github.com/ansulagrawal/react-big-schedule/blob/master/LICENSE
8
- [codeql-image]: https://github.com/ansulagrawal/react-big-schedule/actions/workflows/github-code-scanning/codeql/badge.svg?branch=master
9
- [codeql-url]: https://github.com/ansulagrawal/react-big-schedule/actions/workflows/github-code-scanning/codeql
7
+ [mit-url]: https://github.com/react-scheduler/react-big-schedule/blob/master/LICENSE
8
+ [codeql-image]: https://github.com/react-scheduler/react-big-schedule/actions/workflows/github-code-scanning/codeql/badge.svg?branch=master
9
+ [codeql-url]: https://github.com/react-scheduler/react-big-schedule/actions/workflows/github-code-scanning/codeql
10
10
 
11
11
 
12
12
  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.
@@ -57,10 +57,10 @@ Contributions to react-big-schedule are welcome! If you find a bug or want to co
57
57
  Please ensure that your code adheres to the project's coding conventions and includes appropriate tests.
58
58
 
59
59
  ## License
60
- React Big Schedule is released under the MIT License. See the [LICENSE](https://github.com/ansulagrawal/react-big-schedule/blob/master/LICENSE) file for more details.
60
+ React Big Schedule is released under the MIT License. See the [LICENSE](https://github.com/react-scheduler/react-big-schedule/blob/master/LICENSE) file for more details.
61
61
 
62
62
  ## Support
63
- If you have any questions or need support, please create an issue in the [GitHub repository](https://github.com/ansulagrawal/react-big-schedule/issues).
63
+ If you have any questions or need support, please create an issue in the [GitHub repository](https://github.com/react-scheduler/react-big-schedule/issues).
64
64
 
65
65
  ## Credits
66
66
  React Big Schedule is developed and maintained by the React Big Schedule team. We would like to thank the open-source community for their valuable contributions and feedback.
@@ -68,7 +68,8 @@ React Big Schedule is developed and maintained by the React Big Schedule team. W
68
68
  Special thanks to the following contributors:
69
69
  * Ansul Agrawal ([@ansulagrawal](https://github.com/ansulagrawal))
70
70
  * Jitendra Soni ([@JitendraSoni1234](https://github.com/JitendraSoni1234))
71
- * hbatalhaStch [[@hbatalhaStch](https://github.com/hbatalhaStch))
71
+ * hbatalhaStch [[@hbatalhaStch](https://github.com/hbatalhaStch))
72
+ * DamyanBG ([@DamyanBG](https://github.com/DamyanBG))
72
73
 
73
74
  ## Acknowledgments
74
75
  We would like to acknowledge the following projects for their inspiration and contributions:
@@ -85,7 +86,7 @@ We would like to acknowledge the following projects for their inspiration and co
85
86
  We are continuously working on enhancing react-big-schedule and welcome your feedback and suggestions for future improvements.
86
87
 
87
88
  ## Changelog
88
- Please refer to the [CHANGELOG.md](https://github.com/ansulagrawal/react-big-schedule/blob/master/CHANGELOG.md) file.
89
+ Please refer to the [CHANGELOG.md](https://github.com/react-scheduler/react-big-schedule/blob/master/CHANGELOG.md) file.
89
90
 
90
91
 
91
92
  ## Use and Setup
@@ -230,10 +231,10 @@ constructor(date=dayjs().format(DATE_FORMAT), viewType = ViewType.Week,
230
231
  `groupName` property to every event object, so that the events having the same `groupId` will belong to the same big task and
231
232
  be rendered in the same slot in task view. If `groupId` and `groupName` are not provided, SchedulerData will take
232
233
  the `id` as the `groupId`, and take the `title` as the `groupName`. See the `eventsForTaskView` in the
233
- [sample1.js](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/sample-data/sample1.js) for details.
234
- - `newConfig` is a config object, used to override the [default config](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/config/scheduler.js)
234
+ [sample1.js](https://github.com/react-scheduler/react-big-schedule/blob/master/src/sample-data/sample1.js) for details.
235
+ - `newConfig` is a config object, used to override the [default config](https://github.com/react-scheduler/react-big-schedule/blob/master/src/config/scheduler.js)
235
236
  fully or partly.
236
- - `newBehaviors` is a config object, used to override the [default behaviors](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/helper/behaviors.js)
237
+ - `newBehaviors` is a config object, used to override the [default behaviors](https://github.com/react-scheduler/react-big-schedule/blob/master/src/helper/behaviors.js)
237
238
  fully or partly.
238
239
  - `localeDayjs` is a locale dayjs object, which is unified used in react-big-scheduler. If not provided, Scheduler will come
239
240
  with English(en, United States) locale strings.
@@ -281,7 +282,7 @@ setResources(resources);
281
282
  ```
282
283
 
283
284
  Used to set the resources(the slots in resource view), make sure that there are no duplicated `resource.id` in the `resources`.
284
- See the demo `resources` in the [sample1.js](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/sample-data/sample1.js).
285
+ See the demo `resources` in the [sample1.js](https://github.com/react-scheduler/react-big-schedule/blob/master/src/sample-data/sample1.js).
285
286
 
286
287
  #### setEvents
287
288
 
@@ -290,9 +291,9 @@ setEvents(events);
290
291
  ```
291
292
 
292
293
  Used to set the events. the event array should be sorted in ascending order by event.start property.
293
- See the demo `events` in the [sample1.js](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/sample-data/sample1.js).
294
+ See the demo `events` in the [sample1.js](https://github.com/react-scheduler/react-big-schedule/blob/master/src/sample-data/sample1.js).
294
295
  If we use the task view, we'd better add the `groupId` and the `groupName` property to each event object, see the
295
- `eventsForTaskView` in the [sample1.js](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/sample-data/sample1.js) for details.
296
+ `eventsForTaskView` in the [sample1.js](https://github.com/react-scheduler/react-big-schedule/blob/master/src/sample-data/sample1.js) for details.
296
297
 
297
298
  #### prev
298
299
 
@@ -536,9 +537,9 @@ The locale string of non-agenda view cell header format of other view types.
536
537
 
537
538
  #### SchedulerData.behaviors.getDateLabelFunc
538
539
 
539
- Used to resolve the locale string of date label of Scheduler component.(Refer to the [getDateLabel](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/helper/behaviors.js) func for example)
540
+ Used to resolve the locale string of date label of Scheduler component.(Refer to the [getDateLabel](https://github.com/react-scheduler/react-big-schedule/blob/master/src/helper/behaviors.js) func for example)
540
541
 
541
- ### SchedulerData.config(See the [config file](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/config/scheduler.js) for details.)
542
+ ### SchedulerData.config(See the [config file](https://github.com/react-scheduler/react-big-schedule/blob/master/src/config/scheduler.js) for details.)
542
543
 
543
544
  #### schedulerWidth
544
545
 
@@ -618,7 +619,7 @@ Selected cells color in resource view and task view, cells are selectable only w
618
619
  #### nonWorkingTimeHeadColor
619
620
 
620
621
  Color of non-working time head cells. Modify `SchedulerData.behaviors.isNonWorkingTimeFunc` to re-define non-working time.
621
- Refer the `isNonWorkingTime` func in the [behaviors.js](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/helper/behaviors.js).
622
+ Refer the `isNonWorkingTime` func in the [behaviors.js](https://github.com/react-scheduler/react-big-schedule/blob/master/src/helper/behaviors.js).
622
623
 
623
624
  #### nonWorkingTimeHeadBgColor
624
625
 
@@ -631,7 +632,7 @@ Background color of non-working time body cells.
631
632
  #### summaryColor
632
633
 
633
634
  Color of cell summary. Modify `SchedulerData.behaviors.getSummaryFunc` to display summary in a cell.
634
- Refer the `getSummary` func in the [behaviors.js](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/helper/behaviors.js).
635
+ Refer the `getSummary` func in the [behaviors.js](https://github.com/react-scheduler/react-big-schedule/blob/master/src/helper/behaviors.js).
635
636
 
636
637
  #### summaryPos
637
638
 
@@ -731,9 +732,9 @@ Array of view that Scheduler will support.
731
732
 
732
733
  #### dragAndDropEnabled
733
734
 
734
- Controls whether the dragAndDrop funcionality is enabled. If false there's no need for the [withDnDContext wrapper function](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/components/WrapperFun.jsx).
735
+ Controls whether the dragAndDrop funcionality is enabled. If false there's no need for the [withDnDContext wrapper function](https://github.com/react-scheduler/react-big-schedule/blob/master/src/components/WrapperFun.jsx).
735
736
 
736
- ### SchedulerData.behaviors(See the [behaviors.js](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/helper/behaviors.js) for details.)
737
+ ### SchedulerData.behaviors(See the [behaviors.js](https://github.com/react-scheduler/react-big-schedule/blob/master/src/helper/behaviors.js) for details.)
737
738
 
738
739
  #### getEventTextFunc
739
740
 
@@ -1020,7 +1021,7 @@ to [this example](https://stephenchou1017.github.io/scheduler/#/resourceclickabl
1020
1021
  dndSources: PropTypes.array;
1021
1022
  ```
1022
1023
 
1023
- DnDSource array that registered to Scheduler. Use [DnDSource](https://github.com/ansulagrawal/react-big-schedule/blob/master/src/components/DnDSource.js),
1024
+ DnDSource array that registered to Scheduler. Use [DnDSource](https://github.com/react-scheduler/react-big-schedule/blob/master/src/components/DnDSource.js),
1024
1025
  we can simplify the drag and drop coding in React-Big-Scheduler. Refer
1025
1026
  to [this example](https://stephenchou1017.github.io/scheduler/#/draganddrop).
1026
1027
 
@@ -4,129 +4,102 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports["default"] = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
7
+ var _react = _interopRequireDefault(require("react"));
8
8
  var _propTypes = require("prop-types");
9
9
  var _index = require("./index");
10
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
13
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
14
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
15
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
16
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
17
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
18
- function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
19
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
20
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
21
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
22
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
23
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
24
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
25
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
26
- var HeaderView = /*#__PURE__*/function (_Component) {
27
- _inherits(HeaderView, _Component);
28
- var _super = _createSuper(HeaderView);
29
- function HeaderView(props) {
30
- _classCallCheck(this, HeaderView);
31
- return _super.call(this, props);
32
- }
33
- _createClass(HeaderView, [{
34
- key: "render",
35
- value: function render() {
36
- var _this$props = this.props,
37
- schedulerData = _this$props.schedulerData,
38
- nonAgendaCellHeaderTemplateResolver = _this$props.nonAgendaCellHeaderTemplateResolver;
39
- var headers = schedulerData.headers,
40
- cellUnit = schedulerData.cellUnit,
41
- config = schedulerData.config,
42
- localeDayjs = schedulerData.localeDayjs;
43
- var headerHeight = schedulerData.getTableHeaderHeight();
44
- var cellWidth = schedulerData.getContentCellWidth();
45
- var minuteStepsInHour = schedulerData.getMinuteStepsInHour();
46
- var headerList = [];
47
- var style = {};
48
- if (cellUnit === _index.CellUnit.Hour) {
49
- headers.forEach(function (item, index) {
50
- if (index % minuteStepsInHour === 0) {
51
- var datetime = localeDayjs(new Date(item.time));
52
- var isCurrentTime = datetime.isSame(new Date(), 'hour');
53
- style = !!item.nonWorkingTime ? {
54
- width: cellWidth * minuteStepsInHour,
55
- color: config.nonWorkingTimeHeadColor,
56
- backgroundColor: config.nonWorkingTimeHeadBgColor
57
- } : {
58
- width: cellWidth * minuteStepsInHour
59
- };
60
- if (index === headers.length - minuteStepsInHour) style = !!item.nonWorkingTime ? {
61
- color: config.nonWorkingTimeHeadColor,
62
- backgroundColor: config.nonWorkingTimeHeadBgColor
63
- } : {};
64
- var pFormattedList = config.nonAgendaDayCellHeaderFormat.split('|').map(function (item) {
65
- return datetime.format(item);
66
- });
67
- var element;
68
- if (typeof nonAgendaCellHeaderTemplateResolver === 'function') {
69
- element = nonAgendaCellHeaderTemplateResolver(schedulerData, item, pFormattedList, style);
70
- } else {
71
- var pList = pFormattedList.map(function (item, index) {
72
- return /*#__PURE__*/_react["default"].createElement("div", {
73
- key: index
74
- }, item);
75
- });
76
- element = /*#__PURE__*/_react["default"].createElement("th", {
77
- key: item.time,
78
- className: "header3-text",
79
- style: style
80
- }, /*#__PURE__*/_react["default"].createElement("div", null, pList));
81
- }
82
- headerList.push(element);
83
- }
84
- });
85
- } else {
86
- headerList = headers.map(function (item, index) {
87
- var datetime = localeDayjs(new Date(item.time));
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
+ var HeaderView = function HeaderView(_ref) {
12
+ var schedulerData = _ref.schedulerData,
13
+ nonAgendaCellHeaderTemplateResolver = _ref.nonAgendaCellHeaderTemplateResolver;
14
+ var headers = schedulerData.headers,
15
+ cellUnit = schedulerData.cellUnit,
16
+ config = schedulerData.config,
17
+ localeDayjs = schedulerData.localeDayjs;
18
+ var headerHeight = schedulerData.getTableHeaderHeight();
19
+ var cellWidth = schedulerData.getContentCellWidth();
20
+ var minuteStepsInHour = schedulerData.getMinuteStepsInHour();
21
+ var headerList = [];
22
+ var style = {};
23
+ if (cellUnit === _index.CellUnit.Hour) {
24
+ headers.forEach(function (item, index) {
25
+ if (index % minuteStepsInHour === 0) {
26
+ var datetime = localeDayjs(new Date(item.item));
27
+ style = !!item.nonWorkingTime ? {
28
+ width: cellWidth * minuteStepsInHour,
29
+ color: config.nonWorkingTimeHeadColor,
30
+ backgroundColor: config.nonWorkingTimeHeadBgColor
31
+ } : {
32
+ width: cellWidth * minuteStepsInHour
33
+ };
34
+ if (index === headers.length - minuteStepsInHour) {
88
35
  style = !!item.nonWorkingTime ? {
89
- width: cellWidth,
90
- color: config.nonWorkingTimeHeadColor,
91
- backgroundColor: config.nonWorkingTimeHeadBgColor
92
- } : {
93
- width: cellWidth
94
- };
95
- if (index === headers.length - 1) style = !!item.nonWorkingTime ? {
96
36
  color: config.nonWorkingTimeHeadColor,
97
37
  backgroundColor: config.nonWorkingTimeHeadBgColor
98
38
  } : {};
99
- var cellFormat = cellUnit === _index.CellUnit.Week ? config.nonAgendaWeekCellHeaderFormat : cellUnit === _index.CellUnit.Month ? config.nonAgendaMonthCellHeaderFormat : cellUnit === _index.CellUnit.Year ? config.nonAgendaYearCellHeaderFormat : config.nonAgendaOtherCellHeaderFormat;
100
- var pFormattedList = cellFormat.split('|').map(function (item) {
101
- return datetime.format(item);
102
- });
103
- if (typeof nonAgendaCellHeaderTemplateResolver === 'function') {
104
- return nonAgendaCellHeaderTemplateResolver(schedulerData, item, pFormattedList, style);
105
- }
39
+ }
40
+ var pFormattedList = config.nonAgendaDayCellHeaderFormat.split('|').map(function (item) {
41
+ return datetime.format(item);
42
+ });
43
+ var element;
44
+ if (typeof nonAgendaCellHeaderTemplateResolver === 'function') {
45
+ element = nonAgendaCellHeaderTemplateResolver(schedulerData, item, pFormattedList, style);
46
+ } else {
106
47
  var pList = pFormattedList.map(function (item, index) {
107
48
  return /*#__PURE__*/_react["default"].createElement("div", {
108
49
  key: index
109
50
  }, item);
110
51
  });
111
- return /*#__PURE__*/_react["default"].createElement("th", {
52
+ element = /*#__PURE__*/_react["default"].createElement("th", {
112
53
  key: item.time,
113
54
  className: "header3-text",
114
55
  style: style
115
56
  }, /*#__PURE__*/_react["default"].createElement("div", null, pList));
116
- });
117
- }
118
- return /*#__PURE__*/_react["default"].createElement("thead", null, /*#__PURE__*/_react["default"].createElement("tr", {
119
- style: {
120
- height: headerHeight
121
57
  }
122
- }, headerList));
58
+ headerList.push(element);
59
+ }
60
+ });
61
+ } else {
62
+ headerList = headers.map(function (item, index) {
63
+ var datetime = localeDayjs(new Date(item.time));
64
+ style = !!item.nonWorkingTime ? {
65
+ width: cellWidth,
66
+ color: config.nonWorkingTimeHeadColor,
67
+ backgroundColor: config.nonWorkingTimeHeadBgColor
68
+ } : {
69
+ width: cellWidth
70
+ };
71
+ if (index === headers.length - 1) style = !!item.nonWorkingTime ? {
72
+ color: config.nonWorkingTimeHeadColor,
73
+ backgroundColor: config.nonWorkingTimeHeadBgColor
74
+ } : {};
75
+ var cellFormat = cellUnit === _index.CellUnit.Week ? config.nonAgendaWeekCellHeaderFormat : cellUnit === _index.CellUnit.Month ? config.nonAgendaMonthCellHeaderFormat : cellUnit === _index.CellUnit.Year ? config.nonAgendaYearCellHeaderFormat : config.nonAgendaOtherCellHeaderFormat;
76
+ var pFormattedList = cellFormat.split('|').map(function (dateFormatPart) {
77
+ return datetime.format(dateFormatPart);
78
+ });
79
+ if (typeof nonAgendaCellHeaderTemplateResolver === 'function') {
80
+ return nonAgendaCellHeaderTemplateResolver(schedulerData, item, pFormattedList, style);
81
+ }
82
+ var pList = pFormattedList.map(function (item, index) {
83
+ return /*#__PURE__*/_react["default"].createElement("div", {
84
+ key: index
85
+ }, item);
86
+ });
87
+ return /*#__PURE__*/_react["default"].createElement("th", {
88
+ key: item.time,
89
+ className: "header3-text",
90
+ style: style
91
+ }, /*#__PURE__*/_react["default"].createElement("div", null, pList));
92
+ });
93
+ }
94
+ return /*#__PURE__*/_react["default"].createElement("thead", null, /*#__PURE__*/_react["default"].createElement("tr", {
95
+ style: {
96
+ height: headerHeight
123
97
  }
124
- }]);
125
- return HeaderView;
126
- }(_react.Component);
127
- _defineProperty(HeaderView, "propTypes", {
98
+ }, headerList));
99
+ };
100
+ HeaderView.propTypes = {
128
101
  schedulerData: _propTypes.PropTypes.object.isRequired,
129
102
  nonAgendaCellHeaderTemplateResolver: _propTypes.PropTypes.func
130
- });
103
+ };
131
104
  var _default = HeaderView;
132
105
  exports["default"] = _default;
@@ -23,7 +23,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
23
23
  var RadioButton = _antd.Radio.Button;
24
24
  var RadioGroup = _antd.Radio.Group;
25
25
  var SchedulerHeader = function SchedulerHeader(_ref) {
26
- var _schedulerData$getCal, _schedulerData$getCal2;
26
+ var _schedulerData$getCal;
27
27
  var onViewChange = _ref.onViewChange,
28
28
  goNext = _ref.goNext,
29
29
  goBack = _ref.goBack,
@@ -49,7 +49,7 @@ var SchedulerHeader = function SchedulerHeader(_ref) {
49
49
  config = schedulerData.config;
50
50
  var dateLabel = schedulerData.getDateLabel();
51
51
  var selectDate = schedulerData.getSelectedDate();
52
- var calendarLocale = (_schedulerData$getCal = schedulerData.getCalendarPopoverLocale()) === null || _schedulerData$getCal === void 0 ? void 0 : (_schedulerData$getCal2 = _schedulerData$getCal["default"]) === null || _schedulerData$getCal2 === void 0 ? void 0 : _schedulerData$getCal2.Calendar;
52
+ 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;
53
53
  var defaultValue = "".concat(viewType).concat(showAgenda ? 1 : 0).concat(isEventPerspective ? 1 : 0);
54
54
  var handleEvents = function handleEvents(func, isViewSpinning) {
55
55
  var funcArg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
package/package.json CHANGED
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "name": "react-big-schedule",
3
- "version": "4.2.3",
3
+ "version": "4.2.4",
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
- "react big schedule",
7
6
  "react-big-schedule",
7
+ "react-scheduler",
8
+ "react-schedule",
9
+ "react big schedule",
8
10
  "react scheduler",
9
11
  "react-big-scheduler",
10
12
  "react scheduler master",
@@ -35,17 +37,16 @@
35
37
  "files": [
36
38
  "dist",
37
39
  "README.md",
38
- "License",
39
- "CHANGELOG.md"
40
+ "License"
40
41
  ],
41
42
  "main": "dist/index.js",
42
- "homepage": "https://github.com/ansulagrawal/react-big-schedule",
43
+ "homepage": "https://react-big-schedule.vercel.app",
43
44
  "repository": {
44
45
  "type": "git",
45
- "url": "https://github.com/ansulagrawal/react-big-schedule.git"
46
+ "url": "https://github.com/react-scheduler/react-big-schedule"
46
47
  },
47
48
  "bugs": {
48
- "url": "https://github.com/ansulagrawal/react-big-schedule.git/issues"
49
+ "url": "https://github.com/react-scheduler/react-big-schedule/issues"
49
50
  },
50
51
  "publishConfig": {
51
52
  "registry": "https://registry.npmjs.org/"
@@ -57,27 +58,27 @@
57
58
  },
58
59
  "dependencies": {
59
60
  "@ant-design/icons": "^5.1.4",
60
- "antd": "^5.6.3",
61
- "dayjs": "^1.11.8",
61
+ "antd": "^5.7.0",
62
+ "dayjs": "^1.11.9",
62
63
  "prop-types": "^15.8.1",
63
64
  "react": "^18.2.0",
64
65
  "react-dnd": "^14.0.5",
65
66
  "react-dnd-html5-backend": "^14.1.0",
66
67
  "react-dom": "^18.2.0",
67
- "rrule": "^2.7.1"
68
+ "rrule": "^2.7.2"
68
69
  },
69
70
  "devDependencies": {
70
- "@babel/cli": "^7.22.5",
71
- "@babel/core": "^7.22.5",
72
- "@babel/preset-env": "^7.22.5",
71
+ "@babel/cli": "^7.22.9",
72
+ "@babel/core": "^7.22.9",
73
+ "@babel/preset-env": "^7.22.9",
73
74
  "@babel/preset-react": "^7.22.5",
74
- "babel-loader": "^9.1.2",
75
+ "babel-loader": "^9.1.3",
75
76
  "copy-webpack-plugin": "^11.0.0",
76
77
  "css-loader": "^6.8.1",
77
78
  "fs-extra": "^11.1.1",
78
79
  "html-webpack-plugin": "^5.5.3",
79
80
  "style-loader": "^3.3.3",
80
- "webpack": "^5.88.0",
81
+ "webpack": "^5.88.1",
81
82
  "webpack-cli": "^5.1.4",
82
83
  "webpack-dev-server": "^4.15.1"
83
84
  }
package/CHANGELOG.md DELETED
@@ -1,115 +0,0 @@
1
- ## [4.2.2](https://github.com/ansulagrawal/react-big-schedule/compare/4.2.1...4.2.2)
2
-
3
- `2023-06-27`
4
-
5
- - Updated Readme by @ansulagrawal in [#46](https://github.com/ansulagrawal/react-big-schedule/pull/46)
6
- - Chore(deps-dev): Bump webpack from 5.87.0 to 5.88.0 by @dependabot in [#50](https://github.com/ansulagrawal/react-big-schedule/pull/50)
7
- - Chore(deps): Bump antd from 5.6.2 to 5.6.3 by @dependabot in [#51](https://github.com/ansulagrawal/react-big-schedule/pull/51)
8
-
9
- #### New Contributors
10
-
11
- - @dependabot
12
-
13
- ## [4.2.1](https://github.com/ansulagrawal/react-big-schedule/compare/4.2.0...4.2.1)
14
- `2023-06-24`
15
-
16
- - Updated Antd Version and added `@babel/cli` package [#39](https://github.com/ansulagrawal/react-big-schedule/pull/39) [@ansulagrawal](https://github.com/ansulagrawal)
17
- - Fixes for calculating span and isEnd for events. [#35](https://github.com/ansulagrawal/react-big-schedule/pull/35) [@adam-m-clark](https://github.com/adam-m-clark)
18
-
19
- #### New Contributors
20
- - [@adam-m-clark](https://github.com/adam-m-clark)
21
-
22
- ## [4.2.0](https://github.com/ansulagrawal/react-big-schedule/compare/3.0.2...4.0.0)
23
-
24
- `2023-06-17`
25
-
26
- - Fix the default export file `index.js`.
27
- - Remove `main.jsx` from the build directory.
28
- - Fix Importing issue in projects as `src/index.js` file was not properly written.
29
- - Added `type-definitions` for the library.
30
- - Fix the locale for both library `antd` and `dayjs`.
31
- - Fix the `package.json` main parameter value.
32
- - Moved from vite to webpack for stable release
33
- - Made a stable import for all formats
34
- - Remove build from github
35
- - Remove unnecessary package dependencies
36
-
37
-
38
- ## [3.0.2](https://github.com/ansulagrawal/react-big-schedule/compare/3.0.1...3.0.2)
39
- `2023-06-11`
40
-
41
- - Added support for importing the React Big Schedule library in the umd.js format.
42
- - Fixed an issue with importing the React Big Schedule library into the project.
43
- - Fixed an issue with importing the locale for antd and dayjs.
44
-
45
- Note:
46
-
47
- - With this release, users can now import the React Big Schedule library in the umd.js format, providing more flexibility and compatibility with different project setups.
48
- - Please ensure to update your projects to this version to take advantage of the new feature and the fixed import issues.
49
-
50
- # [3.0.1](https://github.com/ansulagrawal/react-big-schedule/compare/3.0.0...3.0.1)
51
-
52
- `2023-06-04`
53
-
54
- - Fixed exporting of CSS file in the build process to ensure proper functionality.
55
- - Removed publishing on GitHub as npm is already available for distribution.
56
-
57
- # [3.0.0](https://github.com/ansulagrawal/react-big-schedule/compare/2.0.0...3.0.0)
58
- `2023-06-04`
59
-
60
- - Removed usage of `UNSAFE_componentWillReceiveProps`.
61
- - Fixed event span for day `viewType`.
62
- - Added generics to Scheduler and `SchedulerProps` to extend the `EventItem` type.
63
- - Added option to hide resource view.
64
- - Added option to change event item popover placement.
65
- - Fixed custom view event span.
66
- - Fixed scheduler header span for day view.
67
- - Improved locale support.
68
- - Added options to place the event item popover at the mouse position using `eventItemPopoverPlacement`: `topLeftMousePosition`, `bottomLeftMousePosition`, `topRightMousePosition`, `bottomRightMousePosition`.
69
- - Shifted from moment to dayjs library.
70
-
71
- Thanks to [@hbatalhaStch](https://github.com/hbatalhaStch), Changes has been copied from his repo and done some minor changes.
72
-
73
- #### New Contributors
74
-
75
- - [@hbatalhaStch](https://github.com/hbatalhaStch)
76
-
77
- # [2.0.0](https://github.com/ansulagrawal/react-big-schedule/compare/1.0.0...2.0.0)
78
- `2023-05-27`
79
-
80
- - Add configurable colour visibility and optional date display in popover. [#16](https://github.com/ansulagrawal/react-big-schedule/pull/16)
81
-
82
- - Add configurable cell size options for Week, Month, and Year views. [#17](https://github.com/ansulagrawal/react-big-schedule/pull/17)
83
-
84
- - Add SWAP event function for event swapping in library. [#18](https://github.com/ansulagrawal/react-big-schedule/pull/18)
85
-
86
- - Enhance library with wrapper function and streamlined dependencies. [#19](https://github.com/ansulagrawal/react-big-schedule/pull/19)
87
- - Fix bugs and enhancement of format. [#20](https://github.com/ansulagrawal/react-big-schedule/pull/20)
88
-
89
- ### Breaking Changes:
90
- - Added a configuration option to show or hide colour in the popover.
91
- - Made the date in the popover optional. If the `eventItemPopoverDateFormat` is empty, the date will be hidden.
92
- - Added new configuration options to set the cell size for the Week, Month, and Year views.
93
- - Fixed a bug that caused the hour to double when there was a time change.
94
- - Updated the component to allow hours to be displayed over two days if necessary.
95
- - Added a new feature: `SWAP Event` function for event swapping in the library.
96
- - Enhances the library's capabilities by providing greater flexibility for managing and reordering events.
97
- - Backward compatible with existing codebases, ensuring seamless adoption.
98
- - Added a wrapper function to simplify usage and provide a default export.
99
- - Removed the dependency on the `withDndContext` function.
100
- - Streamlined dependencies, eliminating the need for users to install both `react-dnd-html5-backend` and `react-dnd` separately.
101
-
102
- ## 1.0.0
103
- `2023-05-21`
104
-
105
- - Updated Node Version from 14 -> 18
106
- - Updated Ant Design Version 3.16.6 -> 5.0.1
107
- - Updated React DND Version 7.5.0 -> 14.0.5
108
- - Updated react-dnd-html5-backend version 7.5.0 -> 14.1.0
109
- - Updated React version 16 -> 18
110
- - Updated rrule version 2.6.0 -> 2.7.2
111
- - Change Configure from webpack to Vite
112
-
113
- #### New Contributors
114
-
115
- - [@ansulagrawal](https://github.com/ansulagrawal)