@shakerquiz/utilities 0.5.188 → 0.5.190
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/package.json
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Category } from '../category.js'
|
|
2
|
+
import { Mode } from '../mode.js'
|
|
1
3
|
import { Role } from './role.js'
|
|
2
4
|
|
|
3
|
-
export
|
|
5
|
+
export const GameStatus = Object.freeze({
|
|
4
6
|
'REJECTED': 'REJECTED',
|
|
5
7
|
'MODERATION': 'MODERATION',
|
|
6
8
|
'APPROVED': 'APPROVED',
|
|
@@ -12,119 +14,89 @@ export var GameStatus = /** @type {const} */ ({
|
|
|
12
14
|
'ARCHIVE': 'ARCHIVE',
|
|
13
15
|
})
|
|
14
16
|
|
|
15
|
-
export
|
|
17
|
+
export const GameStatuses = Object.freeze(Object.values(GameStatus))
|
|
16
18
|
|
|
17
|
-
export
|
|
18
|
-
[GameStatus
|
|
19
|
-
[GameStatus
|
|
20
|
-
[GameStatus
|
|
21
|
-
[GameStatus
|
|
22
|
-
[GameStatus
|
|
23
|
-
[GameStatus
|
|
24
|
-
[GameStatus
|
|
25
|
-
[GameStatus
|
|
26
|
-
[GameStatus
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export var GameStatusTitle = {
|
|
30
|
-
[GameStatus.REJECTED]: 'Отклонено',
|
|
31
|
-
[GameStatus.MODERATION]: 'На проверке',
|
|
32
|
-
[GameStatus.APPROVED]: 'Одобрено',
|
|
33
|
-
[GameStatus.CLOSED]: 'Закрыта',
|
|
34
|
-
[GameStatus.FORINVITES]: 'По приглашению',
|
|
35
|
-
[GameStatus.PUBLISHED]: 'Опубликовано',
|
|
36
|
-
[GameStatus.IS_RESERVE]: 'В резерве',
|
|
37
|
-
[GameStatus.FINISHED]: 'Завершено',
|
|
38
|
-
[GameStatus.ARCHIVE]: 'В архиве',
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export var GameStatusColor = {
|
|
42
|
-
[GameStatus.REJECTED]: 'danger',
|
|
43
|
-
[GameStatus.MODERATION]: 'primary',
|
|
44
|
-
[GameStatus.APPROVED]: 'success',
|
|
45
|
-
[GameStatus.CLOSED]: 'warning',
|
|
46
|
-
[GameStatus.FORINVITES]: 'current',
|
|
47
|
-
[GameStatus.PUBLISHED]: 'secondary',
|
|
48
|
-
[GameStatus.IS_RESERVE]: 'blue-900',
|
|
49
|
-
[GameStatus.FINISHED]: 'success',
|
|
50
|
-
[GameStatus.ARCHIVE]: 'current',
|
|
51
|
-
}
|
|
19
|
+
export const GameStatusTitle = Object.freeze({
|
|
20
|
+
[GameStatus['REJECTED']]: 'Отклонено',
|
|
21
|
+
[GameStatus['MODERATION']]: 'На проверке',
|
|
22
|
+
[GameStatus['APPROVED']]: 'Одобрено',
|
|
23
|
+
[GameStatus['CLOSED']]: 'Закрыта',
|
|
24
|
+
[GameStatus['FORINVITES']]: 'По приглашению',
|
|
25
|
+
[GameStatus['PUBLISHED']]: 'Опубликовано',
|
|
26
|
+
[GameStatus['IS_RESERVE']]: 'В резерве',
|
|
27
|
+
[GameStatus['FINISHED']]: 'Завершено',
|
|
28
|
+
[GameStatus['ARCHIVE']]: 'В архиве',
|
|
29
|
+
})
|
|
52
30
|
|
|
53
|
-
export
|
|
54
|
-
[GameStatus
|
|
55
|
-
[GameStatus
|
|
56
|
-
[GameStatus
|
|
57
|
-
[GameStatus
|
|
58
|
-
[GameStatus
|
|
59
|
-
[GameStatus
|
|
60
|
-
[GameStatus
|
|
61
|
-
[GameStatus
|
|
62
|
-
[GameStatus
|
|
63
|
-
}
|
|
31
|
+
export const GameStatusIcon = Object.freeze({
|
|
32
|
+
[GameStatus['REJECTED']]: 'hero/outline/x-mark',
|
|
33
|
+
[GameStatus['MODERATION']]: 'hero/outline/clock',
|
|
34
|
+
[GameStatus['APPROVED']]: 'hero/outline/hand-thumb-up',
|
|
35
|
+
[GameStatus['CLOSED']]: 'hero/outline/exclamation-triangle',
|
|
36
|
+
[GameStatus['FORINVITES']]: 'hero/outline/lock-closed',
|
|
37
|
+
[GameStatus['PUBLISHED']]: 'hero/outline/check-circle',
|
|
38
|
+
[GameStatus['IS_RESERVE']]: 'hero/outline/user-plus',
|
|
39
|
+
[GameStatus['FINISHED']]: 'hero/outline/check',
|
|
40
|
+
[GameStatus['ARCHIVE']]: 'hero/outline/archive-box',
|
|
41
|
+
})
|
|
64
42
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
[GameStatus.REJECTED]: 'hero/outline/x-mark',
|
|
68
|
-
[GameStatus.MODERATION]: 'hero/outline/clock',
|
|
69
|
-
[GameStatus.APPROVED]: 'hero/outline/hand-thumb-up',
|
|
70
|
-
[GameStatus.CLOSED]: 'hero/outline/exclamation-triangle',
|
|
71
|
-
[GameStatus.FORINVITES]: 'hero/outline/lock-closed',
|
|
72
|
-
[GameStatus.PUBLISHED]: 'hero/outline/check-circle',
|
|
73
|
-
[GameStatus.IS_RESERVE]: 'hero/outline/user-plus',
|
|
74
|
-
[GameStatus.FINISHED]: 'hero/outline/check',
|
|
75
|
-
[GameStatus.ARCHIVE]: 'hero/outline/archive-box',
|
|
76
|
-
}
|
|
43
|
+
export const RoleGameStatusGameStatuses = Object.freeze({
|
|
44
|
+
[Role['admin']]: Object.freeze({}),
|
|
77
45
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
46
|
+
[Role['organizer']]: Object.freeze({
|
|
47
|
+
[GameStatus['APPROVED']]: Object.freeze([
|
|
48
|
+
GameStatus['APPROVED'],
|
|
49
|
+
GameStatus['CLOSED'],
|
|
50
|
+
GameStatus['FORINVITES'],
|
|
51
|
+
GameStatus['PUBLISHED'],
|
|
52
|
+
GameStatus['IS_RESERVE'],
|
|
53
|
+
GameStatus['FINISHED'],
|
|
54
|
+
GameStatus['ARCHIVE'],
|
|
55
|
+
]),
|
|
81
56
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
GameStatus.CLOSED,
|
|
86
|
-
GameStatus.FORINVITES,
|
|
87
|
-
GameStatus.PUBLISHED,
|
|
88
|
-
GameStatus.IS_RESERVE,
|
|
89
|
-
GameStatus.FINISHED,
|
|
90
|
-
GameStatus.ARCHIVE,
|
|
91
|
-
],
|
|
57
|
+
[GameStatus['MODERATION']]: Object.freeze([
|
|
58
|
+
GameStatus['MODERATION'],
|
|
59
|
+
]),
|
|
92
60
|
|
|
93
|
-
[GameStatus
|
|
94
|
-
GameStatus
|
|
95
|
-
|
|
61
|
+
[GameStatus['REJECTED']]: Object.freeze([
|
|
62
|
+
GameStatus['REJECTED'],
|
|
63
|
+
GameStatus['MODERATION'],
|
|
64
|
+
]),
|
|
65
|
+
}),
|
|
96
66
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
GameStatus.MODERATION,
|
|
100
|
-
],
|
|
101
|
-
},
|
|
67
|
+
[Mode['Unknown']]: Object.freeze({}),
|
|
68
|
+
})
|
|
102
69
|
|
|
103
|
-
|
|
104
|
-
|
|
70
|
+
export const RoleGameStatuses = Object.freeze({
|
|
71
|
+
[Role['admin']]: Object.freeze([
|
|
72
|
+
GameStatus['APPROVED'],
|
|
73
|
+
GameStatus['ARCHIVE'],
|
|
74
|
+
GameStatus['CLOSED'],
|
|
75
|
+
GameStatus['FINISHED'],
|
|
76
|
+
GameStatus['FORINVITES'],
|
|
77
|
+
GameStatus['IS_RESERVE'],
|
|
78
|
+
GameStatus['MODERATION'],
|
|
79
|
+
GameStatus['PUBLISHED'],
|
|
80
|
+
GameStatus['REJECTED'],
|
|
81
|
+
]),
|
|
105
82
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
'
|
|
110
|
-
'
|
|
111
|
-
'
|
|
112
|
-
'
|
|
113
|
-
|
|
114
|
-
'IS_RESERVE',
|
|
115
|
-
'MODERATION',
|
|
116
|
-
'PUBLISHED',
|
|
117
|
-
'REJECTED',
|
|
118
|
-
],
|
|
83
|
+
[Role['organizer']]: Object.freeze([
|
|
84
|
+
GameStatus['ARCHIVE'],
|
|
85
|
+
GameStatus['CLOSED'],
|
|
86
|
+
GameStatus['FINISHED'],
|
|
87
|
+
GameStatus['FORINVITES'],
|
|
88
|
+
GameStatus['IS_RESERVE'],
|
|
89
|
+
GameStatus['PUBLISHED'],
|
|
90
|
+
]),
|
|
119
91
|
|
|
120
|
-
[
|
|
121
|
-
|
|
122
|
-
'CLOSED',
|
|
123
|
-
'FINISHED',
|
|
124
|
-
'FORINVITES',
|
|
125
|
-
'IS_RESERVE',
|
|
126
|
-
'PUBLISHED',
|
|
127
|
-
],
|
|
92
|
+
[Mode['Unknown']]: Object.freeze([]),
|
|
93
|
+
})
|
|
128
94
|
|
|
129
|
-
|
|
130
|
-
|
|
95
|
+
export const CategoryGameStatuses = Object.freeze({
|
|
96
|
+
[Category['Active']]: Object.freeze([
|
|
97
|
+
GameStatus['CLOSED'],
|
|
98
|
+
GameStatus['FORINVITES'],
|
|
99
|
+
GameStatus['IS_RESERVE'],
|
|
100
|
+
GameStatus['PUBLISHED'],
|
|
101
|
+
]),
|
|
102
|
+
})
|
package/source/index.js
CHANGED