react-big-schedule 5.5.2-beta.5 → 6.1.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.
@@ -1,12 +1,6 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
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 const DATE_FORMAT = 'YYYY-MM-DD';
2
+ export const DATETIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';
3
+ export const 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 = exports.CellUnit = {
13
+ export const 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 = exports.SummaryPos = {
20
+ export const 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 = exports.DnDTypes = {
28
+ export const DnDTypes = {
35
29
  EVENT: 'event'
36
30
  };
@@ -1,18 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getDefaultLabels = getDefaultLabels;
7
- exports.getLabel = getLabel;
8
- exports.resetLabelsProvider = resetLabelsProvider;
9
- exports.setLabelsProvider = setLabelsProvider;
10
- 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; }
11
- 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; }
12
- 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; }
13
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
- 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); }
15
- 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); }
16
1
  /**
17
2
  * i18n configuration and labels provider
18
3
  *
@@ -22,7 +7,7 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
22
7
  */
23
8
 
24
9
  // Default English labels
25
- var defaultLabels = {
10
+ const defaultLabels = {
26
11
  resourceName: 'Resource Name',
27
12
  taskName: 'Task Name',
28
13
  agendaViewHeader: 'Agenda',
@@ -30,7 +15,7 @@ var defaultLabels = {
30
15
  };
31
16
 
32
17
  // Current labels provider (can be a function or object)
33
- var labelsProvider = null;
18
+ let labelsProvider = null;
34
19
 
35
20
  /**
36
21
  * Get the current label for a given key
@@ -38,18 +23,17 @@ var labelsProvider = null;
38
23
  * @param {string} locale - Optional locale code for locale-specific translations
39
24
  * @returns {string} The localized label or the default English label
40
25
  */
41
- function getLabel(key) {
42
- var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
26
+ export function getLabel(key, locale = undefined) {
43
27
  // If a custom provider function is set, use it
44
28
  if (typeof labelsProvider === 'function') {
45
- var label = labelsProvider(key, locale);
29
+ const label = labelsProvider(key, locale);
46
30
  return label !== undefined && label !== null ? label : defaultLabels[key];
47
31
  }
48
32
 
49
33
  // If a labels object provider is set, use it with fallback
50
- if (labelsProvider && _typeof(labelsProvider) === 'object') {
51
- var _label = labelsProvider[key];
52
- return _label !== undefined && _label !== null ? _label : defaultLabels[key];
34
+ if (labelsProvider && typeof labelsProvider === 'object') {
35
+ const label = labelsProvider[key];
36
+ return label !== undefined && label !== null ? label : defaultLabels[key];
53
37
  }
54
38
 
55
39
  // Fall back to default English labels
@@ -60,7 +44,7 @@ function getLabel(key) {
60
44
  * Set a custom labels provider
61
45
  * @param {Function|Object} provider - Either a function(key, locale) -> string or an object with label key-value pairs
62
46
  */
63
- function setLabelsProvider(provider) {
47
+ export function setLabelsProvider(provider) {
64
48
  labelsProvider = provider;
65
49
  }
66
50
 
@@ -68,13 +52,15 @@ function setLabelsProvider(provider) {
68
52
  * Get all default labels
69
53
  * @returns {Object} Object with all default English labels
70
54
  */
71
- function getDefaultLabels() {
72
- return _objectSpread({}, defaultLabels);
55
+ export function getDefaultLabels() {
56
+ return {
57
+ ...defaultLabels
58
+ };
73
59
  }
74
60
 
75
61
  /**
76
62
  * Reset to default English labels
77
63
  */
78
- function resetLabelsProvider() {
64
+ export function resetLabelsProvider() {
79
65
  labelsProvider = null;
80
66
  }
@@ -1,10 +1,5 @@
1
- "use strict";
1
+ import { SummaryPos, ViewType } from './default';
2
2
 
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _default2 = require("./default");
8
3
  /**
9
4
  * Default scheduler configuration
10
5
  *
@@ -14,7 +9,7 @@ var _default2 = require("./default");
14
9
  * 2. Using setLabelsProvider() from the i18n module to set a custom labels provider
15
10
  * 3. Directly modifying config properties after instantiation
16
11
  */
17
- var _default = exports["default"] = {
12
+ export default {
18
13
  schedulerWidth: '100%',
19
14
  besidesWidth: 20,
20
15
  underneathHeight: 20,
@@ -56,7 +51,7 @@ var _default = exports["default"] = {
56
51
  nonWorkingTimeHeadBgColor: '#fff0f6',
57
52
  nonWorkingTimeBodyBgColor: '#fff0f6',
58
53
  summaryColor: '#666',
59
- summaryPos: _default2.SummaryPos.TopRight,
54
+ summaryPos: SummaryPos.TopRight,
60
55
  groupOnlySlotColor: '#F8F8F8',
61
56
  headerBorderColor: '#e9e9e9',
62
57
  weekNumberRowHeight: 24,
@@ -95,27 +90,27 @@ var _default = exports["default"] = {
95
90
  minuteStep: 30,
96
91
  views: [{
97
92
  viewName: 'Day',
98
- viewType: _default2.ViewType.Day,
93
+ viewType: ViewType.Day,
99
94
  showAgenda: false,
100
95
  isEventPerspective: false
101
96
  }, {
102
97
  viewName: 'Week',
103
- viewType: _default2.ViewType.Week,
98
+ viewType: ViewType.Week,
104
99
  showAgenda: false,
105
100
  isEventPerspective: false
106
101
  }, {
107
102
  viewName: 'Month',
108
- viewType: _default2.ViewType.Month,
103
+ viewType: ViewType.Month,
109
104
  showAgenda: false,
110
105
  isEventPerspective: false
111
106
  }, {
112
107
  viewName: 'Quarter',
113
- viewType: _default2.ViewType.Quarter,
108
+ viewType: ViewType.Quarter,
114
109
  showAgenda: false,
115
110
  isEventPerspective: false
116
111
  }, {
117
112
  viewName: 'Year',
118
- viewType: _default2.ViewType.Year,
113
+ viewType: ViewType.Year,
119
114
  showAgenda: false,
120
115
  isEventPerspective: false
121
116
  }]
@@ -1,89 +1,81 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
1
+ import { CellUnit, ViewType } from '../config/default';
2
+ export const getSummary = () => ({
3
+ text: 'Summary',
4
+ color: 'red',
5
+ fontSize: '1.2rem'
5
6
  });
6
- exports.isNonWorkingTime = exports.getSummary = exports.getScrollSpecialDayjs = exports.getNonAgendaViewBodyCellBgColor = exports.getEventText = exports.getDateLabel = exports.getCustomDate = exports["default"] = void 0;
7
- var _default2 = require("../config/default");
8
- var getSummary = exports.getSummary = function getSummary() {
9
- return {
10
- text: 'Summary',
11
- color: 'red',
12
- fontSize: '1.2rem'
13
- };
14
- };
15
- var getCustomDate = exports.getCustomDate = function getCustomDate(schedulerData, num) {
16
- var date = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : schedulerData.startDate;
17
- var viewType = schedulerData.viewType,
18
- localeDayjs = schedulerData.localeDayjs;
19
- var startDate;
20
- var endDate;
21
- var cellUnit;
22
- if (viewType === _default2.ViewType.Custom1) {
23
- var monday = localeDayjs(new Date(date)).startOf('week');
7
+ export const getCustomDate = (schedulerData, num, date = schedulerData.startDate) => {
8
+ const {
9
+ viewType,
10
+ localeDayjs
11
+ } = schedulerData;
12
+ let startDate;
13
+ let endDate;
14
+ let cellUnit;
15
+ if (viewType === ViewType.Custom1) {
16
+ const monday = localeDayjs(new Date(date)).startOf('week');
24
17
  startDate = num === 0 ? monday : localeDayjs(new Date(monday)).add(2 * num, 'weeks');
25
18
  endDate = localeDayjs(new Date(startDate)).add(1, 'weeks').endOf('week');
26
- cellUnit = _default2.CellUnit.Day;
27
- } else if (viewType === _default2.ViewType.Custom2) {
28
- var firstDayOfMonth = localeDayjs(new Date(date)).startOf('month');
19
+ cellUnit = CellUnit.Day;
20
+ } else if (viewType === ViewType.Custom2) {
21
+ const firstDayOfMonth = localeDayjs(new Date(date)).startOf('month');
29
22
  startDate = num === 0 ? firstDayOfMonth : localeDayjs(new Date(firstDayOfMonth)).add(2 * num, 'months');
30
23
  endDate = localeDayjs(new Date(startDate)).add(1, 'months').endOf('month');
31
- cellUnit = _default2.CellUnit.Day;
24
+ cellUnit = CellUnit.Day;
32
25
  } else {
33
26
  startDate = num === 0 ? date : localeDayjs(new Date(date)).add(2 * num, 'days');
34
27
  endDate = localeDayjs(new Date(startDate)).add(1, 'days');
35
- cellUnit = _default2.CellUnit.Hour;
28
+ cellUnit = CellUnit.Hour;
36
29
  }
37
30
  return {
38
- startDate: startDate,
39
- endDate: endDate,
40
- cellUnit: cellUnit
31
+ startDate,
32
+ endDate,
33
+ cellUnit
41
34
  };
42
35
  };
43
- var getNonAgendaViewBodyCellBgColor = exports.getNonAgendaViewBodyCellBgColor = function getNonAgendaViewBodyCellBgColor(_schedulerData, _slotId, header) {
44
- return header.nonWorkingTime ? undefined : '#87e8de';
45
- };
46
- var getDateLabel = exports.getDateLabel = function getDateLabel(schedulerData, viewType, startDate, endDate) {
47
- var localeDayjs = schedulerData.localeDayjs;
48
- var start = localeDayjs(new Date(startDate));
49
- var end = localeDayjs(endDate);
50
- var dateLabel = '';
51
- if (viewType === _default2.ViewType.Week || start !== end && (viewType === _default2.ViewType.Custom || viewType === _default2.ViewType.Custom1 || viewType === _default2.ViewType.Custom2)) {
52
- dateLabel = "".concat(start.format('MMM D'), "-").concat(end.format('D, YYYY'));
53
- if (start.month() !== end.month()) dateLabel = "".concat(start.format('MMM D'), "-").concat(end.format('MMM D, YYYY'));
54
- if (start.year() !== end.year()) dateLabel = "".concat(start.format('MMM D, YYYY'), "-").concat(end.format('MMM D, YYYY'));
55
- } else if (viewType === _default2.ViewType.Month) {
36
+ export const getNonAgendaViewBodyCellBgColor = (_schedulerData, _slotId, header) => header.nonWorkingTime ? undefined : '#87e8de';
37
+ export const getDateLabel = (schedulerData, viewType, startDate, endDate) => {
38
+ const {
39
+ localeDayjs
40
+ } = schedulerData;
41
+ const start = localeDayjs(new Date(startDate));
42
+ const end = localeDayjs(endDate);
43
+ let dateLabel = '';
44
+ if (viewType === ViewType.Week || start !== end && (viewType === ViewType.Custom || viewType === ViewType.Custom1 || viewType === ViewType.Custom2)) {
45
+ dateLabel = `${start.format('MMM D')}-${end.format('D, YYYY')}`;
46
+ if (start.month() !== end.month()) dateLabel = `${start.format('MMM D')}-${end.format('MMM D, YYYY')}`;
47
+ if (start.year() !== end.year()) dateLabel = `${start.format('MMM D, YYYY')}-${end.format('MMM D, YYYY')}`;
48
+ } else if (viewType === ViewType.Month) {
56
49
  dateLabel = start.format('MMMM YYYY');
57
- } else if (viewType === _default2.ViewType.Quarter) {
58
- dateLabel = "".concat(start.format('MMM D'), "-").concat(end.format('MMM D, YYYY'));
59
- } else if (viewType === _default2.ViewType.Year) {
50
+ } else if (viewType === ViewType.Quarter) {
51
+ dateLabel = `${start.format('MMM D')}-${end.format('MMM D, YYYY')}`;
52
+ } else if (viewType === ViewType.Year) {
60
53
  dateLabel = start.format('YYYY');
61
54
  } else {
62
55
  dateLabel = start.format('MMM D, YYYY');
63
56
  }
64
57
  return dateLabel;
65
58
  };
66
- var getEventText = exports.getEventText = function getEventText(schedulerData, event) {
67
- var _schedulerData$resour;
68
- return schedulerData.isEventPerspective ? ((_schedulerData$resour = schedulerData.resources.find(function (item) {
69
- return item.id === event.resourceId;
70
- })) === null || _schedulerData$resour === void 0 ? void 0 : _schedulerData$resour.name) || event.title : event.title;
71
- };
72
- var getScrollSpecialDayjs = exports.getScrollSpecialDayjs = function getScrollSpecialDayjs(schedulerData) {
73
- var localeDayjs = schedulerData.localeDayjs;
59
+ export const getEventText = (schedulerData, event) => schedulerData.isEventPerspective ? schedulerData.resources.find(item => item.id === event.resourceId)?.name || event.title : event.title;
60
+ export const getScrollSpecialDayjs = schedulerData => {
61
+ const {
62
+ localeDayjs
63
+ } = schedulerData;
74
64
  return localeDayjs(new Date());
75
65
  };
76
- var isNonWorkingTime = exports.isNonWorkingTime = function isNonWorkingTime(schedulerData, time) {
77
- var localeDayjs = schedulerData.localeDayjs,
78
- cellUnit = schedulerData.cellUnit;
79
- if (cellUnit === _default2.CellUnit.Hour) {
80
- var hour = localeDayjs(new Date(time)).hour();
66
+ export const isNonWorkingTime = (schedulerData, time) => {
67
+ const {
68
+ localeDayjs,
69
+ cellUnit
70
+ } = schedulerData;
71
+ if (cellUnit === CellUnit.Hour) {
72
+ const hour = localeDayjs(new Date(time)).hour();
81
73
  return hour < 9 || hour > 18;
82
74
  }
83
- var dayOfWeek = localeDayjs(new Date(time)).day();
75
+ const dayOfWeek = localeDayjs(new Date(time)).day();
84
76
  return dayOfWeek === 0 || dayOfWeek === 6;
85
77
  };
86
- var _default = exports["default"] = {
78
+ export default {
87
79
  getSummaryFunc: undefined,
88
80
  getCustomDateFunc: undefined,
89
81
  getNonAgendaViewBodyCellBgColorFunc: undefined,
@@ -1,28 +1,16 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.getNextNumericEventId = getNextNumericEventId;
7
- exports.getPos = getPos;
8
- function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
9
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
11
- function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
12
- function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
13
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
- function getPos(element) {
15
- var x = 0;
16
- var y = 0;
17
- var currentElement = element;
1
+ import dayjs from 'dayjs';
2
+ export function getPos(element) {
3
+ let x = 0;
4
+ let y = 0;
5
+ let currentElement = element;
18
6
  while (currentElement) {
19
7
  x += currentElement.offsetLeft - currentElement.scrollLeft;
20
8
  y += currentElement.offsetTop - currentElement.scrollTop;
21
9
  currentElement = currentElement.offsetParent;
22
10
  }
23
11
  return {
24
- x: x,
25
- y: y
12
+ x,
13
+ y
26
14
  };
27
15
  }
28
16
 
@@ -32,11 +20,37 @@ function getPos(element) {
32
20
  * @param {Array} events - Array of event objects with id properties
33
21
  * @returns {number} The next available numeric ID
34
22
  */
35
- function getNextNumericEventId(events) {
36
- var numericIds = events.map(function (event) {
37
- return event.id;
38
- }).filter(function (id) {
39
- return typeof id === 'number' && Number.isFinite(id);
40
- });
41
- return Math.max.apply(Math, _toConsumableArray(numericIds).concat([0])) + 1;
23
+ export function getNextNumericEventId(events) {
24
+ const numericIds = events.map(event => event.id).filter(id => typeof id === 'number' && Number.isFinite(id));
25
+ return Math.max(...numericIds, 0) + 1;
26
+ }
27
+
28
+ /**
29
+ * Returns true if the string is a date-only value (YYYY-MM-DD) with no time component.
30
+ */
31
+ export function isDateOnly(dateStr) {
32
+ return typeof dateStr === 'string' && /^\d{4}-\d{2}-\d{2}$/.test(dateStr);
33
+ }
34
+
35
+ /**
36
+ * Normalizes an event start date string to a dayjs object.
37
+ * Date-only strings are treated as start-of-day.
38
+ */
39
+ export function normalizeEventStart(dateStr) {
40
+ if (isDateOnly(dateStr)) {
41
+ return dayjs(dateStr).startOf('day');
42
+ }
43
+ return dayjs(dateStr);
44
+ }
45
+
46
+ /**
47
+ * Normalizes an event end date string to a dayjs object.
48
+ * Date-only strings are treated as end-of-day to avoid UTC midnight timezone shifting
49
+ * causing off-by-one errors in day-cell span calculations (particularly in Month view).
50
+ */
51
+ export function normalizeEventEnd(dateStr) {
52
+ if (isDateOnly(dateStr)) {
53
+ return dayjs(dateStr).endOf('day');
54
+ }
55
+ return dayjs(dateStr);
42
56
  }
package/dist/index.js CHANGED
@@ -1,103 +1,2 @@
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 _index.AddMorePopover;
10
- }
11
- });
12
- Object.defineProperty(exports, "CellUnit", {
13
- enumerable: true,
14
- get: function get() {
15
- return _index.CellUnit;
16
- }
17
- });
18
- Object.defineProperty(exports, "DATETIME_FORMAT", {
19
- enumerable: true,
20
- get: function get() {
21
- return _index.DATETIME_FORMAT;
22
- }
23
- });
24
- Object.defineProperty(exports, "DATE_FORMAT", {
25
- enumerable: true,
26
- get: function get() {
27
- return _index.DATE_FORMAT;
28
- }
29
- });
30
- Object.defineProperty(exports, "DemoData", {
31
- enumerable: true,
32
- get: function get() {
33
- return _index.DemoData;
34
- }
35
- });
36
- Object.defineProperty(exports, "DnDContext", {
37
- enumerable: true,
38
- get: function get() {
39
- return _index.DnDContext;
40
- }
41
- });
42
- Object.defineProperty(exports, "DnDSource", {
43
- enumerable: true,
44
- get: function get() {
45
- return _index.DnDSource;
46
- }
47
- });
48
- Object.defineProperty(exports, "Scheduler", {
49
- enumerable: true,
50
- get: function get() {
51
- return _index.Scheduler;
52
- }
53
- });
54
- Object.defineProperty(exports, "SchedulerData", {
55
- enumerable: true,
56
- get: function get() {
57
- return _index.SchedulerData;
58
- }
59
- });
60
- Object.defineProperty(exports, "SummaryPos", {
61
- enumerable: true,
62
- get: function get() {
63
- return _index.SummaryPos;
64
- }
65
- });
66
- Object.defineProperty(exports, "ViewType", {
67
- enumerable: true,
68
- get: function get() {
69
- return _index.ViewType;
70
- }
71
- });
72
- Object.defineProperty(exports, "getDefaultLabels", {
73
- enumerable: true,
74
- get: function get() {
75
- return _i18n.getDefaultLabels;
76
- }
77
- });
78
- Object.defineProperty(exports, "getLabel", {
79
- enumerable: true,
80
- get: function get() {
81
- return _i18n.getLabel;
82
- }
83
- });
84
- Object.defineProperty(exports, "resetLabelsProvider", {
85
- enumerable: true,
86
- get: function get() {
87
- return _i18n.resetLabelsProvider;
88
- }
89
- });
90
- Object.defineProperty(exports, "setLabelsProvider", {
91
- enumerable: true,
92
- get: function get() {
93
- return _i18n.setLabelsProvider;
94
- }
95
- });
96
- Object.defineProperty(exports, "wrapperFun", {
97
- enumerable: true,
98
- get: function get() {
99
- return _index.wrapperFun;
100
- }
101
- });
102
- var _index = require("./components/index");
103
- var _i18n = require("./config/i18n");
1
+ export { AddMorePopover, CellUnit, DATE_FORMAT, DATETIME_FORMAT, DemoData, DnDContext, DnDSource, Scheduler, SchedulerData, SummaryPos, ViewType, wrapperFun } from './components/index';
2
+ export { getDefaultLabels, getLabel, resetLabelsProvider, setLabelsProvider } from './config/i18n';
@@ -1,10 +1,4 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var DemoData = {
1
+ const DemoData = {
8
2
  resources: [{
9
3
  id: 'r0',
10
4
  name: 'Resource0',
@@ -132,6 +126,48 @@ var DemoData = {
132
126
  end: '2022-12-27 23:30:00',
133
127
  resourceId: 'r1',
134
128
  title: 'R1 has many tasks 6'
129
+ }, {
130
+ id: 15,
131
+ start: '2022-12-06',
132
+ end: '2022-12-09',
133
+ resourceId: 'r3',
134
+ title: 'SAMPLE TASK (DATE-ONLY FORMAT)'
135
+ }, {
136
+ id: 16,
137
+ start: '2022-12-12',
138
+ end: '2022-12-14',
139
+ resourceId: 'r3',
140
+ title: 'SAMPLE TASK (DATE-ONLY FORMAT)'
141
+ }, {
142
+ id: 17,
143
+ resourceId: 'r4',
144
+ title: '#198 Sat→Mon',
145
+ start: '2022-12-17 23:00:00',
146
+ end: '2022-12-19 09:00:00'
147
+ }, {
148
+ id: 18,
149
+ resourceId: 'r5',
150
+ title: '#198 Sun→Mon',
151
+ start: '2022-12-18 10:00:00',
152
+ end: '2022-12-19 10:00:00'
153
+ }, {
154
+ id: 19,
155
+ resourceId: 'r6',
156
+ title: '#198 prev-month carry',
157
+ start: '2022-11-30 10:00:00',
158
+ end: '2022-12-15 10:00:00'
159
+ }, {
160
+ id: 20,
161
+ resourceId: 'r7',
162
+ title: '#198 month boundary',
163
+ start: '2022-11-30 10:00:00',
164
+ end: '2022-12-02 10:00:00'
165
+ }, {
166
+ id: 21,
167
+ resourceId: 'r4',
168
+ title: '#112 short',
169
+ start: '2022-12-19 10:10:00',
170
+ end: '2022-12-19 11:20:00'
135
171
  }],
136
172
  eventsForTaskView: [{
137
173
  id: 1,
@@ -334,4 +370,4 @@ var DemoData = {
334
370
  type: 3
335
371
  }]
336
372
  };
337
- var _default = exports["default"] = DemoData;
373
+ export default DemoData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-big-schedule",
3
- "version": "5.5.2-beta.5",
3
+ "version": "6.1.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",
@@ -61,31 +61,31 @@
61
61
  "fix": "biome check --write ."
62
62
  },
63
63
  "dependencies": {
64
- "@ant-design/icons": "^6.2.2",
65
- "antd": "^6.4.2",
66
- "dayjs": "^1.11.20",
64
+ "@ant-design/icons": "^6.3.4",
65
+ "antd": "^6.6.5",
66
+ "dayjs": "^1.11.23",
67
67
  "prop-types": "^15.8.1",
68
- "react": "^19.2.6",
68
+ "react": "^19.3.0",
69
69
  "react-dnd": "^16.0.1",
70
70
  "react-dnd-html5-backend": "^16.0.1",
71
- "react-dom": "^19.2.6",
72
- "react-router-dom": "^7.15.0",
71
+ "react-dom": "^19.3.0",
72
+ "react-router-dom": "^7.18.4",
73
73
  "rrule": "^2.8.1"
74
74
  },
75
75
  "devDependencies": {
76
- "@babel/cli": "^7.28.6",
77
- "@babel/core": "^7.29.0",
78
- "@babel/preset-env": "^7.29.5",
79
- "@babel/preset-react": "^7.28.5",
80
- "@biomejs/biome": "^2.4.15",
76
+ "@babel/cli": "^8.0.6",
77
+ "@babel/core": "^8.0.7",
78
+ "@babel/preset-env": "^8.0.7",
79
+ "@babel/preset-react": "^8.0.1",
80
+ "@biomejs/biome": "^2.5.15",
81
81
  "babel-loader": "^10.1.1",
82
82
  "copy-webpack-plugin": "^14.0.0",
83
- "css-loader": "^7.1.4",
84
- "fs-extra": "^11.3.5",
85
- "html-webpack-plugin": "^5.6.7",
83
+ "css-loader": "^7.1.5",
84
+ "fs-extra": "^11.4.1",
85
+ "html-webpack-plugin": "^5.6.8",
86
86
  "style-loader": "^4.0.0",
87
- "webpack": "^5.106.2",
88
- "webpack-cli": "^7.0.2",
89
- "webpack-dev-server": "^5.2.4"
87
+ "webpack": "^5.111.1",
88
+ "webpack-cli": "^7.2.3",
89
+ "webpack-dev-server": "^6.0.0"
90
90
  }
91
91
  }