@glissandoo/lib 1.53.7 → 1.53.8
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/functions/group.d.ts +9 -1
- package/functions/groupRepertory.d.ts +1 -1
- package/functions/index.d.ts +1 -0
- package/functions/index.js +1 -0
- package/functions/regions.js +1 -0
- package/helpers/errors.d.ts +14 -1
- package/helpers/errors.js +2 -0
- package/helpers/fileSections/index.js +1 -1
- package/helpers/firestore.d.ts +11 -0
- package/helpers/firestore.js +196 -0
- package/helpers/instruments/index.d.ts +6 -5
- package/helpers/instruments/index.js +180 -185
- package/helpers/instruments/lists.d.ts +6 -0
- package/helpers/instruments/lists.js +21 -0
- package/helpers/musicStyles/index.d.ts +2 -2
- package/helpers/musicStyles/index.js +11 -11
- package/helpers/musicStyles/orders.d.ts +3 -3
- package/helpers/musicStyles/orders.js +172 -168
- package/helpers/notifications/placeholders.js +14 -7
- package/helpers/objects.d.ts +1 -1
- package/lang/ca.json +6 -4
- package/lang/de.json +5 -3
- package/lang/en.json +6 -4
- package/lang/es.json +5 -3
- package/lang/eu.json +5 -3
- package/lang/gl.json +5 -3
- package/lang/pt.json +5 -3
- package/models/Group/index.d.ts +7 -2
- package/models/Group/index.js +4 -1
- package/models/Group/types.d.ts +14 -5
- package/models/Instrument/group.d.ts +12 -0
- package/models/Instrument/group.js +30 -0
- package/package.json +1 -1
|
@@ -6,195 +6,199 @@ const utils_1 = require("../utils");
|
|
|
6
6
|
const index_1 = require("./index");
|
|
7
7
|
exports.orders = {
|
|
8
8
|
[index_1.MusicStyleId.Band]: [
|
|
9
|
-
instruments_1.
|
|
10
|
-
instruments_1.
|
|
11
|
-
instruments_1.
|
|
12
|
-
instruments_1.
|
|
13
|
-
instruments_1.
|
|
14
|
-
instruments_1.
|
|
15
|
-
instruments_1.
|
|
16
|
-
instruments_1.
|
|
17
|
-
instruments_1.
|
|
18
|
-
instruments_1.
|
|
19
|
-
instruments_1.
|
|
20
|
-
instruments_1.
|
|
21
|
-
instruments_1.
|
|
22
|
-
instruments_1.
|
|
23
|
-
instruments_1.
|
|
24
|
-
instruments_1.
|
|
25
|
-
instruments_1.
|
|
26
|
-
instruments_1.
|
|
27
|
-
instruments_1.
|
|
28
|
-
instruments_1.
|
|
29
|
-
instruments_1.
|
|
30
|
-
instruments_1.
|
|
31
|
-
instruments_1.
|
|
32
|
-
instruments_1.
|
|
33
|
-
instruments_1.
|
|
34
|
-
instruments_1.
|
|
35
|
-
instruments_1.
|
|
36
|
-
instruments_1.
|
|
37
|
-
instruments_1.
|
|
38
|
-
instruments_1.
|
|
9
|
+
instruments_1.DefaultInstrumentId.MusicConductor,
|
|
10
|
+
instruments_1.DefaultInstrumentId.Piccolo,
|
|
11
|
+
instruments_1.DefaultInstrumentId.Flute,
|
|
12
|
+
instruments_1.DefaultInstrumentId.Oboe,
|
|
13
|
+
instruments_1.DefaultInstrumentId.EnglishHorn,
|
|
14
|
+
instruments_1.DefaultInstrumentId.Bassoon,
|
|
15
|
+
instruments_1.DefaultInstrumentId.BassoonContra,
|
|
16
|
+
instruments_1.DefaultInstrumentId.ClarinetLittle,
|
|
17
|
+
instruments_1.DefaultInstrumentId.Clarinet,
|
|
18
|
+
instruments_1.DefaultInstrumentId.ClarinetBass,
|
|
19
|
+
instruments_1.DefaultInstrumentId.SaxSoprano,
|
|
20
|
+
instruments_1.DefaultInstrumentId.SaxAlto,
|
|
21
|
+
instruments_1.DefaultInstrumentId.SaxTenor,
|
|
22
|
+
instruments_1.DefaultInstrumentId.SaxBaritone,
|
|
23
|
+
instruments_1.DefaultInstrumentId.FrenchHorn,
|
|
24
|
+
instruments_1.DefaultInstrumentId.FlugeHorn,
|
|
25
|
+
instruments_1.DefaultInstrumentId.Trumpet,
|
|
26
|
+
instruments_1.DefaultInstrumentId.Trombone,
|
|
27
|
+
instruments_1.DefaultInstrumentId.TromboneLow,
|
|
28
|
+
instruments_1.DefaultInstrumentId.Euphonium,
|
|
29
|
+
instruments_1.DefaultInstrumentId.Tuba,
|
|
30
|
+
instruments_1.DefaultInstrumentId.Cello,
|
|
31
|
+
instruments_1.DefaultInstrumentId.DoubleBass,
|
|
32
|
+
instruments_1.DefaultInstrumentId.SnareDrum,
|
|
33
|
+
instruments_1.DefaultInstrumentId.Percussion,
|
|
34
|
+
instruments_1.DefaultInstrumentId.BassDrum,
|
|
35
|
+
instruments_1.DefaultInstrumentId.Cymbals,
|
|
36
|
+
instruments_1.DefaultInstrumentId.Timpani,
|
|
37
|
+
instruments_1.DefaultInstrumentId.Mallets,
|
|
38
|
+
instruments_1.DefaultInstrumentId.DrumSet,
|
|
39
39
|
],
|
|
40
40
|
[index_1.MusicStyleId.MarchingBand]: [
|
|
41
|
-
instruments_1.
|
|
42
|
-
instruments_1.
|
|
43
|
-
instruments_1.
|
|
44
|
-
instruments_1.
|
|
45
|
-
instruments_1.
|
|
46
|
-
instruments_1.
|
|
47
|
-
instruments_1.
|
|
48
|
-
instruments_1.
|
|
49
|
-
instruments_1.
|
|
50
|
-
instruments_1.
|
|
51
|
-
instruments_1.
|
|
52
|
-
instruments_1.
|
|
53
|
-
instruments_1.
|
|
54
|
-
instruments_1.
|
|
55
|
-
instruments_1.
|
|
56
|
-
instruments_1.
|
|
57
|
-
instruments_1.
|
|
58
|
-
instruments_1.
|
|
59
|
-
instruments_1.
|
|
60
|
-
instruments_1.
|
|
41
|
+
instruments_1.DefaultInstrumentId.MusicConductor,
|
|
42
|
+
instruments_1.DefaultInstrumentId.Piccolo,
|
|
43
|
+
instruments_1.DefaultInstrumentId.Flute,
|
|
44
|
+
instruments_1.DefaultInstrumentId.Clarinet,
|
|
45
|
+
instruments_1.DefaultInstrumentId.ClarinetBass,
|
|
46
|
+
instruments_1.DefaultInstrumentId.SaxAlto,
|
|
47
|
+
instruments_1.DefaultInstrumentId.SaxTenor,
|
|
48
|
+
instruments_1.DefaultInstrumentId.SaxBaritone,
|
|
49
|
+
instruments_1.DefaultInstrumentId.Trumpet,
|
|
50
|
+
instruments_1.DefaultInstrumentId.Trombone,
|
|
51
|
+
instruments_1.DefaultInstrumentId.TromboneLow,
|
|
52
|
+
instruments_1.DefaultInstrumentId.Euphonium,
|
|
53
|
+
instruments_1.DefaultInstrumentId.Tuba,
|
|
54
|
+
instruments_1.DefaultInstrumentId.SnareDrum,
|
|
55
|
+
instruments_1.DefaultInstrumentId.MarchingToms,
|
|
56
|
+
instruments_1.DefaultInstrumentId.BassDrum,
|
|
57
|
+
instruments_1.DefaultInstrumentId.Cymbals,
|
|
58
|
+
instruments_1.DefaultInstrumentId.Timpani,
|
|
59
|
+
instruments_1.DefaultInstrumentId.Mallets,
|
|
60
|
+
instruments_1.DefaultInstrumentId.DrumSet,
|
|
61
61
|
],
|
|
62
62
|
[index_1.MusicStyleId.Orchestra]: [
|
|
63
|
-
instruments_1.
|
|
64
|
-
instruments_1.
|
|
65
|
-
instruments_1.
|
|
66
|
-
instruments_1.
|
|
67
|
-
instruments_1.
|
|
68
|
-
instruments_1.
|
|
69
|
-
instruments_1.
|
|
70
|
-
instruments_1.
|
|
71
|
-
instruments_1.
|
|
72
|
-
instruments_1.
|
|
73
|
-
instruments_1.
|
|
74
|
-
instruments_1.
|
|
75
|
-
instruments_1.
|
|
76
|
-
instruments_1.
|
|
77
|
-
instruments_1.
|
|
78
|
-
instruments_1.
|
|
79
|
-
instruments_1.
|
|
80
|
-
instruments_1.
|
|
81
|
-
instruments_1.
|
|
82
|
-
instruments_1.
|
|
83
|
-
instruments_1.
|
|
84
|
-
instruments_1.
|
|
85
|
-
instruments_1.
|
|
86
|
-
instruments_1.
|
|
87
|
-
instruments_1.
|
|
88
|
-
instruments_1.
|
|
89
|
-
instruments_1.
|
|
90
|
-
instruments_1.
|
|
91
|
-
instruments_1.
|
|
92
|
-
instruments_1.
|
|
93
|
-
instruments_1.
|
|
94
|
-
instruments_1.
|
|
95
|
-
instruments_1.
|
|
96
|
-
instruments_1.
|
|
97
|
-
instruments_1.
|
|
63
|
+
instruments_1.DefaultInstrumentId.MusicConductor,
|
|
64
|
+
instruments_1.DefaultInstrumentId.Violin,
|
|
65
|
+
instruments_1.DefaultInstrumentId.Viola,
|
|
66
|
+
instruments_1.DefaultInstrumentId.Cello,
|
|
67
|
+
instruments_1.DefaultInstrumentId.DoubleBass,
|
|
68
|
+
instruments_1.DefaultInstrumentId.Piccolo,
|
|
69
|
+
instruments_1.DefaultInstrumentId.Flute,
|
|
70
|
+
instruments_1.DefaultInstrumentId.FluteLow,
|
|
71
|
+
instruments_1.DefaultInstrumentId.Oboe,
|
|
72
|
+
instruments_1.DefaultInstrumentId.EnglishHorn,
|
|
73
|
+
instruments_1.DefaultInstrumentId.Bassoon,
|
|
74
|
+
instruments_1.DefaultInstrumentId.BassoonContra,
|
|
75
|
+
instruments_1.DefaultInstrumentId.ClarinetLittle,
|
|
76
|
+
instruments_1.DefaultInstrumentId.Clarinet,
|
|
77
|
+
instruments_1.DefaultInstrumentId.ClarinetBass,
|
|
78
|
+
instruments_1.DefaultInstrumentId.SaxSoprano,
|
|
79
|
+
instruments_1.DefaultInstrumentId.SaxAlto,
|
|
80
|
+
instruments_1.DefaultInstrumentId.SaxTenor,
|
|
81
|
+
instruments_1.DefaultInstrumentId.SaxBaritone,
|
|
82
|
+
instruments_1.DefaultInstrumentId.FrenchHorn,
|
|
83
|
+
instruments_1.DefaultInstrumentId.FlugeHorn,
|
|
84
|
+
instruments_1.DefaultInstrumentId.Trumpet,
|
|
85
|
+
instruments_1.DefaultInstrumentId.TrumpetLow,
|
|
86
|
+
instruments_1.DefaultInstrumentId.TrumpetPiccolo,
|
|
87
|
+
instruments_1.DefaultInstrumentId.Trombone,
|
|
88
|
+
instruments_1.DefaultInstrumentId.TromboneHigh,
|
|
89
|
+
instruments_1.DefaultInstrumentId.TromboneLow,
|
|
90
|
+
instruments_1.DefaultInstrumentId.Euphonium,
|
|
91
|
+
instruments_1.DefaultInstrumentId.Tuba,
|
|
92
|
+
instruments_1.DefaultInstrumentId.Percussion,
|
|
93
|
+
instruments_1.DefaultInstrumentId.SnareDrum,
|
|
94
|
+
instruments_1.DefaultInstrumentId.BassDrum,
|
|
95
|
+
instruments_1.DefaultInstrumentId.Cymbals,
|
|
96
|
+
instruments_1.DefaultInstrumentId.Timpani,
|
|
97
|
+
instruments_1.DefaultInstrumentId.Mallets,
|
|
98
98
|
],
|
|
99
99
|
[index_1.MusicStyleId.Choir]: [
|
|
100
|
-
instruments_1.
|
|
101
|
-
instruments_1.
|
|
102
|
-
instruments_1.
|
|
103
|
-
instruments_1.
|
|
104
|
-
instruments_1.
|
|
105
|
-
instruments_1.
|
|
106
|
-
instruments_1.
|
|
107
|
-
instruments_1.
|
|
108
|
-
instruments_1.
|
|
100
|
+
instruments_1.DefaultInstrumentId.MusicConductor,
|
|
101
|
+
instruments_1.DefaultInstrumentId.Soprano,
|
|
102
|
+
instruments_1.DefaultInstrumentId.MezzoSoprano,
|
|
103
|
+
instruments_1.DefaultInstrumentId.ContraAlto,
|
|
104
|
+
instruments_1.DefaultInstrumentId.CounterTenor,
|
|
105
|
+
instruments_1.DefaultInstrumentId.BassChoir,
|
|
106
|
+
instruments_1.DefaultInstrumentId.Tenor,
|
|
107
|
+
instruments_1.DefaultInstrumentId.Baritone,
|
|
108
|
+
instruments_1.DefaultInstrumentId.Choir,
|
|
109
109
|
],
|
|
110
110
|
[index_1.MusicStyleId.BigBand]: [
|
|
111
|
-
instruments_1.
|
|
112
|
-
instruments_1.
|
|
113
|
-
instruments_1.
|
|
114
|
-
instruments_1.
|
|
115
|
-
instruments_1.
|
|
116
|
-
instruments_1.
|
|
117
|
-
instruments_1.
|
|
118
|
-
instruments_1.
|
|
119
|
-
instruments_1.
|
|
120
|
-
instruments_1.
|
|
121
|
-
instruments_1.
|
|
122
|
-
instruments_1.
|
|
123
|
-
instruments_1.
|
|
124
|
-
instruments_1.
|
|
125
|
-
instruments_1.
|
|
126
|
-
instruments_1.
|
|
127
|
-
instruments_1.
|
|
128
|
-
instruments_1.
|
|
129
|
-
instruments_1.
|
|
130
|
-
instruments_1.
|
|
131
|
-
instruments_1.
|
|
132
|
-
instruments_1.
|
|
133
|
-
instruments_1.
|
|
134
|
-
instruments_1.
|
|
135
|
-
instruments_1.
|
|
136
|
-
instruments_1.
|
|
111
|
+
instruments_1.DefaultInstrumentId.MusicConductor,
|
|
112
|
+
instruments_1.DefaultInstrumentId.Piccolo,
|
|
113
|
+
instruments_1.DefaultInstrumentId.Flute,
|
|
114
|
+
instruments_1.DefaultInstrumentId.FluteLow,
|
|
115
|
+
instruments_1.DefaultInstrumentId.Oboe,
|
|
116
|
+
instruments_1.DefaultInstrumentId.EnglishHorn,
|
|
117
|
+
instruments_1.DefaultInstrumentId.Bassoon,
|
|
118
|
+
instruments_1.DefaultInstrumentId.BassoonContra,
|
|
119
|
+
instruments_1.DefaultInstrumentId.ClarinetLittle,
|
|
120
|
+
instruments_1.DefaultInstrumentId.Clarinet,
|
|
121
|
+
instruments_1.DefaultInstrumentId.ClarinetBass,
|
|
122
|
+
instruments_1.DefaultInstrumentId.SaxSoprano,
|
|
123
|
+
instruments_1.DefaultInstrumentId.SaxAlto,
|
|
124
|
+
instruments_1.DefaultInstrumentId.SaxTenor,
|
|
125
|
+
instruments_1.DefaultInstrumentId.SaxBaritone,
|
|
126
|
+
instruments_1.DefaultInstrumentId.FrenchHorn,
|
|
127
|
+
instruments_1.DefaultInstrumentId.FlugeHorn,
|
|
128
|
+
instruments_1.DefaultInstrumentId.Trumpet,
|
|
129
|
+
instruments_1.DefaultInstrumentId.Trombone,
|
|
130
|
+
instruments_1.DefaultInstrumentId.TromboneLow,
|
|
131
|
+
instruments_1.DefaultInstrumentId.Euphonium,
|
|
132
|
+
instruments_1.DefaultInstrumentId.Tuba,
|
|
133
|
+
instruments_1.DefaultInstrumentId.Cello,
|
|
134
|
+
instruments_1.DefaultInstrumentId.DoubleBass,
|
|
135
|
+
instruments_1.DefaultInstrumentId.Percussion,
|
|
136
|
+
instruments_1.DefaultInstrumentId.DrumSet,
|
|
137
|
+
],
|
|
138
|
+
[index_1.MusicStyleId.TxistularisBand]: [
|
|
139
|
+
instruments_1.DefaultInstrumentId.Txistu,
|
|
140
|
+
instruments_1.DefaultInstrumentId.Silbote,
|
|
141
|
+
instruments_1.DefaultInstrumentId.Tabal,
|
|
137
142
|
],
|
|
138
|
-
[index_1.MusicStyleId.TxistularisBand]: [instruments_1.InstrumentId.Txistu, instruments_1.InstrumentId.Silbote, instruments_1.InstrumentId.Tabal],
|
|
139
143
|
[index_1.MusicStyleId.Colla]: [
|
|
140
|
-
instruments_1.
|
|
141
|
-
instruments_1.
|
|
142
|
-
instruments_1.
|
|
143
|
-
instruments_1.
|
|
144
|
-
instruments_1.
|
|
145
|
-
instruments_1.
|
|
146
|
-
instruments_1.
|
|
147
|
-
instruments_1.
|
|
148
|
-
instruments_1.
|
|
149
|
-
instruments_1.
|
|
144
|
+
instruments_1.DefaultInstrumentId.MusicConductor,
|
|
145
|
+
instruments_1.DefaultInstrumentId.Dulzaina,
|
|
146
|
+
instruments_1.DefaultInstrumentId.DulzainaFa,
|
|
147
|
+
instruments_1.DefaultInstrumentId.Tarota,
|
|
148
|
+
instruments_1.DefaultInstrumentId.Bagpipes,
|
|
149
|
+
instruments_1.DefaultInstrumentId.Tabal,
|
|
150
|
+
instruments_1.DefaultInstrumentId.Percussion,
|
|
151
|
+
instruments_1.DefaultInstrumentId.BassDrum,
|
|
152
|
+
instruments_1.DefaultInstrumentId.Cymbals,
|
|
153
|
+
instruments_1.DefaultInstrumentId.Timpani,
|
|
150
154
|
],
|
|
151
155
|
[index_1.MusicStyleId.Charanga]: [
|
|
152
|
-
instruments_1.
|
|
153
|
-
instruments_1.
|
|
154
|
-
instruments_1.
|
|
155
|
-
instruments_1.
|
|
156
|
-
instruments_1.
|
|
157
|
-
instruments_1.
|
|
158
|
-
instruments_1.
|
|
159
|
-
instruments_1.
|
|
160
|
-
instruments_1.
|
|
161
|
-
instruments_1.
|
|
162
|
-
instruments_1.
|
|
163
|
-
instruments_1.
|
|
156
|
+
instruments_1.DefaultInstrumentId.Clarinet,
|
|
157
|
+
instruments_1.DefaultInstrumentId.SaxAlto,
|
|
158
|
+
instruments_1.DefaultInstrumentId.SaxTenor,
|
|
159
|
+
instruments_1.DefaultInstrumentId.Trumpet,
|
|
160
|
+
instruments_1.DefaultInstrumentId.Trombone,
|
|
161
|
+
instruments_1.DefaultInstrumentId.Euphonium,
|
|
162
|
+
instruments_1.DefaultInstrumentId.Tuba,
|
|
163
|
+
instruments_1.DefaultInstrumentId.Percussion,
|
|
164
|
+
instruments_1.DefaultInstrumentId.SnareDrum,
|
|
165
|
+
instruments_1.DefaultInstrumentId.BassDrum,
|
|
166
|
+
instruments_1.DefaultInstrumentId.MarchingToms,
|
|
167
|
+
instruments_1.DefaultInstrumentId.Cymbals,
|
|
164
168
|
],
|
|
165
169
|
[index_1.MusicStyleId.BandaCornetasYTambores]: [
|
|
166
|
-
instruments_1.
|
|
167
|
-
instruments_1.
|
|
168
|
-
instruments_1.
|
|
169
|
-
instruments_1.
|
|
170
|
-
instruments_1.
|
|
170
|
+
instruments_1.DefaultInstrumentId.MusicConductor,
|
|
171
|
+
instruments_1.DefaultInstrumentId.Cornet,
|
|
172
|
+
instruments_1.DefaultInstrumentId.Percussion,
|
|
173
|
+
instruments_1.DefaultInstrumentId.SnareDrum,
|
|
174
|
+
instruments_1.DefaultInstrumentId.BassDrum,
|
|
171
175
|
],
|
|
172
176
|
[index_1.MusicStyleId.JazzBand]: [
|
|
173
|
-
instruments_1.
|
|
174
|
-
instruments_1.
|
|
175
|
-
instruments_1.
|
|
176
|
-
instruments_1.
|
|
177
|
-
instruments_1.
|
|
178
|
-
instruments_1.
|
|
179
|
-
instruments_1.
|
|
180
|
-
instruments_1.
|
|
181
|
-
instruments_1.
|
|
182
|
-
instruments_1.
|
|
183
|
-
instruments_1.
|
|
184
|
-
instruments_1.
|
|
177
|
+
instruments_1.DefaultInstrumentId.Flute,
|
|
178
|
+
instruments_1.DefaultInstrumentId.Clarinet,
|
|
179
|
+
instruments_1.DefaultInstrumentId.SaxSoprano,
|
|
180
|
+
instruments_1.DefaultInstrumentId.SaxAlto,
|
|
181
|
+
instruments_1.DefaultInstrumentId.SaxTenor,
|
|
182
|
+
instruments_1.DefaultInstrumentId.SaxBaritone,
|
|
183
|
+
instruments_1.DefaultInstrumentId.Trumpet,
|
|
184
|
+
instruments_1.DefaultInstrumentId.Trombone,
|
|
185
|
+
instruments_1.DefaultInstrumentId.Tuba,
|
|
186
|
+
instruments_1.DefaultInstrumentId.DoubleBass,
|
|
187
|
+
instruments_1.DefaultInstrumentId.Percussion,
|
|
188
|
+
instruments_1.DefaultInstrumentId.DrumSet,
|
|
185
189
|
],
|
|
186
190
|
[index_1.MusicStyleId.Batucada]: [
|
|
187
|
-
instruments_1.
|
|
188
|
-
instruments_1.
|
|
189
|
-
instruments_1.
|
|
190
|
-
instruments_1.
|
|
191
|
-
instruments_1.
|
|
192
|
-
instruments_1.
|
|
193
|
-
instruments_1.
|
|
191
|
+
instruments_1.DefaultInstrumentId.Repique,
|
|
192
|
+
instruments_1.DefaultInstrumentId.TambourineBrazilian,
|
|
193
|
+
instruments_1.DefaultInstrumentId.TimbalBrazilian,
|
|
194
|
+
instruments_1.DefaultInstrumentId.SnareDrum,
|
|
195
|
+
instruments_1.DefaultInstrumentId.Surdo,
|
|
196
|
+
instruments_1.DefaultInstrumentId.Agogo,
|
|
197
|
+
instruments_1.DefaultInstrumentId.Chocalho,
|
|
194
198
|
],
|
|
195
199
|
};
|
|
196
200
|
const getInstrumentsOrderByMusicStyle = (musicStyle) => {
|
|
197
|
-
return musicStyle in exports.orders ? exports.orders[musicStyle] : Object.values(instruments_1.
|
|
201
|
+
return musicStyle in exports.orders ? exports.orders[musicStyle] : Object.values(instruments_1.DefaultInstrumentId);
|
|
198
202
|
};
|
|
199
203
|
exports.getInstrumentsOrderByMusicStyle = getInstrumentsOrderByMusicStyle;
|
|
200
204
|
const orderByMusicStyle = (list, field, musicStyle) => {
|
|
@@ -36,6 +36,11 @@ const getTypeAndPathFromPlaceholder = (placeholder) => {
|
|
|
36
36
|
formatValue: (formatValue || 'shortDate'),
|
|
37
37
|
};
|
|
38
38
|
};
|
|
39
|
+
const getPropsPathsFromArrayPlaceholderInPath = (path) => {
|
|
40
|
+
const placeholder = path.pop();
|
|
41
|
+
const props = placeholder ? placeholder.slice(1, -1).replace(' ', '').split(',') : [];
|
|
42
|
+
return props.map((prop) => [...path, prop]);
|
|
43
|
+
};
|
|
39
44
|
const replaceKeysNotification = (text, values, lang) => {
|
|
40
45
|
const placeholders = text.match(/(\{).+?(\})/g);
|
|
41
46
|
if (!placeholders || placeholders.length === 0) {
|
|
@@ -51,21 +56,23 @@ const replaceKeysNotification = (text, values, lang) => {
|
|
|
51
56
|
const { type, path, formatValue } = getTypeAndPathFromPlaceholder(placeholder);
|
|
52
57
|
switch (type) {
|
|
53
58
|
case PlaceholderType.Instrument: {
|
|
54
|
-
const
|
|
59
|
+
const [instrumentIdPropPath, customInstrumentNamePropPath] = getPropsPathsFromArrayPlaceholderInPath(path);
|
|
60
|
+
const customInstrumentName = (0, lodash_1.get)(newValues, customInstrumentNamePropPath);
|
|
61
|
+
if (customInstrumentName) {
|
|
62
|
+
return text.replace(placeholder, customInstrumentName.toLowerCase());
|
|
63
|
+
}
|
|
64
|
+
const instrumentId = (0, lodash_1.get)(newValues, instrumentIdPropPath);
|
|
55
65
|
const instrument = new Instrument_1.default(instrumentId, lang);
|
|
56
66
|
if (!instrument)
|
|
57
67
|
return text;
|
|
58
68
|
return text.replace(placeholder, instrument.name.toLowerCase());
|
|
59
69
|
}
|
|
60
70
|
case PlaceholderType.Date: {
|
|
61
|
-
const
|
|
62
|
-
const
|
|
63
|
-
? lastPath.slice(1, -1).replace(' ', '').split(',')
|
|
64
|
-
: [];
|
|
65
|
-
const datetime = (0, lodash_1.get)(newValues, [...path, datetimeProp]);
|
|
71
|
+
const [datetimePropPath, timezonePropPath] = getPropsPathsFromArrayPlaceholderInPath(path);
|
|
72
|
+
const datetime = (0, lodash_1.get)(newValues, datetimePropPath);
|
|
66
73
|
if (!datetime)
|
|
67
74
|
return text.replace(placeholder, '');
|
|
68
|
-
const timezone = (0, lodash_1.get)(newValues,
|
|
75
|
+
const timezone = (0, lodash_1.get)(newValues, timezonePropPath) || 'Europe/Madrid';
|
|
69
76
|
const zonedDatetime = (0, date_fns_tz_1.utcToZonedTime)(datetime.toDate(), timezone);
|
|
70
77
|
const dateLang = (0, lang_1.getDateLang)(lang);
|
|
71
78
|
const dateFormat = (0, date_fns_1.format)(zonedDatetime, (0, lodash_1.get)(dateLang.format, formatValue), {
|
package/helpers/objects.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const mapToArray: <K extends string, V extends object, O extends Record<K, V>>(obj: O) => (O[`${Exclude<keyof O, symbol>}`] & {
|
|
1
|
+
export declare const mapToArray: <K extends string, V extends object, O extends Record<K, V | undefined>>(obj: O) => (O[`${Exclude<keyof O, symbol>}`] & {
|
|
2
2
|
id: keyof O;
|
|
3
3
|
})[];
|
|
4
4
|
export declare const orderedMapToArray: <K extends string, V extends {
|
package/lang/ca.json
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"instruments.agogo": "Agogó",
|
|
47
47
|
"instruments.altoClarinet": "Clarinet Alt",
|
|
48
48
|
"instruments.altoSaxophone": "Saxòfon alt",
|
|
49
|
+
"instruments.auxiliar": "Auxiliar",
|
|
49
50
|
"instruments.bagpipes": "Sac de gemecs",
|
|
50
51
|
"instruments.bandurria": "Bandúrria",
|
|
51
52
|
"instruments.banjo": "Banjo",
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
"instruments.englishHorn": "Corn anglès",
|
|
78
79
|
"instruments.euphonium": "Bombardí",
|
|
79
80
|
"instruments.flabiol": "Flabiol",
|
|
81
|
+
"instruments.flagBearer": "Abanderat",
|
|
80
82
|
"instruments.flugelhorn": "Fiscorn",
|
|
81
83
|
"instruments.flute": "Flauta",
|
|
82
84
|
"instruments.frenchHorn": "Trompa",
|
|
@@ -254,7 +256,7 @@
|
|
|
254
256
|
"practices.edit.comments.text": "Una serie d'assajos han actualitzat els seus comentaris",
|
|
255
257
|
"practices.edit.comments.title": "Assajos - comentaris actualitzats",
|
|
256
258
|
"practices.edit.datetime.text": "Una serie d'assajos han actualitzat el seu horari",
|
|
257
|
-
"practices.edit.datetime.title": "Assajos - canvi d
|
|
259
|
+
"practices.edit.datetime.title": "Assajos - canvi d'horari",
|
|
258
260
|
"practices.edit.locality.text": "Una serie d'assajos han actualitzat la seva adreça",
|
|
259
261
|
"practices.edit.locality.title": "Assajos - canvi d'adreça",
|
|
260
262
|
"practices.edit.repertory.text": "Una serie d'assajos han actualitzat el seu repertori",
|
|
@@ -275,8 +277,8 @@
|
|
|
275
277
|
"repertoireTags.4": "4t",
|
|
276
278
|
"repertoireTags.principal": "Principal",
|
|
277
279
|
"sections.all": "Tots",
|
|
278
|
-
"theme.claim.new.text": "{string:user.0.displayName} ha reclamat la partitura de {instrument:extra.instrumentId} de l'obra \"{string:extra.title}\"",
|
|
280
|
+
"theme.claim.new.text": "{string:user.0.displayName} ha reclamat la partitura de {instrument:extra.[instrumentId,customInstrumentName]} de l'obra \"{string:extra.title}\"",
|
|
279
281
|
"theme.claim.new.title": "Han demanat una partitura",
|
|
280
|
-
"theme.claim.update.text": "S'afegit la partitura de {instrument:extra.instrumentId} de l'obra \"{string:extra.title}\"",
|
|
281
|
-
"theme.claim.update.title": "Nova partitura de {instrument:extra.instrumentId}"
|
|
282
|
+
"theme.claim.update.text": "S'afegit la partitura de {instrument:extra.[instrumentId,customInstrumentName]} de l'obra \"{string:extra.title}\"",
|
|
283
|
+
"theme.claim.update.title": "Nova partitura de {instrument:extra.[instrumentId,customInstrumentName]}"
|
|
282
284
|
}
|
package/lang/de.json
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"instruments.agogo": "Agogo",
|
|
47
47
|
"instruments.altoClarinet": "Altklarinette",
|
|
48
48
|
"instruments.altoSaxophone": "Altsaxophon",
|
|
49
|
+
"instruments.auxiliar": "Assistent",
|
|
49
50
|
"instruments.bagpipes": "Dudelsack",
|
|
50
51
|
"instruments.bandurria": "Bandurria",
|
|
51
52
|
"instruments.banjo": "Banjo",
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
"instruments.englishHorn": "Englischhorn",
|
|
78
79
|
"instruments.euphonium": "Euphonium",
|
|
79
80
|
"instruments.flabiol": "Flabiol",
|
|
81
|
+
"instruments.flagBearer": "Fahnenträger",
|
|
80
82
|
"instruments.flugelhorn": "Flügelhorn",
|
|
81
83
|
"instruments.flute": "Flöte",
|
|
82
84
|
"instruments.frenchHorn": "Horn",
|
|
@@ -275,8 +277,8 @@
|
|
|
275
277
|
"repertoireTags.4": "4.",
|
|
276
278
|
"repertoireTags.principal": "Haupt",
|
|
277
279
|
"sections.all": "Alle",
|
|
278
|
-
"theme.claim.new.text": "{string:user.0.displayName} fordert eine Überprüfung der Noten für {instrument:extra.instrumentId} von \"{string:extra.title}\"",
|
|
280
|
+
"theme.claim.new.text": "{string:user.0.displayName} fordert eine Überprüfung der Noten für {instrument:extra.[instrumentId,customInstrumentName]} von \"{string:extra.title}\"",
|
|
279
281
|
"theme.claim.new.title": "Ein Musiker hat eine Überprüfung der Noten angefordert",
|
|
280
|
-
"theme.claim.update.text": "{instrument:extra.instrumentId} -Noten des Stücks \"{string:extra.title}\" wurden hinzugefügt.",
|
|
281
|
-
"theme.claim.update.title": "Neue {instrument:extra.instrumentId} -Noten"
|
|
282
|
+
"theme.claim.update.text": "{instrument:extra.[instrumentId,customInstrumentName]} -Noten des Stücks \"{string:extra.title}\" wurden hinzugefügt.",
|
|
283
|
+
"theme.claim.update.title": "Neue {instrument:extra.[instrumentId,customInstrumentName]} -Noten"
|
|
282
284
|
}
|
package/lang/en.json
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"group.onboarding.engagement.title": "Modern scheduling for music ensembles 📅",
|
|
31
31
|
"group.onboarding.invite.text": "Glissandoo is made with love by musicians, for musicians 🎶",
|
|
32
32
|
"group.onboarding.invite.title": "Get going by inviting your members 👋",
|
|
33
|
-
"group.onboarding.premium.text": "You
|
|
33
|
+
"group.onboarding.premium.text": "You're on the premium plan for 30 days. Glissandoo is free to use for all musicians, parents, and staff on your ensemble 💚",
|
|
34
34
|
"group.onboarding.premium.title": "{string:group.0.displayName}",
|
|
35
35
|
"group.players.add.text": "You've been added to {string:group.0.displayName}",
|
|
36
36
|
"group.players.add.title": "New group",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"instruments.agogo": "Agogo",
|
|
47
47
|
"instruments.altoClarinet": "Alto Clarinet",
|
|
48
48
|
"instruments.altoSaxophone": "Alto Saxophone",
|
|
49
|
+
"instruments.auxiliar": "Auxiliar",
|
|
49
50
|
"instruments.bagpipes": "Bagpipes",
|
|
50
51
|
"instruments.bandurria": "Bandurria",
|
|
51
52
|
"instruments.banjo": "Banjo",
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
"instruments.englishHorn": "English Horn",
|
|
78
79
|
"instruments.euphonium": "Euphonium",
|
|
79
80
|
"instruments.flabiol": "Flabiol",
|
|
81
|
+
"instruments.flagBearer": "Flag bearer",
|
|
80
82
|
"instruments.flugelhorn": "Flugelhorn",
|
|
81
83
|
"instruments.flute": "Flute",
|
|
82
84
|
"instruments.frenchHorn": "French Horn",
|
|
@@ -275,8 +277,8 @@
|
|
|
275
277
|
"repertoireTags.4": "4th",
|
|
276
278
|
"repertoireTags.principal": "Principal",
|
|
277
279
|
"sections.all": "All",
|
|
278
|
-
"theme.claim.new.text": "{string:user.0.displayName} has claimed a review on {instrument:extra.instrumentId} for \"{string:extra.title}\"",
|
|
280
|
+
"theme.claim.new.text": "{string:user.0.displayName} has claimed a review on {instrument:extra.[instrumentId,customInstrumentName]} for \"{string:extra.title}\"",
|
|
279
281
|
"theme.claim.new.title": "A music sheet review has been submitted by a musician",
|
|
280
|
-
"theme.claim.update.text": "{instrument:extra.instrumentId} sheet for \"{string:extra.title}\" has been added.",
|
|
281
|
-
"theme.claim.update.title": "New {instrument:extra.instrumentId} sheet has been added"
|
|
282
|
+
"theme.claim.update.text": "{instrument:extra.[instrumentId,customInstrumentName]} sheet for \"{string:extra.title}\" has been added.",
|
|
283
|
+
"theme.claim.update.title": "New {instrument:extra.[instrumentId,customInstrumentName]} sheet has been added"
|
|
282
284
|
}
|
package/lang/es.json
CHANGED
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"groupPlayer.switchInstruments.byAdmin.title": "Instrumentos modificados",
|
|
45
45
|
"instruments.accordion": "Acordeón",
|
|
46
46
|
"instruments.agogo": "Agogó",
|
|
47
|
+
"instruments.auxiliar": "Auxiliar",
|
|
47
48
|
"instruments.altoClarinet": "Clarinete Alto",
|
|
48
49
|
"instruments.altoSaxophone": "Saxofón alto",
|
|
49
50
|
"instruments.bagpipes": "Gaita",
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
"instruments.englishHorn": "Corno inglés",
|
|
78
79
|
"instruments.euphonium": "Bombardino",
|
|
79
80
|
"instruments.flabiol": "Flabiol",
|
|
81
|
+
"instruments.flagBearer": "Abanderado",
|
|
80
82
|
"instruments.flugelhorn": "Fliscorno",
|
|
81
83
|
"instruments.flute": "Flauta",
|
|
82
84
|
"instruments.frenchHorn": "Trompa",
|
|
@@ -275,8 +277,8 @@
|
|
|
275
277
|
"repertoireTags.4": "4º",
|
|
276
278
|
"repertoireTags.principal": "Principal",
|
|
277
279
|
"sections.all": "Todos",
|
|
278
|
-
"theme.claim.new.text": "{string:user.0.displayName} ha reclamado la partitura de {instrument:extra.instrumentId} de la obra \"{string:extra.title}\"",
|
|
280
|
+
"theme.claim.new.text": "{string:user.0.displayName} ha reclamado la partitura de {instrument:extra.[instrumentId,customInstrumentName]} de la obra \"{string:extra.title}\"",
|
|
279
281
|
"theme.claim.new.title": "Han pedido una partitura",
|
|
280
|
-
"theme.claim.update.text": "Se ha añadido la partitura de {instrument:extra.instrumentId} de la obra \"{string:extra.title}\"",
|
|
281
|
-
"theme.claim.update.title": "Nueva partitura de {instrument:extra.instrumentId}"
|
|
282
|
+
"theme.claim.update.text": "Se ha añadido la partitura de {instrument:extra.[instrumentId,customInstrumentName]} de la obra \"{string:extra.title}\"",
|
|
283
|
+
"theme.claim.update.title": "Nueva partitura de {instrument:extra.[instrumentId,customInstrumentName]}"
|
|
282
284
|
}
|
package/lang/eu.json
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"instruments.agogo": "Agogo",
|
|
47
47
|
"instruments.altoClarinet": "Klarinete Altua",
|
|
48
48
|
"instruments.altoSaxophone": "Saxofoi altua",
|
|
49
|
+
"instruments.auxiliar": "Laguntzailea",
|
|
49
50
|
"instruments.bagpipes": "Gaita",
|
|
50
51
|
"instruments.bandurria": "Bandurria",
|
|
51
52
|
"instruments.banjo": "Banjoa",
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
"instruments.englishHorn": "Adar ingelesa",
|
|
78
79
|
"instruments.euphonium": "Bonbardinoa",
|
|
79
80
|
"instruments.flabiol": "Flabiol",
|
|
81
|
+
"instruments.flagBearer": "Estandarra",
|
|
80
82
|
"instruments.flugelhorn": "Fliskornoa",
|
|
81
83
|
"instruments.flute": "Txirula",
|
|
82
84
|
"instruments.frenchHorn": "Adar frantsesa",
|
|
@@ -275,8 +277,8 @@
|
|
|
275
277
|
"repertoireTags.4": "4.a",
|
|
276
278
|
"repertoireTags.principal": "Lehen",
|
|
277
279
|
"sections.all": "Guztiak",
|
|
278
|
-
"theme.claim.new.text": "{string:user.0.displayName} erabiltzaileak \"{string:extra.title}\" obrako {instrument:extra.instrumentId} instrumentuaren partitura eskatu du",
|
|
280
|
+
"theme.claim.new.text": "{string:user.0.displayName} erabiltzaileak \"{string:extra.title}\" obrako {instrument:extra.[instrumentId,customInstrumentName]} instrumentuaren partitura eskatu du",
|
|
279
281
|
"theme.claim.new.title": "Partitura bat eskatu da",
|
|
280
|
-
"theme.claim.update.text": "{instrument:extra.instrumentId} instrumentuaren partitura gehitu da \"{string:extra.title}\" obrarako",
|
|
281
|
-
"theme.claim.update.title": "{instrument:extra.instrumentId} partitura berria gehitu da"
|
|
282
|
+
"theme.claim.update.text": "{instrument:extra.[instrumentId,customInstrumentName]} instrumentuaren partitura gehitu da \"{string:extra.title}\" obrarako",
|
|
283
|
+
"theme.claim.update.title": "{instrument:extra.[instrumentId,customInstrumentName]} partitura berria gehitu da"
|
|
282
284
|
}
|
package/lang/gl.json
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"instruments.agogo": "Agogó",
|
|
47
47
|
"instruments.altoClarinet": "Clarinete Alto",
|
|
48
48
|
"instruments.altoSaxophone": "Saxofón alto",
|
|
49
|
+
"instruments.auxiliar": "Asistente",
|
|
49
50
|
"instruments.bagpipes": "Gaita",
|
|
50
51
|
"instruments.bandurria": "Bandurria",
|
|
51
52
|
"instruments.banjo": "Banjo",
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
"instruments.englishHorn": "Corno Inglés",
|
|
78
79
|
"instruments.euphonium": "Eufonio",
|
|
79
80
|
"instruments.flabiol": "Flabiol",
|
|
81
|
+
"instruments.flagBearer": "Porta estandarte",
|
|
80
82
|
"instruments.flugelhorn": "Fliscorno",
|
|
81
83
|
"instruments.flute": "Frauta",
|
|
82
84
|
"instruments.frenchHorn": "Trompa",
|
|
@@ -275,8 +277,8 @@
|
|
|
275
277
|
"repertoireTags.4": "4º",
|
|
276
278
|
"repertoireTags.principal": "Principal",
|
|
277
279
|
"sections.all": "Todos",
|
|
278
|
-
"theme.claim.new.text": "{string:user.0.displayName} ha reclamado la partitura de {instrument:extra.instrumentId} de la obra \"{string:extra.title}\"",
|
|
280
|
+
"theme.claim.new.text": "{string:user.0.displayName} ha reclamado la partitura de {instrument:extra.[instrumentId,customInstrumentName]} de la obra \"{string:extra.title}\"",
|
|
279
281
|
"theme.claim.new.title": "Han pedido una partitura",
|
|
280
|
-
"theme.claim.update.text": "Se ha añadido la partitura de {instrument:extra.instrumentId} de la obra \"{string:extra.title}\"",
|
|
281
|
-
"theme.claim.update.title": "Nueva partitura de {instrument:extra.instrumentId}"
|
|
282
|
+
"theme.claim.update.text": "Se ha añadido la partitura de {instrument:extra.[instrumentId,customInstrumentName]} de la obra \"{string:extra.title}\"",
|
|
283
|
+
"theme.claim.update.title": "Nueva partitura de {instrument:extra.[instrumentId,customInstrumentName]}"
|
|
282
284
|
}
|