@glissandoo/lib 1.16.11 → 1.17.0
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/eventRepertory.d.ts +9 -0
- package/functions/index.d.ts +1 -0
- package/functions/index.js +1 -0
- package/functions/regions.js +1 -0
- package/helpers/utils.js +3 -5
- package/models/Group/Repertory/index.d.ts +1 -1
- package/models/Group/Repertory/types.d.ts +1 -1
- package/package.json +1 -1
|
@@ -16,4 +16,13 @@ export declare namespace EventoRepertoryFbFunctionsTypes {
|
|
|
16
16
|
filename: string;
|
|
17
17
|
path: string;
|
|
18
18
|
}
|
|
19
|
+
interface DownloadParams {
|
|
20
|
+
eventId: string;
|
|
21
|
+
instrumentId: InstrumentId;
|
|
22
|
+
tags: string[];
|
|
23
|
+
}
|
|
24
|
+
interface DownloadResult {
|
|
25
|
+
filename: string;
|
|
26
|
+
path: string;
|
|
27
|
+
}
|
|
19
28
|
}
|
package/functions/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare enum FbFunctionName {
|
|
|
17
17
|
EventPublish = "event-publish",
|
|
18
18
|
EventRemove = "event-remove",
|
|
19
19
|
EventRepertoryDownloadPdf = "eventRepertory-downloadPdf",
|
|
20
|
+
EventRepertoryDownload = "eventRepertory-download",
|
|
20
21
|
EventRepertoryEdit = "eventRepertory-edit",
|
|
21
22
|
EventSetRollcall = "event-setRollCall",
|
|
22
23
|
FederationAddConfirmedAdmin = "federation-addConfirmedAdmin",
|
package/functions/index.js
CHANGED
|
@@ -21,6 +21,7 @@ var FbFunctionName;
|
|
|
21
21
|
FbFunctionName["EventPublish"] = "event-publish";
|
|
22
22
|
FbFunctionName["EventRemove"] = "event-remove";
|
|
23
23
|
FbFunctionName["EventRepertoryDownloadPdf"] = "eventRepertory-downloadPdf";
|
|
24
|
+
FbFunctionName["EventRepertoryDownload"] = "eventRepertory-download";
|
|
24
25
|
FbFunctionName["EventRepertoryEdit"] = "eventRepertory-edit";
|
|
25
26
|
FbFunctionName["EventSetRollcall"] = "event-setRollCall";
|
|
26
27
|
FbFunctionName["FederationAddConfirmedAdmin"] = "federation-addConfirmedAdmin";
|
package/functions/regions.js
CHANGED
|
@@ -60,6 +60,7 @@ const regionByFunctions = {
|
|
|
60
60
|
[index_1.FbFunctionName.EventPlayerEdit]: GCloudRegions.UsCentral1,
|
|
61
61
|
[index_1.FbFunctionName.EventRepertoryEdit]: GCloudRegions.UsCentral1,
|
|
62
62
|
[index_1.FbFunctionName.EventRepertoryDownloadPdf]: GCloudRegions.EuropeWest6,
|
|
63
|
+
[index_1.FbFunctionName.EventRepertoryDownload]: GCloudRegions.EuropeWest6,
|
|
63
64
|
[index_1.FbFunctionName.FederationAddPendingAdmin]: GCloudRegions.EuropeWest6,
|
|
64
65
|
[index_1.FbFunctionName.FederationAddConfirmedAdmin]: GCloudRegions.EuropeWest6,
|
|
65
66
|
[index_1.FbFunctionName.FederationRemoveAdmin]: GCloudRegions.EuropeWest6,
|
package/helpers/utils.js
CHANGED
|
@@ -10,7 +10,6 @@ const lodash_1 = require("lodash");
|
|
|
10
10
|
const get_1 = __importDefault(require("lodash/get"));
|
|
11
11
|
const lang_1 = require("../lang");
|
|
12
12
|
const Instrument_1 = __importDefault(require("../models/Instrument"));
|
|
13
|
-
const instruments_1 = require("./instruments");
|
|
14
13
|
const replaceVarsBrackets = (string, values) => {
|
|
15
14
|
const matches = string.match(/[^[\]]+(?=])/g);
|
|
16
15
|
let replaceString = string;
|
|
@@ -40,11 +39,10 @@ const replaceKeysNotification = (string, values, lang) => {
|
|
|
40
39
|
switch (type) {
|
|
41
40
|
case 'instrument': {
|
|
42
41
|
const instrumentId = get_1.default(newValues, key.split('.'));
|
|
43
|
-
if (!Object.values(instruments_1.InstrumentId).includes(instrumentId)) {
|
|
44
|
-
throw new Error(`Invalid instrumentId: ${instrumentId} from value: ${value}`);
|
|
45
|
-
}
|
|
46
42
|
const instrument = new Instrument_1.default(instrumentId, lang);
|
|
47
|
-
|
|
43
|
+
if (instrument) {
|
|
44
|
+
replaceString = replaceString.replace(match, instrument.name.toLowerCase());
|
|
45
|
+
}
|
|
48
46
|
break;
|
|
49
47
|
}
|
|
50
48
|
case 'date': {
|
|
@@ -24,7 +24,7 @@ export default class GroupRepertory extends Theme<GroupRepertoryData> {
|
|
|
24
24
|
get filesPath(): Partial<Record<FileSectionId, import("./types").GroupRepertoireFilePathItem[]>>;
|
|
25
25
|
get filesPathList(): {
|
|
26
26
|
path: string;
|
|
27
|
-
tag: string
|
|
27
|
+
tag: string;
|
|
28
28
|
sectionId: FileSectionId;
|
|
29
29
|
}[];
|
|
30
30
|
/** @deprecated use sections */
|