@glissandoo/lib 1.39.3 → 1.40.1
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 +2 -1
- package/helpers/musicStyles/index.d.ts +2 -0
- package/helpers/musicStyles/index.js +15 -1
- package/helpers/notifications/placeholders.js +3 -3
- package/models/Group/index.d.ts +1 -0
- package/models/Group/index.js +3 -0
- package/models/Group/types.d.ts +6 -0
- package/models/Group/types.js +7 -1
- package/package.json +1 -1
package/functions/group.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GroupBasicData, GroupStatus } from '../models/Group/types';
|
|
1
|
+
import { GroupBasicData, GroupCreatedOn, GroupStatus } from '../models/Group/types';
|
|
2
2
|
export declare namespace GroupFbFunctionsTypes {
|
|
3
3
|
interface PublishParams {
|
|
4
4
|
displayName: string;
|
|
@@ -9,6 +9,7 @@ export declare namespace GroupFbFunctionsTypes {
|
|
|
9
9
|
musicStyle: string;
|
|
10
10
|
photoURL: string;
|
|
11
11
|
metadata?: Record<string, string>;
|
|
12
|
+
createdOn: GroupCreatedOn;
|
|
12
13
|
}
|
|
13
14
|
interface PublishResult {
|
|
14
15
|
id: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LanguagesTypes } from '../../lang';
|
|
2
2
|
import MusicStyle from '../../models/MusicStyle';
|
|
3
|
+
import { InstrumentId } from '../instruments';
|
|
3
4
|
export declare enum MusicStyleId {
|
|
4
5
|
Orchestra = "orquesta-sinfonica",
|
|
5
6
|
Band = "banda-de-musica",
|
|
@@ -13,6 +14,7 @@ export declare enum MusicStyleId {
|
|
|
13
14
|
Choir = "coro",
|
|
14
15
|
Batucada = "batucada"
|
|
15
16
|
}
|
|
17
|
+
export declare const musicStylesIcon: Record<MusicStyleId, InstrumentId>;
|
|
16
18
|
export declare const MusicStylesCover: Record<MusicStyleId, string>;
|
|
17
19
|
export type MusicStyleType = MusicStyleId | string;
|
|
18
20
|
export declare const musicStyleByCountry: Record<LanguagesTypes, MusicStyleId[]>;
|
|
@@ -3,9 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.list = exports.musicStyleByCountry = exports.MusicStylesCover = exports.MusicStyleId = void 0;
|
|
6
|
+
exports.list = exports.musicStyleByCountry = exports.MusicStylesCover = exports.musicStylesIcon = exports.MusicStyleId = void 0;
|
|
7
7
|
const lang_1 = require("../../lang");
|
|
8
8
|
const MusicStyle_1 = __importDefault(require("../../models/MusicStyle"));
|
|
9
|
+
const instruments_1 = require("../instruments");
|
|
9
10
|
var MusicStyleId;
|
|
10
11
|
(function (MusicStyleId) {
|
|
11
12
|
MusicStyleId["Orchestra"] = "orquesta-sinfonica";
|
|
@@ -20,6 +21,19 @@ var MusicStyleId;
|
|
|
20
21
|
MusicStyleId["Choir"] = "coro";
|
|
21
22
|
MusicStyleId["Batucada"] = "batucada";
|
|
22
23
|
})(MusicStyleId = exports.MusicStyleId || (exports.MusicStyleId = {}));
|
|
24
|
+
exports.musicStylesIcon = {
|
|
25
|
+
[MusicStyleId.Orchestra]: instruments_1.InstrumentId.Violin,
|
|
26
|
+
[MusicStyleId.Band]: instruments_1.InstrumentId.Clarinet,
|
|
27
|
+
[MusicStyleId.MarchingBand]: instruments_1.InstrumentId.MarchingToms,
|
|
28
|
+
[MusicStyleId.BigBand]: instruments_1.InstrumentId.Trombone,
|
|
29
|
+
[MusicStyleId.JazzBand]: instruments_1.InstrumentId.SaxTenor,
|
|
30
|
+
[MusicStyleId.Colla]: instruments_1.InstrumentId.Dulzaina,
|
|
31
|
+
[MusicStyleId.TxistularisBand]: instruments_1.InstrumentId.Txistu,
|
|
32
|
+
[MusicStyleId.BandaCornetasYTambores]: instruments_1.InstrumentId.Cornet,
|
|
33
|
+
[MusicStyleId.Charanga]: instruments_1.InstrumentId.BassDrum,
|
|
34
|
+
[MusicStyleId.Choir]: instruments_1.InstrumentId.Tenor,
|
|
35
|
+
[MusicStyleId.Batucada]: instruments_1.InstrumentId.Repique,
|
|
36
|
+
};
|
|
23
37
|
exports.MusicStylesCover = {
|
|
24
38
|
[MusicStyleId.Orchestra]: 'orquestra',
|
|
25
39
|
[MusicStyleId.Band]: 'bandaDeMusica',
|
|
@@ -41,11 +41,11 @@ const replaceKeysNotification = (text, values, lang) => {
|
|
|
41
41
|
if (!placeholders || placeholders.length === 0) {
|
|
42
42
|
return text;
|
|
43
43
|
}
|
|
44
|
-
const { extra, ...
|
|
45
|
-
const
|
|
44
|
+
const { extra, ...entityObjects } = values;
|
|
45
|
+
const entityArrays = (0, lodash_1.mapValues)(entityObjects, (value) => value ? Object.values(value) : undefined);
|
|
46
46
|
const newValues = {
|
|
47
47
|
extra,
|
|
48
|
-
...
|
|
48
|
+
...entityArrays,
|
|
49
49
|
};
|
|
50
50
|
return placeholders.reduce((text, placeholder) => {
|
|
51
51
|
const { type, path, formatValue } = getTypeAndPathFromPlaceholder(placeholder);
|
package/models/Group/index.d.ts
CHANGED
package/models/Group/index.js
CHANGED
|
@@ -185,5 +185,8 @@ class Group extends basic_1.default {
|
|
|
185
185
|
get glissandooAdminUrl() {
|
|
186
186
|
return (0, glissandooAdmin_1.getGlissandooAdminEntityURL)(collections_1.CollectionNames.Group, this.id);
|
|
187
187
|
}
|
|
188
|
+
get createdOn() {
|
|
189
|
+
return this.data.createdOn;
|
|
190
|
+
}
|
|
188
191
|
}
|
|
189
192
|
exports.default = Group;
|
package/models/Group/types.d.ts
CHANGED
|
@@ -4,6 +4,11 @@ import { StageTemplate } from '../../helpers/types';
|
|
|
4
4
|
import { DocumentReference, GeoPoint, Timestamp } from '../../types/firestore';
|
|
5
5
|
import { EventType } from '../Evento/types';
|
|
6
6
|
import { PlayerBasicData } from '../Player/types';
|
|
7
|
+
export declare enum GroupCreatedOn {
|
|
8
|
+
Web = "web",
|
|
9
|
+
App = "app",
|
|
10
|
+
Dashboard = "dashboard"
|
|
11
|
+
}
|
|
7
12
|
export declare enum GroupConfig {
|
|
8
13
|
IncludesMembersToEventsWhenJoined = "includesMembersToEventsWhenJoined"
|
|
9
14
|
}
|
|
@@ -111,6 +116,7 @@ export interface GroupData extends GroupBasicData {
|
|
|
111
116
|
firstAnswerAt: Timestamp | null;
|
|
112
117
|
repertoireTags: Record<string, GroupRepertoireTag>;
|
|
113
118
|
trialEndAt: Timestamp | null;
|
|
119
|
+
readonly createdOn: GroupCreatedOn;
|
|
114
120
|
readonly owner: DocumentReference;
|
|
115
121
|
readonly createdAt: Timestamp;
|
|
116
122
|
}
|
package/models/Group/types.js
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupStatus = exports.GroupConfig = void 0;
|
|
3
|
+
exports.GroupRepertoireTagDefault = exports.GroupRepertoireTagReserved = exports.SocialNetwork = exports.GroupStatus = exports.GroupConfig = exports.GroupCreatedOn = void 0;
|
|
4
|
+
var GroupCreatedOn;
|
|
5
|
+
(function (GroupCreatedOn) {
|
|
6
|
+
GroupCreatedOn["Web"] = "web";
|
|
7
|
+
GroupCreatedOn["App"] = "app";
|
|
8
|
+
GroupCreatedOn["Dashboard"] = "dashboard";
|
|
9
|
+
})(GroupCreatedOn = exports.GroupCreatedOn || (exports.GroupCreatedOn = {}));
|
|
4
10
|
var GroupConfig;
|
|
5
11
|
(function (GroupConfig) {
|
|
6
12
|
GroupConfig["IncludesMembersToEventsWhenJoined"] = "includesMembersToEventsWhenJoined";
|