@lls/store 24.13.0-fee8d76e → 24.13.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.
- package/lib/index.js +7 -20
- package/package.json +4 -4
package/lib/index.js
CHANGED
|
@@ -1390,6 +1390,11 @@ var { getTools, getTool, useSearchTools } = crud("tools", {
|
|
|
1390
1390
|
search: search34
|
|
1391
1391
|
});
|
|
1392
1392
|
|
|
1393
|
+
// src/reducers/entities.ts
|
|
1394
|
+
init_define_import_meta();
|
|
1395
|
+
import { makeReducer } from "@lls/utils";
|
|
1396
|
+
import _18 from "lodash/fp.js";
|
|
1397
|
+
|
|
1393
1398
|
// src/actions/index.ts
|
|
1394
1399
|
init_define_import_meta();
|
|
1395
1400
|
import { makeActionCreator } from "@lls/utils";
|
|
@@ -1398,7 +1403,6 @@ var actionTypes = {
|
|
|
1398
1403
|
UPDATE_ENTITY: "UPDATE_ENTITY",
|
|
1399
1404
|
SET_ENTITY: "SET_ENTITY",
|
|
1400
1405
|
SET_ENTITIES: "SET_ENTITIES",
|
|
1401
|
-
REPLACE_ENTITIES: "REPLACE_ENTITIES",
|
|
1402
1406
|
RESET_AUTH: "RESET_AUTH",
|
|
1403
1407
|
SET_AUTH: "SET_AUTH"
|
|
1404
1408
|
};
|
|
@@ -1406,14 +1410,10 @@ var deleteEntity = makeActionCreator(actionTypes.DELETE_ENTITY);
|
|
|
1406
1410
|
var updateEntity = makeActionCreator(actionTypes.UPDATE_ENTITY);
|
|
1407
1411
|
var setEntity = makeActionCreator(actionTypes.SET_ENTITY);
|
|
1408
1412
|
var setEntities = makeActionCreator(actionTypes.SET_ENTITIES);
|
|
1409
|
-
var replaceEntities = makeActionCreator(actionTypes.REPLACE_ENTITIES);
|
|
1410
1413
|
var setAuth = makeActionCreator(actionTypes.SET_AUTH);
|
|
1411
1414
|
var resetAuth = makeActionCreator(actionTypes.RESET_AUTH);
|
|
1412
1415
|
|
|
1413
1416
|
// src/reducers/entities.ts
|
|
1414
|
-
init_define_import_meta();
|
|
1415
|
-
import { makeReducer } from "@lls/utils";
|
|
1416
|
-
import _18 from "lodash/fp.js";
|
|
1417
1417
|
var deleteEntityReducer = (state, payload) => {
|
|
1418
1418
|
const { path } = payload;
|
|
1419
1419
|
return _18.omit(path, state);
|
|
@@ -1427,9 +1427,6 @@ var setEntityReducer = (state, payload) => {
|
|
|
1427
1427
|
const { path, entity } = payload;
|
|
1428
1428
|
return _18.set(path, entity, state);
|
|
1429
1429
|
};
|
|
1430
|
-
var replaceEntitiesReducer = (_state, payload) => {
|
|
1431
|
-
return payload;
|
|
1432
|
-
};
|
|
1433
1430
|
var setEntitiesReducer = (state, payload) => {
|
|
1434
1431
|
if (typeof payload !== "object") return state;
|
|
1435
1432
|
const stateDrafts = {};
|
|
@@ -1473,8 +1470,7 @@ var entities = makeReducer(
|
|
|
1473
1470
|
[actionTypes.DELETE_ENTITY]: deleteEntityReducer,
|
|
1474
1471
|
[actionTypes.UPDATE_ENTITY]: updateEntityReducer,
|
|
1475
1472
|
[actionTypes.SET_ENTITY]: setEntityReducer,
|
|
1476
|
-
[actionTypes.SET_ENTITIES]: setEntitiesReducer
|
|
1477
|
-
[actionTypes.REPLACE_ENTITIES]: replaceEntitiesReducer
|
|
1473
|
+
[actionTypes.SET_ENTITIES]: setEntitiesReducer
|
|
1478
1474
|
}
|
|
1479
1475
|
);
|
|
1480
1476
|
var entities_default = entities;
|
|
@@ -1693,8 +1689,7 @@ var schoolSchema = define(school, {
|
|
|
1693
1689
|
groups: [group],
|
|
1694
1690
|
teachers: [user],
|
|
1695
1691
|
students: [user],
|
|
1696
|
-
users: [user]
|
|
1697
|
-
academy
|
|
1692
|
+
users: [user]
|
|
1698
1693
|
});
|
|
1699
1694
|
var methodSchema = define(method, {
|
|
1700
1695
|
book
|
|
@@ -1811,10 +1806,8 @@ var augmentNormalizeSchema = (augmentSchemaFn) => {
|
|
|
1811
1806
|
};
|
|
1812
1807
|
var normalizeData = _20.flow((data) => (0, import_normalizr.normalize)(data, querySchema));
|
|
1813
1808
|
export {
|
|
1814
|
-
actionTypes,
|
|
1815
1809
|
augmentNormalizeSchema,
|
|
1816
1810
|
auth_default as authReducer,
|
|
1817
|
-
deleteEntity,
|
|
1818
1811
|
entities_default as entitiesReducer,
|
|
1819
1812
|
filterBooks,
|
|
1820
1813
|
filterPages,
|
|
@@ -1898,16 +1891,10 @@ export {
|
|
|
1898
1891
|
makeUseSearch,
|
|
1899
1892
|
normalizeData,
|
|
1900
1893
|
querySchema,
|
|
1901
|
-
replaceEntities,
|
|
1902
|
-
resetAuth,
|
|
1903
1894
|
searchLevels,
|
|
1904
1895
|
searchLicenses,
|
|
1905
1896
|
searchSchoolTypes,
|
|
1906
|
-
setAuth,
|
|
1907
|
-
setEntities,
|
|
1908
1897
|
setEntitiesReducer,
|
|
1909
|
-
setEntity,
|
|
1910
|
-
updateEntity,
|
|
1911
1898
|
useSearchBooks,
|
|
1912
1899
|
useSearchBuilderIos,
|
|
1913
1900
|
useSearchChapters,
|
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.13.0
|
|
5
|
+
"version": "24.13.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./lib/builttypes/store/src/index.d.ts",
|
|
8
8
|
"exports": {
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"typescript": "5.7.3",
|
|
51
51
|
"vite": "5.4.11",
|
|
52
52
|
"vite-tsconfig-paths": "5.1.4",
|
|
53
|
-
"@lls/common": "24.13.0
|
|
54
|
-
"@lls/utils": "24.13.0
|
|
55
|
-
"@lls/vitescripts": "24.13.0
|
|
53
|
+
"@lls/common": "24.13.0",
|
|
54
|
+
"@lls/utils": "24.13.0",
|
|
55
|
+
"@lls/vitescripts": "24.13.0"
|
|
56
56
|
},
|
|
57
57
|
"license": "ISC",
|
|
58
58
|
"dependencies": {
|