analytica-frontend-lib 1.4.3 → 1.4.4
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/dist/hooks/useModules.d.ts +3 -0
- package/dist/hooks/useModules.d.ts.map +1 -1
- package/dist/index.js +10 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/dist/store/modulesStore.d.ts +3 -0
- package/dist/store/modulesStore.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useModules.d.ts","sourceRoot":"","sources":["../../src/hooks/useModules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE5E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useModules.d.ts","sourceRoot":"","sources":["../../src/hooks/useModules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE5E,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,aAAa,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,UAAU,QAAO,gBAc7B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -34161,7 +34161,10 @@ var defaultModules = {
|
|
|
34161
34161
|
simulator: true,
|
|
34162
34162
|
essay: true,
|
|
34163
34163
|
forum: true,
|
|
34164
|
-
support: true
|
|
34164
|
+
support: true,
|
|
34165
|
+
simulatedReports: true,
|
|
34166
|
+
activitiesReports: true,
|
|
34167
|
+
lessonsReports: true
|
|
34165
34168
|
};
|
|
34166
34169
|
var latestRequestId = 0;
|
|
34167
34170
|
var useModulesStore = (0, import_zustand17.create)()(
|
|
@@ -34231,6 +34234,8 @@ var useModulesStore = (0, import_zustand17.create)()(
|
|
|
34231
34234
|
}),
|
|
34232
34235
|
onRehydrateStorage: () => (rehydrated) => {
|
|
34233
34236
|
if (!rehydrated) return;
|
|
34237
|
+
const mergedModules = { ...defaultModules, ...rehydrated.modules };
|
|
34238
|
+
useModulesStore.setState({ modules: mergedModules });
|
|
34234
34239
|
const currentInstitutionId = useAuthStore.getState().sessionInfo?.institutionId ?? null;
|
|
34235
34240
|
if (rehydrated.ownerInstitutionId && rehydrated.ownerInstitutionId !== currentInstitutionId) {
|
|
34236
34241
|
useModulesStore.getState().clearModules();
|
|
@@ -34355,7 +34360,10 @@ var useModules = () => {
|
|
|
34355
34360
|
hasSimulator: modules.simulator,
|
|
34356
34361
|
hasEssay: modules.essay,
|
|
34357
34362
|
hasForum: modules.forum,
|
|
34358
|
-
hasSupport: modules.support
|
|
34363
|
+
hasSupport: modules.support,
|
|
34364
|
+
hasSimulatedReports: modules.simulatedReports,
|
|
34365
|
+
hasActivitiesReports: modules.activitiesReports,
|
|
34366
|
+
hasLessonsReports: modules.lessonsReports
|
|
34359
34367
|
};
|
|
34360
34368
|
};
|
|
34361
34369
|
|