@lls/store 24.8.0-852d8630 → 24.8.0-860a97ff

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 +17 -34
  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);
@@ -1018,7 +1018,7 @@ var search11 = ({ ids, read, pageIds }) => {
1018
1018
  return makeEntitiesFilter9({ read, id: ids, page: pageIds });
1019
1019
  };
1020
1020
  var makeSearchDrawerNotifications = () => createSearchSelector4(
1021
- [makeGetCurrentUser(), makeGetAllEntities3("drawerNotifications"), (_19, params) => params],
1021
+ [makeGetCurrentUser(), makeGetAllEntities3("drawerNotifications"), (_20, params) => params],
1022
1022
  (currentUser, drawerNotifications, { read, pageIds }) => {
1023
1023
  const ids = currentUser?.drawerNotifications;
1024
1024
  return search11({ ids, read, pageIds })(drawerNotifications);
@@ -1335,30 +1335,16 @@ var { getCirconscriptions } = crud("circonscriptions", {
1335
1335
 
1336
1336
  // src/selectors/documentType.ts
1337
1337
  init_define_import_meta();
1338
- import { makeEntitiesFilter as makeEntitiesFilter26 } from "@lls/utils";
1339
- var search30 = ({ ids }) => {
1340
- return makeEntitiesFilter26({
1341
- id: ids
1342
- });
1343
- };
1344
- var searchSubDocumentType = ({
1345
- ids
1346
- }) => {
1347
- return makeEntitiesFilter26({
1348
- id: ids
1349
- });
1350
- };
1351
- var { getSubDocumentTypes, useSearchSubDocumentTypes } = crud("subDocumentTypes", {
1352
- search: searchSubDocumentType
1353
- });
1354
- 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", {
1355
1341
  search: search30
1356
1342
  });
1357
1343
 
1358
1344
  // src/reducers/entities.ts
1359
1345
  init_define_import_meta();
1360
1346
  import { makeReducer } from "@lls/utils";
1361
- import _16 from "lodash/fp.js";
1347
+ import _17 from "lodash/fp.js";
1362
1348
 
1363
1349
  // src/actions/index.ts
1364
1350
  init_define_import_meta();
@@ -1381,16 +1367,16 @@ var resetAuth = makeActionCreator(actionTypes.RESET_AUTH);
1381
1367
  // src/reducers/entities.ts
1382
1368
  var deleteEntityReducer = (state, payload) => {
1383
1369
  const { path } = payload;
1384
- return _16.omit(path, state);
1370
+ return _17.omit(path, state);
1385
1371
  };
1386
1372
  var updateEntityReducer = (state, payload) => {
1387
1373
  const { path, entity } = payload;
1388
- const currentEntity = _16.get(path, state);
1389
- 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);
1390
1376
  };
1391
1377
  var setEntityReducer = (state, payload) => {
1392
1378
  const { path, entity } = payload;
1393
- return _16.set(path, entity, state);
1379
+ return _17.set(path, entity, state);
1394
1380
  };
1395
1381
  var setEntitiesReducer = (state, payload) => {
1396
1382
  if (typeof payload !== "object") return state;
@@ -1411,7 +1397,7 @@ var setEntitiesReducer = (state, payload) => {
1411
1397
  }
1412
1398
  const diff = Object.keys(entity).some((prop) => {
1413
1399
  const value = entity[prop];
1414
- if (!_16.isEqual(state[entityName]?.[id]?.[prop], value)) {
1400
+ if (!_17.isEqual(state[entityName]?.[id]?.[prop], value)) {
1415
1401
  return true;
1416
1402
  }
1417
1403
  });
@@ -1443,7 +1429,7 @@ var entities_default = entities;
1443
1429
  // src/reducers/auth.ts
1444
1430
  init_define_import_meta();
1445
1431
  import { makeReducer as makeReducer2 } from "@lls/utils";
1446
- import _17 from "lodash/fp.js";
1432
+ import _18 from "lodash/fp.js";
1447
1433
  var initialState = {
1448
1434
  id: void 0,
1449
1435
  role: null,
@@ -1456,15 +1442,15 @@ var initialState = {
1456
1442
  llsUserId: null
1457
1443
  };
1458
1444
  var auth = makeReducer2(initialState, {
1459
- [actionTypes.SET_AUTH]: _17.assign,
1460
- [actionTypes.RESET_AUTH]: _17.constant(initialState)
1445
+ [actionTypes.SET_AUTH]: _18.assign,
1446
+ [actionTypes.RESET_AUTH]: _18.constant(initialState)
1461
1447
  });
1462
1448
  var auth_default = auth;
1463
1449
 
1464
1450
  // src/schema/index.ts
1465
1451
  init_define_import_meta();
1466
1452
  var import_normalizr = __toESM(require_normalizr(), 1);
1467
- import _18 from "lodash/fp.js";
1453
+ import _19 from "lodash/fp.js";
1468
1454
  var document = new import_normalizr.schema.Entity("documents");
1469
1455
  var documentType = new import_normalizr.schema.Entity("documentTypes");
1470
1456
  var subDocumentType = new import_normalizr.schema.Entity("subDocumentTypes");
@@ -1527,7 +1513,7 @@ var garDivisionSchema = define(garDivision, {
1527
1513
  school
1528
1514
  });
1529
1515
  var documentTypeSchema = define(documentType, {
1530
- subTypes: [subDocumentType]
1516
+ subDocumentType
1531
1517
  });
1532
1518
  var documentSchema = define(document, {
1533
1519
  page,
@@ -1683,7 +1669,7 @@ var querySchema = {
1683
1669
  }
1684
1670
  }
1685
1671
  };
1686
- var normalizeData = _18.flow((data) => (0, import_normalizr.normalize)(data, querySchema));
1672
+ var normalizeData = _19.flow((data) => (0, import_normalizr.normalize)(data, querySchema));
1687
1673
  export {
1688
1674
  auth_default as authReducer,
1689
1675
  entities_default as entitiesReducer,
@@ -1737,7 +1723,6 @@ export {
1737
1723
  getSharedPages,
1738
1724
  getStudent,
1739
1725
  getStudents,
1740
- getSubDocumentTypes,
1741
1726
  getSubject,
1742
1727
  getSubjects,
1743
1728
  getTeacher,
@@ -1771,7 +1756,6 @@ export {
1771
1756
  useSearchContacts,
1772
1757
  useSearchCopyNotifications,
1773
1758
  useSearchCurrentUserSharedPages,
1774
- useSearchDocumentTypes,
1775
1759
  useSearchDocuments,
1776
1760
  useSearchDrafts,
1777
1761
  useSearchDrawerNotifications,
@@ -1790,7 +1774,6 @@ export {
1790
1774
  useSearchSchools,
1791
1775
  useSearchSharedPages,
1792
1776
  useSearchStudents,
1793
- useSearchSubDocumentTypes,
1794
1777
  useSearchSubjects,
1795
1778
  useSearchTeachers,
1796
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-852d8630",
5
+ "version": "24.8.0-860a97ff",
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-852d8630",
52
- "@lls/vitescripts": "24.8.0-852d8630"
51
+ "@lls/utils": "24.8.0-860a97ff",
52
+ "@lls/vitescripts": "24.8.0-860a97ff"
53
53
  },
54
54
  "license": "ISC",
55
55
  "dependencies": {