analytica-frontend-lib 1.2.35 → 1.2.36
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/ActivityFilters/index.d.ts +6 -19
- package/dist/ActivityFilters/index.d.ts.map +1 -1
- package/dist/ActivityFilters/index.js +566 -52
- package/dist/ActivityFilters/index.js.map +1 -1
- package/dist/ActivityFilters/index.mjs +566 -52
- package/dist/ActivityFilters/index.mjs.map +1 -1
- package/dist/hooks/useActivityFiltersData.d.ts +76 -0
- package/dist/hooks/useActivityFiltersData.d.ts.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +847 -303
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +816 -275
- package/dist/index.mjs.map +1 -1
- package/dist/store/questionFiltersStore.d.ts +13 -0
- package/dist/store/questionFiltersStore.d.ts.map +1 -0
- package/dist/types/api.d.ts +22 -0
- package/dist/types/api.d.ts.map +1 -0
- package/dist/types/notifications.d.ts +3 -13
- package/dist/types/notifications.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11206,6 +11206,503 @@ var questionTypeLabels = {
|
|
|
11206
11206
|
["PREENCHER" /* PREENCHER */]: "Preencher Lacunas"
|
|
11207
11207
|
};
|
|
11208
11208
|
|
|
11209
|
+
// src/hooks/useActivityFiltersData.ts
|
|
11210
|
+
import { useState as useState21, useEffect as useEffect21, useCallback as useCallback3, useMemo as useMemo9, useRef as useRef12 } from "react";
|
|
11211
|
+
var mapQuestionTypeToEnum = (type) => {
|
|
11212
|
+
const upperType = type.toUpperCase();
|
|
11213
|
+
const typeMap = {
|
|
11214
|
+
ALTERNATIVA: "ALTERNATIVA" /* ALTERNATIVA */,
|
|
11215
|
+
DISSERTATIVA: "DISSERTATIVA" /* DISSERTATIVA */,
|
|
11216
|
+
MULTIPLA_ESCOLHA: "MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */,
|
|
11217
|
+
VERDADEIRO_FALSO: "VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */,
|
|
11218
|
+
IMAGEM: "IMAGEM" /* IMAGEM */,
|
|
11219
|
+
LIGAR_PONTOS: "LIGAR_PONTOS" /* LIGAR_PONTOS */,
|
|
11220
|
+
PREENCHER: "PREENCHER" /* PREENCHER */
|
|
11221
|
+
};
|
|
11222
|
+
return typeMap[upperType] || null;
|
|
11223
|
+
};
|
|
11224
|
+
var areCategoriesSame = (prev, current) => {
|
|
11225
|
+
if (prev.length !== current.length) return false;
|
|
11226
|
+
return current.every((category) => {
|
|
11227
|
+
const prevCategory = prev.find((c) => c.key === category.key);
|
|
11228
|
+
if (!prevCategory) return false;
|
|
11229
|
+
const prevIds = (prevCategory.itens || []).map(
|
|
11230
|
+
(item) => item.id
|
|
11231
|
+
);
|
|
11232
|
+
const currentIds = (category.itens || []).map(
|
|
11233
|
+
(item) => item.id
|
|
11234
|
+
);
|
|
11235
|
+
if (prevIds.length !== currentIds.length) return false;
|
|
11236
|
+
return currentIds.every((id) => prevIds.includes(id));
|
|
11237
|
+
});
|
|
11238
|
+
};
|
|
11239
|
+
var mergeCategoriesWithSelection = (prev, current) => {
|
|
11240
|
+
return current.map((category) => {
|
|
11241
|
+
const prevCategory = prev.find((c) => c.key === category.key);
|
|
11242
|
+
if (!prevCategory) {
|
|
11243
|
+
return category;
|
|
11244
|
+
}
|
|
11245
|
+
const validSelectedIds = (prevCategory.selectedIds || []).filter(
|
|
11246
|
+
(id) => category.itens?.some((item) => item.id === id)
|
|
11247
|
+
);
|
|
11248
|
+
return {
|
|
11249
|
+
...category,
|
|
11250
|
+
selectedIds: validSelectedIds
|
|
11251
|
+
};
|
|
11252
|
+
});
|
|
11253
|
+
};
|
|
11254
|
+
var mapSelectedNames = (ids, items) => {
|
|
11255
|
+
return ids.map((id) => {
|
|
11256
|
+
const item = items.find((t) => t.id === id);
|
|
11257
|
+
return item ? item.name : null;
|
|
11258
|
+
}).filter((name) => name !== null);
|
|
11259
|
+
};
|
|
11260
|
+
var useActivityFiltersDataImpl = (apiClient, options) => {
|
|
11261
|
+
const { selectedSubjects, institutionId } = options;
|
|
11262
|
+
const [banksState, setBanksState] = useState21({
|
|
11263
|
+
banks: [],
|
|
11264
|
+
bankYears: [],
|
|
11265
|
+
loading: false,
|
|
11266
|
+
error: null
|
|
11267
|
+
});
|
|
11268
|
+
const loadBanks = useCallback3(async () => {
|
|
11269
|
+
setBanksState((prev) => ({ ...prev, loading: true, error: null }));
|
|
11270
|
+
try {
|
|
11271
|
+
const response = await apiClient.get(
|
|
11272
|
+
"/questions/exam-institutions"
|
|
11273
|
+
);
|
|
11274
|
+
const banksMap = /* @__PURE__ */ new Map();
|
|
11275
|
+
const bankYearsArray = [];
|
|
11276
|
+
for (const item of response.data.data) {
|
|
11277
|
+
if (!item.questionBankName) continue;
|
|
11278
|
+
const existingBank = banksMap.get(item.questionBankName);
|
|
11279
|
+
if (existingBank) {
|
|
11280
|
+
if (!existingBank.years.includes(item.year)) {
|
|
11281
|
+
existingBank.years.push(item.year);
|
|
11282
|
+
}
|
|
11283
|
+
existingBank.questionsCount += item.questionsCount;
|
|
11284
|
+
} else {
|
|
11285
|
+
banksMap.set(item.questionBankName, {
|
|
11286
|
+
id: item.questionBankName,
|
|
11287
|
+
name: item.questionBankName,
|
|
11288
|
+
examInstitution: item.questionBankName,
|
|
11289
|
+
years: [item.year],
|
|
11290
|
+
questionsCount: item.questionsCount
|
|
11291
|
+
});
|
|
11292
|
+
}
|
|
11293
|
+
bankYearsArray.push({
|
|
11294
|
+
id: `${item.questionBankYearId}-${item.questionBankName}`,
|
|
11295
|
+
name: item.year,
|
|
11296
|
+
bankId: item.questionBankName
|
|
11297
|
+
});
|
|
11298
|
+
}
|
|
11299
|
+
const banks = Array.from(banksMap.values()).map((bank) => ({
|
|
11300
|
+
id: bank.id,
|
|
11301
|
+
name: bank.name,
|
|
11302
|
+
examInstitution: bank.examInstitution
|
|
11303
|
+
}));
|
|
11304
|
+
setBanksState({
|
|
11305
|
+
banks,
|
|
11306
|
+
bankYears: bankYearsArray,
|
|
11307
|
+
loading: false,
|
|
11308
|
+
error: null
|
|
11309
|
+
});
|
|
11310
|
+
} catch (error) {
|
|
11311
|
+
console.error("Erro ao carregar bancas de vestibular:", error);
|
|
11312
|
+
setBanksState((prev) => ({
|
|
11313
|
+
...prev,
|
|
11314
|
+
loading: false,
|
|
11315
|
+
error: "Erro ao carregar bancas de vestibular"
|
|
11316
|
+
}));
|
|
11317
|
+
}
|
|
11318
|
+
}, [apiClient]);
|
|
11319
|
+
const [areasState, setAreasState] = useState21({
|
|
11320
|
+
knowledgeAreas: [],
|
|
11321
|
+
loading: false,
|
|
11322
|
+
error: null
|
|
11323
|
+
});
|
|
11324
|
+
const loadKnowledgeAreas = useCallback3(async () => {
|
|
11325
|
+
setAreasState((prev) => ({ ...prev, loading: true, error: null }));
|
|
11326
|
+
try {
|
|
11327
|
+
const response = await apiClient.get(
|
|
11328
|
+
"/knowledge/subjects"
|
|
11329
|
+
);
|
|
11330
|
+
setAreasState({
|
|
11331
|
+
knowledgeAreas: response.data.data,
|
|
11332
|
+
loading: false,
|
|
11333
|
+
error: null
|
|
11334
|
+
});
|
|
11335
|
+
} catch (error) {
|
|
11336
|
+
console.error("Erro ao carregar \xE1reas de conhecimento:", error);
|
|
11337
|
+
setAreasState((prev) => ({
|
|
11338
|
+
...prev,
|
|
11339
|
+
loading: false,
|
|
11340
|
+
error: "Erro ao carregar \xE1reas de conhecimento"
|
|
11341
|
+
}));
|
|
11342
|
+
}
|
|
11343
|
+
}, [apiClient]);
|
|
11344
|
+
const [questionTypesState, setQuestionTypesState] = useState21({
|
|
11345
|
+
questionTypes: [],
|
|
11346
|
+
loading: false,
|
|
11347
|
+
error: null
|
|
11348
|
+
});
|
|
11349
|
+
const loadQuestionTypes = useCallback3(async () => {
|
|
11350
|
+
if (!institutionId) {
|
|
11351
|
+
setQuestionTypesState((prev) => ({
|
|
11352
|
+
...prev,
|
|
11353
|
+
questionTypes: [],
|
|
11354
|
+
loading: false,
|
|
11355
|
+
error: null
|
|
11356
|
+
}));
|
|
11357
|
+
return;
|
|
11358
|
+
}
|
|
11359
|
+
setQuestionTypesState((prev) => ({
|
|
11360
|
+
...prev,
|
|
11361
|
+
loading: true,
|
|
11362
|
+
error: null
|
|
11363
|
+
}));
|
|
11364
|
+
try {
|
|
11365
|
+
const response = await apiClient.get(
|
|
11366
|
+
`/institutions/${institutionId}/question-types`
|
|
11367
|
+
);
|
|
11368
|
+
const mappedTypes = response.data.data.questionTypes.map(mapQuestionTypeToEnum).filter((type) => type !== null);
|
|
11369
|
+
setQuestionTypesState({
|
|
11370
|
+
questionTypes: mappedTypes,
|
|
11371
|
+
loading: false,
|
|
11372
|
+
error: null
|
|
11373
|
+
});
|
|
11374
|
+
} catch (error) {
|
|
11375
|
+
console.error("Erro ao carregar tipos de quest\xF5es:", error);
|
|
11376
|
+
setQuestionTypesState((prev) => ({
|
|
11377
|
+
...prev,
|
|
11378
|
+
loading: false,
|
|
11379
|
+
error: "Erro ao carregar tipos de quest\xF5es"
|
|
11380
|
+
}));
|
|
11381
|
+
}
|
|
11382
|
+
}, [apiClient, institutionId]);
|
|
11383
|
+
const [knowledgeStructure, setKnowledgeStructure] = useState21({
|
|
11384
|
+
topics: [],
|
|
11385
|
+
subtopics: [],
|
|
11386
|
+
contents: [],
|
|
11387
|
+
loading: false,
|
|
11388
|
+
error: null
|
|
11389
|
+
});
|
|
11390
|
+
const [knowledgeCategories, setKnowledgeCategories] = useState21([]);
|
|
11391
|
+
const previousSubjectsRef = useRef12(null);
|
|
11392
|
+
const loadTopics = useCallback3(
|
|
11393
|
+
async (subjectIds) => {
|
|
11394
|
+
if (subjectIds.length === 0) {
|
|
11395
|
+
setKnowledgeStructure({
|
|
11396
|
+
topics: [],
|
|
11397
|
+
subtopics: [],
|
|
11398
|
+
contents: [],
|
|
11399
|
+
loading: false,
|
|
11400
|
+
error: null
|
|
11401
|
+
});
|
|
11402
|
+
setKnowledgeCategories([]);
|
|
11403
|
+
return;
|
|
11404
|
+
}
|
|
11405
|
+
setKnowledgeStructure((prev) => ({
|
|
11406
|
+
...prev,
|
|
11407
|
+
loading: true,
|
|
11408
|
+
error: null
|
|
11409
|
+
}));
|
|
11410
|
+
try {
|
|
11411
|
+
const response = await apiClient.post(
|
|
11412
|
+
"/knowledge/topics",
|
|
11413
|
+
{ subjectIds }
|
|
11414
|
+
);
|
|
11415
|
+
const topics = response.data.data.map((topic) => ({
|
|
11416
|
+
id: topic.id,
|
|
11417
|
+
name: topic.name
|
|
11418
|
+
}));
|
|
11419
|
+
setKnowledgeStructure((prev) => ({
|
|
11420
|
+
...prev,
|
|
11421
|
+
topics,
|
|
11422
|
+
subtopics: [],
|
|
11423
|
+
contents: [],
|
|
11424
|
+
loading: false,
|
|
11425
|
+
error: null
|
|
11426
|
+
}));
|
|
11427
|
+
} catch (error) {
|
|
11428
|
+
console.error("Erro ao carregar temas:", error);
|
|
11429
|
+
setKnowledgeStructure((prev) => ({
|
|
11430
|
+
...prev,
|
|
11431
|
+
topics: [],
|
|
11432
|
+
subtopics: [],
|
|
11433
|
+
contents: [],
|
|
11434
|
+
loading: false,
|
|
11435
|
+
error: "Erro ao carregar temas"
|
|
11436
|
+
}));
|
|
11437
|
+
}
|
|
11438
|
+
},
|
|
11439
|
+
[apiClient]
|
|
11440
|
+
);
|
|
11441
|
+
const loadSubtopics = useCallback3(
|
|
11442
|
+
async (topicIds, options2 = {}) => {
|
|
11443
|
+
const { forceApi = false } = options2;
|
|
11444
|
+
if (topicIds.length === 0 && !forceApi) {
|
|
11445
|
+
setKnowledgeStructure((prev) => ({
|
|
11446
|
+
...prev,
|
|
11447
|
+
subtopics: [],
|
|
11448
|
+
contents: [],
|
|
11449
|
+
loading: false,
|
|
11450
|
+
error: null
|
|
11451
|
+
}));
|
|
11452
|
+
return;
|
|
11453
|
+
}
|
|
11454
|
+
setKnowledgeStructure((prev) => ({
|
|
11455
|
+
...prev,
|
|
11456
|
+
loading: topicIds.length > 0,
|
|
11457
|
+
error: null
|
|
11458
|
+
}));
|
|
11459
|
+
try {
|
|
11460
|
+
const response = await apiClient.post(
|
|
11461
|
+
"/knowledge/subtopics",
|
|
11462
|
+
{ topicIds }
|
|
11463
|
+
);
|
|
11464
|
+
const subtopics = response.data.data.map(
|
|
11465
|
+
(subtopic) => ({
|
|
11466
|
+
id: subtopic.id,
|
|
11467
|
+
name: subtopic.name,
|
|
11468
|
+
topicId: subtopic.topicId || topicIds[0]
|
|
11469
|
+
})
|
|
11470
|
+
);
|
|
11471
|
+
setKnowledgeStructure((prev) => ({
|
|
11472
|
+
...prev,
|
|
11473
|
+
subtopics,
|
|
11474
|
+
contents: [],
|
|
11475
|
+
loading: false,
|
|
11476
|
+
error: null
|
|
11477
|
+
}));
|
|
11478
|
+
} catch (error) {
|
|
11479
|
+
console.error("Erro ao carregar subtemas:", error);
|
|
11480
|
+
setKnowledgeStructure((prev) => ({
|
|
11481
|
+
...prev,
|
|
11482
|
+
subtopics: [],
|
|
11483
|
+
contents: [],
|
|
11484
|
+
loading: false,
|
|
11485
|
+
error: "Erro ao carregar subtemas"
|
|
11486
|
+
}));
|
|
11487
|
+
}
|
|
11488
|
+
},
|
|
11489
|
+
[apiClient]
|
|
11490
|
+
);
|
|
11491
|
+
const loadContents = useCallback3(
|
|
11492
|
+
async (subtopicIds) => {
|
|
11493
|
+
if (subtopicIds.length === 0) {
|
|
11494
|
+
setKnowledgeStructure((prev) => ({
|
|
11495
|
+
...prev,
|
|
11496
|
+
contents: [],
|
|
11497
|
+
loading: false,
|
|
11498
|
+
error: null
|
|
11499
|
+
}));
|
|
11500
|
+
return;
|
|
11501
|
+
}
|
|
11502
|
+
setKnowledgeStructure((prev) => ({
|
|
11503
|
+
...prev,
|
|
11504
|
+
loading: true,
|
|
11505
|
+
error: null
|
|
11506
|
+
}));
|
|
11507
|
+
try {
|
|
11508
|
+
const response = await apiClient.post(
|
|
11509
|
+
"/knowledge/contents",
|
|
11510
|
+
{ subtopicIds }
|
|
11511
|
+
);
|
|
11512
|
+
const contents = response.data.data.map(
|
|
11513
|
+
(content) => ({
|
|
11514
|
+
id: content.id,
|
|
11515
|
+
name: content.name,
|
|
11516
|
+
subtopicId: content.subtopicId || subtopicIds[0]
|
|
11517
|
+
})
|
|
11518
|
+
);
|
|
11519
|
+
setKnowledgeStructure((prev) => ({
|
|
11520
|
+
...prev,
|
|
11521
|
+
contents,
|
|
11522
|
+
loading: false,
|
|
11523
|
+
error: null
|
|
11524
|
+
}));
|
|
11525
|
+
} catch (error) {
|
|
11526
|
+
console.error("Erro ao carregar conte\xFAdos:", error);
|
|
11527
|
+
setKnowledgeStructure((prev) => ({
|
|
11528
|
+
...prev,
|
|
11529
|
+
contents: [],
|
|
11530
|
+
loading: false,
|
|
11531
|
+
error: "Erro ao carregar conte\xFAdos"
|
|
11532
|
+
}));
|
|
11533
|
+
}
|
|
11534
|
+
},
|
|
11535
|
+
[apiClient]
|
|
11536
|
+
);
|
|
11537
|
+
useEffect21(() => {
|
|
11538
|
+
const previousSubjects = previousSubjectsRef.current;
|
|
11539
|
+
const subjectsChanged = !previousSubjects || previousSubjects.length !== selectedSubjects.length || selectedSubjects.some((id, index) => id !== previousSubjects[index]);
|
|
11540
|
+
if (!subjectsChanged) return;
|
|
11541
|
+
previousSubjectsRef.current = selectedSubjects;
|
|
11542
|
+
if (selectedSubjects.length > 0) {
|
|
11543
|
+
loadTopics(selectedSubjects);
|
|
11544
|
+
return;
|
|
11545
|
+
}
|
|
11546
|
+
setKnowledgeStructure({
|
|
11547
|
+
topics: [],
|
|
11548
|
+
subtopics: [],
|
|
11549
|
+
contents: [],
|
|
11550
|
+
loading: false,
|
|
11551
|
+
error: null
|
|
11552
|
+
});
|
|
11553
|
+
setKnowledgeCategories([]);
|
|
11554
|
+
}, [selectedSubjects, loadTopics]);
|
|
11555
|
+
const handleCategoriesChange = useCallback3(
|
|
11556
|
+
(updatedCategories) => {
|
|
11557
|
+
const isFirstChange = knowledgeCategories.length === 0;
|
|
11558
|
+
const currentTemaCategory = knowledgeCategories.find(
|
|
11559
|
+
(c) => c.key === "tema"
|
|
11560
|
+
);
|
|
11561
|
+
const currentSubtemaCategory = knowledgeCategories.find(
|
|
11562
|
+
(c) => c.key === "subtema"
|
|
11563
|
+
);
|
|
11564
|
+
const currentSelectedTopicIds = currentTemaCategory?.selectedIds || [];
|
|
11565
|
+
const currentSelectedSubtopicIds = currentSubtemaCategory?.selectedIds || [];
|
|
11566
|
+
const temaCategory = updatedCategories.find((c) => c.key === "tema");
|
|
11567
|
+
const selectedTopicIds = temaCategory?.selectedIds || [];
|
|
11568
|
+
const subtemaCategory = updatedCategories.find(
|
|
11569
|
+
(c) => c.key === "subtema"
|
|
11570
|
+
);
|
|
11571
|
+
const selectedSubtopicIds = subtemaCategory?.selectedIds || [];
|
|
11572
|
+
setKnowledgeCategories(updatedCategories);
|
|
11573
|
+
const topicIdsChanged = isFirstChange || currentSelectedTopicIds.length !== selectedTopicIds.length || currentSelectedTopicIds.some(
|
|
11574
|
+
(id) => !selectedTopicIds.includes(id)
|
|
11575
|
+
) || selectedTopicIds.some(
|
|
11576
|
+
(id) => !currentSelectedTopicIds.includes(id)
|
|
11577
|
+
);
|
|
11578
|
+
if (topicIdsChanged) {
|
|
11579
|
+
loadSubtopics(selectedTopicIds, {
|
|
11580
|
+
forceApi: selectedTopicIds.length === 0
|
|
11581
|
+
});
|
|
11582
|
+
}
|
|
11583
|
+
const subtopicIdsChanged = isFirstChange || currentSelectedSubtopicIds.length !== selectedSubtopicIds.length || currentSelectedSubtopicIds.some(
|
|
11584
|
+
(id) => !selectedSubtopicIds.includes(id)
|
|
11585
|
+
) || selectedSubtopicIds.some(
|
|
11586
|
+
(id) => !currentSelectedSubtopicIds.includes(id)
|
|
11587
|
+
);
|
|
11588
|
+
if (subtopicIdsChanged) {
|
|
11589
|
+
if (selectedSubtopicIds.length > 0) {
|
|
11590
|
+
loadContents(selectedSubtopicIds);
|
|
11591
|
+
} else {
|
|
11592
|
+
loadContents([]);
|
|
11593
|
+
}
|
|
11594
|
+
}
|
|
11595
|
+
},
|
|
11596
|
+
[knowledgeCategories, loadSubtopics, loadContents]
|
|
11597
|
+
);
|
|
11598
|
+
useEffect21(() => {
|
|
11599
|
+
if (knowledgeStructure.topics.length === 0) {
|
|
11600
|
+
setKnowledgeCategories((prev) => {
|
|
11601
|
+
if (prev.length === 0) {
|
|
11602
|
+
return prev;
|
|
11603
|
+
}
|
|
11604
|
+
return [];
|
|
11605
|
+
});
|
|
11606
|
+
return;
|
|
11607
|
+
}
|
|
11608
|
+
const categories = [
|
|
11609
|
+
{
|
|
11610
|
+
key: "tema",
|
|
11611
|
+
label: "Tema",
|
|
11612
|
+
dependsOn: [],
|
|
11613
|
+
itens: knowledgeStructure.topics,
|
|
11614
|
+
selectedIds: []
|
|
11615
|
+
},
|
|
11616
|
+
{
|
|
11617
|
+
key: "subtema",
|
|
11618
|
+
label: "Subtema",
|
|
11619
|
+
dependsOn: ["tema"],
|
|
11620
|
+
itens: knowledgeStructure.subtopics,
|
|
11621
|
+
filteredBy: [{ key: "tema", internalField: "topicId" }],
|
|
11622
|
+
selectedIds: []
|
|
11623
|
+
},
|
|
11624
|
+
{
|
|
11625
|
+
key: "assunto",
|
|
11626
|
+
label: "Assunto",
|
|
11627
|
+
dependsOn: ["subtema"],
|
|
11628
|
+
itens: knowledgeStructure.contents,
|
|
11629
|
+
filteredBy: [{ key: "subtema", internalField: "subtopicId" }],
|
|
11630
|
+
selectedIds: []
|
|
11631
|
+
}
|
|
11632
|
+
];
|
|
11633
|
+
setKnowledgeCategories(
|
|
11634
|
+
(prev) => areCategoriesSame(prev, categories) ? prev : mergeCategoriesWithSelection(prev, categories)
|
|
11635
|
+
);
|
|
11636
|
+
}, [
|
|
11637
|
+
selectedSubjects,
|
|
11638
|
+
knowledgeStructure.topics,
|
|
11639
|
+
knowledgeStructure.subtopics,
|
|
11640
|
+
knowledgeStructure.contents
|
|
11641
|
+
]);
|
|
11642
|
+
const selectedKnowledgeSummary = useMemo9(() => {
|
|
11643
|
+
const temaCategory = knowledgeCategories.find((c) => c.key === "tema");
|
|
11644
|
+
const subtemaCategory = knowledgeCategories.find(
|
|
11645
|
+
(c) => c.key === "subtema"
|
|
11646
|
+
);
|
|
11647
|
+
const assuntoCategory = knowledgeCategories.find(
|
|
11648
|
+
(c) => c.key === "assunto"
|
|
11649
|
+
);
|
|
11650
|
+
const selectedTopics = mapSelectedNames(
|
|
11651
|
+
temaCategory?.selectedIds || [],
|
|
11652
|
+
knowledgeStructure.topics
|
|
11653
|
+
);
|
|
11654
|
+
const selectedSubtopics = mapSelectedNames(
|
|
11655
|
+
subtemaCategory?.selectedIds || [],
|
|
11656
|
+
knowledgeStructure.subtopics
|
|
11657
|
+
);
|
|
11658
|
+
const selectedContents = mapSelectedNames(
|
|
11659
|
+
assuntoCategory?.selectedIds || [],
|
|
11660
|
+
knowledgeStructure.contents
|
|
11661
|
+
);
|
|
11662
|
+
return {
|
|
11663
|
+
topics: selectedTopics,
|
|
11664
|
+
subtopics: selectedSubtopics,
|
|
11665
|
+
contents: selectedContents
|
|
11666
|
+
};
|
|
11667
|
+
}, [knowledgeCategories, knowledgeStructure]);
|
|
11668
|
+
const enableSummary = useMemo9(() => {
|
|
11669
|
+
return knowledgeStructure.topics.length === 1 || knowledgeStructure.subtopics.length === 1 || knowledgeStructure.contents.length === 1;
|
|
11670
|
+
}, [knowledgeStructure]);
|
|
11671
|
+
return {
|
|
11672
|
+
// Vestibular Banks
|
|
11673
|
+
banks: banksState.banks,
|
|
11674
|
+
bankYears: banksState.bankYears,
|
|
11675
|
+
loadingBanks: banksState.loading,
|
|
11676
|
+
banksError: banksState.error,
|
|
11677
|
+
loadBanks,
|
|
11678
|
+
// Knowledge Areas
|
|
11679
|
+
knowledgeAreas: areasState.knowledgeAreas,
|
|
11680
|
+
loadingSubjects: areasState.loading,
|
|
11681
|
+
subjectsError: areasState.error,
|
|
11682
|
+
loadKnowledgeAreas,
|
|
11683
|
+
// Knowledge Structure
|
|
11684
|
+
knowledgeStructure,
|
|
11685
|
+
knowledgeCategories,
|
|
11686
|
+
handleCategoriesChange,
|
|
11687
|
+
selectedKnowledgeSummary,
|
|
11688
|
+
enableSummary,
|
|
11689
|
+
loadTopics,
|
|
11690
|
+
loadSubtopics,
|
|
11691
|
+
loadContents,
|
|
11692
|
+
// Question Types
|
|
11693
|
+
questionTypes: questionTypesState.questionTypes,
|
|
11694
|
+
loadingQuestionTypes: questionTypesState.loading,
|
|
11695
|
+
questionTypesError: questionTypesState.error,
|
|
11696
|
+
loadQuestionTypes
|
|
11697
|
+
};
|
|
11698
|
+
};
|
|
11699
|
+
var createUseActivityFiltersData = (apiClient) => {
|
|
11700
|
+
return (options) => useActivityFiltersDataImpl(apiClient, options);
|
|
11701
|
+
};
|
|
11702
|
+
var createActivityFiltersDataHook = (apiClient) => {
|
|
11703
|
+
return createUseActivityFiltersData(apiClient);
|
|
11704
|
+
};
|
|
11705
|
+
|
|
11209
11706
|
// src/components/Filter/FilterModal.tsx
|
|
11210
11707
|
import { jsx as jsx57, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
11211
11708
|
var FilterModal = ({
|
|
@@ -11349,10 +11846,10 @@ var FilterModal = ({
|
|
|
11349
11846
|
};
|
|
11350
11847
|
|
|
11351
11848
|
// src/components/Filter/useTableFilter.ts
|
|
11352
|
-
import { useEffect as
|
|
11849
|
+
import { useEffect as useEffect22, useState as useState22, useCallback as useCallback4, useMemo as useMemo10 } from "react";
|
|
11353
11850
|
var useTableFilter = (initialConfigs, options = {}) => {
|
|
11354
11851
|
const { syncWithUrl = false } = options;
|
|
11355
|
-
const getInitialState =
|
|
11852
|
+
const getInitialState = useCallback4(() => {
|
|
11356
11853
|
if (!syncWithUrl || globalThis.window === void 0) {
|
|
11357
11854
|
return initialConfigs;
|
|
11358
11855
|
}
|
|
@@ -11370,8 +11867,8 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11370
11867
|
}));
|
|
11371
11868
|
return configsWithUrlState;
|
|
11372
11869
|
}, [initialConfigs, syncWithUrl]);
|
|
11373
|
-
const [filterConfigs, setFilterConfigs] =
|
|
11374
|
-
const activeFilters =
|
|
11870
|
+
const [filterConfigs, setFilterConfigs] = useState22(getInitialState);
|
|
11871
|
+
const activeFilters = useMemo10(() => {
|
|
11375
11872
|
const filters = {};
|
|
11376
11873
|
for (const config of filterConfigs) {
|
|
11377
11874
|
for (const category of config.categories) {
|
|
@@ -11383,10 +11880,10 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11383
11880
|
return filters;
|
|
11384
11881
|
}, [filterConfigs]);
|
|
11385
11882
|
const hasActiveFilters = Object.keys(activeFilters).length > 0;
|
|
11386
|
-
const updateFilters =
|
|
11883
|
+
const updateFilters = useCallback4((configs) => {
|
|
11387
11884
|
setFilterConfigs(configs);
|
|
11388
11885
|
}, []);
|
|
11389
|
-
const applyFilters =
|
|
11886
|
+
const applyFilters = useCallback4(() => {
|
|
11390
11887
|
if (!syncWithUrl || globalThis.window === void 0) {
|
|
11391
11888
|
return;
|
|
11392
11889
|
}
|
|
@@ -11404,7 +11901,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11404
11901
|
}
|
|
11405
11902
|
globalThis.window.history.replaceState({}, "", url.toString());
|
|
11406
11903
|
}, [filterConfigs, syncWithUrl]);
|
|
11407
|
-
const clearFilters =
|
|
11904
|
+
const clearFilters = useCallback4(() => {
|
|
11408
11905
|
const clearedConfigs = filterConfigs.map((config) => ({
|
|
11409
11906
|
...config,
|
|
11410
11907
|
categories: config.categories.map((category) => ({
|
|
@@ -11424,7 +11921,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11424
11921
|
globalThis.window.history.replaceState({}, "", url.toString());
|
|
11425
11922
|
}
|
|
11426
11923
|
}, [filterConfigs, syncWithUrl]);
|
|
11427
|
-
|
|
11924
|
+
useEffect22(() => {
|
|
11428
11925
|
if (!syncWithUrl || globalThis.window === void 0) {
|
|
11429
11926
|
return;
|
|
11430
11927
|
}
|
|
@@ -11445,9 +11942,9 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11445
11942
|
};
|
|
11446
11943
|
|
|
11447
11944
|
// src/components/ActivityFilters/ActivityFilters.tsx
|
|
11448
|
-
import { useState as
|
|
11945
|
+
import { useState as useState23, useEffect as useEffect23, useMemo as useMemo11, useCallback as useCallback5, useRef as useRef13 } from "react";
|
|
11449
11946
|
import { jsx as jsx58, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
11450
|
-
var
|
|
11947
|
+
var questionTypesFallback = [
|
|
11451
11948
|
"ALTERNATIVA" /* ALTERNATIVA */,
|
|
11452
11949
|
"VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */,
|
|
11453
11950
|
"DISSERTATIVA" /* DISSERTATIVA */,
|
|
@@ -11461,7 +11958,7 @@ var QuestionTypeFilter = ({
|
|
|
11461
11958
|
onToggleType,
|
|
11462
11959
|
allowedQuestionTypes
|
|
11463
11960
|
}) => {
|
|
11464
|
-
const availableQuestionTypes = allowedQuestionTypes ||
|
|
11961
|
+
const availableQuestionTypes = allowedQuestionTypes || questionTypesFallback;
|
|
11465
11962
|
return /* @__PURE__ */ jsxs45("div", { children: [
|
|
11466
11963
|
/* @__PURE__ */ jsx58(Text_default, { size: "sm", weight: "bold", className: "mb-3 block", children: "Tipo de quest\xE3o" }),
|
|
11467
11964
|
/* @__PURE__ */ jsx58("div", { className: "grid grid-cols-2 gap-2", children: availableQuestionTypes.map((questionType) => /* @__PURE__ */ jsx58(
|
|
@@ -11586,45 +12083,42 @@ var FilterActions = ({
|
|
|
11586
12083
|
] });
|
|
11587
12084
|
};
|
|
11588
12085
|
var ActivityFilters = ({
|
|
12086
|
+
apiClient,
|
|
11589
12087
|
onFiltersChange,
|
|
11590
12088
|
variant = "default",
|
|
11591
|
-
|
|
11592
|
-
banks = [],
|
|
11593
|
-
bankYears = [],
|
|
11594
|
-
knowledgeAreas = [],
|
|
11595
|
-
knowledgeStructure = {
|
|
11596
|
-
topics: [],
|
|
11597
|
-
subtopics: [],
|
|
11598
|
-
contents: [],
|
|
11599
|
-
loading: false,
|
|
11600
|
-
error: null
|
|
11601
|
-
},
|
|
11602
|
-
knowledgeCategories = [],
|
|
12089
|
+
institutionId = null,
|
|
11603
12090
|
// Question types
|
|
11604
12091
|
allowedQuestionTypes,
|
|
11605
|
-
// Loading states
|
|
11606
|
-
loadingBanks = false,
|
|
11607
|
-
loadingKnowledge: _loadingKnowledge = false,
|
|
11608
|
-
loadingSubjects = false,
|
|
11609
|
-
// Errors
|
|
11610
|
-
banksError = null,
|
|
11611
|
-
subjectsError = null,
|
|
11612
|
-
// Load functions
|
|
11613
|
-
loadBanks,
|
|
11614
|
-
loadKnowledge,
|
|
11615
|
-
loadTopics,
|
|
11616
|
-
loadSubtopics: _loadSubtopics,
|
|
11617
|
-
loadContents: _loadContents,
|
|
11618
|
-
// Handlers
|
|
11619
|
-
handleCategoriesChange,
|
|
11620
12092
|
// Action buttons
|
|
11621
12093
|
onClearFilters,
|
|
11622
12094
|
onApplyFilters
|
|
11623
12095
|
}) => {
|
|
11624
|
-
const
|
|
11625
|
-
const [
|
|
11626
|
-
const
|
|
11627
|
-
|
|
12096
|
+
const useActivityFiltersData = createUseActivityFiltersData(apiClient);
|
|
12097
|
+
const [selectedQuestionTypes, setSelectedQuestionTypes] = useState23([]);
|
|
12098
|
+
const [selectedSubject, setSelectedSubject] = useState23(null);
|
|
12099
|
+
const {
|
|
12100
|
+
banks,
|
|
12101
|
+
bankYears,
|
|
12102
|
+
loadingBanks,
|
|
12103
|
+
banksError,
|
|
12104
|
+
knowledgeAreas,
|
|
12105
|
+
loadingSubjects,
|
|
12106
|
+
subjectsError,
|
|
12107
|
+
knowledgeStructure,
|
|
12108
|
+
knowledgeCategories,
|
|
12109
|
+
handleCategoriesChange,
|
|
12110
|
+
loadBanks,
|
|
12111
|
+
loadKnowledgeAreas,
|
|
12112
|
+
loadQuestionTypes,
|
|
12113
|
+
questionTypes,
|
|
12114
|
+
loadingQuestionTypes,
|
|
12115
|
+
questionTypesError
|
|
12116
|
+
} = useActivityFiltersData({
|
|
12117
|
+
selectedSubjects: selectedSubject ? [selectedSubject] : [],
|
|
12118
|
+
institutionId
|
|
12119
|
+
});
|
|
12120
|
+
const prevAllowedQuestionTypesRef = useRef13(null);
|
|
12121
|
+
useEffect23(() => {
|
|
11628
12122
|
if (!allowedQuestionTypes || allowedQuestionTypes.length === 0) {
|
|
11629
12123
|
prevAllowedQuestionTypesRef.current = null;
|
|
11630
12124
|
return;
|
|
@@ -11657,8 +12151,8 @@ var ActivityFilters = ({
|
|
|
11657
12151
|
return prev;
|
|
11658
12152
|
});
|
|
11659
12153
|
}, [allowedQuestionTypes]);
|
|
11660
|
-
const [bankCategories, setBankCategories] =
|
|
11661
|
-
const selectedSubjects =
|
|
12154
|
+
const [bankCategories, setBankCategories] = useState23([]);
|
|
12155
|
+
const selectedSubjects = useMemo11(
|
|
11662
12156
|
() => selectedSubject ? [selectedSubject] : [],
|
|
11663
12157
|
[selectedSubject]
|
|
11664
12158
|
);
|
|
@@ -11671,7 +12165,7 @@ var ActivityFilters = ({
|
|
|
11671
12165
|
const handleBankCategoriesChange = (updatedCategories) => {
|
|
11672
12166
|
setBankCategories(updatedCategories);
|
|
11673
12167
|
};
|
|
11674
|
-
|
|
12168
|
+
useEffect23(() => {
|
|
11675
12169
|
setBankCategories((prevCategories) => {
|
|
11676
12170
|
const bankCategory = {
|
|
11677
12171
|
key: "banca",
|
|
@@ -11697,37 +12191,42 @@ var ActivityFilters = ({
|
|
|
11697
12191
|
return [bankCategory, yearCategory];
|
|
11698
12192
|
});
|
|
11699
12193
|
}, [banks, bankYears]);
|
|
11700
|
-
|
|
12194
|
+
useEffect23(() => {
|
|
11701
12195
|
if (loadBanks) {
|
|
11702
12196
|
loadBanks();
|
|
11703
12197
|
}
|
|
11704
|
-
if (
|
|
11705
|
-
|
|
12198
|
+
if (loadKnowledgeAreas) {
|
|
12199
|
+
loadKnowledgeAreas();
|
|
11706
12200
|
}
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
if (selectedSubject && loadTopics) {
|
|
11710
|
-
loadTopics([selectedSubject]);
|
|
12201
|
+
if (loadQuestionTypes) {
|
|
12202
|
+
loadQuestionTypes();
|
|
11711
12203
|
}
|
|
11712
|
-
}, [
|
|
11713
|
-
const
|
|
12204
|
+
}, [loadBanks, loadKnowledgeAreas, loadQuestionTypes, institutionId]);
|
|
12205
|
+
const availableQuestionTypes = useMemo11(() => {
|
|
12206
|
+
const source = questionTypes && questionTypes.length > 0 ? questionTypes : questionTypesFallback;
|
|
12207
|
+
if (!allowedQuestionTypes || allowedQuestionTypes.length === 0) {
|
|
12208
|
+
return source;
|
|
12209
|
+
}
|
|
12210
|
+
return source.filter((type) => allowedQuestionTypes.includes(type));
|
|
12211
|
+
}, [questionTypes, allowedQuestionTypes]);
|
|
12212
|
+
const getSelectedKnowledgeIds = useCallback5(() => {
|
|
11714
12213
|
return getSelectedIdsFromCategories(knowledgeCategories, {
|
|
11715
12214
|
topicIds: "tema",
|
|
11716
12215
|
subtopicIds: "subtema",
|
|
11717
12216
|
contentIds: "assunto"
|
|
11718
12217
|
});
|
|
11719
12218
|
}, [knowledgeCategories]);
|
|
11720
|
-
const getSelectedBankIds =
|
|
12219
|
+
const getSelectedBankIds = useCallback5(() => {
|
|
11721
12220
|
return getSelectedIdsFromCategories(bankCategories, {
|
|
11722
12221
|
bankIds: "banca",
|
|
11723
12222
|
yearIds: "ano"
|
|
11724
12223
|
});
|
|
11725
12224
|
}, [bankCategories]);
|
|
11726
|
-
const onFiltersChangeRef =
|
|
11727
|
-
|
|
12225
|
+
const onFiltersChangeRef = useRef13(onFiltersChange);
|
|
12226
|
+
useEffect23(() => {
|
|
11728
12227
|
onFiltersChangeRef.current = onFiltersChange;
|
|
11729
12228
|
}, [onFiltersChange]);
|
|
11730
|
-
|
|
12229
|
+
useEffect23(() => {
|
|
11731
12230
|
const knowledgeIds = getSelectedKnowledgeIds();
|
|
11732
12231
|
const bankIds = getSelectedBankIds();
|
|
11733
12232
|
const filters = {
|
|
@@ -11758,7 +12257,25 @@ var ActivityFilters = ({
|
|
|
11758
12257
|
{
|
|
11759
12258
|
selectedTypes: selectedQuestionTypes,
|
|
11760
12259
|
onToggleType: toggleQuestionType,
|
|
11761
|
-
allowedQuestionTypes
|
|
12260
|
+
allowedQuestionTypes: availableQuestionTypes
|
|
12261
|
+
}
|
|
12262
|
+
),
|
|
12263
|
+
loadingQuestionTypes && /* @__PURE__ */ jsx58(
|
|
12264
|
+
Text_default,
|
|
12265
|
+
{
|
|
12266
|
+
size: "sm",
|
|
12267
|
+
className: "text-text-600",
|
|
12268
|
+
"data-testid": "question-types-loading",
|
|
12269
|
+
children: "Carregando tipos de quest\xE3o..."
|
|
12270
|
+
}
|
|
12271
|
+
),
|
|
12272
|
+
questionTypesError && /* @__PURE__ */ jsx58(
|
|
12273
|
+
Text_default,
|
|
12274
|
+
{
|
|
12275
|
+
size: "sm",
|
|
12276
|
+
className: "text-error-500",
|
|
12277
|
+
"data-testid": "question-types-error",
|
|
12278
|
+
children: questionTypesError
|
|
11762
12279
|
}
|
|
11763
12280
|
),
|
|
11764
12281
|
/* @__PURE__ */ jsxs45("div", { children: [
|
|
@@ -11811,7 +12328,7 @@ var ActivityFiltersPopover = ({
|
|
|
11811
12328
|
triggerLabel = "Filtro de quest\xF5es",
|
|
11812
12329
|
...activityFiltersProps
|
|
11813
12330
|
}) => {
|
|
11814
|
-
const [open, setOpen] =
|
|
12331
|
+
const [open, setOpen] = useState23(false);
|
|
11815
12332
|
return /* @__PURE__ */ jsxs45(DropdownMenu_default, { open, onOpenChange: setOpen, children: [
|
|
11816
12333
|
/* @__PURE__ */ jsx58(DropdownMenuTrigger, { children: /* @__PURE__ */ jsx58(Button_default, { variant: "outline", children: triggerLabel }) }),
|
|
11817
12334
|
/* @__PURE__ */ jsx58(
|
|
@@ -11833,7 +12350,7 @@ var ActivityFiltersPopover = ({
|
|
|
11833
12350
|
};
|
|
11834
12351
|
|
|
11835
12352
|
// src/components/TableProvider/TableProvider.tsx
|
|
11836
|
-
import { useState as
|
|
12353
|
+
import { useState as useState24, useEffect as useEffect24, useMemo as useMemo12, useCallback as useCallback6 } from "react";
|
|
11837
12354
|
import { Funnel } from "phosphor-react";
|
|
11838
12355
|
import { Fragment as Fragment11, jsx as jsx59, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
11839
12356
|
function TableProvider({
|
|
@@ -11857,7 +12374,7 @@ function TableProvider({
|
|
|
11857
12374
|
onRowClick,
|
|
11858
12375
|
children
|
|
11859
12376
|
}) {
|
|
11860
|
-
const [searchQuery, setSearchQuery] =
|
|
12377
|
+
const [searchQuery, setSearchQuery] = useState24("");
|
|
11861
12378
|
const sortResultRaw = useTableSort(data, { syncWithUrl: true });
|
|
11862
12379
|
const sortResult = enableTableSort ? sortResultRaw : {
|
|
11863
12380
|
sortedData: data,
|
|
@@ -11868,7 +12385,7 @@ function TableProvider({
|
|
|
11868
12385
|
};
|
|
11869
12386
|
const { sortedData, sortColumn, sortDirection, handleSort } = sortResult;
|
|
11870
12387
|
const filterResultRaw = useTableFilter(initialFilters, { syncWithUrl: true });
|
|
11871
|
-
const disabledFilterResult =
|
|
12388
|
+
const disabledFilterResult = useMemo12(
|
|
11872
12389
|
() => ({
|
|
11873
12390
|
filterConfigs: [],
|
|
11874
12391
|
activeFilters: {},
|
|
@@ -11898,10 +12415,10 @@ function TableProvider({
|
|
|
11898
12415
|
totalItems,
|
|
11899
12416
|
totalPages
|
|
11900
12417
|
} = paginationConfig;
|
|
11901
|
-
const [currentPage, setCurrentPage] =
|
|
11902
|
-
const [itemsPerPage, setItemsPerPage] =
|
|
11903
|
-
const [isFilterModalOpen, setIsFilterModalOpen] =
|
|
11904
|
-
const combinedParams =
|
|
12418
|
+
const [currentPage, setCurrentPage] = useState24(1);
|
|
12419
|
+
const [itemsPerPage, setItemsPerPage] = useState24(defaultItemsPerPage);
|
|
12420
|
+
const [isFilterModalOpen, setIsFilterModalOpen] = useState24(false);
|
|
12421
|
+
const combinedParams = useMemo12(() => {
|
|
11905
12422
|
const params = {
|
|
11906
12423
|
page: currentPage,
|
|
11907
12424
|
limit: itemsPerPage
|
|
@@ -11928,26 +12445,26 @@ function TableProvider({
|
|
|
11928
12445
|
enableFilters,
|
|
11929
12446
|
enableTableSort
|
|
11930
12447
|
]);
|
|
11931
|
-
|
|
12448
|
+
useEffect24(() => {
|
|
11932
12449
|
onParamsChange?.(combinedParams);
|
|
11933
12450
|
}, [combinedParams]);
|
|
11934
|
-
const handleSearchChange =
|
|
12451
|
+
const handleSearchChange = useCallback6((value) => {
|
|
11935
12452
|
setSearchQuery(value);
|
|
11936
12453
|
setCurrentPage(1);
|
|
11937
12454
|
}, []);
|
|
11938
|
-
const handleFilterApply =
|
|
12455
|
+
const handleFilterApply = useCallback6(() => {
|
|
11939
12456
|
applyFilters();
|
|
11940
12457
|
setIsFilterModalOpen(false);
|
|
11941
12458
|
setCurrentPage(1);
|
|
11942
12459
|
}, [applyFilters]);
|
|
11943
|
-
const handlePageChange =
|
|
12460
|
+
const handlePageChange = useCallback6((page) => {
|
|
11944
12461
|
setCurrentPage(page);
|
|
11945
12462
|
}, []);
|
|
11946
|
-
const handleItemsPerPageChange =
|
|
12463
|
+
const handleItemsPerPageChange = useCallback6((items) => {
|
|
11947
12464
|
setItemsPerPage(items);
|
|
11948
12465
|
setCurrentPage(1);
|
|
11949
12466
|
}, []);
|
|
11950
|
-
const handleRowClickInternal =
|
|
12467
|
+
const handleRowClickInternal = useCallback6(
|
|
11951
12468
|
(row, index) => {
|
|
11952
12469
|
if (enableRowClick && onRowClick) {
|
|
11953
12470
|
onRowClick(row, index);
|
|
@@ -11955,7 +12472,7 @@ function TableProvider({
|
|
|
11955
12472
|
},
|
|
11956
12473
|
[enableRowClick, onRowClick]
|
|
11957
12474
|
);
|
|
11958
|
-
const useInternalPagination =
|
|
12475
|
+
const useInternalPagination = useMemo12(
|
|
11959
12476
|
() => enablePagination && !onParamsChange && totalItems === void 0 && totalPages === void 0,
|
|
11960
12477
|
[enablePagination, onParamsChange, totalItems, totalPages]
|
|
11961
12478
|
);
|
|
@@ -11963,7 +12480,7 @@ function TableProvider({
|
|
|
11963
12480
|
(totalItems ?? (useInternalPagination ? sortedData.length : data.length)) / itemsPerPage
|
|
11964
12481
|
);
|
|
11965
12482
|
const calculatedTotalItems = totalItems ?? (useInternalPagination ? sortedData.length : data.length);
|
|
11966
|
-
const displayData =
|
|
12483
|
+
const displayData = useMemo12(() => {
|
|
11967
12484
|
if (!useInternalPagination) {
|
|
11968
12485
|
return sortedData;
|
|
11969
12486
|
}
|
|
@@ -12131,8 +12648,8 @@ var TableProvider_default = TableProvider;
|
|
|
12131
12648
|
// src/components/Select/Select.tsx
|
|
12132
12649
|
import { create as create10, useStore as useStore4 } from "zustand";
|
|
12133
12650
|
import {
|
|
12134
|
-
useEffect as
|
|
12135
|
-
useRef as
|
|
12651
|
+
useEffect as useEffect25,
|
|
12652
|
+
useRef as useRef14,
|
|
12136
12653
|
forwardRef as forwardRef19,
|
|
12137
12654
|
isValidElement as isValidElement6,
|
|
12138
12655
|
Children as Children6,
|
|
@@ -12238,10 +12755,10 @@ var Select = ({
|
|
|
12238
12755
|
errorMessage,
|
|
12239
12756
|
id
|
|
12240
12757
|
}) => {
|
|
12241
|
-
const storeRef =
|
|
12758
|
+
const storeRef = useRef14(null);
|
|
12242
12759
|
storeRef.current ??= createSelectStore(onValueChange);
|
|
12243
12760
|
const store = storeRef.current;
|
|
12244
|
-
const selectRef =
|
|
12761
|
+
const selectRef = useRef14(null);
|
|
12245
12762
|
const { open, setOpen, setValue, selectedLabel } = useStore4(store, (s) => s);
|
|
12246
12763
|
const generatedId = useId10();
|
|
12247
12764
|
const selectId = id ?? `select-${generatedId}`;
|
|
@@ -12262,13 +12779,13 @@ var Select = ({
|
|
|
12262
12779
|
search(children2);
|
|
12263
12780
|
return found;
|
|
12264
12781
|
};
|
|
12265
|
-
|
|
12782
|
+
useEffect25(() => {
|
|
12266
12783
|
if (!selectedLabel && defaultValue) {
|
|
12267
12784
|
const label2 = findLabelForValue(children, defaultValue);
|
|
12268
12785
|
if (label2) store.setState({ selectedLabel: label2 });
|
|
12269
12786
|
}
|
|
12270
12787
|
}, [children, defaultValue, selectedLabel]);
|
|
12271
|
-
|
|
12788
|
+
useEffect25(() => {
|
|
12272
12789
|
const handleClickOutside = (event) => {
|
|
12273
12790
|
if (selectRef.current && !selectRef.current.contains(event.target)) {
|
|
12274
12791
|
setOpen(false);
|
|
@@ -12303,7 +12820,7 @@ var Select = ({
|
|
|
12303
12820
|
document.removeEventListener("keydown", handleArrowKeys);
|
|
12304
12821
|
};
|
|
12305
12822
|
}, [open]);
|
|
12306
|
-
|
|
12823
|
+
useEffect25(() => {
|
|
12307
12824
|
if (propValue) {
|
|
12308
12825
|
setValue(propValue);
|
|
12309
12826
|
const label2 = findLabelForValue(children, propValue);
|
|
@@ -12484,13 +13001,13 @@ var Select_default = Select;
|
|
|
12484
13001
|
// src/components/Menu/Menu.tsx
|
|
12485
13002
|
import { create as create11, useStore as useStore5 } from "zustand";
|
|
12486
13003
|
import {
|
|
12487
|
-
useEffect as
|
|
12488
|
-
useRef as
|
|
13004
|
+
useEffect as useEffect26,
|
|
13005
|
+
useRef as useRef15,
|
|
12489
13006
|
forwardRef as forwardRef20,
|
|
12490
13007
|
isValidElement as isValidElement7,
|
|
12491
13008
|
Children as Children7,
|
|
12492
13009
|
cloneElement as cloneElement7,
|
|
12493
|
-
useState as
|
|
13010
|
+
useState as useState25
|
|
12494
13011
|
} from "react";
|
|
12495
13012
|
import { CaretLeft as CaretLeft4, CaretRight as CaretRight7 } from "phosphor-react";
|
|
12496
13013
|
import { jsx as jsx61, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
@@ -12522,11 +13039,11 @@ var Menu = forwardRef20(
|
|
|
12522
13039
|
onValueChange,
|
|
12523
13040
|
...props
|
|
12524
13041
|
}, ref) => {
|
|
12525
|
-
const storeRef =
|
|
13042
|
+
const storeRef = useRef15(null);
|
|
12526
13043
|
storeRef.current ??= createMenuStore(onValueChange);
|
|
12527
13044
|
const store = storeRef.current;
|
|
12528
13045
|
const { setValue } = useStore5(store, (s) => s);
|
|
12529
|
-
|
|
13046
|
+
useEffect26(() => {
|
|
12530
13047
|
setValue(propValue ?? defaultValue);
|
|
12531
13048
|
}, [defaultValue, propValue, setValue]);
|
|
12532
13049
|
const baseClasses = variant === "menu-overflow" ? "w-fit py-2 flex flex-row items-center justify-center" : "w-full py-2 flex flex-row items-center justify-center";
|
|
@@ -12727,10 +13244,10 @@ var MenuOverflow = ({
|
|
|
12727
13244
|
onValueChange,
|
|
12728
13245
|
...props
|
|
12729
13246
|
}) => {
|
|
12730
|
-
const containerRef =
|
|
12731
|
-
const [showLeftArrow, setShowLeftArrow] =
|
|
12732
|
-
const [showRightArrow, setShowRightArrow] =
|
|
12733
|
-
|
|
13247
|
+
const containerRef = useRef15(null);
|
|
13248
|
+
const [showLeftArrow, setShowLeftArrow] = useState25(false);
|
|
13249
|
+
const [showRightArrow, setShowRightArrow] = useState25(false);
|
|
13250
|
+
useEffect26(() => {
|
|
12734
13251
|
const checkScroll = () => internalCheckScroll(
|
|
12735
13252
|
containerRef.current,
|
|
12736
13253
|
setShowLeftArrow,
|
|
@@ -13054,10 +13571,10 @@ var NotFound_default = NotFound;
|
|
|
13054
13571
|
|
|
13055
13572
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
13056
13573
|
import {
|
|
13057
|
-
useRef as
|
|
13058
|
-
useState as
|
|
13059
|
-
useEffect as
|
|
13060
|
-
useCallback as
|
|
13574
|
+
useRef as useRef16,
|
|
13575
|
+
useState as useState27,
|
|
13576
|
+
useEffect as useEffect27,
|
|
13577
|
+
useCallback as useCallback8
|
|
13061
13578
|
} from "react";
|
|
13062
13579
|
import { createPortal } from "react-dom";
|
|
13063
13580
|
import {
|
|
@@ -13072,7 +13589,7 @@ import {
|
|
|
13072
13589
|
} from "phosphor-react";
|
|
13073
13590
|
|
|
13074
13591
|
// src/components/DownloadButton/DownloadButton.tsx
|
|
13075
|
-
import { useCallback as
|
|
13592
|
+
import { useCallback as useCallback7, useState as useState26 } from "react";
|
|
13076
13593
|
import { DownloadSimple } from "phosphor-react";
|
|
13077
13594
|
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
13078
13595
|
var getMimeType = (url) => {
|
|
@@ -13149,13 +13666,13 @@ var DownloadButton = ({
|
|
|
13149
13666
|
lessonTitle = "aula",
|
|
13150
13667
|
disabled = false
|
|
13151
13668
|
}) => {
|
|
13152
|
-
const [isDownloading, setIsDownloading] =
|
|
13153
|
-
const isValidUrl =
|
|
13669
|
+
const [isDownloading, setIsDownloading] = useState26(false);
|
|
13670
|
+
const isValidUrl = useCallback7((url) => {
|
|
13154
13671
|
return Boolean(
|
|
13155
13672
|
url && url.trim() !== "" && url !== "undefined" && url !== "null"
|
|
13156
13673
|
);
|
|
13157
13674
|
}, []);
|
|
13158
|
-
const getAvailableContent =
|
|
13675
|
+
const getAvailableContent = useCallback7(() => {
|
|
13159
13676
|
const downloads = [];
|
|
13160
13677
|
if (isValidUrl(content.urlDoc)) {
|
|
13161
13678
|
downloads.push({
|
|
@@ -13190,7 +13707,7 @@ var DownloadButton = ({
|
|
|
13190
13707
|
}
|
|
13191
13708
|
return downloads;
|
|
13192
13709
|
}, [content, isValidUrl]);
|
|
13193
|
-
const handleDownload =
|
|
13710
|
+
const handleDownload = useCallback7(async () => {
|
|
13194
13711
|
if (disabled || isDownloading) return;
|
|
13195
13712
|
const availableContent = getAvailableContent();
|
|
13196
13713
|
if (availableContent.length === 0) {
|
|
@@ -13328,9 +13845,9 @@ var SpeedMenu = ({
|
|
|
13328
13845
|
iconSize = 24,
|
|
13329
13846
|
isTinyMobile = false
|
|
13330
13847
|
}) => {
|
|
13331
|
-
const buttonRef =
|
|
13332
|
-
const speedMenuContainerRef =
|
|
13333
|
-
const speedMenuRef =
|
|
13848
|
+
const buttonRef = useRef16(null);
|
|
13849
|
+
const speedMenuContainerRef = useRef16(null);
|
|
13850
|
+
const speedMenuRef = useRef16(null);
|
|
13334
13851
|
const getMenuPosition = () => {
|
|
13335
13852
|
if (!buttonRef.current) return { top: 0, left: 0 };
|
|
13336
13853
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
@@ -13344,7 +13861,7 @@ var SpeedMenu = ({
|
|
|
13344
13861
|
};
|
|
13345
13862
|
};
|
|
13346
13863
|
const position = getMenuPosition();
|
|
13347
|
-
|
|
13864
|
+
useEffect27(() => {
|
|
13348
13865
|
const handleClickOutside = (event) => {
|
|
13349
13866
|
const target = event.target;
|
|
13350
13867
|
const isOutsideContainer = speedMenuContainerRef.current && !speedMenuContainerRef.current.contains(target);
|
|
@@ -13423,28 +13940,28 @@ var VideoPlayer = ({
|
|
|
13423
13940
|
onDownloadComplete,
|
|
13424
13941
|
onDownloadError
|
|
13425
13942
|
}) => {
|
|
13426
|
-
const videoRef =
|
|
13943
|
+
const videoRef = useRef16(null);
|
|
13427
13944
|
const { isUltraSmallMobile, isTinyMobile } = useMobile();
|
|
13428
|
-
const [isPlaying, setIsPlaying] =
|
|
13429
|
-
const [currentTime, setCurrentTime] =
|
|
13430
|
-
const [duration, setDuration] =
|
|
13431
|
-
const [isMuted, setIsMuted] =
|
|
13432
|
-
const [volume, setVolume] =
|
|
13433
|
-
const [isFullscreen, setIsFullscreen] =
|
|
13434
|
-
const [showControls, setShowControls] =
|
|
13435
|
-
const [hasCompleted, setHasCompleted] =
|
|
13436
|
-
const [showCaptions, setShowCaptions] =
|
|
13437
|
-
const [subtitlesValidation, setSubtitlesValidation] =
|
|
13438
|
-
|
|
13945
|
+
const [isPlaying, setIsPlaying] = useState27(false);
|
|
13946
|
+
const [currentTime, setCurrentTime] = useState27(0);
|
|
13947
|
+
const [duration, setDuration] = useState27(0);
|
|
13948
|
+
const [isMuted, setIsMuted] = useState27(false);
|
|
13949
|
+
const [volume, setVolume] = useState27(1);
|
|
13950
|
+
const [isFullscreen, setIsFullscreen] = useState27(false);
|
|
13951
|
+
const [showControls, setShowControls] = useState27(true);
|
|
13952
|
+
const [hasCompleted, setHasCompleted] = useState27(false);
|
|
13953
|
+
const [showCaptions, setShowCaptions] = useState27(false);
|
|
13954
|
+
const [subtitlesValidation, setSubtitlesValidation] = useState27("idle");
|
|
13955
|
+
useEffect27(() => {
|
|
13439
13956
|
setHasCompleted(false);
|
|
13440
13957
|
}, [src]);
|
|
13441
|
-
const [playbackRate, setPlaybackRate] =
|
|
13442
|
-
const [showSpeedMenu, setShowSpeedMenu] =
|
|
13443
|
-
const lastSaveTimeRef =
|
|
13444
|
-
const trackRef =
|
|
13445
|
-
const controlsTimeoutRef =
|
|
13446
|
-
const lastMousePositionRef =
|
|
13447
|
-
const isUserInteracting =
|
|
13958
|
+
const [playbackRate, setPlaybackRate] = useState27(1);
|
|
13959
|
+
const [showSpeedMenu, setShowSpeedMenu] = useState27(false);
|
|
13960
|
+
const lastSaveTimeRef = useRef16(0);
|
|
13961
|
+
const trackRef = useRef16(null);
|
|
13962
|
+
const controlsTimeoutRef = useRef16(null);
|
|
13963
|
+
const lastMousePositionRef = useRef16({ x: 0, y: 0 });
|
|
13964
|
+
const isUserInteracting = useCallback8(() => {
|
|
13448
13965
|
if (showSpeedMenu) {
|
|
13449
13966
|
return true;
|
|
13450
13967
|
}
|
|
@@ -13461,13 +13978,13 @@ var VideoPlayer = ({
|
|
|
13461
13978
|
}
|
|
13462
13979
|
return false;
|
|
13463
13980
|
}, [showSpeedMenu]);
|
|
13464
|
-
const clearControlsTimeout =
|
|
13981
|
+
const clearControlsTimeout = useCallback8(() => {
|
|
13465
13982
|
if (controlsTimeoutRef.current) {
|
|
13466
13983
|
clearTimeout(controlsTimeoutRef.current);
|
|
13467
13984
|
controlsTimeoutRef.current = null;
|
|
13468
13985
|
}
|
|
13469
13986
|
}, []);
|
|
13470
|
-
const showControlsWithTimer =
|
|
13987
|
+
const showControlsWithTimer = useCallback8(() => {
|
|
13471
13988
|
setShowControls(true);
|
|
13472
13989
|
clearControlsTimeout();
|
|
13473
13990
|
if (isFullscreen) {
|
|
@@ -13482,7 +13999,7 @@ var VideoPlayer = ({
|
|
|
13482
13999
|
}, CONTROLS_HIDE_TIMEOUT);
|
|
13483
14000
|
}
|
|
13484
14001
|
}, [isFullscreen, isPlaying, clearControlsTimeout]);
|
|
13485
|
-
const handleMouseMove =
|
|
14002
|
+
const handleMouseMove = useCallback8(
|
|
13486
14003
|
(event) => {
|
|
13487
14004
|
const currentX = event.clientX;
|
|
13488
14005
|
const currentY = event.clientY;
|
|
@@ -13495,10 +14012,10 @@ var VideoPlayer = ({
|
|
|
13495
14012
|
},
|
|
13496
14013
|
[showControlsWithTimer]
|
|
13497
14014
|
);
|
|
13498
|
-
const handleMouseEnter =
|
|
14015
|
+
const handleMouseEnter = useCallback8(() => {
|
|
13499
14016
|
showControlsWithTimer();
|
|
13500
14017
|
}, [showControlsWithTimer]);
|
|
13501
|
-
const handleMouseLeave =
|
|
14018
|
+
const handleMouseLeave = useCallback8(() => {
|
|
13502
14019
|
const userInteracting = isUserInteracting();
|
|
13503
14020
|
clearControlsTimeout();
|
|
13504
14021
|
if (!isFullscreen && !userInteracting) {
|
|
@@ -13507,13 +14024,13 @@ var VideoPlayer = ({
|
|
|
13507
14024
|
}, LEAVE_HIDE_TIMEOUT);
|
|
13508
14025
|
}
|
|
13509
14026
|
}, [isFullscreen, clearControlsTimeout, isUserInteracting]);
|
|
13510
|
-
|
|
14027
|
+
useEffect27(() => {
|
|
13511
14028
|
if (videoRef.current) {
|
|
13512
14029
|
videoRef.current.volume = volume;
|
|
13513
14030
|
videoRef.current.muted = isMuted;
|
|
13514
14031
|
}
|
|
13515
14032
|
}, [volume, isMuted]);
|
|
13516
|
-
|
|
14033
|
+
useEffect27(() => {
|
|
13517
14034
|
const video = videoRef.current;
|
|
13518
14035
|
if (!video) return;
|
|
13519
14036
|
const onPlay = () => setIsPlaying(true);
|
|
@@ -13528,13 +14045,13 @@ var VideoPlayer = ({
|
|
|
13528
14045
|
video.removeEventListener("ended", onEnded);
|
|
13529
14046
|
};
|
|
13530
14047
|
}, []);
|
|
13531
|
-
|
|
14048
|
+
useEffect27(() => {
|
|
13532
14049
|
const video = videoRef.current;
|
|
13533
14050
|
if (!video) return;
|
|
13534
14051
|
video.setAttribute("playsinline", "");
|
|
13535
14052
|
video.setAttribute("webkit-playsinline", "");
|
|
13536
14053
|
}, []);
|
|
13537
|
-
|
|
14054
|
+
useEffect27(() => {
|
|
13538
14055
|
if (isPlaying) {
|
|
13539
14056
|
showControlsWithTimer();
|
|
13540
14057
|
} else {
|
|
@@ -13546,7 +14063,7 @@ var VideoPlayer = ({
|
|
|
13546
14063
|
}
|
|
13547
14064
|
}
|
|
13548
14065
|
}, [isPlaying, isFullscreen, showControlsWithTimer, clearControlsTimeout]);
|
|
13549
|
-
|
|
14066
|
+
useEffect27(() => {
|
|
13550
14067
|
const video = videoRef.current;
|
|
13551
14068
|
if (!video) return;
|
|
13552
14069
|
const handleFullscreenChange = () => {
|
|
@@ -13581,7 +14098,7 @@ var VideoPlayer = ({
|
|
|
13581
14098
|
);
|
|
13582
14099
|
};
|
|
13583
14100
|
}, [showControlsWithTimer]);
|
|
13584
|
-
|
|
14101
|
+
useEffect27(() => {
|
|
13585
14102
|
const init = () => {
|
|
13586
14103
|
if (!isFullscreen) {
|
|
13587
14104
|
showControlsWithTimer();
|
|
@@ -13603,7 +14120,7 @@ var VideoPlayer = ({
|
|
|
13603
14120
|
};
|
|
13604
14121
|
}
|
|
13605
14122
|
}, []);
|
|
13606
|
-
const getInitialTime =
|
|
14123
|
+
const getInitialTime = useCallback8(() => {
|
|
13607
14124
|
if (!autoSave || !storageKey) {
|
|
13608
14125
|
return Number.isFinite(initialTime) && initialTime >= 0 ? initialTime : void 0;
|
|
13609
14126
|
}
|
|
@@ -13616,14 +14133,14 @@ var VideoPlayer = ({
|
|
|
13616
14133
|
if (hasValidSaved) return saved;
|
|
13617
14134
|
return void 0;
|
|
13618
14135
|
}, [autoSave, storageKey, src, initialTime]);
|
|
13619
|
-
|
|
14136
|
+
useEffect27(() => {
|
|
13620
14137
|
const start = getInitialTime();
|
|
13621
14138
|
if (start !== void 0 && videoRef.current) {
|
|
13622
14139
|
videoRef.current.currentTime = start;
|
|
13623
14140
|
setCurrentTime(start);
|
|
13624
14141
|
}
|
|
13625
14142
|
}, [getInitialTime]);
|
|
13626
|
-
const saveProgress =
|
|
14143
|
+
const saveProgress = useCallback8(
|
|
13627
14144
|
(time) => {
|
|
13628
14145
|
if (!autoSave || !storageKey) return;
|
|
13629
14146
|
const now = Date.now();
|
|
@@ -13634,7 +14151,7 @@ var VideoPlayer = ({
|
|
|
13634
14151
|
},
|
|
13635
14152
|
[autoSave, storageKey, src]
|
|
13636
14153
|
);
|
|
13637
|
-
const togglePlayPause =
|
|
14154
|
+
const togglePlayPause = useCallback8(async () => {
|
|
13638
14155
|
const video = videoRef.current;
|
|
13639
14156
|
if (!video) return;
|
|
13640
14157
|
if (!video.paused) {
|
|
@@ -13646,7 +14163,7 @@ var VideoPlayer = ({
|
|
|
13646
14163
|
} catch {
|
|
13647
14164
|
}
|
|
13648
14165
|
}, []);
|
|
13649
|
-
const handleVolumeChange =
|
|
14166
|
+
const handleVolumeChange = useCallback8(
|
|
13650
14167
|
(newVolume) => {
|
|
13651
14168
|
const video = videoRef.current;
|
|
13652
14169
|
if (!video) return;
|
|
@@ -13665,7 +14182,7 @@ var VideoPlayer = ({
|
|
|
13665
14182
|
},
|
|
13666
14183
|
[isMuted]
|
|
13667
14184
|
);
|
|
13668
|
-
const toggleMute =
|
|
14185
|
+
const toggleMute = useCallback8(() => {
|
|
13669
14186
|
const video = videoRef.current;
|
|
13670
14187
|
if (!video) return;
|
|
13671
14188
|
if (isMuted) {
|
|
@@ -13679,20 +14196,20 @@ var VideoPlayer = ({
|
|
|
13679
14196
|
setIsMuted(true);
|
|
13680
14197
|
}
|
|
13681
14198
|
}, [isMuted, volume]);
|
|
13682
|
-
const handleSeek =
|
|
14199
|
+
const handleSeek = useCallback8((newTime) => {
|
|
13683
14200
|
const video = videoRef.current;
|
|
13684
14201
|
if (video) {
|
|
13685
14202
|
video.currentTime = newTime;
|
|
13686
14203
|
}
|
|
13687
14204
|
}, []);
|
|
13688
|
-
const isSafariIOS =
|
|
14205
|
+
const isSafariIOS = useCallback8(() => {
|
|
13689
14206
|
const ua = navigator.userAgent;
|
|
13690
14207
|
const isIOS = /iPad|iPhone|iPod/.test(ua);
|
|
13691
14208
|
const isWebKit = /WebKit/.test(ua);
|
|
13692
14209
|
const isNotChrome = !/CriOS|Chrome/.test(ua);
|
|
13693
14210
|
return isIOS && isWebKit && isNotChrome;
|
|
13694
14211
|
}, []);
|
|
13695
|
-
const toggleFullscreen =
|
|
14212
|
+
const toggleFullscreen = useCallback8(() => {
|
|
13696
14213
|
const video = videoRef.current;
|
|
13697
14214
|
const container = video?.parentElement;
|
|
13698
14215
|
if (!video || !container) return;
|
|
@@ -13709,24 +14226,24 @@ var VideoPlayer = ({
|
|
|
13709
14226
|
document.exitFullscreen();
|
|
13710
14227
|
}
|
|
13711
14228
|
}, [isFullscreen, isSafariIOS]);
|
|
13712
|
-
const handleSpeedChange =
|
|
14229
|
+
const handleSpeedChange = useCallback8((speed) => {
|
|
13713
14230
|
if (videoRef.current) {
|
|
13714
14231
|
videoRef.current.playbackRate = speed;
|
|
13715
14232
|
setPlaybackRate(speed);
|
|
13716
14233
|
setShowSpeedMenu(false);
|
|
13717
14234
|
}
|
|
13718
14235
|
}, []);
|
|
13719
|
-
const toggleSpeedMenu =
|
|
14236
|
+
const toggleSpeedMenu = useCallback8(() => {
|
|
13720
14237
|
setShowSpeedMenu(!showSpeedMenu);
|
|
13721
14238
|
}, [showSpeedMenu]);
|
|
13722
|
-
const toggleCaptions =
|
|
14239
|
+
const toggleCaptions = useCallback8(() => {
|
|
13723
14240
|
if (!trackRef.current?.track || !subtitles || subtitlesValidation !== "valid")
|
|
13724
14241
|
return;
|
|
13725
14242
|
const newShowCaptions = !showCaptions;
|
|
13726
14243
|
setShowCaptions(newShowCaptions);
|
|
13727
14244
|
trackRef.current.track.mode = newShowCaptions ? "showing" : "hidden";
|
|
13728
14245
|
}, [showCaptions, subtitles, subtitlesValidation]);
|
|
13729
|
-
const checkVideoCompletion =
|
|
14246
|
+
const checkVideoCompletion = useCallback8(
|
|
13730
14247
|
(progressPercent) => {
|
|
13731
14248
|
if (progressPercent >= 95 && !hasCompleted) {
|
|
13732
14249
|
setHasCompleted(true);
|
|
@@ -13735,7 +14252,7 @@ var VideoPlayer = ({
|
|
|
13735
14252
|
},
|
|
13736
14253
|
[hasCompleted, onVideoComplete]
|
|
13737
14254
|
);
|
|
13738
|
-
const handleTimeUpdate =
|
|
14255
|
+
const handleTimeUpdate = useCallback8(() => {
|
|
13739
14256
|
const video = videoRef.current;
|
|
13740
14257
|
if (!video) return;
|
|
13741
14258
|
const current = video.currentTime;
|
|
@@ -13748,12 +14265,12 @@ var VideoPlayer = ({
|
|
|
13748
14265
|
checkVideoCompletion(progressPercent);
|
|
13749
14266
|
}
|
|
13750
14267
|
}, [duration, saveProgress, onTimeUpdate, onProgress, checkVideoCompletion]);
|
|
13751
|
-
const handleLoadedMetadata =
|
|
14268
|
+
const handleLoadedMetadata = useCallback8(() => {
|
|
13752
14269
|
if (videoRef.current) {
|
|
13753
14270
|
setDuration(videoRef.current.duration);
|
|
13754
14271
|
}
|
|
13755
14272
|
}, []);
|
|
13756
|
-
|
|
14273
|
+
useEffect27(() => {
|
|
13757
14274
|
const controller = new AbortController();
|
|
13758
14275
|
const validateSubtitles = async () => {
|
|
13759
14276
|
if (!subtitles) {
|
|
@@ -13800,12 +14317,12 @@ var VideoPlayer = ({
|
|
|
13800
14317
|
controller.abort();
|
|
13801
14318
|
};
|
|
13802
14319
|
}, [subtitles]);
|
|
13803
|
-
|
|
14320
|
+
useEffect27(() => {
|
|
13804
14321
|
if (trackRef.current?.track) {
|
|
13805
14322
|
trackRef.current.track.mode = showCaptions && subtitles && subtitlesValidation === "valid" ? "showing" : "hidden";
|
|
13806
14323
|
}
|
|
13807
14324
|
}, [subtitles, showCaptions, subtitlesValidation]);
|
|
13808
|
-
|
|
14325
|
+
useEffect27(() => {
|
|
13809
14326
|
const handleVisibilityChange = () => {
|
|
13810
14327
|
if (document.hidden && isPlaying && videoRef.current) {
|
|
13811
14328
|
videoRef.current.pause();
|
|
@@ -13827,54 +14344,54 @@ var VideoPlayer = ({
|
|
|
13827
14344
|
};
|
|
13828
14345
|
}, [isPlaying, clearControlsTimeout]);
|
|
13829
14346
|
const progressPercentage = duration > 0 ? currentTime / duration * 100 : 0;
|
|
13830
|
-
const getIconSize2 =
|
|
14347
|
+
const getIconSize2 = useCallback8(() => {
|
|
13831
14348
|
if (isTinyMobile) return 18;
|
|
13832
14349
|
if (isUltraSmallMobile) return 20;
|
|
13833
14350
|
return 24;
|
|
13834
14351
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
13835
|
-
const getControlsPadding =
|
|
14352
|
+
const getControlsPadding = useCallback8(() => {
|
|
13836
14353
|
if (isTinyMobile) return "px-2 pb-2 pt-1";
|
|
13837
14354
|
if (isUltraSmallMobile) return "px-3 pb-3 pt-1";
|
|
13838
14355
|
return "px-4 pb-4";
|
|
13839
14356
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
13840
|
-
const getControlsGap =
|
|
14357
|
+
const getControlsGap = useCallback8(() => {
|
|
13841
14358
|
if (isTinyMobile) return "gap-1";
|
|
13842
14359
|
if (isUltraSmallMobile) return "gap-2";
|
|
13843
14360
|
return "gap-4";
|
|
13844
14361
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
13845
|
-
const getProgressBarPadding =
|
|
14362
|
+
const getProgressBarPadding = useCallback8(() => {
|
|
13846
14363
|
if (isTinyMobile) return "px-2 pb-1";
|
|
13847
14364
|
if (isUltraSmallMobile) return "px-3 pb-1";
|
|
13848
14365
|
return "px-4 pb-2";
|
|
13849
14366
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
13850
|
-
const getCenterPlayButtonPosition =
|
|
14367
|
+
const getCenterPlayButtonPosition = useCallback8(() => {
|
|
13851
14368
|
if (isTinyMobile) return "items-center justify-center -translate-y-12";
|
|
13852
14369
|
if (isUltraSmallMobile) return "items-center justify-center -translate-y-8";
|
|
13853
14370
|
return "items-center justify-center";
|
|
13854
14371
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
13855
|
-
const getTopControlsOpacity =
|
|
14372
|
+
const getTopControlsOpacity = useCallback8(() => {
|
|
13856
14373
|
return showControls ? "opacity-100" : "opacity-0";
|
|
13857
14374
|
}, [showControls]);
|
|
13858
|
-
const getBottomControlsOpacity =
|
|
14375
|
+
const getBottomControlsOpacity = useCallback8(() => {
|
|
13859
14376
|
return showControls ? "opacity-100" : "opacity-0";
|
|
13860
14377
|
}, [showControls]);
|
|
13861
|
-
const seekBackward =
|
|
14378
|
+
const seekBackward = useCallback8(() => {
|
|
13862
14379
|
if (videoRef.current) {
|
|
13863
14380
|
videoRef.current.currentTime -= 10;
|
|
13864
14381
|
}
|
|
13865
14382
|
}, []);
|
|
13866
|
-
const seekForward =
|
|
14383
|
+
const seekForward = useCallback8(() => {
|
|
13867
14384
|
if (videoRef.current) {
|
|
13868
14385
|
videoRef.current.currentTime += 10;
|
|
13869
14386
|
}
|
|
13870
14387
|
}, []);
|
|
13871
|
-
const increaseVolume =
|
|
14388
|
+
const increaseVolume = useCallback8(() => {
|
|
13872
14389
|
handleVolumeChange(Math.min(100, volume * 100 + 10));
|
|
13873
14390
|
}, [handleVolumeChange, volume]);
|
|
13874
|
-
const decreaseVolume =
|
|
14391
|
+
const decreaseVolume = useCallback8(() => {
|
|
13875
14392
|
handleVolumeChange(Math.max(0, volume * 100 - 10));
|
|
13876
14393
|
}, [handleVolumeChange, volume]);
|
|
13877
|
-
const handleVideoKeyDown =
|
|
14394
|
+
const handleVideoKeyDown = useCallback8(
|
|
13878
14395
|
(e) => {
|
|
13879
14396
|
if (!e.key) return;
|
|
13880
14397
|
e.stopPropagation();
|
|
@@ -14117,7 +14634,7 @@ var VideoPlayer = ({
|
|
|
14117
14634
|
var VideoPlayer_default = VideoPlayer;
|
|
14118
14635
|
|
|
14119
14636
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
14120
|
-
import { useCallback as
|
|
14637
|
+
import { useCallback as useCallback9, useState as useState28 } from "react";
|
|
14121
14638
|
import { ArrowsOut } from "phosphor-react";
|
|
14122
14639
|
import { Fragment as Fragment13, jsx as jsx66, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
14123
14640
|
var IMAGE_WIDTH = 225;
|
|
@@ -14130,8 +14647,8 @@ var Whiteboard = ({
|
|
|
14130
14647
|
imagesPerRow = 2,
|
|
14131
14648
|
...rest
|
|
14132
14649
|
}) => {
|
|
14133
|
-
const [imageErrors, setImageErrors] =
|
|
14134
|
-
const handleDownload =
|
|
14650
|
+
const [imageErrors, setImageErrors] = useState28(/* @__PURE__ */ new Set());
|
|
14651
|
+
const handleDownload = useCallback9(
|
|
14135
14652
|
(image) => {
|
|
14136
14653
|
if (onDownload) {
|
|
14137
14654
|
onDownload(image);
|
|
@@ -14148,7 +14665,7 @@ var Whiteboard = ({
|
|
|
14148
14665
|
},
|
|
14149
14666
|
[onDownload]
|
|
14150
14667
|
);
|
|
14151
|
-
const handleImageError =
|
|
14668
|
+
const handleImageError = useCallback9((imageId) => {
|
|
14152
14669
|
setImageErrors((prev) => new Set(prev).add(imageId));
|
|
14153
14670
|
}, []);
|
|
14154
14671
|
const gridColsClass = images?.length === 1 ? "grid-cols-1" : {
|
|
@@ -14238,10 +14755,10 @@ var Whiteboard_default = Whiteboard;
|
|
|
14238
14755
|
import {
|
|
14239
14756
|
createContext,
|
|
14240
14757
|
useContext,
|
|
14241
|
-
useEffect as
|
|
14242
|
-
useState as
|
|
14243
|
-
useCallback as
|
|
14244
|
-
useMemo as
|
|
14758
|
+
useEffect as useEffect28,
|
|
14759
|
+
useState as useState29,
|
|
14760
|
+
useCallback as useCallback10,
|
|
14761
|
+
useMemo as useMemo13
|
|
14245
14762
|
} from "react";
|
|
14246
14763
|
import { useLocation, Navigate } from "react-router-dom";
|
|
14247
14764
|
import { Fragment as Fragment14, jsx as jsx67 } from "react/jsx-runtime";
|
|
@@ -14255,12 +14772,12 @@ var AuthProvider = ({
|
|
|
14255
14772
|
getSessionFn,
|
|
14256
14773
|
getTokensFn
|
|
14257
14774
|
}) => {
|
|
14258
|
-
const [authState, setAuthState] =
|
|
14775
|
+
const [authState, setAuthState] = useState29({
|
|
14259
14776
|
isAuthenticated: false,
|
|
14260
14777
|
isLoading: true,
|
|
14261
14778
|
...initialAuthState
|
|
14262
14779
|
});
|
|
14263
|
-
const checkAuth =
|
|
14780
|
+
const checkAuth = useCallback10(async () => {
|
|
14264
14781
|
try {
|
|
14265
14782
|
setAuthState((prev) => ({ ...prev, isLoading: true }));
|
|
14266
14783
|
if (!checkAuthFn) {
|
|
@@ -14291,7 +14808,7 @@ var AuthProvider = ({
|
|
|
14291
14808
|
return false;
|
|
14292
14809
|
}
|
|
14293
14810
|
}, [checkAuthFn, getUserFn, getSessionFn, getTokensFn]);
|
|
14294
|
-
const signOut =
|
|
14811
|
+
const signOut = useCallback10(() => {
|
|
14295
14812
|
if (signOutFn) {
|
|
14296
14813
|
signOutFn();
|
|
14297
14814
|
}
|
|
@@ -14303,10 +14820,10 @@ var AuthProvider = ({
|
|
|
14303
14820
|
tokens: void 0
|
|
14304
14821
|
}));
|
|
14305
14822
|
}, [signOutFn]);
|
|
14306
|
-
|
|
14823
|
+
useEffect28(() => {
|
|
14307
14824
|
checkAuth();
|
|
14308
14825
|
}, [checkAuth]);
|
|
14309
|
-
const contextValue =
|
|
14826
|
+
const contextValue = useMemo13(
|
|
14310
14827
|
() => ({
|
|
14311
14828
|
...authState,
|
|
14312
14829
|
checkAuth,
|
|
@@ -14457,7 +14974,7 @@ function createZustandAuthAdapter(useAuthStore2) {
|
|
|
14457
14974
|
}
|
|
14458
14975
|
|
|
14459
14976
|
// src/components/Auth/useUrlAuthentication.ts
|
|
14460
|
-
import { useEffect as
|
|
14977
|
+
import { useEffect as useEffect29, useRef as useRef17 } from "react";
|
|
14461
14978
|
import { useLocation as useLocation2 } from "react-router-dom";
|
|
14462
14979
|
var getAuthParams = (location, extractParams) => {
|
|
14463
14980
|
const searchParams = new URLSearchParams(location.search);
|
|
@@ -14505,8 +15022,8 @@ var handleUserData = (responseData, setUser) => {
|
|
|
14505
15022
|
};
|
|
14506
15023
|
function useUrlAuthentication(options) {
|
|
14507
15024
|
const location = useLocation2();
|
|
14508
|
-
const processedRef =
|
|
14509
|
-
|
|
15025
|
+
const processedRef = useRef17(false);
|
|
15026
|
+
useEffect29(() => {
|
|
14510
15027
|
const handleAuthentication = async () => {
|
|
14511
15028
|
if (processedRef.current) {
|
|
14512
15029
|
return;
|
|
@@ -14577,9 +15094,9 @@ function useUrlAuthentication(options) {
|
|
|
14577
15094
|
}
|
|
14578
15095
|
|
|
14579
15096
|
// src/components/Auth/useApiConfig.ts
|
|
14580
|
-
import { useMemo as
|
|
15097
|
+
import { useMemo as useMemo14 } from "react";
|
|
14581
15098
|
function useApiConfig(api) {
|
|
14582
|
-
return
|
|
15099
|
+
return useMemo14(
|
|
14583
15100
|
() => ({
|
|
14584
15101
|
get: (endpoint, config) => api.get(endpoint, config)
|
|
14585
15102
|
}),
|
|
@@ -14597,23 +15114,23 @@ import {
|
|
|
14597
15114
|
} from "phosphor-react";
|
|
14598
15115
|
import {
|
|
14599
15116
|
forwardRef as forwardRef22,
|
|
14600
|
-
useEffect as
|
|
14601
|
-
useState as
|
|
15117
|
+
useEffect as useEffect32,
|
|
15118
|
+
useState as useState32
|
|
14602
15119
|
} from "react";
|
|
14603
15120
|
|
|
14604
15121
|
// src/components/Quiz/QuizContent.tsx
|
|
14605
15122
|
import {
|
|
14606
15123
|
forwardRef as forwardRef21,
|
|
14607
|
-
useCallback as
|
|
14608
|
-
useEffect as
|
|
15124
|
+
useCallback as useCallback11,
|
|
15125
|
+
useEffect as useEffect31,
|
|
14609
15126
|
useId as useId11,
|
|
14610
|
-
useMemo as
|
|
14611
|
-
useRef as
|
|
14612
|
-
useState as
|
|
15127
|
+
useMemo as useMemo15,
|
|
15128
|
+
useRef as useRef18,
|
|
15129
|
+
useState as useState31
|
|
14613
15130
|
} from "react";
|
|
14614
15131
|
|
|
14615
15132
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
14616
|
-
import { useEffect as
|
|
15133
|
+
import { useEffect as useEffect30, useState as useState30 } from "react";
|
|
14617
15134
|
import { CheckCircle as CheckCircle5, XCircle as XCircle4, Check as Check5 } from "phosphor-react";
|
|
14618
15135
|
import { jsx as jsx68, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
14619
15136
|
var MultipleChoiceList = ({
|
|
@@ -14625,8 +15142,8 @@ var MultipleChoiceList = ({
|
|
|
14625
15142
|
onHandleSelectedValues,
|
|
14626
15143
|
mode = "interactive"
|
|
14627
15144
|
}) => {
|
|
14628
|
-
const [actualValue, setActualValue] =
|
|
14629
|
-
|
|
15145
|
+
const [actualValue, setActualValue] = useState30(selectedValues);
|
|
15146
|
+
useEffect30(() => {
|
|
14630
15147
|
setActualValue(selectedValues);
|
|
14631
15148
|
}, [selectedValues]);
|
|
14632
15149
|
const getStatusBadge2 = (status) => {
|
|
@@ -14865,15 +15382,15 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
14865
15382
|
const currentQuestionResult = getQuestionResultByQuestionId(
|
|
14866
15383
|
currentQuestion?.id || ""
|
|
14867
15384
|
);
|
|
14868
|
-
const prevSelectedValuesRef =
|
|
14869
|
-
const prevQuestionIdRef =
|
|
14870
|
-
const allCurrentAnswerIds =
|
|
15385
|
+
const prevSelectedValuesRef = useRef18([]);
|
|
15386
|
+
const prevQuestionIdRef = useRef18("");
|
|
15387
|
+
const allCurrentAnswerIds = useMemo15(() => {
|
|
14871
15388
|
return allCurrentAnswers?.map((answer) => answer.optionId) || [];
|
|
14872
15389
|
}, [allCurrentAnswers]);
|
|
14873
|
-
const selectedValues =
|
|
15390
|
+
const selectedValues = useMemo15(() => {
|
|
14874
15391
|
return allCurrentAnswerIds?.filter((id) => id !== null) || [];
|
|
14875
15392
|
}, [allCurrentAnswerIds]);
|
|
14876
|
-
const stableSelectedValues =
|
|
15393
|
+
const stableSelectedValues = useMemo15(() => {
|
|
14877
15394
|
const currentQuestionId = currentQuestion?.id || "";
|
|
14878
15395
|
const hasQuestionChanged = prevQuestionIdRef.current !== currentQuestionId;
|
|
14879
15396
|
if (hasQuestionChanged) {
|
|
@@ -14897,7 +15414,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
14897
15414
|
variant,
|
|
14898
15415
|
currentQuestionResult?.selectedOptions
|
|
14899
15416
|
]);
|
|
14900
|
-
const handleSelectedValues =
|
|
15417
|
+
const handleSelectedValues = useCallback11(
|
|
14901
15418
|
(values) => {
|
|
14902
15419
|
if (currentQuestion) {
|
|
14903
15420
|
selectMultipleAnswer(currentQuestion.id, values);
|
|
@@ -14905,7 +15422,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
14905
15422
|
},
|
|
14906
15423
|
[currentQuestion, selectMultipleAnswer]
|
|
14907
15424
|
);
|
|
14908
|
-
const questionKey =
|
|
15425
|
+
const questionKey = useMemo15(
|
|
14909
15426
|
() => `question-${currentQuestion?.id || "1"}`,
|
|
14910
15427
|
[currentQuestion?.id]
|
|
14911
15428
|
);
|
|
@@ -14966,14 +15483,14 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
14966
15483
|
currentQuestion?.id || ""
|
|
14967
15484
|
);
|
|
14968
15485
|
const currentAnswer = getCurrentAnswer();
|
|
14969
|
-
const textareaRef =
|
|
15486
|
+
const textareaRef = useRef18(null);
|
|
14970
15487
|
const charLimit = getDissertativeCharLimit();
|
|
14971
15488
|
const handleAnswerChange = (value) => {
|
|
14972
15489
|
if (currentQuestion) {
|
|
14973
15490
|
selectDissertativeAnswer(currentQuestion.id, value);
|
|
14974
15491
|
}
|
|
14975
15492
|
};
|
|
14976
|
-
const adjustTextareaHeight =
|
|
15493
|
+
const adjustTextareaHeight = useCallback11(() => {
|
|
14977
15494
|
if (textareaRef.current) {
|
|
14978
15495
|
textareaRef.current.style.height = "auto";
|
|
14979
15496
|
const scrollHeight = textareaRef.current.scrollHeight;
|
|
@@ -14983,7 +15500,7 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
14983
15500
|
textareaRef.current.style.height = `${newHeight}px`;
|
|
14984
15501
|
}
|
|
14985
15502
|
}, []);
|
|
14986
|
-
|
|
15503
|
+
useEffect31(() => {
|
|
14987
15504
|
adjustTextareaHeight();
|
|
14988
15505
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
14989
15506
|
if (!currentQuestion) {
|
|
@@ -15124,7 +15641,7 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
15124
15641
|
isCorrect: false
|
|
15125
15642
|
}
|
|
15126
15643
|
];
|
|
15127
|
-
const [userAnswers, setUserAnswers] =
|
|
15644
|
+
const [userAnswers, setUserAnswers] = useState31(() => {
|
|
15128
15645
|
if (variant === "result") {
|
|
15129
15646
|
return mockUserAnswers;
|
|
15130
15647
|
}
|
|
@@ -15243,7 +15760,7 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
15243
15760
|
isCorrect: true
|
|
15244
15761
|
}
|
|
15245
15762
|
];
|
|
15246
|
-
const [answers, setAnswers] =
|
|
15763
|
+
const [answers, setAnswers] = useState31({});
|
|
15247
15764
|
const baseId = useId11();
|
|
15248
15765
|
const getAvailableOptionsForSelect = (selectId) => {
|
|
15249
15766
|
const usedOptions = new Set(
|
|
@@ -15383,7 +15900,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
15383
15900
|
};
|
|
15384
15901
|
const correctRadiusRelative = calculateCorrectRadiusRelative();
|
|
15385
15902
|
const mockUserAnswerRelative = { x: 0.72, y: 0.348 };
|
|
15386
|
-
const [clickPositionRelative, setClickPositionRelative] =
|
|
15903
|
+
const [clickPositionRelative, setClickPositionRelative] = useState31(variant == "result" ? mockUserAnswerRelative : null);
|
|
15387
15904
|
const convertToRelativeCoordinates = (x, y, rect) => {
|
|
15388
15905
|
const safeWidth = Math.max(rect.width, 1e-3);
|
|
15389
15906
|
const safeHeight = Math.max(rect.height, 1e-3);
|
|
@@ -15551,7 +16068,7 @@ var getFinishConfirmationText = (type) => {
|
|
|
15551
16068
|
};
|
|
15552
16069
|
var Quiz = forwardRef22(({ children, className, variant = "default", ...props }, ref) => {
|
|
15553
16070
|
const { setVariant } = useQuizStore();
|
|
15554
|
-
|
|
16071
|
+
useEffect32(() => {
|
|
15555
16072
|
setVariant(variant);
|
|
15556
16073
|
}, [variant, setVariant]);
|
|
15557
16074
|
return /* @__PURE__ */ jsx70("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
@@ -15566,7 +16083,7 @@ var QuizTitle = forwardRef22(({ className, onBack, ...props }, ref) => {
|
|
|
15566
16083
|
formatTime: formatTime2,
|
|
15567
16084
|
isStarted
|
|
15568
16085
|
} = useQuizStore();
|
|
15569
|
-
const [showExitConfirmation, setShowExitConfirmation] =
|
|
16086
|
+
const [showExitConfirmation, setShowExitConfirmation] = useState32(false);
|
|
15570
16087
|
const totalQuestions = getTotalQuestions();
|
|
15571
16088
|
const quizTitle = getQuizTitle();
|
|
15572
16089
|
const handleBackClick = () => {
|
|
@@ -15769,8 +16286,8 @@ var QuizFooter = forwardRef22(
|
|
|
15769
16286
|
const currentAnswer = getCurrentAnswer();
|
|
15770
16287
|
const currentQuestion = getCurrentQuestion();
|
|
15771
16288
|
const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
|
|
15772
|
-
const [activeModal, setActiveModal] =
|
|
15773
|
-
const [filterType, setFilterType] =
|
|
16289
|
+
const [activeModal, setActiveModal] = useState32(null);
|
|
16290
|
+
const [filterType, setFilterType] = useState32("all");
|
|
15774
16291
|
const openModal = (modalName) => setActiveModal(modalName);
|
|
15775
16292
|
const closeModal = () => setActiveModal(null);
|
|
15776
16293
|
const isModalOpen = (modalName) => activeModal === modalName;
|
|
@@ -16112,7 +16629,7 @@ var QuizFooter = forwardRef22(
|
|
|
16112
16629
|
);
|
|
16113
16630
|
|
|
16114
16631
|
// src/components/Quiz/QuizResult.tsx
|
|
16115
|
-
import { forwardRef as forwardRef23, useEffect as
|
|
16632
|
+
import { forwardRef as forwardRef23, useEffect as useEffect33, useState as useState33 } from "react";
|
|
16116
16633
|
import { Clock as Clock3 } from "phosphor-react";
|
|
16117
16634
|
import { jsx as jsx71, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
16118
16635
|
var QuizBadge = ({
|
|
@@ -16141,8 +16658,8 @@ var QuizHeaderResult = forwardRef23(
|
|
|
16141
16658
|
getCurrentQuestion,
|
|
16142
16659
|
questionsResult
|
|
16143
16660
|
} = useQuizStore();
|
|
16144
|
-
const [status, setStatus] =
|
|
16145
|
-
|
|
16661
|
+
const [status, setStatus] = useState33(void 0);
|
|
16662
|
+
useEffect33(() => {
|
|
16146
16663
|
const cq = getCurrentQuestion();
|
|
16147
16664
|
if (!cq) {
|
|
16148
16665
|
setStatus(void 0);
|
|
@@ -16515,7 +17032,7 @@ var BreadcrumbMenu = ({
|
|
|
16515
17032
|
};
|
|
16516
17033
|
|
|
16517
17034
|
// src/components/BreadcrumbMenu/useBreadcrumbBuilder.ts
|
|
16518
|
-
import { useEffect as
|
|
17035
|
+
import { useEffect as useEffect34 } from "react";
|
|
16519
17036
|
|
|
16520
17037
|
// src/components/BreadcrumbMenu/breadcrumbStore.ts
|
|
16521
17038
|
import { create as create12 } from "zustand";
|
|
@@ -16644,7 +17161,7 @@ var useBreadcrumbBuilder = (config) => {
|
|
|
16644
17161
|
(level) => isBreadcrumbWithData(level) ? level.data : null
|
|
16645
17162
|
);
|
|
16646
17163
|
const levelUrlIds = levels.map((level) => level.urlId);
|
|
16647
|
-
|
|
17164
|
+
useEffect34(() => {
|
|
16648
17165
|
const newBreadcrumbs = [root];
|
|
16649
17166
|
const previousIds = [];
|
|
16650
17167
|
for (const level of levels) {
|
|
@@ -16676,11 +17193,11 @@ var useBreadcrumbBuilder = (config) => {
|
|
|
16676
17193
|
};
|
|
16677
17194
|
|
|
16678
17195
|
// src/components/BreadcrumbMenu/useUrlParams.ts
|
|
16679
|
-
import { useMemo as
|
|
17196
|
+
import { useMemo as useMemo16 } from "react";
|
|
16680
17197
|
import { useLocation as useLocation3 } from "react-router-dom";
|
|
16681
17198
|
var useUrlParams = (config) => {
|
|
16682
17199
|
const location = useLocation3();
|
|
16683
|
-
return
|
|
17200
|
+
return useMemo16(() => {
|
|
16684
17201
|
const segments = location.pathname.split("/").filter(Boolean);
|
|
16685
17202
|
const params = {};
|
|
16686
17203
|
for (const [key, index] of Object.entries(config)) {
|
|
@@ -16691,15 +17208,15 @@ var useUrlParams = (config) => {
|
|
|
16691
17208
|
};
|
|
16692
17209
|
|
|
16693
17210
|
// src/hooks/useAppInitialization.ts
|
|
16694
|
-
import { useMemo as
|
|
17211
|
+
import { useMemo as useMemo17 } from "react";
|
|
16695
17212
|
|
|
16696
17213
|
// src/hooks/useInstitution.ts
|
|
16697
|
-
import { useEffect as
|
|
17214
|
+
import { useEffect as useEffect35, useState as useState34 } from "react";
|
|
16698
17215
|
function useInstitutionId() {
|
|
16699
|
-
const [institutionId, setInstitutionId] =
|
|
17216
|
+
const [institutionId, setInstitutionId] = useState34(() => {
|
|
16700
17217
|
return document.querySelector('meta[name="institution-id"]')?.getAttribute("content") ?? null;
|
|
16701
17218
|
});
|
|
16702
|
-
|
|
17219
|
+
useEffect35(() => {
|
|
16703
17220
|
const metaTag = document.querySelector('meta[name="institution-id"]');
|
|
16704
17221
|
if (!metaTag) return;
|
|
16705
17222
|
const observer = new MutationObserver(() => {
|
|
@@ -16866,7 +17383,7 @@ var useAuthStore = create14()(
|
|
|
16866
17383
|
function useAppInitialization() {
|
|
16867
17384
|
const getInstitutionId = useInstitutionId();
|
|
16868
17385
|
const { initialize, initialized, institutionId } = useAppStore();
|
|
16869
|
-
const authFunctions =
|
|
17386
|
+
const authFunctions = useMemo17(
|
|
16870
17387
|
() => ({
|
|
16871
17388
|
checkAuth: async () => {
|
|
16872
17389
|
const { sessionInfo, tokens } = useAuthStore.getState();
|
|
@@ -16903,7 +17420,7 @@ function useAppInitialization() {
|
|
|
16903
17420
|
}
|
|
16904
17421
|
|
|
16905
17422
|
// src/hooks/useAppContent.ts
|
|
16906
|
-
import { useCallback as
|
|
17423
|
+
import { useCallback as useCallback12, useEffect as useEffect36, useMemo as useMemo18 } from "react";
|
|
16907
17424
|
import { useNavigate as useNavigate2 } from "react-router-dom";
|
|
16908
17425
|
function useAppContent(config) {
|
|
16909
17426
|
const navigate = useNavigate2();
|
|
@@ -16929,20 +17446,20 @@ function useAppContent(config) {
|
|
|
16929
17446
|
navigate("/painel");
|
|
16930
17447
|
}
|
|
16931
17448
|
};
|
|
16932
|
-
const handleSetSelectedProfile =
|
|
17449
|
+
const handleSetSelectedProfile = useCallback12(
|
|
16933
17450
|
(profile) => {
|
|
16934
17451
|
setSelectedProfile(profile);
|
|
16935
17452
|
},
|
|
16936
17453
|
[setSelectedProfile]
|
|
16937
17454
|
);
|
|
16938
|
-
const handleClearParamsFromURL =
|
|
17455
|
+
const handleClearParamsFromURL = useCallback12(() => {
|
|
16939
17456
|
if (onClearParamsFromURL) {
|
|
16940
17457
|
onClearParamsFromURL();
|
|
16941
17458
|
} else {
|
|
16942
17459
|
globalThis.location.replace("/painel");
|
|
16943
17460
|
}
|
|
16944
17461
|
}, [onClearParamsFromURL]);
|
|
16945
|
-
const handleError =
|
|
17462
|
+
const handleError = useCallback12(
|
|
16946
17463
|
(error) => {
|
|
16947
17464
|
if (onError) {
|
|
16948
17465
|
onError(error);
|
|
@@ -16953,7 +17470,7 @@ function useAppContent(config) {
|
|
|
16953
17470
|
},
|
|
16954
17471
|
[navigate, onError]
|
|
16955
17472
|
);
|
|
16956
|
-
const urlAuthConfig =
|
|
17473
|
+
const urlAuthConfig = useMemo18(
|
|
16957
17474
|
() => ({
|
|
16958
17475
|
setTokens,
|
|
16959
17476
|
setSessionInfo,
|
|
@@ -16979,10 +17496,10 @@ function useAppContent(config) {
|
|
|
16979
17496
|
);
|
|
16980
17497
|
useUrlAuthentication(urlAuthConfig);
|
|
16981
17498
|
const { sessionInfo } = useAuth();
|
|
16982
|
-
const institutionIdToUse =
|
|
17499
|
+
const institutionIdToUse = useMemo18(() => {
|
|
16983
17500
|
return sessionInfo?.institutionId || getInstitutionId;
|
|
16984
17501
|
}, [sessionInfo?.institutionId, getInstitutionId]);
|
|
16985
|
-
|
|
17502
|
+
useEffect36(() => {
|
|
16986
17503
|
if (institutionIdToUse && !initialized) {
|
|
16987
17504
|
initialize(institutionIdToUse);
|
|
16988
17505
|
}
|
|
@@ -16994,9 +17511,30 @@ function useAppContent(config) {
|
|
|
16994
17511
|
};
|
|
16995
17512
|
}
|
|
16996
17513
|
|
|
17514
|
+
// src/store/questionFiltersStore.ts
|
|
17515
|
+
import { create as create15 } from "zustand";
|
|
17516
|
+
var useQuestionFiltersStore = create15((set) => ({
|
|
17517
|
+
draftFilters: null,
|
|
17518
|
+
appliedFilters: null,
|
|
17519
|
+
setDraftFilters: (filters) => {
|
|
17520
|
+
set({ draftFilters: filters });
|
|
17521
|
+
},
|
|
17522
|
+
applyFilters: () => {
|
|
17523
|
+
set((state) => ({
|
|
17524
|
+
appliedFilters: state.draftFilters
|
|
17525
|
+
}));
|
|
17526
|
+
},
|
|
17527
|
+
clearFilters: () => {
|
|
17528
|
+
set({
|
|
17529
|
+
draftFilters: null,
|
|
17530
|
+
appliedFilters: null
|
|
17531
|
+
});
|
|
17532
|
+
}
|
|
17533
|
+
}));
|
|
17534
|
+
|
|
16997
17535
|
// src/components/ActivityCardQuestionBanks/ActivityCardQuestionBanks.tsx
|
|
16998
17536
|
import { Plus as Plus2, CheckCircle as CheckCircle7, XCircle as XCircle6 } from "phosphor-react";
|
|
16999
|
-
import { useMemo as
|
|
17537
|
+
import { useMemo as useMemo19 } from "react";
|
|
17000
17538
|
import { jsx as jsx73, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
17001
17539
|
var ActivityCardQuestionBanks = ({
|
|
17002
17540
|
question,
|
|
@@ -17008,7 +17546,7 @@ var ActivityCardQuestionBanks = ({
|
|
|
17008
17546
|
assunto,
|
|
17009
17547
|
enunciado
|
|
17010
17548
|
} = {}) => {
|
|
17011
|
-
const alternatives =
|
|
17549
|
+
const alternatives = useMemo19(() => {
|
|
17012
17550
|
if (!question?.options || questionType !== "ALTERNATIVA" /* ALTERNATIVA */)
|
|
17013
17551
|
return [];
|
|
17014
17552
|
const correctOptionIds2 = question.correctOptionIds || [];
|
|
@@ -17022,13 +17560,13 @@ var ActivityCardQuestionBanks = ({
|
|
|
17022
17560
|
};
|
|
17023
17561
|
});
|
|
17024
17562
|
}, [question, questionType]);
|
|
17025
|
-
const correctOptionId =
|
|
17563
|
+
const correctOptionId = useMemo19(() => {
|
|
17026
17564
|
if (!question?.correctOptionIds || question.correctOptionIds.length === 0) {
|
|
17027
17565
|
return void 0;
|
|
17028
17566
|
}
|
|
17029
17567
|
return question.correctOptionIds[0];
|
|
17030
17568
|
}, [question]);
|
|
17031
|
-
const multipleChoices =
|
|
17569
|
+
const multipleChoices = useMemo19(() => {
|
|
17032
17570
|
if (!question?.options || questionType !== "MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */)
|
|
17033
17571
|
return [];
|
|
17034
17572
|
const correctOptionIds2 = question.correctOptionIds || [];
|
|
@@ -17042,7 +17580,7 @@ var ActivityCardQuestionBanks = ({
|
|
|
17042
17580
|
};
|
|
17043
17581
|
});
|
|
17044
17582
|
}, [question, questionType]);
|
|
17045
|
-
const correctOptionIds =
|
|
17583
|
+
const correctOptionIds = useMemo19(() => {
|
|
17046
17584
|
return question?.correctOptionIds || [];
|
|
17047
17585
|
}, [question]);
|
|
17048
17586
|
const getStatusBadge2 = (status) => {
|
|
@@ -17225,7 +17763,7 @@ var formatDateToBrazilian = (dateString) => {
|
|
|
17225
17763
|
};
|
|
17226
17764
|
|
|
17227
17765
|
// src/components/ActivityDetails/ActivityDetails.tsx
|
|
17228
|
-
import { useState as
|
|
17766
|
+
import { useState as useState35, useMemo as useMemo20, useCallback as useCallback13, useEffect as useEffect37 } from "react";
|
|
17229
17767
|
import { Medal as Medal2, Star as Star2, File as File2, CaretRight as CaretRight9, WarningCircle as WarningCircle7 } from "phosphor-react";
|
|
17230
17768
|
import { Fragment as Fragment17, jsx as jsx74, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
17231
17769
|
var createTableColumns = (onCorrectActivity) => [
|
|
@@ -17323,20 +17861,20 @@ var ActivityDetails = ({
|
|
|
17323
17861
|
mapSubjectNameToEnum
|
|
17324
17862
|
}) => {
|
|
17325
17863
|
const { isMobile } = useMobile();
|
|
17326
|
-
const [page, setPage] =
|
|
17327
|
-
const [limit, setLimit] =
|
|
17328
|
-
const [sortBy, setSortBy] =
|
|
17329
|
-
const [sortOrder, setSortOrder] =
|
|
17864
|
+
const [page, setPage] = useState35(1);
|
|
17865
|
+
const [limit, setLimit] = useState35(10);
|
|
17866
|
+
const [sortBy, setSortBy] = useState35(void 0);
|
|
17867
|
+
const [sortOrder, setSortOrder] = useState35(
|
|
17330
17868
|
void 0
|
|
17331
17869
|
);
|
|
17332
|
-
const [data, setData] =
|
|
17333
|
-
const [correctionData, setCorrectionData] =
|
|
17334
|
-
const [loading, setLoading] =
|
|
17335
|
-
const [error, setError] =
|
|
17336
|
-
const [isModalOpen, setIsModalOpen] =
|
|
17337
|
-
const [isViewOnlyModal, setIsViewOnlyModal] =
|
|
17338
|
-
const [correctionError, setCorrectionError] =
|
|
17339
|
-
|
|
17870
|
+
const [data, setData] = useState35(null);
|
|
17871
|
+
const [correctionData, setCorrectionData] = useState35(null);
|
|
17872
|
+
const [loading, setLoading] = useState35(true);
|
|
17873
|
+
const [error, setError] = useState35(null);
|
|
17874
|
+
const [isModalOpen, setIsModalOpen] = useState35(false);
|
|
17875
|
+
const [isViewOnlyModal, setIsViewOnlyModal] = useState35(false);
|
|
17876
|
+
const [correctionError, setCorrectionError] = useState35(null);
|
|
17877
|
+
useEffect37(() => {
|
|
17340
17878
|
const loadData = async () => {
|
|
17341
17879
|
if (!activityId) return;
|
|
17342
17880
|
setLoading(true);
|
|
@@ -17359,7 +17897,7 @@ var ActivityDetails = ({
|
|
|
17359
17897
|
};
|
|
17360
17898
|
loadData();
|
|
17361
17899
|
}, [activityId, page, limit, sortBy, sortOrder, fetchActivityDetails]);
|
|
17362
|
-
const handleCorrectActivity =
|
|
17900
|
+
const handleCorrectActivity = useCallback13(
|
|
17363
17901
|
async (studentId) => {
|
|
17364
17902
|
const student = data?.students.find((s) => s.studentId === studentId);
|
|
17365
17903
|
if (!student || !activityId) return;
|
|
@@ -17379,10 +17917,10 @@ var ActivityDetails = ({
|
|
|
17379
17917
|
},
|
|
17380
17918
|
[data?.students, activityId, fetchStudentCorrection]
|
|
17381
17919
|
);
|
|
17382
|
-
const handleCloseModal =
|
|
17920
|
+
const handleCloseModal = useCallback13(() => {
|
|
17383
17921
|
setIsModalOpen(false);
|
|
17384
17922
|
}, []);
|
|
17385
|
-
const handleObservationSubmit =
|
|
17923
|
+
const handleObservationSubmit = useCallback13(
|
|
17386
17924
|
async (observation, files) => {
|
|
17387
17925
|
if (!activityId || !correctionData?.studentId) return;
|
|
17388
17926
|
try {
|
|
@@ -17399,7 +17937,7 @@ var ActivityDetails = ({
|
|
|
17399
17937
|
},
|
|
17400
17938
|
[activityId, correctionData?.studentId, submitObservation]
|
|
17401
17939
|
);
|
|
17402
|
-
const tableData =
|
|
17940
|
+
const tableData = useMemo20(() => {
|
|
17403
17941
|
if (!data?.students) return [];
|
|
17404
17942
|
return data.students.map((student) => ({
|
|
17405
17943
|
id: student.studentId,
|
|
@@ -17411,7 +17949,7 @@ var ActivityDetails = ({
|
|
|
17411
17949
|
score: student.score
|
|
17412
17950
|
}));
|
|
17413
17951
|
}, [data?.students]);
|
|
17414
|
-
const columns =
|
|
17952
|
+
const columns = useMemo20(
|
|
17415
17953
|
() => createTableColumns(handleCorrectActivity),
|
|
17416
17954
|
[handleCorrectActivity]
|
|
17417
17955
|
);
|
|
@@ -17668,7 +18206,7 @@ var ActivityDetails = ({
|
|
|
17668
18206
|
};
|
|
17669
18207
|
|
|
17670
18208
|
// src/components/Support/Support.tsx
|
|
17671
|
-
import { useState as
|
|
18209
|
+
import { useState as useState37, useEffect as useEffect39 } from "react";
|
|
17672
18210
|
import { useForm } from "react-hook-form";
|
|
17673
18211
|
import { zodResolver } from "@hookform/resolvers/zod";
|
|
17674
18212
|
import {
|
|
@@ -17699,7 +18237,7 @@ var supportSchema = z.object({
|
|
|
17699
18237
|
});
|
|
17700
18238
|
|
|
17701
18239
|
// src/components/Support/components/TicketModal.tsx
|
|
17702
|
-
import { useState as
|
|
18240
|
+
import { useState as useState36, useEffect as useEffect38, useCallback as useCallback14 } from "react";
|
|
17703
18241
|
import dayjs from "dayjs";
|
|
17704
18242
|
import "dayjs/locale/pt-br";
|
|
17705
18243
|
|
|
@@ -17821,17 +18359,17 @@ var TicketModal = ({
|
|
|
17821
18359
|
apiClient,
|
|
17822
18360
|
userId
|
|
17823
18361
|
}) => {
|
|
17824
|
-
const [showCloseConfirmation, setShowCloseConfirmation] =
|
|
17825
|
-
const [responseText, setResponseText] =
|
|
17826
|
-
const [answers, setAnswers] =
|
|
17827
|
-
const [isSubmittingAnswer, setIsSubmittingAnswer] =
|
|
17828
|
-
const [isLoadingAnswers, setIsLoadingAnswers] =
|
|
18362
|
+
const [showCloseConfirmation, setShowCloseConfirmation] = useState36(false);
|
|
18363
|
+
const [responseText, setResponseText] = useState36("");
|
|
18364
|
+
const [answers, setAnswers] = useState36([]);
|
|
18365
|
+
const [isSubmittingAnswer, setIsSubmittingAnswer] = useState36(false);
|
|
18366
|
+
const [isLoadingAnswers, setIsLoadingAnswers] = useState36(false);
|
|
17829
18367
|
const handleCloseTicket = () => {
|
|
17830
18368
|
onTicketClose?.(ticket.id);
|
|
17831
18369
|
setShowCloseConfirmation(false);
|
|
17832
18370
|
onClose();
|
|
17833
18371
|
};
|
|
17834
|
-
const fetchAnswers =
|
|
18372
|
+
const fetchAnswers = useCallback14(async () => {
|
|
17835
18373
|
if (!ticket.id || ticket.status !== "respondido" /* RESPONDIDO */) return;
|
|
17836
18374
|
setIsLoadingAnswers(true);
|
|
17837
18375
|
try {
|
|
@@ -17870,7 +18408,7 @@ var TicketModal = ({
|
|
|
17870
18408
|
}
|
|
17871
18409
|
};
|
|
17872
18410
|
const canCloseTicket = ticket.status !== "encerrado" /* ENCERRADO */;
|
|
17873
|
-
|
|
18411
|
+
useEffect38(() => {
|
|
17874
18412
|
if (isOpen) {
|
|
17875
18413
|
setResponseText("");
|
|
17876
18414
|
(async () => {
|
|
@@ -18253,21 +18791,21 @@ var Support = ({
|
|
|
18253
18791
|
onTicketCreated,
|
|
18254
18792
|
onTicketClosed
|
|
18255
18793
|
}) => {
|
|
18256
|
-
const [activeTab, setActiveTab] =
|
|
18257
|
-
const [selectedProblem, setSelectedProblem] =
|
|
18258
|
-
const [statusFilter, setStatusFilter] =
|
|
18259
|
-
const [categoryFilter, setCategoryFilter] =
|
|
18260
|
-
const [selectedTicket, setSelectedTicket] =
|
|
18794
|
+
const [activeTab, setActiveTab] = useState37("criar-pedido");
|
|
18795
|
+
const [selectedProblem, setSelectedProblem] = useState37(null);
|
|
18796
|
+
const [statusFilter, setStatusFilter] = useState37("todos");
|
|
18797
|
+
const [categoryFilter, setCategoryFilter] = useState37("todos");
|
|
18798
|
+
const [selectedTicket, setSelectedTicket] = useState37(
|
|
18261
18799
|
null
|
|
18262
18800
|
);
|
|
18263
|
-
const [isModalOpen, setIsModalOpen] =
|
|
18264
|
-
const [submitError, setSubmitError] =
|
|
18265
|
-
const [showSuccessToast, setShowSuccessToast] =
|
|
18266
|
-
const [showCloseSuccessToast, setShowCloseSuccessToast] =
|
|
18267
|
-
const [showCloseErrorToast, setShowCloseErrorToast] =
|
|
18268
|
-
const [allTickets, setAllTickets] =
|
|
18269
|
-
const [loadingTickets, setLoadingTickets] =
|
|
18270
|
-
const [currentPage, setCurrentPage] =
|
|
18801
|
+
const [isModalOpen, setIsModalOpen] = useState37(false);
|
|
18802
|
+
const [submitError, setSubmitError] = useState37(null);
|
|
18803
|
+
const [showSuccessToast, setShowSuccessToast] = useState37(false);
|
|
18804
|
+
const [showCloseSuccessToast, setShowCloseSuccessToast] = useState37(false);
|
|
18805
|
+
const [showCloseErrorToast, setShowCloseErrorToast] = useState37(false);
|
|
18806
|
+
const [allTickets, setAllTickets] = useState37([]);
|
|
18807
|
+
const [loadingTickets, setLoadingTickets] = useState37(false);
|
|
18808
|
+
const [currentPage, setCurrentPage] = useState37(1);
|
|
18271
18809
|
const ITEMS_PER_PAGE = 10;
|
|
18272
18810
|
const handlePrevPage = () => {
|
|
18273
18811
|
if (currentPage > 1) {
|
|
@@ -18280,13 +18818,13 @@ var Support = ({
|
|
|
18280
18818
|
setCurrentPage(currentPage + 1);
|
|
18281
18819
|
}
|
|
18282
18820
|
};
|
|
18283
|
-
|
|
18821
|
+
useEffect39(() => {
|
|
18284
18822
|
if (activeTab === "historico") {
|
|
18285
18823
|
fetchTickets(statusFilter);
|
|
18286
18824
|
setCurrentPage(1);
|
|
18287
18825
|
}
|
|
18288
18826
|
}, [activeTab, statusFilter]);
|
|
18289
|
-
|
|
18827
|
+
useEffect39(() => {
|
|
18290
18828
|
setCurrentPage(1);
|
|
18291
18829
|
}, [categoryFilter]);
|
|
18292
18830
|
const convertApiTicketToComponent = (apiTicket) => {
|
|
@@ -18796,8 +19334,10 @@ export {
|
|
|
18796
19334
|
VideoPlayer_default as VideoPlayer,
|
|
18797
19335
|
Whiteboard_default as Whiteboard,
|
|
18798
19336
|
cn,
|
|
19337
|
+
createActivityFiltersDataHook,
|
|
18799
19338
|
createNotificationStore,
|
|
18800
19339
|
createNotificationsHook,
|
|
19340
|
+
createUseActivityFiltersData,
|
|
18801
19341
|
createUseNotificationStore,
|
|
18802
19342
|
createUseNotifications,
|
|
18803
19343
|
createZustandAuthAdapter,
|
|
@@ -18841,6 +19381,7 @@ export {
|
|
|
18841
19381
|
useBreadcrumbBuilder,
|
|
18842
19382
|
useInstitutionId,
|
|
18843
19383
|
useMobile,
|
|
19384
|
+
useQuestionFiltersStore,
|
|
18844
19385
|
useQuizStore,
|
|
18845
19386
|
useRouteAuth,
|
|
18846
19387
|
useTableFilter,
|