@progress/kendo-react-scheduler 4.14.0-dev.202201131239 → 4.14.0-dev.202201131241
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/dist/cdn/js/kendo-react-scheduler.js +1 -1
- package/dist/es/items/hooks/use-drag-item.js +12 -12
- package/dist/es/package-metadata.js +1 -1
- package/dist/npm/items/hooks/use-drag-item.js +12 -12
- package/dist/npm/package-metadata.js +1 -1
- package/dist/systemjs/kendo-react-scheduler.js +1 -1
- package/package.json +12 -12
|
@@ -40,14 +40,15 @@ export var useDragItem = function (config, state) {
|
|
|
40
40
|
var fields = useSchedulerFieldsContext();
|
|
41
41
|
var groups = useSchedulerGroupsContext();
|
|
42
42
|
var handleDragItemAction = function (action) {
|
|
43
|
-
var newDragItem;
|
|
44
43
|
switch (action.type) {
|
|
45
|
-
case DRAG_ITEM_ACTION.set:
|
|
46
|
-
|
|
44
|
+
case DRAG_ITEM_ACTION.set: {
|
|
45
|
+
setDragItem(action.payload);
|
|
47
46
|
break;
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
}
|
|
48
|
+
case DRAG_ITEM_ACTION.reset: {
|
|
49
|
+
setDragItem(null);
|
|
50
50
|
break;
|
|
51
|
+
}
|
|
51
52
|
case DRAG_ITEM_ACTION.dragSelected: {
|
|
52
53
|
if (Math.abs(initialXRef.current - action.payload.x) < 10
|
|
53
54
|
&& Math.abs(initialYRef.current - action.payload.y) < 10) {
|
|
@@ -80,7 +81,7 @@ export var useDragItem = function (config, state) {
|
|
|
80
81
|
return selectedDataItem;
|
|
81
82
|
}).filter(Boolean);
|
|
82
83
|
oldSlot.current = slot;
|
|
83
|
-
|
|
84
|
+
setDragItem(newDragItems.slice());
|
|
84
85
|
break;
|
|
85
86
|
}
|
|
86
87
|
case DRAG_ITEM_ACTION.start: {
|
|
@@ -137,12 +138,12 @@ export var useDragItem = function (config, state) {
|
|
|
137
138
|
}
|
|
138
139
|
oldSlot.current = slot;
|
|
139
140
|
if (dataItem_1) {
|
|
140
|
-
|
|
141
|
+
setDragItem(dataItem_1);
|
|
141
142
|
}
|
|
142
143
|
break;
|
|
143
144
|
}
|
|
144
145
|
case DRAG_ITEM_ACTION.complete: {
|
|
145
|
-
|
|
146
|
+
setDragItem(null);
|
|
146
147
|
if (config.onDataAction && dragItem) {
|
|
147
148
|
config.onDataAction.call(undefined, {
|
|
148
149
|
type: DATA_ACTION.update,
|
|
@@ -153,8 +154,8 @@ export var useDragItem = function (config, state) {
|
|
|
153
154
|
break;
|
|
154
155
|
}
|
|
155
156
|
case DRAG_ITEM_ACTION.completeOccurrence: {
|
|
156
|
-
newDragItem = null;
|
|
157
157
|
var newDataItem = Array.isArray(dragItem) ? dragItem.slice() : clone(dragItem);
|
|
158
|
+
setDragItem(null);
|
|
158
159
|
if (config.onDataAction && dragItem) {
|
|
159
160
|
config.onDataAction.call(undefined, {
|
|
160
161
|
type: DATA_ACTION.update,
|
|
@@ -165,7 +166,6 @@ export var useDragItem = function (config, state) {
|
|
|
165
166
|
break;
|
|
166
167
|
}
|
|
167
168
|
case DRAG_ITEM_ACTION.completeSeries: {
|
|
168
|
-
newDragItem = null;
|
|
169
169
|
var newDataItems = void 0;
|
|
170
170
|
if (Array.isArray(dragItem)) {
|
|
171
171
|
newDataItems = dragItem.map(function (di) {
|
|
@@ -181,6 +181,7 @@ export var useDragItem = function (config, state) {
|
|
|
181
181
|
setField(updated, fields.end, getField(dragItem, fields.end));
|
|
182
182
|
newDataItems = updated;
|
|
183
183
|
}
|
|
184
|
+
setDragItem(null);
|
|
184
185
|
if (config.onDataAction && newDataItems) {
|
|
185
186
|
config.onDataAction.call(undefined, {
|
|
186
187
|
type: DATA_ACTION.update,
|
|
@@ -191,10 +192,9 @@ export var useDragItem = function (config, state) {
|
|
|
191
192
|
break;
|
|
192
193
|
}
|
|
193
194
|
default:
|
|
194
|
-
|
|
195
|
+
setDragItem(dragItem);
|
|
195
196
|
break;
|
|
196
197
|
}
|
|
197
|
-
setDragItem(newDragItem);
|
|
198
198
|
};
|
|
199
199
|
return [dragItem, setDragItem, handleDragItemAction];
|
|
200
200
|
};
|
|
@@ -5,7 +5,7 @@ export var packageMetadata = {
|
|
|
5
5
|
name: '@progress/kendo-react-scheduler',
|
|
6
6
|
productName: 'KendoReact',
|
|
7
7
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
8
|
-
publishDate:
|
|
8
|
+
publishDate: 1642077256,
|
|
9
9
|
version: '',
|
|
10
10
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
11
11
|
};
|
|
@@ -42,14 +42,15 @@ exports.useDragItem = function (config, state) {
|
|
|
42
42
|
var fields = context_1.useSchedulerFieldsContext();
|
|
43
43
|
var groups = context_1.useSchedulerGroupsContext();
|
|
44
44
|
var handleDragItemAction = function (action) {
|
|
45
|
-
var newDragItem;
|
|
46
45
|
switch (action.type) {
|
|
47
|
-
case DRAG_ITEM_ACTION.set:
|
|
48
|
-
|
|
46
|
+
case DRAG_ITEM_ACTION.set: {
|
|
47
|
+
setDragItem(action.payload);
|
|
49
48
|
break;
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
}
|
|
50
|
+
case DRAG_ITEM_ACTION.reset: {
|
|
51
|
+
setDragItem(null);
|
|
52
52
|
break;
|
|
53
|
+
}
|
|
53
54
|
case DRAG_ITEM_ACTION.dragSelected: {
|
|
54
55
|
if (Math.abs(initialXRef.current - action.payload.x) < 10
|
|
55
56
|
&& Math.abs(initialYRef.current - action.payload.y) < 10) {
|
|
@@ -82,7 +83,7 @@ exports.useDragItem = function (config, state) {
|
|
|
82
83
|
return selectedDataItem;
|
|
83
84
|
}).filter(Boolean);
|
|
84
85
|
oldSlot.current = slot;
|
|
85
|
-
|
|
86
|
+
setDragItem(newDragItems.slice());
|
|
86
87
|
break;
|
|
87
88
|
}
|
|
88
89
|
case DRAG_ITEM_ACTION.start: {
|
|
@@ -139,12 +140,12 @@ exports.useDragItem = function (config, state) {
|
|
|
139
140
|
}
|
|
140
141
|
oldSlot.current = slot;
|
|
141
142
|
if (dataItem_1) {
|
|
142
|
-
|
|
143
|
+
setDragItem(dataItem_1);
|
|
143
144
|
}
|
|
144
145
|
break;
|
|
145
146
|
}
|
|
146
147
|
case DRAG_ITEM_ACTION.complete: {
|
|
147
|
-
|
|
148
|
+
setDragItem(null);
|
|
148
149
|
if (config.onDataAction && dragItem) {
|
|
149
150
|
config.onDataAction.call(undefined, {
|
|
150
151
|
type: main_1.DATA_ACTION.update,
|
|
@@ -155,8 +156,8 @@ exports.useDragItem = function (config, state) {
|
|
|
155
156
|
break;
|
|
156
157
|
}
|
|
157
158
|
case DRAG_ITEM_ACTION.completeOccurrence: {
|
|
158
|
-
newDragItem = null;
|
|
159
159
|
var newDataItem = Array.isArray(dragItem) ? dragItem.slice() : kendo_react_common_1.clone(dragItem);
|
|
160
|
+
setDragItem(null);
|
|
160
161
|
if (config.onDataAction && dragItem) {
|
|
161
162
|
config.onDataAction.call(undefined, {
|
|
162
163
|
type: main_1.DATA_ACTION.update,
|
|
@@ -167,7 +168,6 @@ exports.useDragItem = function (config, state) {
|
|
|
167
168
|
break;
|
|
168
169
|
}
|
|
169
170
|
case DRAG_ITEM_ACTION.completeSeries: {
|
|
170
|
-
newDragItem = null;
|
|
171
171
|
var newDataItems = void 0;
|
|
172
172
|
if (Array.isArray(dragItem)) {
|
|
173
173
|
newDataItems = dragItem.map(function (di) {
|
|
@@ -183,6 +183,7 @@ exports.useDragItem = function (config, state) {
|
|
|
183
183
|
utils_1.setField(updated, fields.end, utils_1.getField(dragItem, fields.end));
|
|
184
184
|
newDataItems = updated;
|
|
185
185
|
}
|
|
186
|
+
setDragItem(null);
|
|
186
187
|
if (config.onDataAction && newDataItems) {
|
|
187
188
|
config.onDataAction.call(undefined, {
|
|
188
189
|
type: main_1.DATA_ACTION.update,
|
|
@@ -193,10 +194,9 @@ exports.useDragItem = function (config, state) {
|
|
|
193
194
|
break;
|
|
194
195
|
}
|
|
195
196
|
default:
|
|
196
|
-
|
|
197
|
+
setDragItem(dragItem);
|
|
197
198
|
break;
|
|
198
199
|
}
|
|
199
|
-
setDragItem(newDragItem);
|
|
200
200
|
};
|
|
201
201
|
return [dragItem, setDragItem, handleDragItemAction];
|
|
202
202
|
};
|
|
@@ -7,7 +7,7 @@ exports.packageMetadata = {
|
|
|
7
7
|
name: '@progress/kendo-react-scheduler',
|
|
8
8
|
productName: 'KendoReact',
|
|
9
9
|
productCodes: ['KENDOUIREACT', 'KENDOUICOMPLETE'],
|
|
10
|
-
publishDate:
|
|
10
|
+
publishDate: 1642077256,
|
|
11
11
|
version: '',
|
|
12
12
|
licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning'
|
|
13
13
|
};
|