@lls/store 24.8.0-96f88fc0 → 24.8.0-9dd96940

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 +19 -38
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -979,7 +979,7 @@ var search9 = ({ ids, read, pageIds }) => {
979
979
  return makeEntitiesFilter7({ read, id: ids, page: pageIds });
980
980
  };
981
981
  var makeSearchCopyNotifications = () => createSearchSelector3(
982
- [makeGetCurrentUser(), makeGetAllEntities2("copyNotifications"), (_19, params) => params],
982
+ [makeGetCurrentUser(), makeGetAllEntities2("copyNotifications"), (_20, params) => params],
983
983
  (currentUser, copyNotifications, { pageIds, read }) => {
984
984
  const ids = currentUser?.copyNotifications;
985
985
  return search9({ ids, read, pageIds })(copyNotifications);
@@ -996,8 +996,7 @@ var search10 = ({
996
996
  resourceIds,
997
997
  levelIds,
998
998
  formats,
999
- documentTypes,
1000
- subDocumentTypes
999
+ documentTypes
1001
1000
  }) => {
1002
1001
  return makeEntitiesFilter8({
1003
1002
  id: ids,
@@ -1005,8 +1004,7 @@ var search10 = ({
1005
1004
  levels: levelIds,
1006
1005
  uuidV2: uuids,
1007
1006
  format: formats,
1008
- documentType: documentTypes,
1009
- subDocumentType: subDocumentTypes
1007
+ documentType: documentTypes
1010
1008
  });
1011
1009
  };
1012
1010
  var { useSearchDocuments } = crud("documents", {
@@ -1020,7 +1018,7 @@ var search11 = ({ ids, read, pageIds }) => {
1020
1018
  return makeEntitiesFilter9({ read, id: ids, page: pageIds });
1021
1019
  };
1022
1020
  var makeSearchDrawerNotifications = () => createSearchSelector4(
1023
- [makeGetCurrentUser(), makeGetAllEntities3("drawerNotifications"), (_19, params) => params],
1021
+ [makeGetCurrentUser(), makeGetAllEntities3("drawerNotifications"), (_20, params) => params],
1024
1022
  (currentUser, drawerNotifications, { read, pageIds }) => {
1025
1023
  const ids = currentUser?.drawerNotifications;
1026
1024
  return search11({ ids, read, pageIds })(drawerNotifications);
@@ -1337,30 +1335,16 @@ var { getCirconscriptions } = crud("circonscriptions", {
1337
1335
 
1338
1336
  // src/selectors/documentType.ts
1339
1337
  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", {
1338
+ import _16 from "lodash/fp.js";
1339
+ var search30 = (_params) => _16.identity;
1340
+ var { getDocumentTypes, getDocumentType } = crud("documentTypes", {
1357
1341
  search: search30
1358
1342
  });
1359
1343
 
1360
1344
  // src/reducers/entities.ts
1361
1345
  init_define_import_meta();
1362
1346
  import { makeReducer } from "@lls/utils";
1363
- import _16 from "lodash/fp.js";
1347
+ import _17 from "lodash/fp.js";
1364
1348
 
1365
1349
  // src/actions/index.ts
1366
1350
  init_define_import_meta();
@@ -1383,16 +1367,16 @@ var resetAuth = makeActionCreator(actionTypes.RESET_AUTH);
1383
1367
  // src/reducers/entities.ts
1384
1368
  var deleteEntityReducer = (state, payload) => {
1385
1369
  const { path } = payload;
1386
- return _16.omit(path, state);
1370
+ return _17.omit(path, state);
1387
1371
  };
1388
1372
  var updateEntityReducer = (state, payload) => {
1389
1373
  const { path, entity } = payload;
1390
- const currentEntity = _16.get(path, state);
1391
- return _16.set(path, _16.merge(currentEntity, entity), state);
1374
+ const currentEntity = _17.get(path, state);
1375
+ return _17.set(path, _17.merge(currentEntity, entity), state);
1392
1376
  };
1393
1377
  var setEntityReducer = (state, payload) => {
1394
1378
  const { path, entity } = payload;
1395
- return _16.set(path, entity, state);
1379
+ return _17.set(path, entity, state);
1396
1380
  };
1397
1381
  var setEntitiesReducer = (state, payload) => {
1398
1382
  if (typeof payload !== "object") return state;
@@ -1413,7 +1397,7 @@ var setEntitiesReducer = (state, payload) => {
1413
1397
  }
1414
1398
  const diff = Object.keys(entity).some((prop) => {
1415
1399
  const value = entity[prop];
1416
- if (!_16.isEqual(state[entityName]?.[id]?.[prop], value)) {
1400
+ if (!_17.isEqual(state[entityName]?.[id]?.[prop], value)) {
1417
1401
  return true;
1418
1402
  }
1419
1403
  });
@@ -1445,7 +1429,7 @@ var entities_default = entities;
1445
1429
  // src/reducers/auth.ts
1446
1430
  init_define_import_meta();
1447
1431
  import { makeReducer as makeReducer2 } from "@lls/utils";
1448
- import _17 from "lodash/fp.js";
1432
+ import _18 from "lodash/fp.js";
1449
1433
  var initialState = {
1450
1434
  id: void 0,
1451
1435
  role: null,
@@ -1458,15 +1442,15 @@ var initialState = {
1458
1442
  llsUserId: null
1459
1443
  };
1460
1444
  var auth = makeReducer2(initialState, {
1461
- [actionTypes.SET_AUTH]: _17.assign,
1462
- [actionTypes.RESET_AUTH]: _17.constant(initialState)
1445
+ [actionTypes.SET_AUTH]: _18.assign,
1446
+ [actionTypes.RESET_AUTH]: _18.constant(initialState)
1463
1447
  });
1464
1448
  var auth_default = auth;
1465
1449
 
1466
1450
  // src/schema/index.ts
1467
1451
  init_define_import_meta();
1468
1452
  var import_normalizr = __toESM(require_normalizr(), 1);
1469
- import _18 from "lodash/fp.js";
1453
+ import _19 from "lodash/fp.js";
1470
1454
  var document = new import_normalizr.schema.Entity("documents");
1471
1455
  var documentType = new import_normalizr.schema.Entity("documentTypes");
1472
1456
  var subDocumentType = new import_normalizr.schema.Entity("subDocumentTypes");
@@ -1529,7 +1513,7 @@ var garDivisionSchema = define(garDivision, {
1529
1513
  school
1530
1514
  });
1531
1515
  var documentTypeSchema = define(documentType, {
1532
- subTypes: [subDocumentType]
1516
+ subDocumentType
1533
1517
  });
1534
1518
  var documentSchema = define(document, {
1535
1519
  page,
@@ -1685,7 +1669,7 @@ var querySchema = {
1685
1669
  }
1686
1670
  }
1687
1671
  };
1688
- var normalizeData = _18.flow((data) => (0, import_normalizr.normalize)(data, querySchema));
1672
+ var normalizeData = _19.flow((data) => (0, import_normalizr.normalize)(data, querySchema));
1689
1673
  export {
1690
1674
  auth_default as authReducer,
1691
1675
  entities_default as entitiesReducer,
@@ -1739,7 +1723,6 @@ export {
1739
1723
  getSharedPages,
1740
1724
  getStudent,
1741
1725
  getStudents,
1742
- getSubDocumentTypes,
1743
1726
  getSubject,
1744
1727
  getSubjects,
1745
1728
  getTeacher,
@@ -1773,7 +1756,6 @@ export {
1773
1756
  useSearchContacts,
1774
1757
  useSearchCopyNotifications,
1775
1758
  useSearchCurrentUserSharedPages,
1776
- useSearchDocumentTypes,
1777
1759
  useSearchDocuments,
1778
1760
  useSearchDrafts,
1779
1761
  useSearchDrawerNotifications,
@@ -1792,7 +1774,6 @@ export {
1792
1774
  useSearchSchools,
1793
1775
  useSearchSharedPages,
1794
1776
  useSearchStudents,
1795
- useSearchSubDocumentTypes,
1796
1777
  useSearchSubjects,
1797
1778
  useSearchTeachers,
1798
1779
  useSearchTools,
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.8.0-96f88fc0",
5
+ "version": "24.8.0-9dd96940",
6
6
  "type": "module",
7
7
  "types": "./lib/builttypes/store/src/index.d.ts",
8
8
  "exports": {
@@ -48,8 +48,8 @@
48
48
  "typescript": "5.6.3",
49
49
  "vite": "5.4.11",
50
50
  "vite-tsconfig-paths": "5.1.3",
51
- "@lls/utils": "24.8.0-96f88fc0",
52
- "@lls/vitescripts": "24.8.0-96f88fc0"
51
+ "@lls/utils": "24.8.0-9dd96940",
52
+ "@lls/vitescripts": "24.8.0-9dd96940"
53
53
  },
54
54
  "license": "ISC",
55
55
  "dependencies": {