@lls/store 24.1.59-0828db09 → 24.1.59-0fc150f7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +283 -282
- package/package.json +11 -11
package/lib/index.js
CHANGED
|
@@ -733,20 +733,26 @@ var require_normalizr = __commonJS({
|
|
|
733
733
|
// src/index.ts
|
|
734
734
|
init_define_import_meta();
|
|
735
735
|
|
|
736
|
-
// src/selectors/
|
|
736
|
+
// src/selectors/auth.ts
|
|
737
737
|
init_define_import_meta();
|
|
738
|
-
import { filterEntitiesSimpleFieldByValues } from "@lls/utils";
|
|
739
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 } from "@lls/utils";
|
|
740
746
|
|
|
741
747
|
// src/selectors/crud.ts
|
|
742
748
|
init_define_import_meta();
|
|
743
749
|
import { createSearchSelector, makeGetAllEntities, makeGetEntityById } from "@lls/utils";
|
|
744
|
-
var crud = (entityName, { search:
|
|
750
|
+
var crud = (entityName, { search: search24 }) => {
|
|
745
751
|
const getElements = makeGetAllEntities(entityName);
|
|
746
752
|
const makeSearchElements = () => createSearchSelector(
|
|
747
753
|
getElements,
|
|
748
754
|
(_state, params) => params,
|
|
749
|
-
(elements, params) =>
|
|
755
|
+
(elements, params) => search24(params)(elements)
|
|
750
756
|
);
|
|
751
757
|
const methodName = `${entityName.charAt(0).toUpperCase()}${entityName.slice(1)}`;
|
|
752
758
|
const getElementById = makeGetEntityById(entityName);
|
|
@@ -754,26 +760,21 @@ var crud = (entityName, { search: search23 }) => {
|
|
|
754
760
|
[`get${methodName}`]: getElements,
|
|
755
761
|
[`search${methodName}`]: makeSearchElements(),
|
|
756
762
|
[`get${methodName.replace(/s$/, "")}`]: getElementById,
|
|
757
|
-
[`makeSearch${methodName}`]: makeSearchElements
|
|
763
|
+
[`makeSearch${methodName}`]: makeSearchElements,
|
|
764
|
+
[`filter${methodName}`]: search24
|
|
758
765
|
};
|
|
759
766
|
return back;
|
|
760
767
|
};
|
|
761
768
|
|
|
762
769
|
// src/selectors/school.ts
|
|
763
|
-
var search = ({ ids }) =>
|
|
770
|
+
var search = ({ ids }) => makeEntitiesFilter({ id: ids });
|
|
764
771
|
var { getSchools, getSchool, searchSchools, makeSearchSchools } = crud("schools", {
|
|
765
772
|
search
|
|
766
773
|
});
|
|
767
774
|
|
|
768
775
|
// src/selectors/book.ts
|
|
769
776
|
init_define_import_meta();
|
|
770
|
-
import {
|
|
771
|
-
createSearchSelector as createSearchSelector2,
|
|
772
|
-
filterEntitiesArrayFieldByValues,
|
|
773
|
-
filterEntitiesSimpleFieldByValue,
|
|
774
|
-
filterEntitiesSimpleFieldByValues as filterEntitiesSimpleFieldByValues2,
|
|
775
|
-
makeGetEntityById as makeGetEntityById2
|
|
776
|
-
} from "@lls/utils";
|
|
777
|
+
import { createSearchSelector as createSearchSelector2, makeEntitiesFilter as makeEntitiesFilter2, makeGetEntityById as makeGetEntityById2, pipe } from "@lls/utils";
|
|
777
778
|
import _2 from "lodash/fp.js";
|
|
778
779
|
var search2 = ({
|
|
779
780
|
ids,
|
|
@@ -791,23 +792,28 @@ var search2 = ({
|
|
|
791
792
|
publishers,
|
|
792
793
|
isRenewed,
|
|
793
794
|
isPrimary
|
|
794
|
-
}) =>
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
795
|
+
}) => {
|
|
796
|
+
return (books) => pipe(
|
|
797
|
+
books,
|
|
798
|
+
makeEntitiesFilter2({
|
|
799
|
+
id: ids,
|
|
800
|
+
year: years,
|
|
801
|
+
levels: levelIds,
|
|
802
|
+
subjects: subjectIds,
|
|
803
|
+
valid: isValid,
|
|
804
|
+
publishers,
|
|
805
|
+
hasNewDesign,
|
|
806
|
+
isWorkbook,
|
|
807
|
+
isWorkplan,
|
|
808
|
+
hasNoTeacherBook,
|
|
809
|
+
slug: slugs,
|
|
810
|
+
uri: uris,
|
|
811
|
+
isRenewed,
|
|
812
|
+
isPrimary
|
|
813
|
+
}),
|
|
814
|
+
_2.isFunction(sortByQuery) ? sortByQuery : sortByQuery ? _2.sortBy(sortByQuery) : _2.identity
|
|
815
|
+
);
|
|
816
|
+
};
|
|
811
817
|
var { getBooks, getBook, searchBooks, makeSearchBooks } = crud("books", {
|
|
812
818
|
search: search2
|
|
813
819
|
});
|
|
@@ -818,18 +824,11 @@ var makeGetBook = () => makeGetEntityById2("books");
|
|
|
818
824
|
// src/selectors/user.ts
|
|
819
825
|
init_define_import_meta();
|
|
820
826
|
var import_reselect = __toESM(require_lib(), 1);
|
|
821
|
-
import {
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
import _3 from "lodash/fp.js";
|
|
827
|
-
var getAuth = _3.get("auth");
|
|
828
|
-
var getIsLogged = _3.flow(_3.get("auth.id"), _3.negate(_3.isNil));
|
|
829
|
-
var getToken = _3.get("auth.token");
|
|
830
|
-
|
|
831
|
-
// src/selectors/user.ts
|
|
832
|
-
var search3 = ({ ids, schoolIds }) => _4.flow(filterEntitiesArrayFieldByValues2("schools", schoolIds), filterEntitiesSimpleFieldByValues3("id", ids));
|
|
827
|
+
import { makeEntitiesFilter as makeEntitiesFilter3 } from "@lls/utils";
|
|
828
|
+
var search3 = ({ ids, schoolIds }) => makeEntitiesFilter3({
|
|
829
|
+
schools: schoolIds,
|
|
830
|
+
id: ids
|
|
831
|
+
});
|
|
833
832
|
var { getUsers, getUser, searchUsers, makeSearchUsers } = crud("users", {
|
|
834
833
|
search: search3
|
|
835
834
|
});
|
|
@@ -841,12 +840,14 @@ var getCurrentUser = (0, import_reselect.createSelector)(
|
|
|
841
840
|
|
|
842
841
|
// src/selectors/chapter.ts
|
|
843
842
|
init_define_import_meta();
|
|
844
|
-
import {
|
|
845
|
-
import
|
|
846
|
-
var search4 = ({ bookIds, ids, hasTeacherBook }) =>
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
843
|
+
import { makeEntitiesFilter as makeEntitiesFilter4 } from "@lls/utils";
|
|
844
|
+
import _3 from "lodash/fp.js";
|
|
845
|
+
var search4 = ({ bookIds, ids, hasTeacherBook }) => makeEntitiesFilter4(
|
|
846
|
+
{
|
|
847
|
+
book: bookIds,
|
|
848
|
+
id: ids
|
|
849
|
+
},
|
|
850
|
+
!_3.isNil(hasTeacherBook) && ((chapter2) => !!chapter2?.teacherBook === hasTeacherBook)
|
|
850
851
|
);
|
|
851
852
|
var { getChapters, getChapter, searchChapters, makeSearchChapters } = crud("chapters", {
|
|
852
853
|
search: search4
|
|
@@ -854,14 +855,8 @@ var { getChapters, getChapter, searchChapters, makeSearchChapters } = crud("chap
|
|
|
854
855
|
|
|
855
856
|
// src/selectors/page.ts
|
|
856
857
|
init_define_import_meta();
|
|
857
|
-
import {
|
|
858
|
-
|
|
859
|
-
filterEntitiesArrayFieldByValues as filterEntitiesArrayFieldByValues3,
|
|
860
|
-
filterEntitiesSimpleFieldByValues as filterEntitiesSimpleFieldByValues5,
|
|
861
|
-
makeGetAllEntities as makeGetAllEntities2,
|
|
862
|
-
makeGetEntityById as makeGetEntityById3
|
|
863
|
-
} from "@lls/utils";
|
|
864
|
-
import _6 from "lodash/fp.js";
|
|
858
|
+
import { createSearchSelector as createSearchSelector3, makeEntitiesFilter as makeEntitiesFilter5, makeGetAllEntities as makeGetAllEntities2, makeGetEntityById as makeGetEntityById3 } from "@lls/utils";
|
|
859
|
+
import _4 from "lodash/fp.js";
|
|
865
860
|
var search5 = ({
|
|
866
861
|
ids,
|
|
867
862
|
chapterIds,
|
|
@@ -874,28 +869,46 @@ var search5 = ({
|
|
|
874
869
|
hasNewDesign,
|
|
875
870
|
slugs,
|
|
876
871
|
isLearningAssessment,
|
|
877
|
-
isCreatedFromScratch
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
872
|
+
isCreatedFromScratch,
|
|
873
|
+
userIds,
|
|
874
|
+
parentIds,
|
|
875
|
+
originalPageIds,
|
|
876
|
+
sharedUserIds,
|
|
877
|
+
sharedGroups,
|
|
878
|
+
isDraft,
|
|
879
|
+
isParentCreatedFromScratch,
|
|
880
|
+
updatedAfter
|
|
881
|
+
}) => {
|
|
882
|
+
let pageById = false;
|
|
883
|
+
return makeEntitiesFilter5(
|
|
884
|
+
{
|
|
885
|
+
id: ids,
|
|
886
|
+
chapter: chapterIds,
|
|
887
|
+
valid: isValid,
|
|
888
|
+
isOriginal,
|
|
889
|
+
hasNewDesign,
|
|
890
|
+
slug: slugs,
|
|
891
|
+
oldLesson: oldLessonIds,
|
|
892
|
+
isLearningAssessment,
|
|
893
|
+
isCreatedFromScratch,
|
|
894
|
+
premium,
|
|
895
|
+
thematicName: thematicNames,
|
|
896
|
+
book: bookIds,
|
|
897
|
+
parent: parentIds,
|
|
898
|
+
user: userIds,
|
|
899
|
+
originalPage: originalPageIds,
|
|
900
|
+
sharedUsers: sharedUserIds,
|
|
901
|
+
sharedGroups,
|
|
902
|
+
isDraft
|
|
903
|
+
},
|
|
904
|
+
isParentCreatedFromScratch && ((page2, pages) => {
|
|
905
|
+
pageById = pageById || _4.keyBy("id", pages);
|
|
906
|
+
return !!_4.get([page2?.originalPage, "isCreatedFromScratch"], pageById);
|
|
907
|
+
}),
|
|
908
|
+
updatedAfter && _4.flow(_4.get("updatedAt"), (date) => new Date(date) - updatedAfter >= 0)
|
|
909
|
+
);
|
|
910
|
+
};
|
|
911
|
+
var { getPages, getPage, searchPages, makeSearchPages, filterPages } = crud("pages", {
|
|
899
912
|
search: search5
|
|
900
913
|
});
|
|
901
914
|
var getDraftPages = makeGetAllEntities2("drafts");
|
|
@@ -910,64 +923,30 @@ var searchDraftPages = makeSearchDraftPages();
|
|
|
910
923
|
var makeSearchModifiedPages = () => createSearchSelector3(
|
|
911
924
|
getPages,
|
|
912
925
|
(_state, params) => params,
|
|
913
|
-
(pages, {
|
|
914
|
-
chapterIds,
|
|
915
|
-
userIds,
|
|
916
|
-
originalPageIds,
|
|
917
|
-
parentIds,
|
|
918
|
-
bookIds,
|
|
919
|
-
sharedUserIds,
|
|
920
|
-
updatedAfter,
|
|
921
|
-
isLearningAssessment,
|
|
922
|
-
thematicNames,
|
|
923
|
-
isDraft,
|
|
924
|
-
isCreatedFromScratch,
|
|
925
|
-
isParentCreatedFromScratch,
|
|
926
|
-
sharedGroups
|
|
927
|
-
}) => _6.flow(
|
|
928
|
-
filterEntitiesSimpleFieldByValues5("parent", parentIds),
|
|
929
|
-
filterEntitiesSimpleFieldByValues5("chapter", chapterIds),
|
|
930
|
-
filterEntitiesSimpleFieldByValues5("book", bookIds),
|
|
931
|
-
filterEntitiesSimpleFieldByValues5("user", userIds),
|
|
932
|
-
filterEntitiesSimpleFieldByValues5("originalPage", originalPageIds),
|
|
933
|
-
filterEntitiesArrayFieldByValues3("sharedUsers", sharedUserIds),
|
|
934
|
-
filterEntitiesArrayFieldByValues3("sharedGroups", sharedGroups),
|
|
935
|
-
filterEntitiesSimpleFieldByValues5("isOriginal", [false]),
|
|
936
|
-
filterEntitiesSimpleFieldByValues5("thematicName", thematicNames),
|
|
937
|
-
!_6.isNil(isLearningAssessment) ? filterEntitiesSimpleFieldByValues5("isLearningAssessment", [isLearningAssessment]) : _6.identity,
|
|
938
|
-
!_6.isNil(isCreatedFromScratch) ? filterEntitiesSimpleFieldByValues5("isCreatedFromScratch", [isCreatedFromScratch]) : _6.identity,
|
|
939
|
-
!_6.isNil(isDraft) ? filterEntitiesSimpleFieldByValues5("isDraft", [isDraft]) : _6.identity,
|
|
940
|
-
isParentCreatedFromScratch ? _6.filter(
|
|
941
|
-
(entity) => _6.flow(_6.find({ id: entity?.originalPage }), _6.get("isCreatedFromScratch"))(pages)
|
|
942
|
-
) : _6.identity,
|
|
943
|
-
updatedAfter ? _6.filter(
|
|
944
|
-
_6.flow(_6.get("updatedAt"), (date) => new Date(date) - updatedAfter >= 0)
|
|
945
|
-
) : _6.identity
|
|
946
|
-
)(pages)
|
|
926
|
+
(pages, params) => search5({ ...params, isOriginal: false })(pages)
|
|
947
927
|
);
|
|
948
928
|
var searchModifiedPages = makeSearchModifiedPages();
|
|
949
929
|
|
|
950
930
|
// src/selectors/collection.ts
|
|
951
931
|
init_define_import_meta();
|
|
952
|
-
import
|
|
953
|
-
var search6 = (_params) =>
|
|
932
|
+
import _5 from "lodash/fp.js";
|
|
933
|
+
var search6 = (_params) => _5.identity;
|
|
954
934
|
var { getCollections, getCollection, searchCollections, makeSearchCollections } = crud("collections", {
|
|
955
935
|
search: search6
|
|
956
936
|
});
|
|
957
937
|
|
|
958
938
|
// src/selectors/communityProject.ts
|
|
959
939
|
init_define_import_meta();
|
|
960
|
-
import {
|
|
961
|
-
import _8 from "lodash/fp.js";
|
|
940
|
+
import { makeEntitiesFilter as makeEntitiesFilter6 } from "@lls/utils";
|
|
962
941
|
var search7 = ({
|
|
963
942
|
slugs,
|
|
964
943
|
isFeatured,
|
|
965
944
|
projectTypes
|
|
966
|
-
}) =>
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
);
|
|
945
|
+
}) => makeEntitiesFilter6({
|
|
946
|
+
slug: slugs,
|
|
947
|
+
isFeatured,
|
|
948
|
+
projectTypes
|
|
949
|
+
});
|
|
971
950
|
var { getCommunityProjects, getCommunityProject, searchCommunityProjects, makeSearchCommunityProjects } = crud(
|
|
972
951
|
"communityProjects",
|
|
973
952
|
{
|
|
@@ -977,45 +956,35 @@ var { getCommunityProjects, getCommunityProject, searchCommunityProjects, makeSe
|
|
|
977
956
|
|
|
978
957
|
// src/selectors/contact.ts
|
|
979
958
|
init_define_import_meta();
|
|
980
|
-
import
|
|
981
|
-
var search8 = (_params) =>
|
|
959
|
+
import _6 from "lodash/fp.js";
|
|
960
|
+
var search8 = (_params) => _6.identity;
|
|
982
961
|
var { getContacts, getContact, searchContacts, makeSearchContacts } = crud("contacts", {
|
|
983
962
|
search: search8
|
|
984
963
|
});
|
|
985
964
|
|
|
986
965
|
// src/selectors/copyNotification.ts
|
|
987
966
|
init_define_import_meta();
|
|
988
|
-
import { createSearchSelector as createSearchSelector4,
|
|
989
|
-
import _10 from "lodash/fp.js";
|
|
967
|
+
import { createSearchSelector as createSearchSelector4, makeEntitiesFilter as makeEntitiesFilter7, makeGetAllEntities as makeGetAllEntities3 } from "@lls/utils";
|
|
990
968
|
var getCopyNotifications = makeGetAllEntities3("copyNotifications");
|
|
991
969
|
var makeSearchCopyNotifications = () => createSearchSelector4(
|
|
992
|
-
[getCurrentUser, getCopyNotifications, (
|
|
993
|
-
(currentUser, copyNotifications, { pageIds, read }) =>
|
|
994
|
-
|
|
995
|
-
(ids
|
|
996
|
-
|
|
997
|
-
filterEntitiesSimpleFieldByValues7("page", pageIds),
|
|
998
|
-
filterEntitiesSimpleFieldByValues7("read", _10.isNil(read) ? void 0 : [read])
|
|
999
|
-
)(copyNotifications)
|
|
1000
|
-
)(currentUser)
|
|
970
|
+
[getCurrentUser, getCopyNotifications, (_17, params) => params],
|
|
971
|
+
(currentUser, copyNotifications, { pageIds, read }) => {
|
|
972
|
+
const ids = currentUser?.copyNotifications;
|
|
973
|
+
return makeEntitiesFilter7({ id: ids, read, page: pageIds })(copyNotifications);
|
|
974
|
+
}
|
|
1001
975
|
);
|
|
1002
976
|
var searchCopyNotifications = makeSearchCopyNotifications();
|
|
1003
977
|
|
|
1004
978
|
// src/selectors/drawerNotification.ts
|
|
1005
979
|
init_define_import_meta();
|
|
1006
|
-
import { createSearchSelector as createSearchSelector5,
|
|
1007
|
-
import _11 from "lodash/fp.js";
|
|
980
|
+
import { createSearchSelector as createSearchSelector5, makeEntitiesFilter as makeEntitiesFilter8, makeGetAllEntities as makeGetAllEntities4 } from "@lls/utils";
|
|
1008
981
|
var getDrawerNotifications = makeGetAllEntities4("drawerNotifications");
|
|
1009
982
|
var makeSearchDrawerNotifications = () => createSearchSelector5(
|
|
1010
|
-
[getCurrentUser, getDrawerNotifications, (
|
|
1011
|
-
(currentUser, drawerNotifications, { read, pageIds }) =>
|
|
1012
|
-
|
|
1013
|
-
(ids
|
|
1014
|
-
|
|
1015
|
-
filterEntitiesSimpleFieldByValues8("read", _11.isNil(read) ? void 0 : [read]),
|
|
1016
|
-
filterEntitiesSimpleFieldByValues8("page", pageIds)
|
|
1017
|
-
)(drawerNotifications)
|
|
1018
|
-
)(currentUser)
|
|
983
|
+
[getCurrentUser, getDrawerNotifications, (_17, params) => params],
|
|
984
|
+
(currentUser, drawerNotifications, { read, pageIds }) => {
|
|
985
|
+
const ids = currentUser?.drawerNotifications;
|
|
986
|
+
return makeEntitiesFilter8({ id: ids, read, page: pageIds })(drawerNotifications);
|
|
987
|
+
}
|
|
1019
988
|
);
|
|
1020
989
|
var searchDrawerNotifications = makeSearchDrawerNotifications();
|
|
1021
990
|
|
|
@@ -1026,8 +995,8 @@ var getFaqs = makeGetAllEntities5("faq");
|
|
|
1026
995
|
|
|
1027
996
|
// src/selectors/garDivision.ts
|
|
1028
997
|
init_define_import_meta();
|
|
1029
|
-
import
|
|
1030
|
-
var search9 = (_params) =>
|
|
998
|
+
import _7 from "lodash/fp.js";
|
|
999
|
+
var search9 = (_params) => _7.identity;
|
|
1031
1000
|
var { getGarDivisions, getGarDivision, searchGarDivisions, makeSearchGarDivisions } = crud("garDivisions", {
|
|
1032
1001
|
search: search9
|
|
1033
1002
|
});
|
|
@@ -1035,9 +1004,9 @@ var { getGarDivisions, getGarDivision, searchGarDivisions, makeSearchGarDivision
|
|
|
1035
1004
|
// src/selectors/group.ts
|
|
1036
1005
|
init_define_import_meta();
|
|
1037
1006
|
var import_reselect2 = __toESM(require_lib(), 1);
|
|
1038
|
-
import {
|
|
1039
|
-
import
|
|
1040
|
-
var search10 = ({ ownerIds }) =>
|
|
1007
|
+
import { makeEntitiesFilter as makeEntitiesFilter9 } from "@lls/utils";
|
|
1008
|
+
import _8 from "lodash/fp.js";
|
|
1009
|
+
var search10 = ({ ownerIds }) => _8.flow(makeEntitiesFilter9({ owner: ownerIds }), _8.orderBy("createdAt", ["desc"]));
|
|
1041
1010
|
var { getGroups, getGroup, searchGroups, makeSearchGroups } = crud("groups", {
|
|
1042
1011
|
search: search10
|
|
1043
1012
|
});
|
|
@@ -1049,8 +1018,8 @@ var getUserGroups = (0, import_reselect2.createSelector)(
|
|
|
1049
1018
|
// src/selectors/level.ts
|
|
1050
1019
|
init_define_import_meta();
|
|
1051
1020
|
var import_reselect3 = __toESM(require_lib(), 1);
|
|
1052
|
-
import {
|
|
1053
|
-
import
|
|
1021
|
+
import { makeEntitiesFilter as makeEntitiesFilter10 } from "@lls/utils";
|
|
1022
|
+
import _9 from "lodash/fp.js";
|
|
1054
1023
|
var search11 = ({
|
|
1055
1024
|
ids,
|
|
1056
1025
|
slugs,
|
|
@@ -1060,37 +1029,39 @@ var search11 = ({
|
|
|
1060
1029
|
isProHighSchool,
|
|
1061
1030
|
isGenHighSchool,
|
|
1062
1031
|
isElementarySchool
|
|
1063
|
-
}) =>
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1032
|
+
}) => _9.flow(
|
|
1033
|
+
makeEntitiesFilter10({
|
|
1034
|
+
id: ids,
|
|
1035
|
+
slug: slugs,
|
|
1036
|
+
isPreSchool,
|
|
1037
|
+
isMiddleSchool,
|
|
1038
|
+
isHighSchool,
|
|
1039
|
+
isProHighSchool,
|
|
1040
|
+
isGenHighSchool,
|
|
1041
|
+
isElementarySchool
|
|
1042
|
+
}),
|
|
1043
|
+
_9.orderBy("order", "desc")
|
|
1073
1044
|
);
|
|
1074
1045
|
var crudLevels = crud("levels", { search: search11 });
|
|
1075
1046
|
var { getLevel, searchLevels, makeSearchLevels } = crudLevels;
|
|
1076
|
-
var getLevels = (0, import_reselect3.createSelector)(crudLevels.getLevels,
|
|
1047
|
+
var getLevels = (0, import_reselect3.createSelector)(crudLevels.getLevels, _9.orderBy("order", "desc"));
|
|
1077
1048
|
|
|
1078
1049
|
// src/selectors/mainNotification.ts
|
|
1079
1050
|
init_define_import_meta();
|
|
1080
1051
|
var import_reselect4 = __toESM(require_lib(), 1);
|
|
1081
|
-
import {
|
|
1082
|
-
import
|
|
1052
|
+
import { makeEntitiesFilter as makeEntitiesFilter11, makeGetAllEntities as makeGetAllEntities6 } from "@lls/utils";
|
|
1053
|
+
import _10 from "lodash/fp.js";
|
|
1083
1054
|
var getAllMainNotifications = makeGetAllEntities6("mainNotifications");
|
|
1084
|
-
var search12 = ({ ids }) =>
|
|
1055
|
+
var search12 = ({ ids }) => makeEntitiesFilter11({ id: ids });
|
|
1085
1056
|
var getMainNotifications = (0, import_reselect4.createSelector)(
|
|
1086
|
-
[
|
|
1057
|
+
[_10.flow(getCurrentUser, _10.get("mainNotifications")), getAllMainNotifications],
|
|
1087
1058
|
(userNotifications, notifications) => search12({ ids: userNotifications })(notifications)
|
|
1088
1059
|
);
|
|
1089
1060
|
|
|
1090
1061
|
// src/selectors/news.ts
|
|
1091
1062
|
init_define_import_meta();
|
|
1092
|
-
import {
|
|
1093
|
-
var search13 = ({ ids }) =>
|
|
1063
|
+
import { makeEntitiesFilter as makeEntitiesFilter12 } from "@lls/utils";
|
|
1064
|
+
var search13 = ({ ids }) => makeEntitiesFilter12({ id: ids });
|
|
1094
1065
|
var {
|
|
1095
1066
|
getNews: getAllNews,
|
|
1096
1067
|
getNew: getNews,
|
|
@@ -1107,8 +1078,8 @@ var getPanorama = makeGetEntityById4("panoramas");
|
|
|
1107
1078
|
|
|
1108
1079
|
// src/selectors/premiumResource.ts
|
|
1109
1080
|
init_define_import_meta();
|
|
1110
|
-
import {
|
|
1111
|
-
var search14 = ({ bookIds }) =>
|
|
1081
|
+
import { makeEntitiesFilter as makeEntitiesFilter13 } from "@lls/utils";
|
|
1082
|
+
var search14 = ({ bookIds }) => makeEntitiesFilter13({ book: bookIds });
|
|
1112
1083
|
var { getPremiumResources, getPremiumResource, searchPremiumResources, makeSearchPremiumResources } = crud(
|
|
1113
1084
|
"premiumResources",
|
|
1114
1085
|
{
|
|
@@ -1116,17 +1087,20 @@ var { getPremiumResources, getPremiumResource, searchPremiumResources, makeSearc
|
|
|
1116
1087
|
}
|
|
1117
1088
|
);
|
|
1118
1089
|
|
|
1090
|
+
// src/selectors/lexicalFlower.ts
|
|
1091
|
+
init_define_import_meta();
|
|
1092
|
+
import { makeEntitiesFilter as makeEntitiesFilter14 } from "@lls/utils";
|
|
1093
|
+
var search15 = ({ ids }) => makeEntitiesFilter14({ id: ids });
|
|
1094
|
+
var { getLexicalFlowers, searchLexicalFlowers } = crud("lexicalFlowers", {
|
|
1095
|
+
search: search15
|
|
1096
|
+
});
|
|
1097
|
+
|
|
1119
1098
|
// src/selectors/product.ts
|
|
1120
1099
|
init_define_import_meta();
|
|
1121
|
-
import
|
|
1122
|
-
import {
|
|
1123
|
-
createSearchSelector as createSearchSelector6,
|
|
1124
|
-
filterEntitiesArrayFieldByValues as filterEntitiesArrayFieldByValues5,
|
|
1125
|
-
filterEntitiesSimpleFieldByValues as filterEntitiesSimpleFieldByValues14,
|
|
1126
|
-
makeGetAllEntities as makeGetAllEntities7
|
|
1127
|
-
} from "@lls/utils";
|
|
1100
|
+
import _11 from "lodash/fp.js";
|
|
1101
|
+
import { createSearchSelector as createSearchSelector6, makeEntitiesFilter as makeEntitiesFilter15, makeGetAllEntities as makeGetAllEntities7 } from "@lls/utils";
|
|
1128
1102
|
var getProducts = makeGetAllEntities7("products");
|
|
1129
|
-
var
|
|
1103
|
+
var search16 = ({
|
|
1130
1104
|
ids,
|
|
1131
1105
|
eans,
|
|
1132
1106
|
isAdoptant,
|
|
@@ -1135,88 +1109,93 @@ var search15 = ({
|
|
|
1135
1109
|
subjectIds,
|
|
1136
1110
|
productTypes
|
|
1137
1111
|
}) => {
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1112
|
+
let bookIds;
|
|
1113
|
+
const filter = makeEntitiesFilter15(
|
|
1114
|
+
{
|
|
1115
|
+
id: ids,
|
|
1116
|
+
ean: eans,
|
|
1117
|
+
isAdoptant,
|
|
1118
|
+
isSupportPlus,
|
|
1119
|
+
productType: productTypes
|
|
1120
|
+
},
|
|
1121
|
+
levelIds || subjectIds ? (product2) => !!product2?.books?.some((bookId) => bookIds.has(bookId)) : false
|
|
1145
1122
|
);
|
|
1123
|
+
return (products, books) => {
|
|
1124
|
+
bookIds = new Set(_11.map("id", books));
|
|
1125
|
+
return filter(products);
|
|
1126
|
+
};
|
|
1146
1127
|
};
|
|
1147
1128
|
var searchBooks2 = makeSearchBooks();
|
|
1148
1129
|
var searchProducts = createSearchSelector6(
|
|
1149
1130
|
getProducts,
|
|
1150
1131
|
(state, { levelIds, subjectIds }) => searchBooks2(state, { levelIds, subjectIds }),
|
|
1151
1132
|
(_state, params) => params,
|
|
1152
|
-
(products, books, params) =>
|
|
1133
|
+
(products, books, params) => search16(params)(products, books)
|
|
1153
1134
|
);
|
|
1154
1135
|
|
|
1155
1136
|
// src/selectors/resource.ts
|
|
1156
1137
|
init_define_import_meta();
|
|
1157
|
-
import {
|
|
1158
|
-
|
|
1159
|
-
|
|
1138
|
+
import { makeEntitiesFilter as makeEntitiesFilter16 } from "@lls/utils";
|
|
1139
|
+
var search17 = ({ chapterIds }) => makeEntitiesFilter16({
|
|
1140
|
+
chapter: chapterIds
|
|
1141
|
+
});
|
|
1160
1142
|
var { getResources, getResource, searchResources, makeSearchResources } = crud("resources", {
|
|
1161
|
-
search:
|
|
1143
|
+
search: search17
|
|
1162
1144
|
});
|
|
1163
1145
|
|
|
1164
1146
|
// src/selectors/schoolType.ts
|
|
1165
1147
|
init_define_import_meta();
|
|
1166
|
-
import {
|
|
1167
|
-
var
|
|
1148
|
+
import { makeEntitiesFilter as makeEntitiesFilter17 } from "@lls/utils";
|
|
1149
|
+
var search18 = ({ slugs }) => makeEntitiesFilter17({ slug: slugs });
|
|
1168
1150
|
var { getSchoolTypes, getSchoolType, searchSchoolTypes, makeSearchSchoolTypes } = crud("schoolTypes", {
|
|
1169
|
-
search:
|
|
1151
|
+
search: search18
|
|
1170
1152
|
});
|
|
1171
1153
|
|
|
1172
1154
|
// src/selectors/sharedPage.ts
|
|
1173
1155
|
init_define_import_meta();
|
|
1174
|
-
import { createSearchSelector as createSearchSelector7,
|
|
1175
|
-
import
|
|
1176
|
-
var
|
|
1156
|
+
import { createSearchSelector as createSearchSelector7, makeEntitiesFilter as makeEntitiesFilter18 } from "@lls/utils";
|
|
1157
|
+
import _12 from "lodash/fp.js";
|
|
1158
|
+
var search19 = ({
|
|
1177
1159
|
parentIds,
|
|
1178
1160
|
userIds,
|
|
1179
1161
|
bookIds,
|
|
1180
1162
|
isCreatedFromScratch,
|
|
1181
1163
|
isLearningAssessment,
|
|
1182
1164
|
ids
|
|
1183
|
-
}) =>
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
);
|
|
1165
|
+
}) => makeEntitiesFilter18({
|
|
1166
|
+
id: ids,
|
|
1167
|
+
parent: parentIds,
|
|
1168
|
+
user: userIds,
|
|
1169
|
+
book: bookIds,
|
|
1170
|
+
isLearningAssessment,
|
|
1171
|
+
isCreatedFromScratch
|
|
1172
|
+
});
|
|
1191
1173
|
var { getSharedPages, getSharedPage, searchSharedPages, makeSearchSharedPages } = crud("sharedPages", {
|
|
1192
|
-
search:
|
|
1174
|
+
search: search19
|
|
1193
1175
|
});
|
|
1194
1176
|
var searchCurrentUserSharedPages = createSearchSelector7(
|
|
1195
|
-
|
|
1177
|
+
getCurrentUser,
|
|
1196
1178
|
getSharedPages,
|
|
1197
|
-
(
|
|
1198
|
-
(
|
|
1179
|
+
(_17, params) => params,
|
|
1180
|
+
(user2, sharedPages, params) => {
|
|
1181
|
+
const sharedUserPageIds = user2?.sharedPages ?? [];
|
|
1182
|
+
return search19({ ...params, ids: _12.intersection(sharedUserPageIds, params.ids || sharedUserPageIds) })(sharedPages);
|
|
1183
|
+
}
|
|
1199
1184
|
);
|
|
1200
1185
|
|
|
1201
1186
|
// src/selectors/student.ts
|
|
1202
1187
|
init_define_import_meta();
|
|
1203
|
-
import {
|
|
1204
|
-
var
|
|
1188
|
+
import { makeEntitiesFilter as makeEntitiesFilter19 } from "@lls/utils";
|
|
1189
|
+
var search20 = ({ ids }) => makeEntitiesFilter19({ id: ids });
|
|
1205
1190
|
var { getStudents, getStudent, searchStudents, makeSearchStudents } = crud("students", {
|
|
1206
|
-
search:
|
|
1191
|
+
search: search20
|
|
1207
1192
|
});
|
|
1208
1193
|
|
|
1209
1194
|
// src/selectors/subject.ts
|
|
1210
1195
|
init_define_import_meta();
|
|
1211
|
-
import {
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
filterEntitiesSimpleFieldByValue as filterEntitiesSimpleFieldByValue4,
|
|
1215
|
-
filterEntitiesSimpleFieldByValues as filterEntitiesSimpleFieldByValues19,
|
|
1216
|
-
limitToTeacherSubjects
|
|
1217
|
-
} from "@lls/utils";
|
|
1218
|
-
import _19 from "lodash/fp.js";
|
|
1219
|
-
var search20 = ({
|
|
1196
|
+
import { limitToTeacherSubjects, makeEntitiesFilter as makeEntitiesFilter20, pipe as pipe2 } from "@lls/utils";
|
|
1197
|
+
import _13 from "lodash/fp.js";
|
|
1198
|
+
var search21 = ({
|
|
1220
1199
|
ids,
|
|
1221
1200
|
slugs,
|
|
1222
1201
|
isTeacherSubject,
|
|
@@ -1224,45 +1203,51 @@ var search20 = ({
|
|
|
1224
1203
|
schoolTypes,
|
|
1225
1204
|
hasBooks,
|
|
1226
1205
|
names
|
|
1227
|
-
}) =>
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1206
|
+
}) => (subjects) => pipe2(
|
|
1207
|
+
subjects,
|
|
1208
|
+
makeEntitiesFilter20(
|
|
1209
|
+
{
|
|
1210
|
+
id: ids,
|
|
1211
|
+
slug: slugs,
|
|
1212
|
+
name: names,
|
|
1213
|
+
hasBooks,
|
|
1214
|
+
schoolTypes
|
|
1215
|
+
},
|
|
1216
|
+
!_13.isNil(hasNewsletterUrl) && ((subject2) => Boolean(subject2?.newsletterUrl) === hasNewsletterUrl)
|
|
1217
|
+
),
|
|
1218
|
+
(subjects2) => _13.isNil(isTeacherSubject) ? subjects2 : limitToTeacherSubjects(subjects2)
|
|
1235
1219
|
);
|
|
1236
1220
|
var { getSubjects, getSubject, searchSubjects, makeSearchSubjects } = crud("subjects", {
|
|
1237
|
-
search:
|
|
1221
|
+
search: search21
|
|
1238
1222
|
});
|
|
1239
1223
|
|
|
1240
1224
|
// src/selectors/teacher.ts
|
|
1241
1225
|
init_define_import_meta();
|
|
1242
|
-
import {
|
|
1243
|
-
|
|
1244
|
-
|
|
1226
|
+
import { makeEntitiesFilter as makeEntitiesFilter21 } from "@lls/utils";
|
|
1227
|
+
var search22 = ({ ids, schoolIds }) => makeEntitiesFilter21({
|
|
1228
|
+
id: ids,
|
|
1229
|
+
schools: schoolIds
|
|
1230
|
+
});
|
|
1245
1231
|
var { getTeachers, getTeacher, searchTeachers, makeSearchTeachers } = crud("teachers", {
|
|
1246
|
-
search:
|
|
1232
|
+
search: search22
|
|
1247
1233
|
});
|
|
1248
1234
|
|
|
1249
1235
|
// src/selectors/tool.ts
|
|
1250
1236
|
init_define_import_meta();
|
|
1251
|
-
import {
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
);
|
|
1237
|
+
import { makeEntitiesFilter as makeEntitiesFilter22 } from "@lls/utils";
|
|
1238
|
+
var search23 = ({ ids, locked, bookIds }) => makeEntitiesFilter22({
|
|
1239
|
+
id: ids,
|
|
1240
|
+
locked,
|
|
1241
|
+
books: bookIds
|
|
1242
|
+
});
|
|
1258
1243
|
var { getTools, getTool, searchTools, makeSearchTools } = crud("tools", {
|
|
1259
|
-
search:
|
|
1244
|
+
search: search23
|
|
1260
1245
|
});
|
|
1261
1246
|
|
|
1262
1247
|
// src/reducers/entities.ts
|
|
1263
1248
|
init_define_import_meta();
|
|
1264
1249
|
import { makeReducer } from "@lls/utils";
|
|
1265
|
-
import
|
|
1250
|
+
import _14 from "lodash/fp.js";
|
|
1266
1251
|
|
|
1267
1252
|
// src/actions/index.ts
|
|
1268
1253
|
init_define_import_meta();
|
|
@@ -1285,47 +1270,53 @@ var resetAuth = makeActionCreator(actionTypes.RESET_AUTH);
|
|
|
1285
1270
|
// src/reducers/entities.ts
|
|
1286
1271
|
var deleteEntityReducer = (state, payload) => {
|
|
1287
1272
|
const { path } = payload;
|
|
1288
|
-
return
|
|
1273
|
+
return _14.omit(path, state);
|
|
1289
1274
|
};
|
|
1290
1275
|
var updateEntityReducer = (state, payload) => {
|
|
1291
1276
|
const { path, entity } = payload;
|
|
1292
|
-
const currentEntity =
|
|
1293
|
-
return
|
|
1277
|
+
const currentEntity = _14.get(path, state);
|
|
1278
|
+
return _14.set(path, _14.merge(currentEntity, entity), state);
|
|
1294
1279
|
};
|
|
1295
1280
|
var setEntityReducer = (state, payload) => {
|
|
1296
1281
|
const { path, entity } = payload;
|
|
1297
|
-
return
|
|
1298
|
-
};
|
|
1299
|
-
var shallowAssign = (old, next, transform) => {
|
|
1300
|
-
let updated = false;
|
|
1301
|
-
const merged = _22.flow(
|
|
1302
|
-
_22.toPairs,
|
|
1303
|
-
_22.reduce((memo, [key, val]) => {
|
|
1304
|
-
if (_22.isEmpty(val)) return memo;
|
|
1305
|
-
if (!old[key]) {
|
|
1306
|
-
updated = true;
|
|
1307
|
-
memo[key] = val;
|
|
1308
|
-
return memo;
|
|
1309
|
-
}
|
|
1310
|
-
const maybeEqual = transform(old[key], next[key]);
|
|
1311
|
-
if (maybeEqual !== old[key]) {
|
|
1312
|
-
updated = true;
|
|
1313
|
-
memo[key] = maybeEqual;
|
|
1314
|
-
return memo;
|
|
1315
|
-
}
|
|
1316
|
-
return memo;
|
|
1317
|
-
}, _22.clone(old))
|
|
1318
|
-
)(next);
|
|
1319
|
-
return updated ? merged : old;
|
|
1282
|
+
return _14.set(path, entity, state);
|
|
1320
1283
|
};
|
|
1321
1284
|
var setEntitiesReducer = (state, payload) => {
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
)
|
|
1285
|
+
if (typeof payload !== "object") return state;
|
|
1286
|
+
const stateDrafts = {};
|
|
1287
|
+
Object.keys(payload).forEach((entityName) => {
|
|
1288
|
+
const entities2 = payload[entityName];
|
|
1289
|
+
const entityDraft = {};
|
|
1290
|
+
if (!entities2) {
|
|
1291
|
+
return;
|
|
1292
|
+
}
|
|
1293
|
+
Object.keys(entities2).forEach((id) => {
|
|
1294
|
+
const entity = entities2[id];
|
|
1295
|
+
if (!state[entityName]?.[id]) {
|
|
1296
|
+
entityDraft[id] = entity;
|
|
1297
|
+
} else {
|
|
1298
|
+
if (typeof entity === "undefined") {
|
|
1299
|
+
return;
|
|
1300
|
+
}
|
|
1301
|
+
const diff = Object.keys(entity).some((prop) => {
|
|
1302
|
+
const value = entity[prop];
|
|
1303
|
+
if (!_14.isEqual(state[entityName]?.[id]?.[prop], value)) {
|
|
1304
|
+
return true;
|
|
1305
|
+
}
|
|
1306
|
+
});
|
|
1307
|
+
if (diff) {
|
|
1308
|
+
entityDraft[id] = Object.assign({}, state[entityName]?.[id], entity);
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
});
|
|
1312
|
+
if (Object.keys(entityDraft).length !== 0) {
|
|
1313
|
+
stateDrafts[entityName] = { ...state[entityName], ...entityDraft };
|
|
1314
|
+
}
|
|
1328
1315
|
});
|
|
1316
|
+
if (Object.keys(stateDrafts).length !== 0) {
|
|
1317
|
+
return { ...state, ...stateDrafts };
|
|
1318
|
+
}
|
|
1319
|
+
return state;
|
|
1329
1320
|
};
|
|
1330
1321
|
var entities = makeReducer(
|
|
1331
1322
|
{},
|
|
@@ -1341,7 +1332,7 @@ var entities_default = entities;
|
|
|
1341
1332
|
// src/reducers/auth.ts
|
|
1342
1333
|
init_define_import_meta();
|
|
1343
1334
|
import { makeReducer as makeReducer2 } from "@lls/utils";
|
|
1344
|
-
import
|
|
1335
|
+
import _15 from "lodash/fp.js";
|
|
1345
1336
|
var initialState = {
|
|
1346
1337
|
id: void 0,
|
|
1347
1338
|
role: null,
|
|
@@ -1354,15 +1345,15 @@ var initialState = {
|
|
|
1354
1345
|
llsUserId: null
|
|
1355
1346
|
};
|
|
1356
1347
|
var auth = makeReducer2(initialState, {
|
|
1357
|
-
[actionTypes.SET_AUTH]:
|
|
1358
|
-
[actionTypes.RESET_AUTH]:
|
|
1348
|
+
[actionTypes.SET_AUTH]: _15.assign,
|
|
1349
|
+
[actionTypes.RESET_AUTH]: _15.constant(initialState)
|
|
1359
1350
|
});
|
|
1360
1351
|
var auth_default = auth;
|
|
1361
1352
|
|
|
1362
1353
|
// src/schema/index.ts
|
|
1363
1354
|
init_define_import_meta();
|
|
1364
1355
|
var import_normalizr = __toESM(require_normalizr(), 1);
|
|
1365
|
-
import
|
|
1356
|
+
import _16 from "lodash/fp.js";
|
|
1366
1357
|
var document = new import_normalizr.schema.Entity("documents", {}, { idAttribute: "resourceId" });
|
|
1367
1358
|
var subject = new import_normalizr.schema.Entity("subjects");
|
|
1368
1359
|
var level = new import_normalizr.schema.Entity("levels");
|
|
@@ -1378,6 +1369,7 @@ var faq = new import_normalizr.schema.Entity("faq");
|
|
|
1378
1369
|
var product = new import_normalizr.schema.Entity("products");
|
|
1379
1370
|
var communityProjects = new import_normalizr.schema.Entity("communityProjects");
|
|
1380
1371
|
var builderIo = new import_normalizr.schema.Entity("builderIos");
|
|
1372
|
+
var lexicalFlower = new import_normalizr.schema.Entity("lexicalFlowers");
|
|
1381
1373
|
var grammarRule = new import_normalizr.schema.Entity("grammarRules", {}, { idAttribute: "objectID" });
|
|
1382
1374
|
var mainNotification = new import_normalizr.schema.Entity("mainNotifications");
|
|
1383
1375
|
var explorerResult = new import_normalizr.schema.Entity("explorerResults", {}, { idAttribute: "resourceId" });
|
|
@@ -1457,7 +1449,8 @@ var userSchema = define(user, {
|
|
|
1457
1449
|
students: [student],
|
|
1458
1450
|
subjects: [subject],
|
|
1459
1451
|
teachers: [teacher],
|
|
1460
|
-
userPages: [page]
|
|
1452
|
+
userPages: [page],
|
|
1453
|
+
lexicalFlowers: { hits: [lexicalFlower] }
|
|
1461
1454
|
});
|
|
1462
1455
|
var notificationSchema = define(mainNotification, { page });
|
|
1463
1456
|
drawerNotification.define({ page });
|
|
@@ -1510,6 +1503,7 @@ var querySchema = {
|
|
|
1510
1503
|
createGroup: group,
|
|
1511
1504
|
createPage: page,
|
|
1512
1505
|
createUser: user,
|
|
1506
|
+
createLexicalFlower: lexicalFlower,
|
|
1513
1507
|
documents: { hits: [document] },
|
|
1514
1508
|
explorerResults: [explorerResult],
|
|
1515
1509
|
levels: [level],
|
|
@@ -1531,7 +1525,8 @@ var querySchema = {
|
|
|
1531
1525
|
updatePage: page,
|
|
1532
1526
|
updateTrialUser: user,
|
|
1533
1527
|
updateUserLastActivitySeenAt: user,
|
|
1534
|
-
updateUser: user
|
|
1528
|
+
updateUser: user,
|
|
1529
|
+
updateLexicalFlower: lexicalFlower
|
|
1535
1530
|
},
|
|
1536
1531
|
auth: {
|
|
1537
1532
|
user
|
|
@@ -1549,11 +1544,13 @@ var querySchema = {
|
|
|
1549
1544
|
}
|
|
1550
1545
|
}
|
|
1551
1546
|
};
|
|
1552
|
-
var normalizeData =
|
|
1547
|
+
var normalizeData = _16.flow((data) => (0, import_normalizr.normalize)(data, querySchema));
|
|
1553
1548
|
export {
|
|
1554
1549
|
auth_default as authReducer,
|
|
1555
1550
|
entities_default as entitiesReducer,
|
|
1551
|
+
filterPages,
|
|
1556
1552
|
getAllNews,
|
|
1553
|
+
getAuth,
|
|
1557
1554
|
getBook,
|
|
1558
1555
|
getBooks,
|
|
1559
1556
|
getChapter,
|
|
@@ -1572,8 +1569,10 @@ export {
|
|
|
1572
1569
|
getGarDivisions,
|
|
1573
1570
|
getGroup,
|
|
1574
1571
|
getGroups,
|
|
1572
|
+
getIsLogged,
|
|
1575
1573
|
getLevel,
|
|
1576
1574
|
getLevels,
|
|
1575
|
+
getLexicalFlowers,
|
|
1577
1576
|
getMainNotifications,
|
|
1578
1577
|
getNews,
|
|
1579
1578
|
getPage,
|
|
@@ -1596,6 +1595,7 @@ export {
|
|
|
1596
1595
|
getSubjects,
|
|
1597
1596
|
getTeacher,
|
|
1598
1597
|
getTeachers,
|
|
1598
|
+
getToken,
|
|
1599
1599
|
getTool,
|
|
1600
1600
|
getTools,
|
|
1601
1601
|
getUser,
|
|
@@ -1642,6 +1642,7 @@ export {
|
|
|
1642
1642
|
searchGarDivisions,
|
|
1643
1643
|
searchGroups,
|
|
1644
1644
|
searchLevels,
|
|
1645
|
+
searchLexicalFlowers,
|
|
1645
1646
|
searchModifiedPages,
|
|
1646
1647
|
searchNews,
|
|
1647
1648
|
searchPages,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@lls/store",
|
|
3
3
|
"description": "model de donnée et selecteurs",
|
|
4
4
|
"homepage": "https://github.com/lelivrescolaire/monorepo/tree/dev/libs/store",
|
|
5
|
-
"version": "24.1.59-
|
|
5
|
+
"version": "24.1.59-0fc150f7",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./lib/builttypes/store/src/index.d.ts",
|
|
8
8
|
"exports": {
|
|
@@ -28,21 +28,21 @@
|
|
|
28
28
|
"react": "*"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@biomejs/biome": "1.
|
|
32
|
-
"@types/lodash": "4.17.
|
|
33
|
-
"@types/node": "
|
|
34
|
-
"@types/react": "18.3.
|
|
31
|
+
"@biomejs/biome": "1.9.1",
|
|
32
|
+
"@types/lodash": "4.17.7",
|
|
33
|
+
"@types/node": "22.5.5",
|
|
34
|
+
"@types/react": "18.3.6",
|
|
35
35
|
"@vitejs/plugin-react-swc": "3.7.0",
|
|
36
|
-
"esbuild": "0.23.
|
|
36
|
+
"esbuild": "0.23.1",
|
|
37
37
|
"lodash": "4.17.21",
|
|
38
38
|
"react": "18.3.1",
|
|
39
39
|
"reselect": "4.1.8",
|
|
40
|
-
"typescript": "5.
|
|
41
|
-
"vite": "5.
|
|
40
|
+
"typescript": "5.6.2",
|
|
41
|
+
"vite": "5.4.6",
|
|
42
42
|
"vite-tsconfig-paths": "4.3.2",
|
|
43
|
-
"vitest": "2.
|
|
44
|
-
"@lls/utils": "24.1.59-
|
|
45
|
-
"@lls/vitescripts": "24.1.59-
|
|
43
|
+
"vitest": "2.1.1",
|
|
44
|
+
"@lls/utils": "24.1.59-0fc150f7",
|
|
45
|
+
"@lls/vitescripts": "24.1.59-0fc150f7"
|
|
46
46
|
},
|
|
47
47
|
"license": "ISC",
|
|
48
48
|
"dependencies": {
|