react-big-schedule 4.4.3 → 4.4.4-beta-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.
@@ -1,257 +1,257 @@
1
- *,
2
- *::before,
3
- *::after {
4
- box-sizing: border-box;
5
- }
6
-
7
- .header1-text {
8
- font-size: 25px;
9
- color: #90cdf9;
10
- font-weight: 500;
11
- }
12
-
13
- .header2-text {
14
- font-size: 14px;
15
- font-weight: 500;
16
- }
17
-
18
- .header3-text {
19
- font-size: 12px;
20
- font-weight: 500;
21
- }
22
-
23
- .base-text {
24
- font-size: 12px;
25
- }
26
-
27
- .help-text {
28
- font-size: 12px;
29
- color: #999;
30
- }
31
-
32
- .disabled-text {
33
- font-size: 12px;
34
- color: #ccc;
35
- }
36
-
37
- .scheduler {
38
- margin: 20px auto;
39
- border-spacing: 0;
40
- }
41
-
42
- .scheduler td {
43
- padding: 0px;
44
- }
45
-
46
- .expander-space {
47
- overflow: hidden;
48
- display: inline-block;
49
- width: 1em;
50
- height: 1em;
51
- line-height: 1em;
52
- font-size: 0.9em;
53
- vertical-align: middle;
54
- margin-top: -1%;
55
- }
56
-
57
- .resource-view {
58
- border: 1px solid #e9e9e9;
59
- overflow: hidden;
60
- }
61
-
62
- .scheduler-view {
63
- border: 1px solid #e9e9e9;
64
- margin: 0 0 0 -1px;
65
- padding: 0;
66
- }
67
-
68
- .scheduler-content {
69
- position: relative;
70
- z-index: 2;
71
- }
72
-
73
- .scheduler-bg {
74
- position: absolute;
75
- top: 0;
76
- left: 0;
77
- right: 0;
78
- bottom: 0;
79
- z-index: 1;
80
- }
81
-
82
- table.resource-table,
83
- table.scheduler-bg-table,
84
- table.scheduler-table {
85
- width: 100%;
86
- margin: 0;
87
- padding: 0;
88
- border-spacing: 0;
89
- text-align: center;
90
- }
91
-
92
- table.scheduler-table {
93
- border: 1px solid #e9e9e9;
94
- }
95
-
96
- table.scheduler-content-table {
97
- margin: 0;
98
- padding: 0;
99
- border: 0 solid #e9e9e9;
100
- border-spacing: 0;
101
- }
102
-
103
- table.resource-table tr,
104
- table.scheduler-bg-table tr,
105
- table.scheduler-table tr {
106
- border-bottom: 1px solid #e9e9e9;
107
- }
108
-
109
- table.resource-table th,
110
- table.scheduler-table th,
111
- table.resource-table td,
112
- table.scheduler-bg-table td,
113
- table.scheduler-table td {
114
- border-right: 1px solid #e9e9e9;
115
- border-bottom: 1px solid #e9e9e9;
116
- }
117
-
118
- table.scheduler-bg-table th {
119
- border-right: 1px solid #e9e9e9;
120
- }
121
-
122
- table.resource-table tr th:last-child,
123
- table.scheduler-table tr th:last-child,
124
- table.resource-table tr td:last-child,
125
- table.scheduler-table tr td:last-child {
126
- border-right: 0;
127
- }
128
-
129
- table.scheduler-table tr:last-child td {
130
- border-bottom: 0;
131
- }
132
-
133
- .timeline-event {
134
- position: absolute;
135
- cursor: pointer;
136
- }
137
-
138
- .day-event {
139
- position: relative;
140
- display: inline-block;
141
- margin: 0px 5px;
142
- }
143
-
144
- .day-event-container {
145
- text-align: left;
146
- padding: 5px 5px 0;
147
- }
148
-
149
- .round-all {
150
- border-radius: 14px;
151
- }
152
-
153
- .round-head {
154
- border-radius: 14px 0px 0px 14px;
155
- }
156
-
157
- .round-tail {
158
- border-radius: 0px 14px 14px 0px;
159
- }
160
-
161
- .round-none {
162
- border-radius: 0px;
163
- }
164
-
165
- .event-container {
166
- position: relative;
167
- }
168
-
169
- .event-item {
170
- margin: 1px 0;
171
- width: 100%;
172
- overflow: hidden;
173
- text-overflow: ellipsis;
174
- white-space: nowrap;
175
- color: #fff;
176
- padding-right: 20px !important;
177
- }
178
-
179
- .overflow-text {
180
- overflow: hidden;
181
- text-overflow: ellipsis;
182
- white-space: nowrap;
183
- padding-right: 5px !important;
184
- }
185
-
186
- .status-dot {
187
- width: 14px;
188
- height: 14px;
189
- border-radius: 7px;
190
- }
191
-
192
- .ant-radio-button-wrapper-checked {
193
- background-color: #108ee9;
194
- color: #ffffff;
195
- }
196
-
197
- .icon-nav:hover {
198
- color: #1e90ff !important;
199
- box-shadow: 0 0 0px !important;
200
- cursor: pointer;
201
- }
202
-
203
- .add-more-popover-overlay {
204
- position: absolute;
205
- z-index: 5;
206
- border: 1px solid #e5e5e5;
207
- background-color: #fff;
208
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
209
- padding: 10px;
210
- }
211
-
212
- .popover-calendar {
213
- width: 300px;
214
- }
215
-
216
- .popover-calendar .ant-calendar {
217
- box-shadow: 0 1px 6px rgba(0, 0, 0, 0) !important;
218
- }
219
-
220
- .event-resizer {
221
- position: absolute;
222
- z-index: 4;
223
- display: block;
224
- width: 7px;
225
- top: -1px;
226
- bottom: -1px;
227
- }
228
-
229
- .event-start-resizer {
230
- cursor: w-resize;
231
- left: -1px;
232
- }
233
-
234
- .event-end-resizer {
235
- cursor: e-resize;
236
- right: -1px;
237
- }
238
-
239
- .selected-area {
240
- position: absolute;
241
- }
242
-
243
- .slot-cell {
244
- padding-left: 4px;
245
- padding-right: 4px;
246
- }
247
-
248
- .slot-text {
249
- display: inline-block;
250
- padding-left: 4px;
251
- padding-right: 4px;
252
- }
253
-
254
- .txt-btn-dis {
255
- border: none;
256
- background-color: transparent;
257
- }
1
+ *,
2
+ *::before,
3
+ *::after {
4
+ box-sizing: border-box;
5
+ }
6
+
7
+ .header1-text {
8
+ font-size: 25px;
9
+ color: #90cdf9;
10
+ font-weight: 500;
11
+ }
12
+
13
+ .header2-text {
14
+ font-size: 14px;
15
+ font-weight: 500;
16
+ }
17
+
18
+ .header3-text {
19
+ font-size: 12px;
20
+ font-weight: 500;
21
+ }
22
+
23
+ .base-text {
24
+ font-size: 12px;
25
+ }
26
+
27
+ .help-text {
28
+ font-size: 12px;
29
+ color: #999;
30
+ }
31
+
32
+ .disabled-text {
33
+ font-size: 12px;
34
+ color: #ccc;
35
+ }
36
+
37
+ .scheduler {
38
+ margin: 20px auto;
39
+ border-spacing: 0;
40
+ }
41
+
42
+ .scheduler td {
43
+ padding: 0px;
44
+ }
45
+
46
+ .expander-space {
47
+ overflow: hidden;
48
+ display: inline-block;
49
+ width: 1em;
50
+ height: 1em;
51
+ line-height: 1em;
52
+ font-size: 0.9em;
53
+ vertical-align: middle;
54
+ margin-top: -1%;
55
+ }
56
+
57
+ .resource-view {
58
+ border: 1px solid #e9e9e9;
59
+ overflow: hidden;
60
+ }
61
+
62
+ .scheduler-view {
63
+ border: 1px solid #e9e9e9;
64
+ margin: 0 0 0 -1px;
65
+ padding: 0;
66
+ }
67
+
68
+ .scheduler-content {
69
+ position: relative;
70
+ z-index: 2;
71
+ }
72
+
73
+ .scheduler-bg {
74
+ position: absolute;
75
+ top: 0;
76
+ left: 0;
77
+ right: 0;
78
+ bottom: 0;
79
+ z-index: 1;
80
+ }
81
+
82
+ table.resource-table,
83
+ table.scheduler-bg-table,
84
+ table.scheduler-table {
85
+ width: 100%;
86
+ margin: 0;
87
+ padding: 0;
88
+ border-spacing: 0;
89
+ text-align: center;
90
+ }
91
+
92
+ table.scheduler-table {
93
+ border: 1px solid #e9e9e9;
94
+ }
95
+
96
+ table.scheduler-content-table {
97
+ margin: 0;
98
+ padding: 0;
99
+ border: 0 solid #e9e9e9;
100
+ border-spacing: 0;
101
+ }
102
+
103
+ table.resource-table tr,
104
+ table.scheduler-bg-table tr,
105
+ table.scheduler-table tr {
106
+ border-bottom: 1px solid #e9e9e9;
107
+ }
108
+
109
+ table.resource-table th,
110
+ table.scheduler-table th,
111
+ table.resource-table td,
112
+ table.scheduler-bg-table td,
113
+ table.scheduler-table td {
114
+ border-right: 1px solid #e9e9e9;
115
+ border-bottom: 1px solid #e9e9e9;
116
+ }
117
+
118
+ table.scheduler-bg-table th {
119
+ border-right: 1px solid #e9e9e9;
120
+ }
121
+
122
+ table.resource-table tr th:last-child,
123
+ table.scheduler-table tr th:last-child,
124
+ table.resource-table tr td:last-child,
125
+ table.scheduler-table tr td:last-child {
126
+ border-right: 0;
127
+ }
128
+
129
+ table.scheduler-table tr:last-child td {
130
+ border-bottom: 0;
131
+ }
132
+
133
+ .timeline-event {
134
+ position: absolute;
135
+ cursor: pointer;
136
+ }
137
+
138
+ .day-event {
139
+ position: relative;
140
+ display: inline-block;
141
+ margin: 0px 5px;
142
+ }
143
+
144
+ .day-event-container {
145
+ text-align: left;
146
+ padding: 5px 5px 0;
147
+ }
148
+
149
+ .round-all {
150
+ border-radius: 14px;
151
+ }
152
+
153
+ .round-head {
154
+ border-radius: 14px 0px 0px 14px;
155
+ }
156
+
157
+ .round-tail {
158
+ border-radius: 0px 14px 14px 0px;
159
+ }
160
+
161
+ .round-none {
162
+ border-radius: 0px;
163
+ }
164
+
165
+ .event-container {
166
+ position: relative;
167
+ }
168
+
169
+ .event-item {
170
+ margin: 1px 0;
171
+ width: 100%;
172
+ overflow: hidden;
173
+ text-overflow: ellipsis;
174
+ white-space: nowrap;
175
+ color: #fff;
176
+ padding-right: 20px !important;
177
+ }
178
+
179
+ .overflow-text {
180
+ overflow: hidden;
181
+ text-overflow: ellipsis;
182
+ white-space: nowrap;
183
+ padding-right: 5px !important;
184
+ }
185
+
186
+ .status-dot {
187
+ width: 14px;
188
+ height: 14px;
189
+ border-radius: 7px;
190
+ }
191
+
192
+ .ant-radio-button-wrapper-checked {
193
+ background-color: #108ee9;
194
+ color: #ffffff;
195
+ }
196
+
197
+ .icon-nav:hover {
198
+ color: #1e90ff !important;
199
+ box-shadow: 0 0 0px !important;
200
+ cursor: pointer;
201
+ }
202
+
203
+ .add-more-popover-overlay {
204
+ position: absolute;
205
+ z-index: 5;
206
+ border: 1px solid #e5e5e5;
207
+ background-color: #fff;
208
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
209
+ padding: 10px;
210
+ }
211
+
212
+ .popover-calendar {
213
+ width: 300px;
214
+ }
215
+
216
+ .popover-calendar .ant-calendar {
217
+ box-shadow: 0 1px 6px rgba(0, 0, 0, 0) !important;
218
+ }
219
+
220
+ .event-resizer {
221
+ position: absolute;
222
+ z-index: 4;
223
+ display: block;
224
+ width: 7px;
225
+ top: -1px;
226
+ bottom: -1px;
227
+ }
228
+
229
+ .event-start-resizer {
230
+ cursor: w-resize;
231
+ left: -1px;
232
+ }
233
+
234
+ .event-end-resizer {
235
+ cursor: e-resize;
236
+ right: -1px;
237
+ }
238
+
239
+ .selected-area {
240
+ position: absolute;
241
+ }
242
+
243
+ .slot-cell {
244
+ padding-left: 4px;
245
+ padding-right: 4px;
246
+ }
247
+
248
+ .slot-text {
249
+ display: inline-block;
250
+ padding-left: 4px;
251
+ padding-right: 4px;
252
+ }
253
+
254
+ .txt-btn-dis {
255
+ border: none;
256
+ background-color: transparent;
257
+ }
@@ -1,8 +1,13 @@
1
- import { ViewType, CellUnit } from '../config/default';
1
+ "use strict";
2
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
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");
3
8
  // getSummary func example
4
9
  // export const getSummary = (schedulerData, headerEvents, slotId, slotName, headerStart, headerEnd) => ({ text: 'Summary', color: 'red', fontSize: '1.2rem' });
5
- export var getSummary = function getSummary() {
10
+ var getSummary = exports.getSummary = function getSummary() {
6
11
  return {
7
12
  text: 'Summary',
8
13
  color: 'red',
@@ -11,27 +16,27 @@ export var getSummary = function getSummary() {
11
16
  };
12
17
 
13
18
  // getCustomDate example
14
- export var getCustomDate = function getCustomDate(schedulerData, num) {
19
+ var getCustomDate = exports.getCustomDate = function getCustomDate(schedulerData, num) {
15
20
  var date = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : schedulerData.startDate;
16
21
  var viewType = schedulerData.viewType,
17
22
  localeDayjs = schedulerData.localeDayjs;
18
23
  var startDate;
19
24
  var endDate;
20
25
  var cellUnit;
21
- if (viewType === ViewType.Custom1) {
26
+ if (viewType === _default2.ViewType.Custom1) {
22
27
  var monday = localeDayjs(new Date(date)).startOf('week');
23
28
  startDate = num === 0 ? monday : localeDayjs(new Date(monday)).add(2 * num, 'weeks');
24
29
  endDate = localeDayjs(new Date(startDate)).add(1, 'weeks').endOf('week');
25
- cellUnit = CellUnit.Day;
26
- } else if (viewType === ViewType.Custom2) {
30
+ cellUnit = _default2.CellUnit.Day;
31
+ } else if (viewType === _default2.ViewType.Custom2) {
27
32
  var firstDayOfMonth = localeDayjs(new Date(date)).startOf('month');
28
33
  startDate = num === 0 ? firstDayOfMonth : localeDayjs(new Date(firstDayOfMonth)).add(2 * num, 'months');
29
34
  endDate = localeDayjs(new Date(startDate)).add(1, 'months').endOf('month');
30
- cellUnit = CellUnit.Day;
35
+ cellUnit = _default2.CellUnit.Day;
31
36
  } else {
32
37
  startDate = num === 0 ? date : localeDayjs(new Date(date)).add(2 * num, 'days');
33
38
  endDate = localeDayjs(new Date(startDate)).add(1, 'days');
34
- cellUnit = CellUnit.Hour;
39
+ cellUnit = _default2.CellUnit.Hour;
35
40
  }
36
41
  return {
37
42
  startDate: startDate,
@@ -41,52 +46,52 @@ export var getCustomDate = function getCustomDate(schedulerData, num) {
41
46
  };
42
47
 
43
48
  // getNonAgendaViewBodyCellBgColor example
44
- export var getNonAgendaViewBodyCellBgColor = function getNonAgendaViewBodyCellBgColor(schedulerData, slotId, header) {
49
+ var getNonAgendaViewBodyCellBgColor = exports.getNonAgendaViewBodyCellBgColor = function getNonAgendaViewBodyCellBgColor(schedulerData, slotId, header) {
45
50
  return header.nonWorkingTime ? undefined : '#87e8de';
46
51
  };
47
52
 
48
53
  // getDateLabel func example
49
- export var getDateLabel = function getDateLabel(schedulerData, viewType, startDate, endDate) {
54
+ var getDateLabel = exports.getDateLabel = function getDateLabel(schedulerData, viewType, startDate, endDate) {
50
55
  var localeDayjs = schedulerData.localeDayjs;
51
56
  var start = localeDayjs(new Date(startDate));
52
57
  var end = localeDayjs(endDate);
53
58
  var dateLabel = '';
54
- if (viewType === ViewType.Week || start !== end && (viewType === ViewType.Custom || viewType === ViewType.Custom1 || viewType === ViewType.Custom2)) {
59
+ if (viewType === _default2.ViewType.Week || start !== end && (viewType === _default2.ViewType.Custom || viewType === _default2.ViewType.Custom1 || viewType === _default2.ViewType.Custom2)) {
55
60
  dateLabel = "".concat(start.format('MMM D'), "-").concat(end.format('D, YYYY'));
56
61
  if (start.month() !== end.month()) dateLabel = "".concat(start.format('MMM D'), "-").concat(end.format('MMM D, YYYY'));
57
62
  if (start.year() !== end.year()) dateLabel = "".concat(start.format('MMM D, YYYY'), "-").concat(end.format('MMM D, YYYY'));
58
- } else if (viewType === ViewType.Month) {
63
+ } else if (viewType === _default2.ViewType.Month) {
59
64
  dateLabel = start.format('MMMM YYYY');
60
- } else if (viewType === ViewType.Quarter) {
65
+ } else if (viewType === _default2.ViewType.Quarter) {
61
66
  dateLabel = "".concat(start.format('MMM D'), "-").concat(end.format('MMM D, YYYY'));
62
- } else if (viewType === ViewType.Year) {
67
+ } else if (viewType === _default2.ViewType.Year) {
63
68
  dateLabel = start.format('YYYY');
64
69
  } else {
65
70
  dateLabel = start.format('MMM D, YYYY');
66
71
  }
67
72
  return dateLabel;
68
73
  };
69
- export var getEventText = function getEventText(schedulerData, event) {
74
+ var getEventText = exports.getEventText = function getEventText(schedulerData, event) {
70
75
  var _schedulerData$resour;
71
76
  return schedulerData.isEventPerspective ? ((_schedulerData$resour = schedulerData.resources.find(function (item) {
72
77
  return item.id === event.resourceId;
73
78
  })) === null || _schedulerData$resour === void 0 ? void 0 : _schedulerData$resour.name) || event.title : event.title;
74
79
  };
75
- export var getScrollSpecialDayjs = function getScrollSpecialDayjs(schedulerData) {
80
+ var getScrollSpecialDayjs = exports.getScrollSpecialDayjs = function getScrollSpecialDayjs(schedulerData) {
76
81
  var localeDayjs = schedulerData.localeDayjs;
77
82
  return localeDayjs(new Date());
78
83
  };
79
- export var isNonWorkingTime = function isNonWorkingTime(schedulerData, time) {
84
+ var isNonWorkingTime = exports.isNonWorkingTime = function isNonWorkingTime(schedulerData, time) {
80
85
  var localeDayjs = schedulerData.localeDayjs,
81
86
  cellUnit = schedulerData.cellUnit;
82
- if (cellUnit === CellUnit.Hour) {
87
+ if (cellUnit === _default2.CellUnit.Hour) {
83
88
  var hour = localeDayjs(new Date(time)).hour();
84
89
  return hour < 9 || hour > 18;
85
90
  }
86
- var dayOfWeek = localeDayjs(new Date(time)).weekday();
91
+ var dayOfWeek = localeDayjs(new Date(time)).day();
87
92
  return dayOfWeek === 0 || dayOfWeek === 6;
88
93
  };
89
- export default {
94
+ var _default = exports["default"] = {
90
95
  getSummaryFunc: undefined,
91
96
  getCustomDateFunc: undefined,
92
97
  getNonAgendaViewBodyCellBgColorFunc: undefined,
@@ -1,3 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getPos = getPos;
7
+ /* eslint-disable import/prefer-default-export */
1
8
  function getPos(element) {
2
9
  var x = 0;
3
10
  var y = 0;
@@ -11,6 +18,4 @@ function getPos(element) {
11
18
  x: x,
12
19
  y: y
13
20
  };
14
- }
15
- export { getPos };
16
- export default getPos;
21
+ }