@lls/store 24.1.67-f37d840b → 24.1.69-8fd9ffb7
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 +1 -0
- package/lib/builttypes/store/src/schema/index.d.ts +9 -1
- package/lib/builttypes/store/src/selectors/book.d.ts +6 -6
- package/lib/builttypes/store/src/selectors/method.d.ts +5 -0
- package/lib/builttypes/store/src/selectors/page.d.ts +6 -1
- package/lib/builttypes/store/src/selectors/subject.d.ts +3 -3
- package/lib/index.js +64 -43
- package/package.json +3 -3
|
@@ -26,6 +26,7 @@ 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';
|
|
29
30
|
export * from '@lls/store/selectors/tool';
|
|
30
31
|
export * from '@lls/store/selectors/builderIo';
|
|
31
32
|
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, 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';
|
|
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, Method as MethodModel, 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,6 +20,7 @@ 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>[];
|
|
23
24
|
tools: schema.Entity<any>[];
|
|
24
25
|
workbooks: schema.Entity<any>[];
|
|
25
26
|
workplans: schema.Entity<any>[];
|
|
@@ -120,6 +121,10 @@ declare const groupSchema: {
|
|
|
120
121
|
students: schema.Entity<any>[];
|
|
121
122
|
};
|
|
122
123
|
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>;
|
|
123
128
|
declare const newsSchema: {
|
|
124
129
|
books: schema.Entity<any>[];
|
|
125
130
|
subjects: schema.Entity<any>[];
|
|
@@ -139,6 +144,9 @@ export declare const querySchema: {
|
|
|
139
144
|
books: {
|
|
140
145
|
hits: schema.Entity<any>[];
|
|
141
146
|
};
|
|
147
|
+
methods: {
|
|
148
|
+
hits: schema.Entity<any>[];
|
|
149
|
+
};
|
|
142
150
|
chapters: {
|
|
143
151
|
hits: schema.Entity<any>[];
|
|
144
152
|
};
|
|
@@ -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[]) => Book[]) | 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" | "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;
|
|
30
|
+
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "educationalGuides" | "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" | "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;
|
|
46
|
+
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "educationalGuides" | "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" | "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;
|
|
62
|
+
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "educationalGuides" | "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" | "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;
|
|
84
|
+
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "educationalGuides" | "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" | "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;
|
|
105
|
+
sortByQuery?: "id" | "filters" | "chapters" | "collection" | "firstValidPage" | "levels" | "news" | "oldBook" | "premiumResources" | "revisionPages" | "subjects" | "textbooks" | "educationalGuides" | "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;
|
|
@@ -0,0 +1,5 @@
|
|
|
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[];
|
|
@@ -8,8 +8,9 @@ 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;
|
|
11
12
|
}>;
|
|
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: {
|
|
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, sortByQuery }: SearchParams & SearchModifiedPagesParams) => ((pages: Page[]) => Page[]), useSearchPages: (params: {
|
|
13
14
|
hasNewDesign?: boolean | undefined;
|
|
14
15
|
isOriginal?: boolean | undefined;
|
|
15
16
|
premium?: boolean | null | undefined;
|
|
@@ -22,6 +23,7 @@ export declare const getPages: (state: import("@lls/utils").TState<Page>) => Pag
|
|
|
22
23
|
oldLessonIds?: Page["oldLesson"][] | undefined;
|
|
23
24
|
bookIds?: Page["book"][] | undefined;
|
|
24
25
|
thematicNames?: (string | undefined)[] | undefined;
|
|
26
|
+
sortByQuery?: {} | undefined;
|
|
25
27
|
} & SearchModifiedPagesParams) => Page[], makeSearchPages: () => ((state: import("../types/store").EntitiesState, params: {
|
|
26
28
|
hasNewDesign?: boolean | undefined;
|
|
27
29
|
isOriginal?: boolean | undefined;
|
|
@@ -35,6 +37,7 @@ export declare const getPages: (state: import("@lls/utils").TState<Page>) => Pag
|
|
|
35
37
|
oldLessonIds?: Page["oldLesson"][] | undefined;
|
|
36
38
|
bookIds?: Page["book"][] | undefined;
|
|
37
39
|
thematicNames?: (string | undefined)[] | undefined;
|
|
40
|
+
sortByQuery?: {} | undefined;
|
|
38
41
|
} & SearchModifiedPagesParams) => Page[]) & import("reselect").OutputSelectorFields<(args_0: Page[], args_1: {
|
|
39
42
|
hasNewDesign?: boolean | undefined;
|
|
40
43
|
isOriginal?: boolean | undefined;
|
|
@@ -48,6 +51,7 @@ export declare const getPages: (state: import("@lls/utils").TState<Page>) => Pag
|
|
|
48
51
|
oldLessonIds?: Page["oldLesson"][] | undefined;
|
|
49
52
|
bookIds?: Page["book"][] | undefined;
|
|
50
53
|
thematicNames?: (string | undefined)[] | undefined;
|
|
54
|
+
sortByQuery?: {} | undefined;
|
|
51
55
|
} & SearchModifiedPagesParams) => Page[], {
|
|
52
56
|
clearCache: () => void;
|
|
53
57
|
}> & {
|
|
@@ -66,6 +70,7 @@ export declare const getDrafts: (state: import("@lls/utils").TState<Page>) => Pa
|
|
|
66
70
|
oldLessonIds?: Page["oldLesson"][] | undefined;
|
|
67
71
|
bookIds?: Page["book"][] | undefined;
|
|
68
72
|
thematicNames?: (string | undefined)[] | undefined;
|
|
73
|
+
sortByQuery?: {} | undefined;
|
|
69
74
|
} & SearchModifiedPagesParams) => Page[];
|
|
70
75
|
type SearchModifiedPagesParams = {
|
|
71
76
|
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" | {} | undefined;
|
|
10
|
+
sortByQuery?: "id" | "slug" | "url" | "name" | "schoolTypes" | "hasBooks" | "newsletterUrl" | "tags" | {} | 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" | {} | undefined;
|
|
19
|
+
sortByQuery?: "id" | "slug" | "url" | "name" | "schoolTypes" | "hasBooks" | "newsletterUrl" | "tags" | {} | 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" | {} | undefined;
|
|
28
|
+
sortByQuery?: "id" | "slug" | "url" | "name" | "schoolTypes" | "hasBooks" | "newsletterUrl" | "tags" | {} | 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 method2 = Array.isArray(schema3) ? normalize2 : _normalize;
|
|
635
|
+
return method2(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 method2 = Array.isArray(schema3) ? denormalize : _denormalize;
|
|
698
|
+
return method2(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: search29 }) => {
|
|
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) => search29(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: search28 }) => {
|
|
|
764
764
|
[`search${methodName}`]: makeSearchElements(),
|
|
765
765
|
[`get${methodName.replace(/s$/, "")}`]: getElementById,
|
|
766
766
|
[`makeSearch${methodName}`]: makeSearchElements,
|
|
767
|
-
[`filter${methodName}`]:
|
|
767
|
+
[`filter${methodName}`]: search29,
|
|
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 } from "@lls/utils";
|
|
869
|
+
import { makeEntitiesFilter as makeEntitiesFilter5, pipe as pipe3 } from "@lls/utils";
|
|
870
870
|
import _4 from "lodash/fp.js";
|
|
871
871
|
var search5 = ({
|
|
872
872
|
ids,
|
|
@@ -888,35 +888,40 @@ var search5 = ({
|
|
|
888
888
|
sharedGroups,
|
|
889
889
|
isDraft,
|
|
890
890
|
isParentCreatedFromScratch,
|
|
891
|
-
updatedAfter
|
|
891
|
+
updatedAfter,
|
|
892
|
+
sortByQuery
|
|
892
893
|
}) => {
|
|
893
894
|
let pageById = false;
|
|
894
|
-
return
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
895
|
+
return (pages) => pipe3(
|
|
896
|
+
pages,
|
|
897
|
+
makeEntitiesFilter5(
|
|
898
|
+
{
|
|
899
|
+
id: ids,
|
|
900
|
+
chapter: chapterIds,
|
|
901
|
+
valid: isValid,
|
|
902
|
+
isOriginal,
|
|
903
|
+
hasNewDesign,
|
|
904
|
+
slug: slugs,
|
|
905
|
+
oldLesson: oldLessonIds,
|
|
906
|
+
isLearningAssessment,
|
|
907
|
+
isCreatedFromScratch,
|
|
908
|
+
premium,
|
|
909
|
+
thematicName: thematicNames,
|
|
910
|
+
book: bookIds,
|
|
911
|
+
parent: parentIds,
|
|
912
|
+
user: userIds,
|
|
913
|
+
originalPage: originalPageIds,
|
|
914
|
+
sharedUsers: sharedUserIds,
|
|
915
|
+
sharedGroups,
|
|
916
|
+
isDraft
|
|
917
|
+
},
|
|
918
|
+
isParentCreatedFromScratch && ((page2, pages2) => {
|
|
919
|
+
pageById = pageById || _4.keyBy("id", pages2);
|
|
920
|
+
return !!_4.get([page2?.originalPage, "isCreatedFromScratch"], pageById);
|
|
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
|
|
920
925
|
);
|
|
921
926
|
};
|
|
922
927
|
var { getPages, getPage, filterPages, useSearchPages, makeSearchPages } = crud("pages", {
|
|
@@ -1207,7 +1212,7 @@ var { getStudents, getStudent, useSearchStudents } = crud("students", {
|
|
|
1207
1212
|
|
|
1208
1213
|
// src/selectors/subject.ts
|
|
1209
1214
|
init_define_import_meta();
|
|
1210
|
-
import { limitToTeacherSubjects, makeEntitiesFilter as makeEntitiesFilter21, pipe as
|
|
1215
|
+
import { limitToTeacherSubjects, makeEntitiesFilter as makeEntitiesFilter21, pipe as pipe4 } from "@lls/utils";
|
|
1211
1216
|
import _13 from "lodash/fp.js";
|
|
1212
1217
|
var search24 = ({
|
|
1213
1218
|
ids,
|
|
@@ -1218,7 +1223,7 @@ var search24 = ({
|
|
|
1218
1223
|
hasBooks,
|
|
1219
1224
|
names,
|
|
1220
1225
|
sortByQuery
|
|
1221
|
-
}) => (subjects) =>
|
|
1226
|
+
}) => (subjects) => pipe4(
|
|
1222
1227
|
subjects,
|
|
1223
1228
|
makeEntitiesFilter21(
|
|
1224
1229
|
{
|
|
@@ -1248,22 +1253,30 @@ var { getTeachers, getTeacher, useSearchTeachers } = crud("teachers", {
|
|
|
1248
1253
|
search: search25
|
|
1249
1254
|
});
|
|
1250
1255
|
|
|
1251
|
-
// src/selectors/
|
|
1256
|
+
// src/selectors/method.ts
|
|
1252
1257
|
init_define_import_meta();
|
|
1253
1258
|
import { makeEntitiesFilter as makeEntitiesFilter23 } from "@lls/utils";
|
|
1254
|
-
var search26 = ({ ids,
|
|
1259
|
+
var search26 = ({ ids, uris }) => makeEntitiesFilter23({ id: ids, uri: uris });
|
|
1260
|
+
var { getMethods, useSearchMethods } = crud("methods", {
|
|
1261
|
+
search: search26
|
|
1262
|
+
});
|
|
1263
|
+
|
|
1264
|
+
// src/selectors/tool.ts
|
|
1265
|
+
init_define_import_meta();
|
|
1266
|
+
import { makeEntitiesFilter as makeEntitiesFilter24 } from "@lls/utils";
|
|
1267
|
+
var search27 = ({ ids, locked, bookIds }) => makeEntitiesFilter24({
|
|
1255
1268
|
id: ids,
|
|
1256
1269
|
locked,
|
|
1257
1270
|
books: bookIds
|
|
1258
1271
|
});
|
|
1259
1272
|
var { getTools, getTool, useSearchTools } = crud("tools", {
|
|
1260
|
-
search:
|
|
1273
|
+
search: search27
|
|
1261
1274
|
});
|
|
1262
1275
|
|
|
1263
1276
|
// src/selectors/builderIo.ts
|
|
1264
1277
|
init_define_import_meta();
|
|
1265
|
-
import { makeEntitiesFilter as
|
|
1266
|
-
var
|
|
1278
|
+
import { makeEntitiesFilter as makeEntitiesFilter25 } from "@lls/utils";
|
|
1279
|
+
var search28 = ({ modelIds, subjects, schoolTypes }) => makeEntitiesFilter25(
|
|
1267
1280
|
{
|
|
1268
1281
|
modelId: modelIds
|
|
1269
1282
|
},
|
|
@@ -1271,7 +1284,7 @@ var search27 = ({ modelIds, subjects, schoolTypes }) => makeEntitiesFilter24(
|
|
|
1271
1284
|
schoolTypes && ((builderIo2) => !!builderIo2?.data?.schoolTypes?.some((x) => schoolTypes.includes(x)))
|
|
1272
1285
|
);
|
|
1273
1286
|
var { getBuilderIos, getBuilderIo, useSearchBuilderIos } = crud("builderIos", {
|
|
1274
|
-
search:
|
|
1287
|
+
search: search28
|
|
1275
1288
|
});
|
|
1276
1289
|
|
|
1277
1290
|
// src/reducers/entities.ts
|
|
@@ -1407,6 +1420,7 @@ var drawerNotification = new import_normalizr.schema.Entity("drawerNotifications
|
|
|
1407
1420
|
var copyNotification = new import_normalizr.schema.Entity("copyNotifications");
|
|
1408
1421
|
var quote = new import_normalizr.schema.Entity("quotes");
|
|
1409
1422
|
var group = new import_normalizr.schema.Entity("groups");
|
|
1423
|
+
var method = new import_normalizr.schema.Entity("methods");
|
|
1410
1424
|
var analytic = new import_normalizr.schema.Entity("analytics");
|
|
1411
1425
|
var contact = new import_normalizr.schema.Entity("contacts");
|
|
1412
1426
|
var collection = new import_normalizr.schema.Entity("collections");
|
|
@@ -1432,6 +1446,7 @@ var bookSchema = define(book, {
|
|
|
1432
1446
|
revisionPages: [page],
|
|
1433
1447
|
subjects: [subject],
|
|
1434
1448
|
textbooks: [book],
|
|
1449
|
+
educationalGuides: [book],
|
|
1435
1450
|
tools: [tool],
|
|
1436
1451
|
workbooks: [book],
|
|
1437
1452
|
workplans: [book]
|
|
@@ -1516,6 +1531,9 @@ var groupSchema = define(group, {
|
|
|
1516
1531
|
owner: teacher,
|
|
1517
1532
|
students: [student]
|
|
1518
1533
|
});
|
|
1534
|
+
var methodSchema = define(method, {
|
|
1535
|
+
book
|
|
1536
|
+
});
|
|
1519
1537
|
var newsSchema = define(news, {
|
|
1520
1538
|
books: [book],
|
|
1521
1539
|
subjects: [subject],
|
|
@@ -1531,6 +1549,7 @@ var querySchema = {
|
|
|
1531
1549
|
addPageAppreciation: page,
|
|
1532
1550
|
addStudentToGroup: group,
|
|
1533
1551
|
books: { hits: [book] },
|
|
1552
|
+
methods: { hits: [method] },
|
|
1534
1553
|
chapters: { hits: [chapter] },
|
|
1535
1554
|
createEstimate: quote,
|
|
1536
1555
|
createGroup: group,
|
|
@@ -1610,6 +1629,7 @@ export {
|
|
|
1610
1629
|
getLevels,
|
|
1611
1630
|
getLexicalFlowers,
|
|
1612
1631
|
getMainNotifications,
|
|
1632
|
+
getMethods,
|
|
1613
1633
|
getNews,
|
|
1614
1634
|
getPage,
|
|
1615
1635
|
getPages,
|
|
@@ -1664,6 +1684,7 @@ export {
|
|
|
1664
1684
|
useSearchGroups,
|
|
1665
1685
|
useSearchLevels,
|
|
1666
1686
|
useSearchLexicalFlowers,
|
|
1687
|
+
useSearchMethods,
|
|
1667
1688
|
useSearchModifiedPages,
|
|
1668
1689
|
useSearchNews,
|
|
1669
1690
|
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.
|
|
5
|
+
"version": "24.1.69-8fd9ffb7",
|
|
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.
|
|
51
|
-
"@lls/vitescripts": "24.1.
|
|
50
|
+
"@lls/utils": "24.1.69-8fd9ffb7",
|
|
51
|
+
"@lls/vitescripts": "24.1.69-8fd9ffb7"
|
|
52
52
|
},
|
|
53
53
|
"license": "ISC",
|
|
54
54
|
"dependencies": {
|