authscape 1.0.572 → 1.0.573
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/index.js +1035 -3165
- package/package.json +1 -3
- package/src/components/stripe/StripePayment.js +3 -6
- package/src/components/kanban/Action.js +0 -25
- package/src/components/kanban/Container.js +0 -77
- package/src/components/kanban/Handle.js +0 -24
- package/src/components/kanban/Item.js +0 -149
- package/src/components/kanban/Kanban.js +0 -917
- package/src/components/kanban/Remove.js +0 -23
- package/src/components/kanban/createRange.js +0 -5
- package/src/components/kanban/multipleContainersKeyboardCoordinates.js +0 -114
- package/src/components/users/UserEditor.js +0 -590
- package/src/components/users/UserManagement.js +0 -186
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import DeleteRoundedIcon from '@mui/icons-material/DeleteRounded';
|
|
3
|
-
|
|
4
|
-
/// use in testing
|
|
5
|
-
// import {Action} from './Action';
|
|
6
|
-
|
|
7
|
-
const removeIcon = () => {
|
|
8
|
-
return <DeleteRoundedIcon/>
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export function Remove(props) {
|
|
12
|
-
return (
|
|
13
|
-
<Action
|
|
14
|
-
icon={removeIcon}
|
|
15
|
-
{...props}
|
|
16
|
-
active={{
|
|
17
|
-
fill: 'rgba(255, 70, 70, 0.95)',
|
|
18
|
-
background: 'rgba(255, 70, 70, 0.1)',
|
|
19
|
-
}}
|
|
20
|
-
>
|
|
21
|
-
</Action>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
closestCorners,
|
|
3
|
-
getFirstCollision,
|
|
4
|
-
KeyboardCode,
|
|
5
|
-
DroppableContainer,
|
|
6
|
-
KeyboardCoordinateGetter,
|
|
7
|
-
} from '@dnd-kit/core';
|
|
8
|
-
|
|
9
|
-
const directions = [
|
|
10
|
-
KeyboardCode.Down,
|
|
11
|
-
KeyboardCode.Right,
|
|
12
|
-
KeyboardCode.Up,
|
|
13
|
-
KeyboardCode.Left,
|
|
14
|
-
];
|
|
15
|
-
|
|
16
|
-
export const multipleContainersCoordinateGetter = (
|
|
17
|
-
event,
|
|
18
|
-
{context: {active, droppableRects, droppableContainers, collisionRect}}
|
|
19
|
-
) => {
|
|
20
|
-
if (directions.includes(event.code)) {
|
|
21
|
-
event.preventDefault();
|
|
22
|
-
|
|
23
|
-
if (!active || !collisionRect) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
const filteredContainers = [];
|
|
28
|
-
|
|
29
|
-
droppableContainers.getEnabled().forEach((entry) => {
|
|
30
|
-
if (!entry || entry?.disabled) {
|
|
31
|
-
return;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const rect = droppableRects.get(entry.id);
|
|
35
|
-
|
|
36
|
-
if (!rect) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const data = entry.data.current;
|
|
41
|
-
|
|
42
|
-
if (data) {
|
|
43
|
-
const {type, children} = data;
|
|
44
|
-
|
|
45
|
-
if (type === 'container' && children?.length > 0) {
|
|
46
|
-
if (active.data.current?.type !== 'container') {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
switch (event.code) {
|
|
53
|
-
case KeyboardCode.Down:
|
|
54
|
-
if (collisionRect.top < rect.top) {
|
|
55
|
-
filteredContainers.push(entry);
|
|
56
|
-
}
|
|
57
|
-
break;
|
|
58
|
-
case KeyboardCode.Up:
|
|
59
|
-
if (collisionRect.top > rect.top) {
|
|
60
|
-
filteredContainers.push(entry);
|
|
61
|
-
}
|
|
62
|
-
break;
|
|
63
|
-
case KeyboardCode.Left:
|
|
64
|
-
if (collisionRect.left >= rect.left + rect.width) {
|
|
65
|
-
filteredContainers.push(entry);
|
|
66
|
-
}
|
|
67
|
-
break;
|
|
68
|
-
case KeyboardCode.Right:
|
|
69
|
-
if (collisionRect.left + collisionRect.width <= rect.left) {
|
|
70
|
-
filteredContainers.push(entry);
|
|
71
|
-
}
|
|
72
|
-
break;
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
const collisions = closestCorners({
|
|
77
|
-
active,
|
|
78
|
-
collisionRect: collisionRect,
|
|
79
|
-
droppableRects,
|
|
80
|
-
droppableContainers: filteredContainers,
|
|
81
|
-
pointerCoordinates: null,
|
|
82
|
-
});
|
|
83
|
-
const closestId = getFirstCollision(collisions, 'id');
|
|
84
|
-
|
|
85
|
-
if (closestId != null) {
|
|
86
|
-
const newDroppable = droppableContainers.get(closestId);
|
|
87
|
-
const newNode = newDroppable?.node.current;
|
|
88
|
-
const newRect = newDroppable?.rect.current;
|
|
89
|
-
|
|
90
|
-
if (newNode && newRect) {
|
|
91
|
-
if (newDroppable.id === 'placeholder') {
|
|
92
|
-
return {
|
|
93
|
-
x: newRect.left + (newRect.width - collisionRect.width) / 2,
|
|
94
|
-
y: newRect.top + (newRect.height - collisionRect.height) / 2,
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (newDroppable.data.current?.type === 'container') {
|
|
99
|
-
return {
|
|
100
|
-
x: newRect.left + 20,
|
|
101
|
-
y: newRect.top + 74,
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
return {
|
|
106
|
-
x: newRect.left,
|
|
107
|
-
y: newRect.top,
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
return undefined;
|
|
114
|
-
};
|