@shakerquiz/utilities 4.0.100 → 4.0.102
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
|
@@ -5,6 +5,7 @@ import { Role } from './role.js'
|
|
|
5
5
|
export const GameStatus = /** @type {const} */ ({
|
|
6
6
|
'Approve': 'Approve',
|
|
7
7
|
'Archive': 'Archive',
|
|
8
|
+
'Cancel': 'Cancel',
|
|
8
9
|
'Close': 'Close',
|
|
9
10
|
'Finish': 'Finish',
|
|
10
11
|
'Invite': 'Invite',
|
|
@@ -21,6 +22,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
21
22
|
[GameStatus['Approve']]: Object.freeze([
|
|
22
23
|
GameStatus['Approve'],
|
|
23
24
|
GameStatus['Archive'],
|
|
25
|
+
GameStatus['Cancel'],
|
|
24
26
|
GameStatus['Close'],
|
|
25
27
|
GameStatus['Finish'],
|
|
26
28
|
GameStatus['Invite'],
|
|
@@ -33,6 +35,20 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
33
35
|
[GameStatus['Archive']]: Object.freeze([
|
|
34
36
|
GameStatus['Approve'],
|
|
35
37
|
GameStatus['Archive'],
|
|
38
|
+
GameStatus['Cancel'],
|
|
39
|
+
GameStatus['Close'],
|
|
40
|
+
GameStatus['Finish'],
|
|
41
|
+
GameStatus['Invite'],
|
|
42
|
+
GameStatus['Reserve'],
|
|
43
|
+
GameStatus['Moderate'],
|
|
44
|
+
GameStatus['Publish'],
|
|
45
|
+
GameStatus['Reject'],
|
|
46
|
+
]),
|
|
47
|
+
|
|
48
|
+
[GameStatus['Cancel']]: Object.freeze([
|
|
49
|
+
GameStatus['Approve'],
|
|
50
|
+
GameStatus['Archive'],
|
|
51
|
+
GameStatus['Cancel'],
|
|
36
52
|
GameStatus['Close'],
|
|
37
53
|
GameStatus['Finish'],
|
|
38
54
|
GameStatus['Invite'],
|
|
@@ -45,6 +61,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
45
61
|
[GameStatus['Close']]: Object.freeze([
|
|
46
62
|
GameStatus['Approve'],
|
|
47
63
|
GameStatus['Archive'],
|
|
64
|
+
GameStatus['Cancel'],
|
|
48
65
|
GameStatus['Close'],
|
|
49
66
|
GameStatus['Finish'],
|
|
50
67
|
GameStatus['Invite'],
|
|
@@ -57,6 +74,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
57
74
|
[GameStatus['Finish']]: Object.freeze([
|
|
58
75
|
GameStatus['Approve'],
|
|
59
76
|
GameStatus['Archive'],
|
|
77
|
+
GameStatus['Cancel'],
|
|
60
78
|
GameStatus['Close'],
|
|
61
79
|
GameStatus['Finish'],
|
|
62
80
|
GameStatus['Invite'],
|
|
@@ -69,6 +87,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
69
87
|
[GameStatus['Invite']]: Object.freeze([
|
|
70
88
|
GameStatus['Approve'],
|
|
71
89
|
GameStatus['Archive'],
|
|
90
|
+
GameStatus['Cancel'],
|
|
72
91
|
GameStatus['Close'],
|
|
73
92
|
GameStatus['Finish'],
|
|
74
93
|
GameStatus['Invite'],
|
|
@@ -81,6 +100,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
81
100
|
[GameStatus['Reserve']]: Object.freeze([
|
|
82
101
|
GameStatus['Approve'],
|
|
83
102
|
GameStatus['Archive'],
|
|
103
|
+
GameStatus['Cancel'],
|
|
84
104
|
GameStatus['Close'],
|
|
85
105
|
GameStatus['Finish'],
|
|
86
106
|
GameStatus['Invite'],
|
|
@@ -93,6 +113,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
93
113
|
[GameStatus['Moderate']]: Object.freeze([
|
|
94
114
|
GameStatus['Approve'],
|
|
95
115
|
GameStatus['Archive'],
|
|
116
|
+
GameStatus['Cancel'],
|
|
96
117
|
GameStatus['Close'],
|
|
97
118
|
GameStatus['Finish'],
|
|
98
119
|
GameStatus['Invite'],
|
|
@@ -105,6 +126,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
105
126
|
[GameStatus['Publish']]: Object.freeze([
|
|
106
127
|
GameStatus['Approve'],
|
|
107
128
|
GameStatus['Archive'],
|
|
129
|
+
GameStatus['Cancel'],
|
|
108
130
|
GameStatus['Close'],
|
|
109
131
|
GameStatus['Finish'],
|
|
110
132
|
GameStatus['Invite'],
|
|
@@ -117,6 +139,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
117
139
|
[GameStatus['Reject']]: Object.freeze([
|
|
118
140
|
GameStatus['Approve'],
|
|
119
141
|
GameStatus['Archive'],
|
|
142
|
+
GameStatus['Cancel'],
|
|
120
143
|
GameStatus['Close'],
|
|
121
144
|
GameStatus['Finish'],
|
|
122
145
|
GameStatus['Invite'],
|
|
@@ -129,6 +152,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
129
152
|
|
|
130
153
|
[Role['Organizer']]: Object.freeze({
|
|
131
154
|
[GameStatus['Approve']]: Object.freeze([
|
|
155
|
+
GameStatus['Cancel'],
|
|
132
156
|
GameStatus['Close'],
|
|
133
157
|
GameStatus['Invite'],
|
|
134
158
|
GameStatus['Publish'],
|
|
@@ -137,7 +161,15 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
137
161
|
|
|
138
162
|
[GameStatus['Archive']]: Object.freeze([]),
|
|
139
163
|
|
|
164
|
+
[GameStatus['Cancel']]: Object.freeze([
|
|
165
|
+
GameStatus['Close'],
|
|
166
|
+
GameStatus['Invite'],
|
|
167
|
+
GameStatus['Publish'],
|
|
168
|
+
GameStatus['Reserve'],
|
|
169
|
+
]),
|
|
170
|
+
|
|
140
171
|
[GameStatus['Close']]: Object.freeze([
|
|
172
|
+
GameStatus['Cancel'],
|
|
141
173
|
GameStatus['Publish'],
|
|
142
174
|
GameStatus['Invite'],
|
|
143
175
|
GameStatus['Reserve'],
|
|
@@ -146,12 +178,14 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
146
178
|
[GameStatus['Finish']]: Object.freeze([]),
|
|
147
179
|
|
|
148
180
|
[GameStatus['Invite']]: Object.freeze([
|
|
181
|
+
GameStatus['Cancel'],
|
|
149
182
|
GameStatus['Close'],
|
|
150
183
|
GameStatus['Publish'],
|
|
151
184
|
GameStatus['Reserve'],
|
|
152
185
|
]),
|
|
153
186
|
|
|
154
187
|
[GameStatus['Reserve']]: Object.freeze([
|
|
188
|
+
GameStatus['Cancel'],
|
|
155
189
|
GameStatus['Close'],
|
|
156
190
|
GameStatus['Invite'],
|
|
157
191
|
GameStatus['Publish'],
|
|
@@ -160,6 +194,7 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
160
194
|
[GameStatus['Moderate']]: Object.freeze([]),
|
|
161
195
|
|
|
162
196
|
[GameStatus['Publish']]: Object.freeze([
|
|
197
|
+
GameStatus['Cancel'],
|
|
163
198
|
GameStatus['Close'],
|
|
164
199
|
GameStatus['Invite'],
|
|
165
200
|
GameStatus['Reserve'],
|
|
@@ -175,6 +210,8 @@ export const RoleGameStatusGameStatuses = Object.freeze({
|
|
|
175
210
|
|
|
176
211
|
[GameStatus['Archive']]: Object.freeze([]),
|
|
177
212
|
|
|
213
|
+
[GameStatus['Cancel']]: Object.freeze([]),
|
|
214
|
+
|
|
178
215
|
[GameStatus['Close']]: Object.freeze([]),
|
|
179
216
|
|
|
180
217
|
[GameStatus['Finish']]: Object.freeze([]),
|
|
@@ -195,6 +232,7 @@ export const RoleGameStatuses = Object.freeze({
|
|
|
195
232
|
[Role['Admin']]: Object.freeze([
|
|
196
233
|
GameStatus['Approve'],
|
|
197
234
|
GameStatus['Archive'],
|
|
235
|
+
GameStatus['Cancel'],
|
|
198
236
|
GameStatus['Close'],
|
|
199
237
|
GameStatus['Finish'],
|
|
200
238
|
GameStatus['Invite'],
|
|
@@ -206,6 +244,7 @@ export const RoleGameStatuses = Object.freeze({
|
|
|
206
244
|
|
|
207
245
|
[Role['Organizer']]: Object.freeze([
|
|
208
246
|
GameStatus['Archive'],
|
|
247
|
+
GameStatus['Cancel'],
|
|
209
248
|
GameStatus['Close'],
|
|
210
249
|
GameStatus['Finish'],
|
|
211
250
|
GameStatus['Invite'],
|
|
@@ -237,6 +276,10 @@ export const CategoryGameStatuses = Object.freeze({
|
|
|
237
276
|
GameStatus['Approve'],
|
|
238
277
|
]),
|
|
239
278
|
|
|
279
|
+
[GameStatus['Cancel']]: Object.freeze([
|
|
280
|
+
GameStatus['Cancel'],
|
|
281
|
+
]),
|
|
282
|
+
|
|
240
283
|
[GameStatus['Finish']]: Object.freeze([
|
|
241
284
|
GameStatus['Finish'],
|
|
242
285
|
]),
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Quantifier } from './quantifier.js'
|
|
2
|
+
|
|
3
|
+
export const GameVisibility = /** @type {const} */ ({
|
|
4
|
+
'Visible': 'Visible',
|
|
5
|
+
'Hidden': 'Hidden',
|
|
6
|
+
})
|
|
7
|
+
|
|
8
|
+
export const GameVisibilities = Object.values(GameVisibility)
|
|
9
|
+
|
|
10
|
+
export const CategoryGameVisibilities = /** @type {const} */ ({
|
|
11
|
+
[Quantifier['Any']]: [
|
|
12
|
+
GameVisibility['Visible'],
|
|
13
|
+
GameVisibility['Hidden'],
|
|
14
|
+
],
|
|
15
|
+
|
|
16
|
+
[GameVisibility['Visible']]: [
|
|
17
|
+
GameVisibility['Visible'],
|
|
18
|
+
],
|
|
19
|
+
|
|
20
|
+
[GameVisibility['Hidden']]: [
|
|
21
|
+
GameVisibility['Hidden'],
|
|
22
|
+
],
|
|
23
|
+
})
|
package/source/index.js
CHANGED
|
@@ -7,6 +7,7 @@ export * from './entities/city-chatapp-version.js'
|
|
|
7
7
|
export * from './entities/constants.js'
|
|
8
8
|
export * from './entities/display.js'
|
|
9
9
|
export * from './entities/game-status.js'
|
|
10
|
+
export * from './entities/game-visibility.js'
|
|
10
11
|
export * from './entities/gender.js'
|
|
11
12
|
export * from './entities/icon.js'
|
|
12
13
|
export * from './entities/interval.js'
|