@glissandoo/lib 1.17.2 → 1.17.4
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/auth.d.ts +0 -1
- package/functions/communication.d.ts +0 -1
- package/functions/communicationComment.d.ts +0 -1
- package/functions/event.d.ts +0 -1
- package/functions/eventPlayer.d.ts +0 -1
- package/functions/eventRepertory.d.ts +1 -1
- package/functions/federation.d.ts +0 -1
- package/functions/federationPartnership.d.ts +0 -1
- package/functions/group.d.ts +0 -1
- package/functions/groupPlayer.d.ts +0 -1
- package/functions/groupRepertory.d.ts +0 -1
- package/functions/index.d.ts +0 -1
- package/functions/jwt.d.ts +0 -1
- package/functions/misc.d.ts +0 -1
- package/functions/notification.d.ts +0 -1
- package/functions/partner.d.ts +0 -1
- package/functions/partnership.d.ts +0 -1
- package/functions/partnershipGroup.d.ts +0 -1
- package/functions/partnershipPlan.d.ts +0 -1
- package/functions/regions.d.ts +0 -1
- package/functions/subscription.d.ts +0 -1
- package/functions/user.d.ts +0 -1
- package/helpers/appScenes.d.ts +0 -1
- package/helpers/audios.d.ts +29 -0
- package/helpers/audios.js +34 -0
- package/helpers/auth.d.ts +0 -1
- package/helpers/badges.d.ts +0 -1
- package/helpers/collections.d.ts +0 -1
- package/helpers/dlinks.d.ts +0 -1
- package/helpers/errors.d.ts +0 -1
- package/helpers/fileSections/index.d.ts +0 -1
- package/helpers/fileSections/orders.d.ts +0 -1
- package/helpers/instruments/index.d.ts +0 -1
- package/helpers/musicStyles/index.d.ts +0 -1
- package/helpers/musicStyles/orders.d.ts +0 -1
- package/helpers/notifications.d.ts +0 -1
- package/helpers/objects.d.ts +6 -0
- package/helpers/objects.js +28 -0
- package/helpers/payments.d.ts +0 -1
- package/helpers/plans.d.ts +0 -1
- package/helpers/rates.d.ts +0 -1
- package/helpers/reasons.d.ts +0 -1
- package/helpers/slate.d.ts +0 -1
- package/helpers/styles.d.ts +0 -1
- package/helpers/types.d.ts +0 -1
- package/helpers/utils.d.ts +0 -4
- package/helpers/utils.js +8 -16
- package/index.d.ts +0 -1
- package/lang/index.d.ts +0 -1
- package/models/Communication/Comment/index.d.ts +0 -1
- package/models/Communication/Comment/types.d.ts +0 -1
- package/models/Communication/index.d.ts +0 -1
- package/models/Communication/types.d.ts +0 -1
- package/models/Counters/Group/Analytics/index.d.ts +0 -1
- package/models/Counters/Group/Analytics/types.d.ts +0 -1
- package/models/Counters/Group/index.d.ts +0 -1
- package/models/Counters/Group/types.d.ts +0 -1
- package/models/Counters/event.d.ts +0 -1
- package/models/Counters/index.d.ts +0 -1
- package/models/Counters/types.d.ts +0 -1
- package/models/Evento/Player/index.d.ts +0 -1
- package/models/Evento/Player/types.d.ts +0 -1
- package/models/Evento/Repertory/index.d.ts +0 -1
- package/models/Evento/Repertory/types.d.ts +0 -1
- package/models/Evento/basic.d.ts +0 -1
- package/models/Evento/index.d.ts +0 -1
- package/models/Evento/promoter.d.ts +0 -1
- package/models/Evento/tiny.d.ts +0 -1
- package/models/Evento/types.d.ts +0 -1
- package/models/Federation/Partnership/index.d.ts +0 -1
- package/models/Federation/Partnership/types.d.ts +0 -1
- package/models/Federation/index.d.ts +0 -1
- package/models/Federation/types.d.ts +0 -1
- package/models/Group/Analytics/index.d.ts +0 -1
- package/models/Group/Analytics/types.d.ts +0 -1
- package/models/Group/Event/index.d.ts +0 -1
- package/models/Group/Event/types.d.ts +0 -1
- package/models/Group/Player/Event/index.d.ts +0 -1
- package/models/Group/Player/Event/types.d.ts +0 -1
- package/models/Group/Player/Log/index.d.ts +0 -1
- package/models/Group/Player/Log/types.d.ts +0 -1
- package/models/Group/Player/index.d.ts +0 -1
- package/models/Group/Player/types.d.ts +0 -1
- package/models/Group/Repertory/File/Section/index.d.ts +0 -1
- package/models/Group/Repertory/File/Section/types.d.ts +0 -1
- package/models/Group/Repertory/File/index.d.ts +0 -1
- package/models/Group/Repertory/File/index.js +2 -2
- package/models/Group/Repertory/File/types.d.ts +0 -1
- package/models/Group/Repertory/FilePath/index.d.ts +21 -0
- package/models/Group/Repertory/FilePath/index.js +41 -0
- package/models/Group/Repertory/index.d.ts +0 -1
- package/models/Group/Repertory/index.js +2 -2
- package/models/Group/Repertory/types.d.ts +0 -1
- package/models/Group/basic.d.ts +0 -1
- package/models/Group/index.d.ts +0 -1
- package/models/Group/index.js +4 -4
- package/models/Group/types.d.ts +0 -1
- package/models/Instrument/index.d.ts +0 -1
- package/models/Metrics/index.d.ts +0 -1
- package/models/Metrics/types.d.ts +0 -1
- package/models/Model.d.ts +0 -1
- package/models/MusicStyle/index.d.ts +0 -1
- package/models/Notification/index.d.ts +0 -1
- package/models/Notification/types.d.ts +0 -1
- package/models/Partner/basic.d.ts +0 -1
- package/models/Partner/index.d.ts +0 -1
- package/models/Partner/tiny.d.ts +0 -1
- package/models/Partner/types.d.ts +0 -1
- package/models/Partnership/Group/index.d.ts +0 -1
- package/models/Partnership/Group/types.d.ts +0 -1
- package/models/Partnership/Partner/Subscription/index.d.ts +0 -1
- package/models/Partnership/Partner/Subscription/types.d.ts +0 -1
- package/models/Partnership/Partner/index.d.ts +0 -1
- package/models/Partnership/Partner/types.d.ts +0 -1
- package/models/Partnership/Payment/index.d.ts +0 -1
- package/models/Partnership/Payment/types.d.ts +0 -1
- package/models/Partnership/Plan/basic.d.ts +0 -1
- package/models/Partnership/Plan/index.d.ts +0 -1
- package/models/Partnership/Plan/types.d.ts +0 -1
- package/models/Partnership/basic.d.ts +0 -1
- package/models/Partnership/index.d.ts +0 -1
- package/models/Partnership/types.d.ts +0 -1
- package/models/Payment/basic.d.ts +0 -1
- package/models/Payment/index.d.ts +0 -1
- package/models/Payment/types.d.ts +0 -1
- package/models/Player/basic.d.ts +0 -1
- package/models/Player/types.d.ts +0 -1
- package/models/Repertory/basic.d.ts +0 -1
- package/models/Repertory/types.d.ts +0 -1
- package/models/User/Group/index.d.ts +0 -1
- package/models/User/Group/types.d.ts +0 -1
- package/models/User/Notification/index.d.ts +0 -1
- package/models/User/Notification/types.d.ts +0 -1
- package/models/User/basic.d.ts +0 -1
- package/models/User/index.d.ts +0 -1
- package/models/User/types.d.ts +0 -1
- package/package.json +2 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const
|
|
3
|
+
const objects_1 = require("../../../../helpers/objects");
|
|
4
4
|
const types_1 = require("../../types");
|
|
5
5
|
class ThemeFile {
|
|
6
6
|
constructor(id, data) {
|
|
@@ -38,7 +38,7 @@ class ThemeFile {
|
|
|
38
38
|
return Object.keys(this.sections);
|
|
39
39
|
}
|
|
40
40
|
get sectionsList() {
|
|
41
|
-
const list =
|
|
41
|
+
const list = objects_1.toArray(this.sections);
|
|
42
42
|
return list.map((section) => this.isFileByPages
|
|
43
43
|
? {
|
|
44
44
|
sectionId: section.id,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { FileSectionId } from '../File/Section/types';
|
|
3
|
+
import { GroupRepertoireFilePathItem } from '../types';
|
|
4
|
+
import { LanguagesTypes } from '../../../../lang';
|
|
5
|
+
import FileSection from '../File/Section';
|
|
6
|
+
import Group from '../../';
|
|
7
|
+
import path from 'path';
|
|
8
|
+
export default class ThemeFilePath {
|
|
9
|
+
sectionId: FileSectionId;
|
|
10
|
+
protected data: GroupRepertoireFilePathItem;
|
|
11
|
+
protected lang: LanguagesTypes;
|
|
12
|
+
constructor(sectionId: FileSectionId, data: GroupRepertoireFilePathItem, lang?: LanguagesTypes);
|
|
13
|
+
get path(): string;
|
|
14
|
+
get parsedPath(): path.ParsedPath;
|
|
15
|
+
get ext(): string;
|
|
16
|
+
get isPdf(): boolean;
|
|
17
|
+
get isAudio(): boolean;
|
|
18
|
+
get section(): FileSection;
|
|
19
|
+
get tag(): string;
|
|
20
|
+
getTagName(group: Group): string | null;
|
|
21
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const lang_1 = require("../../../../lang");
|
|
7
|
+
const Section_1 = __importDefault(require("../File/Section"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const audios_1 = require("../../../../helpers/audios");
|
|
10
|
+
class ThemeFilePath {
|
|
11
|
+
constructor(sectionId, data, lang = lang_1.defaultLocale) {
|
|
12
|
+
this.sectionId = sectionId;
|
|
13
|
+
this.data = data;
|
|
14
|
+
this.lang = lang;
|
|
15
|
+
}
|
|
16
|
+
get path() {
|
|
17
|
+
return this.data.path;
|
|
18
|
+
}
|
|
19
|
+
get parsedPath() {
|
|
20
|
+
return path_1.default.parse(this.path);
|
|
21
|
+
}
|
|
22
|
+
get ext() {
|
|
23
|
+
return this.parsedPath.ext;
|
|
24
|
+
}
|
|
25
|
+
get isPdf() {
|
|
26
|
+
return this.ext === '.pdf';
|
|
27
|
+
}
|
|
28
|
+
get isAudio() {
|
|
29
|
+
return this.ext in audios_1.audioExtensions;
|
|
30
|
+
}
|
|
31
|
+
get section() {
|
|
32
|
+
return new Section_1.default(this.sectionId, this.lang);
|
|
33
|
+
}
|
|
34
|
+
get tag() {
|
|
35
|
+
return this.data.tag;
|
|
36
|
+
}
|
|
37
|
+
getTagName(group) {
|
|
38
|
+
return group.getRepertoireTagName(this.tag);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.default = ThemeFilePath;
|
|
@@ -8,7 +8,7 @@ const isFuture_1 = __importDefault(require("date-fns/isFuture"));
|
|
|
8
8
|
const lodash_1 = require("lodash");
|
|
9
9
|
const get_1 = __importDefault(require("lodash/get"));
|
|
10
10
|
const orderBy_1 = __importDefault(require("lodash/orderBy"));
|
|
11
|
-
const
|
|
11
|
+
const objects_1 = require("../../../helpers/objects");
|
|
12
12
|
const lang_1 = require("../../../lang");
|
|
13
13
|
const tiny_1 = __importDefault(require("../../Evento/tiny"));
|
|
14
14
|
const basic_1 = __importDefault(require("../../Repertory/basic"));
|
|
@@ -37,7 +37,7 @@ class GroupRepertory extends basic_1.default {
|
|
|
37
37
|
return this.data.files || {};
|
|
38
38
|
}
|
|
39
39
|
get fileList() {
|
|
40
|
-
return
|
|
40
|
+
return objects_1.toArray(this.files);
|
|
41
41
|
}
|
|
42
42
|
get sectionIds() {
|
|
43
43
|
return lodash_1.uniq(this.fileList.map((file) => Object.keys(file.sections)).flat());
|
package/models/Group/basic.d.ts
CHANGED
package/models/Group/index.d.ts
CHANGED
package/models/Group/index.js
CHANGED
|
@@ -7,7 +7,7 @@ const date_fns_1 = require("date-fns");
|
|
|
7
7
|
const lodash_1 = require("lodash");
|
|
8
8
|
const orders_1 = require("../../helpers/musicStyles/orders");
|
|
9
9
|
const plans_1 = require("../../helpers/plans");
|
|
10
|
-
const
|
|
10
|
+
const objects_1 = require("../../helpers/objects");
|
|
11
11
|
const lang_1 = require("../../lang");
|
|
12
12
|
const basic_1 = __importDefault(require("./basic"));
|
|
13
13
|
const types_1 = require("./types");
|
|
@@ -139,7 +139,7 @@ class Group extends basic_1.default {
|
|
|
139
139
|
return this.data.templates || {};
|
|
140
140
|
}
|
|
141
141
|
get templatesList() {
|
|
142
|
-
return
|
|
142
|
+
return objects_1.toArray(this.templates);
|
|
143
143
|
}
|
|
144
144
|
get satisfactionIndex() {
|
|
145
145
|
return this.data.satisfactionIndex || { current: 0, last: 0 };
|
|
@@ -157,7 +157,7 @@ class Group extends basic_1.default {
|
|
|
157
157
|
return this.data.stageTemplates || {};
|
|
158
158
|
}
|
|
159
159
|
get stageTemplatesList() {
|
|
160
|
-
return
|
|
160
|
+
return objects_1.toArray(this.stageTemplates);
|
|
161
161
|
}
|
|
162
162
|
get firstAnswerAt() {
|
|
163
163
|
return this.data.firstAnswerAt || null;
|
|
@@ -166,7 +166,7 @@ class Group extends basic_1.default {
|
|
|
166
166
|
return this.data.repertoireTags || {};
|
|
167
167
|
}
|
|
168
168
|
get repertoireTagsList() {
|
|
169
|
-
return
|
|
169
|
+
return objects_1.toArray(this.repertoireTags);
|
|
170
170
|
}
|
|
171
171
|
getRepertoireTagName(id) {
|
|
172
172
|
if (!(id in this.repertoireTags))
|
package/models/Group/types.d.ts
CHANGED
package/models/Model.d.ts
CHANGED
package/models/Partner/tiny.d.ts
CHANGED
package/models/Player/basic.d.ts
CHANGED
package/models/Player/types.d.ts
CHANGED
package/models/User/basic.d.ts
CHANGED
package/models/User/index.d.ts
CHANGED
package/models/User/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@glissandoo/lib",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.4",
|
|
4
4
|
"description": "Glissandoo library js",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"husky": "^8.0.1",
|
|
41
41
|
"lint-staged": "^12.4.1",
|
|
42
42
|
"prettier": "^2.2.1",
|
|
43
|
+
"ts-extras": "^0.11.0",
|
|
43
44
|
"typescript": "4.2.4"
|
|
44
45
|
},
|
|
45
46
|
"lint-staged": {
|