@lls/store 24.1.67-79d3c47f → 24.1.67-8127961
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/lib/builttypes/store/src/index.d.ts +0 -1
- package/lib/builttypes/store/src/schema/index.d.ts +1 -9
- package/lib/builttypes/store/src/selectors/book.d.ts +6 -6
- package/lib/builttypes/store/src/selectors/page.d.ts +1 -6
- package/lib/builttypes/store/src/selectors/subject.d.ts +3 -3
- package/lib/index.js +43 -64
- package/package.json +3 -3
- package/lib/builttypes/store/src/selectors/method.d.ts +0 -5
|
@@ -26,7 +26,6 @@ export * from '@lls/store/selectors/sharedPage';
|
|
|
26
26
|
export * from '@lls/store/selectors/student';
|
|
27
27
|
export * from '@lls/store/selectors/subject';
|
|
28
28
|
export * from '@lls/store/selectors/teacher';
|
|
29
|
-
export * from '@lls/store/selectors/method';
|
|
30
29
|
export * from '@lls/store/selectors/tool';
|
|
31
30
|
export * from '@lls/store/selectors/builderIo';
|
|
32
31
|
export { makeUseSearch } from '@lls/store/selectors/crud';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Book as BookModel, BuilderIo as BuilderIoModel, Chapter as ChapterModel, Collection as CollectionModel, CommunityProject as CommunityProjectModel, DocJson as DocJsonModel, Faq as FaqModel, GarDivision as GarDivisionModel, Group as GroupModel, Level as LevelModel, LexicalFlower as LexicalFlowerModel,
|
|
1
|
+
import type { Book as BookModel, BuilderIo as BuilderIoModel, Chapter as ChapterModel, Collection as CollectionModel, CommunityProject as CommunityProjectModel, DocJson as DocJsonModel, Faq as FaqModel, GarDivision as GarDivisionModel, Group as GroupModel, Level as LevelModel, LexicalFlower as LexicalFlowerModel, News as NewsModel, Notification as NotificationModel, Page as PageModel, Panorama as PanoramaModel, PremiumResource as PremiumResourceModel, Product as ProductModel, Resource as ResourceModel, School as SchoolModel, SchoolType as SchoolTypeModel, Subject as SubjectModel, Tool as ToolModel, User as UserModel } from '@lls/store/types/models';
|
|
2
2
|
import { schema } from 'normalizr';
|
|
3
3
|
type Norm<M, S> = {
|
|
4
4
|
[K in Exclude<keyof M, keyof S>]?: M[K];
|
|
@@ -20,7 +20,6 @@ declare const bookSchema: {
|
|
|
20
20
|
revisionPages: schema.Entity<any>[];
|
|
21
21
|
subjects: schema.Entity<any>[];
|
|
22
22
|
textbooks: schema.Entity<any>[];
|
|
23
|
-
educationalGuides: schema.Entity<any>[];
|
|
24
23
|
tools: schema.Entity<any>[];
|
|
25
24
|
workbooks: schema.Entity<any>[];
|
|
26
25
|
workplans: schema.Entity<any>[];
|
|
@@ -121,10 +120,6 @@ declare const groupSchema: {
|
|
|
121
120
|
students: schema.Entity<any>[];
|
|
122
121
|
};
|
|
123
122
|
export type Group = Norm<GroupModel, typeof groupSchema>;
|
|
124
|
-
declare const methodSchema: {
|
|
125
|
-
book: schema.Entity<any>;
|
|
126
|
-
};
|
|
127
|
-
export type Method = Norm<MethodModel, typeof methodSchema>;
|
|
128
123
|
declare const newsSchema: {
|
|
129
124
|
books: schema.Entity<any>[];
|
|
130
125
|
subjects: schema.Entity<any>[];
|
|
@@ -144,9 +139,6 @@ export declare const querySchema: {
|
|
|
144
139
|
books: {
|
|
145
140
|
hits: schema.Entity<any>[];
|
|
146
141
|
};
|
|
147
|
-
methods: {
|
|
148
|
-
hits: schema.Entity<any>[];
|
|
149
|
-
};
|
|
150
142
|
chapters: {
|
|
151
143
|
hits: schema.Entity<any>[];
|
|
152
144
|
};
|
|
@@ -10,7 +10,7 @@ type SearchParams = AllowUndefined<Pick<Book, 'isWorkbook' | 'isWorkplan' | 'has
|
|
|
10
10
|
uris?: Book['uri'][];
|
|
11
11
|
isValid?: Book['valid'];
|
|
12
12
|
hasNoTeacherBook?: boolean;
|
|
13
|
-
sortByQuery?: ((a: Book
|
|
13
|
+
sortByQuery?: ((a: Book, b: Book) => boolean) | keyof Book;
|
|
14
14
|
publishers?: Publisher[];
|
|
15
15
|
}>;
|
|
16
16
|
declare const getBooks: (state: import("@lls/utils").TState<Book>) => Book[], getBook: (state: import("@lls/utils").TState<Book>, entityId: number | string | undefined | null) => Book | undefined, filterBooks: ({ ids, levelIds, subjectIds, years, isValid, isWorkbook, isWorkplan, hasNoTeacherBook, sortByQuery, hasNewDesign, slugs, uris, publishers, isRenewed, isPrimary }: SearchParams) => ((books: Book[]) => Book[]), useSearchBooks: (params: {
|
|
@@ -27,7 +27,7 @@ declare const getBooks: (state: import("@lls/utils").TState<Book>) => Book[], ge
|
|
|
27
27
|
uris?: Book["uri"][] | undefined;
|
|
28
28
|
isValid?: Book["valid"];
|
|
29
29
|
hasNoTeacherBook?: boolean | undefined;
|
|
30
|
-
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "
|
|
30
|
+
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "tools" | "workbooks" | "workplans" | "uri" | "valid" | "year" | "displayTitle" | "renderer" | "resourcesMenu" | "renewalLabel" | "urlLite" | "isWorkplan" | "isWorkbook" | "isEducationalGuide" | "hasNewDesign" | "slug" | "publisher" | "isRenewed" | "isPrimary" | "isClassic" | "nbContributors" | "teaser" | "summary" | "teacherBook" | "url" | "hasNoTeacherBook" | {} | undefined;
|
|
31
31
|
publishers?: (string | undefined)[] | undefined;
|
|
32
32
|
}) => Book[], makeSearchBooks: () => ((state: import("../types/store").EntitiesState, params: {
|
|
33
33
|
isWorkplan?: boolean | undefined;
|
|
@@ -43,7 +43,7 @@ declare const getBooks: (state: import("@lls/utils").TState<Book>) => Book[], ge
|
|
|
43
43
|
uris?: Book["uri"][] | undefined;
|
|
44
44
|
isValid?: Book["valid"];
|
|
45
45
|
hasNoTeacherBook?: boolean | undefined;
|
|
46
|
-
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "
|
|
46
|
+
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "tools" | "workbooks" | "workplans" | "uri" | "valid" | "year" | "displayTitle" | "renderer" | "resourcesMenu" | "renewalLabel" | "urlLite" | "isWorkplan" | "isWorkbook" | "isEducationalGuide" | "hasNewDesign" | "slug" | "publisher" | "isRenewed" | "isPrimary" | "isClassic" | "nbContributors" | "teaser" | "summary" | "teacherBook" | "url" | "hasNoTeacherBook" | {} | undefined;
|
|
47
47
|
publishers?: (string | undefined)[] | undefined;
|
|
48
48
|
}) => Book[]) & import("reselect").OutputSelectorFields<(args_0: Book[], args_1: {
|
|
49
49
|
isWorkplan?: boolean | undefined;
|
|
@@ -59,7 +59,7 @@ declare const getBooks: (state: import("@lls/utils").TState<Book>) => Book[], ge
|
|
|
59
59
|
uris?: Book["uri"][] | undefined;
|
|
60
60
|
isValid?: Book["valid"];
|
|
61
61
|
hasNoTeacherBook?: boolean | undefined;
|
|
62
|
-
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "
|
|
62
|
+
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "tools" | "workbooks" | "workplans" | "uri" | "valid" | "year" | "displayTitle" | "renderer" | "resourcesMenu" | "renewalLabel" | "urlLite" | "isWorkplan" | "isWorkbook" | "isEducationalGuide" | "hasNewDesign" | "slug" | "publisher" | "isRenewed" | "isPrimary" | "isClassic" | "nbContributors" | "teaser" | "summary" | "teacherBook" | "url" | "hasNoTeacherBook" | {} | undefined;
|
|
63
63
|
publishers?: (string | undefined)[] | undefined;
|
|
64
64
|
}) => Book[], {
|
|
65
65
|
clearCache: () => void;
|
|
@@ -81,7 +81,7 @@ export declare const makeSearchValidBooks: () => ((state: import("../types/store
|
|
|
81
81
|
uris?: Book["uri"][] | undefined;
|
|
82
82
|
isValid?: Book["valid"];
|
|
83
83
|
hasNoTeacherBook?: boolean | undefined;
|
|
84
|
-
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "
|
|
84
|
+
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "tools" | "workbooks" | "workplans" | "uri" | "valid" | "year" | "displayTitle" | "renderer" | "resourcesMenu" | "renewalLabel" | "urlLite" | "isWorkplan" | "isWorkbook" | "isEducationalGuide" | "hasNewDesign" | "slug" | "publisher" | "isRenewed" | "isPrimary" | "isClassic" | "nbContributors" | "teaser" | "summary" | "teacherBook" | "url" | "hasNoTeacherBook" | {} | undefined;
|
|
85
85
|
publishers?: (string | undefined)[] | undefined;
|
|
86
86
|
}) => Book[]) & import("reselect").OutputSelectorFields<(args_0: Book[]) => Book[], {
|
|
87
87
|
clearCache: () => void;
|
|
@@ -102,7 +102,7 @@ export declare const useSearchValidBooks: (params: {
|
|
|
102
102
|
uris?: Book["uri"][] | undefined;
|
|
103
103
|
isValid?: Book["valid"];
|
|
104
104
|
hasNoTeacherBook?: boolean | undefined;
|
|
105
|
-
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "
|
|
105
|
+
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "tools" | "workbooks" | "workplans" | "uri" | "valid" | "year" | "displayTitle" | "renderer" | "resourcesMenu" | "renewalLabel" | "urlLite" | "isWorkplan" | "isWorkbook" | "isEducationalGuide" | "hasNewDesign" | "slug" | "publisher" | "isRenewed" | "isPrimary" | "isClassic" | "nbContributors" | "teaser" | "summary" | "teacherBook" | "url" | "hasNoTeacherBook" | {} | undefined;
|
|
106
106
|
publishers?: (string | undefined)[] | undefined;
|
|
107
107
|
}) => Book[];
|
|
108
108
|
export declare const makeGetBook: () => (state: import("@lls/utils").TState<Book>, entityId: number | string | undefined | null) => Book | undefined;
|
|
@@ -8,9 +8,8 @@ type SearchParams = AllowUndefined<Pick<Page, 'isOriginal' | 'hasNewDesign' | 'p
|
|
|
8
8
|
oldLessonIds?: Page['oldLesson'][];
|
|
9
9
|
bookIds?: Page['book'][];
|
|
10
10
|
thematicNames: Page['thematicName'][];
|
|
11
|
-
sortByQuery?: (a: Page[]) => Page[] | keyof Page;
|
|
12
11
|
}>;
|
|
13
|
-
export declare const getPages: (state: import("@lls/utils").TState<Page>) => Page[], getPage: (state: import("@lls/utils").TState<Page>, entityId: number | string | undefined | null) => Page | undefined, filterPages: ({ ids, chapterIds, isValid, oldLessonIds, premium, thematicNames, bookIds, isOriginal, hasNewDesign, slugs, isLearningAssessment, isCreatedFromScratch, userIds, parentIds, originalPageIds, sharedUserIds, sharedGroups, isDraft, isParentCreatedFromScratch, updatedAfter
|
|
12
|
+
export declare const getPages: (state: import("@lls/utils").TState<Page>) => Page[], getPage: (state: import("@lls/utils").TState<Page>, entityId: number | string | undefined | null) => Page | undefined, filterPages: ({ ids, chapterIds, isValid, oldLessonIds, premium, thematicNames, bookIds, isOriginal, hasNewDesign, slugs, isLearningAssessment, isCreatedFromScratch, userIds, parentIds, originalPageIds, sharedUserIds, sharedGroups, isDraft, isParentCreatedFromScratch, updatedAfter }: SearchParams & SearchModifiedPagesParams) => ((pages: Page[]) => Page[]), useSearchPages: (params: {
|
|
14
13
|
hasNewDesign?: boolean | undefined;
|
|
15
14
|
isOriginal?: boolean | undefined;
|
|
16
15
|
premium?: boolean | null | undefined;
|
|
@@ -23,7 +22,6 @@ export declare const getPages: (state: import("@lls/utils").TState<Page>) => Pag
|
|
|
23
22
|
oldLessonIds?: Page["oldLesson"][] | undefined;
|
|
24
23
|
bookIds?: Page["book"][] | undefined;
|
|
25
24
|
thematicNames?: (string | undefined)[] | undefined;
|
|
26
|
-
sortByQuery?: {} | undefined;
|
|
27
25
|
} & SearchModifiedPagesParams) => Page[], makeSearchPages: () => ((state: import("../types/store").EntitiesState, params: {
|
|
28
26
|
hasNewDesign?: boolean | undefined;
|
|
29
27
|
isOriginal?: boolean | undefined;
|
|
@@ -37,7 +35,6 @@ export declare const getPages: (state: import("@lls/utils").TState<Page>) => Pag
|
|
|
37
35
|
oldLessonIds?: Page["oldLesson"][] | undefined;
|
|
38
36
|
bookIds?: Page["book"][] | undefined;
|
|
39
37
|
thematicNames?: (string | undefined)[] | undefined;
|
|
40
|
-
sortByQuery?: {} | undefined;
|
|
41
38
|
} & SearchModifiedPagesParams) => Page[]) & import("reselect").OutputSelectorFields<(args_0: Page[], args_1: {
|
|
42
39
|
hasNewDesign?: boolean | undefined;
|
|
43
40
|
isOriginal?: boolean | undefined;
|
|
@@ -51,7 +48,6 @@ export declare const getPages: (state: import("@lls/utils").TState<Page>) => Pag
|
|
|
51
48
|
oldLessonIds?: Page["oldLesson"][] | undefined;
|
|
52
49
|
bookIds?: Page["book"][] | undefined;
|
|
53
50
|
thematicNames?: (string | undefined)[] | undefined;
|
|
54
|
-
sortByQuery?: {} | undefined;
|
|
55
51
|
} & SearchModifiedPagesParams) => Page[], {
|
|
56
52
|
clearCache: () => void;
|
|
57
53
|
}> & {
|
|
@@ -70,7 +66,6 @@ export declare const getDrafts: (state: import("@lls/utils").TState<Page>) => Pa
|
|
|
70
66
|
oldLessonIds?: Page["oldLesson"][] | undefined;
|
|
71
67
|
bookIds?: Page["book"][] | undefined;
|
|
72
68
|
thematicNames?: (string | undefined)[] | undefined;
|
|
73
|
-
sortByQuery?: {} | undefined;
|
|
74
69
|
} & SearchModifiedPagesParams) => Page[];
|
|
75
70
|
type SearchModifiedPagesParams = {
|
|
76
71
|
chapterIds?: Page['chapter'][];
|
|
@@ -7,7 +7,7 @@ export declare const getSubjects: (state: import("@lls/utils").TState<Subject>)
|
|
|
7
7
|
schoolTypes?: (string | undefined)[] | undefined;
|
|
8
8
|
hasBooks?: Subject["hasBooks"];
|
|
9
9
|
names?: ("Autre" | "Design et métiers d'art" | "Langues et cultures de l'Antiquité" | "Littérature, langues et cultures de l'Antiquité" | "Sciences de l'ingénieur" | "Support à l'action managériale" | "Allemand" | "Anglais" | "Arts appliqués et culture artistique" | "Arts plastiques" | "Arts" | "Autre enseignement professionnel" | "Biochimie-Biologie" | "Biologie et physiopathologie humaines" | "Biologie-Écologie" | "Biotechnologies" | "Bâtiment" | "CEJM" | "Chinois" | "Commerce international" | "Communication" | "Comptabilité" | "Conjugaison" | "Culture générale et expression" | "Documentation" | "Droit" | "Economie et Gestion" | "Enseignement Scientifique" | "Enseignement scientifique" | "Enseignements spécifiques STL" | "Espagnol" | "Français" | "Gestion administrative" | "Gestion commerciale" | "Gestion de la PME" | "Gestion" | "Grammaire" | "Géographie" | "Histoire des Arts" | "Histoire" | "Histoire-Géographie, géopolitique et sciences politiques" | "Histoire-Géographie-EMC" | "Humanités, littérature et philosophie" | "Hôtellerie restauration" | "Informatique" | "Ingénierie et développement durable" | "Innovation technologique" | "Italien" | "Langue vivante rare" | "Langues, littératures et cultures étrangères et régionales" | "Logistique" | "Maintenance" | "Management commercial opérationnel" | "Management" | "Mathématiques" | "Mercatique" | "Mécanique" | "Numérique et sciences informatiques" | "Négociation et relation client" | "Orthographe" | "Outils et langages numériques" | "PSE" | "Philosophie" | "Physique-Chimie pour la santé" | "Physique-Chimie" | "Prévention Santé Environnement" | "Relation client" | "SES" | "SNT" | "SVT" | "Sciences appliquées" | "Sciences de gestion et numérique" | "Sciences de la vie et de la Terre" | "Sciences et Technologie" | "Sciences et techniques sanitaires et sociales" | "Sciences numériques et technologie" | "Sciences physiques et chimiques en laboratoire" | "Sciences physiques" | "Sciences économiques et sociales" | "Sciences" | "Technologie" | "Transport" | "Économie et gestion hôtellière" | "Économie" | "Économie-Droit" | "Économie-Gestion" | "Éducation civique" | "Éducation musicale" | null | undefined)[] | undefined;
|
|
10
|
-
sortByQuery?: "id" | "slug" | "url" | "name" | "schoolTypes" | "hasBooks" | "newsletterUrl" |
|
|
10
|
+
sortByQuery?: "id" | "slug" | "url" | "name" | "schoolTypes" | "hasBooks" | "newsletterUrl" | {} | undefined;
|
|
11
11
|
}) => Subject[], makeSearchSubjects: () => ((state: import("../types/store").EntitiesState, params: {
|
|
12
12
|
ids?: Subject["id"][] | undefined;
|
|
13
13
|
slugs?: Subject["slug"][] | undefined;
|
|
@@ -16,7 +16,7 @@ export declare const getSubjects: (state: import("@lls/utils").TState<Subject>)
|
|
|
16
16
|
schoolTypes?: (string | undefined)[] | undefined;
|
|
17
17
|
hasBooks?: Subject["hasBooks"];
|
|
18
18
|
names?: ("Autre" | "Design et métiers d'art" | "Langues et cultures de l'Antiquité" | "Littérature, langues et cultures de l'Antiquité" | "Sciences de l'ingénieur" | "Support à l'action managériale" | "Allemand" | "Anglais" | "Arts appliqués et culture artistique" | "Arts plastiques" | "Arts" | "Autre enseignement professionnel" | "Biochimie-Biologie" | "Biologie et physiopathologie humaines" | "Biologie-Écologie" | "Biotechnologies" | "Bâtiment" | "CEJM" | "Chinois" | "Commerce international" | "Communication" | "Comptabilité" | "Conjugaison" | "Culture générale et expression" | "Documentation" | "Droit" | "Economie et Gestion" | "Enseignement Scientifique" | "Enseignement scientifique" | "Enseignements spécifiques STL" | "Espagnol" | "Français" | "Gestion administrative" | "Gestion commerciale" | "Gestion de la PME" | "Gestion" | "Grammaire" | "Géographie" | "Histoire des Arts" | "Histoire" | "Histoire-Géographie, géopolitique et sciences politiques" | "Histoire-Géographie-EMC" | "Humanités, littérature et philosophie" | "Hôtellerie restauration" | "Informatique" | "Ingénierie et développement durable" | "Innovation technologique" | "Italien" | "Langue vivante rare" | "Langues, littératures et cultures étrangères et régionales" | "Logistique" | "Maintenance" | "Management commercial opérationnel" | "Management" | "Mathématiques" | "Mercatique" | "Mécanique" | "Numérique et sciences informatiques" | "Négociation et relation client" | "Orthographe" | "Outils et langages numériques" | "PSE" | "Philosophie" | "Physique-Chimie pour la santé" | "Physique-Chimie" | "Prévention Santé Environnement" | "Relation client" | "SES" | "SNT" | "SVT" | "Sciences appliquées" | "Sciences de gestion et numérique" | "Sciences de la vie et de la Terre" | "Sciences et Technologie" | "Sciences et techniques sanitaires et sociales" | "Sciences numériques et technologie" | "Sciences physiques et chimiques en laboratoire" | "Sciences physiques" | "Sciences économiques et sociales" | "Sciences" | "Technologie" | "Transport" | "Économie et gestion hôtellière" | "Économie" | "Économie-Droit" | "Économie-Gestion" | "Éducation civique" | "Éducation musicale" | null | undefined)[] | undefined;
|
|
19
|
-
sortByQuery?: "id" | "slug" | "url" | "name" | "schoolTypes" | "hasBooks" | "newsletterUrl" |
|
|
19
|
+
sortByQuery?: "id" | "slug" | "url" | "name" | "schoolTypes" | "hasBooks" | "newsletterUrl" | {} | undefined;
|
|
20
20
|
}) => Subject[]) & import("reselect").OutputSelectorFields<(args_0: Subject[], args_1: {
|
|
21
21
|
ids?: Subject["id"][] | undefined;
|
|
22
22
|
slugs?: Subject["slug"][] | undefined;
|
|
@@ -25,7 +25,7 @@ export declare const getSubjects: (state: import("@lls/utils").TState<Subject>)
|
|
|
25
25
|
schoolTypes?: (string | undefined)[] | undefined;
|
|
26
26
|
hasBooks?: Subject["hasBooks"];
|
|
27
27
|
names?: ("Autre" | "Design et métiers d'art" | "Langues et cultures de l'Antiquité" | "Littérature, langues et cultures de l'Antiquité" | "Sciences de l'ingénieur" | "Support à l'action managériale" | "Allemand" | "Anglais" | "Arts appliqués et culture artistique" | "Arts plastiques" | "Arts" | "Autre enseignement professionnel" | "Biochimie-Biologie" | "Biologie et physiopathologie humaines" | "Biologie-Écologie" | "Biotechnologies" | "Bâtiment" | "CEJM" | "Chinois" | "Commerce international" | "Communication" | "Comptabilité" | "Conjugaison" | "Culture générale et expression" | "Documentation" | "Droit" | "Economie et Gestion" | "Enseignement Scientifique" | "Enseignement scientifique" | "Enseignements spécifiques STL" | "Espagnol" | "Français" | "Gestion administrative" | "Gestion commerciale" | "Gestion de la PME" | "Gestion" | "Grammaire" | "Géographie" | "Histoire des Arts" | "Histoire" | "Histoire-Géographie, géopolitique et sciences politiques" | "Histoire-Géographie-EMC" | "Humanités, littérature et philosophie" | "Hôtellerie restauration" | "Informatique" | "Ingénierie et développement durable" | "Innovation technologique" | "Italien" | "Langue vivante rare" | "Langues, littératures et cultures étrangères et régionales" | "Logistique" | "Maintenance" | "Management commercial opérationnel" | "Management" | "Mathématiques" | "Mercatique" | "Mécanique" | "Numérique et sciences informatiques" | "Négociation et relation client" | "Orthographe" | "Outils et langages numériques" | "PSE" | "Philosophie" | "Physique-Chimie pour la santé" | "Physique-Chimie" | "Prévention Santé Environnement" | "Relation client" | "SES" | "SNT" | "SVT" | "Sciences appliquées" | "Sciences de gestion et numérique" | "Sciences de la vie et de la Terre" | "Sciences et Technologie" | "Sciences et techniques sanitaires et sociales" | "Sciences numériques et technologie" | "Sciences physiques et chimiques en laboratoire" | "Sciences physiques" | "Sciences économiques et sociales" | "Sciences" | "Technologie" | "Transport" | "Économie et gestion hôtellière" | "Économie" | "Économie-Droit" | "Économie-Gestion" | "Éducation civique" | "Éducation musicale" | null | undefined)[] | undefined;
|
|
28
|
-
sortByQuery?: "id" | "slug" | "url" | "name" | "schoolTypes" | "hasBooks" | "newsletterUrl" |
|
|
28
|
+
sortByQuery?: "id" | "slug" | "url" | "name" | "schoolTypes" | "hasBooks" | "newsletterUrl" | {} | undefined;
|
|
29
29
|
}) => Subject[], {
|
|
30
30
|
clearCache: () => void;
|
|
31
31
|
}> & {
|
package/lib/index.js
CHANGED
|
@@ -631,8 +631,8 @@ var require_normalizr = __commonJS({
|
|
|
631
631
|
return value;
|
|
632
632
|
}
|
|
633
633
|
if (typeof schema3 === "object" && (!schema3.normalize || typeof schema3.normalize !== "function")) {
|
|
634
|
-
var
|
|
635
|
-
return
|
|
634
|
+
var method = Array.isArray(schema3) ? normalize2 : _normalize;
|
|
635
|
+
return method(schema3, value, parent, key, visit2, addEntity, visitedEntities);
|
|
636
636
|
}
|
|
637
637
|
return schema3.normalize(value, parent, key, visit2, addEntity, visitedEntities);
|
|
638
638
|
};
|
|
@@ -694,8 +694,8 @@ var require_normalizr = __commonJS({
|
|
|
694
694
|
var getEntity = getEntities(entities2);
|
|
695
695
|
return function unvisit(input, schema3) {
|
|
696
696
|
if (typeof schema3 === "object" && (!schema3.denormalize || typeof schema3.denormalize !== "function")) {
|
|
697
|
-
var
|
|
698
|
-
return
|
|
697
|
+
var method = Array.isArray(schema3) ? denormalize : _denormalize;
|
|
698
|
+
return method(schema3, input, unvisit);
|
|
699
699
|
}
|
|
700
700
|
if (input === void 0 || input === null) {
|
|
701
701
|
return input;
|
|
@@ -749,12 +749,12 @@ init_define_import_meta();
|
|
|
749
749
|
import { createSearchSelector, makeGetAllEntities, makeGetEntityById } from "@lls/utils";
|
|
750
750
|
import { useMemo } from "react";
|
|
751
751
|
import { useSelector } from "react-redux";
|
|
752
|
-
var crud = (entityName, { search:
|
|
752
|
+
var crud = (entityName, { search: search28 }) => {
|
|
753
753
|
const getElements = makeGetAllEntities(entityName);
|
|
754
754
|
const makeSearchElements = () => createSearchSelector(
|
|
755
755
|
makeGetAllEntities(entityName),
|
|
756
756
|
(_state, params) => params,
|
|
757
|
-
(elements, params) =>
|
|
757
|
+
(elements, params) => search28(params)(elements)
|
|
758
758
|
);
|
|
759
759
|
const methodName = `${entityName.charAt(0).toUpperCase()}${entityName.slice(1)}`;
|
|
760
760
|
const getElementById = makeGetEntityById(entityName);
|
|
@@ -764,7 +764,7 @@ var crud = (entityName, { search: search29 }) => {
|
|
|
764
764
|
[`search${methodName}`]: makeSearchElements(),
|
|
765
765
|
[`get${methodName.replace(/s$/, "")}`]: getElementById,
|
|
766
766
|
[`makeSearch${methodName}`]: makeSearchElements,
|
|
767
|
-
[`filter${methodName}`]:
|
|
767
|
+
[`filter${methodName}`]: search28,
|
|
768
768
|
[`useSearch${methodName}`]: useSearch
|
|
769
769
|
};
|
|
770
770
|
return back;
|
|
@@ -866,7 +866,7 @@ var { getChapters, getChapter, useSearchChapters } = crud("chapters", {
|
|
|
866
866
|
|
|
867
867
|
// src/selectors/page.ts
|
|
868
868
|
init_define_import_meta();
|
|
869
|
-
import { makeEntitiesFilter as makeEntitiesFilter5
|
|
869
|
+
import { makeEntitiesFilter as makeEntitiesFilter5 } from "@lls/utils";
|
|
870
870
|
import _4 from "lodash/fp.js";
|
|
871
871
|
var search5 = ({
|
|
872
872
|
ids,
|
|
@@ -888,40 +888,35 @@ var search5 = ({
|
|
|
888
888
|
sharedGroups,
|
|
889
889
|
isDraft,
|
|
890
890
|
isParentCreatedFromScratch,
|
|
891
|
-
updatedAfter
|
|
892
|
-
sortByQuery
|
|
891
|
+
updatedAfter
|
|
893
892
|
}) => {
|
|
894
893
|
let pageById = false;
|
|
895
|
-
return (
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
}),
|
|
922
|
-
updatedAfter && _4.flow(_4.get("updatedAt"), (date) => new Date(date).getTime() - updatedAfter.getTime() >= 0)
|
|
923
|
-
),
|
|
924
|
-
_4.isFunction(sortByQuery) ? sortByQuery : sortByQuery ? _4.sortBy(sortByQuery) : _4.identity
|
|
894
|
+
return makeEntitiesFilter5(
|
|
895
|
+
{
|
|
896
|
+
id: ids,
|
|
897
|
+
chapter: chapterIds,
|
|
898
|
+
valid: isValid,
|
|
899
|
+
isOriginal,
|
|
900
|
+
hasNewDesign,
|
|
901
|
+
slug: slugs,
|
|
902
|
+
oldLesson: oldLessonIds,
|
|
903
|
+
isLearningAssessment,
|
|
904
|
+
isCreatedFromScratch,
|
|
905
|
+
premium,
|
|
906
|
+
thematicName: thematicNames,
|
|
907
|
+
book: bookIds,
|
|
908
|
+
parent: parentIds,
|
|
909
|
+
user: userIds,
|
|
910
|
+
originalPage: originalPageIds,
|
|
911
|
+
sharedUsers: sharedUserIds,
|
|
912
|
+
sharedGroups,
|
|
913
|
+
isDraft
|
|
914
|
+
},
|
|
915
|
+
isParentCreatedFromScratch && ((page2, pages) => {
|
|
916
|
+
pageById = pageById || _4.keyBy("id", pages);
|
|
917
|
+
return !!_4.get([page2?.originalPage, "isCreatedFromScratch"], pageById);
|
|
918
|
+
}),
|
|
919
|
+
updatedAfter && _4.flow(_4.get("updatedAt"), (date) => new Date(date).getTime() - updatedAfter.getTime() >= 0)
|
|
925
920
|
);
|
|
926
921
|
};
|
|
927
922
|
var { getPages, getPage, filterPages, useSearchPages, makeSearchPages } = crud("pages", {
|
|
@@ -1212,7 +1207,7 @@ var { getStudents, getStudent, useSearchStudents } = crud("students", {
|
|
|
1212
1207
|
|
|
1213
1208
|
// src/selectors/subject.ts
|
|
1214
1209
|
init_define_import_meta();
|
|
1215
|
-
import { limitToTeacherSubjects, makeEntitiesFilter as makeEntitiesFilter21, pipe as
|
|
1210
|
+
import { limitToTeacherSubjects, makeEntitiesFilter as makeEntitiesFilter21, pipe as pipe3 } from "@lls/utils";
|
|
1216
1211
|
import _13 from "lodash/fp.js";
|
|
1217
1212
|
var search24 = ({
|
|
1218
1213
|
ids,
|
|
@@ -1223,7 +1218,7 @@ var search24 = ({
|
|
|
1223
1218
|
hasBooks,
|
|
1224
1219
|
names,
|
|
1225
1220
|
sortByQuery
|
|
1226
|
-
}) => (subjects) =>
|
|
1221
|
+
}) => (subjects) => pipe3(
|
|
1227
1222
|
subjects,
|
|
1228
1223
|
makeEntitiesFilter21(
|
|
1229
1224
|
{
|
|
@@ -1253,30 +1248,22 @@ var { getTeachers, getTeacher, useSearchTeachers } = crud("teachers", {
|
|
|
1253
1248
|
search: search25
|
|
1254
1249
|
});
|
|
1255
1250
|
|
|
1256
|
-
// src/selectors/method.ts
|
|
1257
|
-
init_define_import_meta();
|
|
1258
|
-
import { makeEntitiesFilter as makeEntitiesFilter23 } from "@lls/utils";
|
|
1259
|
-
var search26 = ({ ids, uris }) => makeEntitiesFilter23({ id: ids, uri: uris });
|
|
1260
|
-
var { getMethods, useSearchMethods } = crud("methods", {
|
|
1261
|
-
search: search26
|
|
1262
|
-
});
|
|
1263
|
-
|
|
1264
1251
|
// src/selectors/tool.ts
|
|
1265
1252
|
init_define_import_meta();
|
|
1266
|
-
import { makeEntitiesFilter as
|
|
1267
|
-
var
|
|
1253
|
+
import { makeEntitiesFilter as makeEntitiesFilter23 } from "@lls/utils";
|
|
1254
|
+
var search26 = ({ ids, locked, bookIds }) => makeEntitiesFilter23({
|
|
1268
1255
|
id: ids,
|
|
1269
1256
|
locked,
|
|
1270
1257
|
books: bookIds
|
|
1271
1258
|
});
|
|
1272
1259
|
var { getTools, getTool, useSearchTools } = crud("tools", {
|
|
1273
|
-
search:
|
|
1260
|
+
search: search26
|
|
1274
1261
|
});
|
|
1275
1262
|
|
|
1276
1263
|
// src/selectors/builderIo.ts
|
|
1277
1264
|
init_define_import_meta();
|
|
1278
|
-
import { makeEntitiesFilter as
|
|
1279
|
-
var
|
|
1265
|
+
import { makeEntitiesFilter as makeEntitiesFilter24 } from "@lls/utils";
|
|
1266
|
+
var search27 = ({ modelIds, subjects, schoolTypes }) => makeEntitiesFilter24(
|
|
1280
1267
|
{
|
|
1281
1268
|
modelId: modelIds
|
|
1282
1269
|
},
|
|
@@ -1284,7 +1271,7 @@ var search28 = ({ modelIds, subjects, schoolTypes }) => makeEntitiesFilter25(
|
|
|
1284
1271
|
schoolTypes && ((builderIo2) => !!builderIo2?.data?.schoolTypes?.some((x) => schoolTypes.includes(x)))
|
|
1285
1272
|
);
|
|
1286
1273
|
var { getBuilderIos, getBuilderIo, useSearchBuilderIos } = crud("builderIos", {
|
|
1287
|
-
search:
|
|
1274
|
+
search: search27
|
|
1288
1275
|
});
|
|
1289
1276
|
|
|
1290
1277
|
// src/reducers/entities.ts
|
|
@@ -1420,7 +1407,6 @@ var drawerNotification = new import_normalizr.schema.Entity("drawerNotifications
|
|
|
1420
1407
|
var copyNotification = new import_normalizr.schema.Entity("copyNotifications");
|
|
1421
1408
|
var quote = new import_normalizr.schema.Entity("quotes");
|
|
1422
1409
|
var group = new import_normalizr.schema.Entity("groups");
|
|
1423
|
-
var method = new import_normalizr.schema.Entity("methods");
|
|
1424
1410
|
var analytic = new import_normalizr.schema.Entity("analytics");
|
|
1425
1411
|
var contact = new import_normalizr.schema.Entity("contacts");
|
|
1426
1412
|
var collection = new import_normalizr.schema.Entity("collections");
|
|
@@ -1446,7 +1432,6 @@ var bookSchema = define(book, {
|
|
|
1446
1432
|
revisionPages: [page],
|
|
1447
1433
|
subjects: [subject],
|
|
1448
1434
|
textbooks: [book],
|
|
1449
|
-
educationalGuides: [book],
|
|
1450
1435
|
tools: [tool],
|
|
1451
1436
|
workbooks: [book],
|
|
1452
1437
|
workplans: [book]
|
|
@@ -1531,9 +1516,6 @@ var groupSchema = define(group, {
|
|
|
1531
1516
|
owner: teacher,
|
|
1532
1517
|
students: [student]
|
|
1533
1518
|
});
|
|
1534
|
-
var methodSchema = define(method, {
|
|
1535
|
-
book
|
|
1536
|
-
});
|
|
1537
1519
|
var newsSchema = define(news, {
|
|
1538
1520
|
books: [book],
|
|
1539
1521
|
subjects: [subject],
|
|
@@ -1549,7 +1531,6 @@ var querySchema = {
|
|
|
1549
1531
|
addPageAppreciation: page,
|
|
1550
1532
|
addStudentToGroup: group,
|
|
1551
1533
|
books: { hits: [book] },
|
|
1552
|
-
methods: { hits: [method] },
|
|
1553
1534
|
chapters: { hits: [chapter] },
|
|
1554
1535
|
createEstimate: quote,
|
|
1555
1536
|
createGroup: group,
|
|
@@ -1629,7 +1610,6 @@ export {
|
|
|
1629
1610
|
getLevels,
|
|
1630
1611
|
getLexicalFlowers,
|
|
1631
1612
|
getMainNotifications,
|
|
1632
|
-
getMethods,
|
|
1633
1613
|
getNews,
|
|
1634
1614
|
getPage,
|
|
1635
1615
|
getPages,
|
|
@@ -1684,7 +1664,6 @@ export {
|
|
|
1684
1664
|
useSearchGroups,
|
|
1685
1665
|
useSearchLevels,
|
|
1686
1666
|
useSearchLexicalFlowers,
|
|
1687
|
-
useSearchMethods,
|
|
1688
1667
|
useSearchModifiedPages,
|
|
1689
1668
|
useSearchNews,
|
|
1690
1669
|
useSearchPages,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@lls/store",
|
|
3
3
|
"description": "model de donnée et selecteurs",
|
|
4
4
|
"homepage": "https://github.com/lelivrescolaire/monorepo/tree/dev/libs/store",
|
|
5
|
-
"version": "24.1.67-
|
|
5
|
+
"version": "24.1.67-08127961",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./lib/builttypes/store/src/index.d.ts",
|
|
8
8
|
"exports": {
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"vite": "5.4.6",
|
|
48
48
|
"vite-tsconfig-paths": "5.0.1",
|
|
49
49
|
"vitest": "2.1.1",
|
|
50
|
-
"@lls/utils": "24.1.67-
|
|
51
|
-
"@lls/vitescripts": "24.1.67-
|
|
50
|
+
"@lls/utils": "24.1.67-08127961",
|
|
51
|
+
"@lls/vitescripts": "24.1.67-08127961"
|
|
52
52
|
},
|
|
53
53
|
"license": "ISC",
|
|
54
54
|
"dependencies": {
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { Method } from '@lls/store/types/models';
|
|
2
|
-
export declare const getMethods: (state: import("@lls/utils").TState<Method>) => Method[], useSearchMethods: (params: {
|
|
3
|
-
ids?: (number | undefined)[] | undefined;
|
|
4
|
-
uris?: (string | undefined)[] | undefined;
|
|
5
|
-
}) => Method[];
|