@glissandoo/lib 1.16.4 → 1.16.6
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.
|
@@ -20,11 +20,13 @@ export default class GroupRepertory extends Theme<GroupRepertoryData> {
|
|
|
20
20
|
get fileList(): (import("./types").GroupRepertoireFile & {
|
|
21
21
|
id: string;
|
|
22
22
|
})[];
|
|
23
|
-
get
|
|
24
|
-
get
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
get sectionIds(): FileSectionId[];
|
|
24
|
+
get filesPath(): Partial<Record<FileSectionId, import("./types").GroupRepertoireFilePathItem[]>>;
|
|
25
|
+
get filesPathList(): {
|
|
26
|
+
path: string;
|
|
27
|
+
tag: string | null;
|
|
28
|
+
sectionId: FileSectionId;
|
|
29
|
+
}[];
|
|
28
30
|
/** @deprecated use sections */
|
|
29
31
|
get mainFilePath(): string | null;
|
|
30
32
|
get visibility(): GroupRepertoireVisibility;
|
|
@@ -39,14 +39,16 @@ class GroupRepertory extends basic_1.default {
|
|
|
39
39
|
get fileList() {
|
|
40
40
|
return utils_1.objToArray(this.files);
|
|
41
41
|
}
|
|
42
|
+
get sectionIds() {
|
|
43
|
+
return lodash_1.uniq(this.fileList.map((file) => Object.keys(file.sections)).flat());
|
|
44
|
+
}
|
|
42
45
|
get filesPath() {
|
|
43
46
|
return this.data.filesPath || {};
|
|
44
47
|
}
|
|
45
48
|
get filesPathList() {
|
|
46
|
-
return
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
return lodash_1.uniq(lodash_1.flatten(this.fileList.map((file) => Object.keys(file.sections))));
|
|
49
|
+
return Object.entries(this.filesPath)
|
|
50
|
+
.map(([sectionId, files]) => (files || []).map((file) => ({ sectionId: sectionId, ...file })))
|
|
51
|
+
.flat();
|
|
50
52
|
}
|
|
51
53
|
/** @deprecated use sections */
|
|
52
54
|
get mainFilePath() {
|
|
@@ -68,7 +68,7 @@ export interface GroupRepertoryData extends ThemeBasicData {
|
|
|
68
68
|
/** @deprecated */
|
|
69
69
|
identifyAt: Timestamp | null;
|
|
70
70
|
files: Record<string, GroupRepertoireFile>;
|
|
71
|
-
filesPath: Record<FileSectionId, GroupRepertoireFilePathItem
|
|
71
|
+
filesPath: Partial<Record<FileSectionId, GroupRepertoireFilePathItem[]>>;
|
|
72
72
|
votes: Record<string, number>;
|
|
73
73
|
thumbnailURL: string | null;
|
|
74
74
|
editedAt: Timestamp | null;
|