@glissandoo/lib 1.103.5 → 1.103.7

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.
@@ -12,6 +12,7 @@ export declare namespace CommunicationFbFunctionsTypes {
12
12
  type: CommunicationType;
13
13
  imagesPath: string[];
14
14
  attachmentsPath: string[];
15
+ blockAnswers: boolean;
15
16
  }
16
17
  type PublishResult = void;
17
18
  interface EditParams {
@@ -25,6 +26,7 @@ export declare namespace CommunicationFbFunctionsTypes {
25
26
  type: CommunicationType;
26
27
  imagesPath: string[];
27
28
  attachmentsPath: string[];
29
+ blockAnswers: boolean;
28
30
  }
29
31
  type EditResult = void;
30
32
  interface RemoveParams {
@@ -1,10 +1,12 @@
1
1
  import { InstrumentId } from '../../../../../helpers/instruments';
2
2
  import { LanguagesTypes } from '../../../../../lang';
3
+ import { GroupInstruments } from '../../../types';
3
4
  import { FileSectionId } from './types';
4
5
  export default class GroupRepertoryFileSection {
5
6
  id: FileSectionId;
7
+ groupInstruments: GroupInstruments;
6
8
  private lang;
7
- constructor(id: FileSectionId, lang?: LanguagesTypes);
9
+ constructor(id: FileSectionId, instruments: GroupInstruments, lang?: LanguagesTypes);
8
10
  get name(): string;
9
11
  getOrder(instrumentsIds: InstrumentId[]): number;
10
12
  }
@@ -5,17 +5,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const orders_1 = require("../../../../../helpers/fileSections/orders");
7
7
  const lang_1 = require("../../../../../lang");
8
- const Instrument_1 = __importDefault(require("../../../../Instrument"));
8
+ const group_1 = __importDefault(require("../../../../Instrument/group"));
9
9
  const types_1 = require("./types");
10
10
  class GroupRepertoryFileSection {
11
- constructor(id, lang = lang_1.defaultLocale) {
11
+ constructor(id, instruments, lang = lang_1.defaultLocale) {
12
12
  this.id = id;
13
+ this.groupInstruments = instruments;
13
14
  this.lang = lang;
14
15
  }
15
16
  get name() {
16
17
  return ((this.id === types_1.FileSectionIdReserved.All
17
18
  ? (0, lang_1.getTranslation)(`sections.all`, this.lang)
18
- : new Instrument_1.default(this.id, this.lang).name) || this.id);
19
+ : new group_1.default(this.id, this.lang, this.groupInstruments).name) || this.id);
19
20
  }
20
21
  getOrder(instrumentsIds) {
21
22
  return (0, orders_1.getFileSectionsOrder)(instrumentsIds).indexOf(this.id) + 1 || Infinity;
@@ -1,15 +1,17 @@
1
1
  /// <reference types="node" />
2
- import { FileSectionId } from '../File/Section/types';
3
- import { GroupRepertoireFilePathItem } from '../types';
2
+ import path from 'path';
3
+ import Group from '../../';
4
4
  import { LanguagesTypes } from '../../../../lang';
5
+ import { GroupInstruments } from '../../types';
5
6
  import FileSection from '../File/Section';
6
- import Group from '../../';
7
- import path from 'path';
7
+ import { FileSectionId } from '../File/Section/types';
8
+ import { GroupRepertoireFilePathItem } from '../types';
8
9
  export default class ThemeFilePath {
9
10
  sectionId: FileSectionId;
10
11
  protected data: GroupRepertoireFilePathItem;
11
12
  protected lang: LanguagesTypes;
12
- constructor(sectionId: FileSectionId, data: GroupRepertoireFilePathItem, lang?: LanguagesTypes);
13
+ protected instruments: GroupInstruments;
14
+ constructor(sectionId: FileSectionId, data: GroupRepertoireFilePathItem, instruments: GroupInstruments, lang?: LanguagesTypes);
13
15
  get path(): string;
14
16
  get parsedPath(): path.ParsedPath;
15
17
  get ext(): string;
@@ -3,13 +3,14 @@ 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
- const lang_1 = require("../../../../lang");
7
- const Section_1 = __importDefault(require("../File/Section"));
8
6
  const path_1 = __importDefault(require("path"));
9
7
  const audios_1 = require("../../../../helpers/audios");
8
+ const lang_1 = require("../../../../lang");
9
+ const Section_1 = __importDefault(require("../File/Section"));
10
10
  class ThemeFilePath {
11
- constructor(sectionId, data, lang = lang_1.defaultLocale) {
11
+ constructor(sectionId, data, instruments, lang = lang_1.defaultLocale) {
12
12
  this.sectionId = sectionId;
13
+ this.instruments = instruments;
13
14
  this.data = data;
14
15
  this.lang = lang;
15
16
  }
@@ -29,7 +30,7 @@ class ThemeFilePath {
29
30
  return audios_1.audioExtensions.includes(this.ext);
30
31
  }
31
32
  get section() {
32
- return new Section_1.default(this.sectionId, this.lang);
33
+ return new Section_1.default(this.sectionId, this.instruments, this.lang);
33
34
  }
34
35
  get tag() {
35
36
  return this.data.tag;
@@ -82,7 +82,7 @@ export default class Group extends GroupBasic<GroupData> {
82
82
  get trialEndAt(): Date;
83
83
  get glissandooAdminUrl(): string;
84
84
  get createdOn(): import("../../helpers/types").CreatedOn;
85
- get instruments(): Partial<Record<import("../../helpers/instruments").DefaultInstrumentId, import("./types").DefaultGroupInstrument>> & Record<`customInstrument-${string}`, CustomGroupInstrument>;
85
+ get instruments(): import("./types").GroupInstruments;
86
86
  get instrumentsList(): Pick<(import("./types").DefaultGroupInstrument & {
87
87
  id: import("../../helpers/instruments").DefaultInstrumentId | `customInstrument-${string}`;
88
88
  }) | (CustomGroupInstrument & {
@@ -130,6 +130,7 @@ export interface AGroupCustomInstrument extends CustomGroupInstrument {
130
130
  id: CustomInstrumentId;
131
131
  }
132
132
  export type AGroupInstrument = AGroupDefaultInstrument | AGroupCustomInstrument;
133
+ export type GroupInstruments = Partial<Record<DefaultInstrumentId, DefaultGroupInstrument>> & Record<CustomInstrumentId, CustomGroupInstrument>;
133
134
  export interface GroupData extends GroupBasicData {
134
135
  playerIds: string[];
135
136
  players: Record<string, PlayerBasicData>;
@@ -160,7 +161,7 @@ export interface GroupData extends GroupBasicData {
160
161
  eventCount: Record<EventType, number>;
161
162
  communicationCount: number;
162
163
  country: string;
163
- instruments: Partial<Record<DefaultInstrumentId, DefaultGroupInstrument>> & Record<CustomInstrumentId, CustomGroupInstrument>;
164
+ instruments: GroupInstruments;
164
165
  metadata: Record<string, string>;
165
166
  firstAnswerAt: Timestamp | null;
166
167
  repertoireTags: Record<string, GroupRepertoireTag>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glissandoo/lib",
3
- "version": "1.103.5",
3
+ "version": "1.103.7",
4
4
  "description": "Glissandoo library js",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",