@shakerquiz/utilities 0.5.222 → 0.6.0

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.
Files changed (70) hide show
  1. package/package.json +3 -5
  2. package/source/entities/blend.js +5 -0
  3. package/source/entities/cardinality-routes.js +82 -0
  4. package/source/entities/cardinality.js +8 -0
  5. package/source/entities/category.js +4 -0
  6. package/source/entities/city-affilation.js +16 -0
  7. package/source/entities/city-chatapp-version.js +9 -0
  8. package/source/entities/game-status.js +110 -0
  9. package/source/{enumerations → entities}/gender.js +7 -0
  10. package/source/entities/icon.js +654 -0
  11. package/source/entities/method.js +22 -0
  12. package/source/entities/mode.js +14 -0
  13. package/source/entities/network.js +9 -0
  14. package/source/entities/numerosity.js +5 -0
  15. package/source/entities/phase.js +23 -0
  16. package/source/entities/quantifier.js +41 -0
  17. package/source/entities/registration-attribute.js +68 -0
  18. package/source/entities/registration-channel.js +17 -0
  19. package/source/entities/registration-lineup.js +19 -0
  20. package/source/entities/registration-mailing.js +20 -0
  21. package/source/{enumerations/registration/status.js → entities/registration-status.js} +1 -13
  22. package/source/entities/role.js +25 -0
  23. package/source/entities/route-cardinality-route.js +112 -0
  24. package/source/entities/route-cardinality.js +175 -0
  25. package/source/entities/route-pathname-params.js +12 -0
  26. package/source/entities/route-pathname.js +70 -0
  27. package/source/entities/route-service.js +65 -0
  28. package/source/entities/route.js +70 -0
  29. package/source/entities/service-routes.js +34 -0
  30. package/source/entities/service-runtime.js +22 -0
  31. package/source/entities/service.js +39 -0
  32. package/source/entities/theme-status.js +14 -0
  33. package/source/entities/venue-audience.js +14 -0
  34. package/source/entities/venue-status.js +15 -0
  35. package/source/helpers/hydrate-route-pathname.js +32 -0
  36. package/source/helpers/string-tag.js +7 -0
  37. package/source/helpers/tag.js +37 -0
  38. package/source/index.js +41 -38
  39. package/source/prototypes/reflection.js +53 -0
  40. package/source/enumerations/blend.js +0 -11
  41. package/source/enumerations/cardinality.js +0 -13
  42. package/source/enumerations/category.js +0 -9
  43. package/source/enumerations/entities/affilation.js +0 -29
  44. package/source/enumerations/entities/game-status.js +0 -122
  45. package/source/enumerations/entities/registration-attribute.js +0 -83
  46. package/source/enumerations/entities/registration-channel.js +0 -26
  47. package/source/enumerations/entities/registration-mailing.js +0 -24
  48. package/source/enumerations/entities/role.js +0 -40
  49. package/source/enumerations/entities/version.js +0 -23
  50. package/source/enumerations/icon.js +0 -655
  51. package/source/enumerations/method.js +0 -31
  52. package/source/enumerations/mode.js +0 -48
  53. package/source/enumerations/network.js +0 -9
  54. package/source/enumerations/numerosity.js +0 -5
  55. package/source/enumerations/phase.js +0 -31
  56. package/source/enumerations/quantifier.js +0 -87
  57. package/source/enumerations/registration/lineup.js +0 -33
  58. package/source/enumerations/route.js +0 -515
  59. package/source/enumerations/service.js +0 -62
  60. package/source/enumerations/theme/status.js +0 -27
  61. package/source/enumerations/venue/audience.js +0 -27
  62. package/source/enumerations/venue/status.js +0 -27
  63. package/source/functions/hydrate-route-params.js +0 -18
  64. package/source/functions/hydrate-route-pathname.js +0 -26
  65. package/source/functions/string-tag.js +0 -5
  66. package/source/functions/tag.js +0 -37
  67. /package/source/{enumerations → entities}/constants.js +0 -0
  68. /package/source/{enumerations → entities}/display.js +0 -0
  69. /package/source/{enumerations → entities}/pattern.js +0 -0
  70. /package/source/{enumerations → entities}/runtime.js +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@shakerquiz/utilities",
4
- "version": "0.5.222",
4
+ "version": "0.6.0",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "repository": {
@@ -9,8 +9,6 @@
9
9
  "url": "https://github.com/shaker-quiz/utilities.git"
10
10
  },
11
11
  "exports": {
12
- ".": {
13
- "default": "./source/index.js"
14
- }
12
+ "default": "./source/index.js"
15
13
  }
16
- }
14
+ }
@@ -0,0 +1,5 @@
1
+ export const Blend = Object.freeze({
2
+ 'Domain': 'Domain',
3
+ 'System': 'System',
4
+ 'Indifferent': 'Indifferent',
5
+ })
@@ -0,0 +1,82 @@
1
+ import { Cardinality } from './cardinality.js'
2
+ import { Route } from './route.js'
3
+
4
+ export const CardinalityRoutes = Object.freeze({
5
+ [Cardinality['1']]: Object.freeze([
6
+ Route['checkin'],
7
+ Route['city'],
8
+ Route['country'],
9
+ Route['currency'],
10
+ Route['game'],
11
+ Route['game/registrations/export'],
12
+ Route['games/registrations/export'],
13
+ Route['registration'],
14
+ Route['registration/export'],
15
+ Route['registrations/export'],
16
+ Route['role'],
17
+ Route['theme'],
18
+ Route['timezone'],
19
+ Route['user'],
20
+ Route['venue'],
21
+ ]),
22
+
23
+ [Cardinality['1-1']]: Object.freeze([
24
+ Route['city/country'],
25
+ Route['city/currency'],
26
+ Route['city/timezone'],
27
+ Route['city/venue'],
28
+ Route['game/city'],
29
+ Route['game/registration'],
30
+ Route['game/summary'],
31
+ Route['game/theme'],
32
+ Route['game/venue'],
33
+ Route['registration/city'],
34
+ Route['registration/game/theme'],
35
+ Route['theme/cover'],
36
+ Route['user/city'],
37
+ Route['user/password'],
38
+ Route['user/role'],
39
+ Route['venue/city'],
40
+ ]),
41
+
42
+ [Cardinality['1-N']]: Object.freeze([
43
+ Route['city/venues'],
44
+ Route['game/registrations'],
45
+ Route['user/cities'],
46
+ ]),
47
+
48
+ [Cardinality['N']]: Object.freeze([
49
+ Route['cities'],
50
+ Route['countries'],
51
+ Route['currencies'],
52
+ Route['games'],
53
+ Route['registrations'],
54
+ Route['roles'],
55
+ Route['themes'],
56
+ Route['timezones'],
57
+ Route['users'],
58
+ Route['venues'],
59
+ ]),
60
+
61
+ [Cardinality['N-1']]: Object.freeze([
62
+ Route['cities/country'],
63
+ Route['cities/currency'],
64
+ Route['cities/timezone'],
65
+ Route['games/city'],
66
+ Route['games/summary'],
67
+ Route['games/theme'],
68
+ Route['games/venue'],
69
+ Route['registrations/city'],
70
+ Route['registrations/game'],
71
+ Route['registrations/game/theme'],
72
+ Route['themes/cover'],
73
+ Route['users/role'],
74
+ Route['venues/city'],
75
+ ]),
76
+
77
+ [Cardinality['N-N']]: Object.freeze([
78
+ Route['cities/venues'],
79
+ Route['games/registrations'],
80
+ Route['users/cities'],
81
+ ]),
82
+ })
@@ -0,0 +1,8 @@
1
+ export const Cardinality = Object.freeze({
2
+ '1': '1',
3
+ '1-1': '1-1',
4
+ '1-N': '1-N',
5
+ 'N': 'N',
6
+ 'N-1': 'N-1',
7
+ 'N-N': 'N-N',
8
+ })
@@ -0,0 +1,4 @@
1
+ export const Category = Object.freeze({
2
+ 'Active': 'Active',
3
+ 'Rest': 'Rest',
4
+ })
@@ -0,0 +1,16 @@
1
+ export const CityAffilation = Object.freeze({
2
+ 'Branch': 'Branch',
3
+ 'Franchise': 'Franchise',
4
+ })
5
+
6
+ /** @satisfies {Array<keyof typeof CityAffilation>} */
7
+ export const CityAffilations = Object.freeze([
8
+ 'Branch',
9
+ 'Franchise',
10
+ ])
11
+
12
+ /** @satisfies {Record<keyof typeof CityAffilation, string>} */
13
+ export const CityAffilationIcon = Object.freeze({
14
+ 'Branch': 'hero/outline/building-office-2',
15
+ 'Franchise': 'hero/outline/building-storefront',
16
+ })
@@ -0,0 +1,9 @@
1
+ export const CityChatappVersion = Object.freeze({
2
+ 'Latest': 'Latest',
3
+ 'Legacy': 'Legacy',
4
+ })
5
+
6
+ export const CityChatappVersions = Object.freeze([
7
+ 'Latest',
8
+ 'Legacy',
9
+ ])
@@ -0,0 +1,110 @@
1
+ import { Category } from './category.js'
2
+ import { Mode } from './mode.js'
3
+ import { Role } from './role.js'
4
+
5
+ export const GameStatus = Object.freeze({
6
+ 'REJECTED': 'REJECTED',
7
+ 'MODERATION': 'MODERATION',
8
+ 'APPROVED': 'APPROVED',
9
+ 'CLOSED': 'CLOSED',
10
+ 'FORINVITES': 'FORINVITES',
11
+ 'PUBLISHED': 'PUBLISHED',
12
+ 'IS_RESERVE': 'IS_RESERVE',
13
+ 'FINISHED': 'FINISHED',
14
+ 'ARCHIVE': 'ARCHIVE',
15
+ })
16
+
17
+ export const GameStatuses = Object.freeze(Object.values(GameStatus))
18
+
19
+ export const GameStatusIcon = Object.freeze({
20
+ 'REJECTED': 'hero/outline/x-mark',
21
+ 'MODERATION': 'hero/outline/clock',
22
+ 'APPROVED': 'hero/outline/hand-thumb-up',
23
+ 'CLOSED': 'hero/outline/exclamation-triangle',
24
+ 'FORINVITES': 'hero/outline/lock-closed',
25
+ 'PUBLISHED': 'hero/outline/check-circle',
26
+ 'IS_RESERVE': 'hero/outline/user-plus',
27
+ 'FINISHED': 'hero/outline/check',
28
+ 'ARCHIVE': 'hero/outline/archive-box',
29
+ })
30
+
31
+ export const RoleGameStatusGameStatuses = Object.freeze({
32
+ [Role['admin']]: Object.freeze({}),
33
+
34
+ [Role['organizer']]: Object.freeze({
35
+ 'APPROVED': Object.freeze([
36
+ 'APPROVED',
37
+ 'CLOSED',
38
+ 'FORINVITES',
39
+ 'PUBLISHED',
40
+ 'IS_RESERVE',
41
+ 'FINISHED',
42
+ 'ARCHIVE',
43
+ ]),
44
+
45
+ 'MODERATION': Object.freeze([
46
+ 'MODERATION',
47
+ ]),
48
+
49
+ 'REJECTED': Object.freeze([
50
+ 'REJECTED',
51
+ 'MODERATION',
52
+ ]),
53
+ }),
54
+
55
+ [Mode['Unknown']]: Object.freeze({}),
56
+ })
57
+
58
+ export const RoleGameStatuses = Object.freeze({
59
+ [Role['admin']]: Object.freeze([
60
+ 'APPROVED',
61
+ 'ARCHIVE',
62
+ 'CLOSED',
63
+ 'FINISHED',
64
+ 'FORINVITES',
65
+ 'IS_RESERVE',
66
+ 'MODERATION',
67
+ 'PUBLISHED',
68
+ 'REJECTED',
69
+ ]),
70
+
71
+ [Role['organizer']]: Object.freeze([
72
+ 'ARCHIVE',
73
+ 'CLOSED',
74
+ 'FINISHED',
75
+ 'FORINVITES',
76
+ 'IS_RESERVE',
77
+ 'PUBLISHED',
78
+ ]),
79
+
80
+ [Mode['Unknown']]: Object.freeze([]),
81
+ })
82
+
83
+ export const CategoryGameStatuses = Object.freeze({
84
+ [Category['Active']]: Object.freeze([
85
+ 'CLOSED',
86
+ 'FORINVITES',
87
+ 'IS_RESERVE',
88
+ 'PUBLISHED',
89
+ ]),
90
+
91
+ 'REJECTED': Object.freeze([
92
+ 'REJECTED',
93
+ ]),
94
+
95
+ 'MODERATION': Object.freeze([
96
+ 'MODERATION',
97
+ ]),
98
+
99
+ 'APPROVED': Object.freeze([
100
+ 'APPROVED',
101
+ ]),
102
+
103
+ 'FINISHED': Object.freeze([
104
+ 'FINISHED',
105
+ ]),
106
+
107
+ 'ARCHIVE': Object.freeze([
108
+ 'ARCHIVE',
109
+ ]),
110
+ })
@@ -4,3 +4,10 @@ export const Gender = Object.freeze({
4
4
  'Neuter': 'Neuter',
5
5
  'Indeterminate': 'Indeterminate',
6
6
  })
7
+
8
+ export const Genders = Object.freeze([
9
+ 'Masculine',
10
+ 'Feminine',
11
+ 'Neuter',
12
+ 'Indeterminate',
13
+ ])