@lls/store 24.12.0-ff241f31 → 24.12.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 (2) hide show
  1. package/lib/index.js +223 -339
  2. package/package.json +12 -13
package/lib/index.js CHANGED
@@ -733,20 +733,29 @@ var require_normalizr = __commonJS({
733
733
  // src/index.ts
734
734
  init_define_import_meta();
735
735
 
736
- // src/selectors/academy.ts
736
+ // src/selectors/auth.ts
737
737
  init_define_import_meta();
738
+ import _ from "lodash/fp.js";
739
+ var getAuth = _.get("auth");
740
+ var getIsLogged = _.flow(_.get("auth.id"), _.negate(_.isNil));
741
+ var getToken = _.get("auth.token");
742
+
743
+ // src/selectors/school.ts
744
+ init_define_import_meta();
745
+ import { makeEntitiesFilter, pipe } from "@lls/utils";
746
+ import _2 from "lodash/fp.js";
738
747
 
739
748
  // src/selectors/crud.ts
740
749
  init_define_import_meta();
741
750
  import { createSearchSelector, makeGetAllEntities, makeGetEntityById } from "@lls/utils";
742
751
  import { useMemo } from "react";
743
752
  import { useSelector } from "react-redux";
744
- var crud = (entityName, { search: search35 }) => {
753
+ var crud = (entityName, { search: search31 }) => {
745
754
  const getElements = makeGetAllEntities(entityName);
746
755
  const makeSearchElements = () => createSearchSelector(
747
756
  makeGetAllEntities(entityName),
748
757
  (_state, params) => params,
749
- (elements, params) => search35(params)(elements)
758
+ (elements, params) => search31(params)(elements)
750
759
  );
751
760
  const methodName = `${entityName.charAt(0).toUpperCase()}${entityName.slice(1)}`;
752
761
  const getElementById = makeGetEntityById(entityName);
@@ -756,7 +765,7 @@ var crud = (entityName, { search: search35 }) => {
756
765
  [`search${methodName}`]: makeSearchElements(),
757
766
  [`get${methodName.replace(/s$/, "")}`]: getElementById,
758
767
  [`makeSearch${methodName}`]: makeSearchElements,
759
- [`filter${methodName}`]: search35,
768
+ [`filter${methodName}`]: search31,
760
769
  [`useSearch${methodName}`]: useSearch
761
770
  };
762
771
  return back;
@@ -768,44 +777,23 @@ var makeUseSearch = (makeSearchElements) => {
768
777
  };
769
778
  };
770
779
 
771
- // src/selectors/academy.ts
772
- var search = (_nosearch) => (academies) => academies;
773
- var { getAcademies, getAcademie: getAcademy } = crud("academies", { search });
774
-
775
- // src/selectors/auth.ts
776
- init_define_import_meta();
777
- import _ from "lodash/fp.js";
778
- var getAuth = _.get("auth");
779
- var getIsLogged = _.flow(_.get("auth.id"), _.negate(_.isNil));
780
- var getToken = _.get("auth.token");
781
-
782
- // src/selectors/builderIo.ts
783
- init_define_import_meta();
784
- import { makeEntitiesFilter } from "@lls/utils";
785
- var search2 = ({ modelIds, subjects, schoolTypes }) => makeEntitiesFilter(
786
- {
787
- modelId: modelIds
788
- },
789
- subjects && ((builderIo2) => !!builderIo2?.data?.subjects?.some((x) => subjects.includes(x))),
790
- schoolTypes && ((builderIo2) => !!builderIo2?.data?.schoolTypes?.some((x) => schoolTypes.includes(x)))
791
- );
792
- var { getBuilderIos, getBuilderIo, useSearchBuilderIos } = crud("builderIos", {
793
- search: search2
794
- });
795
-
796
- // src/selectors/circonscription.ts
797
- init_define_import_meta();
798
- import _2 from "lodash/fp.js";
799
- var search3 = (_params) => _2.identity;
800
- var { getCirconscriptions } = crud("circonscriptions", {
801
- search: search3
780
+ // src/selectors/school.ts
781
+ var search = ({ ids, academyIds, sortByQuery }) => {
782
+ return (schools) => pipe(
783
+ schools,
784
+ makeEntitiesFilter({ id: ids, academy: academyIds }),
785
+ _2.isFunction(sortByQuery) ? sortByQuery : sortByQuery ? _2.sortBy(sortByQuery) : _2.identity
786
+ );
787
+ };
788
+ var { getSchools, getSchool, useSearchSchools } = crud("schools", {
789
+ search
802
790
  });
803
791
 
804
792
  // src/selectors/book.ts
805
793
  init_define_import_meta();
806
- import { createSearchSelector as createSearchSelector2, makeEntitiesFilter as makeEntitiesFilter2, makeGetEntityById as makeGetEntityById2, pipe } from "@lls/utils";
794
+ import { createSearchSelector as createSearchSelector2, makeEntitiesFilter as makeEntitiesFilter2, makeGetEntityById as makeGetEntityById2, pipe as pipe2 } from "@lls/utils";
807
795
  import _3 from "lodash/fp.js";
808
- var search4 = ({
796
+ var search2 = ({
809
797
  ids,
810
798
  levelIds,
811
799
  subjectIds,
@@ -822,7 +810,7 @@ var search4 = ({
822
810
  isRenewed,
823
811
  isPrimary
824
812
  }) => {
825
- return (books) => pipe(
813
+ return (books) => pipe2(
826
814
  books,
827
815
  makeEntitiesFilter2({
828
816
  id: ids,
@@ -844,7 +832,7 @@ var search4 = ({
844
832
  );
845
833
  };
846
834
  var { getBooks, getBook, filterBooks, useSearchBooks, makeSearchBooks } = crud("books", {
847
- search: search4
835
+ search: search2
848
836
  });
849
837
  var makeSearchValidBooks = () => createSearchSelector2(makeSearchBooks(), (books) => _3.filter({ valid: true, hasNewDesign: true }, books));
850
838
  var useSearchValidBooks = makeUseSearch(makeSearchValidBooks);
@@ -854,21 +842,21 @@ var makeGetBook = () => makeGetEntityById2("books");
854
842
  init_define_import_meta();
855
843
  var import_reselect = __toESM(require_lib(), 1);
856
844
  import { makeEntitiesFilter as makeEntitiesFilter3 } from "@lls/utils";
857
- var search5 = ({ ids, schoolIds }) => makeEntitiesFilter3({
845
+ var search3 = ({ ids, schoolIds }) => makeEntitiesFilter3({
858
846
  schools: schoolIds,
859
847
  id: ids
860
848
  });
861
849
  var { getUsers, getUser, useSearchUsers } = crud("users", {
862
- search: search5
850
+ search: search3
863
851
  });
864
852
  var makeGetCurrentUser = () => (0, import_reselect.createSelector)(getAuth, getUsers, (auth2, users) => users?.find((user2) => user2?.id === auth2?.id));
865
853
  var getCurrentUser = makeGetCurrentUser();
866
854
 
867
855
  // src/selectors/chapter.ts
868
856
  init_define_import_meta();
869
- import { makeEntitiesFilter as makeEntitiesFilter4, pipe as pipe2 } from "@lls/utils";
857
+ import { makeEntitiesFilter as makeEntitiesFilter4, pipe as pipe3 } from "@lls/utils";
870
858
  import _4 from "lodash/fp.js";
871
- var search6 = ({ bookIds, ids, hasTeacherBook, sortByQuery }) => (chapters) => pipe2(
859
+ var search4 = ({ bookIds, ids, hasTeacherBook, sortByQuery }) => (chapters) => pipe3(
872
860
  chapters,
873
861
  makeEntitiesFilter4(
874
862
  {
@@ -880,14 +868,14 @@ var search6 = ({ bookIds, ids, hasTeacherBook, sortByQuery }) => (chapters) => p
880
868
  _4.isFunction(sortByQuery) ? sortByQuery : sortByQuery ? _4.sortBy(sortByQuery) : _4.identity
881
869
  );
882
870
  var { getChapters, getChapter, useSearchChapters } = crud("chapters", {
883
- search: search6
871
+ search: search4
884
872
  });
885
873
 
886
874
  // src/selectors/page.ts
887
875
  init_define_import_meta();
888
- import { makeEntitiesFilter as makeEntitiesFilter5, pipe as pipe3 } from "@lls/utils";
876
+ import { makeEntitiesFilter as makeEntitiesFilter5, pipe as pipe4 } from "@lls/utils";
889
877
  import _5 from "lodash/fp.js";
890
- var search7 = ({
878
+ var search5 = ({
891
879
  ids,
892
880
  chapterIds,
893
881
  isValid,
@@ -911,7 +899,7 @@ var search7 = ({
911
899
  sortByQuery
912
900
  }) => {
913
901
  let pageById = false;
914
- return (pages) => pipe3(
902
+ return (pages) => pipe4(
915
903
  pages,
916
904
  makeEntitiesFilter5(
917
905
  {
@@ -944,26 +932,26 @@ var search7 = ({
944
932
  );
945
933
  };
946
934
  var { getPages, getPage, filterPages, useSearchPages, makeSearchPages } = crud("pages", {
947
- search: search7
935
+ search: search5
948
936
  });
949
- var { getDrafts, getDraft, useSearchDrafts } = crud("drafts", { search: search7 });
937
+ var { getDrafts, getDraft, useSearchDrafts } = crud("drafts", { search: search5 });
950
938
  var searchModifiedPages = (params) => {
951
- return (pages) => search7({ ...params, isOriginal: false })(pages);
939
+ return (pages) => search5({ ...params, isOriginal: false })(pages);
952
940
  };
953
941
  var { useSearchPages: useSearchModifiedPages } = crud("pages", { search: searchModifiedPages });
954
942
 
955
943
  // src/selectors/collection.ts
956
944
  init_define_import_meta();
957
945
  import _6 from "lodash/fp.js";
958
- var search8 = (_params) => _6.identity;
946
+ var search6 = (_params) => _6.identity;
959
947
  var { getCollections, getCollection, useSearchCollections } = crud("collections", {
960
- search: search8
948
+ search: search6
961
949
  });
962
950
 
963
951
  // src/selectors/communityProject.ts
964
952
  init_define_import_meta();
965
953
  import { makeEntitiesFilter as makeEntitiesFilter6 } from "@lls/utils";
966
- var search9 = ({
954
+ var search7 = ({
967
955
  slugs,
968
956
  isFeatured,
969
957
  projectTypes
@@ -973,44 +961,36 @@ var search9 = ({
973
961
  projectTypes
974
962
  });
975
963
  var { getCommunityProjects, getCommunityProject, useSearchCommunityProjects } = crud("communityProjects", {
976
- search: search9
964
+ search: search7
977
965
  });
978
966
 
979
967
  // src/selectors/contact.ts
980
968
  init_define_import_meta();
981
969
  import _7 from "lodash/fp.js";
982
- var search10 = (_params) => _7.identity;
970
+ var search8 = (_params) => _7.identity;
983
971
  var { getContacts, getContact, useSearchContacts } = crud("contacts", {
984
- search: search10
972
+ search: search8
985
973
  });
986
974
 
987
975
  // src/selectors/copyNotification.ts
988
976
  init_define_import_meta();
989
977
  import { createSearchSelector as createSearchSelector3, makeEntitiesFilter as makeEntitiesFilter7, makeGetAllEntities as makeGetAllEntities2 } from "@lls/utils";
990
- var search11 = ({ ids, read, pageIds }) => {
978
+ var search9 = ({ ids, read, pageIds }) => {
991
979
  return makeEntitiesFilter7({ read, id: ids, page: pageIds });
992
980
  };
993
981
  var makeSearchCopyNotifications = () => createSearchSelector3(
994
- [makeGetCurrentUser(), makeGetAllEntities2("copyNotifications"), (_21, params) => params],
982
+ [makeGetCurrentUser(), makeGetAllEntities2("copyNotifications"), (_20, params) => params],
995
983
  (currentUser, copyNotifications, { pageIds, read }) => {
996
984
  const ids = currentUser?.copyNotifications;
997
- return search11({ ids, read, pageIds })(copyNotifications);
985
+ return search9({ ids, read, pageIds })(copyNotifications);
998
986
  }
999
987
  );
1000
988
  var useSearchCopyNotifications = makeUseSearch(makeSearchCopyNotifications);
1001
989
 
1002
- // src/selectors/docTemplate.ts
1003
- init_define_import_meta();
1004
- import { makeEntitiesFilter as makeEntitiesFilter8 } from "@lls/utils";
1005
- var search12 = ({ ids }) => makeEntitiesFilter8({
1006
- id: ids
1007
- });
1008
- var { useSearchDocTemplates, getDocTemplate } = crud("docTemplates", { search: search12 });
1009
-
1010
990
  // src/selectors/document.ts
1011
991
  init_define_import_meta();
1012
- import { makeEntitiesFilter as makeEntitiesFilter9 } from "@lls/utils";
1013
- var search13 = ({
992
+ import { makeEntitiesFilter as makeEntitiesFilter8 } from "@lls/utils";
993
+ var search10 = ({
1014
994
  ids,
1015
995
  uuids,
1016
996
  resourceIds,
@@ -1019,7 +999,7 @@ var search13 = ({
1019
999
  documentTypes,
1020
1000
  subDocumentTypes
1021
1001
  }) => {
1022
- return makeEntitiesFilter9({
1002
+ return makeEntitiesFilter8({
1023
1003
  id: ids,
1024
1004
  resourceId: resourceIds,
1025
1005
  levels: levelIds,
@@ -1030,42 +1010,20 @@ var search13 = ({
1030
1010
  });
1031
1011
  };
1032
1012
  var { useSearchDocuments, getDocument } = crud("documents", {
1033
- search: search13
1034
- });
1035
-
1036
- // src/selectors/documentType.ts
1037
- init_define_import_meta();
1038
- import { makeEntitiesFilter as makeEntitiesFilter10 } from "@lls/utils";
1039
- var search14 = ({ ids }) => {
1040
- return makeEntitiesFilter10({
1041
- id: ids
1042
- });
1043
- };
1044
- var searchSubDocumentType = ({
1045
- ids
1046
- }) => {
1047
- return makeEntitiesFilter10({
1048
- id: ids
1049
- });
1050
- };
1051
- var { getSubDocumentTypes, useSearchSubDocumentTypes } = crud("subDocumentTypes", {
1052
- search: searchSubDocumentType
1053
- });
1054
- var { getDocumentTypes, getDocumentType, useSearchDocumentTypes } = crud("documentTypes", {
1055
- search: search14
1013
+ search: search10
1056
1014
  });
1057
1015
 
1058
1016
  // src/selectors/drawerNotification.ts
1059
1017
  init_define_import_meta();
1060
- import { createSearchSelector as createSearchSelector4, makeEntitiesFilter as makeEntitiesFilter11, makeGetAllEntities as makeGetAllEntities3 } from "@lls/utils";
1061
- var search15 = ({ ids, read, pageIds }) => {
1062
- return makeEntitiesFilter11({ read, id: ids, page: pageIds });
1018
+ import { createSearchSelector as createSearchSelector4, makeEntitiesFilter as makeEntitiesFilter9, makeGetAllEntities as makeGetAllEntities3 } from "@lls/utils";
1019
+ var search11 = ({ ids, read, pageIds }) => {
1020
+ return makeEntitiesFilter9({ read, id: ids, page: pageIds });
1063
1021
  };
1064
1022
  var makeSearchDrawerNotifications = () => createSearchSelector4(
1065
- [makeGetCurrentUser(), makeGetAllEntities3("drawerNotifications"), (_21, params) => params],
1023
+ [makeGetCurrentUser(), makeGetAllEntities3("drawerNotifications"), (_20, params) => params],
1066
1024
  (currentUser, drawerNotifications, { read, pageIds }) => {
1067
1025
  const ids = currentUser?.drawerNotifications;
1068
- return search15({ ids, read, pageIds })(drawerNotifications);
1026
+ return search11({ ids, read, pageIds })(drawerNotifications);
1069
1027
  }
1070
1028
  );
1071
1029
  var useSearchDrawerNotifications = makeUseSearch(makeSearchDrawerNotifications);
@@ -1078,49 +1036,44 @@ var getFaqs = makeGetAllEntities4("faq");
1078
1036
  // src/selectors/garDivision.ts
1079
1037
  init_define_import_meta();
1080
1038
  import _8 from "lodash/fp.js";
1081
- var search16 = (_params) => _8.identity;
1039
+ var search12 = (_params) => _8.identity;
1082
1040
  var { getGarDivisions, getGarDivision, useSearchGarDivisions } = crud("garDivisions", {
1083
- search: search16
1041
+ search: search12
1084
1042
  });
1085
1043
 
1086
- // src/selectors/globalRights.ts
1087
- init_define_import_meta();
1088
- import _9 from "lodash/fp.js";
1089
- var getGlobalRights = _9.get("entities.globalRights");
1090
-
1091
1044
  // src/selectors/group.ts
1092
1045
  init_define_import_meta();
1093
1046
  var import_reselect2 = __toESM(require_lib(), 1);
1094
- import { makeEntitiesFilter as makeEntitiesFilter12 } from "@lls/utils";
1095
- import _10 from "lodash/fp.js";
1096
- var search17 = ({ ownerIds }) => _10.flow(makeEntitiesFilter12({ owner: ownerIds }), _10.orderBy("createdAt", ["desc"]));
1047
+ import { makeEntitiesFilter as makeEntitiesFilter10 } from "@lls/utils";
1048
+ import _9 from "lodash/fp.js";
1049
+ var search13 = ({ ownerIds }) => _9.flow(makeEntitiesFilter10({ owner: ownerIds }), _9.orderBy("createdAt", ["desc"]));
1097
1050
  var { getGroups, getGroup, useSearchGroups } = crud("groups", {
1098
- search: search17
1051
+ search: search13
1099
1052
  });
1100
1053
  var getUserGroups = (0, import_reselect2.createSelector)(
1101
1054
  [getGroups, getCurrentUser],
1102
- (groups, currentUser) => search17({ ownerIds: [currentUser?.id] })(groups)
1055
+ (groups, currentUser) => search13({ ownerIds: [currentUser?.id] })(groups)
1103
1056
  );
1104
1057
 
1105
1058
  // src/selectors/level.ts
1106
1059
  init_define_import_meta();
1107
1060
  var import_reselect3 = __toESM(require_lib(), 1);
1108
- import { createSearchSelector as createSearchSelector5, makeEntitiesFilter as makeEntitiesFilter14, makeGetAllEntities as makeGetAllEntities5 } from "@lls/utils";
1109
- import _11 from "lodash/fp.js";
1061
+ import { createSearchSelector as createSearchSelector5, makeEntitiesFilter as makeEntitiesFilter12, makeGetAllEntities as makeGetAllEntities5 } from "@lls/utils";
1062
+ import _10 from "lodash/fp.js";
1110
1063
 
1111
1064
  // src/selectors/schoolType.ts
1112
1065
  init_define_import_meta();
1113
- import { makeEntitiesFilter as makeEntitiesFilter13 } from "@lls/utils";
1114
- var search18 = ({ slugs }) => makeEntitiesFilter13({ slug: slugs });
1066
+ import { makeEntitiesFilter as makeEntitiesFilter11 } from "@lls/utils";
1067
+ var search14 = ({ slugs }) => makeEntitiesFilter11({ slug: slugs });
1115
1068
  var { getSchoolTypes, getSchoolType, useSearchSchoolTypes, makeSearchSchoolTypes, searchSchoolTypes } = crud(
1116
1069
  "schoolTypes",
1117
1070
  {
1118
- search: search18
1071
+ search: search14
1119
1072
  }
1120
1073
  );
1121
1074
 
1122
1075
  // src/selectors/level.ts
1123
- var search19 = ({
1076
+ var search15 = ({
1124
1077
  ids,
1125
1078
  slugs,
1126
1079
  isPreSchool,
@@ -1130,8 +1083,8 @@ var search19 = ({
1130
1083
  isGenHighSchool,
1131
1084
  isElementarySchool,
1132
1085
  schoolTypes
1133
- }) => _11.flow(
1134
- makeEntitiesFilter14({
1086
+ }) => _10.flow(
1087
+ makeEntitiesFilter12({
1135
1088
  id: ids,
1136
1089
  slug: slugs,
1137
1090
  isPreSchool,
@@ -1142,7 +1095,7 @@ var search19 = ({
1142
1095
  isElementarySchool,
1143
1096
  schoolTypes
1144
1097
  }),
1145
- _11.orderBy("order", "desc")
1098
+ _10.orderBy("order", "desc")
1146
1099
  );
1147
1100
  var makeSearchLevels = () => {
1148
1101
  const searchSchoolTypes2 = makeSearchSchoolTypes();
@@ -1150,60 +1103,38 @@ var makeSearchLevels = () => {
1150
1103
  makeGetAllEntities5("levels"),
1151
1104
  (state, { schoolTypes }) => schoolTypes ? searchSchoolTypes2(state, { slugs: schoolTypes }) : void 0,
1152
1105
  (_state, params) => params,
1153
- (levels, schoolTypes, params) => search19({ ...params, schoolTypes: schoolTypes?.length ? schoolTypes?.map(({ id }) => id) : void 0 })(levels)
1106
+ (levels, schoolTypes, params) => search15({ ...params, schoolTypes: schoolTypes?.length ? schoolTypes?.map(({ id }) => id) : void 0 })(levels)
1154
1107
  );
1155
1108
  };
1156
- var crudLevels = crud("levels", { search: search19 });
1109
+ var crudLevels = crud("levels", { search: search15 });
1157
1110
  var { getLevel, searchLevels } = crudLevels;
1158
1111
  var getLevels = (0, import_reselect3.createSelector)(
1159
1112
  crudLevels.getLevels,
1160
- _11.orderBy("order", "desc")
1113
+ _10.orderBy("order", "desc")
1161
1114
  );
1162
1115
  var useSearchLevels = makeUseSearch(makeSearchLevels);
1163
1116
 
1164
- // src/selectors/lexicalFlower.ts
1165
- init_define_import_meta();
1166
- import { makeEntitiesFilter as makeEntitiesFilter15 } from "@lls/utils";
1167
- var search20 = ({ ids }) => makeEntitiesFilter15({ id: ids });
1168
- var { getLexicalFlowers, useSearchLexicalFlowers } = crud("lexicalFlowers", {
1169
- search: search20
1170
- });
1171
-
1172
- // src/selectors/license.ts
1173
- init_define_import_meta();
1174
- import { makeEntitiesFilter as makeEntitiesFilter16 } from "@lls/utils";
1175
- var search21 = ({ reference }) => makeEntitiesFilter16({ reference });
1176
- var { getLicenses, getLicense, searchLicenses } = crud("licenses", { search: search21 });
1177
-
1178
1117
  // src/selectors/mainNotification.ts
1179
1118
  init_define_import_meta();
1180
1119
  var import_reselect4 = __toESM(require_lib(), 1);
1181
- import { makeEntitiesFilter as makeEntitiesFilter17, makeGetAllEntities as makeGetAllEntities6 } from "@lls/utils";
1182
- import _12 from "lodash/fp.js";
1183
- var search22 = ({ ids }) => makeEntitiesFilter17({ id: ids });
1120
+ import { makeEntitiesFilter as makeEntitiesFilter13, makeGetAllEntities as makeGetAllEntities6 } from "@lls/utils";
1121
+ import _11 from "lodash/fp.js";
1122
+ var search16 = ({ ids }) => makeEntitiesFilter13({ id: ids });
1184
1123
  var getMainNotifications = (0, import_reselect4.createSelector)(
1185
- [_12.flow(makeGetCurrentUser(), _12.get("mainNotifications")), makeGetAllEntities6("mainNotifications")],
1186
- (userNotifications, notifications) => search22({ ids: userNotifications })(notifications)
1124
+ [_11.flow(makeGetCurrentUser(), _11.get("mainNotifications")), makeGetAllEntities6("mainNotifications")],
1125
+ (userNotifications, notifications) => search16({ ids: userNotifications })(notifications)
1187
1126
  );
1188
1127
 
1189
- // src/selectors/method.ts
1190
- init_define_import_meta();
1191
- import { makeEntitiesFilter as makeEntitiesFilter18 } from "@lls/utils";
1192
- var search23 = ({ ids, uris }) => makeEntitiesFilter18({ id: ids, uri: uris });
1193
- var { getMethods, useSearchMethods } = crud("methods", {
1194
- search: search23
1195
- });
1196
-
1197
1128
  // src/selectors/news.ts
1198
1129
  init_define_import_meta();
1199
- import { makeEntitiesFilter as makeEntitiesFilter19 } from "@lls/utils";
1200
- var search24 = ({ ids }) => makeEntitiesFilter19({ id: ids });
1130
+ import { makeEntitiesFilter as makeEntitiesFilter14 } from "@lls/utils";
1131
+ var search17 = ({ ids }) => makeEntitiesFilter14({ id: ids });
1201
1132
  var {
1202
1133
  getNews: getAllNews,
1203
1134
  getNew: getNews,
1204
1135
  useSearchNews
1205
1136
  } = crud("news", {
1206
- search: search24
1137
+ search: search17
1207
1138
  });
1208
1139
 
1209
1140
  // src/selectors/panorama.ts
@@ -1213,18 +1144,26 @@ var getPanorama = makeGetEntityById3("panoramas");
1213
1144
 
1214
1145
  // src/selectors/premiumResource.ts
1215
1146
  init_define_import_meta();
1216
- import { makeEntitiesFilter as makeEntitiesFilter20 } from "@lls/utils";
1217
- var search25 = ({ bookIds }) => makeEntitiesFilter20({ book: bookIds });
1147
+ import { makeEntitiesFilter as makeEntitiesFilter15 } from "@lls/utils";
1148
+ var search18 = ({ bookIds }) => makeEntitiesFilter15({ book: bookIds });
1218
1149
  var { getPremiumResources, getPremiumResource, useSearchPremiumResources } = crud("premiumResources", {
1219
- search: search25
1150
+ search: search18
1151
+ });
1152
+
1153
+ // src/selectors/lexicalFlower.ts
1154
+ init_define_import_meta();
1155
+ import { makeEntitiesFilter as makeEntitiesFilter16 } from "@lls/utils";
1156
+ var search19 = ({ ids }) => makeEntitiesFilter16({ id: ids });
1157
+ var { getLexicalFlowers, useSearchLexicalFlowers } = crud("lexicalFlowers", {
1158
+ search: search19
1220
1159
  });
1221
1160
 
1222
1161
  // src/selectors/product.ts
1223
1162
  init_define_import_meta();
1224
- import _13 from "lodash/fp.js";
1225
- import { createSearchSelector as createSearchSelector6, makeEntitiesFilter as makeEntitiesFilter21, makeGetAllEntities as makeGetAllEntities7 } from "@lls/utils";
1163
+ import _12 from "lodash/fp.js";
1164
+ import { createSearchSelector as createSearchSelector6, makeEntitiesFilter as makeEntitiesFilter17, makeGetAllEntities as makeGetAllEntities7 } from "@lls/utils";
1226
1165
  var getProducts = makeGetAllEntities7("products");
1227
- var search26 = ({
1166
+ var search20 = ({
1228
1167
  ids,
1229
1168
  eans,
1230
1169
  isAdoptant,
@@ -1234,7 +1173,7 @@ var search26 = ({
1234
1173
  productTypes
1235
1174
  }) => {
1236
1175
  let bookIds;
1237
- const filter = makeEntitiesFilter21(
1176
+ const filter = makeEntitiesFilter17(
1238
1177
  {
1239
1178
  id: ids,
1240
1179
  ean: eans,
@@ -1245,7 +1184,7 @@ var search26 = ({
1245
1184
  levelIds || subjectIds ? (product2) => !!product2?.books?.some((bookId) => bookIds.has(bookId)) : false
1246
1185
  );
1247
1186
  return (products, books) => {
1248
- bookIds = new Set(_13.flow(_13.map("id"), _13.map(_13.parseInt(10)))(books));
1187
+ bookIds = new Set(_12.flow(_12.map("id"), _12.map(_12.parseInt(10)))(books));
1249
1188
  return filter(products);
1250
1189
  };
1251
1190
  };
@@ -1255,57 +1194,33 @@ var makeSearchProducts = () => {
1255
1194
  makeGetAllEntities7("products"),
1256
1195
  (state, { levelIds, subjectIds }) => searchBooks(state, { levelIds, subjectIds }),
1257
1196
  (_state, params) => params,
1258
- (products, books, params) => search26(params)(products, books)
1197
+ (products, books, params) => search20(params)(products, books)
1259
1198
  );
1260
1199
  };
1261
1200
  var useSearchProducts = makeUseSearch(makeSearchProducts);
1262
1201
 
1263
- // src/selectors/promotionalInsert.ts
1264
- init_define_import_meta();
1265
- import { pipe as pipe4 } from "@lls/utils";
1266
- import _14 from "lodash/fp.js";
1267
- var search27 = ({ sortByQuery }) => (promotionalInserts) => pipe4(promotionalInserts, _14.isFunction(sortByQuery) ? sortByQuery : sortByQuery ? _14.sortBy(sortByQuery) : _14.identity);
1268
- var { getPromotionalInserts, getPromotionalInsert, useSearchPromotionalInserts } = crud("promotionalInserts", {
1269
- search: search27
1270
- });
1271
-
1272
1202
  // src/selectors/resource.ts
1273
1203
  init_define_import_meta();
1274
- import { makeEntitiesFilter as makeEntitiesFilter22 } from "@lls/utils";
1275
- var search28 = ({ chapterIds }) => makeEntitiesFilter22({
1204
+ import { makeEntitiesFilter as makeEntitiesFilter18 } from "@lls/utils";
1205
+ var search21 = ({ chapterIds }) => makeEntitiesFilter18({
1276
1206
  chapter: chapterIds
1277
1207
  });
1278
1208
  var { getResources, getResource, useSearchResources } = crud("resources", {
1279
- search: search28
1280
- });
1281
-
1282
- // src/selectors/school.ts
1283
- init_define_import_meta();
1284
- import { makeEntitiesFilter as makeEntitiesFilter23, pipe as pipe5 } from "@lls/utils";
1285
- import _15 from "lodash/fp.js";
1286
- var search29 = ({ ids, academyIds, sortByQuery }) => {
1287
- return (schools) => pipe5(
1288
- schools,
1289
- makeEntitiesFilter23({ id: ids, academy: academyIds }),
1290
- _15.isFunction(sortByQuery) ? sortByQuery : sortByQuery ? _15.sortBy(sortByQuery) : _15.identity
1291
- );
1292
- };
1293
- var { getSchools, getSchool, useSearchSchools } = crud("schools", {
1294
- search: search29
1209
+ search: search21
1295
1210
  });
1296
1211
 
1297
1212
  // src/selectors/sharedPage.ts
1298
1213
  init_define_import_meta();
1299
- import { createSearchSelector as createSearchSelector7, makeEntitiesFilter as makeEntitiesFilter24 } from "@lls/utils";
1300
- import _16 from "lodash/fp.js";
1301
- var search30 = ({
1214
+ import { createSearchSelector as createSearchSelector7, makeEntitiesFilter as makeEntitiesFilter19 } from "@lls/utils";
1215
+ import _13 from "lodash/fp.js";
1216
+ var search22 = ({
1302
1217
  parentIds,
1303
1218
  userIds,
1304
1219
  bookIds,
1305
1220
  isCreatedFromScratch,
1306
1221
  isLearningAssessment,
1307
1222
  ids
1308
- }) => makeEntitiesFilter24({
1223
+ }) => makeEntitiesFilter19({
1309
1224
  id: ids,
1310
1225
  parent: parentIds,
1311
1226
  user: userIds,
@@ -1314,7 +1229,7 @@ var search30 = ({
1314
1229
  isCreatedFromScratch
1315
1230
  });
1316
1231
  var { getSharedPages, getSharedPage, useSearchSharedPages } = crud("sharedPages", {
1317
- search: search30
1232
+ search: search22
1318
1233
  });
1319
1234
  var makeSearchCurrentUserSharedPages = () => createSearchSelector7(
1320
1235
  getCurrentUser,
@@ -1322,24 +1237,24 @@ var makeSearchCurrentUserSharedPages = () => createSearchSelector7(
1322
1237
  (__, params) => params,
1323
1238
  (user2, sharedPages, params) => {
1324
1239
  const sharedUserPageIds = user2?.sharedPages ?? [];
1325
- return search30({ ...params, ids: _16.intersection(sharedUserPageIds, params.ids || sharedUserPageIds) })(sharedPages);
1240
+ return search22({ ...params, ids: _13.intersection(sharedUserPageIds, params.ids || sharedUserPageIds) })(sharedPages);
1326
1241
  }
1327
1242
  );
1328
1243
  var useSearchCurrentUserSharedPages = makeUseSearch(makeSearchCurrentUserSharedPages);
1329
1244
 
1330
1245
  // src/selectors/student.ts
1331
1246
  init_define_import_meta();
1332
- import { makeEntitiesFilter as makeEntitiesFilter25 } from "@lls/utils";
1333
- var search31 = ({ ids }) => makeEntitiesFilter25({ id: ids });
1247
+ import { makeEntitiesFilter as makeEntitiesFilter20 } from "@lls/utils";
1248
+ var search23 = ({ ids }) => makeEntitiesFilter20({ id: ids });
1334
1249
  var { getStudents, getStudent, useSearchStudents } = crud("students", {
1335
- search: search31
1250
+ search: search23
1336
1251
  });
1337
1252
 
1338
1253
  // src/selectors/subject.ts
1339
1254
  init_define_import_meta();
1340
- import { limitToTeacherSubjects, makeEntitiesFilter as makeEntitiesFilter26, pipe as pipe6 } from "@lls/utils";
1341
- import _17 from "lodash/fp.js";
1342
- var search32 = ({
1255
+ import { limitToTeacherSubjects, makeEntitiesFilter as makeEntitiesFilter21, pipe as pipe5 } from "@lls/utils";
1256
+ import _14 from "lodash/fp.js";
1257
+ var search24 = ({
1343
1258
  ids,
1344
1259
  slugs,
1345
1260
  isTeacherSubject,
@@ -1348,9 +1263,9 @@ var search32 = ({
1348
1263
  hasBooks,
1349
1264
  names,
1350
1265
  sortByQuery
1351
- }) => (subjects) => pipe6(
1266
+ }) => (subjects) => pipe5(
1352
1267
  subjects,
1353
- makeEntitiesFilter26(
1268
+ makeEntitiesFilter21(
1354
1269
  {
1355
1270
  id: ids,
1356
1271
  slug: slugs,
@@ -1358,42 +1273,99 @@ var search32 = ({
1358
1273
  hasBooks,
1359
1274
  schoolTypes
1360
1275
  },
1361
- !_17.isNil(hasNewsletterUrl) && ((subject2) => Boolean(subject2?.newsletterUrl) === hasNewsletterUrl)
1276
+ !_14.isNil(hasNewsletterUrl) && ((subject2) => Boolean(subject2?.newsletterUrl) === hasNewsletterUrl)
1362
1277
  ),
1363
- (subjects2) => _17.isNil(isTeacherSubject) ? subjects2 : limitToTeacherSubjects(subjects2),
1364
- _17.isFunction(sortByQuery) ? sortByQuery : sortByQuery ? _17.sortBy(sortByQuery) : _17.identity
1278
+ (subjects2) => _14.isNil(isTeacherSubject) ? subjects2 : limitToTeacherSubjects(subjects2),
1279
+ _14.isFunction(sortByQuery) ? sortByQuery : sortByQuery ? _14.sortBy(sortByQuery) : _14.identity
1365
1280
  );
1366
1281
  var { getSubjects, getSubject, useSearchSubjects, makeSearchSubjects } = crud("subjects", {
1367
- search: search32
1282
+ search: search24
1368
1283
  });
1369
1284
 
1370
1285
  // src/selectors/teacher.ts
1371
1286
  init_define_import_meta();
1372
- import { makeEntitiesFilter as makeEntitiesFilter27 } from "@lls/utils";
1373
- var search33 = ({ ids, schoolIds }) => makeEntitiesFilter27({
1287
+ import { makeEntitiesFilter as makeEntitiesFilter22 } from "@lls/utils";
1288
+ var search25 = ({ ids, schoolIds }) => makeEntitiesFilter22({
1374
1289
  id: ids,
1375
1290
  schools: schoolIds
1376
1291
  });
1377
1292
  var { getTeachers, getTeacher, useSearchTeachers } = crud("teachers", {
1378
- search: search33
1293
+ search: search25
1294
+ });
1295
+
1296
+ // src/selectors/method.ts
1297
+ init_define_import_meta();
1298
+ import { makeEntitiesFilter as makeEntitiesFilter23 } from "@lls/utils";
1299
+ var search26 = ({ ids, uris }) => makeEntitiesFilter23({ id: ids, uri: uris });
1300
+ var { getMethods, useSearchMethods } = crud("methods", {
1301
+ search: search26
1379
1302
  });
1380
1303
 
1381
1304
  // src/selectors/tool.ts
1382
1305
  init_define_import_meta();
1383
- import { makeEntitiesFilter as makeEntitiesFilter28 } from "@lls/utils";
1384
- var search34 = ({ ids, locked, bookIds }) => makeEntitiesFilter28({
1306
+ import { makeEntitiesFilter as makeEntitiesFilter24 } from "@lls/utils";
1307
+ var search27 = ({ ids, locked, bookIds }) => makeEntitiesFilter24({
1385
1308
  id: ids,
1386
1309
  locked,
1387
1310
  books: bookIds
1388
1311
  });
1389
1312
  var { getTools, getTool, useSearchTools } = crud("tools", {
1390
- search: search34
1313
+ search: search27
1391
1314
  });
1392
1315
 
1316
+ // src/selectors/builderIo.ts
1317
+ init_define_import_meta();
1318
+ import { makeEntitiesFilter as makeEntitiesFilter25 } from "@lls/utils";
1319
+ var search28 = ({ modelIds, subjects, schoolTypes }) => makeEntitiesFilter25(
1320
+ {
1321
+ modelId: modelIds
1322
+ },
1323
+ subjects && ((builderIo2) => !!builderIo2?.data?.subjects?.some((x) => subjects.includes(x))),
1324
+ schoolTypes && ((builderIo2) => !!builderIo2?.data?.schoolTypes?.some((x) => schoolTypes.includes(x)))
1325
+ );
1326
+ var { getBuilderIos, getBuilderIo, useSearchBuilderIos } = crud("builderIos", {
1327
+ search: search28
1328
+ });
1329
+
1330
+ // src/selectors/circonscription.ts
1331
+ init_define_import_meta();
1332
+ import _15 from "lodash/fp.js";
1333
+ var search29 = (_params) => _15.identity;
1334
+ var { getCirconscriptions } = crud("circonscriptions", {
1335
+ search: search29
1336
+ });
1337
+
1338
+ // src/selectors/documentType.ts
1339
+ init_define_import_meta();
1340
+ import { makeEntitiesFilter as makeEntitiesFilter26 } from "@lls/utils";
1341
+ var search30 = ({ ids }) => {
1342
+ return makeEntitiesFilter26({
1343
+ id: ids
1344
+ });
1345
+ };
1346
+ var searchSubDocumentType = ({
1347
+ ids
1348
+ }) => {
1349
+ return makeEntitiesFilter26({
1350
+ id: ids
1351
+ });
1352
+ };
1353
+ var { getSubDocumentTypes, useSearchSubDocumentTypes } = crud("subDocumentTypes", {
1354
+ search: searchSubDocumentType
1355
+ });
1356
+ var { getDocumentTypes, getDocumentType, useSearchDocumentTypes } = crud("documentTypes", {
1357
+ search: search30
1358
+ });
1359
+
1360
+ // src/selectors/globalRights.ts
1361
+ init_define_import_meta();
1362
+ import _16 from "lodash/fp.js";
1363
+ var getGlobalRights = _16.get("entities.globalRights");
1364
+
1393
1365
  // src/reducers/entities.ts
1394
1366
  init_define_import_meta();
1395
1367
  import { makeReducer } from "@lls/utils";
1396
- import _18 from "lodash/fp.js";
1368
+ import _17 from "lodash/fp.js";
1397
1369
 
1398
1370
  // src/actions/index.ts
1399
1371
  init_define_import_meta();
@@ -1416,16 +1388,16 @@ var resetAuth = makeActionCreator(actionTypes.RESET_AUTH);
1416
1388
  // src/reducers/entities.ts
1417
1389
  var deleteEntityReducer = (state, payload) => {
1418
1390
  const { path } = payload;
1419
- return _18.omit(path, state);
1391
+ return _17.omit(path, state);
1420
1392
  };
1421
1393
  var updateEntityReducer = (state, payload) => {
1422
1394
  const { path, entity } = payload;
1423
- const currentEntity = _18.get(path, state);
1424
- return _18.set(path, _18.merge(currentEntity, entity), state);
1395
+ const currentEntity = _17.get(path, state);
1396
+ return _17.set(path, _17.merge(currentEntity, entity), state);
1425
1397
  };
1426
1398
  var setEntityReducer = (state, payload) => {
1427
1399
  const { path, entity } = payload;
1428
- return _18.set(path, entity, state);
1400
+ return _17.set(path, entity, state);
1429
1401
  };
1430
1402
  var setEntitiesReducer = (state, payload) => {
1431
1403
  if (typeof payload !== "object") return state;
@@ -1446,7 +1418,7 @@ var setEntitiesReducer = (state, payload) => {
1446
1418
  }
1447
1419
  const diff = Object.keys(entity).some((prop) => {
1448
1420
  const value = entity[prop];
1449
- if (!_18.isEqual(state[entityName]?.[id]?.[prop], value)) {
1421
+ if (!_17.isEqual(state[entityName]?.[id]?.[prop], value)) {
1450
1422
  return true;
1451
1423
  }
1452
1424
  });
@@ -1478,7 +1450,7 @@ var entities_default = entities;
1478
1450
  // src/reducers/auth.ts
1479
1451
  init_define_import_meta();
1480
1452
  import { makeReducer as makeReducer2 } from "@lls/utils";
1481
- import _19 from "lodash/fp.js";
1453
+ import _18 from "lodash/fp.js";
1482
1454
  var initialState = {
1483
1455
  id: void 0,
1484
1456
  role: null,
@@ -1491,15 +1463,15 @@ var initialState = {
1491
1463
  llsUserId: null
1492
1464
  };
1493
1465
  var auth = makeReducer2(initialState, {
1494
- [actionTypes.SET_AUTH]: _19.assign,
1495
- [actionTypes.RESET_AUTH]: _19.constant(initialState)
1466
+ [actionTypes.SET_AUTH]: _18.assign,
1467
+ [actionTypes.RESET_AUTH]: _18.constant(initialState)
1496
1468
  });
1497
1469
  var auth_default = auth;
1498
1470
 
1499
1471
  // src/schema/index.ts
1500
1472
  init_define_import_meta();
1501
1473
  var import_normalizr = __toESM(require_normalizr(), 1);
1502
- import _20 from "lodash/fp.js";
1474
+ import _19 from "lodash/fp.js";
1503
1475
  var document = new import_normalizr.schema.Entity("documents");
1504
1476
  var documentType = new import_normalizr.schema.Entity("documentTypes");
1505
1477
  var subDocumentType = new import_normalizr.schema.Entity("subDocumentTypes");
@@ -1522,7 +1494,7 @@ var globalRights = new import_normalizr.schema.Entity(
1522
1494
  "globalRights",
1523
1495
  {},
1524
1496
  {
1525
- idAttribute: (_21, __, key) => key
1497
+ idAttribute: (_20, __, key) => key
1526
1498
  // Use keys from globalRights(anonymous, classroom, connected, teacher) as Id
1527
1499
  }
1528
1500
  );
@@ -1545,19 +1517,6 @@ var panorama = new import_normalizr.schema.Entity("panoramas");
1545
1517
  var premiumResource = new import_normalizr.schema.Entity("premiumResources");
1546
1518
  var garDivision = new import_normalizr.schema.Entity("garDivisions");
1547
1519
  var circonscription = new import_normalizr.schema.Entity("circonscriptions");
1548
- var promotionalInsert = new import_normalizr.schema.Entity("promotionalInserts");
1549
- var academy = new import_normalizr.schema.Entity("academies");
1550
- var docTemplate = new import_normalizr.schema.Entity("docTemplates");
1551
- var thematic = new import_normalizr.schema.Entity("thematics");
1552
- var connector = new import_normalizr.schema.Entity("connectors");
1553
- var license = new import_normalizr.schema.Entity("licenses");
1554
- var subscription = new import_normalizr.schema.Entity("subscriptions");
1555
- var miniUrls = new import_normalizr.schema.Entity("miniUrls", {}, { idAttribute: "path" });
1556
- var notions = new import_normalizr.schema.Entity("notions");
1557
- var words = new import_normalizr.schema.Entity("words");
1558
- var opportunity = new import_normalizr.schema.Entity("opportunities");
1559
- var formula = new import_normalizr.schema.Entity("formulas");
1560
- var prompt = new import_normalizr.schema.Entity("prompts");
1561
1520
  var define = (el, scheme) => {
1562
1521
  el.define(scheme);
1563
1522
  return scheme;
@@ -1574,33 +1533,14 @@ var bookSchema = define(book, {
1574
1533
  subjects: [subject],
1575
1534
  textbooks: [book],
1576
1535
  educationalGuides: [book],
1577
- parts: [book],
1578
1536
  tools: [tool],
1579
1537
  workbooks: [book],
1580
- workplans: [book],
1581
- parent: [book]
1582
- });
1583
- var academySchema = define(academy, {
1584
- schools: [school]
1585
- });
1586
- var docTemplateSchema = define(docTemplate, {
1587
- book
1588
- });
1589
- var promotionalInsertSchema = define(promotionalInsert, {
1590
- subjects: [subject],
1591
- levels: [level]
1538
+ workplans: [book]
1592
1539
  });
1593
1540
  var garDivisionSchema = define(garDivision, {
1594
1541
  students: [user],
1595
1542
  school
1596
1543
  });
1597
- var licenseSchema = define(license, {
1598
- school,
1599
- user,
1600
- books: [book],
1601
- adoptantBooks: [book],
1602
- subscriptions: [subscription]
1603
- });
1604
1544
  var documentTypeSchema = define(documentType, {
1605
1545
  subTypes: [subDocumentType]
1606
1546
  });
@@ -1632,7 +1572,6 @@ var pageSchema = define(page, {
1632
1572
  });
1633
1573
  var userSchema = define(user, {
1634
1574
  books: [book],
1635
- booksContributedTo: [book],
1636
1575
  booksV2: [book],
1637
1576
  contacts: [contact],
1638
1577
  copies: [page],
@@ -1643,7 +1582,6 @@ var userSchema = define(user, {
1643
1582
  lastBooksViewed: [book],
1644
1583
  lastPagesViewed: [page],
1645
1584
  levels: [level],
1646
- lexicalFlowers: { hits: [lexicalFlower] },
1647
1585
  mainNotifications: [mainNotification],
1648
1586
  pages: [page],
1649
1587
  schools: [school],
@@ -1652,7 +1590,8 @@ var userSchema = define(user, {
1652
1590
  subjects: [subject],
1653
1591
  teachers: [teacher],
1654
1592
  userPages: [page],
1655
- userBookPages: [page]
1593
+ userBookPages: [page],
1594
+ lexicalFlowers: { hits: [lexicalFlower] }
1656
1595
  });
1657
1596
  var notificationSchema = define(mainNotification, { page });
1658
1597
  drawerNotification.define({ page });
@@ -1665,11 +1604,11 @@ var toolSchema = define(tool, {
1665
1604
  books: [book]
1666
1605
  });
1667
1606
  var sharedPageSchema = define(sharedPage, {
1668
- book,
1607
+ user,
1669
1608
  chapter,
1670
- originalPage: page,
1671
1609
  parent: page,
1672
- user
1610
+ book,
1611
+ originalPage: page
1673
1612
  });
1674
1613
  var studentSchema = define(student, {
1675
1614
  levels: [level]
@@ -1686,10 +1625,7 @@ var groupSchema = define(group, {
1686
1625
  students: [student]
1687
1626
  });
1688
1627
  var schoolSchema = define(school, {
1689
- groups: [group],
1690
- teachers: [user],
1691
- students: [user],
1692
- users: [user]
1628
+ groups: [group]
1693
1629
  });
1694
1630
  var methodSchema = define(method, {
1695
1631
  book
@@ -1707,75 +1643,55 @@ var levelSchema = define(level, {
1707
1643
  });
1708
1644
  var querySchema = {
1709
1645
  viewer: {
1710
- academies: { hits: [academy] },
1646
+ addCorrectionsToGroup: group,
1647
+ addCorrectionsToStudents: page,
1648
+ addPageAppreciation: page,
1649
+ addStudentToGroup: group,
1711
1650
  books: { hits: [book] },
1651
+ methods: { hits: [method] },
1712
1652
  chapters: { hits: [chapter] },
1713
- collections: { hits: [collection] },
1714
- connectors: { hits: [connector] },
1715
- docTemplates: { hits: [docTemplate] },
1653
+ createEstimate: quote,
1654
+ createGroup: group,
1655
+ createPage: page,
1656
+ createUser: user,
1657
+ createLexicalFlower: lexicalFlower,
1716
1658
  documents: { hits: [document] },
1717
1659
  documentTypes: { hits: [documentType] },
1718
- educationalGuides: { hits: [book] },
1660
+ subDocumentTypes: { hits: [subDocumentType] },
1719
1661
  explorerResults: [explorerResult],
1720
- globalRights: new import_normalizr.schema.Values(globalRights),
1721
1662
  levels: [level],
1722
- licenses: { hits: [license] },
1723
- methods: { hits: [method] },
1663
+ globalRights: new import_normalizr.schema.Values(globalRights),
1724
1664
  me: user,
1725
- miniUrls: [miniUrls],
1726
- notions: { hits: [notions] },
1665
+ // mutations
1727
1666
  pages: { hits: [page] },
1728
1667
  panoramas: [panorama],
1729
1668
  parents: { hits: [page] },
1730
1669
  //pages alias
1731
1670
  product: { hits: [product] },
1732
- promotionalInserts: { hits: [promotionalInsert] },
1733
- prompts: { hits: [prompt] },
1734
- resources: { hits: [resource] },
1735
- schools: { hits: [school] },
1736
1671
  schoolTypes: { hits: [schoolType] },
1737
- subDocumentTypes: { hits: [subDocumentType] },
1738
- subjects: { hits: [subject] },
1739
- textbooks: { hits: [book] },
1740
- thematics: { hits: [thematic] },
1741
- tools: { hits: [tool] },
1742
- words: { hits: [words] },
1743
- workbooks: { hits: [book] },
1744
- workplans: { hits: [book] },
1745
- // mutations
1746
- addCorrectionsToGroup: group,
1747
- addCorrectionsToStudents: page,
1748
- addPageAppreciation: page,
1749
- addStudentToGroup: group,
1750
- createEstimate: quote,
1751
- createGroup: group,
1752
- createPage: page,
1753
- createUser: user,
1754
- createLexicalFlower: lexicalFlower,
1755
1672
  sharePageToGroup: page,
1756
1673
  sharePageToUsers: page,
1674
+ subjects: { hits: [subject] },
1757
1675
  updateCopyNotification: copyNotification,
1758
1676
  updateDrawerNotification: drawerNotification,
1759
1677
  updateGroup: group,
1760
- updateLexicalFlower: lexicalFlower,
1761
1678
  updateMainNotification: mainNotification,
1762
1679
  updatePage: page,
1763
1680
  updateTrialUser: user,
1764
1681
  updateUserLastActivitySeenAt: user,
1765
- updateUser: user
1682
+ updateUser: user,
1683
+ updateLexicalFlower: lexicalFlower
1766
1684
  },
1767
1685
  auth: {
1768
1686
  user
1769
1687
  },
1770
1688
  marketing: {
1771
- builderIos: [builderIo],
1772
- circonscriptions: [circonscription],
1689
+ addLikeFaq: faq,
1773
1690
  communityProjects: [communityProjects],
1691
+ createAnalytics: analytic,
1774
1692
  faq: [faq],
1775
- news: { hits: [news] },
1776
- // mutations
1777
- addLikeFaq: faq,
1778
- createAnalytics: analytic
1693
+ builderIos: [builderIo],
1694
+ circonscriptions: [circonscription]
1779
1695
  },
1780
1696
  static: {
1781
1697
  projetVoltaire: {
@@ -1783,36 +1699,12 @@ var querySchema = {
1783
1699
  }
1784
1700
  }
1785
1701
  };
1786
- var augmentNormalizeSchema = (augmentSchemaFn) => {
1787
- const augmentedSchema = augmentSchemaFn({
1788
- connector,
1789
- formula,
1790
- license,
1791
- opportunity,
1792
- user,
1793
- docTemplate,
1794
- document,
1795
- documentType,
1796
- school,
1797
- book,
1798
- chapter,
1799
- page
1800
- });
1801
- const overridingKeys = Object.keys(augmentedSchema).filter((key) => key in querySchema);
1802
- if (overridingKeys.length) {
1803
- throw new Error(`can not override schema with existing ${overridingKeys}. implement them in viewer instead`);
1804
- }
1805
- return _20.flow((data) => (0, import_normalizr.normalize)(data, { ...augmentedSchema, ...querySchema }));
1806
- };
1807
- var normalizeData = _20.flow((data) => (0, import_normalizr.normalize)(data, querySchema));
1702
+ var normalizeData = _19.flow((data) => (0, import_normalizr.normalize)(data, querySchema));
1808
1703
  export {
1809
- augmentNormalizeSchema,
1810
1704
  auth_default as authReducer,
1811
1705
  entities_default as entitiesReducer,
1812
1706
  filterBooks,
1813
1707
  filterPages,
1814
- getAcademies,
1815
- getAcademy,
1816
1708
  getAllNews,
1817
1709
  getAuth,
1818
1710
  getBook,
@@ -1829,7 +1721,6 @@ export {
1829
1721
  getContact,
1830
1722
  getContacts,
1831
1723
  getCurrentUser,
1832
- getDocTemplate,
1833
1724
  getDocument,
1834
1725
  getDocumentType,
1835
1726
  getDocumentTypes,
@@ -1845,8 +1736,6 @@ export {
1845
1736
  getLevel,
1846
1737
  getLevels,
1847
1738
  getLexicalFlowers,
1848
- getLicense,
1849
- getLicenses,
1850
1739
  getMainNotifications,
1851
1740
  getMethods,
1852
1741
  getNews,
@@ -1856,8 +1745,6 @@ export {
1856
1745
  getPremiumResource,
1857
1746
  getPremiumResources,
1858
1747
  getProducts,
1859
- getPromotionalInsert,
1860
- getPromotionalInserts,
1861
1748
  getResource,
1862
1749
  getResources,
1863
1750
  getSchool,
@@ -1892,7 +1779,6 @@ export {
1892
1779
  normalizeData,
1893
1780
  querySchema,
1894
1781
  searchLevels,
1895
- searchLicenses,
1896
1782
  searchSchoolTypes,
1897
1783
  setEntitiesReducer,
1898
1784
  useSearchBooks,
@@ -1903,7 +1789,6 @@ export {
1903
1789
  useSearchContacts,
1904
1790
  useSearchCopyNotifications,
1905
1791
  useSearchCurrentUserSharedPages,
1906
- useSearchDocTemplates,
1907
1792
  useSearchDocumentTypes,
1908
1793
  useSearchDocuments,
1909
1794
  useSearchDrafts,
@@ -1918,7 +1803,6 @@ export {
1918
1803
  useSearchPages,
1919
1804
  useSearchPremiumResources,
1920
1805
  useSearchProducts,
1921
- useSearchPromotionalInserts,
1922
1806
  useSearchResources,
1923
1807
  useSearchSchoolTypes,
1924
1808
  useSearchSchools,
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.12.0-ff241f31",
5
+ "version": "24.12.0",
6
6
  "type": "module",
7
7
  "types": "./lib/builttypes/store/src/index.d.ts",
8
8
  "exports": {
@@ -23,8 +23,8 @@
23
23
  },
24
24
  "keywords": [],
25
25
  "peerDependencies": {
26
- "@lls/common": "*",
27
26
  "@lls/utils": "*",
27
+ "@lls/common": "*",
28
28
  "lodash": "*",
29
29
  "react": "*",
30
30
  "react-redux": "*",
@@ -33,26 +33,25 @@
33
33
  "devDependencies": {
34
34
  "@biomejs/biome": "1.9.4",
35
35
  "@happy-dom/global-registrator": "15.11.0",
36
- "@testing-library/react": "16.2.0",
37
- "@types/lodash": "4.17.14",
38
- "@types/node": "22.10.7",
36
+ "@testing-library/react": "16.0.1",
37
+ "@types/lodash": "4.17.13",
38
+ "@types/node": "22.9.0",
39
39
  "@types/react": "18.3.12",
40
40
  "@types/react-redux": "7.1.34",
41
- "@vitejs/plugin-react-swc": "3.7.2",
41
+ "@vitejs/plugin-react-swc": "3.7.1",
42
42
  "esbuild": "0.24.0",
43
43
  "happy-dom": "15.11.0",
44
44
  "lodash": "4.17.21",
45
45
  "react": "18.3.1",
46
- "react-dom": "18.3.1",
47
46
  "react-redux": "8.1.2",
48
47
  "redux": "5.0.1",
49
48
  "reselect": "4.1.8",
50
- "typescript": "5.7.3",
49
+ "typescript": "5.6.3",
51
50
  "vite": "5.4.11",
52
- "vite-tsconfig-paths": "5.1.4",
53
- "@lls/common": "24.12.0-ff241f31",
54
- "@lls/utils": "24.12.0-ff241f31",
55
- "@lls/vitescripts": "24.12.0-ff241f31"
51
+ "vite-tsconfig-paths": "5.1.3",
52
+ "@lls/common": "24.12.0",
53
+ "@lls/utils": "24.12.0",
54
+ "@lls/vitescripts": "24.12.0"
56
55
  },
57
56
  "license": "ISC",
58
57
  "dependencies": {
@@ -62,6 +61,6 @@
62
61
  "build": "node build.mjs",
63
62
  "lint": "pnpm biome check --apply src __tests__",
64
63
  "dts": "pnpm tsc --project tsconfig.production.json",
65
- "test": "bun test --bail"
64
+ "test": "bun test"
66
65
  }
67
66
  }