analytica-frontend-lib 1.2.30 → 1.2.32
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/ActivityCardQuestionBanks/index.js.map +1 -1
- package/dist/ActivityCardQuestionBanks/index.mjs.map +1 -1
- package/dist/ActivityFilters/index.d.ts +5 -9
- package/dist/ActivityFilters/index.d.ts.map +1 -1
- package/dist/ActivityFilters/index.js +116 -74
- package/dist/ActivityFilters/index.js.map +1 -1
- package/dist/ActivityFilters/index.mjs +117 -75
- package/dist/ActivityFilters/index.mjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +116 -74
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +138 -96
- package/dist/index.mjs.map +1 -1
- package/dist/types/activityFilters.d.ts +11 -2
- package/dist/types/activityFilters.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -11445,7 +11445,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
|
|
|
11445
11445
|
};
|
|
11446
11446
|
|
|
11447
11447
|
// src/components/ActivityFilters/ActivityFilters.tsx
|
|
11448
|
-
import { useState as useState22, useEffect as useEffect22, useMemo as useMemo10, useCallback as useCallback4 } from "react";
|
|
11448
|
+
import { useState as useState22, useEffect as useEffect22, useMemo as useMemo10, useCallback as useCallback4, useRef as useRef12 } from "react";
|
|
11449
11449
|
import { jsx as jsx58, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
11450
11450
|
var questionTypes = [
|
|
11451
11451
|
"ALTERNATIVA" /* ALTERNATIVA */,
|
|
@@ -11458,11 +11458,13 @@ var questionTypes = [
|
|
|
11458
11458
|
];
|
|
11459
11459
|
var QuestionTypeFilter = ({
|
|
11460
11460
|
selectedTypes,
|
|
11461
|
-
onToggleType
|
|
11461
|
+
onToggleType,
|
|
11462
|
+
allowedQuestionTypes
|
|
11462
11463
|
}) => {
|
|
11464
|
+
const availableQuestionTypes = allowedQuestionTypes || questionTypes;
|
|
11463
11465
|
return /* @__PURE__ */ jsxs45("div", { children: [
|
|
11464
11466
|
/* @__PURE__ */ jsx58(Text_default, { size: "sm", weight: "bold", className: "mb-3 block", children: "Tipo de quest\xE3o" }),
|
|
11465
|
-
/* @__PURE__ */ jsx58("div", { className: "grid grid-cols-2 gap-2", children:
|
|
11467
|
+
/* @__PURE__ */ jsx58("div", { className: "grid grid-cols-2 gap-2", children: availableQuestionTypes.map((questionType) => /* @__PURE__ */ jsx58(
|
|
11466
11468
|
Chips_default,
|
|
11467
11469
|
{
|
|
11468
11470
|
selected: selectedTypes.includes(questionType),
|
|
@@ -11473,10 +11475,11 @@ var QuestionTypeFilter = ({
|
|
|
11473
11475
|
)) })
|
|
11474
11476
|
] });
|
|
11475
11477
|
};
|
|
11476
|
-
var
|
|
11478
|
+
var BanksAndYearsFilter = ({
|
|
11477
11479
|
banks,
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
+
bankYears,
|
|
11481
|
+
bankCategories,
|
|
11482
|
+
onBankCategoriesChange,
|
|
11480
11483
|
loading = false,
|
|
11481
11484
|
error = null
|
|
11482
11485
|
}) => {
|
|
@@ -11486,18 +11489,21 @@ var BanksFilter = ({
|
|
|
11486
11489
|
if (error) {
|
|
11487
11490
|
return /* @__PURE__ */ jsx58(Text_default, { size: "sm", className: "text-text-600", children: error });
|
|
11488
11491
|
}
|
|
11489
|
-
if (banks.length === 0) {
|
|
11492
|
+
if (banks.length === 0 && bankYears.length === 0) {
|
|
11490
11493
|
return /* @__PURE__ */ jsx58(Text_default, { size: "sm", className: "text-text-600", children: "Nenhuma banca encontrada" });
|
|
11491
11494
|
}
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
|
|
11496
|
-
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11500
|
-
|
|
11495
|
+
if (bankCategories.length > 0) {
|
|
11496
|
+
return /* @__PURE__ */ jsx58(
|
|
11497
|
+
CheckboxGroup,
|
|
11498
|
+
{
|
|
11499
|
+
categories: bankCategories,
|
|
11500
|
+
onCategoriesChange: onBankCategoriesChange,
|
|
11501
|
+
compactSingleItem: true,
|
|
11502
|
+
showSingleItem: true
|
|
11503
|
+
}
|
|
11504
|
+
);
|
|
11505
|
+
}
|
|
11506
|
+
return null;
|
|
11501
11507
|
};
|
|
11502
11508
|
var SubjectsFilter = ({
|
|
11503
11509
|
knowledgeAreas,
|
|
@@ -11546,38 +11552,10 @@ var SubjectsFilter = ({
|
|
|
11546
11552
|
area.id
|
|
11547
11553
|
)) });
|
|
11548
11554
|
};
|
|
11549
|
-
var KnowledgeSummary = ({
|
|
11550
|
-
knowledgeStructure,
|
|
11551
|
-
selectedKnowledgeSummary
|
|
11552
|
-
}) => {
|
|
11553
|
-
return /* @__PURE__ */ jsxs45("div", { className: "mt-4 p-3 bg-background-50 rounded-lg border border-border-200", children: [
|
|
11554
|
-
/* @__PURE__ */ jsx58(Text_default, { size: "sm", weight: "bold", className: "mb-2 block", children: "Resumo da sele\xE7\xE3o" }),
|
|
11555
|
-
/* @__PURE__ */ jsxs45("div", { className: "flex flex-col gap-2", children: [
|
|
11556
|
-
knowledgeStructure.topics.length === 1 && /* @__PURE__ */ jsxs45("div", { children: [
|
|
11557
|
-
/* @__PURE__ */ jsx58(Text_default, { size: "xs", weight: "medium", className: "text-text-600", children: "Tema:" }),
|
|
11558
|
-
/* @__PURE__ */ jsx58("div", { className: "flex flex-wrap gap-1 mt-1", children: selectedKnowledgeSummary.topics.map((topic) => /* @__PURE__ */ jsx58(Chips_default, { selected: true, children: topic }, topic)) })
|
|
11559
|
-
] }),
|
|
11560
|
-
knowledgeStructure.subtopics.length === 1 && /* @__PURE__ */ jsxs45("div", { children: [
|
|
11561
|
-
/* @__PURE__ */ jsx58(Text_default, { size: "xs", weight: "medium", className: "text-text-600", children: "Subtema:" }),
|
|
11562
|
-
/* @__PURE__ */ jsx58("div", { className: "flex flex-wrap gap-1 mt-1", children: selectedKnowledgeSummary.subtopics.map((subtopic) => /* @__PURE__ */ jsx58(Chips_default, { selected: true, children: subtopic }, subtopic)) })
|
|
11563
|
-
] }),
|
|
11564
|
-
knowledgeStructure.contents.length === 1 && /* @__PURE__ */ jsxs45("div", { children: [
|
|
11565
|
-
/* @__PURE__ */ jsx58(Text_default, { size: "xs", weight: "medium", className: "text-text-600", children: "Assunto:" }),
|
|
11566
|
-
/* @__PURE__ */ jsx58("div", { className: "flex flex-wrap gap-1 mt-1", children: selectedKnowledgeSummary.contents.map((content) => /* @__PURE__ */ jsx58(Chips_default, { selected: true, children: content }, content)) })
|
|
11567
|
-
] })
|
|
11568
|
-
] })
|
|
11569
|
-
] });
|
|
11570
|
-
};
|
|
11571
11555
|
var KnowledgeStructureFilter = ({
|
|
11572
11556
|
knowledgeStructure,
|
|
11573
11557
|
knowledgeCategories,
|
|
11574
|
-
handleCategoriesChange
|
|
11575
|
-
selectedKnowledgeSummary = {
|
|
11576
|
-
topics: [],
|
|
11577
|
-
subtopics: [],
|
|
11578
|
-
contents: []
|
|
11579
|
-
},
|
|
11580
|
-
enableSummary = false
|
|
11558
|
+
handleCategoriesChange
|
|
11581
11559
|
}) => {
|
|
11582
11560
|
return /* @__PURE__ */ jsxs45("div", { className: "mt-4", children: [
|
|
11583
11561
|
/* @__PURE__ */ jsx58(Text_default, { size: "sm", weight: "bold", className: "mb-3 block", children: "Tema, Subtema e Assunto" }),
|
|
@@ -11587,17 +11565,12 @@ var KnowledgeStructureFilter = ({
|
|
|
11587
11565
|
CheckboxGroup,
|
|
11588
11566
|
{
|
|
11589
11567
|
categories: knowledgeCategories,
|
|
11590
|
-
onCategoriesChange: handleCategoriesChange
|
|
11568
|
+
onCategoriesChange: handleCategoriesChange,
|
|
11569
|
+
compactSingleItem: false,
|
|
11570
|
+
showSingleItem: true
|
|
11591
11571
|
}
|
|
11592
11572
|
),
|
|
11593
|
-
!knowledgeStructure.loading && knowledgeCategories.length === 0 && knowledgeStructure.topics.length === 0 && /* @__PURE__ */ jsx58(Text_default, { size: "sm", className: "text-text-600", children: "Nenhum tema dispon\xEDvel para as mat\xE9rias selecionadas" })
|
|
11594
|
-
enableSummary && /* @__PURE__ */ jsx58(
|
|
11595
|
-
KnowledgeSummary,
|
|
11596
|
-
{
|
|
11597
|
-
knowledgeStructure,
|
|
11598
|
-
selectedKnowledgeSummary
|
|
11599
|
-
}
|
|
11600
|
-
)
|
|
11573
|
+
!knowledgeStructure.loading && knowledgeCategories.length === 0 && knowledgeStructure.topics.length === 0 && /* @__PURE__ */ jsx58(Text_default, { size: "sm", className: "text-text-600", children: "Nenhum tema dispon\xEDvel para as mat\xE9rias selecionadas" })
|
|
11601
11574
|
] });
|
|
11602
11575
|
};
|
|
11603
11576
|
var FilterActions = ({
|
|
@@ -11617,6 +11590,7 @@ var ActivityFilters = ({
|
|
|
11617
11590
|
variant = "default",
|
|
11618
11591
|
// Data
|
|
11619
11592
|
banks = [],
|
|
11593
|
+
bankYears = [],
|
|
11620
11594
|
knowledgeAreas = [],
|
|
11621
11595
|
knowledgeStructure = {
|
|
11622
11596
|
topics: [],
|
|
@@ -11626,6 +11600,8 @@ var ActivityFilters = ({
|
|
|
11626
11600
|
error: null
|
|
11627
11601
|
},
|
|
11628
11602
|
knowledgeCategories = [],
|
|
11603
|
+
// Question types
|
|
11604
|
+
allowedQuestionTypes,
|
|
11629
11605
|
// Loading states
|
|
11630
11606
|
loadingBanks = false,
|
|
11631
11607
|
loadingKnowledge: _loadingKnowledge = false,
|
|
@@ -11641,19 +11617,47 @@ var ActivityFilters = ({
|
|
|
11641
11617
|
loadContents: _loadContents,
|
|
11642
11618
|
// Handlers
|
|
11643
11619
|
handleCategoriesChange,
|
|
11644
|
-
selectedKnowledgeSummary = {
|
|
11645
|
-
topics: [],
|
|
11646
|
-
subtopics: [],
|
|
11647
|
-
contents: []
|
|
11648
|
-
},
|
|
11649
|
-
enableSummary = false,
|
|
11650
11620
|
// Action buttons
|
|
11651
11621
|
onClearFilters,
|
|
11652
11622
|
onApplyFilters
|
|
11653
11623
|
}) => {
|
|
11654
11624
|
const [selectedQuestionTypes, setSelectedQuestionTypes] = useState22([]);
|
|
11655
|
-
const [selectedBanks, setSelectedBanks] = useState22([]);
|
|
11656
11625
|
const [selectedSubject, setSelectedSubject] = useState22(null);
|
|
11626
|
+
const prevAllowedQuestionTypesRef = useRef12(null);
|
|
11627
|
+
useEffect22(() => {
|
|
11628
|
+
if (!allowedQuestionTypes || allowedQuestionTypes.length === 0) {
|
|
11629
|
+
prevAllowedQuestionTypesRef.current = null;
|
|
11630
|
+
return;
|
|
11631
|
+
}
|
|
11632
|
+
const currentKey = allowedQuestionTypes.slice().sort((a, b) => {
|
|
11633
|
+
return a === b ? 0 : allowedQuestionTypes.indexOf(a) - allowedQuestionTypes.indexOf(b);
|
|
11634
|
+
}).join(",");
|
|
11635
|
+
const prevKey = prevAllowedQuestionTypesRef.current;
|
|
11636
|
+
if (currentKey === prevKey) {
|
|
11637
|
+
return;
|
|
11638
|
+
}
|
|
11639
|
+
prevAllowedQuestionTypesRef.current = currentKey;
|
|
11640
|
+
setSelectedQuestionTypes((prev) => {
|
|
11641
|
+
const filtered = prev.filter(
|
|
11642
|
+
(type) => allowedQuestionTypes.includes(type)
|
|
11643
|
+
);
|
|
11644
|
+
if (filtered.length !== prev.length) {
|
|
11645
|
+
return filtered;
|
|
11646
|
+
}
|
|
11647
|
+
const prevSet = new Set(prev);
|
|
11648
|
+
const filteredSet = new Set(filtered);
|
|
11649
|
+
if (prevSet.size !== filteredSet.size) {
|
|
11650
|
+
return filtered;
|
|
11651
|
+
}
|
|
11652
|
+
for (const item of prevSet) {
|
|
11653
|
+
if (!filteredSet.has(item)) {
|
|
11654
|
+
return filtered;
|
|
11655
|
+
}
|
|
11656
|
+
}
|
|
11657
|
+
return prev;
|
|
11658
|
+
});
|
|
11659
|
+
}, [allowedQuestionTypes]);
|
|
11660
|
+
const [bankCategories, setBankCategories] = useState22([]);
|
|
11657
11661
|
const selectedSubjects = useMemo10(
|
|
11658
11662
|
() => selectedSubject ? [selectedSubject] : [],
|
|
11659
11663
|
[selectedSubject]
|
|
@@ -11661,12 +11665,38 @@ var ActivityFilters = ({
|
|
|
11661
11665
|
const toggleQuestionType = (questionType) => {
|
|
11662
11666
|
setSelectedQuestionTypes((prev) => toggleArrayItem(prev, questionType));
|
|
11663
11667
|
};
|
|
11664
|
-
const toggleBank = (bankName) => {
|
|
11665
|
-
setSelectedBanks((prev) => toggleArrayItem(prev, bankName));
|
|
11666
|
-
};
|
|
11667
11668
|
const handleSubjectChange = (subjectId) => {
|
|
11668
11669
|
setSelectedSubject(toggleSingleValue(selectedSubject, subjectId));
|
|
11669
11670
|
};
|
|
11671
|
+
const handleBankCategoriesChange = (updatedCategories) => {
|
|
11672
|
+
setBankCategories(updatedCategories);
|
|
11673
|
+
};
|
|
11674
|
+
useEffect22(() => {
|
|
11675
|
+
setBankCategories((prevCategories) => {
|
|
11676
|
+
const bankCategory = {
|
|
11677
|
+
key: "banca",
|
|
11678
|
+
label: "Banca",
|
|
11679
|
+
itens: banks.map((bank) => ({
|
|
11680
|
+
id: bank.id,
|
|
11681
|
+
name: bank.name || bank.examInstitution
|
|
11682
|
+
})),
|
|
11683
|
+
selectedIds: prevCategories.find((c) => c.key === "banca")?.selectedIds || []
|
|
11684
|
+
};
|
|
11685
|
+
const yearCategory = {
|
|
11686
|
+
key: "ano",
|
|
11687
|
+
label: "Ano",
|
|
11688
|
+
dependsOn: ["banca"],
|
|
11689
|
+
itens: bankYears.map((year) => ({
|
|
11690
|
+
id: year.id,
|
|
11691
|
+
name: year.name,
|
|
11692
|
+
bankId: year.bankId
|
|
11693
|
+
})),
|
|
11694
|
+
filteredBy: [{ key: "banca", internalField: "bankId" }],
|
|
11695
|
+
selectedIds: prevCategories.find((c) => c.key === "ano")?.selectedIds || []
|
|
11696
|
+
};
|
|
11697
|
+
return [bankCategory, yearCategory];
|
|
11698
|
+
});
|
|
11699
|
+
}, [banks, bankYears]);
|
|
11670
11700
|
useEffect22(() => {
|
|
11671
11701
|
if (loadBanks) {
|
|
11672
11702
|
loadBanks();
|
|
@@ -11687,24 +11717,36 @@ var ActivityFilters = ({
|
|
|
11687
11717
|
contentIds: "assunto"
|
|
11688
11718
|
});
|
|
11689
11719
|
}, [knowledgeCategories]);
|
|
11720
|
+
const getSelectedBankIds = useCallback4(() => {
|
|
11721
|
+
return getSelectedIdsFromCategories(bankCategories, {
|
|
11722
|
+
bankIds: "banca",
|
|
11723
|
+
yearIds: "ano"
|
|
11724
|
+
});
|
|
11725
|
+
}, [bankCategories]);
|
|
11726
|
+
const onFiltersChangeRef = useRef12(onFiltersChange);
|
|
11727
|
+
useEffect22(() => {
|
|
11728
|
+
onFiltersChangeRef.current = onFiltersChange;
|
|
11729
|
+
}, [onFiltersChange]);
|
|
11690
11730
|
useEffect22(() => {
|
|
11691
11731
|
const knowledgeIds = getSelectedKnowledgeIds();
|
|
11732
|
+
const bankIds = getSelectedBankIds();
|
|
11692
11733
|
const filters = {
|
|
11693
11734
|
types: selectedQuestionTypes,
|
|
11694
|
-
bankIds:
|
|
11735
|
+
bankIds: bankIds.bankIds || [],
|
|
11736
|
+
yearIds: bankIds.yearIds || [],
|
|
11695
11737
|
knowledgeIds: selectedSubjects,
|
|
11696
11738
|
topicIds: knowledgeIds.topicIds,
|
|
11697
11739
|
subtopicIds: knowledgeIds.subtopicIds,
|
|
11698
11740
|
contentIds: knowledgeIds.contentIds
|
|
11699
11741
|
};
|
|
11700
|
-
|
|
11742
|
+
onFiltersChangeRef.current(filters);
|
|
11701
11743
|
}, [
|
|
11702
11744
|
selectedQuestionTypes,
|
|
11703
|
-
selectedBanks,
|
|
11704
11745
|
selectedSubjects,
|
|
11705
11746
|
knowledgeCategories,
|
|
11747
|
+
bankCategories,
|
|
11706
11748
|
getSelectedKnowledgeIds,
|
|
11707
|
-
|
|
11749
|
+
getSelectedBankIds
|
|
11708
11750
|
]);
|
|
11709
11751
|
const containerClassName = variant === "popover" ? "w-full bg-background" : "w-[400px] flex-shrink-0 p-4 bg-background";
|
|
11710
11752
|
const contentClassName = variant === "popover" ? "p-4" : "";
|
|
@@ -11715,17 +11757,19 @@ var ActivityFilters = ({
|
|
|
11715
11757
|
QuestionTypeFilter,
|
|
11716
11758
|
{
|
|
11717
11759
|
selectedTypes: selectedQuestionTypes,
|
|
11718
|
-
onToggleType: toggleQuestionType
|
|
11760
|
+
onToggleType: toggleQuestionType,
|
|
11761
|
+
allowedQuestionTypes
|
|
11719
11762
|
}
|
|
11720
11763
|
),
|
|
11721
11764
|
/* @__PURE__ */ jsxs45("div", { children: [
|
|
11722
11765
|
/* @__PURE__ */ jsx58(Text_default, { size: "sm", weight: "bold", className: "mb-3 block", children: "Banca de vestibular" }),
|
|
11723
11766
|
/* @__PURE__ */ jsx58(
|
|
11724
|
-
|
|
11767
|
+
BanksAndYearsFilter,
|
|
11725
11768
|
{
|
|
11726
11769
|
banks,
|
|
11727
|
-
|
|
11728
|
-
|
|
11770
|
+
bankYears,
|
|
11771
|
+
bankCategories,
|
|
11772
|
+
onBankCategoriesChange: handleBankCategoriesChange,
|
|
11729
11773
|
loading: loadingBanks,
|
|
11730
11774
|
error: banksError
|
|
11731
11775
|
}
|
|
@@ -11749,9 +11793,7 @@ var ActivityFilters = ({
|
|
|
11749
11793
|
{
|
|
11750
11794
|
knowledgeStructure,
|
|
11751
11795
|
knowledgeCategories,
|
|
11752
|
-
handleCategoriesChange
|
|
11753
|
-
selectedKnowledgeSummary,
|
|
11754
|
-
enableSummary
|
|
11796
|
+
handleCategoriesChange
|
|
11755
11797
|
}
|
|
11756
11798
|
),
|
|
11757
11799
|
/* @__PURE__ */ jsx58(
|
|
@@ -12090,7 +12132,7 @@ var TableProvider_default = TableProvider;
|
|
|
12090
12132
|
import { create as create10, useStore as useStore4 } from "zustand";
|
|
12091
12133
|
import {
|
|
12092
12134
|
useEffect as useEffect24,
|
|
12093
|
-
useRef as
|
|
12135
|
+
useRef as useRef13,
|
|
12094
12136
|
forwardRef as forwardRef19,
|
|
12095
12137
|
isValidElement as isValidElement6,
|
|
12096
12138
|
Children as Children6,
|
|
@@ -12196,10 +12238,10 @@ var Select = ({
|
|
|
12196
12238
|
errorMessage,
|
|
12197
12239
|
id
|
|
12198
12240
|
}) => {
|
|
12199
|
-
const storeRef =
|
|
12241
|
+
const storeRef = useRef13(null);
|
|
12200
12242
|
storeRef.current ??= createSelectStore(onValueChange);
|
|
12201
12243
|
const store = storeRef.current;
|
|
12202
|
-
const selectRef =
|
|
12244
|
+
const selectRef = useRef13(null);
|
|
12203
12245
|
const { open, setOpen, setValue, selectedLabel } = useStore4(store, (s) => s);
|
|
12204
12246
|
const generatedId = useId10();
|
|
12205
12247
|
const selectId = id ?? `select-${generatedId}`;
|
|
@@ -12443,7 +12485,7 @@ var Select_default = Select;
|
|
|
12443
12485
|
import { create as create11, useStore as useStore5 } from "zustand";
|
|
12444
12486
|
import {
|
|
12445
12487
|
useEffect as useEffect25,
|
|
12446
|
-
useRef as
|
|
12488
|
+
useRef as useRef14,
|
|
12447
12489
|
forwardRef as forwardRef20,
|
|
12448
12490
|
isValidElement as isValidElement7,
|
|
12449
12491
|
Children as Children7,
|
|
@@ -12480,7 +12522,7 @@ var Menu = forwardRef20(
|
|
|
12480
12522
|
onValueChange,
|
|
12481
12523
|
...props
|
|
12482
12524
|
}, ref) => {
|
|
12483
|
-
const storeRef =
|
|
12525
|
+
const storeRef = useRef14(null);
|
|
12484
12526
|
storeRef.current ??= createMenuStore(onValueChange);
|
|
12485
12527
|
const store = storeRef.current;
|
|
12486
12528
|
const { setValue } = useStore5(store, (s) => s);
|
|
@@ -12685,7 +12727,7 @@ var MenuOverflow = ({
|
|
|
12685
12727
|
onValueChange,
|
|
12686
12728
|
...props
|
|
12687
12729
|
}) => {
|
|
12688
|
-
const containerRef =
|
|
12730
|
+
const containerRef = useRef14(null);
|
|
12689
12731
|
const [showLeftArrow, setShowLeftArrow] = useState24(false);
|
|
12690
12732
|
const [showRightArrow, setShowRightArrow] = useState24(false);
|
|
12691
12733
|
useEffect25(() => {
|
|
@@ -13012,7 +13054,7 @@ var NotFound_default = NotFound;
|
|
|
13012
13054
|
|
|
13013
13055
|
// src/components/VideoPlayer/VideoPlayer.tsx
|
|
13014
13056
|
import {
|
|
13015
|
-
useRef as
|
|
13057
|
+
useRef as useRef15,
|
|
13016
13058
|
useState as useState26,
|
|
13017
13059
|
useEffect as useEffect26,
|
|
13018
13060
|
useCallback as useCallback7
|
|
@@ -13286,9 +13328,9 @@ var SpeedMenu = ({
|
|
|
13286
13328
|
iconSize = 24,
|
|
13287
13329
|
isTinyMobile = false
|
|
13288
13330
|
}) => {
|
|
13289
|
-
const buttonRef =
|
|
13290
|
-
const speedMenuContainerRef =
|
|
13291
|
-
const speedMenuRef =
|
|
13331
|
+
const buttonRef = useRef15(null);
|
|
13332
|
+
const speedMenuContainerRef = useRef15(null);
|
|
13333
|
+
const speedMenuRef = useRef15(null);
|
|
13292
13334
|
const getMenuPosition = () => {
|
|
13293
13335
|
if (!buttonRef.current) return { top: 0, left: 0 };
|
|
13294
13336
|
const rect = buttonRef.current.getBoundingClientRect();
|
|
@@ -13381,7 +13423,7 @@ var VideoPlayer = ({
|
|
|
13381
13423
|
onDownloadComplete,
|
|
13382
13424
|
onDownloadError
|
|
13383
13425
|
}) => {
|
|
13384
|
-
const videoRef =
|
|
13426
|
+
const videoRef = useRef15(null);
|
|
13385
13427
|
const { isUltraSmallMobile, isTinyMobile } = useMobile();
|
|
13386
13428
|
const [isPlaying, setIsPlaying] = useState26(false);
|
|
13387
13429
|
const [currentTime, setCurrentTime] = useState26(0);
|
|
@@ -13398,10 +13440,10 @@ var VideoPlayer = ({
|
|
|
13398
13440
|
}, [src]);
|
|
13399
13441
|
const [playbackRate, setPlaybackRate] = useState26(1);
|
|
13400
13442
|
const [showSpeedMenu, setShowSpeedMenu] = useState26(false);
|
|
13401
|
-
const lastSaveTimeRef =
|
|
13402
|
-
const trackRef =
|
|
13403
|
-
const controlsTimeoutRef =
|
|
13404
|
-
const lastMousePositionRef =
|
|
13443
|
+
const lastSaveTimeRef = useRef15(0);
|
|
13444
|
+
const trackRef = useRef15(null);
|
|
13445
|
+
const controlsTimeoutRef = useRef15(null);
|
|
13446
|
+
const lastMousePositionRef = useRef15({ x: 0, y: 0 });
|
|
13405
13447
|
const isUserInteracting = useCallback7(() => {
|
|
13406
13448
|
if (showSpeedMenu) {
|
|
13407
13449
|
return true;
|
|
@@ -14415,7 +14457,7 @@ function createZustandAuthAdapter(useAuthStore2) {
|
|
|
14415
14457
|
}
|
|
14416
14458
|
|
|
14417
14459
|
// src/components/Auth/useUrlAuthentication.ts
|
|
14418
|
-
import { useEffect as useEffect28, useRef as
|
|
14460
|
+
import { useEffect as useEffect28, useRef as useRef16 } from "react";
|
|
14419
14461
|
import { useLocation as useLocation2 } from "react-router-dom";
|
|
14420
14462
|
var getAuthParams = (location, extractParams) => {
|
|
14421
14463
|
const searchParams = new URLSearchParams(location.search);
|
|
@@ -14463,7 +14505,7 @@ var handleUserData = (responseData, setUser) => {
|
|
|
14463
14505
|
};
|
|
14464
14506
|
function useUrlAuthentication(options) {
|
|
14465
14507
|
const location = useLocation2();
|
|
14466
|
-
const processedRef =
|
|
14508
|
+
const processedRef = useRef16(false);
|
|
14467
14509
|
useEffect28(() => {
|
|
14468
14510
|
const handleAuthentication = async () => {
|
|
14469
14511
|
if (processedRef.current) {
|
|
@@ -14566,7 +14608,7 @@ import {
|
|
|
14566
14608
|
useEffect as useEffect30,
|
|
14567
14609
|
useId as useId11,
|
|
14568
14610
|
useMemo as useMemo14,
|
|
14569
|
-
useRef as
|
|
14611
|
+
useRef as useRef17,
|
|
14570
14612
|
useState as useState30
|
|
14571
14613
|
} from "react";
|
|
14572
14614
|
|
|
@@ -14823,8 +14865,8 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
|
|
|
14823
14865
|
const currentQuestionResult = getQuestionResultByQuestionId(
|
|
14824
14866
|
currentQuestion?.id || ""
|
|
14825
14867
|
);
|
|
14826
|
-
const prevSelectedValuesRef =
|
|
14827
|
-
const prevQuestionIdRef =
|
|
14868
|
+
const prevSelectedValuesRef = useRef17([]);
|
|
14869
|
+
const prevQuestionIdRef = useRef17("");
|
|
14828
14870
|
const allCurrentAnswerIds = useMemo14(() => {
|
|
14829
14871
|
return allCurrentAnswers?.map((answer) => answer.optionId) || [];
|
|
14830
14872
|
}, [allCurrentAnswers]);
|
|
@@ -14924,7 +14966,7 @@ var QuizDissertative = ({ paddingBottom }) => {
|
|
|
14924
14966
|
currentQuestion?.id || ""
|
|
14925
14967
|
);
|
|
14926
14968
|
const currentAnswer = getCurrentAnswer();
|
|
14927
|
-
const textareaRef =
|
|
14969
|
+
const textareaRef = useRef17(null);
|
|
14928
14970
|
const charLimit = getDissertativeCharLimit();
|
|
14929
14971
|
const handleAnswerChange = (value) => {
|
|
14930
14972
|
if (currentQuestion) {
|