@shakerquiz/utilities 4.0.102 → 4.0.104
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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export const RegistrationTableColumn = /** @type {const} */ ({
|
|
2
|
+
'id': 'id',
|
|
3
|
+
'human_name': 'human_name',
|
|
4
|
+
'email': 'email',
|
|
5
|
+
'phone': 'phone',
|
|
6
|
+
'team_name': 'team_name',
|
|
7
|
+
'people_count': 'people_count',
|
|
8
|
+
'is_first': 'is_first',
|
|
9
|
+
'is_birthday': 'is_birthday',
|
|
10
|
+
'is_extensible': 'is_extensible',
|
|
11
|
+
'is_alone': 'is_alone',
|
|
12
|
+
'ads_from': 'ads_from',
|
|
13
|
+
'comment': 'comment',
|
|
14
|
+
'promocode': 'promocode',
|
|
15
|
+
'channel': 'channel',
|
|
16
|
+
'vkontakte': 'vkontakte',
|
|
17
|
+
'telegram': 'telegram',
|
|
18
|
+
'chatapp_id': 'chatapp_id',
|
|
19
|
+
'utm_term': 'utm_term',
|
|
20
|
+
'utm_source': 'utm_source',
|
|
21
|
+
'utm_medium': 'utm_medium',
|
|
22
|
+
'utm_content': 'utm_content',
|
|
23
|
+
'utm_campaign': 'utm_campaign',
|
|
24
|
+
'confirmed_channel': 'confirmed_channel',
|
|
25
|
+
'status': 'status',
|
|
26
|
+
'lineup': 'lineup',
|
|
27
|
+
'mailing': 'mailing',
|
|
28
|
+
'celebrant': 'celebrant',
|
|
29
|
+
'note': 'note',
|
|
30
|
+
'visibility': 'visibility',
|
|
31
|
+
'time_created': 'time_created',
|
|
32
|
+
'time_updated': 'time_updated',
|
|
33
|
+
})
|
|
34
|
+
|
|
35
|
+
export const RegistrationTableColumns = Object.values(RegistrationTableColumn)
|
package/source/helpers/object.js
CHANGED
|
@@ -1,46 +1,74 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @
|
|
2
|
+
* @param {object} o
|
|
3
|
+
* @param {...PropertyKey} ks
|
|
3
4
|
*/
|
|
4
|
-
export const hasOwn =
|
|
5
|
+
export const hasOwn = (o, ...ks) => {
|
|
6
|
+
if (o === null)
|
|
7
|
+
return false
|
|
8
|
+
else if (o === undefined)
|
|
9
|
+
return false
|
|
10
|
+
else if (ks.length < 1)
|
|
11
|
+
return false
|
|
12
|
+
else
|
|
13
|
+
return ks.every(v => Object.hasOwn(o, v))
|
|
14
|
+
}
|
|
5
15
|
|
|
6
16
|
/**
|
|
7
17
|
* @param {object} o
|
|
8
|
-
* @param {PropertyKey}
|
|
18
|
+
* @param {PropertyKey} k
|
|
9
19
|
*
|
|
10
20
|
* @returns {*}
|
|
11
21
|
*/
|
|
12
|
-
export const tryOwn = (o,
|
|
22
|
+
export const tryOwn = (o, k) => hasOwn(o, k) ? o[k] : undefined
|
|
13
23
|
|
|
14
24
|
/**
|
|
15
25
|
* @param {object} o
|
|
16
|
-
* @param {PropertyKey}
|
|
26
|
+
* @param {PropertyKey} k
|
|
17
27
|
*
|
|
18
28
|
* @throws {TypeError}
|
|
19
29
|
*
|
|
20
30
|
* @returns {any}
|
|
21
31
|
*/
|
|
22
|
-
export const getOwn = (o,
|
|
23
|
-
if (!hasOwn(o,
|
|
24
|
-
throw TypeError(`Property '${
|
|
32
|
+
export const getOwn = (o, k) => {
|
|
33
|
+
if (!hasOwn(o, k))
|
|
34
|
+
throw TypeError(`Property '${k}' is not assigned.`)
|
|
25
35
|
|
|
26
|
-
|
|
27
|
-
throw TypeError(`Property '${v}' is not undefined.`)
|
|
36
|
+
var v = tryOwn(o, k)
|
|
28
37
|
|
|
29
|
-
|
|
30
|
-
}
|
|
38
|
+
if (v === undefined)
|
|
39
|
+
throw TypeError(`Property '${k}' is undefined.`)
|
|
31
40
|
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
return v
|
|
42
|
+
}
|
|
34
43
|
|
|
35
|
-
|
|
44
|
+
/**
|
|
45
|
+
* @param {object} o
|
|
46
|
+
* @param {PropertyKey} k
|
|
47
|
+
* @param {any} v
|
|
48
|
+
*/
|
|
49
|
+
export const setOwn = (o, k, v) => ({ ...o, [k]: v })
|
|
36
50
|
|
|
37
|
-
|
|
38
|
-
|
|
51
|
+
/**
|
|
52
|
+
* @deprecated
|
|
53
|
+
*
|
|
54
|
+
* @param {object} o
|
|
55
|
+
* @param {PropertyKey} k
|
|
56
|
+
* @param {any} v
|
|
57
|
+
*/
|
|
58
|
+
export const set = setOwn
|
|
39
59
|
|
|
40
|
-
|
|
41
|
-
|
|
60
|
+
/**
|
|
61
|
+
* @param {object} o
|
|
62
|
+
* @param {...object} os
|
|
63
|
+
*/
|
|
64
|
+
export const assignOwn = (o, ...os) => Object.assign({}, o, ...os)
|
|
42
65
|
|
|
43
|
-
|
|
66
|
+
/**
|
|
67
|
+
* @param {object} o
|
|
68
|
+
* @param {PropertyKey} k
|
|
69
|
+
*/
|
|
70
|
+
export const removeOwn = (o, k) => {
|
|
71
|
+
var { [k]: _, ...x } = o
|
|
44
72
|
|
|
45
|
-
return
|
|
73
|
+
return x
|
|
46
74
|
}
|
package/source/index.js
CHANGED
|
@@ -24,6 +24,7 @@ export * from './entities/quantifier.js'
|
|
|
24
24
|
export * from './entities/registration-attribute.js'
|
|
25
25
|
export * from './entities/registration-cancellation.js'
|
|
26
26
|
export * from './entities/registration-channel.js'
|
|
27
|
+
export * from './entities/registration-export-format.js'
|
|
27
28
|
export * from './entities/registration-confirmation.js'
|
|
28
29
|
export * from './entities/registration-interval.js'
|
|
29
30
|
export * from './entities/registration-lineup-procedure.js'
|
|
@@ -35,6 +36,7 @@ export * from './entities/registration-reservation.js'
|
|
|
35
36
|
export * from './entities/registration-restoration.js'
|
|
36
37
|
export * from './entities/registration-status-procedure.js'
|
|
37
38
|
export * from './entities/registration-status.js'
|
|
39
|
+
export * from './entities/registration-table-column.js'
|
|
38
40
|
export * from './entities/registration-visibility.js'
|
|
39
41
|
export * from './entities/role.js'
|
|
40
42
|
export * from './entities/routes.js'
|