@lls/store 24.1.65 → 24.1.66-6e4a79bf
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 +22 -4
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -747,12 +747,12 @@ import { makeEntitiesFilter } from "@lls/utils";
|
|
|
747
747
|
// src/selectors/crud.ts
|
|
748
748
|
init_define_import_meta();
|
|
749
749
|
import { createSearchSelector, makeGetAllEntities, makeGetEntityById } from "@lls/utils";
|
|
750
|
-
var crud = (entityName, { search:
|
|
750
|
+
var crud = (entityName, { search: search25 }) => {
|
|
751
751
|
const getElements = makeGetAllEntities(entityName);
|
|
752
752
|
const makeSearchElements = () => createSearchSelector(
|
|
753
753
|
getElements,
|
|
754
754
|
(_state, params) => params,
|
|
755
|
-
(elements, params) =>
|
|
755
|
+
(elements, params) => search25(params)(elements)
|
|
756
756
|
);
|
|
757
757
|
const methodName = `${entityName.charAt(0).toUpperCase()}${entityName.slice(1)}`;
|
|
758
758
|
const getElementById = makeGetEntityById(entityName);
|
|
@@ -761,7 +761,7 @@ var crud = (entityName, { search: search24 }) => {
|
|
|
761
761
|
[`search${methodName}`]: makeSearchElements(),
|
|
762
762
|
[`get${methodName.replace(/s$/, "")}`]: getElementById,
|
|
763
763
|
[`makeSearch${methodName}`]: makeSearchElements,
|
|
764
|
-
[`filter${methodName}`]:
|
|
764
|
+
[`filter${methodName}`]: search25
|
|
765
765
|
};
|
|
766
766
|
return back;
|
|
767
767
|
};
|
|
@@ -1244,6 +1244,20 @@ var { getTools, getTool, searchTools, makeSearchTools } = crud("tools", {
|
|
|
1244
1244
|
search: search23
|
|
1245
1245
|
});
|
|
1246
1246
|
|
|
1247
|
+
// src/selectors/builderIo.ts
|
|
1248
|
+
init_define_import_meta();
|
|
1249
|
+
import { makeEntitiesFilter as makeEntitiesFilter23 } from "@lls/utils";
|
|
1250
|
+
var search24 = ({ modelIds, subjects, schoolTypes }) => makeEntitiesFilter23(
|
|
1251
|
+
{
|
|
1252
|
+
modelId: modelIds
|
|
1253
|
+
},
|
|
1254
|
+
subjects && ((builderIo2) => !!builderIo2?.data?.subjects?.some((x) => subjects.includes(x))),
|
|
1255
|
+
schoolTypes && ((builderIo2) => !!builderIo2?.data?.schoolTypes?.some((x) => schoolTypes.includes(x)))
|
|
1256
|
+
);
|
|
1257
|
+
var { getBuilderIos, getBuilderIo, searchBuilderIos, makeSearchBuilderIos } = crud("builderIos", {
|
|
1258
|
+
search: search24
|
|
1259
|
+
});
|
|
1260
|
+
|
|
1247
1261
|
// src/reducers/entities.ts
|
|
1248
1262
|
init_define_import_meta();
|
|
1249
1263
|
import { makeReducer } from "@lls/utils";
|
|
@@ -1378,7 +1392,7 @@ var copyNotification = new import_normalizr.schema.Entity("copyNotifications");
|
|
|
1378
1392
|
var quote = new import_normalizr.schema.Entity("quotes");
|
|
1379
1393
|
var group = new import_normalizr.schema.Entity("groups");
|
|
1380
1394
|
var analytic = new import_normalizr.schema.Entity("analytics");
|
|
1381
|
-
var contact = new import_normalizr.schema.Entity("
|
|
1395
|
+
var contact = new import_normalizr.schema.Entity("contacts");
|
|
1382
1396
|
var collection = new import_normalizr.schema.Entity("collections");
|
|
1383
1397
|
var sharedPage = new import_normalizr.schema.Entity("sharedPages");
|
|
1384
1398
|
var student = new import_normalizr.schema.Entity("students");
|
|
@@ -1554,6 +1568,8 @@ export {
|
|
|
1554
1568
|
getAuth,
|
|
1555
1569
|
getBook,
|
|
1556
1570
|
getBooks,
|
|
1571
|
+
getBuilderIo,
|
|
1572
|
+
getBuilderIos,
|
|
1557
1573
|
getChapter,
|
|
1558
1574
|
getChapters,
|
|
1559
1575
|
getCollection,
|
|
@@ -1605,6 +1621,7 @@ export {
|
|
|
1605
1621
|
makeGetBook,
|
|
1606
1622
|
makeGetDraftPage,
|
|
1607
1623
|
makeSearchBooks,
|
|
1624
|
+
makeSearchBuilderIos,
|
|
1608
1625
|
makeSearchChapters,
|
|
1609
1626
|
makeSearchCollections,
|
|
1610
1627
|
makeSearchCommunityProjects,
|
|
@@ -1632,6 +1649,7 @@ export {
|
|
|
1632
1649
|
normalizeData,
|
|
1633
1650
|
querySchema,
|
|
1634
1651
|
searchBooks,
|
|
1652
|
+
searchBuilderIos,
|
|
1635
1653
|
searchChapters,
|
|
1636
1654
|
searchCollections,
|
|
1637
1655
|
searchCommunityProjects,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@lls/store",
|
|
3
3
|
"description": "model de donnée et selecteurs",
|
|
4
4
|
"homepage": "https://github.com/lelivrescolaire/monorepo/tree/dev/libs/store",
|
|
5
|
-
"version": "24.1.
|
|
5
|
+
"version": "24.1.66-6e4a79bf",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./lib/builttypes/store/src/index.d.ts",
|
|
8
8
|
"exports": {
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"reselect": "4.1.8",
|
|
40
40
|
"typescript": "5.6.2",
|
|
41
41
|
"vite": "5.4.6",
|
|
42
|
-
"vite-tsconfig-paths": "
|
|
42
|
+
"vite-tsconfig-paths": "5.0.1",
|
|
43
43
|
"vitest": "2.1.1",
|
|
44
|
-
"@lls/utils": "24.1.
|
|
45
|
-
"@lls/vitescripts": "24.1.
|
|
44
|
+
"@lls/utils": "24.1.66-6e4a79bf",
|
|
45
|
+
"@lls/vitescripts": "24.1.66-6e4a79bf"
|
|
46
46
|
},
|
|
47
47
|
"license": "ISC",
|
|
48
48
|
"dependencies": {
|