analytica-frontend-lib 1.2.34 → 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/Support/TicketModal/index.js +1 -23
- package/dist/Support/TicketModal/index.js.map +1 -1
- package/dist/Support/TicketModal/index.mjs +1 -52
- package/dist/Support/TicketModal/index.mjs.map +1 -1
- package/dist/Support/index.js +1 -23
- package/dist/Support/index.js.map +1 -1
- package/dist/Support/index.mjs +1 -52
- package/dist/Support/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 +848 -326
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +817 -327
- 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.js
CHANGED
|
@@ -5,9 +5,6 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
-
};
|
|
11
8
|
var __export = (target, all) => {
|
|
12
9
|
for (var name in all)
|
|
13
10
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -30,25 +27,6 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
27
|
));
|
|
31
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
29
|
|
|
33
|
-
// node_modules/dayjs/locale/pt-br.js
|
|
34
|
-
var require_pt_br = __commonJS({
|
|
35
|
-
"node_modules/dayjs/locale/pt-br.js"(exports2, module2) {
|
|
36
|
-
"use strict";
|
|
37
|
-
!function(e, o) {
|
|
38
|
-
"object" == typeof exports2 && "undefined" != typeof module2 ? module2.exports = o(require("dayjs")) : "function" == typeof define && define.amd ? define(["dayjs"], o) : (e = "undefined" != typeof globalThis ? globalThis : e || self).dayjs_locale_pt_br = o(e.dayjs);
|
|
39
|
-
}(exports2, function(e) {
|
|
40
|
-
"use strict";
|
|
41
|
-
function o(e2) {
|
|
42
|
-
return e2 && "object" == typeof e2 && "default" in e2 ? e2 : { default: e2 };
|
|
43
|
-
}
|
|
44
|
-
var a = o(e), s = { name: "pt-br", weekdays: "domingo_segunda-feira_ter\xE7a-feira_quarta-feira_quinta-feira_sexta-feira_s\xE1bado".split("_"), weekdaysShort: "dom_seg_ter_qua_qui_sex_s\xE1b".split("_"), weekdaysMin: "Do_2\xAA_3\xAA_4\xAA_5\xAA_6\xAA_S\xE1".split("_"), months: "janeiro_fevereiro_mar\xE7o_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"), monthsShort: "jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"), ordinal: function(e2) {
|
|
45
|
-
return e2 + "\xBA";
|
|
46
|
-
}, formats: { LT: "HH:mm", LTS: "HH:mm:ss", L: "DD/MM/YYYY", LL: "D [de] MMMM [de] YYYY", LLL: "D [de] MMMM [de] YYYY [\xE0s] HH:mm", LLLL: "dddd, D [de] MMMM [de] YYYY [\xE0s] HH:mm" }, relativeTime: { future: "em %s", past: "h\xE1 %s", s: "poucos segundos", m: "um minuto", mm: "%d minutos", h: "uma hora", hh: "%d horas", d: "um dia", dd: "%d dias", M: "um m\xEAs", MM: "%d meses", y: "um ano", yy: "%d anos" } };
|
|
47
|
-
return a.default.locale(s, null, true), s;
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
|
|
52
30
|
// src/index.ts
|
|
53
31
|
var src_exports = {};
|
|
54
32
|
__export(src_exports, {
|
|
@@ -194,8 +172,10 @@ __export(src_exports, {
|
|
|
194
172
|
VideoPlayer: () => VideoPlayer_default,
|
|
195
173
|
Whiteboard: () => Whiteboard_default,
|
|
196
174
|
cn: () => cn,
|
|
175
|
+
createActivityFiltersDataHook: () => createActivityFiltersDataHook,
|
|
197
176
|
createNotificationStore: () => createNotificationStore,
|
|
198
177
|
createNotificationsHook: () => createNotificationsHook,
|
|
178
|
+
createUseActivityFiltersData: () => createUseActivityFiltersData,
|
|
199
179
|
createUseNotificationStore: () => createUseNotificationStore,
|
|
200
180
|
createUseNotifications: () => createUseNotifications,
|
|
201
181
|
createZustandAuthAdapter: () => createZustandAuthAdapter,
|
|
@@ -239,6 +219,7 @@ __export(src_exports, {
|
|
|
239
219
|
useBreadcrumbBuilder: () => useBreadcrumbBuilder,
|
|
240
220
|
useInstitutionId: () => useInstitutionId,
|
|
241
221
|
useMobile: () => useMobile,
|
|
222
|
+
useQuestionFiltersStore: () => useQuestionFiltersStore,
|
|
242
223
|
useQuizStore: () => useQuizStore,
|
|
243
224
|
useRouteAuth: () => useRouteAuth,
|
|
244
225
|
useTableFilter: () => useTableFilter,
|
|
@@ -11343,6 +11324,503 @@ var questionTypeLabels = {
|
|
|
11343
11324
|
["PREENCHER" /* PREENCHER */]: "Preencher Lacunas"
|
|
11344
11325
|
};
|
|
11345
11326
|
|
|
11327
|
+
// src/hooks/useActivityFiltersData.ts
|
|
11328
|
+
var import_react35 = require("react");
|
|
11329
|
+
var mapQuestionTypeToEnum = (type) => {
|
|
11330
|
+
const upperType = type.toUpperCase();
|
|
11331
|
+
const typeMap = {
|
|
11332
|
+
ALTERNATIVA: "ALTERNATIVA" /* ALTERNATIVA */,
|
|
11333
|
+
DISSERTATIVA: "DISSERTATIVA" /* DISSERTATIVA */,
|
|
11334
|
+
MULTIPLA_ESCOLHA: "MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */,
|
|
11335
|
+
VERDADEIRO_FALSO: "VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */,
|
|
11336
|
+
IMAGEM: "IMAGEM" /* IMAGEM */,
|
|
11337
|
+
LIGAR_PONTOS: "LIGAR_PONTOS" /* LIGAR_PONTOS */,
|
|
11338
|
+
PREENCHER: "PREENCHER" /* PREENCHER */
|
|
11339
|
+
};
|
|
11340
|
+
return typeMap[upperType] || null;
|
|
11341
|
+
};
|
|
11342
|
+
var areCategoriesSame = (prev, current) => {
|
|
11343
|
+
if (prev.length !== current.length) return false;
|
|
11344
|
+
return current.every((category) => {
|
|
11345
|
+
const prevCategory = prev.find((c) => c.key === category.key);
|
|
11346
|
+
if (!prevCategory) return false;
|
|
11347
|
+
const prevIds = (prevCategory.itens || []).map(
|
|
11348
|
+
(item) => item.id
|
|
11349
|
+
);
|
|
11350
|
+
const currentIds = (category.itens || []).map(
|
|
11351
|
+
(item) => item.id
|
|
11352
|
+
);
|
|
11353
|
+
if (prevIds.length !== currentIds.length) return false;
|
|
11354
|
+
return currentIds.every((id) => prevIds.includes(id));
|
|
11355
|
+
});
|
|
11356
|
+
};
|
|
11357
|
+
var mergeCategoriesWithSelection = (prev, current) => {
|
|
11358
|
+
return current.map((category) => {
|
|
11359
|
+
const prevCategory = prev.find((c) => c.key === category.key);
|
|
11360
|
+
if (!prevCategory) {
|
|
11361
|
+
return category;
|
|
11362
|
+
}
|
|
11363
|
+
const validSelectedIds = (prevCategory.selectedIds || []).filter(
|
|
11364
|
+
(id) => category.itens?.some((item) => item.id === id)
|
|
11365
|
+
);
|
|
11366
|
+
return {
|
|
11367
|
+
...category,
|
|
11368
|
+
selectedIds: validSelectedIds
|
|
11369
|
+
};
|
|
11370
|
+
});
|
|
11371
|
+
};
|
|
11372
|
+
var mapSelectedNames = (ids, items) => {
|
|
11373
|
+
return ids.map((id) => {
|
|
11374
|
+
const item = items.find((t) => t.id === id);
|
|
11375
|
+
return item ? item.name : null;
|
|
11376
|
+
}).filter((name) => name !== null);
|
|
11377
|
+
};
|
|
11378
|
+
var useActivityFiltersDataImpl = (apiClient, options) => {
|
|
11379
|
+
const { selectedSubjects, institutionId } = options;
|
|
11380
|
+
const [banksState, setBanksState] = (0, import_react35.useState)({
|
|
11381
|
+
banks: [],
|
|
11382
|
+
bankYears: [],
|
|
11383
|
+
loading: false,
|
|
11384
|
+
error: null
|
|
11385
|
+
});
|
|
11386
|
+
const loadBanks = (0, import_react35.useCallback)(async () => {
|
|
11387
|
+
setBanksState((prev) => ({ ...prev, loading: true, error: null }));
|
|
11388
|
+
try {
|
|
11389
|
+
const response = await apiClient.get(
|
|
11390
|
+
"/questions/exam-institutions"
|
|
11391
|
+
);
|
|
11392
|
+
const banksMap = /* @__PURE__ */ new Map();
|
|
11393
|
+
const bankYearsArray = [];
|
|
11394
|
+
for (const item of response.data.data) {
|
|
11395
|
+
if (!item.questionBankName) continue;
|
|
11396
|
+
const existingBank = banksMap.get(item.questionBankName);
|
|
11397
|
+
if (existingBank) {
|
|
11398
|
+
if (!existingBank.years.includes(item.year)) {
|
|
11399
|
+
existingBank.years.push(item.year);
|
|
11400
|
+
}
|
|
11401
|
+
existingBank.questionsCount += item.questionsCount;
|
|
11402
|
+
} else {
|
|
11403
|
+
banksMap.set(item.questionBankName, {
|
|
11404
|
+
id: item.questionBankName,
|
|
11405
|
+
name: item.questionBankName,
|
|
11406
|
+
examInstitution: item.questionBankName,
|
|
11407
|
+
years: [item.year],
|
|
11408
|
+
questionsCount: item.questionsCount
|
|
11409
|
+
});
|
|
11410
|
+
}
|
|
11411
|
+
bankYearsArray.push({
|
|
11412
|
+
id: `${item.questionBankYearId}-${item.questionBankName}`,
|
|
11413
|
+
name: item.year,
|
|
11414
|
+
bankId: item.questionBankName
|
|
11415
|
+
});
|
|
11416
|
+
}
|
|
11417
|
+
const banks = Array.from(banksMap.values()).map((bank) => ({
|
|
11418
|
+
id: bank.id,
|
|
11419
|
+
name: bank.name,
|
|
11420
|
+
examInstitution: bank.examInstitution
|
|
11421
|
+
}));
|
|
11422
|
+
setBanksState({
|
|
11423
|
+
banks,
|
|
11424
|
+
bankYears: bankYearsArray,
|
|
11425
|
+
loading: false,
|
|
11426
|
+
error: null
|
|
11427
|
+
});
|
|
11428
|
+
} catch (error) {
|
|
11429
|
+
console.error("Erro ao carregar bancas de vestibular:", error);
|
|
11430
|
+
setBanksState((prev) => ({
|
|
11431
|
+
...prev,
|
|
11432
|
+
loading: false,
|
|
11433
|
+
error: "Erro ao carregar bancas de vestibular"
|
|
11434
|
+
}));
|
|
11435
|
+
}
|
|
11436
|
+
}, [apiClient]);
|
|
11437
|
+
const [areasState, setAreasState] = (0, import_react35.useState)({
|
|
11438
|
+
knowledgeAreas: [],
|
|
11439
|
+
loading: false,
|
|
11440
|
+
error: null
|
|
11441
|
+
});
|
|
11442
|
+
const loadKnowledgeAreas = (0, import_react35.useCallback)(async () => {
|
|
11443
|
+
setAreasState((prev) => ({ ...prev, loading: true, error: null }));
|
|
11444
|
+
try {
|
|
11445
|
+
const response = await apiClient.get(
|
|
11446
|
+
"/knowledge/subjects"
|
|
11447
|
+
);
|
|
11448
|
+
setAreasState({
|
|
11449
|
+
knowledgeAreas: response.data.data,
|
|
11450
|
+
loading: false,
|
|
11451
|
+
error: null
|
|
11452
|
+
});
|
|
11453
|
+
} catch (error) {
|
|
11454
|
+
console.error("Erro ao carregar \xE1reas de conhecimento:", error);
|
|
11455
|
+
setAreasState((prev) => ({
|
|
11456
|
+
...prev,
|
|
11457
|
+
loading: false,
|
|
11458
|
+
error: "Erro ao carregar \xE1reas de conhecimento"
|
|
11459
|
+
}));
|
|
11460
|
+
}
|
|
11461
|
+
}, [apiClient]);
|
|
11462
|
+
const [questionTypesState, setQuestionTypesState] = (0, import_react35.useState)({
|
|
11463
|
+
questionTypes: [],
|
|
11464
|
+
loading: false,
|
|
11465
|
+
error: null
|
|
11466
|
+
});
|
|
11467
|
+
const loadQuestionTypes = (0, import_react35.useCallback)(async () => {
|
|
11468
|
+
if (!institutionId) {
|
|
11469
|
+
setQuestionTypesState((prev) => ({
|
|
11470
|
+
...prev,
|
|
11471
|
+
questionTypes: [],
|
|
11472
|
+
loading: false,
|
|
11473
|
+
error: null
|
|
11474
|
+
}));
|
|
11475
|
+
return;
|
|
11476
|
+
}
|
|
11477
|
+
setQuestionTypesState((prev) => ({
|
|
11478
|
+
...prev,
|
|
11479
|
+
loading: true,
|
|
11480
|
+
error: null
|
|
11481
|
+
}));
|
|
11482
|
+
try {
|
|
11483
|
+
const response = await apiClient.get(
|
|
11484
|
+
`/institutions/${institutionId}/question-types`
|
|
11485
|
+
);
|
|
11486
|
+
const mappedTypes = response.data.data.questionTypes.map(mapQuestionTypeToEnum).filter((type) => type !== null);
|
|
11487
|
+
setQuestionTypesState({
|
|
11488
|
+
questionTypes: mappedTypes,
|
|
11489
|
+
loading: false,
|
|
11490
|
+
error: null
|
|
11491
|
+
});
|
|
11492
|
+
} catch (error) {
|
|
11493
|
+
console.error("Erro ao carregar tipos de quest\xF5es:", error);
|
|
11494
|
+
setQuestionTypesState((prev) => ({
|
|
11495
|
+
...prev,
|
|
11496
|
+
loading: false,
|
|
11497
|
+
error: "Erro ao carregar tipos de quest\xF5es"
|
|
11498
|
+
}));
|
|
11499
|
+
}
|
|
11500
|
+
}, [apiClient, institutionId]);
|
|
11501
|
+
const [knowledgeStructure, setKnowledgeStructure] = (0, import_react35.useState)({
|
|
11502
|
+
topics: [],
|
|
11503
|
+
subtopics: [],
|
|
11504
|
+
contents: [],
|
|
11505
|
+
loading: false,
|
|
11506
|
+
error: null
|
|
11507
|
+
});
|
|
11508
|
+
const [knowledgeCategories, setKnowledgeCategories] = (0, import_react35.useState)([]);
|
|
11509
|
+
const previousSubjectsRef = (0, import_react35.useRef)(null);
|
|
11510
|
+
const loadTopics = (0, import_react35.useCallback)(
|
|
11511
|
+
async (subjectIds) => {
|
|
11512
|
+
if (subjectIds.length === 0) {
|
|
11513
|
+
setKnowledgeStructure({
|
|
11514
|
+
topics: [],
|
|
11515
|
+
subtopics: [],
|
|
11516
|
+
contents: [],
|
|
11517
|
+
loading: false,
|
|
11518
|
+
error: null
|
|
11519
|
+
});
|
|
11520
|
+
setKnowledgeCategories([]);
|
|
11521
|
+
return;
|
|
11522
|
+
}
|
|
11523
|
+
setKnowledgeStructure((prev) => ({
|
|
11524
|
+
...prev,
|
|
11525
|
+
loading: true,
|
|
11526
|
+
error: null
|
|
11527
|
+
}));
|
|
11528
|
+
try {
|
|
11529
|
+
const response = await apiClient.post(
|
|
11530
|
+
"/knowledge/topics",
|
|
11531
|
+
{ subjectIds }
|
|
11532
|
+
);
|
|
11533
|
+
const topics = response.data.data.map((topic) => ({
|
|
11534
|
+
id: topic.id,
|
|
11535
|
+
name: topic.name
|
|
11536
|
+
}));
|
|
11537
|
+
setKnowledgeStructure((prev) => ({
|
|
11538
|
+
...prev,
|
|
11539
|
+
topics,
|
|
11540
|
+
subtopics: [],
|
|
11541
|
+
contents: [],
|
|
11542
|
+
loading: false,
|
|
11543
|
+
error: null
|
|
11544
|
+
}));
|
|
11545
|
+
} catch (error) {
|
|
11546
|
+
console.error("Erro ao carregar temas:", error);
|
|
11547
|
+
setKnowledgeStructure((prev) => ({
|
|
11548
|
+
...prev,
|
|
11549
|
+
topics: [],
|
|
11550
|
+
subtopics: [],
|
|
11551
|
+
contents: [],
|
|
11552
|
+
loading: false,
|
|
11553
|
+
error: "Erro ao carregar temas"
|
|
11554
|
+
}));
|
|
11555
|
+
}
|
|
11556
|
+
},
|
|
11557
|
+
[apiClient]
|
|
11558
|
+
);
|
|
11559
|
+
const loadSubtopics = (0, import_react35.useCallback)(
|
|
11560
|
+
async (topicIds, options2 = {}) => {
|
|
11561
|
+
const { forceApi = false } = options2;
|
|
11562
|
+
if (topicIds.length === 0 && !forceApi) {
|
|
11563
|
+
setKnowledgeStructure((prev) => ({
|
|
11564
|
+
...prev,
|
|
11565
|
+
subtopics: [],
|
|
11566
|
+
contents: [],
|
|
11567
|
+
loading: false,
|
|
11568
|
+
error: null
|
|
11569
|
+
}));
|
|
11570
|
+
return;
|
|
11571
|
+
}
|
|
11572
|
+
setKnowledgeStructure((prev) => ({
|
|
11573
|
+
...prev,
|
|
11574
|
+
loading: topicIds.length > 0,
|
|
11575
|
+
error: null
|
|
11576
|
+
}));
|
|
11577
|
+
try {
|
|
11578
|
+
const response = await apiClient.post(
|
|
11579
|
+
"/knowledge/subtopics",
|
|
11580
|
+
{ topicIds }
|
|
11581
|
+
);
|
|
11582
|
+
const subtopics = response.data.data.map(
|
|
11583
|
+
(subtopic) => ({
|
|
11584
|
+
id: subtopic.id,
|
|
11585
|
+
name: subtopic.name,
|
|
11586
|
+
topicId: subtopic.topicId || topicIds[0]
|
|
11587
|
+
})
|
|
11588
|
+
);
|
|
11589
|
+
setKnowledgeStructure((prev) => ({
|
|
11590
|
+
...prev,
|
|
11591
|
+
subtopics,
|
|
11592
|
+
contents: [],
|
|
11593
|
+
loading: false,
|
|
11594
|
+
error: null
|
|
11595
|
+
}));
|
|
11596
|
+
} catch (error) {
|
|
11597
|
+
console.error("Erro ao carregar subtemas:", error);
|
|
11598
|
+
setKnowledgeStructure((prev) => ({
|
|
11599
|
+
...prev,
|
|
11600
|
+
subtopics: [],
|
|
11601
|
+
contents: [],
|
|
11602
|
+
loading: false,
|
|
11603
|
+
error: "Erro ao carregar subtemas"
|
|
11604
|
+
}));
|
|
11605
|
+
}
|
|
11606
|
+
},
|
|
11607
|
+
[apiClient]
|
|
11608
|
+
);
|
|
11609
|
+
const loadContents = (0, import_react35.useCallback)(
|
|
11610
|
+
async (subtopicIds) => {
|
|
11611
|
+
if (subtopicIds.length === 0) {
|
|
11612
|
+
setKnowledgeStructure((prev) => ({
|
|
11613
|
+
...prev,
|
|
11614
|
+
contents: [],
|
|
11615
|
+
loading: false,
|
|
11616
|
+
error: null
|
|
11617
|
+
}));
|
|
11618
|
+
return;
|
|
11619
|
+
}
|
|
11620
|
+
setKnowledgeStructure((prev) => ({
|
|
11621
|
+
...prev,
|
|
11622
|
+
loading: true,
|
|
11623
|
+
error: null
|
|
11624
|
+
}));
|
|
11625
|
+
try {
|
|
11626
|
+
const response = await apiClient.post(
|
|
11627
|
+
"/knowledge/contents",
|
|
11628
|
+
{ subtopicIds }
|
|
11629
|
+
);
|
|
11630
|
+
const contents = response.data.data.map(
|
|
11631
|
+
(content) => ({
|
|
11632
|
+
id: content.id,
|
|
11633
|
+
name: content.name,
|
|
11634
|
+
subtopicId: content.subtopicId || subtopicIds[0]
|
|
11635
|
+
})
|
|
11636
|
+
);
|
|
11637
|
+
setKnowledgeStructure((prev) => ({
|
|
11638
|
+
...prev,
|
|
11639
|
+
contents,
|
|
11640
|
+
loading: false,
|
|
11641
|
+
error: null
|
|
11642
|
+
}));
|
|
11643
|
+
} catch (error) {
|
|
11644
|
+
console.error("Erro ao carregar conte\xFAdos:", error);
|
|
11645
|
+
setKnowledgeStructure((prev) => ({
|
|
11646
|
+
...prev,
|
|
11647
|
+
contents: [],
|
|
11648
|
+
loading: false,
|
|
11649
|
+
error: "Erro ao carregar conte\xFAdos"
|
|
11650
|
+
}));
|
|
11651
|
+
}
|
|
11652
|
+
},
|
|
11653
|
+
[apiClient]
|
|
11654
|
+
);
|
|
11655
|
+
(0, import_react35.useEffect)(() => {
|
|
11656
|
+
const previousSubjects = previousSubjectsRef.current;
|
|
11657
|
+
const subjectsChanged = !previousSubjects || previousSubjects.length !== selectedSubjects.length || selectedSubjects.some((id, index) => id !== previousSubjects[index]);
|
|
11658
|
+
if (!subjectsChanged) return;
|
|
11659
|
+
previousSubjectsRef.current = selectedSubjects;
|
|
11660
|
+
if (selectedSubjects.length > 0) {
|
|
11661
|
+
loadTopics(selectedSubjects);
|
|
11662
|
+
return;
|
|
11663
|
+
}
|
|
11664
|
+
setKnowledgeStructure({
|
|
11665
|
+
topics: [],
|
|
11666
|
+
subtopics: [],
|
|
11667
|
+
contents: [],
|
|
11668
|
+
loading: false,
|
|
11669
|
+
error: null
|
|
11670
|
+
});
|
|
11671
|
+
setKnowledgeCategories([]);
|
|
11672
|
+
}, [selectedSubjects, loadTopics]);
|
|
11673
|
+
const handleCategoriesChange = (0, import_react35.useCallback)(
|
|
11674
|
+
(updatedCategories) => {
|
|
11675
|
+
const isFirstChange = knowledgeCategories.length === 0;
|
|
11676
|
+
const currentTemaCategory = knowledgeCategories.find(
|
|
11677
|
+
(c) => c.key === "tema"
|
|
11678
|
+
);
|
|
11679
|
+
const currentSubtemaCategory = knowledgeCategories.find(
|
|
11680
|
+
(c) => c.key === "subtema"
|
|
11681
|
+
);
|
|
11682
|
+
const currentSelectedTopicIds = currentTemaCategory?.selectedIds || [];
|
|
11683
|
+
const currentSelectedSubtopicIds = currentSubtemaCategory?.selectedIds || [];
|
|
11684
|
+
const temaCategory = updatedCategories.find((c) => c.key === "tema");
|
|
11685
|
+
const selectedTopicIds = temaCategory?.selectedIds || [];
|
|
11686
|
+
const subtemaCategory = updatedCategories.find(
|
|
11687
|
+
(c) => c.key === "subtema"
|
|
11688
|
+
);
|
|
11689
|
+
const selectedSubtopicIds = subtemaCategory?.selectedIds || [];
|
|
11690
|
+
setKnowledgeCategories(updatedCategories);
|
|
11691
|
+
const topicIdsChanged = isFirstChange || currentSelectedTopicIds.length !== selectedTopicIds.length || currentSelectedTopicIds.some(
|
|
11692
|
+
(id) => !selectedTopicIds.includes(id)
|
|
11693
|
+
) || selectedTopicIds.some(
|
|
11694
|
+
(id) => !currentSelectedTopicIds.includes(id)
|
|
11695
|
+
);
|
|
11696
|
+
if (topicIdsChanged) {
|
|
11697
|
+
loadSubtopics(selectedTopicIds, {
|
|
11698
|
+
forceApi: selectedTopicIds.length === 0
|
|
11699
|
+
});
|
|
11700
|
+
}
|
|
11701
|
+
const subtopicIdsChanged = isFirstChange || currentSelectedSubtopicIds.length !== selectedSubtopicIds.length || currentSelectedSubtopicIds.some(
|
|
11702
|
+
(id) => !selectedSubtopicIds.includes(id)
|
|
11703
|
+
) || selectedSubtopicIds.some(
|
|
11704
|
+
(id) => !currentSelectedSubtopicIds.includes(id)
|
|
11705
|
+
);
|
|
11706
|
+
if (subtopicIdsChanged) {
|
|
11707
|
+
if (selectedSubtopicIds.length > 0) {
|
|
11708
|
+
loadContents(selectedSubtopicIds);
|
|
11709
|
+
} else {
|
|
11710
|
+
loadContents([]);
|
|
11711
|
+
}
|
|
11712
|
+
}
|
|
11713
|
+
},
|
|
11714
|
+
[knowledgeCategories, loadSubtopics, loadContents]
|
|
11715
|
+
);
|
|
11716
|
+
(0, import_react35.useEffect)(() => {
|
|
11717
|
+
if (knowledgeStructure.topics.length === 0) {
|
|
11718
|
+
setKnowledgeCategories((prev) => {
|
|
11719
|
+
if (prev.length === 0) {
|
|
11720
|
+
return prev;
|
|
11721
|
+
}
|
|
11722
|
+
return [];
|
|
11723
|
+
});
|
|
11724
|
+
return;
|
|
11725
|
+
}
|
|
11726
|
+
const categories = [
|
|
11727
|
+
{
|
|
11728
|
+
key: "tema",
|
|
11729
|
+
label: "Tema",
|
|
11730
|
+
dependsOn: [],
|
|
11731
|
+
itens: knowledgeStructure.topics,
|
|
11732
|
+
selectedIds: []
|
|
11733
|
+
},
|
|
11734
|
+
{
|
|
11735
|
+
key: "subtema",
|
|
11736
|
+
label: "Subtema",
|
|
11737
|
+
dependsOn: ["tema"],
|
|
11738
|
+
itens: knowledgeStructure.subtopics,
|
|
11739
|
+
filteredBy: [{ key: "tema", internalField: "topicId" }],
|
|
11740
|
+
selectedIds: []
|
|
11741
|
+
},
|
|
11742
|
+
{
|
|
11743
|
+
key: "assunto",
|
|
11744
|
+
label: "Assunto",
|
|
11745
|
+
dependsOn: ["subtema"],
|
|
11746
|
+
itens: knowledgeStructure.contents,
|
|
11747
|
+
filteredBy: [{ key: "subtema", internalField: "subtopicId" }],
|
|
11748
|
+
selectedIds: []
|
|
11749
|
+
}
|
|
11750
|
+
];
|
|
11751
|
+
setKnowledgeCategories(
|
|
11752
|
+
(prev) => areCategoriesSame(prev, categories) ? prev : mergeCategoriesWithSelection(prev, categories)
|
|
11753
|
+
);
|
|
11754
|
+
}, [
|
|
11755
|
+
selectedSubjects,
|
|
11756
|
+
knowledgeStructure.topics,
|
|
11757
|
+
knowledgeStructure.subtopics,
|
|
11758
|
+
knowledgeStructure.contents
|
|
11759
|
+
]);
|
|
11760
|
+
const selectedKnowledgeSummary = (0, import_react35.useMemo)(() => {
|
|
11761
|
+
const temaCategory = knowledgeCategories.find((c) => c.key === "tema");
|
|
11762
|
+
const subtemaCategory = knowledgeCategories.find(
|
|
11763
|
+
(c) => c.key === "subtema"
|
|
11764
|
+
);
|
|
11765
|
+
const assuntoCategory = knowledgeCategories.find(
|
|
11766
|
+
(c) => c.key === "assunto"
|
|
11767
|
+
);
|
|
11768
|
+
const selectedTopics = mapSelectedNames(
|
|
11769
|
+
temaCategory?.selectedIds || [],
|
|
11770
|
+
knowledgeStructure.topics
|
|
11771
|
+
);
|
|
11772
|
+
const selectedSubtopics = mapSelectedNames(
|
|
11773
|
+
subtemaCategory?.selectedIds || [],
|
|
11774
|
+
knowledgeStructure.subtopics
|
|
11775
|
+
);
|
|
11776
|
+
const selectedContents = mapSelectedNames(
|
|
11777
|
+
assuntoCategory?.selectedIds || [],
|
|
11778
|
+
knowledgeStructure.contents
|
|
11779
|
+
);
|
|
11780
|
+
return {
|
|
11781
|
+
topics: selectedTopics,
|
|
11782
|
+
subtopics: selectedSubtopics,
|
|
11783
|
+
contents: selectedContents
|
|
11784
|
+
};
|
|
11785
|
+
}, [knowledgeCategories, knowledgeStructure]);
|
|
11786
|
+
const enableSummary = (0, import_react35.useMemo)(() => {
|
|
11787
|
+
return knowledgeStructure.topics.length === 1 || knowledgeStructure.subtopics.length === 1 || knowledgeStructure.contents.length === 1;
|
|
11788
|
+
}, [knowledgeStructure]);
|
|
11789
|
+
return {
|
|
11790
|
+
// Vestibular Banks
|
|
11791
|
+
banks: banksState.banks,
|
|
11792
|
+
bankYears: banksState.bankYears,
|
|
11793
|
+
loadingBanks: banksState.loading,
|
|
11794
|
+
banksError: banksState.error,
|
|
11795
|
+
loadBanks,
|
|
11796
|
+
// Knowledge Areas
|
|
11797
|
+
knowledgeAreas: areasState.knowledgeAreas,
|
|
11798
|
+
loadingSubjects: areasState.loading,
|
|
11799
|
+
subjectsError: areasState.error,
|
|
11800
|
+
loadKnowledgeAreas,
|
|
11801
|
+
// Knowledge Structure
|
|
11802
|
+
knowledgeStructure,
|
|
11803
|
+
knowledgeCategories,
|
|
11804
|
+
handleCategoriesChange,
|
|
11805
|
+
selectedKnowledgeSummary,
|
|
11806
|
+
enableSummary,
|
|
11807
|
+
loadTopics,
|
|
11808
|
+
loadSubtopics,
|
|
11809
|
+
loadContents,
|
|
11810
|
+
// Question Types
|
|
11811
|
+
questionTypes: questionTypesState.questionTypes,
|
|
11812
|
+
loadingQuestionTypes: questionTypesState.loading,
|
|
11813
|
+
questionTypesError: questionTypesState.error,
|
|
11814
|
+
loadQuestionTypes
|
|
11815
|
+
};
|
|
11816
|
+
};
|
|
11817
|
+
var createUseActivityFiltersData = (apiClient) => {
|
|
11818
|
+
return (options) => useActivityFiltersDataImpl(apiClient, options);
|
|
11819
|
+
};
|
|
11820
|
+
var createActivityFiltersDataHook = (apiClient) => {
|
|
11821
|
+
return createUseActivityFiltersData(apiClient);
|
|
11822
|
+
};
|
|
11823
|
+
|
|
11346
11824
|
// src/components/Filter/FilterModal.tsx
|
|
11347
11825
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
11348
11826
|
var FilterModal = ({
|
|
@@ -11486,10 +11964,10 @@ var FilterModal = ({
|
|
|
11486
11964
|
};
|
|
11487
11965
|
|
|
11488
11966
|
// src/components/Filter/useTableFilter.ts
|
|
11489
|
-
var
|
|
11967
|
+
var import_react36 = require("react");
|
|
11490
11968
|
var useTableFilter = (initialConfigs, options = {}) => {
|
|
11491
11969
|
const { syncWithUrl = false } = options;
|
|
11492
|
-
const getInitialState = (0,
|
|
11970
|
+
const getInitialState = (0, import_react36.useCallback)(() => {
|
|
11493
11971
|
if (!syncWithUrl || globalThis.window === void 0) {
|
|
11494
11972
|
return initialConfigs;
|
|
11495
11973
|
}
|
|
@@ -11507,8 +11985,8 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11507
11985
|
}));
|
|
11508
11986
|
return configsWithUrlState;
|
|
11509
11987
|
}, [initialConfigs, syncWithUrl]);
|
|
11510
|
-
const [filterConfigs, setFilterConfigs] = (0,
|
|
11511
|
-
const activeFilters = (0,
|
|
11988
|
+
const [filterConfigs, setFilterConfigs] = (0, import_react36.useState)(getInitialState);
|
|
11989
|
+
const activeFilters = (0, import_react36.useMemo)(() => {
|
|
11512
11990
|
const filters = {};
|
|
11513
11991
|
for (const config of filterConfigs) {
|
|
11514
11992
|
for (const category of config.categories) {
|
|
@@ -11520,10 +11998,10 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11520
11998
|
return filters;
|
|
11521
11999
|
}, [filterConfigs]);
|
|
11522
12000
|
const hasActiveFilters = Object.keys(activeFilters).length > 0;
|
|
11523
|
-
const updateFilters = (0,
|
|
12001
|
+
const updateFilters = (0, import_react36.useCallback)((configs) => {
|
|
11524
12002
|
setFilterConfigs(configs);
|
|
11525
12003
|
}, []);
|
|
11526
|
-
const applyFilters = (0,
|
|
12004
|
+
const applyFilters = (0, import_react36.useCallback)(() => {
|
|
11527
12005
|
if (!syncWithUrl || globalThis.window === void 0) {
|
|
11528
12006
|
return;
|
|
11529
12007
|
}
|
|
@@ -11541,7 +12019,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11541
12019
|
}
|
|
11542
12020
|
globalThis.window.history.replaceState({}, "", url.toString());
|
|
11543
12021
|
}, [filterConfigs, syncWithUrl]);
|
|
11544
|
-
const clearFilters = (0,
|
|
12022
|
+
const clearFilters = (0, import_react36.useCallback)(() => {
|
|
11545
12023
|
const clearedConfigs = filterConfigs.map((config) => ({
|
|
11546
12024
|
...config,
|
|
11547
12025
|
categories: config.categories.map((category) => ({
|
|
@@ -11561,7 +12039,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11561
12039
|
globalThis.window.history.replaceState({}, "", url.toString());
|
|
11562
12040
|
}
|
|
11563
12041
|
}, [filterConfigs, syncWithUrl]);
|
|
11564
|
-
(0,
|
|
12042
|
+
(0, import_react36.useEffect)(() => {
|
|
11565
12043
|
if (!syncWithUrl || globalThis.window === void 0) {
|
|
11566
12044
|
return;
|
|
11567
12045
|
}
|
|
@@ -11582,9 +12060,9 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11582
12060
|
};
|
|
11583
12061
|
|
|
11584
12062
|
// src/components/ActivityFilters/ActivityFilters.tsx
|
|
11585
|
-
var
|
|
12063
|
+
var import_react37 = require("react");
|
|
11586
12064
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
11587
|
-
var
|
|
12065
|
+
var questionTypesFallback = [
|
|
11588
12066
|
"ALTERNATIVA" /* ALTERNATIVA */,
|
|
11589
12067
|
"VERDADEIRO_FALSO" /* VERDADEIRO_FALSO */,
|
|
11590
12068
|
"DISSERTATIVA" /* DISSERTATIVA */,
|
|
@@ -11598,7 +12076,7 @@ var QuestionTypeFilter = ({
|
|
|
11598
12076
|
onToggleType,
|
|
11599
12077
|
allowedQuestionTypes
|
|
11600
12078
|
}) => {
|
|
11601
|
-
const availableQuestionTypes = allowedQuestionTypes ||
|
|
12079
|
+
const availableQuestionTypes = allowedQuestionTypes || questionTypesFallback;
|
|
11602
12080
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
11603
12081
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text_default, { size: "sm", weight: "bold", className: "mb-3 block", children: "Tipo de quest\xE3o" }),
|
|
11604
12082
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "grid grid-cols-2 gap-2", children: availableQuestionTypes.map((questionType) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
@@ -11723,45 +12201,42 @@ var FilterActions = ({
|
|
|
11723
12201
|
] });
|
|
11724
12202
|
};
|
|
11725
12203
|
var ActivityFilters = ({
|
|
12204
|
+
apiClient,
|
|
11726
12205
|
onFiltersChange,
|
|
11727
12206
|
variant = "default",
|
|
11728
|
-
|
|
11729
|
-
banks = [],
|
|
11730
|
-
bankYears = [],
|
|
11731
|
-
knowledgeAreas = [],
|
|
11732
|
-
knowledgeStructure = {
|
|
11733
|
-
topics: [],
|
|
11734
|
-
subtopics: [],
|
|
11735
|
-
contents: [],
|
|
11736
|
-
loading: false,
|
|
11737
|
-
error: null
|
|
11738
|
-
},
|
|
11739
|
-
knowledgeCategories = [],
|
|
12207
|
+
institutionId = null,
|
|
11740
12208
|
// Question types
|
|
11741
12209
|
allowedQuestionTypes,
|
|
11742
|
-
// Loading states
|
|
11743
|
-
loadingBanks = false,
|
|
11744
|
-
loadingKnowledge: _loadingKnowledge = false,
|
|
11745
|
-
loadingSubjects = false,
|
|
11746
|
-
// Errors
|
|
11747
|
-
banksError = null,
|
|
11748
|
-
subjectsError = null,
|
|
11749
|
-
// Load functions
|
|
11750
|
-
loadBanks,
|
|
11751
|
-
loadKnowledge,
|
|
11752
|
-
loadTopics,
|
|
11753
|
-
loadSubtopics: _loadSubtopics,
|
|
11754
|
-
loadContents: _loadContents,
|
|
11755
|
-
// Handlers
|
|
11756
|
-
handleCategoriesChange,
|
|
11757
12210
|
// Action buttons
|
|
11758
12211
|
onClearFilters,
|
|
11759
12212
|
onApplyFilters
|
|
11760
12213
|
}) => {
|
|
11761
|
-
const
|
|
11762
|
-
const [
|
|
11763
|
-
const
|
|
11764
|
-
|
|
12214
|
+
const useActivityFiltersData = createUseActivityFiltersData(apiClient);
|
|
12215
|
+
const [selectedQuestionTypes, setSelectedQuestionTypes] = (0, import_react37.useState)([]);
|
|
12216
|
+
const [selectedSubject, setSelectedSubject] = (0, import_react37.useState)(null);
|
|
12217
|
+
const {
|
|
12218
|
+
banks,
|
|
12219
|
+
bankYears,
|
|
12220
|
+
loadingBanks,
|
|
12221
|
+
banksError,
|
|
12222
|
+
knowledgeAreas,
|
|
12223
|
+
loadingSubjects,
|
|
12224
|
+
subjectsError,
|
|
12225
|
+
knowledgeStructure,
|
|
12226
|
+
knowledgeCategories,
|
|
12227
|
+
handleCategoriesChange,
|
|
12228
|
+
loadBanks,
|
|
12229
|
+
loadKnowledgeAreas,
|
|
12230
|
+
loadQuestionTypes,
|
|
12231
|
+
questionTypes,
|
|
12232
|
+
loadingQuestionTypes,
|
|
12233
|
+
questionTypesError
|
|
12234
|
+
} = useActivityFiltersData({
|
|
12235
|
+
selectedSubjects: selectedSubject ? [selectedSubject] : [],
|
|
12236
|
+
institutionId
|
|
12237
|
+
});
|
|
12238
|
+
const prevAllowedQuestionTypesRef = (0, import_react37.useRef)(null);
|
|
12239
|
+
(0, import_react37.useEffect)(() => {
|
|
11765
12240
|
if (!allowedQuestionTypes || allowedQuestionTypes.length === 0) {
|
|
11766
12241
|
prevAllowedQuestionTypesRef.current = null;
|
|
11767
12242
|
return;
|
|
@@ -11794,8 +12269,8 @@ var ActivityFilters = ({
|
|
|
11794
12269
|
return prev;
|
|
11795
12270
|
});
|
|
11796
12271
|
}, [allowedQuestionTypes]);
|
|
11797
|
-
const [bankCategories, setBankCategories] = (0,
|
|
11798
|
-
const selectedSubjects = (0,
|
|
12272
|
+
const [bankCategories, setBankCategories] = (0, import_react37.useState)([]);
|
|
12273
|
+
const selectedSubjects = (0, import_react37.useMemo)(
|
|
11799
12274
|
() => selectedSubject ? [selectedSubject] : [],
|
|
11800
12275
|
[selectedSubject]
|
|
11801
12276
|
);
|
|
@@ -11808,7 +12283,7 @@ var ActivityFilters = ({
|
|
|
11808
12283
|
const handleBankCategoriesChange = (updatedCategories) => {
|
|
11809
12284
|
setBankCategories(updatedCategories);
|
|
11810
12285
|
};
|
|
11811
|
-
(0,
|
|
12286
|
+
(0, import_react37.useEffect)(() => {
|
|
11812
12287
|
setBankCategories((prevCategories) => {
|
|
11813
12288
|
const bankCategory = {
|
|
11814
12289
|
key: "banca",
|
|
@@ -11834,37 +12309,42 @@ var ActivityFilters = ({
|
|
|
11834
12309
|
return [bankCategory, yearCategory];
|
|
11835
12310
|
});
|
|
11836
12311
|
}, [banks, bankYears]);
|
|
11837
|
-
(0,
|
|
12312
|
+
(0, import_react37.useEffect)(() => {
|
|
11838
12313
|
if (loadBanks) {
|
|
11839
12314
|
loadBanks();
|
|
11840
12315
|
}
|
|
11841
|
-
if (
|
|
11842
|
-
|
|
12316
|
+
if (loadKnowledgeAreas) {
|
|
12317
|
+
loadKnowledgeAreas();
|
|
11843
12318
|
}
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
|
|
11847
|
-
|
|
12319
|
+
if (loadQuestionTypes) {
|
|
12320
|
+
loadQuestionTypes();
|
|
12321
|
+
}
|
|
12322
|
+
}, [loadBanks, loadKnowledgeAreas, loadQuestionTypes, institutionId]);
|
|
12323
|
+
const availableQuestionTypes = (0, import_react37.useMemo)(() => {
|
|
12324
|
+
const source = questionTypes && questionTypes.length > 0 ? questionTypes : questionTypesFallback;
|
|
12325
|
+
if (!allowedQuestionTypes || allowedQuestionTypes.length === 0) {
|
|
12326
|
+
return source;
|
|
11848
12327
|
}
|
|
11849
|
-
|
|
11850
|
-
|
|
12328
|
+
return source.filter((type) => allowedQuestionTypes.includes(type));
|
|
12329
|
+
}, [questionTypes, allowedQuestionTypes]);
|
|
12330
|
+
const getSelectedKnowledgeIds = (0, import_react37.useCallback)(() => {
|
|
11851
12331
|
return getSelectedIdsFromCategories(knowledgeCategories, {
|
|
11852
12332
|
topicIds: "tema",
|
|
11853
12333
|
subtopicIds: "subtema",
|
|
11854
12334
|
contentIds: "assunto"
|
|
11855
12335
|
});
|
|
11856
12336
|
}, [knowledgeCategories]);
|
|
11857
|
-
const getSelectedBankIds = (0,
|
|
12337
|
+
const getSelectedBankIds = (0, import_react37.useCallback)(() => {
|
|
11858
12338
|
return getSelectedIdsFromCategories(bankCategories, {
|
|
11859
12339
|
bankIds: "banca",
|
|
11860
12340
|
yearIds: "ano"
|
|
11861
12341
|
});
|
|
11862
12342
|
}, [bankCategories]);
|
|
11863
|
-
const onFiltersChangeRef = (0,
|
|
11864
|
-
(0,
|
|
12343
|
+
const onFiltersChangeRef = (0, import_react37.useRef)(onFiltersChange);
|
|
12344
|
+
(0, import_react37.useEffect)(() => {
|
|
11865
12345
|
onFiltersChangeRef.current = onFiltersChange;
|
|
11866
12346
|
}, [onFiltersChange]);
|
|
11867
|
-
(0,
|
|
12347
|
+
(0, import_react37.useEffect)(() => {
|
|
11868
12348
|
const knowledgeIds = getSelectedKnowledgeIds();
|
|
11869
12349
|
const bankIds = getSelectedBankIds();
|
|
11870
12350
|
const filters = {
|
|
@@ -11895,7 +12375,25 @@ var ActivityFilters = ({
|
|
|
11895
12375
|
{
|
|
11896
12376
|
selectedTypes: selectedQuestionTypes,
|
|
11897
12377
|
onToggleType: toggleQuestionType,
|
|
11898
|
-
allowedQuestionTypes
|
|
12378
|
+
allowedQuestionTypes: availableQuestionTypes
|
|
12379
|
+
}
|
|
12380
|
+
),
|
|
12381
|
+
loadingQuestionTypes && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
12382
|
+
Text_default,
|
|
12383
|
+
{
|
|
12384
|
+
size: "sm",
|
|
12385
|
+
className: "text-text-600",
|
|
12386
|
+
"data-testid": "question-types-loading",
|
|
12387
|
+
children: "Carregando tipos de quest\xE3o..."
|
|
12388
|
+
}
|
|
12389
|
+
),
|
|
12390
|
+
questionTypesError && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
12391
|
+
Text_default,
|
|
12392
|
+
{
|
|
12393
|
+
size: "sm",
|
|
12394
|
+
className: "text-error-500",
|
|
12395
|
+
"data-testid": "question-types-error",
|
|
12396
|
+
children: questionTypesError
|
|
11899
12397
|
}
|
|
11900
12398
|
),
|
|
11901
12399
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { children: [
|
|
@@ -11948,7 +12446,7 @@ var ActivityFiltersPopover = ({
|
|
|
11948
12446
|
triggerLabel = "Filtro de quest\xF5es",
|
|
11949
12447
|
...activityFiltersProps
|
|
11950
12448
|
}) => {
|
|
11951
|
-
const [open, setOpen] = (0,
|
|
12449
|
+
const [open, setOpen] = (0, import_react37.useState)(false);
|
|
11952
12450
|
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(DropdownMenu_default, { open, onOpenChange: setOpen, children: [
|
|
11953
12451
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(DropdownMenuTrigger, { children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Button_default, { variant: "outline", children: triggerLabel }) }),
|
|
11954
12452
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
@@ -11970,7 +12468,7 @@ var ActivityFiltersPopover = ({
|
|
|
11970
12468
|
};
|
|
11971
12469
|
|
|
11972
12470
|
// src/components/TableProvider/TableProvider.tsx
|
|
11973
|
-
var
|
|
12471
|
+
var import_react38 = require("react");
|
|
11974
12472
|
var import_phosphor_react26 = require("phosphor-react");
|
|
11975
12473
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
11976
12474
|
function TableProvider({
|
|
@@ -11994,7 +12492,7 @@ function TableProvider({
|
|
|
11994
12492
|
onRowClick,
|
|
11995
12493
|
children
|
|
11996
12494
|
}) {
|
|
11997
|
-
const [searchQuery, setSearchQuery] = (0,
|
|
12495
|
+
const [searchQuery, setSearchQuery] = (0, import_react38.useState)("");
|
|
11998
12496
|
const sortResultRaw = useTableSort(data, { syncWithUrl: true });
|
|
11999
12497
|
const sortResult = enableTableSort ? sortResultRaw : {
|
|
12000
12498
|
sortedData: data,
|
|
@@ -12005,7 +12503,7 @@ function TableProvider({
|
|
|
12005
12503
|
};
|
|
12006
12504
|
const { sortedData, sortColumn, sortDirection, handleSort } = sortResult;
|
|
12007
12505
|
const filterResultRaw = useTableFilter(initialFilters, { syncWithUrl: true });
|
|
12008
|
-
const disabledFilterResult = (0,
|
|
12506
|
+
const disabledFilterResult = (0, import_react38.useMemo)(
|
|
12009
12507
|
() => ({
|
|
12010
12508
|
filterConfigs: [],
|
|
12011
12509
|
activeFilters: {},
|
|
@@ -12035,10 +12533,10 @@ function TableProvider({
|
|
|
12035
12533
|
totalItems,
|
|
12036
12534
|
totalPages
|
|
12037
12535
|
} = paginationConfig;
|
|
12038
|
-
const [currentPage, setCurrentPage] = (0,
|
|
12039
|
-
const [itemsPerPage, setItemsPerPage] = (0,
|
|
12040
|
-
const [isFilterModalOpen, setIsFilterModalOpen] = (0,
|
|
12041
|
-
const combinedParams = (0,
|
|
12536
|
+
const [currentPage, setCurrentPage] = (0, import_react38.useState)(1);
|
|
12537
|
+
const [itemsPerPage, setItemsPerPage] = (0, import_react38.useState)(defaultItemsPerPage);
|
|
12538
|
+
const [isFilterModalOpen, setIsFilterModalOpen] = (0, import_react38.useState)(false);
|
|
12539
|
+
const combinedParams = (0, import_react38.useMemo)(() => {
|
|
12042
12540
|
const params = {
|
|
12043
12541
|
page: currentPage,
|
|
12044
12542
|
limit: itemsPerPage
|
|
@@ -12065,26 +12563,26 @@ function TableProvider({
|
|
|
12065
12563
|
enableFilters,
|
|
12066
12564
|
enableTableSort
|
|
12067
12565
|
]);
|
|
12068
|
-
(0,
|
|
12566
|
+
(0, import_react38.useEffect)(() => {
|
|
12069
12567
|
onParamsChange?.(combinedParams);
|
|
12070
12568
|
}, [combinedParams]);
|
|
12071
|
-
const handleSearchChange = (0,
|
|
12569
|
+
const handleSearchChange = (0, import_react38.useCallback)((value) => {
|
|
12072
12570
|
setSearchQuery(value);
|
|
12073
12571
|
setCurrentPage(1);
|
|
12074
12572
|
}, []);
|
|
12075
|
-
const handleFilterApply = (0,
|
|
12573
|
+
const handleFilterApply = (0, import_react38.useCallback)(() => {
|
|
12076
12574
|
applyFilters();
|
|
12077
12575
|
setIsFilterModalOpen(false);
|
|
12078
12576
|
setCurrentPage(1);
|
|
12079
12577
|
}, [applyFilters]);
|
|
12080
|
-
const handlePageChange = (0,
|
|
12578
|
+
const handlePageChange = (0, import_react38.useCallback)((page) => {
|
|
12081
12579
|
setCurrentPage(page);
|
|
12082
12580
|
}, []);
|
|
12083
|
-
const handleItemsPerPageChange = (0,
|
|
12581
|
+
const handleItemsPerPageChange = (0, import_react38.useCallback)((items) => {
|
|
12084
12582
|
setItemsPerPage(items);
|
|
12085
12583
|
setCurrentPage(1);
|
|
12086
12584
|
}, []);
|
|
12087
|
-
const handleRowClickInternal = (0,
|
|
12585
|
+
const handleRowClickInternal = (0, import_react38.useCallback)(
|
|
12088
12586
|
(row, index) => {
|
|
12089
12587
|
if (enableRowClick && onRowClick) {
|
|
12090
12588
|
onRowClick(row, index);
|
|
@@ -12092,7 +12590,7 @@ function TableProvider({
|
|
|
12092
12590
|
},
|
|
12093
12591
|
[enableRowClick, onRowClick]
|
|
12094
12592
|
);
|
|
12095
|
-
const useInternalPagination = (0,
|
|
12593
|
+
const useInternalPagination = (0, import_react38.useMemo)(
|
|
12096
12594
|
() => enablePagination && !onParamsChange && totalItems === void 0 && totalPages === void 0,
|
|
12097
12595
|
[enablePagination, onParamsChange, totalItems, totalPages]
|
|
12098
12596
|
);
|
|
@@ -12100,7 +12598,7 @@ function TableProvider({
|
|
|
12100
12598
|
(totalItems ?? (useInternalPagination ? sortedData.length : data.length)) / itemsPerPage
|
|
12101
12599
|
);
|
|
12102
12600
|
const calculatedTotalItems = totalItems ?? (useInternalPagination ? sortedData.length : data.length);
|
|
12103
|
-
const displayData = (0,
|
|
12601
|
+
const displayData = (0, import_react38.useMemo)(() => {
|
|
12104
12602
|
if (!useInternalPagination) {
|
|
12105
12603
|
return sortedData;
|
|
12106
12604
|
}
|
|
@@ -12267,7 +12765,7 @@ var TableProvider_default = TableProvider;
|
|
|
12267
12765
|
|
|
12268
12766
|
// src/components/Select/Select.tsx
|
|
12269
12767
|
var import_zustand10 = require("zustand");
|
|
12270
|
-
var
|
|
12768
|
+
var import_react39 = require("react");
|
|
12271
12769
|
var import_phosphor_react27 = require("phosphor-react");
|
|
12272
12770
|
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
12273
12771
|
var VARIANT_CLASSES4 = {
|
|
@@ -12327,13 +12825,13 @@ function getLabelAsNode(children) {
|
|
|
12327
12825
|
if (typeof children === "string" || typeof children === "number") {
|
|
12328
12826
|
return children;
|
|
12329
12827
|
}
|
|
12330
|
-
const flattened =
|
|
12828
|
+
const flattened = import_react39.Children.toArray(children);
|
|
12331
12829
|
if (flattened.length === 1) return flattened[0];
|
|
12332
12830
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_jsx_runtime60.Fragment, { children: flattened });
|
|
12333
12831
|
}
|
|
12334
12832
|
var injectStore5 = (children, store, size, selectId) => {
|
|
12335
|
-
return
|
|
12336
|
-
if ((0,
|
|
12833
|
+
return import_react39.Children.map(children, (child) => {
|
|
12834
|
+
if ((0, import_react39.isValidElement)(child)) {
|
|
12337
12835
|
const typedChild = child;
|
|
12338
12836
|
const newProps = {
|
|
12339
12837
|
store
|
|
@@ -12350,7 +12848,7 @@ var injectStore5 = (children, store, size, selectId) => {
|
|
|
12350
12848
|
selectId
|
|
12351
12849
|
);
|
|
12352
12850
|
}
|
|
12353
|
-
return (0,
|
|
12851
|
+
return (0, import_react39.cloneElement)(typedChild, newProps);
|
|
12354
12852
|
}
|
|
12355
12853
|
return child;
|
|
12356
12854
|
});
|
|
@@ -12367,18 +12865,18 @@ var Select = ({
|
|
|
12367
12865
|
errorMessage,
|
|
12368
12866
|
id
|
|
12369
12867
|
}) => {
|
|
12370
|
-
const storeRef = (0,
|
|
12868
|
+
const storeRef = (0, import_react39.useRef)(null);
|
|
12371
12869
|
storeRef.current ??= createSelectStore(onValueChange);
|
|
12372
12870
|
const store = storeRef.current;
|
|
12373
|
-
const selectRef = (0,
|
|
12871
|
+
const selectRef = (0, import_react39.useRef)(null);
|
|
12374
12872
|
const { open, setOpen, setValue, selectedLabel } = (0, import_zustand10.useStore)(store, (s) => s);
|
|
12375
|
-
const generatedId = (0,
|
|
12873
|
+
const generatedId = (0, import_react39.useId)();
|
|
12376
12874
|
const selectId = id ?? `select-${generatedId}`;
|
|
12377
12875
|
const findLabelForValue = (children2, targetValue) => {
|
|
12378
12876
|
let found = null;
|
|
12379
12877
|
const search = (nodes) => {
|
|
12380
|
-
|
|
12381
|
-
if (!(0,
|
|
12878
|
+
import_react39.Children.forEach(nodes, (child) => {
|
|
12879
|
+
if (!(0, import_react39.isValidElement)(child)) return;
|
|
12382
12880
|
const typedChild = child;
|
|
12383
12881
|
if (typedChild.type === SelectItem && typedChild.props.value === targetValue) {
|
|
12384
12882
|
if (typeof typedChild.props.children === "string")
|
|
@@ -12391,13 +12889,13 @@ var Select = ({
|
|
|
12391
12889
|
search(children2);
|
|
12392
12890
|
return found;
|
|
12393
12891
|
};
|
|
12394
|
-
(0,
|
|
12892
|
+
(0, import_react39.useEffect)(() => {
|
|
12395
12893
|
if (!selectedLabel && defaultValue) {
|
|
12396
12894
|
const label2 = findLabelForValue(children, defaultValue);
|
|
12397
12895
|
if (label2) store.setState({ selectedLabel: label2 });
|
|
12398
12896
|
}
|
|
12399
12897
|
}, [children, defaultValue, selectedLabel]);
|
|
12400
|
-
(0,
|
|
12898
|
+
(0, import_react39.useEffect)(() => {
|
|
12401
12899
|
const handleClickOutside = (event) => {
|
|
12402
12900
|
if (selectRef.current && !selectRef.current.contains(event.target)) {
|
|
12403
12901
|
setOpen(false);
|
|
@@ -12432,7 +12930,7 @@ var Select = ({
|
|
|
12432
12930
|
document.removeEventListener("keydown", handleArrowKeys);
|
|
12433
12931
|
};
|
|
12434
12932
|
}, [open]);
|
|
12435
|
-
(0,
|
|
12933
|
+
(0, import_react39.useEffect)(() => {
|
|
12436
12934
|
if (propValue) {
|
|
12437
12935
|
setValue(propValue);
|
|
12438
12936
|
const label2 = findLabelForValue(children, propValue);
|
|
@@ -12469,7 +12967,7 @@ var SelectValue = ({
|
|
|
12469
12967
|
const value = (0, import_zustand10.useStore)(store, (s) => s.value);
|
|
12470
12968
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { className: "text-inherit flex gap-2 items-center", children: selectedLabel || placeholder || value });
|
|
12471
12969
|
};
|
|
12472
|
-
var SelectTrigger = (0,
|
|
12970
|
+
var SelectTrigger = (0, import_react39.forwardRef)(
|
|
12473
12971
|
({
|
|
12474
12972
|
className,
|
|
12475
12973
|
invalid = false,
|
|
@@ -12523,7 +13021,7 @@ var SelectTrigger = (0, import_react38.forwardRef)(
|
|
|
12523
13021
|
}
|
|
12524
13022
|
);
|
|
12525
13023
|
SelectTrigger.displayName = "SelectTrigger";
|
|
12526
|
-
var SelectContent = (0,
|
|
13024
|
+
var SelectContent = (0, import_react39.forwardRef)(
|
|
12527
13025
|
({
|
|
12528
13026
|
children,
|
|
12529
13027
|
className,
|
|
@@ -12553,7 +13051,7 @@ var SelectContent = (0, import_react38.forwardRef)(
|
|
|
12553
13051
|
}
|
|
12554
13052
|
);
|
|
12555
13053
|
SelectContent.displayName = "SelectContent";
|
|
12556
|
-
var SelectItem = (0,
|
|
13054
|
+
var SelectItem = (0, import_react39.forwardRef)(
|
|
12557
13055
|
({
|
|
12558
13056
|
className,
|
|
12559
13057
|
children,
|
|
@@ -12612,7 +13110,7 @@ var Select_default = Select;
|
|
|
12612
13110
|
|
|
12613
13111
|
// src/components/Menu/Menu.tsx
|
|
12614
13112
|
var import_zustand11 = require("zustand");
|
|
12615
|
-
var
|
|
13113
|
+
var import_react40 = require("react");
|
|
12616
13114
|
var import_phosphor_react28 = require("phosphor-react");
|
|
12617
13115
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
12618
13116
|
var createMenuStore = (onValueChange) => (0, import_zustand11.create)((set) => ({
|
|
@@ -12633,7 +13131,7 @@ var VARIANT_CLASSES5 = {
|
|
|
12633
13131
|
"menu-overflow": "",
|
|
12634
13132
|
breadcrumb: "bg-transparent shadow-none !px-0"
|
|
12635
13133
|
};
|
|
12636
|
-
var Menu = (0,
|
|
13134
|
+
var Menu = (0, import_react40.forwardRef)(
|
|
12637
13135
|
({
|
|
12638
13136
|
className,
|
|
12639
13137
|
children,
|
|
@@ -12643,11 +13141,11 @@ var Menu = (0, import_react39.forwardRef)(
|
|
|
12643
13141
|
onValueChange,
|
|
12644
13142
|
...props
|
|
12645
13143
|
}, ref) => {
|
|
12646
|
-
const storeRef = (0,
|
|
13144
|
+
const storeRef = (0, import_react40.useRef)(null);
|
|
12647
13145
|
storeRef.current ??= createMenuStore(onValueChange);
|
|
12648
13146
|
const store = storeRef.current;
|
|
12649
13147
|
const { setValue } = (0, import_zustand11.useStore)(store, (s) => s);
|
|
12650
|
-
(0,
|
|
13148
|
+
(0, import_react40.useEffect)(() => {
|
|
12651
13149
|
setValue(propValue ?? defaultValue);
|
|
12652
13150
|
}, [defaultValue, propValue, setValue]);
|
|
12653
13151
|
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";
|
|
@@ -12668,7 +13166,7 @@ var Menu = (0, import_react39.forwardRef)(
|
|
|
12668
13166
|
}
|
|
12669
13167
|
);
|
|
12670
13168
|
Menu.displayName = "Menu";
|
|
12671
|
-
var MenuContent = (0,
|
|
13169
|
+
var MenuContent = (0, import_react40.forwardRef)(
|
|
12672
13170
|
({ className, children, variant = "menu", ...props }, ref) => {
|
|
12673
13171
|
const baseClasses = "w-full flex flex-row items-center gap-2";
|
|
12674
13172
|
const variantClasses = variant === "menu2" || variant === "menu-overflow" ? "overflow-x-auto scroll-smooth" : "";
|
|
@@ -12690,7 +13188,7 @@ var MenuContent = (0, import_react39.forwardRef)(
|
|
|
12690
13188
|
}
|
|
12691
13189
|
);
|
|
12692
13190
|
MenuContent.displayName = "MenuContent";
|
|
12693
|
-
var MenuItem = (0,
|
|
13191
|
+
var MenuItem = (0, import_react40.forwardRef)(
|
|
12694
13192
|
({
|
|
12695
13193
|
className,
|
|
12696
13194
|
children,
|
|
@@ -12848,10 +13346,10 @@ var MenuOverflow = ({
|
|
|
12848
13346
|
onValueChange,
|
|
12849
13347
|
...props
|
|
12850
13348
|
}) => {
|
|
12851
|
-
const containerRef = (0,
|
|
12852
|
-
const [showLeftArrow, setShowLeftArrow] = (0,
|
|
12853
|
-
const [showRightArrow, setShowRightArrow] = (0,
|
|
12854
|
-
(0,
|
|
13349
|
+
const containerRef = (0, import_react40.useRef)(null);
|
|
13350
|
+
const [showLeftArrow, setShowLeftArrow] = (0, import_react40.useState)(false);
|
|
13351
|
+
const [showRightArrow, setShowRightArrow] = (0, import_react40.useState)(false);
|
|
13352
|
+
(0, import_react40.useEffect)(() => {
|
|
12855
13353
|
const checkScroll = () => internalCheckScroll(
|
|
12856
13354
|
containerRef.current,
|
|
12857
13355
|
setShowLeftArrow,
|
|
@@ -12911,11 +13409,11 @@ var MenuOverflow = ({
|
|
|
12911
13409
|
}
|
|
12912
13410
|
);
|
|
12913
13411
|
};
|
|
12914
|
-
var injectStore6 = (children, store) =>
|
|
12915
|
-
if (!(0,
|
|
13412
|
+
var injectStore6 = (children, store) => import_react40.Children.map(children, (child) => {
|
|
13413
|
+
if (!(0, import_react40.isValidElement)(child)) return child;
|
|
12916
13414
|
const typedChild = child;
|
|
12917
13415
|
const shouldInject = typedChild.type === MenuItem;
|
|
12918
|
-
return (0,
|
|
13416
|
+
return (0, import_react40.cloneElement)(typedChild, {
|
|
12919
13417
|
...shouldInject ? { store } : {},
|
|
12920
13418
|
...typedChild.props.children ? { children: injectStore6(typedChild.props.children, store) } : {}
|
|
12921
13419
|
});
|
|
@@ -13174,12 +13672,12 @@ var NotFound = ({
|
|
|
13174
13672
|
var NotFound_default = NotFound;
|
|
13175
13673
|
|
|
13176
13674
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
13177
|
-
var
|
|
13675
|
+
var import_react42 = require("react");
|
|
13178
13676
|
var import_react_dom = require("react-dom");
|
|
13179
13677
|
var import_phosphor_react31 = require("phosphor-react");
|
|
13180
13678
|
|
|
13181
13679
|
// src/components/DownloadButton/DownloadButton.tsx
|
|
13182
|
-
var
|
|
13680
|
+
var import_react41 = require("react");
|
|
13183
13681
|
var import_phosphor_react30 = require("phosphor-react");
|
|
13184
13682
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
13185
13683
|
var getMimeType = (url) => {
|
|
@@ -13256,13 +13754,13 @@ var DownloadButton = ({
|
|
|
13256
13754
|
lessonTitle = "aula",
|
|
13257
13755
|
disabled = false
|
|
13258
13756
|
}) => {
|
|
13259
|
-
const [isDownloading, setIsDownloading] = (0,
|
|
13260
|
-
const isValidUrl = (0,
|
|
13757
|
+
const [isDownloading, setIsDownloading] = (0, import_react41.useState)(false);
|
|
13758
|
+
const isValidUrl = (0, import_react41.useCallback)((url) => {
|
|
13261
13759
|
return Boolean(
|
|
13262
13760
|
url && url.trim() !== "" && url !== "undefined" && url !== "null"
|
|
13263
13761
|
);
|
|
13264
13762
|
}, []);
|
|
13265
|
-
const getAvailableContent = (0,
|
|
13763
|
+
const getAvailableContent = (0, import_react41.useCallback)(() => {
|
|
13266
13764
|
const downloads = [];
|
|
13267
13765
|
if (isValidUrl(content.urlDoc)) {
|
|
13268
13766
|
downloads.push({
|
|
@@ -13297,7 +13795,7 @@ var DownloadButton = ({
|
|
|
13297
13795
|
}
|
|
13298
13796
|
return downloads;
|
|
13299
13797
|
}, [content, isValidUrl]);
|
|
13300
|
-
const handleDownload = (0,
|
|
13798
|
+
const handleDownload = (0, import_react41.useCallback)(async () => {
|
|
13301
13799
|
if (disabled || isDownloading) return;
|
|
13302
13800
|
const availableContent = getAvailableContent();
|
|
13303
13801
|
if (availableContent.length === 0) {
|
|
@@ -13435,9 +13933,9 @@ var SpeedMenu = ({
|
|
|
13435
13933
|
iconSize = 24,
|
|
13436
13934
|
isTinyMobile = false
|
|
13437
13935
|
}) => {
|
|
13438
|
-
const buttonRef = (0,
|
|
13439
|
-
const speedMenuContainerRef = (0,
|
|
13440
|
-
const speedMenuRef = (0,
|
|
13936
|
+
const buttonRef = (0, import_react42.useRef)(null);
|
|
13937
|
+
const speedMenuContainerRef = (0, import_react42.useRef)(null);
|
|
13938
|
+
const speedMenuRef = (0, import_react42.useRef)(null);
|
|
13441
13939
|
const getMenuPosition = () => {
|
|
13442
13940
|
if (!buttonRef.current) return { top: 0, left: 0 };
|
|
13443
13941
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
@@ -13451,7 +13949,7 @@ var SpeedMenu = ({
|
|
|
13451
13949
|
};
|
|
13452
13950
|
};
|
|
13453
13951
|
const position = getMenuPosition();
|
|
13454
|
-
(0,
|
|
13952
|
+
(0, import_react42.useEffect)(() => {
|
|
13455
13953
|
const handleClickOutside = (event) => {
|
|
13456
13954
|
const target = event.target;
|
|
13457
13955
|
const isOutsideContainer = speedMenuContainerRef.current && !speedMenuContainerRef.current.contains(target);
|
|
@@ -13530,28 +14028,28 @@ var VideoPlayer = ({
|
|
|
13530
14028
|
onDownloadComplete,
|
|
13531
14029
|
onDownloadError
|
|
13532
14030
|
}) => {
|
|
13533
|
-
const videoRef = (0,
|
|
14031
|
+
const videoRef = (0, import_react42.useRef)(null);
|
|
13534
14032
|
const { isUltraSmallMobile, isTinyMobile } = useMobile();
|
|
13535
|
-
const [isPlaying, setIsPlaying] = (0,
|
|
13536
|
-
const [currentTime, setCurrentTime] = (0,
|
|
13537
|
-
const [duration, setDuration] = (0,
|
|
13538
|
-
const [isMuted, setIsMuted] = (0,
|
|
13539
|
-
const [volume, setVolume] = (0,
|
|
13540
|
-
const [isFullscreen, setIsFullscreen] = (0,
|
|
13541
|
-
const [showControls, setShowControls] = (0,
|
|
13542
|
-
const [hasCompleted, setHasCompleted] = (0,
|
|
13543
|
-
const [showCaptions, setShowCaptions] = (0,
|
|
13544
|
-
const [subtitlesValidation, setSubtitlesValidation] = (0,
|
|
13545
|
-
(0,
|
|
14033
|
+
const [isPlaying, setIsPlaying] = (0, import_react42.useState)(false);
|
|
14034
|
+
const [currentTime, setCurrentTime] = (0, import_react42.useState)(0);
|
|
14035
|
+
const [duration, setDuration] = (0, import_react42.useState)(0);
|
|
14036
|
+
const [isMuted, setIsMuted] = (0, import_react42.useState)(false);
|
|
14037
|
+
const [volume, setVolume] = (0, import_react42.useState)(1);
|
|
14038
|
+
const [isFullscreen, setIsFullscreen] = (0, import_react42.useState)(false);
|
|
14039
|
+
const [showControls, setShowControls] = (0, import_react42.useState)(true);
|
|
14040
|
+
const [hasCompleted, setHasCompleted] = (0, import_react42.useState)(false);
|
|
14041
|
+
const [showCaptions, setShowCaptions] = (0, import_react42.useState)(false);
|
|
14042
|
+
const [subtitlesValidation, setSubtitlesValidation] = (0, import_react42.useState)("idle");
|
|
14043
|
+
(0, import_react42.useEffect)(() => {
|
|
13546
14044
|
setHasCompleted(false);
|
|
13547
14045
|
}, [src]);
|
|
13548
|
-
const [playbackRate, setPlaybackRate] = (0,
|
|
13549
|
-
const [showSpeedMenu, setShowSpeedMenu] = (0,
|
|
13550
|
-
const lastSaveTimeRef = (0,
|
|
13551
|
-
const trackRef = (0,
|
|
13552
|
-
const controlsTimeoutRef = (0,
|
|
13553
|
-
const lastMousePositionRef = (0,
|
|
13554
|
-
const isUserInteracting = (0,
|
|
14046
|
+
const [playbackRate, setPlaybackRate] = (0, import_react42.useState)(1);
|
|
14047
|
+
const [showSpeedMenu, setShowSpeedMenu] = (0, import_react42.useState)(false);
|
|
14048
|
+
const lastSaveTimeRef = (0, import_react42.useRef)(0);
|
|
14049
|
+
const trackRef = (0, import_react42.useRef)(null);
|
|
14050
|
+
const controlsTimeoutRef = (0, import_react42.useRef)(null);
|
|
14051
|
+
const lastMousePositionRef = (0, import_react42.useRef)({ x: 0, y: 0 });
|
|
14052
|
+
const isUserInteracting = (0, import_react42.useCallback)(() => {
|
|
13555
14053
|
if (showSpeedMenu) {
|
|
13556
14054
|
return true;
|
|
13557
14055
|
}
|
|
@@ -13568,13 +14066,13 @@ var VideoPlayer = ({
|
|
|
13568
14066
|
}
|
|
13569
14067
|
return false;
|
|
13570
14068
|
}, [showSpeedMenu]);
|
|
13571
|
-
const clearControlsTimeout = (0,
|
|
14069
|
+
const clearControlsTimeout = (0, import_react42.useCallback)(() => {
|
|
13572
14070
|
if (controlsTimeoutRef.current) {
|
|
13573
14071
|
clearTimeout(controlsTimeoutRef.current);
|
|
13574
14072
|
controlsTimeoutRef.current = null;
|
|
13575
14073
|
}
|
|
13576
14074
|
}, []);
|
|
13577
|
-
const showControlsWithTimer = (0,
|
|
14075
|
+
const showControlsWithTimer = (0, import_react42.useCallback)(() => {
|
|
13578
14076
|
setShowControls(true);
|
|
13579
14077
|
clearControlsTimeout();
|
|
13580
14078
|
if (isFullscreen) {
|
|
@@ -13589,7 +14087,7 @@ var VideoPlayer = ({
|
|
|
13589
14087
|
}, CONTROLS_HIDE_TIMEOUT);
|
|
13590
14088
|
}
|
|
13591
14089
|
}, [isFullscreen, isPlaying, clearControlsTimeout]);
|
|
13592
|
-
const handleMouseMove = (0,
|
|
14090
|
+
const handleMouseMove = (0, import_react42.useCallback)(
|
|
13593
14091
|
(event) => {
|
|
13594
14092
|
const currentX = event.clientX;
|
|
13595
14093
|
const currentY = event.clientY;
|
|
@@ -13602,10 +14100,10 @@ var VideoPlayer = ({
|
|
|
13602
14100
|
},
|
|
13603
14101
|
[showControlsWithTimer]
|
|
13604
14102
|
);
|
|
13605
|
-
const handleMouseEnter = (0,
|
|
14103
|
+
const handleMouseEnter = (0, import_react42.useCallback)(() => {
|
|
13606
14104
|
showControlsWithTimer();
|
|
13607
14105
|
}, [showControlsWithTimer]);
|
|
13608
|
-
const handleMouseLeave = (0,
|
|
14106
|
+
const handleMouseLeave = (0, import_react42.useCallback)(() => {
|
|
13609
14107
|
const userInteracting = isUserInteracting();
|
|
13610
14108
|
clearControlsTimeout();
|
|
13611
14109
|
if (!isFullscreen && !userInteracting) {
|
|
@@ -13614,13 +14112,13 @@ var VideoPlayer = ({
|
|
|
13614
14112
|
}, LEAVE_HIDE_TIMEOUT);
|
|
13615
14113
|
}
|
|
13616
14114
|
}, [isFullscreen, clearControlsTimeout, isUserInteracting]);
|
|
13617
|
-
(0,
|
|
14115
|
+
(0, import_react42.useEffect)(() => {
|
|
13618
14116
|
if (videoRef.current) {
|
|
13619
14117
|
videoRef.current.volume = volume;
|
|
13620
14118
|
videoRef.current.muted = isMuted;
|
|
13621
14119
|
}
|
|
13622
14120
|
}, [volume, isMuted]);
|
|
13623
|
-
(0,
|
|
14121
|
+
(0, import_react42.useEffect)(() => {
|
|
13624
14122
|
const video = videoRef.current;
|
|
13625
14123
|
if (!video) return;
|
|
13626
14124
|
const onPlay = () => setIsPlaying(true);
|
|
@@ -13635,13 +14133,13 @@ var VideoPlayer = ({
|
|
|
13635
14133
|
video.removeEventListener("ended", onEnded);
|
|
13636
14134
|
};
|
|
13637
14135
|
}, []);
|
|
13638
|
-
(0,
|
|
14136
|
+
(0, import_react42.useEffect)(() => {
|
|
13639
14137
|
const video = videoRef.current;
|
|
13640
14138
|
if (!video) return;
|
|
13641
14139
|
video.setAttribute("playsinline", "");
|
|
13642
14140
|
video.setAttribute("webkit-playsinline", "");
|
|
13643
14141
|
}, []);
|
|
13644
|
-
(0,
|
|
14142
|
+
(0, import_react42.useEffect)(() => {
|
|
13645
14143
|
if (isPlaying) {
|
|
13646
14144
|
showControlsWithTimer();
|
|
13647
14145
|
} else {
|
|
@@ -13653,7 +14151,7 @@ var VideoPlayer = ({
|
|
|
13653
14151
|
}
|
|
13654
14152
|
}
|
|
13655
14153
|
}, [isPlaying, isFullscreen, showControlsWithTimer, clearControlsTimeout]);
|
|
13656
|
-
(0,
|
|
14154
|
+
(0, import_react42.useEffect)(() => {
|
|
13657
14155
|
const video = videoRef.current;
|
|
13658
14156
|
if (!video) return;
|
|
13659
14157
|
const handleFullscreenChange = () => {
|
|
@@ -13688,7 +14186,7 @@ var VideoPlayer = ({
|
|
|
13688
14186
|
);
|
|
13689
14187
|
};
|
|
13690
14188
|
}, [showControlsWithTimer]);
|
|
13691
|
-
(0,
|
|
14189
|
+
(0, import_react42.useEffect)(() => {
|
|
13692
14190
|
const init = () => {
|
|
13693
14191
|
if (!isFullscreen) {
|
|
13694
14192
|
showControlsWithTimer();
|
|
@@ -13710,7 +14208,7 @@ var VideoPlayer = ({
|
|
|
13710
14208
|
};
|
|
13711
14209
|
}
|
|
13712
14210
|
}, []);
|
|
13713
|
-
const getInitialTime = (0,
|
|
14211
|
+
const getInitialTime = (0, import_react42.useCallback)(() => {
|
|
13714
14212
|
if (!autoSave || !storageKey) {
|
|
13715
14213
|
return Number.isFinite(initialTime) && initialTime >= 0 ? initialTime : void 0;
|
|
13716
14214
|
}
|
|
@@ -13723,14 +14221,14 @@ var VideoPlayer = ({
|
|
|
13723
14221
|
if (hasValidSaved) return saved;
|
|
13724
14222
|
return void 0;
|
|
13725
14223
|
}, [autoSave, storageKey, src, initialTime]);
|
|
13726
|
-
(0,
|
|
14224
|
+
(0, import_react42.useEffect)(() => {
|
|
13727
14225
|
const start = getInitialTime();
|
|
13728
14226
|
if (start !== void 0 && videoRef.current) {
|
|
13729
14227
|
videoRef.current.currentTime = start;
|
|
13730
14228
|
setCurrentTime(start);
|
|
13731
14229
|
}
|
|
13732
14230
|
}, [getInitialTime]);
|
|
13733
|
-
const saveProgress = (0,
|
|
14231
|
+
const saveProgress = (0, import_react42.useCallback)(
|
|
13734
14232
|
(time) => {
|
|
13735
14233
|
if (!autoSave || !storageKey) return;
|
|
13736
14234
|
const now = Date.now();
|
|
@@ -13741,7 +14239,7 @@ var VideoPlayer = ({
|
|
|
13741
14239
|
},
|
|
13742
14240
|
[autoSave, storageKey, src]
|
|
13743
14241
|
);
|
|
13744
|
-
const togglePlayPause = (0,
|
|
14242
|
+
const togglePlayPause = (0, import_react42.useCallback)(async () => {
|
|
13745
14243
|
const video = videoRef.current;
|
|
13746
14244
|
if (!video) return;
|
|
13747
14245
|
if (!video.paused) {
|
|
@@ -13753,7 +14251,7 @@ var VideoPlayer = ({
|
|
|
13753
14251
|
} catch {
|
|
13754
14252
|
}
|
|
13755
14253
|
}, []);
|
|
13756
|
-
const handleVolumeChange = (0,
|
|
14254
|
+
const handleVolumeChange = (0, import_react42.useCallback)(
|
|
13757
14255
|
(newVolume) => {
|
|
13758
14256
|
const video = videoRef.current;
|
|
13759
14257
|
if (!video) return;
|
|
@@ -13772,7 +14270,7 @@ var VideoPlayer = ({
|
|
|
13772
14270
|
},
|
|
13773
14271
|
[isMuted]
|
|
13774
14272
|
);
|
|
13775
|
-
const toggleMute = (0,
|
|
14273
|
+
const toggleMute = (0, import_react42.useCallback)(() => {
|
|
13776
14274
|
const video = videoRef.current;
|
|
13777
14275
|
if (!video) return;
|
|
13778
14276
|
if (isMuted) {
|
|
@@ -13786,20 +14284,20 @@ var VideoPlayer = ({
|
|
|
13786
14284
|
setIsMuted(true);
|
|
13787
14285
|
}
|
|
13788
14286
|
}, [isMuted, volume]);
|
|
13789
|
-
const handleSeek = (0,
|
|
14287
|
+
const handleSeek = (0, import_react42.useCallback)((newTime) => {
|
|
13790
14288
|
const video = videoRef.current;
|
|
13791
14289
|
if (video) {
|
|
13792
14290
|
video.currentTime = newTime;
|
|
13793
14291
|
}
|
|
13794
14292
|
}, []);
|
|
13795
|
-
const isSafariIOS = (0,
|
|
14293
|
+
const isSafariIOS = (0, import_react42.useCallback)(() => {
|
|
13796
14294
|
const ua = navigator.userAgent;
|
|
13797
14295
|
const isIOS = /iPad|iPhone|iPod/.test(ua);
|
|
13798
14296
|
const isWebKit = /WebKit/.test(ua);
|
|
13799
14297
|
const isNotChrome = !/CriOS|Chrome/.test(ua);
|
|
13800
14298
|
return isIOS && isWebKit && isNotChrome;
|
|
13801
14299
|
}, []);
|
|
13802
|
-
const toggleFullscreen = (0,
|
|
14300
|
+
const toggleFullscreen = (0, import_react42.useCallback)(() => {
|
|
13803
14301
|
const video = videoRef.current;
|
|
13804
14302
|
const container = video?.parentElement;
|
|
13805
14303
|
if (!video || !container) return;
|
|
@@ -13816,24 +14314,24 @@ var VideoPlayer = ({
|
|
|
13816
14314
|
document.exitFullscreen();
|
|
13817
14315
|
}
|
|
13818
14316
|
}, [isFullscreen, isSafariIOS]);
|
|
13819
|
-
const handleSpeedChange = (0,
|
|
14317
|
+
const handleSpeedChange = (0, import_react42.useCallback)((speed) => {
|
|
13820
14318
|
if (videoRef.current) {
|
|
13821
14319
|
videoRef.current.playbackRate = speed;
|
|
13822
14320
|
setPlaybackRate(speed);
|
|
13823
14321
|
setShowSpeedMenu(false);
|
|
13824
14322
|
}
|
|
13825
14323
|
}, []);
|
|
13826
|
-
const toggleSpeedMenu = (0,
|
|
14324
|
+
const toggleSpeedMenu = (0, import_react42.useCallback)(() => {
|
|
13827
14325
|
setShowSpeedMenu(!showSpeedMenu);
|
|
13828
14326
|
}, [showSpeedMenu]);
|
|
13829
|
-
const toggleCaptions = (0,
|
|
14327
|
+
const toggleCaptions = (0, import_react42.useCallback)(() => {
|
|
13830
14328
|
if (!trackRef.current?.track || !subtitles || subtitlesValidation !== "valid")
|
|
13831
14329
|
return;
|
|
13832
14330
|
const newShowCaptions = !showCaptions;
|
|
13833
14331
|
setShowCaptions(newShowCaptions);
|
|
13834
14332
|
trackRef.current.track.mode = newShowCaptions ? "showing" : "hidden";
|
|
13835
14333
|
}, [showCaptions, subtitles, subtitlesValidation]);
|
|
13836
|
-
const checkVideoCompletion = (0,
|
|
14334
|
+
const checkVideoCompletion = (0, import_react42.useCallback)(
|
|
13837
14335
|
(progressPercent) => {
|
|
13838
14336
|
if (progressPercent >= 95 && !hasCompleted) {
|
|
13839
14337
|
setHasCompleted(true);
|
|
@@ -13842,7 +14340,7 @@ var VideoPlayer = ({
|
|
|
13842
14340
|
},
|
|
13843
14341
|
[hasCompleted, onVideoComplete]
|
|
13844
14342
|
);
|
|
13845
|
-
const handleTimeUpdate = (0,
|
|
14343
|
+
const handleTimeUpdate = (0, import_react42.useCallback)(() => {
|
|
13846
14344
|
const video = videoRef.current;
|
|
13847
14345
|
if (!video) return;
|
|
13848
14346
|
const current = video.currentTime;
|
|
@@ -13855,12 +14353,12 @@ var VideoPlayer = ({
|
|
|
13855
14353
|
checkVideoCompletion(progressPercent);
|
|
13856
14354
|
}
|
|
13857
14355
|
}, [duration, saveProgress, onTimeUpdate, onProgress, checkVideoCompletion]);
|
|
13858
|
-
const handleLoadedMetadata = (0,
|
|
14356
|
+
const handleLoadedMetadata = (0, import_react42.useCallback)(() => {
|
|
13859
14357
|
if (videoRef.current) {
|
|
13860
14358
|
setDuration(videoRef.current.duration);
|
|
13861
14359
|
}
|
|
13862
14360
|
}, []);
|
|
13863
|
-
(0,
|
|
14361
|
+
(0, import_react42.useEffect)(() => {
|
|
13864
14362
|
const controller = new AbortController();
|
|
13865
14363
|
const validateSubtitles = async () => {
|
|
13866
14364
|
if (!subtitles) {
|
|
@@ -13907,12 +14405,12 @@ var VideoPlayer = ({
|
|
|
13907
14405
|
controller.abort();
|
|
13908
14406
|
};
|
|
13909
14407
|
}, [subtitles]);
|
|
13910
|
-
(0,
|
|
14408
|
+
(0, import_react42.useEffect)(() => {
|
|
13911
14409
|
if (trackRef.current?.track) {
|
|
13912
14410
|
trackRef.current.track.mode = showCaptions && subtitles && subtitlesValidation === "valid" ? "showing" : "hidden";
|
|
13913
14411
|
}
|
|
13914
14412
|
}, [subtitles, showCaptions, subtitlesValidation]);
|
|
13915
|
-
(0,
|
|
14413
|
+
(0, import_react42.useEffect)(() => {
|
|
13916
14414
|
const handleVisibilityChange = () => {
|
|
13917
14415
|
if (document.hidden && isPlaying && videoRef.current) {
|
|
13918
14416
|
videoRef.current.pause();
|
|
@@ -13934,54 +14432,54 @@ var VideoPlayer = ({
|
|
|
13934
14432
|
};
|
|
13935
14433
|
}, [isPlaying, clearControlsTimeout]);
|
|
13936
14434
|
const progressPercentage = duration > 0 ? currentTime / duration * 100 : 0;
|
|
13937
|
-
const getIconSize2 = (0,
|
|
14435
|
+
const getIconSize2 = (0, import_react42.useCallback)(() => {
|
|
13938
14436
|
if (isTinyMobile) return 18;
|
|
13939
14437
|
if (isUltraSmallMobile) return 20;
|
|
13940
14438
|
return 24;
|
|
13941
14439
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
13942
|
-
const getControlsPadding = (0,
|
|
14440
|
+
const getControlsPadding = (0, import_react42.useCallback)(() => {
|
|
13943
14441
|
if (isTinyMobile) return "px-2 pb-2 pt-1";
|
|
13944
14442
|
if (isUltraSmallMobile) return "px-3 pb-3 pt-1";
|
|
13945
14443
|
return "px-4 pb-4";
|
|
13946
14444
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
13947
|
-
const getControlsGap = (0,
|
|
14445
|
+
const getControlsGap = (0, import_react42.useCallback)(() => {
|
|
13948
14446
|
if (isTinyMobile) return "gap-1";
|
|
13949
14447
|
if (isUltraSmallMobile) return "gap-2";
|
|
13950
14448
|
return "gap-4";
|
|
13951
14449
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
13952
|
-
const getProgressBarPadding = (0,
|
|
14450
|
+
const getProgressBarPadding = (0, import_react42.useCallback)(() => {
|
|
13953
14451
|
if (isTinyMobile) return "px-2 pb-1";
|
|
13954
14452
|
if (isUltraSmallMobile) return "px-3 pb-1";
|
|
13955
14453
|
return "px-4 pb-2";
|
|
13956
14454
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
13957
|
-
const getCenterPlayButtonPosition = (0,
|
|
14455
|
+
const getCenterPlayButtonPosition = (0, import_react42.useCallback)(() => {
|
|
13958
14456
|
if (isTinyMobile) return "items-center justify-center -translate-y-12";
|
|
13959
14457
|
if (isUltraSmallMobile) return "items-center justify-center -translate-y-8";
|
|
13960
14458
|
return "items-center justify-center";
|
|
13961
14459
|
}, [isTinyMobile, isUltraSmallMobile]);
|
|
13962
|
-
const getTopControlsOpacity = (0,
|
|
14460
|
+
const getTopControlsOpacity = (0, import_react42.useCallback)(() => {
|
|
13963
14461
|
return showControls ? "opacity-100" : "opacity-0";
|
|
13964
14462
|
}, [showControls]);
|
|
13965
|
-
const getBottomControlsOpacity = (0,
|
|
14463
|
+
const getBottomControlsOpacity = (0, import_react42.useCallback)(() => {
|
|
13966
14464
|
return showControls ? "opacity-100" : "opacity-0";
|
|
13967
14465
|
}, [showControls]);
|
|
13968
|
-
const seekBackward = (0,
|
|
14466
|
+
const seekBackward = (0, import_react42.useCallback)(() => {
|
|
13969
14467
|
if (videoRef.current) {
|
|
13970
14468
|
videoRef.current.currentTime -= 10;
|
|
13971
14469
|
}
|
|
13972
14470
|
}, []);
|
|
13973
|
-
const seekForward = (0,
|
|
14471
|
+
const seekForward = (0, import_react42.useCallback)(() => {
|
|
13974
14472
|
if (videoRef.current) {
|
|
13975
14473
|
videoRef.current.currentTime += 10;
|
|
13976
14474
|
}
|
|
13977
14475
|
}, []);
|
|
13978
|
-
const increaseVolume = (0,
|
|
14476
|
+
const increaseVolume = (0, import_react42.useCallback)(() => {
|
|
13979
14477
|
handleVolumeChange(Math.min(100, volume * 100 + 10));
|
|
13980
14478
|
}, [handleVolumeChange, volume]);
|
|
13981
|
-
const decreaseVolume = (0,
|
|
14479
|
+
const decreaseVolume = (0, import_react42.useCallback)(() => {
|
|
13982
14480
|
handleVolumeChange(Math.max(0, volume * 100 - 10));
|
|
13983
14481
|
}, [handleVolumeChange, volume]);
|
|
13984
|
-
const handleVideoKeyDown = (0,
|
|
14482
|
+
const handleVideoKeyDown = (0, import_react42.useCallback)(
|
|
13985
14483
|
(e) => {
|
|
13986
14484
|
if (!e.key) return;
|
|
13987
14485
|
e.stopPropagation();
|
|
@@ -14224,7 +14722,7 @@ var VideoPlayer = ({
|
|
|
14224
14722
|
var VideoPlayer_default = VideoPlayer;
|
|
14225
14723
|
|
|
14226
14724
|
// src/components/Whiteboard/Whiteboard.tsx
|
|
14227
|
-
var
|
|
14725
|
+
var import_react43 = require("react");
|
|
14228
14726
|
var import_phosphor_react32 = require("phosphor-react");
|
|
14229
14727
|
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
14230
14728
|
var IMAGE_WIDTH = 225;
|
|
@@ -14237,8 +14735,8 @@ var Whiteboard = ({
|
|
|
14237
14735
|
imagesPerRow = 2,
|
|
14238
14736
|
...rest
|
|
14239
14737
|
}) => {
|
|
14240
|
-
const [imageErrors, setImageErrors] = (0,
|
|
14241
|
-
const handleDownload = (0,
|
|
14738
|
+
const [imageErrors, setImageErrors] = (0, import_react43.useState)(/* @__PURE__ */ new Set());
|
|
14739
|
+
const handleDownload = (0, import_react43.useCallback)(
|
|
14242
14740
|
(image) => {
|
|
14243
14741
|
if (onDownload) {
|
|
14244
14742
|
onDownload(image);
|
|
@@ -14255,7 +14753,7 @@ var Whiteboard = ({
|
|
|
14255
14753
|
},
|
|
14256
14754
|
[onDownload]
|
|
14257
14755
|
);
|
|
14258
|
-
const handleImageError = (0,
|
|
14756
|
+
const handleImageError = (0, import_react43.useCallback)((imageId) => {
|
|
14259
14757
|
setImageErrors((prev) => new Set(prev).add(imageId));
|
|
14260
14758
|
}, []);
|
|
14261
14759
|
const gridColsClass = images?.length === 1 ? "grid-cols-1" : {
|
|
@@ -14342,10 +14840,10 @@ var Whiteboard = ({
|
|
|
14342
14840
|
var Whiteboard_default = Whiteboard;
|
|
14343
14841
|
|
|
14344
14842
|
// src/components/Auth/Auth.tsx
|
|
14345
|
-
var
|
|
14843
|
+
var import_react44 = require("react");
|
|
14346
14844
|
var import_react_router_dom = require("react-router-dom");
|
|
14347
14845
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
14348
|
-
var AuthContext = (0,
|
|
14846
|
+
var AuthContext = (0, import_react44.createContext)(void 0);
|
|
14349
14847
|
var AuthProvider = ({
|
|
14350
14848
|
children,
|
|
14351
14849
|
checkAuthFn,
|
|
@@ -14355,12 +14853,12 @@ var AuthProvider = ({
|
|
|
14355
14853
|
getSessionFn,
|
|
14356
14854
|
getTokensFn
|
|
14357
14855
|
}) => {
|
|
14358
|
-
const [authState, setAuthState] = (0,
|
|
14856
|
+
const [authState, setAuthState] = (0, import_react44.useState)({
|
|
14359
14857
|
isAuthenticated: false,
|
|
14360
14858
|
isLoading: true,
|
|
14361
14859
|
...initialAuthState
|
|
14362
14860
|
});
|
|
14363
|
-
const checkAuth = (0,
|
|
14861
|
+
const checkAuth = (0, import_react44.useCallback)(async () => {
|
|
14364
14862
|
try {
|
|
14365
14863
|
setAuthState((prev) => ({ ...prev, isLoading: true }));
|
|
14366
14864
|
if (!checkAuthFn) {
|
|
@@ -14391,7 +14889,7 @@ var AuthProvider = ({
|
|
|
14391
14889
|
return false;
|
|
14392
14890
|
}
|
|
14393
14891
|
}, [checkAuthFn, getUserFn, getSessionFn, getTokensFn]);
|
|
14394
|
-
const signOut = (0,
|
|
14892
|
+
const signOut = (0, import_react44.useCallback)(() => {
|
|
14395
14893
|
if (signOutFn) {
|
|
14396
14894
|
signOutFn();
|
|
14397
14895
|
}
|
|
@@ -14403,10 +14901,10 @@ var AuthProvider = ({
|
|
|
14403
14901
|
tokens: void 0
|
|
14404
14902
|
}));
|
|
14405
14903
|
}, [signOutFn]);
|
|
14406
|
-
(0,
|
|
14904
|
+
(0, import_react44.useEffect)(() => {
|
|
14407
14905
|
checkAuth();
|
|
14408
14906
|
}, [checkAuth]);
|
|
14409
|
-
const contextValue = (0,
|
|
14907
|
+
const contextValue = (0, import_react44.useMemo)(
|
|
14410
14908
|
() => ({
|
|
14411
14909
|
...authState,
|
|
14412
14910
|
checkAuth,
|
|
@@ -14417,7 +14915,7 @@ var AuthProvider = ({
|
|
|
14417
14915
|
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(AuthContext.Provider, { value: contextValue, children });
|
|
14418
14916
|
};
|
|
14419
14917
|
var useAuth = () => {
|
|
14420
|
-
const context = (0,
|
|
14918
|
+
const context = (0, import_react44.useContext)(AuthContext);
|
|
14421
14919
|
if (context === void 0) {
|
|
14422
14920
|
throw new Error("useAuth deve ser usado dentro de um AuthProvider");
|
|
14423
14921
|
}
|
|
@@ -14557,7 +15055,7 @@ function createZustandAuthAdapter(useAuthStore2) {
|
|
|
14557
15055
|
}
|
|
14558
15056
|
|
|
14559
15057
|
// src/components/Auth/useUrlAuthentication.ts
|
|
14560
|
-
var
|
|
15058
|
+
var import_react45 = require("react");
|
|
14561
15059
|
var import_react_router_dom2 = require("react-router-dom");
|
|
14562
15060
|
var getAuthParams = (location, extractParams) => {
|
|
14563
15061
|
const searchParams = new URLSearchParams(location.search);
|
|
@@ -14605,8 +15103,8 @@ var handleUserData = (responseData, setUser) => {
|
|
|
14605
15103
|
};
|
|
14606
15104
|
function useUrlAuthentication(options) {
|
|
14607
15105
|
const location = (0, import_react_router_dom2.useLocation)();
|
|
14608
|
-
const processedRef = (0,
|
|
14609
|
-
(0,
|
|
15106
|
+
const processedRef = (0, import_react45.useRef)(false);
|
|
15107
|
+
(0, import_react45.useEffect)(() => {
|
|
14610
15108
|
const handleAuthentication = async () => {
|
|
14611
15109
|
if (processedRef.current) {
|
|
14612
15110
|
return;
|
|
@@ -14677,9 +15175,9 @@ function useUrlAuthentication(options) {
|
|
|
14677
15175
|
}
|
|
14678
15176
|
|
|
14679
15177
|
// src/components/Auth/useApiConfig.ts
|
|
14680
|
-
var
|
|
15178
|
+
var import_react46 = require("react");
|
|
14681
15179
|
function useApiConfig(api) {
|
|
14682
|
-
return (0,
|
|
15180
|
+
return (0, import_react46.useMemo)(
|
|
14683
15181
|
() => ({
|
|
14684
15182
|
get: (endpoint, config) => api.get(endpoint, config)
|
|
14685
15183
|
}),
|
|
@@ -14689,13 +15187,13 @@ function useApiConfig(api) {
|
|
|
14689
15187
|
|
|
14690
15188
|
// src/components/Quiz/Quiz.tsx
|
|
14691
15189
|
var import_phosphor_react35 = require("phosphor-react");
|
|
14692
|
-
var
|
|
15190
|
+
var import_react49 = require("react");
|
|
14693
15191
|
|
|
14694
15192
|
// src/components/Quiz/QuizContent.tsx
|
|
14695
|
-
var
|
|
15193
|
+
var import_react48 = require("react");
|
|
14696
15194
|
|
|
14697
15195
|
// src/components/MultipleChoice/MultipleChoice.tsx
|
|
14698
|
-
var
|
|
15196
|
+
var import_react47 = require("react");
|
|
14699
15197
|
var import_phosphor_react33 = require("phosphor-react");
|
|
14700
15198
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
14701
15199
|
var MultipleChoiceList = ({
|
|
@@ -14707,8 +15205,8 @@ var MultipleChoiceList = ({
|
|
|
14707
15205
|
onHandleSelectedValues,
|
|
14708
15206
|
mode = "interactive"
|
|
14709
15207
|
}) => {
|
|
14710
|
-
const [actualValue, setActualValue] = (0,
|
|
14711
|
-
(0,
|
|
15208
|
+
const [actualValue, setActualValue] = (0, import_react47.useState)(selectedValues);
|
|
15209
|
+
(0, import_react47.useEffect)(() => {
|
|
14712
15210
|
setActualValue(selectedValues);
|
|
14713
15211
|
}, [selectedValues]);
|
|
14714
15212
|
const getStatusBadge2 = (status) => {
|
|
@@ -14853,12 +15351,12 @@ var getStatusStyles = (variantCorrect) => {
|
|
|
14853
15351
|
return "bg-error-background border-error-300";
|
|
14854
15352
|
}
|
|
14855
15353
|
};
|
|
14856
|
-
var QuizSubTitle = (0,
|
|
15354
|
+
var QuizSubTitle = (0, import_react48.forwardRef)(
|
|
14857
15355
|
({ subTitle, ...props }, ref) => {
|
|
14858
15356
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
|
|
14859
15357
|
}
|
|
14860
15358
|
);
|
|
14861
|
-
var QuizContainer = (0,
|
|
15359
|
+
var QuizContainer = (0, import_react48.forwardRef)(({ children, className, ...props }, ref) => {
|
|
14862
15360
|
return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
|
|
14863
15361
|
"div",
|
|
14864
15362
|
{
|
|
@@ -14947,15 +15445,15 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
14947
15445
|
const currentQuestionResult = getQuestionResultByQuestionId(
|
|
14948
15446
|
currentQuestion?.id || ""
|
|
14949
15447
|
);
|
|
14950
|
-
const prevSelectedValuesRef = (0,
|
|
14951
|
-
const prevQuestionIdRef = (0,
|
|
14952
|
-
const allCurrentAnswerIds = (0,
|
|
15448
|
+
const prevSelectedValuesRef = (0, import_react48.useRef)([]);
|
|
15449
|
+
const prevQuestionIdRef = (0, import_react48.useRef)("");
|
|
15450
|
+
const allCurrentAnswerIds = (0, import_react48.useMemo)(() => {
|
|
14953
15451
|
return allCurrentAnswers?.map((answer) => answer.optionId) || [];
|
|
14954
15452
|
}, [allCurrentAnswers]);
|
|
14955
|
-
const selectedValues = (0,
|
|
15453
|
+
const selectedValues = (0, import_react48.useMemo)(() => {
|
|
14956
15454
|
return allCurrentAnswerIds?.filter((id) => id !== null) || [];
|
|
14957
15455
|
}, [allCurrentAnswerIds]);
|
|
14958
|
-
const stableSelectedValues = (0,
|
|
15456
|
+
const stableSelectedValues = (0, import_react48.useMemo)(() => {
|
|
14959
15457
|
const currentQuestionId = currentQuestion?.id || "";
|
|
14960
15458
|
const hasQuestionChanged = prevQuestionIdRef.current !== currentQuestionId;
|
|
14961
15459
|
if (hasQuestionChanged) {
|
|
@@ -14979,7 +15477,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
14979
15477
|
variant,
|
|
14980
15478
|
currentQuestionResult?.selectedOptions
|
|
14981
15479
|
]);
|
|
14982
|
-
const handleSelectedValues = (0,
|
|
15480
|
+
const handleSelectedValues = (0, import_react48.useCallback)(
|
|
14983
15481
|
(values) => {
|
|
14984
15482
|
if (currentQuestion) {
|
|
14985
15483
|
selectMultipleAnswer(currentQuestion.id, values);
|
|
@@ -14987,7 +15485,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
14987
15485
|
},
|
|
14988
15486
|
[currentQuestion, selectMultipleAnswer]
|
|
14989
15487
|
);
|
|
14990
|
-
const questionKey = (0,
|
|
15488
|
+
const questionKey = (0, import_react48.useMemo)(
|
|
14991
15489
|
() => `question-${currentQuestion?.id || "1"}`,
|
|
14992
15490
|
[currentQuestion?.id]
|
|
14993
15491
|
);
|
|
@@ -15048,14 +15546,14 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
15048
15546
|
currentQuestion?.id || ""
|
|
15049
15547
|
);
|
|
15050
15548
|
const currentAnswer = getCurrentAnswer();
|
|
15051
|
-
const textareaRef = (0,
|
|
15549
|
+
const textareaRef = (0, import_react48.useRef)(null);
|
|
15052
15550
|
const charLimit = getDissertativeCharLimit();
|
|
15053
15551
|
const handleAnswerChange = (value) => {
|
|
15054
15552
|
if (currentQuestion) {
|
|
15055
15553
|
selectDissertativeAnswer(currentQuestion.id, value);
|
|
15056
15554
|
}
|
|
15057
15555
|
};
|
|
15058
|
-
const adjustTextareaHeight = (0,
|
|
15556
|
+
const adjustTextareaHeight = (0, import_react48.useCallback)(() => {
|
|
15059
15557
|
if (textareaRef.current) {
|
|
15060
15558
|
textareaRef.current.style.height = "auto";
|
|
15061
15559
|
const scrollHeight = textareaRef.current.scrollHeight;
|
|
@@ -15065,7 +15563,7 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
15065
15563
|
textareaRef.current.style.height = `${newHeight}px`;
|
|
15066
15564
|
}
|
|
15067
15565
|
}, []);
|
|
15068
|
-
(0,
|
|
15566
|
+
(0, import_react48.useEffect)(() => {
|
|
15069
15567
|
adjustTextareaHeight();
|
|
15070
15568
|
}, [currentAnswer, adjustTextareaHeight]);
|
|
15071
15569
|
if (!currentQuestion) {
|
|
@@ -15206,7 +15704,7 @@ var QuizConnectDots = ({ paddingBottom }) => {
|
|
|
15206
15704
|
isCorrect: false
|
|
15207
15705
|
}
|
|
15208
15706
|
];
|
|
15209
|
-
const [userAnswers, setUserAnswers] = (0,
|
|
15707
|
+
const [userAnswers, setUserAnswers] = (0, import_react48.useState)(() => {
|
|
15210
15708
|
if (variant === "result") {
|
|
15211
15709
|
return mockUserAnswers;
|
|
15212
15710
|
}
|
|
@@ -15325,8 +15823,8 @@ var QuizFill = ({ paddingBottom }) => {
|
|
|
15325
15823
|
isCorrect: true
|
|
15326
15824
|
}
|
|
15327
15825
|
];
|
|
15328
|
-
const [answers, setAnswers] = (0,
|
|
15329
|
-
const baseId = (0,
|
|
15826
|
+
const [answers, setAnswers] = (0, import_react48.useState)({});
|
|
15827
|
+
const baseId = (0, import_react48.useId)();
|
|
15330
15828
|
const getAvailableOptionsForSelect = (selectId) => {
|
|
15331
15829
|
const usedOptions = new Set(
|
|
15332
15830
|
Object.entries(answers).filter(([key]) => key !== selectId).map(([, value]) => value)
|
|
@@ -15465,7 +15963,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
|
|
|
15465
15963
|
};
|
|
15466
15964
|
const correctRadiusRelative = calculateCorrectRadiusRelative();
|
|
15467
15965
|
const mockUserAnswerRelative = { x: 0.72, y: 0.348 };
|
|
15468
|
-
const [clickPositionRelative, setClickPositionRelative] = (0,
|
|
15966
|
+
const [clickPositionRelative, setClickPositionRelative] = (0, import_react48.useState)(variant == "result" ? mockUserAnswerRelative : null);
|
|
15469
15967
|
const convertToRelativeCoordinates = (x, y, rect) => {
|
|
15470
15968
|
const safeWidth = Math.max(rect.width, 1e-3);
|
|
15471
15969
|
const safeHeight = Math.max(rect.height, 1e-3);
|
|
@@ -15631,14 +16129,14 @@ var getFinishConfirmationText = (type) => {
|
|
|
15631
16129
|
const config = getQuizTypeConfig(type);
|
|
15632
16130
|
return `Tem certeza que deseja finalizar ${config.article} ${config.label.toLowerCase()}?`;
|
|
15633
16131
|
};
|
|
15634
|
-
var Quiz = (0,
|
|
16132
|
+
var Quiz = (0, import_react49.forwardRef)(({ children, className, variant = "default", ...props }, ref) => {
|
|
15635
16133
|
const { setVariant } = useQuizStore();
|
|
15636
|
-
(0,
|
|
16134
|
+
(0, import_react49.useEffect)(() => {
|
|
15637
16135
|
setVariant(variant);
|
|
15638
16136
|
}, [variant, setVariant]);
|
|
15639
16137
|
return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
|
|
15640
16138
|
});
|
|
15641
|
-
var QuizTitle = (0,
|
|
16139
|
+
var QuizTitle = (0, import_react49.forwardRef)(({ className, onBack, ...props }, ref) => {
|
|
15642
16140
|
const {
|
|
15643
16141
|
quiz,
|
|
15644
16142
|
currentQuestionIndex,
|
|
@@ -15648,7 +16146,7 @@ var QuizTitle = (0, import_react48.forwardRef)(({ className, onBack, ...props },
|
|
|
15648
16146
|
formatTime: formatTime2,
|
|
15649
16147
|
isStarted
|
|
15650
16148
|
} = useQuizStore();
|
|
15651
|
-
const [showExitConfirmation, setShowExitConfirmation] = (0,
|
|
16149
|
+
const [showExitConfirmation, setShowExitConfirmation] = (0, import_react49.useState)(false);
|
|
15652
16150
|
const totalQuestions = getTotalQuestions();
|
|
15653
16151
|
const quizTitle = getQuizTitle();
|
|
15654
16152
|
const handleBackClick = () => {
|
|
@@ -15817,7 +16315,7 @@ var QuizQuestionList = ({
|
|
|
15817
16315
|
)
|
|
15818
16316
|
] });
|
|
15819
16317
|
};
|
|
15820
|
-
var QuizFooter = (0,
|
|
16318
|
+
var QuizFooter = (0, import_react49.forwardRef)(
|
|
15821
16319
|
({
|
|
15822
16320
|
className,
|
|
15823
16321
|
onGoToSimulated,
|
|
@@ -15851,8 +16349,8 @@ var QuizFooter = (0, import_react48.forwardRef)(
|
|
|
15851
16349
|
const currentAnswer = getCurrentAnswer();
|
|
15852
16350
|
const currentQuestion = getCurrentQuestion();
|
|
15853
16351
|
const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
|
|
15854
|
-
const [activeModal, setActiveModal] = (0,
|
|
15855
|
-
const [filterType, setFilterType] = (0,
|
|
16352
|
+
const [activeModal, setActiveModal] = (0, import_react49.useState)(null);
|
|
16353
|
+
const [filterType, setFilterType] = (0, import_react49.useState)("all");
|
|
15856
16354
|
const openModal = (modalName) => setActiveModal(modalName);
|
|
15857
16355
|
const closeModal = () => setActiveModal(null);
|
|
15858
16356
|
const isModalOpen = (modalName) => activeModal === modalName;
|
|
@@ -16194,7 +16692,7 @@ var QuizFooter = (0, import_react48.forwardRef)(
|
|
|
16194
16692
|
);
|
|
16195
16693
|
|
|
16196
16694
|
// src/components/Quiz/QuizResult.tsx
|
|
16197
|
-
var
|
|
16695
|
+
var import_react50 = require("react");
|
|
16198
16696
|
var import_phosphor_react36 = require("phosphor-react");
|
|
16199
16697
|
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
16200
16698
|
var QuizBadge = ({
|
|
@@ -16216,15 +16714,15 @@ var QuizBadge = ({
|
|
|
16216
16714
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
|
|
16217
16715
|
}
|
|
16218
16716
|
};
|
|
16219
|
-
var QuizHeaderResult = (0,
|
|
16717
|
+
var QuizHeaderResult = (0, import_react50.forwardRef)(
|
|
16220
16718
|
({ className, ...props }, ref) => {
|
|
16221
16719
|
const {
|
|
16222
16720
|
getQuestionResultByQuestionId,
|
|
16223
16721
|
getCurrentQuestion,
|
|
16224
16722
|
questionsResult
|
|
16225
16723
|
} = useQuizStore();
|
|
16226
|
-
const [status, setStatus] = (0,
|
|
16227
|
-
(0,
|
|
16724
|
+
const [status, setStatus] = (0, import_react50.useState)(void 0);
|
|
16725
|
+
(0, import_react50.useEffect)(() => {
|
|
16228
16726
|
const cq = getCurrentQuestion();
|
|
16229
16727
|
if (!cq) {
|
|
16230
16728
|
setStatus(void 0);
|
|
@@ -16288,7 +16786,7 @@ var QuizHeaderResult = (0, import_react49.forwardRef)(
|
|
|
16288
16786
|
);
|
|
16289
16787
|
}
|
|
16290
16788
|
);
|
|
16291
|
-
var QuizResultHeaderTitle = (0,
|
|
16789
|
+
var QuizResultHeaderTitle = (0, import_react50.forwardRef)(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
|
|
16292
16790
|
const { quiz } = useQuizStore();
|
|
16293
16791
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(
|
|
16294
16792
|
"div",
|
|
@@ -16318,7 +16816,7 @@ var QuizResultHeaderTitle = (0, import_react49.forwardRef)(({ className, showBad
|
|
|
16318
16816
|
}
|
|
16319
16817
|
);
|
|
16320
16818
|
});
|
|
16321
|
-
var QuizResultTitle = (0,
|
|
16819
|
+
var QuizResultTitle = (0, import_react50.forwardRef)(({ className, ...props }, ref) => {
|
|
16322
16820
|
const { getQuizTitle } = useQuizStore();
|
|
16323
16821
|
const quizTitle = getQuizTitle();
|
|
16324
16822
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
@@ -16362,7 +16860,7 @@ var calculateAnswerStatistics = (answers) => {
|
|
|
16362
16860
|
}
|
|
16363
16861
|
return stats;
|
|
16364
16862
|
};
|
|
16365
|
-
var QuizResultPerformance = (0,
|
|
16863
|
+
var QuizResultPerformance = (0, import_react50.forwardRef)(({ showDetails = true, ...props }, ref) => {
|
|
16366
16864
|
const {
|
|
16367
16865
|
getTotalQuestions,
|
|
16368
16866
|
formatTime: formatTime2,
|
|
@@ -16467,7 +16965,7 @@ var QuizResultPerformance = (0, import_react49.forwardRef)(({ showDetails = true
|
|
|
16467
16965
|
}
|
|
16468
16966
|
);
|
|
16469
16967
|
});
|
|
16470
|
-
var QuizListResult = (0,
|
|
16968
|
+
var QuizListResult = (0, import_react50.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
|
|
16471
16969
|
const { getQuestionsGroupedBySubject } = useQuizStore();
|
|
16472
16970
|
const { isDark } = useTheme();
|
|
16473
16971
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
@@ -16597,7 +17095,7 @@ var BreadcrumbMenu = ({
|
|
|
16597
17095
|
};
|
|
16598
17096
|
|
|
16599
17097
|
// src/components/BreadcrumbMenu/useBreadcrumbBuilder.ts
|
|
16600
|
-
var
|
|
17098
|
+
var import_react51 = require("react");
|
|
16601
17099
|
|
|
16602
17100
|
// src/components/BreadcrumbMenu/breadcrumbStore.ts
|
|
16603
17101
|
var import_zustand12 = require("zustand");
|
|
@@ -16726,7 +17224,7 @@ var useBreadcrumbBuilder = (config) => {
|
|
|
16726
17224
|
(level) => isBreadcrumbWithData(level) ? level.data : null
|
|
16727
17225
|
);
|
|
16728
17226
|
const levelUrlIds = levels.map((level) => level.urlId);
|
|
16729
|
-
(0,
|
|
17227
|
+
(0, import_react51.useEffect)(() => {
|
|
16730
17228
|
const newBreadcrumbs = [root];
|
|
16731
17229
|
const previousIds = [];
|
|
16732
17230
|
for (const level of levels) {
|
|
@@ -16758,11 +17256,11 @@ var useBreadcrumbBuilder = (config) => {
|
|
|
16758
17256
|
};
|
|
16759
17257
|
|
|
16760
17258
|
// src/components/BreadcrumbMenu/useUrlParams.ts
|
|
16761
|
-
var
|
|
17259
|
+
var import_react52 = require("react");
|
|
16762
17260
|
var import_react_router_dom4 = require("react-router-dom");
|
|
16763
17261
|
var useUrlParams = (config) => {
|
|
16764
17262
|
const location = (0, import_react_router_dom4.useLocation)();
|
|
16765
|
-
return (0,
|
|
17263
|
+
return (0, import_react52.useMemo)(() => {
|
|
16766
17264
|
const segments = location.pathname.split("/").filter(Boolean);
|
|
16767
17265
|
const params = {};
|
|
16768
17266
|
for (const [key, index] of Object.entries(config)) {
|
|
@@ -16773,15 +17271,15 @@ var useUrlParams = (config) => {
|
|
|
16773
17271
|
};
|
|
16774
17272
|
|
|
16775
17273
|
// src/hooks/useAppInitialization.ts
|
|
16776
|
-
var
|
|
17274
|
+
var import_react54 = require("react");
|
|
16777
17275
|
|
|
16778
17276
|
// src/hooks/useInstitution.ts
|
|
16779
|
-
var
|
|
17277
|
+
var import_react53 = require("react");
|
|
16780
17278
|
function useInstitutionId() {
|
|
16781
|
-
const [institutionId, setInstitutionId] = (0,
|
|
17279
|
+
const [institutionId, setInstitutionId] = (0, import_react53.useState)(() => {
|
|
16782
17280
|
return document.querySelector('meta[name="institution-id"]')?.getAttribute("content") ?? null;
|
|
16783
17281
|
});
|
|
16784
|
-
(0,
|
|
17282
|
+
(0, import_react53.useEffect)(() => {
|
|
16785
17283
|
const metaTag = document.querySelector('meta[name="institution-id"]');
|
|
16786
17284
|
if (!metaTag) return;
|
|
16787
17285
|
const observer = new MutationObserver(() => {
|
|
@@ -16948,7 +17446,7 @@ var useAuthStore = (0, import_zustand14.create)()(
|
|
|
16948
17446
|
function useAppInitialization() {
|
|
16949
17447
|
const getInstitutionId = useInstitutionId();
|
|
16950
17448
|
const { initialize, initialized, institutionId } = useAppStore();
|
|
16951
|
-
const authFunctions = (0,
|
|
17449
|
+
const authFunctions = (0, import_react54.useMemo)(
|
|
16952
17450
|
() => ({
|
|
16953
17451
|
checkAuth: async () => {
|
|
16954
17452
|
const { sessionInfo, tokens } = useAuthStore.getState();
|
|
@@ -16985,7 +17483,7 @@ function useAppInitialization() {
|
|
|
16985
17483
|
}
|
|
16986
17484
|
|
|
16987
17485
|
// src/hooks/useAppContent.ts
|
|
16988
|
-
var
|
|
17486
|
+
var import_react55 = require("react");
|
|
16989
17487
|
var import_react_router_dom5 = require("react-router-dom");
|
|
16990
17488
|
function useAppContent(config) {
|
|
16991
17489
|
const navigate = (0, import_react_router_dom5.useNavigate)();
|
|
@@ -17011,20 +17509,20 @@ function useAppContent(config) {
|
|
|
17011
17509
|
navigate("/painel");
|
|
17012
17510
|
}
|
|
17013
17511
|
};
|
|
17014
|
-
const handleSetSelectedProfile = (0,
|
|
17512
|
+
const handleSetSelectedProfile = (0, import_react55.useCallback)(
|
|
17015
17513
|
(profile) => {
|
|
17016
17514
|
setSelectedProfile(profile);
|
|
17017
17515
|
},
|
|
17018
17516
|
[setSelectedProfile]
|
|
17019
17517
|
);
|
|
17020
|
-
const handleClearParamsFromURL = (0,
|
|
17518
|
+
const handleClearParamsFromURL = (0, import_react55.useCallback)(() => {
|
|
17021
17519
|
if (onClearParamsFromURL) {
|
|
17022
17520
|
onClearParamsFromURL();
|
|
17023
17521
|
} else {
|
|
17024
17522
|
globalThis.location.replace("/painel");
|
|
17025
17523
|
}
|
|
17026
17524
|
}, [onClearParamsFromURL]);
|
|
17027
|
-
const handleError = (0,
|
|
17525
|
+
const handleError = (0, import_react55.useCallback)(
|
|
17028
17526
|
(error) => {
|
|
17029
17527
|
if (onError) {
|
|
17030
17528
|
onError(error);
|
|
@@ -17035,7 +17533,7 @@ function useAppContent(config) {
|
|
|
17035
17533
|
},
|
|
17036
17534
|
[navigate, onError]
|
|
17037
17535
|
);
|
|
17038
|
-
const urlAuthConfig = (0,
|
|
17536
|
+
const urlAuthConfig = (0, import_react55.useMemo)(
|
|
17039
17537
|
() => ({
|
|
17040
17538
|
setTokens,
|
|
17041
17539
|
setSessionInfo,
|
|
@@ -17061,10 +17559,10 @@ function useAppContent(config) {
|
|
|
17061
17559
|
);
|
|
17062
17560
|
useUrlAuthentication(urlAuthConfig);
|
|
17063
17561
|
const { sessionInfo } = useAuth();
|
|
17064
|
-
const institutionIdToUse = (0,
|
|
17562
|
+
const institutionIdToUse = (0, import_react55.useMemo)(() => {
|
|
17065
17563
|
return sessionInfo?.institutionId || getInstitutionId;
|
|
17066
17564
|
}, [sessionInfo?.institutionId, getInstitutionId]);
|
|
17067
|
-
(0,
|
|
17565
|
+
(0, import_react55.useEffect)(() => {
|
|
17068
17566
|
if (institutionIdToUse && !initialized) {
|
|
17069
17567
|
initialize(institutionIdToUse);
|
|
17070
17568
|
}
|
|
@@ -17076,9 +17574,30 @@ function useAppContent(config) {
|
|
|
17076
17574
|
};
|
|
17077
17575
|
}
|
|
17078
17576
|
|
|
17577
|
+
// src/store/questionFiltersStore.ts
|
|
17578
|
+
var import_zustand15 = require("zustand");
|
|
17579
|
+
var useQuestionFiltersStore = (0, import_zustand15.create)((set) => ({
|
|
17580
|
+
draftFilters: null,
|
|
17581
|
+
appliedFilters: null,
|
|
17582
|
+
setDraftFilters: (filters) => {
|
|
17583
|
+
set({ draftFilters: filters });
|
|
17584
|
+
},
|
|
17585
|
+
applyFilters: () => {
|
|
17586
|
+
set((state) => ({
|
|
17587
|
+
appliedFilters: state.draftFilters
|
|
17588
|
+
}));
|
|
17589
|
+
},
|
|
17590
|
+
clearFilters: () => {
|
|
17591
|
+
set({
|
|
17592
|
+
draftFilters: null,
|
|
17593
|
+
appliedFilters: null
|
|
17594
|
+
});
|
|
17595
|
+
}
|
|
17596
|
+
}));
|
|
17597
|
+
|
|
17079
17598
|
// src/components/ActivityCardQuestionBanks/ActivityCardQuestionBanks.tsx
|
|
17080
17599
|
var import_phosphor_react37 = require("phosphor-react");
|
|
17081
|
-
var
|
|
17600
|
+
var import_react56 = require("react");
|
|
17082
17601
|
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
17083
17602
|
var ActivityCardQuestionBanks = ({
|
|
17084
17603
|
question,
|
|
@@ -17090,7 +17609,7 @@ var ActivityCardQuestionBanks = ({
|
|
|
17090
17609
|
assunto,
|
|
17091
17610
|
enunciado
|
|
17092
17611
|
} = {}) => {
|
|
17093
|
-
const alternatives = (0,
|
|
17612
|
+
const alternatives = (0, import_react56.useMemo)(() => {
|
|
17094
17613
|
if (!question?.options || questionType !== "ALTERNATIVA" /* ALTERNATIVA */)
|
|
17095
17614
|
return [];
|
|
17096
17615
|
const correctOptionIds2 = question.correctOptionIds || [];
|
|
@@ -17104,13 +17623,13 @@ var ActivityCardQuestionBanks = ({
|
|
|
17104
17623
|
};
|
|
17105
17624
|
});
|
|
17106
17625
|
}, [question, questionType]);
|
|
17107
|
-
const correctOptionId = (0,
|
|
17626
|
+
const correctOptionId = (0, import_react56.useMemo)(() => {
|
|
17108
17627
|
if (!question?.correctOptionIds || question.correctOptionIds.length === 0) {
|
|
17109
17628
|
return void 0;
|
|
17110
17629
|
}
|
|
17111
17630
|
return question.correctOptionIds[0];
|
|
17112
17631
|
}, [question]);
|
|
17113
|
-
const multipleChoices = (0,
|
|
17632
|
+
const multipleChoices = (0, import_react56.useMemo)(() => {
|
|
17114
17633
|
if (!question?.options || questionType !== "MULTIPLA_ESCOLHA" /* MULTIPLA_ESCOLHA */)
|
|
17115
17634
|
return [];
|
|
17116
17635
|
const correctOptionIds2 = question.correctOptionIds || [];
|
|
@@ -17124,7 +17643,7 @@ var ActivityCardQuestionBanks = ({
|
|
|
17124
17643
|
};
|
|
17125
17644
|
});
|
|
17126
17645
|
}, [question, questionType]);
|
|
17127
|
-
const correctOptionIds = (0,
|
|
17646
|
+
const correctOptionIds = (0, import_react56.useMemo)(() => {
|
|
17128
17647
|
return question?.correctOptionIds || [];
|
|
17129
17648
|
}, [question]);
|
|
17130
17649
|
const getStatusBadge2 = (status) => {
|
|
@@ -17307,7 +17826,7 @@ var formatDateToBrazilian = (dateString) => {
|
|
|
17307
17826
|
};
|
|
17308
17827
|
|
|
17309
17828
|
// src/components/ActivityDetails/ActivityDetails.tsx
|
|
17310
|
-
var
|
|
17829
|
+
var import_react57 = require("react");
|
|
17311
17830
|
var import_phosphor_react38 = require("phosphor-react");
|
|
17312
17831
|
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
17313
17832
|
var createTableColumns = (onCorrectActivity) => [
|
|
@@ -17405,20 +17924,20 @@ var ActivityDetails = ({
|
|
|
17405
17924
|
mapSubjectNameToEnum
|
|
17406
17925
|
}) => {
|
|
17407
17926
|
const { isMobile } = useMobile();
|
|
17408
|
-
const [page, setPage] = (0,
|
|
17409
|
-
const [limit, setLimit] = (0,
|
|
17410
|
-
const [sortBy, setSortBy] = (0,
|
|
17411
|
-
const [sortOrder, setSortOrder] = (0,
|
|
17927
|
+
const [page, setPage] = (0, import_react57.useState)(1);
|
|
17928
|
+
const [limit, setLimit] = (0, import_react57.useState)(10);
|
|
17929
|
+
const [sortBy, setSortBy] = (0, import_react57.useState)(void 0);
|
|
17930
|
+
const [sortOrder, setSortOrder] = (0, import_react57.useState)(
|
|
17412
17931
|
void 0
|
|
17413
17932
|
);
|
|
17414
|
-
const [data, setData] = (0,
|
|
17415
|
-
const [correctionData, setCorrectionData] = (0,
|
|
17416
|
-
const [loading, setLoading] = (0,
|
|
17417
|
-
const [error, setError] = (0,
|
|
17418
|
-
const [isModalOpen, setIsModalOpen] = (0,
|
|
17419
|
-
const [isViewOnlyModal, setIsViewOnlyModal] = (0,
|
|
17420
|
-
const [correctionError, setCorrectionError] = (0,
|
|
17421
|
-
(0,
|
|
17933
|
+
const [data, setData] = (0, import_react57.useState)(null);
|
|
17934
|
+
const [correctionData, setCorrectionData] = (0, import_react57.useState)(null);
|
|
17935
|
+
const [loading, setLoading] = (0, import_react57.useState)(true);
|
|
17936
|
+
const [error, setError] = (0, import_react57.useState)(null);
|
|
17937
|
+
const [isModalOpen, setIsModalOpen] = (0, import_react57.useState)(false);
|
|
17938
|
+
const [isViewOnlyModal, setIsViewOnlyModal] = (0, import_react57.useState)(false);
|
|
17939
|
+
const [correctionError, setCorrectionError] = (0, import_react57.useState)(null);
|
|
17940
|
+
(0, import_react57.useEffect)(() => {
|
|
17422
17941
|
const loadData = async () => {
|
|
17423
17942
|
if (!activityId) return;
|
|
17424
17943
|
setLoading(true);
|
|
@@ -17441,7 +17960,7 @@ var ActivityDetails = ({
|
|
|
17441
17960
|
};
|
|
17442
17961
|
loadData();
|
|
17443
17962
|
}, [activityId, page, limit, sortBy, sortOrder, fetchActivityDetails]);
|
|
17444
|
-
const handleCorrectActivity = (0,
|
|
17963
|
+
const handleCorrectActivity = (0, import_react57.useCallback)(
|
|
17445
17964
|
async (studentId) => {
|
|
17446
17965
|
const student = data?.students.find((s) => s.studentId === studentId);
|
|
17447
17966
|
if (!student || !activityId) return;
|
|
@@ -17461,10 +17980,10 @@ var ActivityDetails = ({
|
|
|
17461
17980
|
},
|
|
17462
17981
|
[data?.students, activityId, fetchStudentCorrection]
|
|
17463
17982
|
);
|
|
17464
|
-
const handleCloseModal = (0,
|
|
17983
|
+
const handleCloseModal = (0, import_react57.useCallback)(() => {
|
|
17465
17984
|
setIsModalOpen(false);
|
|
17466
17985
|
}, []);
|
|
17467
|
-
const handleObservationSubmit = (0,
|
|
17986
|
+
const handleObservationSubmit = (0, import_react57.useCallback)(
|
|
17468
17987
|
async (observation, files) => {
|
|
17469
17988
|
if (!activityId || !correctionData?.studentId) return;
|
|
17470
17989
|
try {
|
|
@@ -17481,7 +18000,7 @@ var ActivityDetails = ({
|
|
|
17481
18000
|
},
|
|
17482
18001
|
[activityId, correctionData?.studentId, submitObservation]
|
|
17483
18002
|
);
|
|
17484
|
-
const tableData = (0,
|
|
18003
|
+
const tableData = (0, import_react57.useMemo)(() => {
|
|
17485
18004
|
if (!data?.students) return [];
|
|
17486
18005
|
return data.students.map((student) => ({
|
|
17487
18006
|
id: student.studentId,
|
|
@@ -17493,7 +18012,7 @@ var ActivityDetails = ({
|
|
|
17493
18012
|
score: student.score
|
|
17494
18013
|
}));
|
|
17495
18014
|
}, [data?.students]);
|
|
17496
|
-
const columns = (0,
|
|
18015
|
+
const columns = (0, import_react57.useMemo)(
|
|
17497
18016
|
() => createTableColumns(handleCorrectActivity),
|
|
17498
18017
|
[handleCorrectActivity]
|
|
17499
18018
|
);
|
|
@@ -17750,10 +18269,10 @@ var ActivityDetails = ({
|
|
|
17750
18269
|
};
|
|
17751
18270
|
|
|
17752
18271
|
// src/components/Support/Support.tsx
|
|
17753
|
-
var
|
|
18272
|
+
var import_react60 = require("react");
|
|
17754
18273
|
var import_react_hook_form = require("react-hook-form");
|
|
17755
18274
|
var import_zod2 = require("@hookform/resolvers/zod");
|
|
17756
|
-
var
|
|
18275
|
+
var import_react61 = require("@phosphor-icons/react");
|
|
17757
18276
|
var import_dayjs2 = __toESM(require("dayjs"));
|
|
17758
18277
|
|
|
17759
18278
|
// src/components/Support/schema/index.ts
|
|
@@ -17776,9 +18295,9 @@ var supportSchema = import_zod.z.object({
|
|
|
17776
18295
|
});
|
|
17777
18296
|
|
|
17778
18297
|
// src/components/Support/components/TicketModal.tsx
|
|
17779
|
-
var
|
|
18298
|
+
var import_react59 = require("react");
|
|
17780
18299
|
var import_dayjs = __toESM(require("dayjs"));
|
|
17781
|
-
var import_pt_br =
|
|
18300
|
+
var import_pt_br = require("dayjs/locale/pt-br");
|
|
17782
18301
|
|
|
17783
18302
|
// src/types/support.ts
|
|
17784
18303
|
var SupportStatus = /* @__PURE__ */ ((SupportStatus2) => {
|
|
@@ -17856,19 +18375,19 @@ var mapInternalStatusToApi = (internalStatus) => {
|
|
|
17856
18375
|
};
|
|
17857
18376
|
|
|
17858
18377
|
// src/components/Support/utils/supportUtils.tsx
|
|
17859
|
-
var
|
|
18378
|
+
var import_react58 = require("@phosphor-icons/react");
|
|
17860
18379
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
17861
18380
|
var getCategoryIcon = (category, size = 16) => {
|
|
17862
18381
|
if (!category) return null;
|
|
17863
18382
|
switch (category) {
|
|
17864
18383
|
case "acesso" /* ACESSO */:
|
|
17865
|
-
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
18384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react58.KeyIcon, { size });
|
|
17866
18385
|
case "tecnico" /* TECNICO */:
|
|
17867
|
-
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
18386
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react58.BugIcon, { size });
|
|
17868
18387
|
case "outros" /* OUTROS */:
|
|
17869
|
-
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
18388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react58.InfoIcon, { size });
|
|
17870
18389
|
default:
|
|
17871
|
-
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
|
|
18390
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(import_react58.InfoIcon, { size });
|
|
17872
18391
|
}
|
|
17873
18392
|
};
|
|
17874
18393
|
|
|
@@ -17898,17 +18417,17 @@ var TicketModal = ({
|
|
|
17898
18417
|
apiClient,
|
|
17899
18418
|
userId
|
|
17900
18419
|
}) => {
|
|
17901
|
-
const [showCloseConfirmation, setShowCloseConfirmation] = (0,
|
|
17902
|
-
const [responseText, setResponseText] = (0,
|
|
17903
|
-
const [answers, setAnswers] = (0,
|
|
17904
|
-
const [isSubmittingAnswer, setIsSubmittingAnswer] = (0,
|
|
17905
|
-
const [isLoadingAnswers, setIsLoadingAnswers] = (0,
|
|
18420
|
+
const [showCloseConfirmation, setShowCloseConfirmation] = (0, import_react59.useState)(false);
|
|
18421
|
+
const [responseText, setResponseText] = (0, import_react59.useState)("");
|
|
18422
|
+
const [answers, setAnswers] = (0, import_react59.useState)([]);
|
|
18423
|
+
const [isSubmittingAnswer, setIsSubmittingAnswer] = (0, import_react59.useState)(false);
|
|
18424
|
+
const [isLoadingAnswers, setIsLoadingAnswers] = (0, import_react59.useState)(false);
|
|
17906
18425
|
const handleCloseTicket = () => {
|
|
17907
18426
|
onTicketClose?.(ticket.id);
|
|
17908
18427
|
setShowCloseConfirmation(false);
|
|
17909
18428
|
onClose();
|
|
17910
18429
|
};
|
|
17911
|
-
const fetchAnswers = (0,
|
|
18430
|
+
const fetchAnswers = (0, import_react59.useCallback)(async () => {
|
|
17912
18431
|
if (!ticket.id || ticket.status !== "respondido" /* RESPONDIDO */) return;
|
|
17913
18432
|
setIsLoadingAnswers(true);
|
|
17914
18433
|
try {
|
|
@@ -17947,7 +18466,7 @@ var TicketModal = ({
|
|
|
17947
18466
|
}
|
|
17948
18467
|
};
|
|
17949
18468
|
const canCloseTicket = ticket.status !== "encerrado" /* ENCERRADO */;
|
|
17950
|
-
(0,
|
|
18469
|
+
(0, import_react59.useEffect)(() => {
|
|
17951
18470
|
if (isOpen) {
|
|
17952
18471
|
setResponseText("");
|
|
17953
18472
|
(async () => {
|
|
@@ -18285,7 +18804,7 @@ var TicketCard = ({
|
|
|
18285
18804
|
getCategoryIcon(ticket.category, 18),
|
|
18286
18805
|
getCategoryText(ticket.category)
|
|
18287
18806
|
] }),
|
|
18288
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
18807
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react61.CaretRightIcon, { size: 24, className: "text-text-800" })
|
|
18289
18808
|
] })
|
|
18290
18809
|
]
|
|
18291
18810
|
},
|
|
@@ -18330,21 +18849,21 @@ var Support = ({
|
|
|
18330
18849
|
onTicketCreated,
|
|
18331
18850
|
onTicketClosed
|
|
18332
18851
|
}) => {
|
|
18333
|
-
const [activeTab, setActiveTab] = (0,
|
|
18334
|
-
const [selectedProblem, setSelectedProblem] = (0,
|
|
18335
|
-
const [statusFilter, setStatusFilter] = (0,
|
|
18336
|
-
const [categoryFilter, setCategoryFilter] = (0,
|
|
18337
|
-
const [selectedTicket, setSelectedTicket] = (0,
|
|
18852
|
+
const [activeTab, setActiveTab] = (0, import_react60.useState)("criar-pedido");
|
|
18853
|
+
const [selectedProblem, setSelectedProblem] = (0, import_react60.useState)(null);
|
|
18854
|
+
const [statusFilter, setStatusFilter] = (0, import_react60.useState)("todos");
|
|
18855
|
+
const [categoryFilter, setCategoryFilter] = (0, import_react60.useState)("todos");
|
|
18856
|
+
const [selectedTicket, setSelectedTicket] = (0, import_react60.useState)(
|
|
18338
18857
|
null
|
|
18339
18858
|
);
|
|
18340
|
-
const [isModalOpen, setIsModalOpen] = (0,
|
|
18341
|
-
const [submitError, setSubmitError] = (0,
|
|
18342
|
-
const [showSuccessToast, setShowSuccessToast] = (0,
|
|
18343
|
-
const [showCloseSuccessToast, setShowCloseSuccessToast] = (0,
|
|
18344
|
-
const [showCloseErrorToast, setShowCloseErrorToast] = (0,
|
|
18345
|
-
const [allTickets, setAllTickets] = (0,
|
|
18346
|
-
const [loadingTickets, setLoadingTickets] = (0,
|
|
18347
|
-
const [currentPage, setCurrentPage] = (0,
|
|
18859
|
+
const [isModalOpen, setIsModalOpen] = (0, import_react60.useState)(false);
|
|
18860
|
+
const [submitError, setSubmitError] = (0, import_react60.useState)(null);
|
|
18861
|
+
const [showSuccessToast, setShowSuccessToast] = (0, import_react60.useState)(false);
|
|
18862
|
+
const [showCloseSuccessToast, setShowCloseSuccessToast] = (0, import_react60.useState)(false);
|
|
18863
|
+
const [showCloseErrorToast, setShowCloseErrorToast] = (0, import_react60.useState)(false);
|
|
18864
|
+
const [allTickets, setAllTickets] = (0, import_react60.useState)([]);
|
|
18865
|
+
const [loadingTickets, setLoadingTickets] = (0, import_react60.useState)(false);
|
|
18866
|
+
const [currentPage, setCurrentPage] = (0, import_react60.useState)(1);
|
|
18348
18867
|
const ITEMS_PER_PAGE = 10;
|
|
18349
18868
|
const handlePrevPage = () => {
|
|
18350
18869
|
if (currentPage > 1) {
|
|
@@ -18357,13 +18876,13 @@ var Support = ({
|
|
|
18357
18876
|
setCurrentPage(currentPage + 1);
|
|
18358
18877
|
}
|
|
18359
18878
|
};
|
|
18360
|
-
(0,
|
|
18879
|
+
(0, import_react60.useEffect)(() => {
|
|
18361
18880
|
if (activeTab === "historico") {
|
|
18362
18881
|
fetchTickets(statusFilter);
|
|
18363
18882
|
setCurrentPage(1);
|
|
18364
18883
|
}
|
|
18365
18884
|
}, [activeTab, statusFilter]);
|
|
18366
|
-
(0,
|
|
18885
|
+
(0, import_react60.useEffect)(() => {
|
|
18367
18886
|
setCurrentPage(1);
|
|
18368
18887
|
}, [categoryFilter]);
|
|
18369
18888
|
const convertApiTicketToComponent = (apiTicket) => {
|
|
@@ -18493,17 +19012,17 @@ var Support = ({
|
|
|
18493
19012
|
{
|
|
18494
19013
|
id: "tecnico" /* TECNICO */,
|
|
18495
19014
|
title: "T\xE9cnico",
|
|
18496
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
19015
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react61.BugIcon, { size: 24 })
|
|
18497
19016
|
},
|
|
18498
19017
|
{
|
|
18499
19018
|
id: "acesso" /* ACESSO */,
|
|
18500
19019
|
title: "Acesso",
|
|
18501
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
19020
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react61.KeyIcon, { size: 24 })
|
|
18502
19021
|
},
|
|
18503
19022
|
{
|
|
18504
19023
|
id: "outros" /* OUTROS */,
|
|
18505
19024
|
title: "Outros",
|
|
18506
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
19025
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react61.InfoIcon, { size: 24 })
|
|
18507
19026
|
}
|
|
18508
19027
|
];
|
|
18509
19028
|
const emptyImage = emptyStateImage || suporthistory_default;
|
|
@@ -18623,15 +19142,15 @@ var Support = ({
|
|
|
18623
19142
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(SelectContent, { children: [
|
|
18624
19143
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(SelectItem, { value: "todos", children: "Todos" }),
|
|
18625
19144
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(SelectItem, { value: "tecnico" /* TECNICO */, children: [
|
|
18626
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
19145
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react61.BugIcon, { size: 16 }),
|
|
18627
19146
|
" T\xE9cnico"
|
|
18628
19147
|
] }),
|
|
18629
19148
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(SelectItem, { value: "acesso" /* ACESSO */, children: [
|
|
18630
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
19149
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react61.KeyIcon, { size: 16 }),
|
|
18631
19150
|
" Acesso"
|
|
18632
19151
|
] }),
|
|
18633
19152
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)(SelectItem, { value: "outros" /* OUTROS */, children: [
|
|
18634
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
19153
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react61.InfoIcon, { size: 16 }),
|
|
18635
19154
|
" Outros"
|
|
18636
19155
|
] })
|
|
18637
19156
|
] })
|
|
@@ -18874,8 +19393,10 @@ var Support_default = Support;
|
|
|
18874
19393
|
VideoPlayer,
|
|
18875
19394
|
Whiteboard,
|
|
18876
19395
|
cn,
|
|
19396
|
+
createActivityFiltersDataHook,
|
|
18877
19397
|
createNotificationStore,
|
|
18878
19398
|
createNotificationsHook,
|
|
19399
|
+
createUseActivityFiltersData,
|
|
18879
19400
|
createUseNotificationStore,
|
|
18880
19401
|
createUseNotifications,
|
|
18881
19402
|
createZustandAuthAdapter,
|
|
@@ -18919,6 +19440,7 @@ var Support_default = Support;
|
|
|
18919
19440
|
useBreadcrumbBuilder,
|
|
18920
19441
|
useInstitutionId,
|
|
18921
19442
|
useMobile,
|
|
19443
|
+
useQuestionFiltersStore,
|
|
18922
19444
|
useQuizStore,
|
|
18923
19445
|
useRouteAuth,
|
|
18924
19446
|
useTableFilter,
|