@shakerquiz/utilities 0.5.218 → 0.5.220
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
|
@@ -3,22 +3,22 @@ export const Affilation = Object.freeze({
|
|
|
3
3
|
'Franchise': 'Franchise',
|
|
4
4
|
})
|
|
5
5
|
|
|
6
|
+
/** @satisfies {Array<keyof typeof Affilation>} */
|
|
6
7
|
export const Affilations = Object.freeze([
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
'Unknown',
|
|
8
|
+
'Branch',
|
|
9
|
+
'Franchise',
|
|
10
10
|
])
|
|
11
11
|
|
|
12
|
+
/** @satisfies {Record<keyof typeof Affilation, string>} */
|
|
12
13
|
export const AffilationTitle = Object.freeze({
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
['Unknown']: 'Неизвестно',
|
|
14
|
+
'Branch': 'Филиал',
|
|
15
|
+
'Franchise': 'Франшиза',
|
|
16
16
|
})
|
|
17
17
|
|
|
18
|
+
/** @satisfies {Record<keyof typeof Affilation, string>} */
|
|
18
19
|
export const AffilationIcon = Object.freeze({
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
['Unknown']: 'hero/outline/no-symbol',
|
|
20
|
+
'Branch': 'hero/outline/building-office-2',
|
|
21
|
+
'Franchise': 'hero/outline/building-storefront',
|
|
22
22
|
})
|
|
23
23
|
|
|
24
24
|
/** @returns {keyof typeof Affilation | 'Unknown'} */
|
|
@@ -1,44 +1,27 @@
|
|
|
1
1
|
export const VenueAudience = Object.freeze({
|
|
2
2
|
'Open': 'Open',
|
|
3
|
-
'
|
|
3
|
+
'Adults': 'Adults',
|
|
4
4
|
})
|
|
5
5
|
|
|
6
|
+
/** @satisfies {Array<keyof typeof VenueAudience>} */
|
|
6
7
|
export const VenueAudiences = Object.freeze([
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
'Open',
|
|
9
|
+
'Adults',
|
|
9
10
|
])
|
|
10
11
|
|
|
12
|
+
/** @satisfies {Record<keyof typeof VenueAudience, string>} */
|
|
11
13
|
export const VenueAudienceTitle = Object.freeze({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
'Open': 'Все',
|
|
15
|
+
'Adults': 'Взрослые',
|
|
14
16
|
})
|
|
15
17
|
|
|
18
|
+
/** @satisfies {Record<keyof typeof VenueAudience, string>} */
|
|
16
19
|
export const VenueAudienceIcon = Object.freeze({
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
'Open': 'hero/outline/lock-open',
|
|
21
|
+
'Adults': 'hero/outline/lock-closed',
|
|
19
22
|
})
|
|
20
23
|
|
|
21
|
-
const ValueVenueAudience = Object.freeze({
|
|
22
|
-
'false': VenueAudience['Open'],
|
|
23
|
-
'true': VenueAudience['Restricted'],
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
const VenueAudienceShape = /** @type {const} */ (Object.freeze({
|
|
27
|
-
[VenueAudience['Open']]: {
|
|
28
|
-
is_adult: false,
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
[VenueAudience['Restricted']]: {
|
|
32
|
-
is_adult: true,
|
|
33
|
-
},
|
|
34
|
-
}))
|
|
35
|
-
|
|
36
24
|
export const inferVenueAudience = Object.freeze(
|
|
37
25
|
/** @returns {keyof typeof VenueAudience | 'Unknown'} */
|
|
38
|
-
x =>
|
|
39
|
-
)
|
|
40
|
-
|
|
41
|
-
export const inferVenueAudienceShape = Object.freeze(
|
|
42
|
-
/** @returns {typeof VenueAudienceShape[keyof typeof VenueAudienceShape] | { is_adult: null }} */
|
|
43
|
-
x => VenueAudienceShape[x] ?? { is_adult: null },
|
|
26
|
+
x => VenueAudience[x?.audience ?? x] ?? 'Unknown',
|
|
44
27
|
)
|