@lls/store 24.9.0-d079b5a6 → 24.9.0

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.
Files changed (40) hide show
  1. package/lib/builttypes/store/src/actions/index.d.ts +47 -0
  2. package/lib/builttypes/store/src/index.d.ts +38 -0
  3. package/lib/builttypes/store/src/reducers/auth.d.ts +28 -0
  4. package/lib/builttypes/store/src/reducers/entities.d.ts +16 -0
  5. package/lib/builttypes/store/src/schema/index.d.ts +265 -0
  6. package/lib/builttypes/store/src/selectors/auth.d.ts +4 -0
  7. package/lib/builttypes/store/src/selectors/book.d.ts +108 -0
  8. package/lib/builttypes/store/src/selectors/builderIo.d.ts +5 -0
  9. package/lib/builttypes/store/src/selectors/chapter.d.ts +7 -0
  10. package/lib/builttypes/store/src/selectors/circonscription.d.ts +1 -0
  11. package/lib/builttypes/store/src/selectors/collection.d.ts +1 -0
  12. package/lib/builttypes/store/src/selectors/communityProject.d.ts +6 -0
  13. package/lib/builttypes/store/src/selectors/contact.d.ts +2 -0
  14. package/lib/builttypes/store/src/selectors/copyNotification.d.ts +6 -0
  15. package/lib/builttypes/store/src/selectors/crud.d.ts +16 -0
  16. package/lib/builttypes/store/src/selectors/document.d.ts +12 -0
  17. package/lib/builttypes/store/src/selectors/documentType.d.ts +7 -0
  18. package/lib/builttypes/store/src/selectors/drawerNotification.d.ts +9 -0
  19. package/lib/builttypes/store/src/selectors/faq.d.ts +1 -0
  20. package/lib/builttypes/store/src/selectors/garDivision.d.ts +2 -0
  21. package/lib/builttypes/store/src/selectors/group.d.ts +9 -0
  22. package/lib/builttypes/store/src/selectors/level.d.ts +74 -0
  23. package/lib/builttypes/store/src/selectors/lexicalFlower.d.ts +4 -0
  24. package/lib/builttypes/store/src/selectors/mainNotification.d.ts +4 -0
  25. package/lib/builttypes/store/src/selectors/method.d.ts +5 -0
  26. package/lib/builttypes/store/src/selectors/news.d.ts +4 -0
  27. package/lib/builttypes/store/src/selectors/page.d.ts +91 -0
  28. package/lib/builttypes/store/src/selectors/panorama.d.ts +1 -0
  29. package/lib/builttypes/store/src/selectors/premiumResource.d.ts +4 -0
  30. package/lib/builttypes/store/src/selectors/product.d.ts +11 -0
  31. package/lib/builttypes/store/src/selectors/resource.d.ts +4 -0
  32. package/lib/builttypes/store/src/selectors/school.d.ts +6 -0
  33. package/lib/builttypes/store/src/selectors/schoolType.d.ts +20 -0
  34. package/lib/builttypes/store/src/selectors/sharedPage.d.ts +17 -0
  35. package/lib/builttypes/store/src/selectors/student.d.ts +4 -0
  36. package/lib/builttypes/store/src/selectors/subject.d.ts +33 -0
  37. package/lib/builttypes/store/src/selectors/teacher.d.ts +5 -0
  38. package/lib/builttypes/store/src/selectors/tool.d.ts +6 -0
  39. package/lib/builttypes/store/src/selectors/user.d.ts +21 -0
  40. package/package.json +3 -3
@@ -0,0 +1,47 @@
1
+ import type { User } from '@lls/store/schema';
2
+ export declare const actionTypes: {
3
+ readonly DELETE_ENTITY: "DELETE_ENTITY";
4
+ readonly UPDATE_ENTITY: "UPDATE_ENTITY";
5
+ readonly SET_ENTITY: "SET_ENTITY";
6
+ readonly SET_ENTITIES: "SET_ENTITIES";
7
+ readonly RESET_AUTH: "RESET_AUTH";
8
+ readonly SET_AUTH: "SET_AUTH";
9
+ };
10
+ export type DeleteEntityPayload = {
11
+ path: string;
12
+ };
13
+ export declare const deleteEntity: (payload?: DeleteEntityPayload | undefined) => {
14
+ type: string;
15
+ payload?: DeleteEntityPayload | undefined;
16
+ };
17
+ export type UpdateEntityPayload = {
18
+ path: string;
19
+ entity: unknown;
20
+ };
21
+ export declare const updateEntity: (payload?: UpdateEntityPayload | undefined) => {
22
+ type: string;
23
+ payload?: UpdateEntityPayload | undefined;
24
+ };
25
+ export type SetEntityPayload = {
26
+ path: string;
27
+ entity: unknown;
28
+ };
29
+ export declare const setEntity: (payload?: unknown) => {
30
+ type: string;
31
+ payload?: unknown;
32
+ };
33
+ export type SetEntitiesPayload = {
34
+ [K: string]: {};
35
+ };
36
+ export declare const setEntities: (payload?: unknown) => {
37
+ type: string;
38
+ payload?: unknown;
39
+ };
40
+ export declare const setAuth: (payload?: User | undefined) => {
41
+ type: string;
42
+ payload?: User | undefined;
43
+ };
44
+ export declare const resetAuth: (payload?: void | undefined) => {
45
+ type: string;
46
+ payload?: void | undefined;
47
+ };
@@ -0,0 +1,38 @@
1
+ export * from '@lls/store/selectors/auth';
2
+ export * from '@lls/store/selectors/school';
3
+ export * from '@lls/store/selectors/book';
4
+ export * from '@lls/store/selectors/user';
5
+ export * from '@lls/store/selectors/chapter';
6
+ export * from '@lls/store/selectors/page';
7
+ export * from '@lls/store/selectors/collection';
8
+ export * from '@lls/store/selectors/communityProject';
9
+ export * from '@lls/store/selectors/contact';
10
+ export * from '@lls/store/selectors/copyNotification';
11
+ export * from '@lls/store/selectors/document';
12
+ export * from '@lls/store/selectors/drawerNotification';
13
+ export * from '@lls/store/selectors/faq';
14
+ export * from '@lls/store/selectors/garDivision';
15
+ export * from '@lls/store/selectors/group';
16
+ export * from '@lls/store/selectors/level';
17
+ export * from '@lls/store/selectors/mainNotification';
18
+ export * from '@lls/store/selectors/news';
19
+ export * from '@lls/store/selectors/panorama';
20
+ export * from '@lls/store/selectors/premiumResource';
21
+ export * from '@lls/store/selectors/lexicalFlower';
22
+ export * from '@lls/store/selectors/product';
23
+ export * from '@lls/store/selectors/resource';
24
+ export * from '@lls/store/selectors/schoolType';
25
+ export * from '@lls/store/selectors/sharedPage';
26
+ export * from '@lls/store/selectors/student';
27
+ export * from '@lls/store/selectors/subject';
28
+ export * from '@lls/store/selectors/teacher';
29
+ export * from '@lls/store/selectors/method';
30
+ export * from '@lls/store/selectors/tool';
31
+ export * from '@lls/store/selectors/builderIo';
32
+ export * from '@lls/store/selectors/circonscription';
33
+ export * from '@lls/store/selectors/documentType';
34
+ export { makeUseSearch } from '@lls/store/selectors/crud';
35
+ export { default as entitiesReducer, setEntitiesReducer } from '@lls/store/reducers/entities';
36
+ export { default as authReducer } from '@lls/store/reducers/auth';
37
+ export * from '@lls/store/schema';
38
+ export type * from '@lls/store/types/models';
@@ -0,0 +1,28 @@
1
+ declare const auth: (s: {
2
+ id: undefined;
3
+ role: null;
4
+ token: null;
5
+ isStudent: null;
6
+ isTeacher: null;
7
+ isPremium: null;
8
+ userPages: null;
9
+ username: null;
10
+ llsUserId: null;
11
+ }, a: {
12
+ type: "RESET_AUTH";
13
+ payload: undefined;
14
+ } | {
15
+ type: "SET_AUTH";
16
+ payload: unknown;
17
+ }) => {
18
+ id: undefined;
19
+ role: null;
20
+ token: null;
21
+ isStudent: null;
22
+ isTeacher: null;
23
+ isPremium: null;
24
+ userPages: null;
25
+ username: null;
26
+ llsUserId: null;
27
+ };
28
+ export default auth;
@@ -0,0 +1,16 @@
1
+ import type { DeleteEntityPayload, SetEntitiesPayload, SetEntityPayload, UpdateEntityPayload } from '@lls/core/actions/index';
2
+ export declare const setEntitiesReducer: (state: Record<string, any>, payload: SetEntitiesPayload) => Record<string, any>;
3
+ declare const entities: (s: {}, a: {
4
+ type: "DELETE_ENTITY";
5
+ payload: DeleteEntityPayload;
6
+ } | {
7
+ type: "UPDATE_ENTITY";
8
+ payload: UpdateEntityPayload;
9
+ } | {
10
+ type: "SET_ENTITY";
11
+ payload: SetEntityPayload;
12
+ } | {
13
+ type: "SET_ENTITIES";
14
+ payload: SetEntitiesPayload;
15
+ }) => {};
16
+ export default entities;
@@ -0,0 +1,265 @@
1
+ import type { Book as BookModel, BuilderIo as BuilderIoModel, Chapter as ChapterModel, Circonscription as CirconscriptionModel, Collection as CollectionModel, CommunityProject as CommunityProjectModel, DocJson as DocJsonModel, DocumentType as DocumentTypeModel, 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
+ import { schema } from 'normalizr';
3
+ type Norm<M, S> = {
4
+ [K in Exclude<keyof M, keyof S>]?: M[K];
5
+ } & {
6
+ [K in keyof S]?: S[K] extends schema.Entity<infer U> ? U extends {
7
+ id?: any;
8
+ } ? Exclude<U['id'], undefined> : number : S[K] extends schema.Entity<infer U>[] ? U extends {
9
+ id?: any;
10
+ } ? Exclude<U['id'], undefined>[] : number[] : never;
11
+ };
12
+ declare const bookSchema: {
13
+ chapters: schema.Entity<any>[];
14
+ collection: schema.Entity<any>;
15
+ firstValidPage: schema.Entity<any>;
16
+ levels: schema.Entity<any>[];
17
+ news: schema.Entity<any>[];
18
+ oldBook: schema.Entity<any>;
19
+ premiumResources: schema.Entity<any>[];
20
+ revisionPages: schema.Entity<any>[];
21
+ subjects: schema.Entity<any>[];
22
+ textbooks: schema.Entity<any>[];
23
+ educationalGuides: schema.Entity<any>[];
24
+ tools: schema.Entity<any>[];
25
+ workbooks: schema.Entity<any>[];
26
+ workplans: schema.Entity<any>[];
27
+ };
28
+ export type Book = Norm<BookModel, typeof bookSchema>;
29
+ declare const garDivisionSchema: {
30
+ students: schema.Entity<any>[];
31
+ school: schema.Entity<any>;
32
+ };
33
+ export type GarDivision = Norm<GarDivisionModel, typeof garDivisionSchema>;
34
+ declare const documentTypeSchema: {
35
+ subTypes: schema.Entity<any>[];
36
+ };
37
+ export type DocumentType = Norm<DocumentTypeModel, typeof documentTypeSchema>;
38
+ declare const documentSchema: {
39
+ page: schema.Entity<any>;
40
+ levels: schema.Entity<any>[];
41
+ documentType: schema.Entity<any>;
42
+ subDocumentType: schema.Entity<any>;
43
+ };
44
+ export type Document = Norm<DocJsonModel, typeof documentSchema>;
45
+ export type ExplorerDocument = Document & {
46
+ score: number;
47
+ };
48
+ declare const chapterSchema: {
49
+ book: schema.Entity<any>;
50
+ oldBook: schema.Entity<any>;
51
+ oldChapter: schema.Entity<any>;
52
+ pages: schema.Entity<any>[];
53
+ resources: schema.Entity<any>[];
54
+ };
55
+ export type Chapter = Norm<ChapterModel, typeof chapterSchema>;
56
+ declare const pageSchema: {
57
+ book: schema.Entity<any>;
58
+ chapter: schema.Entity<any>;
59
+ oldBook: schema.Entity<any>;
60
+ oldChapter: schema.Entity<any>;
61
+ oldLesson: schema.Entity<any>;
62
+ originalPage: schema.Entity<any>;
63
+ parent: schema.Entity<any>;
64
+ sharedGroups: schema.Entity<any>[];
65
+ sharedTeacher: schema.Entity<any>;
66
+ sharedUsers: schema.Entity<any>[];
67
+ user: schema.Entity<any>;
68
+ };
69
+ export type Page = Norm<PageModel, typeof pageSchema>;
70
+ declare const userSchema: {
71
+ books: schema.Entity<any>[];
72
+ booksV2: schema.Entity<any>[];
73
+ contacts: schema.Entity<any>[];
74
+ copies: schema.Entity<any>[];
75
+ copyNotifications: schema.Entity<NotificationModel>[];
76
+ drawerNotifications: schema.Entity<NotificationModel>[];
77
+ garDivisions: schema.Entity<any>[];
78
+ groups: schema.Entity<any>[];
79
+ lastBooksViewed: schema.Entity<any>[];
80
+ lastPagesViewed: schema.Entity<any>[];
81
+ levels: schema.Entity<any>[];
82
+ mainNotifications: schema.Entity<NotificationModel>[];
83
+ pages: schema.Entity<any>[];
84
+ schools: schema.Entity<any>[];
85
+ sharedPages: schema.Entity<any>[];
86
+ students: schema.Entity<any>[];
87
+ subjects: schema.Entity<any>[];
88
+ teachers: schema.Entity<any>[];
89
+ userPages: schema.Entity<any>[];
90
+ userBookPages: schema.Entity<any>[];
91
+ lexicalFlowers: {
92
+ hits: schema.Entity<any>[];
93
+ };
94
+ };
95
+ export type User = Norm<UserModel, typeof userSchema>;
96
+ declare const notificationSchema: {
97
+ page: schema.Entity<any>;
98
+ };
99
+ export type Notification = Norm<NotificationModel, typeof notificationSchema>;
100
+ declare const resourceSchema: {
101
+ chapter: schema.Entity<any>;
102
+ page: schema.Entity<any>;
103
+ };
104
+ export type Resource = Norm<ResourceModel, typeof resourceSchema>;
105
+ declare const toolSchema: {
106
+ books: schema.Entity<any>[];
107
+ };
108
+ export type Tool = Norm<ToolModel, typeof toolSchema>;
109
+ declare const sharedPageSchema: {
110
+ user: schema.Entity<any>;
111
+ chapter: schema.Entity<any>;
112
+ parent: schema.Entity<any>;
113
+ book: schema.Entity<any>;
114
+ originalPage: schema.Entity<any>;
115
+ };
116
+ export type SharedPage = Norm<PageModel, typeof sharedPageSchema>;
117
+ declare const studentSchema: {
118
+ levels: schema.Entity<any>[];
119
+ };
120
+ export type Student = Norm<UserModel, typeof studentSchema>;
121
+ declare const teacherSchema: {
122
+ schools: schema.Entity<any>[];
123
+ subjects: schema.Entity<any>[];
124
+ };
125
+ export type Teacher = Norm<UserModel, typeof teacherSchema>;
126
+ declare const productSchema: {
127
+ books: schema.Entity<any>[];
128
+ };
129
+ export type Product = Norm<ProductModel, typeof productSchema>;
130
+ declare const groupSchema: {
131
+ owner: schema.Entity<any>;
132
+ students: schema.Entity<any>[];
133
+ };
134
+ export type Group = Norm<GroupModel, typeof groupSchema>;
135
+ declare const schoolSchema: {
136
+ groups: schema.Entity<any>[];
137
+ };
138
+ export type School = Norm<SchoolModel, typeof schoolSchema>;
139
+ declare const methodSchema: {
140
+ book: schema.Entity<any>;
141
+ };
142
+ export type Method = Norm<MethodModel, typeof methodSchema>;
143
+ declare const newsSchema: {
144
+ books: schema.Entity<any>[];
145
+ subjects: schema.Entity<any>[];
146
+ levels: schema.Entity<any>[];
147
+ };
148
+ export type News = Norm<NewsModel, typeof newsSchema>;
149
+ declare const premiumResourceSchema: {
150
+ book: schema.Entity<any>;
151
+ };
152
+ export type PremiumResource = Norm<PremiumResourceModel, typeof premiumResourceSchema>;
153
+ declare const levelSchema: {
154
+ schoolTypes: schema.Entity<any>[];
155
+ };
156
+ export type Level = Norm<LevelModel, typeof levelSchema>;
157
+ export declare const querySchema: {
158
+ viewer: {
159
+ addCorrectionsToGroup: schema.Entity<any>;
160
+ addCorrectionsToStudents: schema.Entity<any>;
161
+ addPageAppreciation: schema.Entity<any>;
162
+ addStudentToGroup: schema.Entity<any>;
163
+ books: {
164
+ hits: schema.Entity<any>[];
165
+ };
166
+ methods: {
167
+ hits: schema.Entity<any>[];
168
+ };
169
+ chapters: {
170
+ hits: schema.Entity<any>[];
171
+ };
172
+ createEstimate: schema.Entity<any>;
173
+ createGroup: schema.Entity<any>;
174
+ createPage: schema.Entity<any>;
175
+ createUser: schema.Entity<any>;
176
+ createLexicalFlower: schema.Entity<any>;
177
+ documents: {
178
+ hits: schema.Entity<any>[];
179
+ };
180
+ documentTypes: {
181
+ hits: schema.Entity<any>[];
182
+ };
183
+ subDocumentTypes: {
184
+ hits: schema.Entity<any>[];
185
+ };
186
+ explorerResults: schema.Entity<any>[];
187
+ levels: schema.Entity<any>[];
188
+ me: schema.Entity<any>;
189
+ pages: {
190
+ hits: schema.Entity<any>[];
191
+ };
192
+ panoramas: schema.Entity<any>[];
193
+ parents: {
194
+ hits: schema.Entity<any>[];
195
+ };
196
+ product: {
197
+ hits: schema.Entity<any>[];
198
+ };
199
+ schoolTypes: {
200
+ hits: schema.Entity<any>[];
201
+ };
202
+ sharePageToGroup: schema.Entity<any>;
203
+ sharePageToUsers: schema.Entity<any>;
204
+ subjects: {
205
+ hits: schema.Entity<any>[];
206
+ };
207
+ updateCopyNotification: schema.Entity<NotificationModel>;
208
+ updateDrawerNotification: schema.Entity<NotificationModel>;
209
+ updateGroup: schema.Entity<any>;
210
+ updateMainNotification: schema.Entity<NotificationModel>;
211
+ updatePage: schema.Entity<any>;
212
+ updateTrialUser: schema.Entity<any>;
213
+ updateUserLastActivitySeenAt: schema.Entity<any>;
214
+ updateUser: schema.Entity<any>;
215
+ updateLexicalFlower: schema.Entity<any>;
216
+ };
217
+ auth: {
218
+ user: schema.Entity<any>;
219
+ };
220
+ marketing: {
221
+ addLikeFaq: schema.Entity<any>;
222
+ communityProjects: schema.Entity<any>[];
223
+ createAnalytics: schema.Entity<any>;
224
+ faq: schema.Entity<any>[];
225
+ builderIos: schema.Entity<any>[];
226
+ circonscriptions: schema.Entity<any>[];
227
+ };
228
+ static: {
229
+ projetVoltaire: {
230
+ grammarRules: schema.Entity<any>[];
231
+ };
232
+ };
233
+ };
234
+ export type CommunityProject = CommunityProjectModel;
235
+ export type Collection = CollectionModel;
236
+ export type Subject = SubjectModel;
237
+ export type Panorama = PanoramaModel;
238
+ export type Faq = FaqModel;
239
+ export type LexicalFlower = LexicalFlowerModel;
240
+ export type SchoolType = Norm<SchoolTypeModel, {}>;
241
+ export type BuilderIo = BuilderIoModel;
242
+ export type Circonscription = CirconscriptionModel;
243
+ export declare const normalizeData: (...args: any[]) => any;
244
+ export type AdminUser = User & {
245
+ isAdmin: true;
246
+ };
247
+ export type EditorLLSUser = User & {
248
+ isEditorLLS: true;
249
+ };
250
+ export type PremiumUser = User & {
251
+ isPremium: true;
252
+ };
253
+ export type TrialUser = User & {
254
+ isTrial: true;
255
+ };
256
+ export type StudentUser = User & {
257
+ isStudent: true;
258
+ };
259
+ export type TeacherUser = User & {
260
+ isTeacher: true;
261
+ };
262
+ export type AcademicEnabledUser = TeacherUser & {
263
+ academicEnabled: true;
264
+ };
265
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { AuthState } from '@lls/store/types/store';
2
+ export declare const getAuth: (s: AuthState) => AuthState['auth'];
3
+ export declare const getIsLogged: (s: AuthState) => boolean;
4
+ export declare const getToken: (s: AuthState) => string | undefined;
@@ -0,0 +1,108 @@
1
+ import type { Book } from '@lls/store/schema';
2
+ import type { Publisher } from '@lls/store/types/models';
3
+ import type { AllowUndefined } from '@typings/utils';
4
+ type SearchParams = AllowUndefined<Pick<Book, 'isWorkbook' | 'isWorkplan' | 'hasNewDesign' | 'isRenewed' | 'isPrimary'> & {
5
+ ids: Book['id'][];
6
+ levelIds?: Book['levels'];
7
+ subjectIds?: Book['subjects'];
8
+ years?: Book['year'][];
9
+ slugs?: Book['slug'][];
10
+ uris?: Book['uri'][];
11
+ isValid?: Book['valid'];
12
+ hasNoTeacherBook?: boolean;
13
+ sortByQuery?: ((a: Book[]) => Book[]) | keyof Book;
14
+ publishers?: Publisher[];
15
+ }>;
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: {
17
+ isWorkplan?: boolean | undefined;
18
+ isWorkbook?: boolean | undefined;
19
+ hasNewDesign?: boolean | undefined;
20
+ isRenewed?: boolean | undefined;
21
+ isPrimary?: boolean | undefined;
22
+ ids?: (number | undefined)[] | undefined;
23
+ levelIds?: any[] | (number | undefined)[] | undefined;
24
+ subjectIds?: any[] | (number | undefined)[] | undefined;
25
+ years?: Book["year"][] | undefined;
26
+ slugs?: Book["slug"][] | undefined;
27
+ uris?: Book["uri"][] | undefined;
28
+ isValid?: Book["valid"];
29
+ hasNoTeacherBook?: boolean | undefined;
30
+ sortByQuery?: "filters" | "id" | "subjects" | "levels" | "tools" | "chapters" | "news" | "premiumResources" | "collection" | "firstValidPage" | "oldBook" | "revisionPages" | "textbooks" | "educationalGuides" | "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
+ publishers?: (string | undefined)[] | undefined;
32
+ }) => Book[], makeSearchBooks: () => ((state: import("../types/store").EntitiesState, params: {
33
+ isWorkplan?: boolean | undefined;
34
+ isWorkbook?: boolean | undefined;
35
+ hasNewDesign?: boolean | undefined;
36
+ isRenewed?: boolean | undefined;
37
+ isPrimary?: boolean | undefined;
38
+ ids?: (number | undefined)[] | undefined;
39
+ levelIds?: any[] | (number | undefined)[] | undefined;
40
+ subjectIds?: any[] | (number | undefined)[] | undefined;
41
+ years?: Book["year"][] | undefined;
42
+ slugs?: Book["slug"][] | undefined;
43
+ uris?: Book["uri"][] | undefined;
44
+ isValid?: Book["valid"];
45
+ hasNoTeacherBook?: boolean | undefined;
46
+ sortByQuery?: "filters" | "id" | "subjects" | "levels" | "tools" | "chapters" | "news" | "premiumResources" | "collection" | "firstValidPage" | "oldBook" | "revisionPages" | "textbooks" | "educationalGuides" | "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
+ publishers?: (string | undefined)[] | undefined;
48
+ }) => Book[]) & import("reselect").OutputSelectorFields<(args_0: Book[], args_1: {
49
+ isWorkplan?: boolean | undefined;
50
+ isWorkbook?: boolean | undefined;
51
+ hasNewDesign?: boolean | undefined;
52
+ isRenewed?: boolean | undefined;
53
+ isPrimary?: boolean | undefined;
54
+ ids?: (number | undefined)[] | undefined;
55
+ levelIds?: any[] | (number | undefined)[] | undefined;
56
+ subjectIds?: any[] | (number | undefined)[] | undefined;
57
+ years?: Book["year"][] | undefined;
58
+ slugs?: Book["slug"][] | undefined;
59
+ uris?: Book["uri"][] | undefined;
60
+ isValid?: Book["valid"];
61
+ hasNoTeacherBook?: boolean | undefined;
62
+ sortByQuery?: "filters" | "id" | "subjects" | "levels" | "tools" | "chapters" | "news" | "premiumResources" | "collection" | "firstValidPage" | "oldBook" | "revisionPages" | "textbooks" | "educationalGuides" | "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
+ publishers?: (string | undefined)[] | undefined;
64
+ }) => Book[], {
65
+ clearCache: () => void;
66
+ }> & {
67
+ clearCache: () => void;
68
+ };
69
+ export { getBooks, getBook, filterBooks, useSearchBooks, makeSearchBooks };
70
+ export declare const makeSearchValidBooks: () => ((state: import("../types/store").EntitiesState, params: {
71
+ isWorkplan?: boolean | undefined;
72
+ isWorkbook?: boolean | undefined;
73
+ hasNewDesign?: boolean | undefined;
74
+ isRenewed?: boolean | undefined;
75
+ isPrimary?: boolean | undefined;
76
+ ids?: (number | undefined)[] | undefined;
77
+ levelIds?: any[] | (number | undefined)[] | undefined;
78
+ subjectIds?: any[] | (number | undefined)[] | undefined;
79
+ years?: Book["year"][] | undefined;
80
+ slugs?: Book["slug"][] | undefined;
81
+ uris?: Book["uri"][] | undefined;
82
+ isValid?: Book["valid"];
83
+ hasNoTeacherBook?: boolean | undefined;
84
+ sortByQuery?: "filters" | "id" | "subjects" | "levels" | "tools" | "chapters" | "news" | "premiumResources" | "collection" | "firstValidPage" | "oldBook" | "revisionPages" | "textbooks" | "educationalGuides" | "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
+ publishers?: (string | undefined)[] | undefined;
86
+ }) => Book[]) & import("reselect").OutputSelectorFields<(args_0: Book[]) => Book[], {
87
+ clearCache: () => void;
88
+ }> & {
89
+ clearCache: () => void;
90
+ };
91
+ export declare const useSearchValidBooks: (params: {
92
+ isWorkplan?: boolean | undefined;
93
+ isWorkbook?: boolean | undefined;
94
+ hasNewDesign?: boolean | undefined;
95
+ isRenewed?: boolean | undefined;
96
+ isPrimary?: boolean | undefined;
97
+ ids?: (number | undefined)[] | undefined;
98
+ levelIds?: any[] | (number | undefined)[] | undefined;
99
+ subjectIds?: any[] | (number | undefined)[] | undefined;
100
+ years?: Book["year"][] | undefined;
101
+ slugs?: Book["slug"][] | undefined;
102
+ uris?: Book["uri"][] | undefined;
103
+ isValid?: Book["valid"];
104
+ hasNoTeacherBook?: boolean | undefined;
105
+ sortByQuery?: "filters" | "id" | "subjects" | "levels" | "tools" | "chapters" | "news" | "premiumResources" | "collection" | "firstValidPage" | "oldBook" | "revisionPages" | "textbooks" | "educationalGuides" | "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
+ publishers?: (string | undefined)[] | undefined;
107
+ }) => Book[];
108
+ export declare const makeGetBook: () => (state: import("@lls/utils").TState<Book>, entityId: number | string | undefined | null) => Book | undefined;
@@ -0,0 +1,5 @@
1
+ export declare const getBuilderIos: (state: import("@lls/utils").TState<import("../types/models").BuilderIo>) => import("../types/models").BuilderIo[], getBuilderIo: (state: import("@lls/utils").TState<import("../types/models").BuilderIo>, entityId: number | string | undefined | null) => import("../types/models").BuilderIo | undefined, useSearchBuilderIos: (params: {
2
+ modelIds?: (string | undefined)[] | undefined;
3
+ subjects?: ("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" | "All" | null | undefined)[] | undefined;
4
+ schoolTypes?: (string | undefined)[] | undefined;
5
+ }) => import("../types/models").BuilderIo[];
@@ -0,0 +1,7 @@
1
+ import type { Chapter } from '@lls/store/schema';
2
+ export declare const getChapters: (state: import("@lls/utils").TState<Chapter>) => Chapter[], getChapter: (state: import("@lls/utils").TState<Chapter>, entityId: number | string | undefined | null) => Chapter | undefined, useSearchChapters: (params: {
3
+ ids?: Chapter["id"][] | undefined;
4
+ bookIds?: Chapter["book"][] | undefined;
5
+ hasTeacherBook?: boolean | undefined;
6
+ sortByQuery?: "id" | "pages" | "resources" | "oldBook" | "valid" | "teaser" | "teacherBook" | "title" | "book" | "oldChapter" | "numShow" | "releaseVersion" | "teacherDoc" | "audios" | {} | undefined;
7
+ }) => Chapter[];
@@ -0,0 +1 @@
1
+ export declare const getCirconscriptions: (state: import("@lls/utils/index").TState<import("../types/models").Circonscription>) => import("../types/models").Circonscription[];
@@ -0,0 +1 @@
1
+ export declare const getCollections: (state: import("@lls/utils/index").TState<import("../types/models").Collection>) => import("../types/models").Collection[], getCollection: (state: import("@lls/utils/index").TState<import("../types/models").Collection>, entityId: number | string | undefined | null) => import("../types/models").Collection | undefined, useSearchCollections: (params: {}) => import("../types/models").Collection[];
@@ -0,0 +1,6 @@
1
+ import type { CommunityProject } from '@lls/store/types/models';
2
+ export declare const getCommunityProjects: (state: import("@lls/utils").TState<CommunityProject>) => CommunityProject[], getCommunityProject: (state: import("@lls/utils").TState<CommunityProject>, entityId: number | string | undefined | null) => CommunityProject | undefined, useSearchCommunityProjects: (params: {
3
+ slugs?: (string | undefined)[] | undefined;
4
+ isFeatured?: boolean | undefined;
5
+ projectTypes?: ("Communauté" | "Numérique" | "Editorial" | undefined)[] | undefined;
6
+ }) => CommunityProject[];
@@ -0,0 +1,2 @@
1
+ import type { Contact } from '@lls/store/types/models';
2
+ export declare const getContacts: (state: import("@lls/utils/index").TState<Contact>) => Contact[], getContact: (state: import("@lls/utils/index").TState<Contact>, entityId: number | string | undefined | null) => Contact | undefined, useSearchContacts: (params: {}) => Contact[];
@@ -0,0 +1,6 @@
1
+ import type { Notification, Page } from '@lls/store/schema';
2
+ export declare const useSearchCopyNotifications: (params: {
3
+ read?: boolean | undefined;
4
+ ids?: (string | undefined)[] | undefined;
5
+ pageIds?: Page["id"][] | undefined;
6
+ }) => Notification[];
@@ -0,0 +1,16 @@
1
+ import type { EntitiesState } from '@lls/store/types/store';
2
+ import type { OutputSelectorFields } from 'reselect';
3
+ type GetMethodName<T> = T extends `${infer U}s` ? Capitalize<U> : never;
4
+ export declare const crud: <EntityName extends string, Search extends (...args: any) => any>(entityName: EntityName, { search }: {
5
+ search: Search;
6
+ }) => Record<`get${GetMethodName<EntityName>}s`, (state: import("@lls/utils").TState<ReturnType<ReturnType<Search>> extends (infer U)[] ? U : never>) => (ReturnType<ReturnType<Search>> extends (infer U)[] ? U : never)[]> & Record<`get${GetMethodName<EntityName>}`, (state: import("@lls/utils").TState<ReturnType<ReturnType<Search>> extends (infer U)[] ? U : never>, entityId: number | string | undefined | null) => (ReturnType<ReturnType<Search>> extends (infer U)[] ? U : never) | undefined> & Record<`makeSearch${GetMethodName<EntityName>}s`, () => ((state: EntitiesState, params: Parameters<Search>[0]) => (ReturnType<ReturnType<Search>> extends (infer U)[] ? U : never)[]) & OutputSelectorFields<(args_0: (ReturnType<ReturnType<Search>> extends (infer U)[] ? U : never)[], args_1: Parameters<Search>[0]) => (ReturnType<ReturnType<Search>> extends (infer U)[] ? U : never)[], {
7
+ clearCache: () => void;
8
+ }> & {
9
+ clearCache: () => void;
10
+ }> & Record<`search${GetMethodName<EntityName>}s`, ((state: EntitiesState, params: Parameters<Search>[0]) => (ReturnType<ReturnType<Search>> extends (infer U)[] ? U : never)[]) & OutputSelectorFields<(args_0: (ReturnType<ReturnType<Search>> extends (infer U)[] ? U : never)[], args_1: Parameters<Search>[0]) => (ReturnType<ReturnType<Search>> extends (infer U)[] ? U : never)[], {
11
+ clearCache: () => void;
12
+ }> & {
13
+ clearCache: () => void;
14
+ }> & Record<`filter${GetMethodName<EntityName>}s`, Search> & Record<`useSearch${GetMethodName<EntityName>}s`, (params: Parameters<Search>[0]) => (ReturnType<ReturnType<Search>> extends (infer U)[] ? U : never)[]>;
15
+ export declare const makeUseSearch: <SearchParams, T, State = EntitiesState>(makeSearchElements: () => (state: State, params: SearchParams) => T[]) => ((params: SearchParams) => T[]);
16
+ export {};
@@ -0,0 +1,12 @@
1
+ import type { ExplorerDocument } from '@lls/store/schema';
2
+ export declare const useSearchDocuments: (params: {
3
+ ids?: ExplorerDocument["id"];
4
+ resourceIds?: (string | undefined)[] | undefined;
5
+ levelIds?: any[] | (number | undefined)[] | undefined;
6
+ uuids?: (string | undefined)[] | undefined;
7
+ formats?: (string | undefined)[] | undefined;
8
+ documentTypes?: any[] | undefined;
9
+ subDocumentTypes?: any[] | undefined;
10
+ first?: number | undefined;
11
+ after?: number | undefined;
12
+ }) => ExplorerDocument[];
@@ -0,0 +1,7 @@
1
+ import type { DocumentType, SubDocumentType } from '@lls/store/types/models';
2
+ export declare const getSubDocumentTypes: (state: import("@lls/utils").TState<SubDocumentType>) => SubDocumentType[], useSearchSubDocumentTypes: (params: {
3
+ ids?: (number | undefined)[] | undefined;
4
+ }) => SubDocumentType[];
5
+ export declare const getDocumentTypes: (state: import("@lls/utils").TState<DocumentType>) => DocumentType[], getDocumentType: (state: import("@lls/utils").TState<DocumentType>, entityId: number | string | undefined | null) => DocumentType | undefined, useSearchDocumentTypes: (params: {
6
+ ids?: (number | undefined)[] | undefined;
7
+ }) => DocumentType[];
@@ -0,0 +1,9 @@
1
+ import type { Notification, Page } from '@lls/store/schema';
2
+ import type { EntitiesState } from '@lls/store/types/store';
3
+ import type { Selector } from 'reselect';
4
+ export declare const makeSearchDrawerNotifications: () => Selector<EntitiesState, Notification[]>;
5
+ export declare const useSearchDrawerNotifications: (params: {
6
+ read?: boolean | undefined;
7
+ ids?: (string | undefined)[] | undefined;
8
+ pageIds?: Page["id"][] | undefined;
9
+ }) => Notification[];
@@ -0,0 +1 @@
1
+ export declare const getFaqs: (state: import("@lls/utils").TState<import("../types/models").Faq>) => import("../types/models").Faq[];
@@ -0,0 +1,2 @@
1
+ import type { GarDivision } from '@lls/store/types/models';
2
+ export declare const getGarDivisions: (state: import("@lls/utils/index").TState<GarDivision>) => GarDivision[], getGarDivision: (state: import("@lls/utils/index").TState<GarDivision>, entityId: number | string | undefined | null) => GarDivision | undefined, useSearchGarDivisions: (params: {}) => GarDivision[];
@@ -0,0 +1,9 @@
1
+ import type { Group, User } from '@lls/store/schema';
2
+ export declare const getGroups: (state: import("@lls/utils").TState<Group>) => Group[], getGroup: (state: import("@lls/utils").TState<Group>, entityId: number | string | undefined | null) => Group | undefined, useSearchGroups: (params: {
3
+ ownerIds?: Group["owner"][] | undefined;
4
+ }) => Group[];
5
+ export declare const getUserGroups: ((state: import("@lls/utils").TState<Group> & import("../types/store").AuthState & import("@lls/utils").TState<User>) => Group[]) & import("reselect").OutputSelectorFields<(args_0: Group[], args_1: User | undefined) => Group[], {
6
+ clearCache: () => void;
7
+ }> & {
8
+ clearCache: () => void;
9
+ };
@@ -0,0 +1,74 @@
1
+ import type { Level, SchoolType } from '@lls/store/schema';
2
+ import type { EntitiesState } from '@lls/store/types/store';
3
+ import type { AllowUndefined } from '@typings/utils';
4
+ type SearchParams = AllowUndefined<{
5
+ ids?: number[];
6
+ slugs?: string[];
7
+ isPreSchool?: boolean;
8
+ isMiddleSchool?: boolean;
9
+ isHighSchool?: boolean;
10
+ isProHighSchool?: boolean;
11
+ isGenHighSchool?: boolean;
12
+ isElementarySchool?: boolean;
13
+ schoolTypes?: SchoolType['id'][];
14
+ }>;
15
+ type SearchParamsExternal = Omit<SearchParams, 'schoolTypes'> & {
16
+ schoolTypes?: SchoolType['slug'][];
17
+ };
18
+ export declare const makeSearchLevels: () => ((state: import("@lls/utils").TState<Level> & EntitiesState, params_0: Omit<{
19
+ ids?: (number | undefined)[] | undefined;
20
+ slugs?: (string | undefined)[] | undefined;
21
+ isPreSchool?: boolean | undefined;
22
+ isMiddleSchool?: boolean | undefined;
23
+ isHighSchool?: boolean | undefined;
24
+ isProHighSchool?: boolean | undefined;
25
+ isGenHighSchool?: boolean | undefined;
26
+ isElementarySchool?: boolean | undefined;
27
+ schoolTypes?: SchoolType["id"][] | undefined;
28
+ }, "schoolTypes"> & {
29
+ schoolTypes?: SchoolType["slug"][];
30
+ }) => Level[]) & import("reselect").OutputSelectorFields<(args_0: Level[], args_1: import("../types/models").SchoolType[] | undefined, args_2: SearchParamsExternal) => Level[], {
31
+ clearCache: () => void;
32
+ }> & {
33
+ clearCache: () => void;
34
+ };
35
+ export declare const getLevel: (state: import("@lls/utils").TState<Level>, entityId: number | string | undefined | null) => Level | undefined, searchLevels: ((state: EntitiesState, params: {
36
+ ids?: (number | undefined)[] | undefined;
37
+ slugs?: (string | undefined)[] | undefined;
38
+ isPreSchool?: boolean | undefined;
39
+ isMiddleSchool?: boolean | undefined;
40
+ isHighSchool?: boolean | undefined;
41
+ isProHighSchool?: boolean | undefined;
42
+ isGenHighSchool?: boolean | undefined;
43
+ isElementarySchool?: boolean | undefined;
44
+ schoolTypes?: SchoolType["id"][] | undefined;
45
+ }) => Level[]) & import("reselect").OutputSelectorFields<(args_0: Level[], args_1: {
46
+ ids?: (number | undefined)[] | undefined;
47
+ slugs?: (string | undefined)[] | undefined;
48
+ isPreSchool?: boolean | undefined;
49
+ isMiddleSchool?: boolean | undefined;
50
+ isHighSchool?: boolean | undefined;
51
+ isProHighSchool?: boolean | undefined;
52
+ isGenHighSchool?: boolean | undefined;
53
+ isElementarySchool?: boolean | undefined;
54
+ schoolTypes?: SchoolType["id"][] | undefined;
55
+ }) => Level[], {
56
+ clearCache: () => void;
57
+ }> & {
58
+ clearCache: () => void;
59
+ };
60
+ export declare const getLevels: (state: EntitiesState) => Level[];
61
+ export declare const useSearchLevels: (params: Omit<{
62
+ ids?: (number | undefined)[] | undefined;
63
+ slugs?: (string | undefined)[] | undefined;
64
+ isPreSchool?: boolean | undefined;
65
+ isMiddleSchool?: boolean | undefined;
66
+ isHighSchool?: boolean | undefined;
67
+ isProHighSchool?: boolean | undefined;
68
+ isGenHighSchool?: boolean | undefined;
69
+ isElementarySchool?: boolean | undefined;
70
+ schoolTypes?: SchoolType["id"][] | undefined;
71
+ }, "schoolTypes"> & {
72
+ schoolTypes?: SchoolType["slug"][];
73
+ }) => Level[];
74
+ export {};
@@ -0,0 +1,4 @@
1
+ import type { LexicalFlower } from '@lls/store/schema';
2
+ export declare const getLexicalFlowers: (state: import("@lls/utils").TState<import("../types/models").LexicalFlower>) => import("../types/models").LexicalFlower[], useSearchLexicalFlowers: (params: {
3
+ ids?: LexicalFlower["id"][] | undefined;
4
+ }) => import("../types/models").LexicalFlower[];
@@ -0,0 +1,4 @@
1
+ import type { Notification } from '@lls/store/schema';
2
+ import type { AuthState, EntitiesState } from '@lls/store/types/store';
3
+ import type { Selector } from 'reselect';
4
+ export declare const getMainNotifications: Selector<EntitiesState & AuthState, Notification[]>;
@@ -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[];
@@ -0,0 +1,4 @@
1
+ import type { News } from '@lls/store/types/models';
2
+ export declare const getAllNews: (state: import("@lls/utils").TState<News>) => News[], getNews: (state: import("@lls/utils").TState<News>, entityId: number | string | undefined | null) => News | undefined, useSearchNews: (params: {
3
+ ids?: (number | undefined)[] | undefined;
4
+ }) => News[];
@@ -0,0 +1,91 @@
1
+ import type { Page } from '@lls/store/schema';
2
+ import type { AllowUndefined } from '@lls/store/types/utils';
3
+ type SearchParams = AllowUndefined<Pick<Page, 'isOriginal' | 'hasNewDesign' | 'premium' | 'isCreatedFromScratch' | 'isLearningAssessment'> & {
4
+ ids: Page['id'][];
5
+ chapterIds?: Page['chapter'][];
6
+ isValid: Page['valid'];
7
+ slugs: Page['slug'][];
8
+ oldLessonIds?: Page['oldLesson'][];
9
+ bookIds?: Page['book'][];
10
+ thematicNames: Page['thematicName'][];
11
+ sortByQuery?: (a: Page[]) => Page[] | keyof Page;
12
+ }>;
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: {
14
+ hasNewDesign?: boolean | undefined;
15
+ premium?: boolean | null | undefined;
16
+ isOriginal?: boolean | undefined;
17
+ isCreatedFromScratch?: boolean | undefined;
18
+ isLearningAssessment?: boolean | undefined;
19
+ ids?: (number | undefined)[] | undefined;
20
+ chapterIds?: Page["chapter"][] | undefined;
21
+ isValid?: Page["valid"];
22
+ slugs?: (string | undefined)[] | undefined;
23
+ oldLessonIds?: Page["oldLesson"][] | undefined;
24
+ bookIds?: Page["book"][] | undefined;
25
+ thematicNames?: (string | undefined)[] | undefined;
26
+ sortByQuery?: {} | undefined;
27
+ } & SearchModifiedPagesParams) => Page[], makeSearchPages: () => ((state: import("../types/store").EntitiesState, params: {
28
+ hasNewDesign?: boolean | undefined;
29
+ premium?: boolean | null | undefined;
30
+ isOriginal?: boolean | undefined;
31
+ isCreatedFromScratch?: boolean | undefined;
32
+ isLearningAssessment?: boolean | undefined;
33
+ ids?: (number | undefined)[] | undefined;
34
+ chapterIds?: Page["chapter"][] | undefined;
35
+ isValid?: Page["valid"];
36
+ slugs?: (string | undefined)[] | undefined;
37
+ oldLessonIds?: Page["oldLesson"][] | undefined;
38
+ bookIds?: Page["book"][] | undefined;
39
+ thematicNames?: (string | undefined)[] | undefined;
40
+ sortByQuery?: {} | undefined;
41
+ } & SearchModifiedPagesParams) => Page[]) & import("reselect").OutputSelectorFields<(args_0: Page[], args_1: {
42
+ hasNewDesign?: boolean | undefined;
43
+ premium?: boolean | null | undefined;
44
+ isOriginal?: boolean | undefined;
45
+ isCreatedFromScratch?: boolean | undefined;
46
+ isLearningAssessment?: boolean | undefined;
47
+ ids?: (number | undefined)[] | undefined;
48
+ chapterIds?: Page["chapter"][] | undefined;
49
+ isValid?: Page["valid"];
50
+ slugs?: (string | undefined)[] | undefined;
51
+ oldLessonIds?: Page["oldLesson"][] | undefined;
52
+ bookIds?: Page["book"][] | undefined;
53
+ thematicNames?: (string | undefined)[] | undefined;
54
+ sortByQuery?: {} | undefined;
55
+ } & SearchModifiedPagesParams) => Page[], {
56
+ clearCache: () => void;
57
+ }> & {
58
+ clearCache: () => void;
59
+ };
60
+ export declare const getDrafts: (state: import("@lls/utils").TState<Page>) => Page[], getDraft: (state: import("@lls/utils").TState<Page>, entityId: number | string | undefined | null) => Page | undefined, useSearchDrafts: (params: {
61
+ hasNewDesign?: boolean | undefined;
62
+ premium?: boolean | null | undefined;
63
+ isOriginal?: boolean | undefined;
64
+ isCreatedFromScratch?: boolean | undefined;
65
+ isLearningAssessment?: boolean | undefined;
66
+ ids?: (number | undefined)[] | undefined;
67
+ chapterIds?: Page["chapter"][] | undefined;
68
+ isValid?: Page["valid"];
69
+ slugs?: (string | undefined)[] | undefined;
70
+ oldLessonIds?: Page["oldLesson"][] | undefined;
71
+ bookIds?: Page["book"][] | undefined;
72
+ thematicNames?: (string | undefined)[] | undefined;
73
+ sortByQuery?: {} | undefined;
74
+ } & SearchModifiedPagesParams) => Page[];
75
+ type SearchModifiedPagesParams = {
76
+ chapterIds?: Page['chapter'][];
77
+ userIds?: Page['user'][];
78
+ originalPageIds?: Page['originalPage'][];
79
+ parentIds?: Page['parent'][];
80
+ bookIds?: Page['book'][];
81
+ sharedUserIds?: Page['sharedUsers'];
82
+ updatedAfter?: Date;
83
+ isLearningAssessment?: Page['isLearningAssessment'];
84
+ thematicNames?: Page['thematicName'][];
85
+ isDraft?: Page['isDraft'];
86
+ isCreatedFromScratch?: Page['isCreatedFromScratch'];
87
+ isParentCreatedFromScratch?: Page['isCreatedFromScratch'];
88
+ sharedGroups?: Page['sharedGroups'];
89
+ };
90
+ export declare const useSearchModifiedPages: (params: SearchModifiedPagesParams) => Page[];
91
+ export {};
@@ -0,0 +1 @@
1
+ export declare const getPanorama: (state: import("@lls/utils").TState<import("../types/models").Panorama>, entityId: number | string | undefined | null) => import("../types/models").Panorama | undefined;
@@ -0,0 +1,4 @@
1
+ import type { PremiumResource } from '@lls/store/schema';
2
+ export declare const getPremiumResources: (state: import("@lls/utils").TState<PremiumResource>) => PremiumResource[], getPremiumResource: (state: import("@lls/utils").TState<PremiumResource>, entityId: number | string | undefined | null) => PremiumResource | undefined, useSearchPremiumResources: (params: {
3
+ bookIds?: PremiumResource["id"][] | undefined;
4
+ }) => PremiumResource[];
@@ -0,0 +1,11 @@
1
+ import type { Product } from '@lls/store/schema';
2
+ export declare const getProducts: (state: import("@lls/utils").TState<Product>) => Product[];
3
+ export declare const useSearchProducts: (params: {
4
+ ids?: (string | undefined)[] | undefined;
5
+ eans?: (string | undefined)[] | undefined;
6
+ isAdoptant?: Product["isAdoptant"];
7
+ isSupportPlus?: Product["isSupportPlus"];
8
+ levelIds?: (number | undefined)[] | undefined;
9
+ subjectIds?: (number | undefined)[] | undefined;
10
+ productTypes?: (string | undefined)[] | undefined;
11
+ }) => Product[];
@@ -0,0 +1,4 @@
1
+ import type { Resource } from '@lls/store/schema';
2
+ export declare const getResources: (state: import("@lls/utils").TState<Resource>) => Resource[], getResource: (state: import("@lls/utils").TState<Resource>, entityId: number | string | undefined | null) => Resource | undefined, useSearchResources: (params: {
3
+ chapterIds?: (number | undefined)[] | undefined;
4
+ }) => Resource[];
@@ -0,0 +1,6 @@
1
+ import type { School } from '@lls/store/schema';
2
+ export declare const getSchools: (state: import("@lls/utils").TState<School>) => School[], getSchool: (state: import("@lls/utils").TState<School>, entityId: number | string | undefined | null) => School | undefined, useSearchSchools: (params: {
3
+ ids?: School["id"][] | undefined;
4
+ academyIds?: (number | undefined)[] | undefined;
5
+ sortByQuery?: "id" | "groups" | "name" | "city" | "prefix" | "rne" | "department" | "academy" | {} | undefined;
6
+ }) => School[];
@@ -0,0 +1,20 @@
1
+ import type { SchoolType } from '@lls/store/types/models';
2
+ export declare const getSchoolTypes: (state: import("@lls/utils").TState<SchoolType>) => SchoolType[], getSchoolType: (state: import("@lls/utils").TState<SchoolType>, entityId: number | string | undefined | null) => SchoolType | undefined, useSearchSchoolTypes: (params: {
3
+ slugs?: SchoolType["slug"][] | undefined;
4
+ }) => SchoolType[], makeSearchSchoolTypes: () => ((state: import("../types/store").EntitiesState, params: {
5
+ slugs?: SchoolType["slug"][] | undefined;
6
+ }) => SchoolType[]) & import("reselect").OutputSelectorFields<(args_0: SchoolType[], args_1: {
7
+ slugs?: SchoolType["slug"][] | undefined;
8
+ }) => SchoolType[], {
9
+ clearCache: () => void;
10
+ }> & {
11
+ clearCache: () => void;
12
+ }, searchSchoolTypes: ((state: import("../types/store").EntitiesState, params: {
13
+ slugs?: SchoolType["slug"][] | undefined;
14
+ }) => SchoolType[]) & import("reselect").OutputSelectorFields<(args_0: SchoolType[], args_1: {
15
+ slugs?: SchoolType["slug"][] | undefined;
16
+ }) => SchoolType[], {
17
+ clearCache: () => void;
18
+ }> & {
19
+ clearCache: () => void;
20
+ };
@@ -0,0 +1,17 @@
1
+ import type { Book, Page, SharedPage, User } from '@lls/store/schema';
2
+ export declare const getSharedPages: (state: import("@lls/utils").TState<SharedPage>) => SharedPage[], getSharedPage: (state: import("@lls/utils").TState<SharedPage>, entityId: number | string | undefined | null) => SharedPage | undefined, useSearchSharedPages: (params: {
3
+ ids?: (number | undefined)[] | undefined;
4
+ parentIds?: Page["id"][] | undefined;
5
+ userIds?: User["id"][] | undefined;
6
+ bookIds?: Book["id"][] | undefined;
7
+ isCreatedFromScratch?: boolean | undefined;
8
+ isLearningAssessment?: boolean | undefined;
9
+ }) => SharedPage[];
10
+ export declare const useSearchCurrentUserSharedPages: (params: {
11
+ ids?: (number | undefined)[] | undefined;
12
+ parentIds?: Page["id"][] | undefined;
13
+ userIds?: User["id"][] | undefined;
14
+ bookIds?: Book["id"][] | undefined;
15
+ isCreatedFromScratch?: boolean | undefined;
16
+ isLearningAssessment?: boolean | undefined;
17
+ }) => SharedPage[];
@@ -0,0 +1,4 @@
1
+ import type { Student } from '@lls/store/schema';
2
+ export declare const getStudents: (state: import("@lls/utils").TState<Student>) => Student[], getStudent: (state: import("@lls/utils").TState<Student>, entityId: number | string | undefined | null) => Student | undefined, useSearchStudents: (params: {
3
+ ids?: (number | undefined)[] | undefined;
4
+ }) => Student[];
@@ -0,0 +1,33 @@
1
+ import type { Subject } from '@lls/store/types/models';
2
+ export declare const getSubjects: (state: import("@lls/utils").TState<Subject>) => Subject[], getSubject: (state: import("@lls/utils").TState<Subject>, entityId: number | string | undefined | null) => Subject | undefined, useSearchSubjects: (params: {
3
+ ids?: Subject["id"][] | undefined;
4
+ slugs?: Subject["slug"][] | undefined;
5
+ isTeacherSubject?: boolean | undefined;
6
+ hasNewsletterUrl?: boolean | undefined;
7
+ schoolTypes?: (string | undefined)[] | undefined;
8
+ hasBooks?: Subject["hasBooks"];
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" | "schoolTypes" | "slug" | "url" | "code" | "name" | "hasBooks" | "newsletterUrl" | "tags" | {} | undefined;
11
+ }) => Subject[], makeSearchSubjects: () => ((state: import("../types/store").EntitiesState, params: {
12
+ ids?: Subject["id"][] | undefined;
13
+ slugs?: Subject["slug"][] | undefined;
14
+ isTeacherSubject?: boolean | undefined;
15
+ hasNewsletterUrl?: boolean | undefined;
16
+ schoolTypes?: (string | undefined)[] | undefined;
17
+ hasBooks?: Subject["hasBooks"];
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" | "schoolTypes" | "slug" | "url" | "code" | "name" | "hasBooks" | "newsletterUrl" | "tags" | {} | undefined;
20
+ }) => Subject[]) & import("reselect").OutputSelectorFields<(args_0: Subject[], args_1: {
21
+ ids?: Subject["id"][] | undefined;
22
+ slugs?: Subject["slug"][] | undefined;
23
+ isTeacherSubject?: boolean | undefined;
24
+ hasNewsletterUrl?: boolean | undefined;
25
+ schoolTypes?: (string | undefined)[] | undefined;
26
+ hasBooks?: Subject["hasBooks"];
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" | "schoolTypes" | "slug" | "url" | "code" | "name" | "hasBooks" | "newsletterUrl" | "tags" | {} | undefined;
29
+ }) => Subject[], {
30
+ clearCache: () => void;
31
+ }> & {
32
+ clearCache: () => void;
33
+ };
@@ -0,0 +1,5 @@
1
+ import type { Teacher, User } from '@lls/store/schema';
2
+ export declare const getTeachers: (state: import("@lls/utils").TState<Teacher>) => Teacher[], getTeacher: (state: import("@lls/utils").TState<Teacher>, entityId: number | string | undefined | null) => Teacher | undefined, useSearchTeachers: (params: {
3
+ ids?: User["id"][] | undefined;
4
+ schoolIds?: any[] | (number | undefined)[] | undefined;
5
+ }) => Teacher[];
@@ -0,0 +1,6 @@
1
+ import type { Tool } from '@lls/store/schema';
2
+ export declare const getTools: (state: import("@lls/utils").TState<Tool>) => Tool[], getTool: (state: import("@lls/utils").TState<Tool>, entityId: number | string | undefined | null) => Tool | undefined, useSearchTools: (params: {
3
+ ids?: (number | undefined)[] | undefined;
4
+ bookIds?: any[] | (number | undefined)[] | undefined;
5
+ locked?: Tool["locked"];
6
+ }) => Tool[];
@@ -0,0 +1,21 @@
1
+ import type { User } from '@lls/store/schema';
2
+ export declare const getUsers: (state: import("@lls/utils").TState<User>) => User[], getUser: (state: import("@lls/utils").TState<User>, entityId: number | string | undefined | null) => User | undefined, useSearchUsers: (params: {
3
+ ids?: User["id"][] | undefined;
4
+ schoolIds?: any[] | (number | undefined)[] | undefined;
5
+ }) => User[];
6
+ export declare const makeGetCurrentUser: () => ((state: import("../types/store").AuthState & import("@lls/utils").TState<User>) => User | undefined) & import("reselect").OutputSelectorFields<(args_0: {
7
+ id?: number;
8
+ token?: string | null;
9
+ }, args_1: User[]) => User | undefined, {
10
+ clearCache: () => void;
11
+ }> & {
12
+ clearCache: () => void;
13
+ };
14
+ export declare const getCurrentUser: ((state: import("../types/store").AuthState & import("@lls/utils").TState<User>) => User | undefined) & import("reselect").OutputSelectorFields<(args_0: {
15
+ id?: number;
16
+ token?: string | null;
17
+ }, args_1: User[]) => User | undefined, {
18
+ clearCache: () => void;
19
+ }> & {
20
+ clearCache: () => void;
21
+ };
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.9.0-d079b5a6",
5
+ "version": "24.9.0",
6
6
  "type": "module",
7
7
  "types": "./lib/builttypes/store/src/index.d.ts",
8
8
  "exports": {
@@ -48,8 +48,8 @@
48
48
  "typescript": "5.6.3",
49
49
  "vite": "5.4.11",
50
50
  "vite-tsconfig-paths": "5.1.3",
51
- "@lls/utils": "24.9.0-d079b5a6",
52
- "@lls/vitescripts": "24.9.0-d079b5a6"
51
+ "@lls/utils": "24.9.0",
52
+ "@lls/vitescripts": "24.9.0"
53
53
  },
54
54
  "license": "ISC",
55
55
  "dependencies": {