react-big-schedule 4.4.1 → 4.4.2

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.
@@ -34,7 +34,7 @@ var stopDragHelper = function stopDragHelper(_ref) {
34
34
  var count = _ref.count,
35
35
  cellUnit = _ref.cellUnit,
36
36
  config = _ref.config,
37
- dragtype = _ref.dragtype,
37
+ dragType = _ref.dragType,
38
38
  eventItem = _ref.eventItem,
39
39
  localeDayjs = _ref.localeDayjs,
40
40
  value = _ref.value;
@@ -46,7 +46,7 @@ var stopDragHelper = function stopDragHelper(_ref) {
46
46
  if (count !== 0 && cellUnit !== _default2.CellUnit.Hour && config.displayWeekend === false) {
47
47
  while (whileTrue) {
48
48
  i = count > 0 ? i + 1 : i - 1;
49
- var date = localeDayjs(new Date(eventItem[dragtype])).add(i, 'days');
49
+ var date = localeDayjs(new Date(eventItem[dragType])).add(i, 'days');
50
50
  var dayOfWeek = date.weekday();
51
51
  if (dayOfWeek !== 0 && dayOfWeek !== 6) {
52
52
  tCount = count > 0 ? tCount + 1 : tCount - 1;
@@ -77,12 +77,12 @@ var EventItem = /*#__PURE__*/function (_Component) {
77
77
  var _this;
78
78
  _classCallCheck(this, EventItem);
79
79
  _this = _callSuper(this, EventItem, [_props]);
80
- _defineProperty(_this, "resizerHelper", function (dragtype) {
80
+ _defineProperty(_this, "resizerHelper", function (dragType) {
81
81
  var eventType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'addEventListener';
82
- var resizer = dragtype === 'start' ? _this.startResizer : _this.endResizer;
83
- var doDrag = dragtype === 'start' ? _this.doStartDrag : _this.doEndDrag;
84
- var stopDrag = dragtype === 'start' ? _this.stopStartDrag : _this.stopEndDrag;
85
- var cancelDrag = dragtype === 'start' ? _this.cancelStartDrag : _this.cancelEndDrag;
82
+ var resizer = dragType === 'start' ? _this.startResizer : _this.endResizer;
83
+ var doDrag = dragType === 'start' ? _this.doStartDrag : _this.doEndDrag;
84
+ var stopDrag = dragType === 'start' ? _this.stopStartDrag : _this.stopEndDrag;
85
+ var cancelDrag = dragType === 'start' ? _this.cancelStartDrag : _this.cancelEndDrag;
86
86
  if (_this.supportTouch) {
87
87
  resizer[eventType]('touchmove', doDrag, false);
88
88
  resizer[eventType]('touchend', stopDrag, false);
@@ -92,7 +92,7 @@ var EventItem = /*#__PURE__*/function (_Component) {
92
92
  document.documentElement[eventType]('mouseup', stopDrag, false);
93
93
  }
94
94
  });
95
- _defineProperty(_this, "initDragHelper", function (ev, dragtype) {
95
+ _defineProperty(_this, "initDragHelper", function (ev, dragType) {
96
96
  var _this$props = _this.props,
97
97
  schedulerData = _this$props.schedulerData,
98
98
  eventItem = _this$props.eventItem;
@@ -110,9 +110,9 @@ var EventItem = /*#__PURE__*/function (_Component) {
110
110
  if (ev.buttons !== undefined && ev.buttons !== 1) return;
111
111
  clientX = ev.clientX;
112
112
  }
113
- _this.setState(_defineProperty({}, dragtype === 'start' ? 'startX' : 'endX', clientX));
113
+ _this.setState(_defineProperty({}, dragType === 'start' ? 'startX' : 'endX', clientX));
114
114
  schedulerData._startResizing();
115
- _this.resizerHelper(dragtype, 'addEventListener');
115
+ _this.resizerHelper(dragType, 'addEventListener');
116
116
  document.onselectstart = function () {
117
117
  return false;
118
118
  };
@@ -224,7 +224,7 @@ var EventItem = /*#__PURE__*/function (_Component) {
224
224
  config: config,
225
225
  eventItem: eventItem,
226
226
  localeDayjs: localeDayjs,
227
- dragtype: 'start',
227
+ dragType: 'start',
228
228
  value: newStart
229
229
  });
230
230
  case 34:
@@ -376,7 +376,7 @@ var EventItem = /*#__PURE__*/function (_Component) {
376
376
  newEnd = localeDayjs(new Date(eventItem.end)).add(cellUnit === _default2.CellUnit.Hour ? count * config.minuteStep : count, cellUnit === _default2.CellUnit.Hour ? 'minutes' : 'days').format(_default2.DATETIME_FORMAT);
377
377
  _context2.next = 34;
378
378
  return stopDragHelper({
379
- dragtype: 'start',
379
+ dragType: 'end',
380
380
  cellUnit: cellUnit,
381
381
  config: config,
382
382
  count: count,
@@ -411,7 +411,7 @@ var EventItem = /*#__PURE__*/function (_Component) {
411
411
  if (conflictOccurred !== undefined) {
412
412
  conflictOccurred(schedulerData, 'EndResize', eventItem, _default2.DnDTypes.EVENT, slotId, slot ? slot.name : null, eventItem.start, newEnd);
413
413
  } else {
414
- console.log('Conflict occurred, set conflictOccurred func in Scheduler to handle it');
414
+ console.error('Conflict occurred, set conflictOccurred func in Scheduler to handle it');
415
415
  }
416
416
  _this.subscribeResizeEvent(_this.props);
417
417
  } else if (updateEventEnd !== undefined) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-big-schedule",
3
- "version": "4.4.1",
3
+ "version": "4.4.2",
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",
@@ -39,6 +39,7 @@
39
39
  "README.md",
40
40
  "License"
41
41
  ],
42
+ "type": "module",
42
43
  "main": "dist/index.js",
43
44
  "homepage": "https://react-big-schedule.vercel.app",
44
45
  "repository": {
@@ -52,44 +53,42 @@
52
53
  "registry": "https://registry.npmjs.org/"
53
54
  },
54
55
  "scripts": {
55
- "build": "node scripts/build.js",
56
- "start": "webpack serve --mode development --config ./webpack/webpack.dev.config.js",
56
+ "start": "vite",
57
+ "build": "vite build",
58
+ "build-lib": "node scripts/build.cjs",
57
59
  "clean": "rimraf ./dist && mkdir dist",
58
- "lint": "eslint ./src",
59
- "fix": "eslint ./"
60
+ "lint": "eslint ./src"
60
61
  },
61
62
  "dependencies": {
62
63
  "@ant-design/icons": "^5.5.1",
63
- "antd": "^5.21.2",
64
+ "@babel/cli": "^7.25.7",
65
+ "antd": "^5.21.3",
64
66
  "dayjs": "^1.11.13",
65
67
  "prop-types": "^15.8.1",
66
68
  "react": "^18.3.1",
67
69
  "react-dnd": "^14.0.5",
68
70
  "react-dnd-html5-backend": "^14.1.0",
69
71
  "react-dom": "^18.3.1",
72
+ "react-router-dom": "^6.27.0",
70
73
  "rrule": "^2.8.1"
71
74
  },
72
75
  "devDependencies": {
73
- "@babel/cli": "^7.25.7",
74
- "@babel/core": "^7.25.7",
75
- "@babel/eslint-parser": "^7.25.7",
76
- "@babel/preset-env": "^7.25.7",
76
+ "@babel/core": "^7.25.8",
77
+ "@babel/preset-env": "^7.25.8",
77
78
  "@babel/preset-react": "^7.25.7",
78
- "babel-loader": "^9.2.1",
79
- "copy-webpack-plugin": "^12.0.2",
80
- "css-loader": "^7.1.2",
79
+ "@eslint/js": "^9.11.1",
80
+ "@types/react": "^18.3.10",
81
+ "@types/react-dom": "^18.3.0",
82
+ "@vitejs/plugin-react": "^4.3.2",
83
+ "babel-plugin-transform-runtime": "^6.23.0",
81
84
  "eslint": "^8.2.0",
82
85
  "eslint-config-airbnb": "^19.0.4",
83
86
  "eslint-plugin-import": "^2.31.0",
84
87
  "eslint-plugin-jsx-a11y": "^6.10.0",
85
88
  "eslint-plugin-react": "^7.37.1",
86
89
  "eslint-plugin-react-hooks": "^4.6.2",
87
- "eslint-webpack-plugin": "^4.2.0",
88
90
  "fs-extra": "^11.2.0",
89
- "html-webpack-plugin": "^5.6.0",
90
- "style-loader": "^4.0.0",
91
- "webpack": "^5.95.0",
92
- "webpack-cli": "^5.1.4",
93
- "webpack-dev-server": "^5.1.0"
91
+ "globals": "^15.9.0",
92
+ "vite": "^5.4.8"
94
93
  }
95
94
  }