Skip to content

Commit

Permalink
Version 4.4.2 (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
ansulagrawal authored Oct 26, 2024
2 parents 479a514 + 282c223 commit e30340f
Show file tree
Hide file tree
Showing 47 changed files with 1,435 additions and 1,024 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

Expand All @@ -21,6 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?
dist

package-lock.json
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# Change Logs:

## [4.4.2](https://github.com/react-scheduler/react-big-schedule/compare/4.4.1...4.4.2)
`2024-10-25`

- Fixed typo of `dragtype` to `dragType` by [@ansulagrawal](https://github.com/ansulagrawal) in [#171](https://github.com/react-scheduler/react-big-schedule/pull/171).
- Fixed `End Drag` bug [#167](https://github.com/react-scheduler/react-big-schedule/issues/167) by [@ansulagrawal](https://github.com/ansulagrawal) in [#171](https://github.com/react-scheduler/react-big-schedule/pull/171), thanks to [@Navid-gh](https://github.com/Navid-gh) for raising a bug.

## [4.4.1](https://github.com/react-scheduler/react-big-schedule/compare/4.4.0...4.4.1)
`2024-10-06`

- Fix `CHANGELOG.MD` file.
- Removed `default` keyword from Scheduler Class in `typing/index.d.ts` file of typescript by [@ansulagrawal](https://github.com/ansulagrawal) in [#154](https://github.com/react-scheduler/react-big-schedule/pull/154).
- Updated utcOffset method calls to pass `new Date()` instead of `new Date().utcOffset` by [@ansulagrawal](https://github.com/ansulagrawal) in [#155](https://github.com/react-scheduler/react-big-schedule/pull/155).
-Updated `node_modules` version by [@ansulagrawal](https://github.com/ansulagrawal).
- Updated `node_modules` version by [@ansulagrawal](https://github.com/ansulagrawal).

## [4.4.0](https://github.com/react-scheduler/react-big-schedule/compare/4.3.3...4.4.0)

Expand Down
14 changes: 8 additions & 6 deletions src/index.html → index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="description" content="" />
<meta name="author" content="Ansul Agrawal" />
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/banner.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>React Big Schedule</title>

<!-- Meta tag -->
<meta name="author" content="Ansul Agrawal" />
</head>
<body>
<div id="app"></div>
<div id="root"></div>
<script type="module" src="/src/examples/index.jsx"></script>
</body>
</html>
37 changes: 18 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-big-schedule",
"version": "4.4.1",
"version": "4.4.2",
"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",
"keywords": [
"react-big-schedule",
Expand Down Expand Up @@ -39,6 +39,7 @@
"README.md",
"License"
],
"type": "module",
"main": "dist/index.js",
"homepage": "https://react-big-schedule.vercel.app",
"repository": {
Expand All @@ -52,44 +53,42 @@
"registry": "https://registry.npmjs.org/"
},
"scripts": {
"build": "node scripts/build.js",
"start": "webpack serve --mode development --config ./webpack/webpack.dev.config.js",
"start": "vite",
"build": "vite build",
"build-lib": "node scripts/build.cjs",
"clean": "rimraf ./dist && mkdir dist",
"lint": "eslint ./src",
"fix": "eslint ./"
"lint": "eslint ./src"
},
"dependencies": {
"@ant-design/icons": "^5.5.1",
"antd": "^5.21.2",
"@babel/cli": "^7.25.7",
"antd": "^5.21.3",
"dayjs": "^1.11.13",
"prop-types": "^15.8.1",
"react": "^18.3.1",
"react-dnd": "^14.0.5",
"react-dnd-html5-backend": "^14.1.0",
"react-dom": "^18.3.1",
"react-router-dom": "^6.27.0",
"rrule": "^2.8.1"
},
"devDependencies": {
"@babel/cli": "^7.25.7",
"@babel/core": "^7.25.7",
"@babel/eslint-parser": "^7.25.7",
"@babel/preset-env": "^7.25.7",
"@babel/core": "^7.25.8",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"babel-loader": "^9.2.1",
"copy-webpack-plugin": "^12.0.2",
"css-loader": "^7.1.2",
"@eslint/js": "^9.11.1",
"@types/react": "^18.3.10",
"@types/react-dom": "^18.3.0",
"@vitejs/plugin-react": "^4.3.2",
"babel-plugin-transform-runtime": "^6.23.0",
"eslint": "^8.2.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jsx-a11y": "^6.10.0",
"eslint-plugin-react": "^7.37.1",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-webpack-plugin": "^4.2.0",
"fs-extra": "^11.2.0",
"html-webpack-plugin": "^5.6.0",
"style-loader": "^4.0.0",
"webpack": "^5.95.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.1.0"
"globals": "^15.9.0",
"vite": "^5.4.8"
}
}
Binary file added public/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions public/npm.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
27 changes: 14 additions & 13 deletions src/components/EventItem.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Popover } from 'antd';
import EventItemPopover from './EventItemPopover';
import { DnDTypes, CellUnit, DATETIME_FORMAT } from '../config/default';

const stopDragHelper = ({ count, cellUnit, config, dragtype, eventItem, localeDayjs, value }) => {
const stopDragHelper = ({ count, cellUnit, config, dragType, eventItem, localeDayjs, value }) => {
const whileTrue = true;
let tCount = 0;
let i = 0;
Expand All @@ -14,7 +14,7 @@ const stopDragHelper = ({ count, cellUnit, config, dragtype, eventItem, localeDa
if (count !== 0 && cellUnit !== CellUnit.Hour && config.displayWeekend === false) {
while (whileTrue) {
i = count > 0 ? i + 1 : i - 1;
const date = localeDayjs(new Date(eventItem[dragtype])).add(i, 'days');
const date = localeDayjs(new Date(eventItem[dragType])).add(i, 'days');
const dayOfWeek = date.weekday();

if (dayOfWeek !== 0 && dayOfWeek !== 6) {
Expand Down Expand Up @@ -70,11 +70,11 @@ class EventItem extends Component {
}
}

resizerHelper = (dragtype, eventType = 'addEventListener') => {
const resizer = dragtype === 'start' ? this.startResizer : this.endResizer;
const doDrag = dragtype === 'start' ? this.doStartDrag : this.doEndDrag;
const stopDrag = dragtype === 'start' ? this.stopStartDrag : this.stopEndDrag;
const cancelDrag = dragtype === 'start' ? this.cancelStartDrag : this.cancelEndDrag;
resizerHelper = (dragType, eventType = 'addEventListener') => {
const resizer = dragType === 'start' ? this.startResizer : this.endResizer;
const doDrag = dragType === 'start' ? this.doStartDrag : this.doEndDrag;
const stopDrag = dragType === 'start' ? this.stopStartDrag : this.stopEndDrag;
const cancelDrag = dragType === 'start' ? this.cancelStartDrag : this.cancelEndDrag;
if (this.supportTouch) {
resizer[eventType]('touchmove', doDrag, false);
resizer[eventType]('touchend', stopDrag, false);
Expand All @@ -85,7 +85,7 @@ class EventItem extends Component {
}
};

initDragHelper = (ev, dragtype) => {
initDragHelper = (ev, dragType) => {
const { schedulerData, eventItem } = this.props;
const slotId = schedulerData._getEventSlotId(eventItem);
const slot = schedulerData.getSlotById(slotId);
Expand All @@ -102,10 +102,10 @@ class EventItem extends Component {
if (ev.buttons !== undefined && ev.buttons !== 1) return;
clientX = ev.clientX;
}
this.setState({ [dragtype === 'start' ? 'startX' : 'endX']: clientX });
this.setState({ [dragType === 'start' ? 'startX' : 'endX']: clientX });

schedulerData._startResizing();
this.resizerHelper(dragtype, 'addEventListener');
this.resizerHelper(dragType, 'addEventListener');
document.onselectstart = () => false;
document.ondragstart = () => false;
};
Expand Down Expand Up @@ -192,7 +192,7 @@ class EventItem extends Component {
config,
eventItem,
localeDayjs,
dragtype: 'start',
dragType: 'start',
value: newStart,
});

Expand Down Expand Up @@ -317,7 +317,7 @@ class EventItem extends Component {
.add(cellUnit === CellUnit.Hour ? count * config.minuteStep : count, cellUnit === CellUnit.Hour ? 'minutes' : 'days')
.format(DATETIME_FORMAT);
newEnd = await stopDragHelper({
dragtype: 'start',
dragType: 'end',
cellUnit,
config,
count,
Expand Down Expand Up @@ -351,7 +351,7 @@ class EventItem extends Component {
if (conflictOccurred !== undefined) {
conflictOccurred(schedulerData, 'EndResize', eventItem, DnDTypes.EVENT, slotId, slot ? slot.name : null, eventItem.start, newEnd);
} else {
console.log('Conflict occurred, set conflictOccurred func in Scheduler to handle it');
console.error('Conflict occurred, set conflictOccurred func in Scheduler to handle it');
}
this.subscribeResizeEvent(this.props);
} else if (updateEventEnd !== undefined) {
Expand Down Expand Up @@ -515,6 +515,7 @@ class EventItem extends Component {
}

export default EventItem;

EventItem.propTypes = {
schedulerData: PropTypes.object.isRequired,
eventItem: PropTypes.object.isRequired,
Expand Down
19 changes: 0 additions & 19 deletions src/examples/AddResourceForm.jsx

This file was deleted.

113 changes: 0 additions & 113 deletions src/examples/CellUnits.jsx

This file was deleted.

8 changes: 0 additions & 8 deletions src/examples/ComingSoon.jsx

This file was deleted.

Loading

0 comments on commit e30340f

Please sign in to comment.