@shakerquiz/utilities 0.5.9 → 0.5.11

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,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@shakerquiz/utilities",
4
- "version": "0.5.9",
4
+ "version": "0.5.11",
5
5
  "author": "yurkimus <yurkimus@gmail.com>",
6
6
  "license": "ISC",
7
7
  "scripts": {
@@ -0,0 +1,27 @@
1
+ export var CitiesMode = /** @type {const} */ ({
2
+ 'all': 'all',
3
+ 'many': 'many',
4
+ 'single': 'single',
5
+ 'none': 'none',
6
+ })
7
+
8
+ export var ModeTitle = {
9
+ [CitiesMode.all]: 'Все города',
10
+ [CitiesMode.many]: 'Несколько городов',
11
+ [CitiesMode.single]: 'Один город',
12
+ [CitiesMode.none]: 'Нет городов',
13
+ }
14
+
15
+ /**
16
+ * @param {*} value
17
+ */
18
+ export var getCitiesMode = value => {
19
+ if (value === 'all')
20
+ return CitiesMode.all
21
+ else if (value.length > 1)
22
+ return CitiesMode.many
23
+ else if (value.length === 1)
24
+ return CitiesMode.single
25
+ else
26
+ return CitiesMode.none
27
+ }
@@ -11,8 +11,8 @@ export var VenueStatusWeight = {
11
11
  }
12
12
 
13
13
  export var VenueStatusTitle = {
14
- [VenueStatus.ACTIVE]: 'В пользовании',
15
- [VenueStatus.ARCHIVE]: 'В архиве',
14
+ [VenueStatus.ACTIVE]: 'Активно',
15
+ [VenueStatus.ARCHIVE]: 'Архив',
16
16
  }
17
17
 
18
18
  export var VenueStatusColor = {
package/source/index.js CHANGED
@@ -11,6 +11,7 @@ export * from './enumerations/misc/icons.js'
11
11
  export * from './enumerations/misc/phases.js'
12
12
  export * from './enumerations/misc/regexps.js'
13
13
 
14
+ export * from './enumerations/entities/cities-mode.js'
14
15
  export * from './enumerations/entities/city-affilation.js'
15
16
  export * from './enumerations/entities/game-status.js'
16
17
  export * from './enumerations/entities/registration-attribute.js'