analytica-frontend-lib 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Support/TicketModal/index.js.map +1 -1
- package/dist/Support/TicketModal/index.mjs.map +1 -1
- package/dist/Support/index.js.map +1 -1
- package/dist/Support/index.mjs.map +1 -1
- package/dist/hooks/useSupportFeatureFlag.d.ts +13 -0
- package/dist/hooks/useSupportFeatureFlag.d.ts.map +1 -0
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +294 -205
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +158 -72
- package/dist/index.mjs.map +1 -1
- package/dist/types/support/index.d.ts +11 -0
- package/dist/types/support/index.d.ts.map +1 -1
- package/dist/types/support/index.js +7 -0
- package/dist/types/support/index.js.map +1 -1
- package/dist/types/support/index.mjs +6 -0
- package/dist/types/support/index.mjs.map +1 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -212,6 +212,7 @@ __export(src_exports, {
|
|
|
212
212
|
Support: () => Support_default,
|
|
213
213
|
SupportCategory: () => SupportCategory,
|
|
214
214
|
SupportStatus: () => SupportStatus,
|
|
215
|
+
SupportType: () => SupportType,
|
|
215
216
|
Table: () => Table_default,
|
|
216
217
|
TableBody: () => TableBody,
|
|
217
218
|
TableCaption: () => TableCaption,
|
|
@@ -232,6 +233,7 @@ __export(src_exports, {
|
|
|
232
233
|
VideoPlayer: () => VideoPlayer_default,
|
|
233
234
|
WS_STATES: () => WS_STATES,
|
|
234
235
|
Whiteboard: () => Whiteboard_default,
|
|
236
|
+
ZendeskWidget: () => ZendeskWidget,
|
|
235
237
|
activitiesHistoryApiResponseSchema: () => activitiesHistoryApiResponseSchema,
|
|
236
238
|
activityModelsApiResponseSchema: () => activityModelsApiResponseSchema,
|
|
237
239
|
buildUserFilterData: () => buildUserFilterData,
|
|
@@ -367,6 +369,7 @@ __export(src_exports, {
|
|
|
367
369
|
useSendActivity: () => useSendActivity,
|
|
368
370
|
useSendActivityModal: () => useSendActivityModal,
|
|
369
371
|
useSendLessonModal: () => useSendLessonModal,
|
|
372
|
+
useSupportFeatureFlag: () => useSupportFeatureFlag,
|
|
370
373
|
useTableFilter: () => useTableFilter,
|
|
371
374
|
useTableSort: () => useTableSort,
|
|
372
375
|
useTheme: () => useTheme,
|
|
@@ -27253,6 +27256,11 @@ var mapInternalStatusToApi = (internalStatus) => {
|
|
|
27253
27256
|
return "ABERTO";
|
|
27254
27257
|
}
|
|
27255
27258
|
};
|
|
27259
|
+
var SupportType = /* @__PURE__ */ ((SupportType2) => {
|
|
27260
|
+
SupportType2["NATIVE"] = "NATIVE";
|
|
27261
|
+
SupportType2["ZENDESK"] = "ZENDESK";
|
|
27262
|
+
return SupportType2;
|
|
27263
|
+
})(SupportType || {});
|
|
27256
27264
|
|
|
27257
27265
|
// src/components/Support/utils/supportUtils.tsx
|
|
27258
27266
|
var import_react80 = require("@phosphor-icons/react");
|
|
@@ -28130,8 +28138,86 @@ var Support = ({
|
|
|
28130
28138
|
};
|
|
28131
28139
|
var Support_default = Support;
|
|
28132
28140
|
|
|
28133
|
-
// src/components/
|
|
28141
|
+
// src/components/ZendeskWidget/ZendeskWidget.tsx
|
|
28134
28142
|
var import_react84 = require("react");
|
|
28143
|
+
var zendeskWidgetCount = 0;
|
|
28144
|
+
var ZendeskWidget = ({ zendeskKey }) => {
|
|
28145
|
+
(0, import_react84.useEffect)(() => {
|
|
28146
|
+
if (!zendeskKey) return;
|
|
28147
|
+
zendeskWidgetCount++;
|
|
28148
|
+
if (!document.getElementById("ze-snippet")) {
|
|
28149
|
+
const script = document.createElement("script");
|
|
28150
|
+
script.id = "ze-snippet";
|
|
28151
|
+
script.src = `https://static.zdassets.com/ekr/snippet.js?key=${zendeskKey}`;
|
|
28152
|
+
script.async = true;
|
|
28153
|
+
script.onload = () => {
|
|
28154
|
+
const zE = globalThis.zE;
|
|
28155
|
+
if (zE) {
|
|
28156
|
+
zE("messenger:set", "locale", "pt-BR");
|
|
28157
|
+
}
|
|
28158
|
+
};
|
|
28159
|
+
document.body.appendChild(script);
|
|
28160
|
+
}
|
|
28161
|
+
return () => {
|
|
28162
|
+
zendeskWidgetCount--;
|
|
28163
|
+
if (zendeskWidgetCount <= 0) {
|
|
28164
|
+
zendeskWidgetCount = 0;
|
|
28165
|
+
const existingScript = document.getElementById("ze-snippet");
|
|
28166
|
+
if (existingScript) {
|
|
28167
|
+
existingScript.remove();
|
|
28168
|
+
}
|
|
28169
|
+
const zE = globalThis.zE;
|
|
28170
|
+
if (zE) {
|
|
28171
|
+
zE("messenger", "close");
|
|
28172
|
+
}
|
|
28173
|
+
}
|
|
28174
|
+
};
|
|
28175
|
+
}, [zendeskKey]);
|
|
28176
|
+
return null;
|
|
28177
|
+
};
|
|
28178
|
+
|
|
28179
|
+
// src/hooks/useSupportFeatureFlag.ts
|
|
28180
|
+
var import_react85 = require("react");
|
|
28181
|
+
var useSupportFeatureFlag = (config) => {
|
|
28182
|
+
const [supportType, setSupportType] = (0, import_react85.useState)("NATIVE" /* NATIVE */);
|
|
28183
|
+
const [loading, setLoading] = (0, import_react85.useState)(true);
|
|
28184
|
+
const { institutionId } = useAppStore();
|
|
28185
|
+
(0, import_react85.useEffect)(() => {
|
|
28186
|
+
if (!institutionId) {
|
|
28187
|
+
setLoading(false);
|
|
28188
|
+
return;
|
|
28189
|
+
}
|
|
28190
|
+
const fetchSupportFlag = async () => {
|
|
28191
|
+
try {
|
|
28192
|
+
const { data: response } = await config.apiClient.get(`/featureFlags/institution/${institutionId}/page/SUPPORT`);
|
|
28193
|
+
const type = response?.data?.featureFlags?.version?.supportType;
|
|
28194
|
+
if (type) {
|
|
28195
|
+
setSupportType(type);
|
|
28196
|
+
}
|
|
28197
|
+
} catch {
|
|
28198
|
+
setSupportType("NATIVE" /* NATIVE */);
|
|
28199
|
+
} finally {
|
|
28200
|
+
setLoading(false);
|
|
28201
|
+
}
|
|
28202
|
+
};
|
|
28203
|
+
fetchSupportFlag();
|
|
28204
|
+
}, [institutionId]);
|
|
28205
|
+
const openZendeskChat = () => {
|
|
28206
|
+
if (typeof globalThis !== "undefined" && globalThis.zE) {
|
|
28207
|
+
globalThis.zE("messenger", "open");
|
|
28208
|
+
}
|
|
28209
|
+
};
|
|
28210
|
+
return {
|
|
28211
|
+
supportType,
|
|
28212
|
+
loading,
|
|
28213
|
+
isZendesk: supportType === "ZENDESK" /* ZENDESK */,
|
|
28214
|
+
isNative: supportType === "NATIVE" /* NATIVE */,
|
|
28215
|
+
openZendeskChat
|
|
28216
|
+
};
|
|
28217
|
+
};
|
|
28218
|
+
|
|
28219
|
+
// src/components/SendActivityModal/SendActivityModal.tsx
|
|
28220
|
+
var import_react86 = require("react");
|
|
28135
28221
|
|
|
28136
28222
|
// src/components/SendActivityModal/hooks/useSendActivityModal.ts
|
|
28137
28223
|
var import_zustand17 = require("zustand");
|
|
@@ -28396,7 +28482,7 @@ var SendActivityModal = ({
|
|
|
28396
28482
|
const storeCategories = useSendActivityModalStore(
|
|
28397
28483
|
(state) => state.categories
|
|
28398
28484
|
);
|
|
28399
|
-
const prevInitialDataRef = (0,
|
|
28485
|
+
const prevInitialDataRef = (0, import_react86.useRef)(
|
|
28400
28486
|
void 0
|
|
28401
28487
|
);
|
|
28402
28488
|
useCategoryInitialization({
|
|
@@ -28418,7 +28504,7 @@ var SendActivityModal = ({
|
|
|
28418
28504
|
setCategories,
|
|
28419
28505
|
categoriesInitializedRef
|
|
28420
28506
|
});
|
|
28421
|
-
(0,
|
|
28507
|
+
(0, import_react86.useEffect)(() => {
|
|
28422
28508
|
if (isOpen && initialData && prevInitialDataRef.current !== initialData) {
|
|
28423
28509
|
store.setFormData({
|
|
28424
28510
|
title: initialData.title ?? "",
|
|
@@ -28428,7 +28514,7 @@ var SendActivityModal = ({
|
|
|
28428
28514
|
prevInitialDataRef.current = initialData;
|
|
28429
28515
|
}
|
|
28430
28516
|
}, [isOpen, initialData, store]);
|
|
28431
|
-
(0,
|
|
28517
|
+
(0, import_react86.useEffect)(() => {
|
|
28432
28518
|
if (!isOpen) {
|
|
28433
28519
|
reset();
|
|
28434
28520
|
prevInitialDataRef.current = void 0;
|
|
@@ -28440,38 +28526,38 @@ var SendActivityModal = ({
|
|
|
28440
28526
|
handleFinalDateChange,
|
|
28441
28527
|
handleFinalTimeChange
|
|
28442
28528
|
} = useDateTimeHandlers({ setFormData: store.setFormData });
|
|
28443
|
-
const handleCategoriesChange = (0,
|
|
28529
|
+
const handleCategoriesChange = (0, import_react86.useCallback)(
|
|
28444
28530
|
(updatedCategories) => {
|
|
28445
28531
|
setCategories(updatedCategories);
|
|
28446
28532
|
onCategoriesChange?.(updatedCategories);
|
|
28447
28533
|
},
|
|
28448
28534
|
[setCategories, onCategoriesChange]
|
|
28449
28535
|
);
|
|
28450
|
-
const handleActivityTypeSelect = (0,
|
|
28536
|
+
const handleActivityTypeSelect = (0, import_react86.useCallback)(
|
|
28451
28537
|
(subtype) => {
|
|
28452
28538
|
store.setFormData({ subtype });
|
|
28453
28539
|
},
|
|
28454
28540
|
[store]
|
|
28455
28541
|
);
|
|
28456
|
-
const handleTitleChange = (0,
|
|
28542
|
+
const handleTitleChange = (0, import_react86.useCallback)(
|
|
28457
28543
|
(e) => {
|
|
28458
28544
|
store.setFormData({ title: e.target.value });
|
|
28459
28545
|
},
|
|
28460
28546
|
[store]
|
|
28461
28547
|
);
|
|
28462
|
-
const handleNotificationChange = (0,
|
|
28548
|
+
const handleNotificationChange = (0, import_react86.useCallback)(
|
|
28463
28549
|
(e) => {
|
|
28464
28550
|
store.setFormData({ notification: e.target.value });
|
|
28465
28551
|
},
|
|
28466
28552
|
[store]
|
|
28467
28553
|
);
|
|
28468
|
-
const handleRetryChange = (0,
|
|
28554
|
+
const handleRetryChange = (0, import_react86.useCallback)(
|
|
28469
28555
|
(value) => {
|
|
28470
28556
|
store.setFormData({ canRetry: value === "yes" });
|
|
28471
28557
|
},
|
|
28472
28558
|
[store]
|
|
28473
28559
|
);
|
|
28474
|
-
const handleSubmit = (0,
|
|
28560
|
+
const handleSubmit = (0, import_react86.useCallback)(async () => {
|
|
28475
28561
|
const isValid = store.validateAllSteps();
|
|
28476
28562
|
if (!isValid) return;
|
|
28477
28563
|
try {
|
|
@@ -28485,7 +28571,7 @@ var SendActivityModal = ({
|
|
|
28485
28571
|
}
|
|
28486
28572
|
}
|
|
28487
28573
|
}, [store, onSubmit, onError]);
|
|
28488
|
-
const handleCancel = (0,
|
|
28574
|
+
const handleCancel = (0, import_react86.useCallback)(() => {
|
|
28489
28575
|
onClose();
|
|
28490
28576
|
}, [onClose]);
|
|
28491
28577
|
const renderActivityStep = () => /* @__PURE__ */ (0, import_jsx_runtime121.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
@@ -28642,7 +28728,7 @@ var SendActivityModal = ({
|
|
|
28642
28728
|
var SendActivityModal_default = SendActivityModal;
|
|
28643
28729
|
|
|
28644
28730
|
// src/components/SendLessonModal/SendLessonModal.tsx
|
|
28645
|
-
var
|
|
28731
|
+
var import_react87 = require("react");
|
|
28646
28732
|
|
|
28647
28733
|
// src/components/SendLessonModal/hooks/useSendLessonModal.ts
|
|
28648
28734
|
var import_zustand18 = require("zustand");
|
|
@@ -28832,7 +28918,7 @@ var SendLessonModal = ({
|
|
|
28832
28918
|
setCategories,
|
|
28833
28919
|
categoriesInitializedRef
|
|
28834
28920
|
});
|
|
28835
|
-
(0,
|
|
28921
|
+
(0, import_react87.useEffect)(() => {
|
|
28836
28922
|
if (!isOpen) {
|
|
28837
28923
|
reset();
|
|
28838
28924
|
}
|
|
@@ -28843,26 +28929,26 @@ var SendLessonModal = ({
|
|
|
28843
28929
|
handleFinalDateChange,
|
|
28844
28930
|
handleFinalTimeChange
|
|
28845
28931
|
} = useDateTimeHandlers({ setFormData: store.setFormData });
|
|
28846
|
-
const handleCategoriesChange = (0,
|
|
28932
|
+
const handleCategoriesChange = (0, import_react87.useCallback)(
|
|
28847
28933
|
(updatedCategories) => {
|
|
28848
28934
|
setCategories(updatedCategories);
|
|
28849
28935
|
onCategoriesChange?.(updatedCategories);
|
|
28850
28936
|
},
|
|
28851
28937
|
[setCategories, onCategoriesChange]
|
|
28852
28938
|
);
|
|
28853
|
-
const handleTitleChange = (0,
|
|
28939
|
+
const handleTitleChange = (0, import_react87.useCallback)(
|
|
28854
28940
|
(e) => {
|
|
28855
28941
|
store.setFormData({ title: e.target.value });
|
|
28856
28942
|
},
|
|
28857
28943
|
[store]
|
|
28858
28944
|
);
|
|
28859
|
-
const handleNotificationChange = (0,
|
|
28945
|
+
const handleNotificationChange = (0, import_react87.useCallback)(
|
|
28860
28946
|
(e) => {
|
|
28861
28947
|
store.setFormData({ notification: e.target.value });
|
|
28862
28948
|
},
|
|
28863
28949
|
[store]
|
|
28864
28950
|
);
|
|
28865
|
-
const handleSubmit = (0,
|
|
28951
|
+
const handleSubmit = (0, import_react87.useCallback)(async () => {
|
|
28866
28952
|
const isValid = store.validateAllSteps();
|
|
28867
28953
|
if (!isValid) return;
|
|
28868
28954
|
try {
|
|
@@ -28876,7 +28962,7 @@ var SendLessonModal = ({
|
|
|
28876
28962
|
}
|
|
28877
28963
|
}
|
|
28878
28964
|
}, [store, onSubmit, onError]);
|
|
28879
|
-
const handleCancel = (0,
|
|
28965
|
+
const handleCancel = (0, import_react87.useCallback)(() => {
|
|
28880
28966
|
onClose();
|
|
28881
28967
|
}, [onClose]);
|
|
28882
28968
|
const renderLessonStep = () => /* @__PURE__ */ (0, import_jsx_runtime122.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
@@ -28979,11 +29065,11 @@ var SendLessonModal = ({
|
|
|
28979
29065
|
var SendLessonModal_default = SendLessonModal;
|
|
28980
29066
|
|
|
28981
29067
|
// src/components/RecommendedLessonsHistory/RecommendedLessonsHistory.tsx
|
|
28982
|
-
var
|
|
29068
|
+
var import_react92 = require("react");
|
|
28983
29069
|
var import_phosphor_react56 = require("phosphor-react");
|
|
28984
29070
|
|
|
28985
29071
|
// src/hooks/useRecommendedLessons.ts
|
|
28986
|
-
var
|
|
29072
|
+
var import_react88 = require("react");
|
|
28987
29073
|
var import_zod5 = require("zod");
|
|
28988
29074
|
var import_dayjs4 = __toESM(require("dayjs"));
|
|
28989
29075
|
var recommendedClassSubjectSchema = import_zod5.z.object({
|
|
@@ -29075,7 +29161,7 @@ var handleRecommendedClassFetchError = (error) => {
|
|
|
29075
29161
|
};
|
|
29076
29162
|
var createUseRecommendedLessonsHistory = (fetchRecommendedClassHistory) => {
|
|
29077
29163
|
return () => {
|
|
29078
|
-
const [state, setState] = (0,
|
|
29164
|
+
const [state, setState] = (0, import_react88.useState)({
|
|
29079
29165
|
recommendedClass: [],
|
|
29080
29166
|
loading: false,
|
|
29081
29167
|
error: null,
|
|
@@ -29086,7 +29172,7 @@ var createUseRecommendedLessonsHistory = (fetchRecommendedClassHistory) => {
|
|
|
29086
29172
|
totalPages: 0
|
|
29087
29173
|
}
|
|
29088
29174
|
});
|
|
29089
|
-
const fetchRecommendedClass = (0,
|
|
29175
|
+
const fetchRecommendedClass = (0, import_react88.useCallback)(
|
|
29090
29176
|
async (filters) => {
|
|
29091
29177
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
29092
29178
|
try {
|
|
@@ -29130,7 +29216,7 @@ var createUseRecommendedLessonsHistory = (fetchRecommendedClassHistory) => {
|
|
|
29130
29216
|
var createRecommendedLessonsHistoryHook = createUseRecommendedLessonsHistory;
|
|
29131
29217
|
|
|
29132
29218
|
// src/components/shared/ModelsTabBase/ModelsTabBase.tsx
|
|
29133
|
-
var
|
|
29219
|
+
var import_react89 = require("react");
|
|
29134
29220
|
var import_phosphor_react55 = require("phosphor-react");
|
|
29135
29221
|
|
|
29136
29222
|
// src/components/ActivitiesHistory/components/ErrorDisplay.tsx
|
|
@@ -29156,16 +29242,16 @@ var ModelsTabBase = ({
|
|
|
29156
29242
|
buildFiltersFromParams: buildFiltersFromParams2,
|
|
29157
29243
|
createUseModels
|
|
29158
29244
|
}) => {
|
|
29159
|
-
const [deleteDialogOpen, setDeleteDialogOpen] = (0,
|
|
29160
|
-
const [modelToDelete, setModelToDelete] = (0,
|
|
29245
|
+
const [deleteDialogOpen, setDeleteDialogOpen] = (0, import_react89.useState)(false);
|
|
29246
|
+
const [modelToDelete, setModelToDelete] = (0, import_react89.useState)(null);
|
|
29161
29247
|
const { addToast } = useToast();
|
|
29162
|
-
const fetchModelsRef = (0,
|
|
29248
|
+
const fetchModelsRef = (0, import_react89.useRef)(fetchModelsProp);
|
|
29163
29249
|
fetchModelsRef.current = fetchModelsProp;
|
|
29164
|
-
const deleteModelRef = (0,
|
|
29250
|
+
const deleteModelRef = (0, import_react89.useRef)(deleteModelProp);
|
|
29165
29251
|
deleteModelRef.current = deleteModelProp;
|
|
29166
|
-
const subjectsMapRef = (0,
|
|
29252
|
+
const subjectsMapRef = (0, import_react89.useRef)(subjectsMap);
|
|
29167
29253
|
subjectsMapRef.current = subjectsMap;
|
|
29168
|
-
const useModels = (0,
|
|
29254
|
+
const useModels = (0, import_react89.useMemo)(
|
|
29169
29255
|
() => createUseModels(
|
|
29170
29256
|
(filters) => fetchModelsRef.current(filters),
|
|
29171
29257
|
(id) => deleteModelRef.current(id)
|
|
@@ -29180,15 +29266,15 @@ var ModelsTabBase = ({
|
|
|
29180
29266
|
fetchModels,
|
|
29181
29267
|
deleteModel
|
|
29182
29268
|
} = useModels();
|
|
29183
|
-
const modelsFilterConfigs = (0,
|
|
29269
|
+
const modelsFilterConfigs = (0, import_react89.useMemo)(
|
|
29184
29270
|
() => createFiltersConfig(userFilterData),
|
|
29185
29271
|
[createFiltersConfig, userFilterData]
|
|
29186
29272
|
);
|
|
29187
|
-
const handleDeleteClick = (0,
|
|
29273
|
+
const handleDeleteClick = (0, import_react89.useCallback)((model) => {
|
|
29188
29274
|
setModelToDelete(model);
|
|
29189
29275
|
setDeleteDialogOpen(true);
|
|
29190
29276
|
}, []);
|
|
29191
|
-
const modelsTableColumns = (0,
|
|
29277
|
+
const modelsTableColumns = (0, import_react89.useMemo)(
|
|
29192
29278
|
() => createTableColumns3(
|
|
29193
29279
|
mapSubjectNameToEnum2,
|
|
29194
29280
|
onSend,
|
|
@@ -29203,17 +29289,17 @@ var ModelsTabBase = ({
|
|
|
29203
29289
|
handleDeleteClick
|
|
29204
29290
|
]
|
|
29205
29291
|
);
|
|
29206
|
-
const handleParamsChange = (0,
|
|
29292
|
+
const handleParamsChange = (0, import_react89.useCallback)(
|
|
29207
29293
|
(params) => {
|
|
29208
29294
|
const filters = buildFiltersFromParams2(params);
|
|
29209
29295
|
fetchModels(filters, subjectsMapRef.current);
|
|
29210
29296
|
},
|
|
29211
29297
|
[buildFiltersFromParams2, fetchModels]
|
|
29212
29298
|
);
|
|
29213
|
-
(0,
|
|
29299
|
+
(0, import_react89.useEffect)(() => {
|
|
29214
29300
|
fetchModels({ page: 1, limit: 10 }, subjectsMapRef.current);
|
|
29215
29301
|
}, [fetchModels]);
|
|
29216
|
-
const handleConfirmDelete = (0,
|
|
29302
|
+
const handleConfirmDelete = (0, import_react89.useCallback)(async () => {
|
|
29217
29303
|
if (modelToDelete) {
|
|
29218
29304
|
const success = await deleteModel(modelToDelete.id);
|
|
29219
29305
|
if (success) {
|
|
@@ -29226,7 +29312,7 @@ var ModelsTabBase = ({
|
|
|
29226
29312
|
setDeleteDialogOpen(false);
|
|
29227
29313
|
setModelToDelete(null);
|
|
29228
29314
|
}, [modelToDelete, deleteModel, fetchModels, addToast]);
|
|
29229
|
-
const handleCancelDelete = (0,
|
|
29315
|
+
const handleCancelDelete = (0, import_react89.useCallback)(() => {
|
|
29230
29316
|
setDeleteDialogOpen(false);
|
|
29231
29317
|
setModelToDelete(null);
|
|
29232
29318
|
}, []);
|
|
@@ -29355,7 +29441,7 @@ var buildRecommendedClassModelsFiltersFromParams = (params) => {
|
|
|
29355
29441
|
};
|
|
29356
29442
|
|
|
29357
29443
|
// src/hooks/useRecommendedClassModels.ts
|
|
29358
|
-
var
|
|
29444
|
+
var import_react90 = require("react");
|
|
29359
29445
|
var import_zod7 = require("zod");
|
|
29360
29446
|
var import_dayjs5 = __toESM(require("dayjs"));
|
|
29361
29447
|
|
|
@@ -29412,13 +29498,13 @@ var handleRecommendedClassModelFetchError = createFetchErrorHandler(
|
|
|
29412
29498
|
);
|
|
29413
29499
|
var createUseRecommendedClassModels = (fetchRecommendedClassModels, deleteRecommendedClassModel) => {
|
|
29414
29500
|
return () => {
|
|
29415
|
-
const [state, setState] = (0,
|
|
29501
|
+
const [state, setState] = (0, import_react90.useState)({
|
|
29416
29502
|
models: [],
|
|
29417
29503
|
loading: false,
|
|
29418
29504
|
error: null,
|
|
29419
29505
|
pagination: DEFAULT_RECOMMENDED_CLASS_MODELS_PAGINATION
|
|
29420
29506
|
});
|
|
29421
|
-
const fetchModels = (0,
|
|
29507
|
+
const fetchModels = (0, import_react90.useCallback)(
|
|
29422
29508
|
async (filters, subjectsMap) => {
|
|
29423
29509
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
29424
29510
|
try {
|
|
@@ -29453,7 +29539,7 @@ var createUseRecommendedClassModels = (fetchRecommendedClassModels, deleteRecomm
|
|
|
29453
29539
|
},
|
|
29454
29540
|
[fetchRecommendedClassModels]
|
|
29455
29541
|
);
|
|
29456
|
-
const deleteModel = (0,
|
|
29542
|
+
const deleteModel = (0, import_react90.useCallback)(
|
|
29457
29543
|
async (id) => {
|
|
29458
29544
|
try {
|
|
29459
29545
|
await deleteRecommendedClassModel(id);
|
|
@@ -29552,7 +29638,7 @@ var createRecommendedClassDraftsFiltersConfig = (userData) => [
|
|
|
29552
29638
|
];
|
|
29553
29639
|
|
|
29554
29640
|
// src/hooks/useRecommendedClassDrafts.ts
|
|
29555
|
-
var
|
|
29641
|
+
var import_react91 = require("react");
|
|
29556
29642
|
var DEFAULT_RECOMMENDED_CLASS_DRAFTS_PAGINATION = {
|
|
29557
29643
|
total: 0,
|
|
29558
29644
|
page: 1,
|
|
@@ -29565,13 +29651,13 @@ var handleRecommendedClassDraftFetchError = createFetchErrorHandler(
|
|
|
29565
29651
|
);
|
|
29566
29652
|
var createUseRecommendedClassDrafts = (fetchRecommendedClassDrafts, deleteRecommendedClassDraft) => {
|
|
29567
29653
|
return () => {
|
|
29568
|
-
const [state, setState] = (0,
|
|
29654
|
+
const [state, setState] = (0, import_react91.useState)({
|
|
29569
29655
|
models: [],
|
|
29570
29656
|
loading: false,
|
|
29571
29657
|
error: null,
|
|
29572
29658
|
pagination: DEFAULT_RECOMMENDED_CLASS_DRAFTS_PAGINATION
|
|
29573
29659
|
});
|
|
29574
|
-
const fetchModels = (0,
|
|
29660
|
+
const fetchModels = (0, import_react91.useCallback)(
|
|
29575
29661
|
async (filters, subjectsMap) => {
|
|
29576
29662
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
29577
29663
|
try {
|
|
@@ -29606,7 +29692,7 @@ var createUseRecommendedClassDrafts = (fetchRecommendedClassDrafts, deleteRecomm
|
|
|
29606
29692
|
},
|
|
29607
29693
|
[fetchRecommendedClassDrafts]
|
|
29608
29694
|
);
|
|
29609
|
-
const deleteModel = (0,
|
|
29695
|
+
const deleteModel = (0, import_react91.useCallback)(
|
|
29610
29696
|
async (id) => {
|
|
29611
29697
|
try {
|
|
29612
29698
|
await deleteRecommendedClassDraft(id);
|
|
@@ -30005,15 +30091,15 @@ var RecommendedLessonsHistory = ({
|
|
|
30005
30091
|
defaultTab,
|
|
30006
30092
|
onTabChange
|
|
30007
30093
|
}) => {
|
|
30008
|
-
const [activeTab, setActiveTab] = (0,
|
|
30094
|
+
const [activeTab, setActiveTab] = (0, import_react92.useState)(
|
|
30009
30095
|
defaultTab ?? "history" /* HISTORY */
|
|
30010
30096
|
);
|
|
30011
|
-
(0,
|
|
30097
|
+
(0, import_react92.useEffect)(() => {
|
|
30012
30098
|
if (defaultTab !== void 0) {
|
|
30013
30099
|
setActiveTab(defaultTab);
|
|
30014
30100
|
}
|
|
30015
30101
|
}, [defaultTab]);
|
|
30016
|
-
const handleTabChange = (0,
|
|
30102
|
+
const handleTabChange = (0, import_react92.useCallback)(
|
|
30017
30103
|
(value) => {
|
|
30018
30104
|
const newTab = value;
|
|
30019
30105
|
setActiveTab(newTab);
|
|
@@ -30021,9 +30107,9 @@ var RecommendedLessonsHistory = ({
|
|
|
30021
30107
|
},
|
|
30022
30108
|
[onTabChange]
|
|
30023
30109
|
);
|
|
30024
|
-
const fetchRecommendedClassHistoryRef = (0,
|
|
30110
|
+
const fetchRecommendedClassHistoryRef = (0, import_react92.useRef)(fetchRecommendedClassHistory);
|
|
30025
30111
|
fetchRecommendedClassHistoryRef.current = fetchRecommendedClassHistory;
|
|
30026
|
-
const useRecommendedClassHistory = (0,
|
|
30112
|
+
const useRecommendedClassHistory = (0, import_react92.useMemo)(
|
|
30027
30113
|
() => createUseRecommendedLessonsHistory(
|
|
30028
30114
|
(filters) => fetchRecommendedClassHistoryRef.current(filters)
|
|
30029
30115
|
),
|
|
@@ -30036,11 +30122,11 @@ var RecommendedLessonsHistory = ({
|
|
|
30036
30122
|
pagination,
|
|
30037
30123
|
fetchRecommendedClass
|
|
30038
30124
|
} = useRecommendedClassHistory();
|
|
30039
|
-
const initialFilterConfigs = (0,
|
|
30125
|
+
const initialFilterConfigs = (0, import_react92.useMemo)(
|
|
30040
30126
|
() => createRecommendedClassFiltersConfig(userFilterData),
|
|
30041
30127
|
[userFilterData]
|
|
30042
30128
|
);
|
|
30043
|
-
const tableColumns = (0,
|
|
30129
|
+
const tableColumns = (0, import_react92.useMemo)(
|
|
30044
30130
|
() => createTableColumns2(
|
|
30045
30131
|
mapSubjectNameToEnum2,
|
|
30046
30132
|
onDeleteRecommendedClass,
|
|
@@ -30048,7 +30134,7 @@ var RecommendedLessonsHistory = ({
|
|
|
30048
30134
|
),
|
|
30049
30135
|
[mapSubjectNameToEnum2, onDeleteRecommendedClass, onEditRecommendedClass]
|
|
30050
30136
|
);
|
|
30051
|
-
const handleParamsChange = (0,
|
|
30137
|
+
const handleParamsChange = (0, import_react92.useCallback)(
|
|
30052
30138
|
(params) => {
|
|
30053
30139
|
const filters = buildFiltersFromParams(params);
|
|
30054
30140
|
fetchRecommendedClass(filters);
|
|
@@ -30232,10 +30318,10 @@ var RecommendedLessonsHistory = ({
|
|
|
30232
30318
|
};
|
|
30233
30319
|
|
|
30234
30320
|
// src/components/RecommendedLessonDetails/RecommendedLessonDetails.tsx
|
|
30235
|
-
var
|
|
30321
|
+
var import_react99 = require("react");
|
|
30236
30322
|
|
|
30237
30323
|
// src/components/RecommendedLessonDetails/components/Breadcrumb.tsx
|
|
30238
|
-
var
|
|
30324
|
+
var import_react93 = require("@phosphor-icons/react");
|
|
30239
30325
|
var import_jsx_runtime128 = require("react/jsx-runtime");
|
|
30240
30326
|
var Breadcrumb = ({ items, onItemClick }) => /* @__PURE__ */ (0, import_jsx_runtime128.jsx)("nav", { className: "flex items-center gap-2 text-sm", "aria-label": "Breadcrumb", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
30241
30327
|
Text_default,
|
|
@@ -30243,7 +30329,7 @@ var Breadcrumb = ({ items, onItemClick }) => /* @__PURE__ */ (0, import_jsx_runt
|
|
|
30243
30329
|
as: "span",
|
|
30244
30330
|
className: "flex items-center gap-2",
|
|
30245
30331
|
children: [
|
|
30246
|
-
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
30332
|
+
index > 0 && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(import_react93.CaretRightIcon, { size: 14, className: "text-text-500" }),
|
|
30247
30333
|
item.path ? /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
30248
30334
|
"button",
|
|
30249
30335
|
{
|
|
@@ -30259,7 +30345,7 @@ var Breadcrumb = ({ items, onItemClick }) => /* @__PURE__ */ (0, import_jsx_runt
|
|
|
30259
30345
|
)) });
|
|
30260
30346
|
|
|
30261
30347
|
// src/components/RecommendedLessonDetails/components/LessonHeader.tsx
|
|
30262
|
-
var
|
|
30348
|
+
var import_react94 = require("@phosphor-icons/react");
|
|
30263
30349
|
|
|
30264
30350
|
// src/components/RecommendedLessonDetails/utils/lessonDetailsUtils.ts
|
|
30265
30351
|
var formatDate = (dateString) => {
|
|
@@ -30347,7 +30433,7 @@ var LessonHeader = ({
|
|
|
30347
30433
|
variant: "solid",
|
|
30348
30434
|
action: "primary",
|
|
30349
30435
|
size: "small",
|
|
30350
|
-
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
30436
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_react94.BookBookmarkIcon, { size: 16 }),
|
|
30351
30437
|
onClick: onViewLesson,
|
|
30352
30438
|
children: viewLessonLabel
|
|
30353
30439
|
}
|
|
@@ -30375,7 +30461,7 @@ var LoadingSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div
|
|
|
30375
30461
|
] });
|
|
30376
30462
|
|
|
30377
30463
|
// src/components/RecommendedLessonDetails/components/ResultsSection.tsx
|
|
30378
|
-
var
|
|
30464
|
+
var import_react95 = require("@phosphor-icons/react");
|
|
30379
30465
|
var import_jsx_runtime131 = require("react/jsx-runtime");
|
|
30380
30466
|
var ResultsSection = ({ data, labels }) => {
|
|
30381
30467
|
const { details } = data;
|
|
@@ -30399,7 +30485,7 @@ var ResultsSection = ({ data, labels }) => {
|
|
|
30399
30485
|
{
|
|
30400
30486
|
as: "span",
|
|
30401
30487
|
className: "size-8 rounded-full flex items-center justify-center bg-warning-300 mb-2",
|
|
30402
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
30488
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_react95.TrophyIcon, { size: 18, weight: "fill", className: "text-white" })
|
|
30403
30489
|
}
|
|
30404
30490
|
),
|
|
30405
30491
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
@@ -30427,7 +30513,7 @@ var ResultsSection = ({ data, labels }) => {
|
|
|
30427
30513
|
{
|
|
30428
30514
|
as: "span",
|
|
30429
30515
|
className: "size-8 rounded-full flex items-center justify-center bg-error-300 mb-2",
|
|
30430
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
30516
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(import_react95.WarningIcon, { size: 18, weight: "fill", className: "text-error-700" })
|
|
30431
30517
|
}
|
|
30432
30518
|
),
|
|
30433
30519
|
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
@@ -30454,7 +30540,7 @@ var ResultsSection = ({ data, labels }) => {
|
|
|
30454
30540
|
};
|
|
30455
30541
|
|
|
30456
30542
|
// src/components/RecommendedLessonDetails/components/StudentsTable.tsx
|
|
30457
|
-
var
|
|
30543
|
+
var import_react96 = require("@phosphor-icons/react");
|
|
30458
30544
|
var import_jsx_runtime132 = require("react/jsx-runtime");
|
|
30459
30545
|
var StudentsTable = ({
|
|
30460
30546
|
students,
|
|
@@ -30502,7 +30588,7 @@ var StudentsTable = ({
|
|
|
30502
30588
|
{
|
|
30503
30589
|
as: "span",
|
|
30504
30590
|
className: "size-8 rounded-full bg-background-100 flex items-center justify-center",
|
|
30505
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
30591
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_react96.UserIcon, { size: 16, className: "text-text-500" })
|
|
30506
30592
|
}
|
|
30507
30593
|
),
|
|
30508
30594
|
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Text_default, { size: "sm", className: "text-text-950", children: student.name })
|
|
@@ -30546,7 +30632,7 @@ var StudentsTable = ({
|
|
|
30546
30632
|
};
|
|
30547
30633
|
|
|
30548
30634
|
// src/components/RecommendedLessonDetails/components/StudentPerformanceModal.tsx
|
|
30549
|
-
var
|
|
30635
|
+
var import_react97 = require("react");
|
|
30550
30636
|
var import_phosphor_react57 = require("phosphor-react");
|
|
30551
30637
|
|
|
30552
30638
|
// src/components/RecommendedLessonDetails/types.ts
|
|
@@ -30844,7 +30930,7 @@ var StudentPerformanceModal = ({
|
|
|
30844
30930
|
error = null,
|
|
30845
30931
|
labels: customLabels
|
|
30846
30932
|
}) => {
|
|
30847
|
-
const labels = (0,
|
|
30933
|
+
const labels = (0, import_react97.useMemo)(
|
|
30848
30934
|
() => ({ ...DEFAULT_PERFORMANCE_LABELS, ...customLabels }),
|
|
30849
30935
|
[customLabels]
|
|
30850
30936
|
);
|
|
@@ -30865,7 +30951,7 @@ var StudentPerformanceModal = ({
|
|
|
30865
30951
|
};
|
|
30866
30952
|
|
|
30867
30953
|
// src/components/RecommendedLessonDetails/components/StudentActivityPerformanceModal.tsx
|
|
30868
|
-
var
|
|
30954
|
+
var import_react98 = require("react");
|
|
30869
30955
|
var import_phosphor_react58 = require("phosphor-react");
|
|
30870
30956
|
var import_jsx_runtime134 = require("react/jsx-runtime");
|
|
30871
30957
|
var AlternativeStatus = {
|
|
@@ -31013,13 +31099,13 @@ var StudentActivityPerformanceModal = ({
|
|
|
31013
31099
|
apiClient,
|
|
31014
31100
|
labels: customLabels
|
|
31015
31101
|
}) => {
|
|
31016
|
-
const labels = (0,
|
|
31102
|
+
const labels = (0, import_react98.useMemo)(
|
|
31017
31103
|
() => ({ ...DEFAULT_ACTIVITY_PERFORMANCE_LABELS, ...customLabels }),
|
|
31018
31104
|
[customLabels]
|
|
31019
31105
|
);
|
|
31020
31106
|
const addToast = ToastStore_default((state) => state.addToast);
|
|
31021
|
-
const [essayCorrections, setEssayCorrections] = (0,
|
|
31022
|
-
(0,
|
|
31107
|
+
const [essayCorrections, setEssayCorrections] = (0, import_react98.useState)({});
|
|
31108
|
+
(0, import_react98.useEffect)(() => {
|
|
31023
31109
|
if (isOpen && data) {
|
|
31024
31110
|
const initialCorrections = {};
|
|
31025
31111
|
data.activities.forEach((activity) => {
|
|
@@ -31036,7 +31122,7 @@ var StudentActivityPerformanceModal = ({
|
|
|
31036
31122
|
setEssayCorrections(initialCorrections);
|
|
31037
31123
|
}
|
|
31038
31124
|
}, [isOpen, data]);
|
|
31039
|
-
const updateEssayCorrection = (0,
|
|
31125
|
+
const updateEssayCorrection = (0, import_react98.useCallback)(
|
|
31040
31126
|
(questionId, field, value) => {
|
|
31041
31127
|
setEssayCorrections((prev) => ({
|
|
31042
31128
|
...prev,
|
|
@@ -31050,7 +31136,7 @@ var StudentActivityPerformanceModal = ({
|
|
|
31050
31136
|
},
|
|
31051
31137
|
[]
|
|
31052
31138
|
);
|
|
31053
|
-
const handleSaveEssayCorrection = (0,
|
|
31139
|
+
const handleSaveEssayCorrection = (0, import_react98.useCallback)(
|
|
31054
31140
|
async (question) => {
|
|
31055
31141
|
if (!apiClient || !data) return;
|
|
31056
31142
|
const questionKey = getQuestionKey(question);
|
|
@@ -31103,7 +31189,7 @@ var StudentActivityPerformanceModal = ({
|
|
|
31103
31189
|
},
|
|
31104
31190
|
[apiClient, data, essayCorrections, addToast]
|
|
31105
31191
|
);
|
|
31106
|
-
const handleClose = (0,
|
|
31192
|
+
const handleClose = (0, import_react98.useCallback)(() => {
|
|
31107
31193
|
setEssayCorrections({});
|
|
31108
31194
|
onClose();
|
|
31109
31195
|
}, [onClose]);
|
|
@@ -31459,16 +31545,16 @@ var RecommendedLessonDetails = ({
|
|
|
31459
31545
|
labels: customLabels,
|
|
31460
31546
|
className
|
|
31461
31547
|
}) => {
|
|
31462
|
-
const labels = (0,
|
|
31548
|
+
const labels = (0, import_react99.useMemo)(
|
|
31463
31549
|
() => ({ ...DEFAULT_LABELS, ...customLabels }),
|
|
31464
31550
|
[customLabels]
|
|
31465
31551
|
);
|
|
31466
31552
|
const addToast = ToastStore_default((state) => state.addToast);
|
|
31467
|
-
const [performanceModalOpen, setPerformanceModalOpen] = (0,
|
|
31468
|
-
const [performanceData, setPerformanceData] = (0,
|
|
31469
|
-
const [performanceLoading, setPerformanceLoading] = (0,
|
|
31470
|
-
const [performanceError, setPerformanceError] = (0,
|
|
31471
|
-
const handleCorrectActivity = (0,
|
|
31553
|
+
const [performanceModalOpen, setPerformanceModalOpen] = (0, import_react99.useState)(false);
|
|
31554
|
+
const [performanceData, setPerformanceData] = (0, import_react99.useState)(null);
|
|
31555
|
+
const [performanceLoading, setPerformanceLoading] = (0, import_react99.useState)(false);
|
|
31556
|
+
const [performanceError, setPerformanceError] = (0, import_react99.useState)(null);
|
|
31557
|
+
const handleCorrectActivity = (0, import_react99.useCallback)(
|
|
31472
31558
|
async (studentId) => {
|
|
31473
31559
|
if (!apiClient || !data?.recommendedClass.id) return;
|
|
31474
31560
|
const student = data?.details.students.find(
|
|
@@ -31512,12 +31598,12 @@ var RecommendedLessonDetails = ({
|
|
|
31512
31598
|
},
|
|
31513
31599
|
[apiClient, data?.recommendedClass.id, data?.details.students, addToast]
|
|
31514
31600
|
);
|
|
31515
|
-
const handleClosePerformanceModal = (0,
|
|
31601
|
+
const handleClosePerformanceModal = (0, import_react99.useCallback)(() => {
|
|
31516
31602
|
setPerformanceModalOpen(false);
|
|
31517
31603
|
setPerformanceData(null);
|
|
31518
31604
|
setPerformanceError(null);
|
|
31519
31605
|
}, []);
|
|
31520
|
-
const defaultBreadcrumbs = (0,
|
|
31606
|
+
const defaultBreadcrumbs = (0, import_react99.useMemo)(
|
|
31521
31607
|
() => [
|
|
31522
31608
|
{ label: "Aulas recomendadas", path: "/aulas-recomendadas" },
|
|
31523
31609
|
{ label: data?.recommendedClass.title || "Detalhes" }
|
|
@@ -31525,7 +31611,7 @@ var RecommendedLessonDetails = ({
|
|
|
31525
31611
|
[data?.recommendedClass.title]
|
|
31526
31612
|
);
|
|
31527
31613
|
const breadcrumbItems = breadcrumbs || defaultBreadcrumbs;
|
|
31528
|
-
const displayStudents = (0,
|
|
31614
|
+
const displayStudents = (0, import_react99.useMemo)(() => {
|
|
31529
31615
|
if (!data?.details.students) return [];
|
|
31530
31616
|
const deadline = data?.recommendedClass.finalDate;
|
|
31531
31617
|
return data.details.students.map(
|
|
@@ -31603,7 +31689,7 @@ var RecommendedLessonDetails = ({
|
|
|
31603
31689
|
var RecommendedLessonDetails_default = RecommendedLessonDetails;
|
|
31604
31690
|
|
|
31605
31691
|
// src/hooks/useRecommendedLessonsPage.ts
|
|
31606
|
-
var
|
|
31692
|
+
var import_react100 = require("react");
|
|
31607
31693
|
var buildQueryParams2 = (filters) => {
|
|
31608
31694
|
if (!filters) return {};
|
|
31609
31695
|
const params = {};
|
|
@@ -31660,12 +31746,12 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
31660
31746
|
mapSubjectNameToEnum: mapSubjectNameToEnum2
|
|
31661
31747
|
} = config;
|
|
31662
31748
|
return () => {
|
|
31663
|
-
const recommendedClassMapRef = (0,
|
|
31664
|
-
const [sendModalOpen, setSendModalOpen] = (0,
|
|
31665
|
-
const [selectedModel, setSelectedModel] = (0,
|
|
31666
|
-
const [sendModalLoading, setSendModalLoading] = (0,
|
|
31667
|
-
const [sendModalCategories, setSendModalCategories] = (0,
|
|
31668
|
-
const userFilterData = (0,
|
|
31749
|
+
const recommendedClassMapRef = (0, import_react100.useRef)(/* @__PURE__ */ new Map());
|
|
31750
|
+
const [sendModalOpen, setSendModalOpen] = (0, import_react100.useState)(false);
|
|
31751
|
+
const [selectedModel, setSelectedModel] = (0, import_react100.useState)(null);
|
|
31752
|
+
const [sendModalLoading, setSendModalLoading] = (0, import_react100.useState)(false);
|
|
31753
|
+
const [sendModalCategories, setSendModalCategories] = (0, import_react100.useState)([]);
|
|
31754
|
+
const userFilterData = (0, import_react100.useMemo)(
|
|
31669
31755
|
() => ({
|
|
31670
31756
|
schools: getSchoolOptions2(userData),
|
|
31671
31757
|
classes: getClassOptions2(userData),
|
|
@@ -31673,13 +31759,13 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
31673
31759
|
}),
|
|
31674
31760
|
[userData]
|
|
31675
31761
|
);
|
|
31676
|
-
const subjectsMap = (0,
|
|
31762
|
+
const subjectsMap = (0, import_react100.useMemo)(() => {
|
|
31677
31763
|
const map = /* @__PURE__ */ new Map();
|
|
31678
31764
|
const subjects = getSubjectOptions4(userData);
|
|
31679
31765
|
subjects.forEach((s) => map.set(s.id, s.name));
|
|
31680
31766
|
return map;
|
|
31681
31767
|
}, [userData]);
|
|
31682
|
-
const fetchRecommendedClassHistory = (0,
|
|
31768
|
+
const fetchRecommendedClassHistory = (0, import_react100.useCallback)(
|
|
31683
31769
|
async (filters) => {
|
|
31684
31770
|
const params = buildQueryParams2(filters);
|
|
31685
31771
|
const response = await api.get(
|
|
@@ -31697,7 +31783,7 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
31697
31783
|
},
|
|
31698
31784
|
[api, endpoints.recommendedClassHistory]
|
|
31699
31785
|
);
|
|
31700
|
-
const fetchRecommendedClassModels = (0,
|
|
31786
|
+
const fetchRecommendedClassModels = (0, import_react100.useCallback)(
|
|
31701
31787
|
async (filters) => {
|
|
31702
31788
|
const params = buildQueryParams2({
|
|
31703
31789
|
...filters,
|
|
@@ -31711,13 +31797,13 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
31711
31797
|
},
|
|
31712
31798
|
[api, endpoints.recommendedClassDrafts]
|
|
31713
31799
|
);
|
|
31714
|
-
const deleteRecommendedClassModel = (0,
|
|
31800
|
+
const deleteRecommendedClassModel = (0, import_react100.useCallback)(
|
|
31715
31801
|
async (id) => {
|
|
31716
31802
|
await api.delete(`${endpoints.recommendedClassDrafts}/${id}`);
|
|
31717
31803
|
},
|
|
31718
31804
|
[api, endpoints.recommendedClassDrafts]
|
|
31719
31805
|
);
|
|
31720
|
-
const fetchRecommendedClassDrafts = (0,
|
|
31806
|
+
const fetchRecommendedClassDrafts = (0, import_react100.useCallback)(
|
|
31721
31807
|
async (filters) => {
|
|
31722
31808
|
const params = buildQueryParams2({
|
|
31723
31809
|
...filters,
|
|
@@ -31731,34 +31817,34 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
31731
31817
|
},
|
|
31732
31818
|
[api, endpoints.recommendedClassDrafts]
|
|
31733
31819
|
);
|
|
31734
|
-
const deleteRecommendedClassDraft = (0,
|
|
31820
|
+
const deleteRecommendedClassDraft = (0, import_react100.useCallback)(
|
|
31735
31821
|
async (id) => {
|
|
31736
31822
|
await api.delete(`${endpoints.recommendedClassDrafts}/${id}`);
|
|
31737
31823
|
},
|
|
31738
31824
|
[api, endpoints.recommendedClassDrafts]
|
|
31739
31825
|
);
|
|
31740
|
-
const handleCreateLesson = (0,
|
|
31826
|
+
const handleCreateLesson = (0, import_react100.useCallback)(() => {
|
|
31741
31827
|
navigate(paths.createLesson);
|
|
31742
31828
|
}, []);
|
|
31743
|
-
const handleCreateModel = (0,
|
|
31829
|
+
const handleCreateModel = (0, import_react100.useCallback)(() => {
|
|
31744
31830
|
navigate(paths.createModel);
|
|
31745
31831
|
}, []);
|
|
31746
|
-
const handleRowClick = (0,
|
|
31832
|
+
const handleRowClick = (0, import_react100.useCallback)((row) => {
|
|
31747
31833
|
const originalData = recommendedClassMapRef.current.get(row.id);
|
|
31748
31834
|
navigate(`${paths.lessonDetails}/${row.id}`, {
|
|
31749
31835
|
state: { recommendedClassData: originalData }
|
|
31750
31836
|
});
|
|
31751
31837
|
}, []);
|
|
31752
|
-
const handleEditRecommendedClass = (0,
|
|
31838
|
+
const handleEditRecommendedClass = (0, import_react100.useCallback)((id) => {
|
|
31753
31839
|
navigate(`${paths.editLesson}/${id}/editar`);
|
|
31754
31840
|
}, []);
|
|
31755
|
-
const handleEditModel = (0,
|
|
31841
|
+
const handleEditModel = (0, import_react100.useCallback)(
|
|
31756
31842
|
(model) => {
|
|
31757
31843
|
navigate(`${paths.editModel}${model.id}`);
|
|
31758
31844
|
},
|
|
31759
31845
|
[]
|
|
31760
31846
|
);
|
|
31761
|
-
const handleSendLesson = (0,
|
|
31847
|
+
const handleSendLesson = (0, import_react100.useCallback)(
|
|
31762
31848
|
(model) => {
|
|
31763
31849
|
setSelectedModel(model);
|
|
31764
31850
|
const classes = getClassOptions2(userData);
|
|
@@ -31781,7 +31867,7 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
31781
31867
|
},
|
|
31782
31868
|
[userData]
|
|
31783
31869
|
);
|
|
31784
|
-
const handleSendLessonSubmit = (0,
|
|
31870
|
+
const handleSendLessonSubmit = (0, import_react100.useCallback)(
|
|
31785
31871
|
async (formData) => {
|
|
31786
31872
|
if (!selectedModel) return;
|
|
31787
31873
|
setSendModalLoading(true);
|
|
@@ -31800,11 +31886,11 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
31800
31886
|
},
|
|
31801
31887
|
[api, endpoints.submitRecommendedClass, selectedModel]
|
|
31802
31888
|
);
|
|
31803
|
-
const handleSendModalClose = (0,
|
|
31889
|
+
const handleSendModalClose = (0, import_react100.useCallback)(() => {
|
|
31804
31890
|
setSendModalOpen(false);
|
|
31805
31891
|
setSelectedModel(null);
|
|
31806
31892
|
}, []);
|
|
31807
|
-
const handleCategoriesChange = (0,
|
|
31893
|
+
const handleCategoriesChange = (0, import_react100.useCallback)(
|
|
31808
31894
|
(categories) => {
|
|
31809
31895
|
setSendModalCategories(categories);
|
|
31810
31896
|
},
|
|
@@ -31850,7 +31936,7 @@ var createUseRecommendedLessonsPage = (config) => {
|
|
|
31850
31936
|
var createRecommendedLessonsPageHook = createUseRecommendedLessonsPage;
|
|
31851
31937
|
|
|
31852
31938
|
// src/hooks/useRecommendedLessonDetails.ts
|
|
31853
|
-
var
|
|
31939
|
+
var import_react101 = require("react");
|
|
31854
31940
|
var import_zod8 = require("zod");
|
|
31855
31941
|
var recommendedClassLessonSubjectSchema = import_zod8.z.object({
|
|
31856
31942
|
id: import_zod8.z.string(),
|
|
@@ -31953,12 +32039,12 @@ var handleLessonDetailsFetchError = (error) => {
|
|
|
31953
32039
|
};
|
|
31954
32040
|
var createUseRecommendedLessonDetails = (apiClient) => {
|
|
31955
32041
|
return (lessonId) => {
|
|
31956
|
-
const [state, setState] = (0,
|
|
32042
|
+
const [state, setState] = (0, import_react101.useState)({
|
|
31957
32043
|
data: null,
|
|
31958
32044
|
loading: true,
|
|
31959
32045
|
error: null
|
|
31960
32046
|
});
|
|
31961
|
-
const fetchLessonDetails = (0,
|
|
32047
|
+
const fetchLessonDetails = (0, import_react101.useCallback)(async () => {
|
|
31962
32048
|
if (!lessonId) {
|
|
31963
32049
|
setState({
|
|
31964
32050
|
data: null,
|
|
@@ -32004,7 +32090,7 @@ var createUseRecommendedLessonDetails = (apiClient) => {
|
|
|
32004
32090
|
});
|
|
32005
32091
|
}
|
|
32006
32092
|
}, [lessonId]);
|
|
32007
|
-
(0,
|
|
32093
|
+
(0, import_react101.useEffect)(() => {
|
|
32008
32094
|
fetchLessonDetails();
|
|
32009
32095
|
}, [fetchLessonDetails]);
|
|
32010
32096
|
return {
|
|
@@ -32016,10 +32102,10 @@ var createUseRecommendedLessonDetails = (apiClient) => {
|
|
|
32016
32102
|
var createRecommendedLessonDetailsHook = createUseRecommendedLessonDetails;
|
|
32017
32103
|
|
|
32018
32104
|
// src/components/ActivitiesHistory/ActivitiesHistory.tsx
|
|
32019
|
-
var
|
|
32105
|
+
var import_react105 = require("react");
|
|
32020
32106
|
|
|
32021
32107
|
// src/components/ActivitiesHistory/tabs/HistoryTab.tsx
|
|
32022
|
-
var
|
|
32108
|
+
var import_react103 = require("react");
|
|
32023
32109
|
var import_phosphor_react60 = require("phosphor-react");
|
|
32024
32110
|
|
|
32025
32111
|
// src/components/ActivitiesHistory/config/historyTableColumns.tsx
|
|
@@ -32216,7 +32302,7 @@ var createHistoryFiltersConfig = (userData) => [
|
|
|
32216
32302
|
];
|
|
32217
32303
|
|
|
32218
32304
|
// src/hooks/useActivitiesHistory.ts
|
|
32219
|
-
var
|
|
32305
|
+
var import_react102 = require("react");
|
|
32220
32306
|
var import_zod9 = require("zod");
|
|
32221
32307
|
var import_dayjs6 = __toESM(require("dayjs"));
|
|
32222
32308
|
var activityHistoryResponseSchema = import_zod9.z.object({
|
|
@@ -32275,13 +32361,13 @@ var handleActivityFetchError = createFetchErrorHandler(
|
|
|
32275
32361
|
);
|
|
32276
32362
|
var createUseActivitiesHistory = (fetchActivitiesHistory) => {
|
|
32277
32363
|
return () => {
|
|
32278
|
-
const [state, setState] = (0,
|
|
32364
|
+
const [state, setState] = (0, import_react102.useState)({
|
|
32279
32365
|
activities: [],
|
|
32280
32366
|
loading: false,
|
|
32281
32367
|
error: null,
|
|
32282
32368
|
pagination: DEFAULT_ACTIVITIES_PAGINATION
|
|
32283
32369
|
});
|
|
32284
|
-
const fetchActivities = (0,
|
|
32370
|
+
const fetchActivities = (0, import_react102.useCallback)(
|
|
32285
32371
|
async (filters) => {
|
|
32286
32372
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
32287
32373
|
try {
|
|
@@ -32326,9 +32412,9 @@ var HistoryTab = ({
|
|
|
32326
32412
|
mapSubjectNameToEnum: mapSubjectNameToEnum2,
|
|
32327
32413
|
userFilterData
|
|
32328
32414
|
}) => {
|
|
32329
|
-
const fetchActivitiesHistoryRef = (0,
|
|
32415
|
+
const fetchActivitiesHistoryRef = (0, import_react103.useRef)(fetchActivitiesHistory);
|
|
32330
32416
|
fetchActivitiesHistoryRef.current = fetchActivitiesHistory;
|
|
32331
|
-
const useActivitiesHistory = (0,
|
|
32417
|
+
const useActivitiesHistory = (0, import_react103.useMemo)(
|
|
32332
32418
|
() => createUseActivitiesHistory(
|
|
32333
32419
|
(filters) => fetchActivitiesHistoryRef.current(filters)
|
|
32334
32420
|
),
|
|
@@ -32341,15 +32427,15 @@ var HistoryTab = ({
|
|
|
32341
32427
|
pagination,
|
|
32342
32428
|
fetchActivities
|
|
32343
32429
|
} = useActivitiesHistory();
|
|
32344
|
-
const historyFilterConfigs = (0,
|
|
32430
|
+
const historyFilterConfigs = (0, import_react103.useMemo)(
|
|
32345
32431
|
() => createHistoryFiltersConfig(userFilterData),
|
|
32346
32432
|
[userFilterData]
|
|
32347
32433
|
);
|
|
32348
|
-
const historyTableColumns = (0,
|
|
32434
|
+
const historyTableColumns = (0, import_react103.useMemo)(
|
|
32349
32435
|
() => createHistoryTableColumns(mapSubjectNameToEnum2),
|
|
32350
32436
|
[mapSubjectNameToEnum2]
|
|
32351
32437
|
);
|
|
32352
|
-
const handleParamsChange = (0,
|
|
32438
|
+
const handleParamsChange = (0, import_react103.useCallback)(
|
|
32353
32439
|
(params) => {
|
|
32354
32440
|
const filters = buildHistoryFiltersFromParams(params);
|
|
32355
32441
|
fetchActivities(filters);
|
|
@@ -32448,7 +32534,7 @@ var createModelsFiltersConfig = (userData) => [
|
|
|
32448
32534
|
];
|
|
32449
32535
|
|
|
32450
32536
|
// src/hooks/useActivityModels.ts
|
|
32451
|
-
var
|
|
32537
|
+
var import_react104 = require("react");
|
|
32452
32538
|
var import_zod10 = require("zod");
|
|
32453
32539
|
var import_dayjs7 = __toESM(require("dayjs"));
|
|
32454
32540
|
var activityDraftFiltersSchema = import_zod10.z.object({
|
|
@@ -32511,13 +32597,13 @@ var handleModelFetchError = createFetchErrorHandler(
|
|
|
32511
32597
|
);
|
|
32512
32598
|
var createUseActivityModels = (fetchActivityModels, deleteActivityModel) => {
|
|
32513
32599
|
return () => {
|
|
32514
|
-
const [state, setState] = (0,
|
|
32600
|
+
const [state, setState] = (0, import_react104.useState)({
|
|
32515
32601
|
models: [],
|
|
32516
32602
|
loading: false,
|
|
32517
32603
|
error: null,
|
|
32518
32604
|
pagination: DEFAULT_MODELS_PAGINATION
|
|
32519
32605
|
});
|
|
32520
|
-
const fetchModels = (0,
|
|
32606
|
+
const fetchModels = (0, import_react104.useCallback)(
|
|
32521
32607
|
async (filters, subjectsMap) => {
|
|
32522
32608
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
32523
32609
|
try {
|
|
@@ -32552,7 +32638,7 @@ var createUseActivityModels = (fetchActivityModels, deleteActivityModel) => {
|
|
|
32552
32638
|
},
|
|
32553
32639
|
[fetchActivityModels]
|
|
32554
32640
|
);
|
|
32555
|
-
const deleteModel = (0,
|
|
32641
|
+
const deleteModel = (0, import_react104.useCallback)(
|
|
32556
32642
|
async (id) => {
|
|
32557
32643
|
try {
|
|
32558
32644
|
await deleteActivityModel(id);
|
|
@@ -32655,7 +32741,7 @@ var ActivitiesHistory = ({
|
|
|
32655
32741
|
userFilterData,
|
|
32656
32742
|
subjectsMap
|
|
32657
32743
|
}) => {
|
|
32658
|
-
const [activeTab, setActiveTab] = (0,
|
|
32744
|
+
const [activeTab, setActiveTab] = (0, import_react105.useState)("history" /* HISTORY */);
|
|
32659
32745
|
return /* @__PURE__ */ (0, import_jsx_runtime141.jsxs)(
|
|
32660
32746
|
"div",
|
|
32661
32747
|
{
|
|
@@ -32761,7 +32847,7 @@ var ActivitiesHistory = ({
|
|
|
32761
32847
|
};
|
|
32762
32848
|
|
|
32763
32849
|
// src/hooks/useStudentsHighlight.ts
|
|
32764
|
-
var
|
|
32850
|
+
var import_react106 = require("react");
|
|
32765
32851
|
var import_zod11 = require("zod");
|
|
32766
32852
|
var PERIOD_TABS = [
|
|
32767
32853
|
{ value: "7_DAYS", label: "7 dias" },
|
|
@@ -32823,8 +32909,8 @@ var initialState4 = {
|
|
|
32823
32909
|
};
|
|
32824
32910
|
var createUseStudentsHighlight = (fetchStudentsHighlightApi) => {
|
|
32825
32911
|
return () => {
|
|
32826
|
-
const [state, setState] = (0,
|
|
32827
|
-
const fetchStudentsHighlight = (0,
|
|
32912
|
+
const [state, setState] = (0, import_react106.useState)(initialState4);
|
|
32913
|
+
const fetchStudentsHighlight = (0, import_react106.useCallback)(
|
|
32828
32914
|
async (filters) => {
|
|
32829
32915
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
32830
32916
|
try {
|
|
@@ -32853,7 +32939,7 @@ var createUseStudentsHighlight = (fetchStudentsHighlightApi) => {
|
|
|
32853
32939
|
},
|
|
32854
32940
|
[fetchStudentsHighlightApi]
|
|
32855
32941
|
);
|
|
32856
|
-
const reset = (0,
|
|
32942
|
+
const reset = (0, import_react106.useCallback)(() => {
|
|
32857
32943
|
setState(initialState4);
|
|
32858
32944
|
}, []);
|
|
32859
32945
|
return {
|
|
@@ -32866,7 +32952,7 @@ var createUseStudentsHighlight = (fetchStudentsHighlightApi) => {
|
|
|
32866
32952
|
var createStudentsHighlightHook = createUseStudentsHighlight;
|
|
32867
32953
|
|
|
32868
32954
|
// src/hooks/useQuestionsData.ts
|
|
32869
|
-
var
|
|
32955
|
+
var import_react107 = require("react");
|
|
32870
32956
|
var import_zod12 = require("zod");
|
|
32871
32957
|
var trendDirectionSchema2 = import_zod12.z.enum(["up", "down", "stable"]);
|
|
32872
32958
|
var trendSchema = import_zod12.z.object({
|
|
@@ -32912,8 +32998,8 @@ var initialState5 = {
|
|
|
32912
32998
|
};
|
|
32913
32999
|
var createUseQuestionsData = (fetchQuestionsDataApi) => {
|
|
32914
33000
|
return () => {
|
|
32915
|
-
const [state, setState] = (0,
|
|
32916
|
-
const fetchQuestionsData = (0,
|
|
33001
|
+
const [state, setState] = (0, import_react107.useState)(initialState5);
|
|
33002
|
+
const fetchQuestionsData = (0, import_react107.useCallback)(
|
|
32917
33003
|
async (filters) => {
|
|
32918
33004
|
setState((prev) => ({ ...prev, loading: true, error: null }));
|
|
32919
33005
|
try {
|
|
@@ -32936,7 +33022,7 @@ var createUseQuestionsData = (fetchQuestionsDataApi) => {
|
|
|
32936
33022
|
},
|
|
32937
33023
|
[fetchQuestionsDataApi]
|
|
32938
33024
|
);
|
|
32939
|
-
const reset = (0,
|
|
33025
|
+
const reset = (0, import_react107.useCallback)(() => {
|
|
32940
33026
|
setState(initialState5);
|
|
32941
33027
|
}, []);
|
|
32942
33028
|
return {
|
|
@@ -33082,7 +33168,7 @@ var buildUserFilterData = (userData) => ({
|
|
|
33082
33168
|
});
|
|
33083
33169
|
|
|
33084
33170
|
// src/hooks/useChat.ts
|
|
33085
|
-
var
|
|
33171
|
+
var import_react108 = require("react");
|
|
33086
33172
|
var WS_STATES = {
|
|
33087
33173
|
CONNECTING: 0,
|
|
33088
33174
|
OPEN: 1,
|
|
@@ -33101,25 +33187,25 @@ function useChat({
|
|
|
33101
33187
|
reconnectInterval = 3e3,
|
|
33102
33188
|
maxReconnectAttempts = 5
|
|
33103
33189
|
}) {
|
|
33104
|
-
const [isConnected, setIsConnected] = (0,
|
|
33105
|
-
const [messages, setMessages] = (0,
|
|
33106
|
-
const [participants, setParticipants] = (0,
|
|
33107
|
-
const [error, setError] = (0,
|
|
33108
|
-
const wsRef = (0,
|
|
33109
|
-
const reconnectAttemptsRef = (0,
|
|
33110
|
-
const reconnectTimeoutRef = (0,
|
|
33190
|
+
const [isConnected, setIsConnected] = (0, import_react108.useState)(false);
|
|
33191
|
+
const [messages, setMessages] = (0, import_react108.useState)([]);
|
|
33192
|
+
const [participants, setParticipants] = (0, import_react108.useState)([]);
|
|
33193
|
+
const [error, setError] = (0, import_react108.useState)(null);
|
|
33194
|
+
const wsRef = (0, import_react108.useRef)(null);
|
|
33195
|
+
const reconnectAttemptsRef = (0, import_react108.useRef)(0);
|
|
33196
|
+
const reconnectTimeoutRef = (0, import_react108.useRef)(
|
|
33111
33197
|
null
|
|
33112
33198
|
);
|
|
33113
|
-
const isManualDisconnectRef = (0,
|
|
33114
|
-
const isConnectingRef = (0,
|
|
33115
|
-
const connectRef = (0,
|
|
33199
|
+
const isManualDisconnectRef = (0, import_react108.useRef)(false);
|
|
33200
|
+
const isConnectingRef = (0, import_react108.useRef)(false);
|
|
33201
|
+
const connectRef = (0, import_react108.useRef)(() => {
|
|
33116
33202
|
});
|
|
33117
|
-
const sendWsMessage = (0,
|
|
33203
|
+
const sendWsMessage = (0, import_react108.useCallback)((message) => {
|
|
33118
33204
|
if (wsRef.current?.readyState === WS_STATES.OPEN) {
|
|
33119
33205
|
wsRef.current.send(JSON.stringify(message));
|
|
33120
33206
|
}
|
|
33121
33207
|
}, []);
|
|
33122
|
-
const sendMessage = (0,
|
|
33208
|
+
const sendMessage = (0, import_react108.useCallback)(
|
|
33123
33209
|
(content) => {
|
|
33124
33210
|
const trimmedContent = content.trim();
|
|
33125
33211
|
if (!trimmedContent) return;
|
|
@@ -33130,12 +33216,12 @@ function useChat({
|
|
|
33130
33216
|
},
|
|
33131
33217
|
[sendWsMessage]
|
|
33132
33218
|
);
|
|
33133
|
-
const leave = (0,
|
|
33219
|
+
const leave = (0, import_react108.useCallback)(() => {
|
|
33134
33220
|
isManualDisconnectRef.current = true;
|
|
33135
33221
|
sendWsMessage({ type: "leave" });
|
|
33136
33222
|
wsRef.current?.close(1e3, "User left");
|
|
33137
33223
|
}, [sendWsMessage]);
|
|
33138
|
-
const handleMessage = (0,
|
|
33224
|
+
const handleMessage = (0, import_react108.useCallback)(
|
|
33139
33225
|
(event) => {
|
|
33140
33226
|
try {
|
|
33141
33227
|
const data = JSON.parse(event.data);
|
|
@@ -33203,7 +33289,7 @@ function useChat({
|
|
|
33203
33289
|
},
|
|
33204
33290
|
[onError]
|
|
33205
33291
|
);
|
|
33206
|
-
const connect = (0,
|
|
33292
|
+
const connect = (0, import_react108.useCallback)(() => {
|
|
33207
33293
|
if (isConnectingRef.current) {
|
|
33208
33294
|
return;
|
|
33209
33295
|
}
|
|
@@ -33257,12 +33343,12 @@ function useChat({
|
|
|
33257
33343
|
maxReconnectAttempts
|
|
33258
33344
|
]);
|
|
33259
33345
|
connectRef.current = connect;
|
|
33260
|
-
const reconnect = (0,
|
|
33346
|
+
const reconnect = (0, import_react108.useCallback)(() => {
|
|
33261
33347
|
isManualDisconnectRef.current = false;
|
|
33262
33348
|
reconnectAttemptsRef.current = 0;
|
|
33263
33349
|
connectRef.current();
|
|
33264
33350
|
}, []);
|
|
33265
|
-
(0,
|
|
33351
|
+
(0, import_react108.useEffect)(() => {
|
|
33266
33352
|
if (!roomId) {
|
|
33267
33353
|
return;
|
|
33268
33354
|
}
|
|
@@ -33306,15 +33392,15 @@ function createUseChat(baseWsUrl) {
|
|
|
33306
33392
|
}
|
|
33307
33393
|
|
|
33308
33394
|
// src/hooks/useChatRooms.ts
|
|
33309
|
-
var
|
|
33395
|
+
var import_react109 = require("react");
|
|
33310
33396
|
function useChatRooms({
|
|
33311
33397
|
apiClient
|
|
33312
33398
|
}) {
|
|
33313
|
-
const [rooms, setRooms] = (0,
|
|
33314
|
-
const [availableUsers, setAvailableUsers] = (0,
|
|
33315
|
-
const [loading, setLoading] = (0,
|
|
33316
|
-
const [error, setError] = (0,
|
|
33317
|
-
const fetchRooms = (0,
|
|
33399
|
+
const [rooms, setRooms] = (0, import_react109.useState)([]);
|
|
33400
|
+
const [availableUsers, setAvailableUsers] = (0, import_react109.useState)([]);
|
|
33401
|
+
const [loading, setLoading] = (0, import_react109.useState)(false);
|
|
33402
|
+
const [error, setError] = (0, import_react109.useState)(null);
|
|
33403
|
+
const fetchRooms = (0, import_react109.useCallback)(async () => {
|
|
33318
33404
|
setLoading(true);
|
|
33319
33405
|
setError(null);
|
|
33320
33406
|
try {
|
|
@@ -33330,7 +33416,7 @@ function useChatRooms({
|
|
|
33330
33416
|
setLoading(false);
|
|
33331
33417
|
}
|
|
33332
33418
|
}, [apiClient]);
|
|
33333
|
-
const fetchAvailableUsers = (0,
|
|
33419
|
+
const fetchAvailableUsers = (0, import_react109.useCallback)(async () => {
|
|
33334
33420
|
setLoading(true);
|
|
33335
33421
|
setError(null);
|
|
33336
33422
|
try {
|
|
@@ -33346,7 +33432,7 @@ function useChatRooms({
|
|
|
33346
33432
|
setLoading(false);
|
|
33347
33433
|
}
|
|
33348
33434
|
}, [apiClient]);
|
|
33349
|
-
const createRoom = (0,
|
|
33435
|
+
const createRoom = (0, import_react109.useCallback)(
|
|
33350
33436
|
async (participantIds) => {
|
|
33351
33437
|
setLoading(true);
|
|
33352
33438
|
setError(null);
|
|
@@ -33370,7 +33456,7 @@ function useChatRooms({
|
|
|
33370
33456
|
},
|
|
33371
33457
|
[apiClient, fetchRooms]
|
|
33372
33458
|
);
|
|
33373
|
-
const clearError = (0,
|
|
33459
|
+
const clearError = (0, import_react109.useCallback)(() => {
|
|
33374
33460
|
setError(null);
|
|
33375
33461
|
}, []);
|
|
33376
33462
|
return {
|
|
@@ -33404,8 +33490,8 @@ var CHAT_MESSAGE_TYPES = {
|
|
|
33404
33490
|
};
|
|
33405
33491
|
|
|
33406
33492
|
// src/components/Chat/Chat.tsx
|
|
33407
|
-
var
|
|
33408
|
-
var
|
|
33493
|
+
var import_react110 = require("react");
|
|
33494
|
+
var import_react111 = require("@phosphor-icons/react");
|
|
33409
33495
|
var import_jsx_runtime142 = require("react/jsx-runtime");
|
|
33410
33496
|
var RoomItem = ({
|
|
33411
33497
|
room,
|
|
@@ -33422,7 +33508,7 @@ var RoomItem = ({
|
|
|
33422
33508
|
isActive && "bg-primary-50 border-l-4 border-primary-500"
|
|
33423
33509
|
),
|
|
33424
33510
|
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex items-start gap-3 w-full", children: [
|
|
33425
|
-
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "w-10 h-10 rounded-full bg-primary-100 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
33511
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)("div", { className: "w-10 h-10 rounded-full bg-primary-100 flex items-center justify-center flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react111.UsersIcon, { size: 20, className: "text-primary-600" }) }),
|
|
33426
33512
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex-1 min-w-0", children: [
|
|
33427
33513
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Text_default, { size: "sm", weight: "semibold", className: "text-text-900 truncate", children: room.name }),
|
|
33428
33514
|
room.lastMessage && /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)(Text_default, { size: "xs", className: "text-text-500 truncate mt-1", children: [
|
|
@@ -33552,16 +33638,16 @@ function ChatContent({
|
|
|
33552
33638
|
onRoomChange,
|
|
33553
33639
|
onBackToList
|
|
33554
33640
|
}) {
|
|
33555
|
-
const [view, setView] = (0,
|
|
33556
|
-
const [selectedRoom, setSelectedRoom] = (0,
|
|
33641
|
+
const [view, setView] = (0, import_react110.useState)("list");
|
|
33642
|
+
const [selectedRoom, setSelectedRoom] = (0, import_react110.useState)(
|
|
33557
33643
|
null
|
|
33558
33644
|
);
|
|
33559
|
-
const [selectedUserIds, setSelectedUserIds] = (0,
|
|
33645
|
+
const [selectedUserIds, setSelectedUserIds] = (0, import_react110.useState)(
|
|
33560
33646
|
/* @__PURE__ */ new Set()
|
|
33561
33647
|
);
|
|
33562
|
-
const [messageInput, setMessageInput] = (0,
|
|
33563
|
-
const [showCreateModal, setShowCreateModal] = (0,
|
|
33564
|
-
const hasHandledInitialRoomRef = (0,
|
|
33648
|
+
const [messageInput, setMessageInput] = (0, import_react110.useState)("");
|
|
33649
|
+
const [showCreateModal, setShowCreateModal] = (0, import_react110.useState)(false);
|
|
33650
|
+
const hasHandledInitialRoomRef = (0, import_react110.useRef)(false);
|
|
33565
33651
|
const {
|
|
33566
33652
|
rooms,
|
|
33567
33653
|
availableUsers,
|
|
@@ -33589,10 +33675,10 @@ function ChatContent({
|
|
|
33589
33675
|
const getRoleLabel = () => {
|
|
33590
33676
|
return userRole === "TEACHER" /* TEACHER */ ? "Professor" : "Aluno";
|
|
33591
33677
|
};
|
|
33592
|
-
(0,
|
|
33678
|
+
(0, import_react110.useEffect)(() => {
|
|
33593
33679
|
fetchRooms();
|
|
33594
33680
|
}, [fetchRooms]);
|
|
33595
|
-
(0,
|
|
33681
|
+
(0, import_react110.useEffect)(() => {
|
|
33596
33682
|
if (hasHandledInitialRoomRef.current) {
|
|
33597
33683
|
return;
|
|
33598
33684
|
}
|
|
@@ -33614,7 +33700,7 @@ function ChatContent({
|
|
|
33614
33700
|
onBackToList?.();
|
|
33615
33701
|
}
|
|
33616
33702
|
}, [initialRoomId, rooms, roomsLoading, onBackToList]);
|
|
33617
|
-
const handleSelectRoom = (0,
|
|
33703
|
+
const handleSelectRoom = (0, import_react110.useCallback)(
|
|
33618
33704
|
(room) => {
|
|
33619
33705
|
setSelectedRoom(room);
|
|
33620
33706
|
setView("room");
|
|
@@ -33622,12 +33708,12 @@ function ChatContent({
|
|
|
33622
33708
|
},
|
|
33623
33709
|
[onRoomChange]
|
|
33624
33710
|
);
|
|
33625
|
-
const handleOpenCreateModal = (0,
|
|
33711
|
+
const handleOpenCreateModal = (0, import_react110.useCallback)(async () => {
|
|
33626
33712
|
await fetchAvailableUsers();
|
|
33627
33713
|
setSelectedUserIds(/* @__PURE__ */ new Set());
|
|
33628
33714
|
setShowCreateModal(true);
|
|
33629
33715
|
}, [fetchAvailableUsers]);
|
|
33630
|
-
const handleToggleUser = (0,
|
|
33716
|
+
const handleToggleUser = (0, import_react110.useCallback)((id) => {
|
|
33631
33717
|
setSelectedUserIds((prev) => {
|
|
33632
33718
|
const next = new Set(prev);
|
|
33633
33719
|
if (next.has(id)) {
|
|
@@ -33638,7 +33724,7 @@ function ChatContent({
|
|
|
33638
33724
|
return next;
|
|
33639
33725
|
});
|
|
33640
33726
|
}, []);
|
|
33641
|
-
const handleCreateRoom = (0,
|
|
33727
|
+
const handleCreateRoom = (0, import_react110.useCallback)(async () => {
|
|
33642
33728
|
if (selectedUserIds.size === 0) return;
|
|
33643
33729
|
const room = await createRoom(Array.from(selectedUserIds));
|
|
33644
33730
|
if (room) {
|
|
@@ -33647,12 +33733,12 @@ function ChatContent({
|
|
|
33647
33733
|
onRoomChange?.(room.id);
|
|
33648
33734
|
}
|
|
33649
33735
|
}, [selectedUserIds, createRoom, onRoomChange]);
|
|
33650
|
-
const handleSendMessage = (0,
|
|
33736
|
+
const handleSendMessage = (0, import_react110.useCallback)(() => {
|
|
33651
33737
|
if (!messageInput.trim()) return;
|
|
33652
33738
|
sendMessage(messageInput);
|
|
33653
33739
|
setMessageInput("");
|
|
33654
33740
|
}, [messageInput, sendMessage]);
|
|
33655
|
-
const handleBackToList = (0,
|
|
33741
|
+
const handleBackToList = (0, import_react110.useCallback)(() => {
|
|
33656
33742
|
setSelectedRoom(null);
|
|
33657
33743
|
setView("list");
|
|
33658
33744
|
onBackToList?.();
|
|
@@ -33705,7 +33791,7 @@ function ChatContent({
|
|
|
33705
33791
|
variant: "solid",
|
|
33706
33792
|
size: "small",
|
|
33707
33793
|
onClick: handleOpenCreateModal,
|
|
33708
|
-
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
33794
|
+
iconLeft: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react111.PlusIcon, { size: 16 }),
|
|
33709
33795
|
children: "Nova conversa"
|
|
33710
33796
|
}
|
|
33711
33797
|
)
|
|
@@ -33745,7 +33831,7 @@ function ChatContent({
|
|
|
33745
33831
|
return /* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex h-full", children: [
|
|
33746
33832
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex-1 flex flex-col", children: [
|
|
33747
33833
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "p-4 border-b border-background-200 flex items-center gap-3", children: [
|
|
33748
|
-
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Button_default, { variant: "link", size: "small", onClick: handleBackToList, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
33834
|
+
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Button_default, { variant: "link", size: "small", onClick: handleBackToList, children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react111.XIcon, { size: 20 }) }),
|
|
33749
33835
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsxs)("div", { className: "flex-1", children: [
|
|
33750
33836
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Text_default, { size: "md", weight: "semibold", className: "text-text-900", children: selectedRoom.name }),
|
|
33751
33837
|
/* @__PURE__ */ (0, import_jsx_runtime142.jsx)(Text_default, { size: "xs", className: "text-text-500", children: isConnected ? "Conectado" : "Conectando..." })
|
|
@@ -33774,7 +33860,7 @@ function ChatContent({
|
|
|
33774
33860
|
variant: "solid",
|
|
33775
33861
|
onClick: handleSendMessage,
|
|
33776
33862
|
disabled: !messageInput.trim() || !isConnected,
|
|
33777
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(
|
|
33863
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime142.jsx)(import_react111.PaperPlaneTiltIcon, { size: 20 })
|
|
33778
33864
|
}
|
|
33779
33865
|
)
|
|
33780
33866
|
] }) })
|
|
@@ -33898,7 +33984,7 @@ var CalendarActivityStatus = /* @__PURE__ */ ((CalendarActivityStatus2) => {
|
|
|
33898
33984
|
})(CalendarActivityStatus || {});
|
|
33899
33985
|
|
|
33900
33986
|
// src/hooks/useSendActivity.ts
|
|
33901
|
-
var
|
|
33987
|
+
var import_react112 = require("react");
|
|
33902
33988
|
var import_dayjs8 = __toESM(require("dayjs"));
|
|
33903
33989
|
function transformToCategoryConfig(data) {
|
|
33904
33990
|
return [
|
|
@@ -33953,21 +34039,21 @@ function useSendActivity(config) {
|
|
|
33953
34039
|
onSuccess,
|
|
33954
34040
|
onError
|
|
33955
34041
|
} = config;
|
|
33956
|
-
const [isOpen, setIsOpen] = (0,
|
|
33957
|
-
const [selectedModel, setSelectedModel] = (0,
|
|
34042
|
+
const [isOpen, setIsOpen] = (0, import_react112.useState)(false);
|
|
34043
|
+
const [selectedModel, setSelectedModel] = (0, import_react112.useState)(
|
|
33958
34044
|
null
|
|
33959
34045
|
);
|
|
33960
|
-
const [categories, setCategories] = (0,
|
|
33961
|
-
const [isLoading, setIsLoading] = (0,
|
|
33962
|
-
const [isCategoriesLoading, setIsCategoriesLoading] = (0,
|
|
33963
|
-
const categoriesLoadedRef = (0,
|
|
33964
|
-
const initialData = (0,
|
|
34046
|
+
const [categories, setCategories] = (0, import_react112.useState)([]);
|
|
34047
|
+
const [isLoading, setIsLoading] = (0, import_react112.useState)(false);
|
|
34048
|
+
const [isCategoriesLoading, setIsCategoriesLoading] = (0, import_react112.useState)(false);
|
|
34049
|
+
const categoriesLoadedRef = (0, import_react112.useRef)(false);
|
|
34050
|
+
const initialData = (0, import_react112.useMemo)(() => {
|
|
33965
34051
|
if (!selectedModel) return void 0;
|
|
33966
34052
|
return {
|
|
33967
34053
|
title: selectedModel.title
|
|
33968
34054
|
};
|
|
33969
34055
|
}, [selectedModel]);
|
|
33970
|
-
const loadCategories = (0,
|
|
34056
|
+
const loadCategories = (0, import_react112.useCallback)(async () => {
|
|
33971
34057
|
if (categoriesLoadedRef.current) return;
|
|
33972
34058
|
setIsCategoriesLoading(true);
|
|
33973
34059
|
try {
|
|
@@ -33982,7 +34068,7 @@ function useSendActivity(config) {
|
|
|
33982
34068
|
setIsCategoriesLoading(false);
|
|
33983
34069
|
}
|
|
33984
34070
|
}, [fetchCategories, onError]);
|
|
33985
|
-
const openModal = (0,
|
|
34071
|
+
const openModal = (0, import_react112.useCallback)(
|
|
33986
34072
|
(model) => {
|
|
33987
34073
|
setSelectedModel(model);
|
|
33988
34074
|
setIsOpen(true);
|
|
@@ -33990,17 +34076,17 @@ function useSendActivity(config) {
|
|
|
33990
34076
|
},
|
|
33991
34077
|
[loadCategories]
|
|
33992
34078
|
);
|
|
33993
|
-
const closeModal = (0,
|
|
34079
|
+
const closeModal = (0, import_react112.useCallback)(() => {
|
|
33994
34080
|
setIsOpen(false);
|
|
33995
34081
|
setSelectedModel(null);
|
|
33996
34082
|
}, []);
|
|
33997
|
-
const onCategoriesChange = (0,
|
|
34083
|
+
const onCategoriesChange = (0, import_react112.useCallback)(
|
|
33998
34084
|
(updatedCategories) => {
|
|
33999
34085
|
setCategories(updatedCategories);
|
|
34000
34086
|
},
|
|
34001
34087
|
[]
|
|
34002
34088
|
);
|
|
34003
|
-
const handleSubmit = (0,
|
|
34089
|
+
const handleSubmit = (0, import_react112.useCallback)(
|
|
34004
34090
|
async (data) => {
|
|
34005
34091
|
if (!selectedModel) return;
|
|
34006
34092
|
setIsLoading(true);
|
|
@@ -34099,8 +34185,8 @@ function getPerformanceTagConfig(percentage) {
|
|
|
34099
34185
|
}
|
|
34100
34186
|
|
|
34101
34187
|
// src/components/StudentPerformanceDetailsModal/StudentPerformanceDetailsModal.tsx
|
|
34102
|
-
var
|
|
34103
|
-
var
|
|
34188
|
+
var import_react113 = require("react");
|
|
34189
|
+
var import_react114 = require("@phosphor-icons/react");
|
|
34104
34190
|
|
|
34105
34191
|
// src/components/StudentPerformanceDetailsModal/types.ts
|
|
34106
34192
|
var DEFAULT_PERFORMANCE_DETAILS_LABELS = {
|
|
@@ -34295,7 +34381,7 @@ var ErrorContent3 = ({ message }) => /* @__PURE__ */ (0, import_jsx_runtime144.j
|
|
|
34295
34381
|
{
|
|
34296
34382
|
as: "span",
|
|
34297
34383
|
className: "size-12 rounded-full bg-error-100 flex items-center justify-center",
|
|
34298
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
34384
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_react114.XCircleIcon, { size: 24, className: "text-error-700", weight: "fill" })
|
|
34299
34385
|
}
|
|
34300
34386
|
),
|
|
34301
34387
|
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Text_default, { size: "md", className: "text-error-700 text-center", children: message })
|
|
@@ -34310,7 +34396,7 @@ var PerformanceContent2 = ({
|
|
|
34310
34396
|
{
|
|
34311
34397
|
as: "span",
|
|
34312
34398
|
className: "size-6 rounded-full bg-primary-100 flex items-center justify-center",
|
|
34313
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
34399
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_react114.UserIcon, { size: 14, className: "text-primary-800", weight: "fill" })
|
|
34314
34400
|
}
|
|
34315
34401
|
),
|
|
34316
34402
|
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(Text_default, { size: "md", className: "text-text-950", children: data.studentName })
|
|
@@ -34319,7 +34405,7 @@ var PerformanceContent2 = ({
|
|
|
34319
34405
|
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
34320
34406
|
PerformanceStatCard,
|
|
34321
34407
|
{
|
|
34322
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
34408
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_react114.TrophyIcon, { size: 16, weight: "fill", className: "text-white" }),
|
|
34323
34409
|
label: labels.gradeLabel,
|
|
34324
34410
|
value: data.grade.value.toFixed(1),
|
|
34325
34411
|
secondaryLabel: labels.performanceTagLabel,
|
|
@@ -34330,7 +34416,7 @@ var PerformanceContent2 = ({
|
|
|
34330
34416
|
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
34331
34417
|
PerformanceStatCard,
|
|
34332
34418
|
{
|
|
34333
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
34419
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_react114.TrophyIcon, { size: 16, weight: "fill", className: "text-text-950" }),
|
|
34334
34420
|
label: labels.correctQuestionsLabel,
|
|
34335
34421
|
value: data.correctQuestions.value,
|
|
34336
34422
|
secondaryLabel: labels.bestResultLabel,
|
|
@@ -34341,7 +34427,7 @@ var PerformanceContent2 = ({
|
|
|
34341
34427
|
/* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
34342
34428
|
PerformanceStatCard,
|
|
34343
34429
|
{
|
|
34344
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(
|
|
34430
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime144.jsx)(import_react114.XCircleIcon, { size: 16, weight: "fill", className: "text-white" }),
|
|
34345
34431
|
label: labels.incorrectQuestionsLabel,
|
|
34346
34432
|
value: data.incorrectQuestions.value,
|
|
34347
34433
|
secondaryLabel: labels.hardestTopicLabel,
|
|
@@ -34405,7 +34491,7 @@ var StudentPerformanceDetailsModal = ({
|
|
|
34405
34491
|
error = null,
|
|
34406
34492
|
labels: customLabels
|
|
34407
34493
|
}) => {
|
|
34408
|
-
const labels = (0,
|
|
34494
|
+
const labels = (0, import_react113.useMemo)(
|
|
34409
34495
|
() => ({ ...DEFAULT_PERFORMANCE_DETAILS_LABELS, ...customLabels }),
|
|
34410
34496
|
[customLabels]
|
|
34411
34497
|
);
|
|
@@ -34426,8 +34512,8 @@ var StudentPerformanceDetailsModal = ({
|
|
|
34426
34512
|
};
|
|
34427
34513
|
|
|
34428
34514
|
// src/components/StudentLessonProgressModal/StudentLessonProgressModal.tsx
|
|
34429
|
-
var
|
|
34430
|
-
var
|
|
34515
|
+
var import_react115 = require("react");
|
|
34516
|
+
var import_react116 = require("@phosphor-icons/react");
|
|
34431
34517
|
var import_phosphor_react61 = require("phosphor-react");
|
|
34432
34518
|
|
|
34433
34519
|
// src/components/StudentLessonProgressModal/types.ts
|
|
@@ -34448,7 +34534,7 @@ var LessonAccordionItem2 = ({
|
|
|
34448
34534
|
noDataMessage,
|
|
34449
34535
|
level = 0
|
|
34450
34536
|
}) => {
|
|
34451
|
-
const [isExpanded, setIsExpanded] = (0,
|
|
34537
|
+
const [isExpanded, setIsExpanded] = (0, import_react115.useState)(false);
|
|
34452
34538
|
const hasChildren = item.children && item.children.length > 0;
|
|
34453
34539
|
const hasNoData = item.status === "no_data" || item.progress === null;
|
|
34454
34540
|
const progressValue = item.progress ?? 0;
|
|
@@ -34570,7 +34656,7 @@ var ErrorContent4 = ({
|
|
|
34570
34656
|
{
|
|
34571
34657
|
as: "span",
|
|
34572
34658
|
className: "size-12 rounded-full bg-error-100 flex items-center justify-center",
|
|
34573
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
34659
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_react116.XCircleIcon, { size: 24, className: "text-error-700", weight: "fill" })
|
|
34574
34660
|
}
|
|
34575
34661
|
),
|
|
34576
34662
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(Text_default, { size: "md", className: "text-error-700 text-center", children: prefix ? `${prefix}: ${message}` : message })
|
|
@@ -34586,7 +34672,7 @@ var ProgressContent = ({
|
|
|
34586
34672
|
as: "span",
|
|
34587
34673
|
className: "size-6 rounded-full bg-primary-100 flex items-center justify-center",
|
|
34588
34674
|
children: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
34589
|
-
|
|
34675
|
+
import_react116.MagnifyingGlassIcon,
|
|
34590
34676
|
{
|
|
34591
34677
|
size: 14,
|
|
34592
34678
|
className: "text-primary-800",
|
|
@@ -34611,7 +34697,7 @@ var ProgressContent = ({
|
|
|
34611
34697
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
34612
34698
|
CardActivitiesResults,
|
|
34613
34699
|
{
|
|
34614
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
34700
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_react116.MedalIcon, { size: 16, weight: "regular", className: "text-text-950" }),
|
|
34615
34701
|
title: labels.bestResultLabel,
|
|
34616
34702
|
subTitle: data.bestResult || "-",
|
|
34617
34703
|
header: "",
|
|
@@ -34621,7 +34707,7 @@ var ProgressContent = ({
|
|
|
34621
34707
|
/* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
34622
34708
|
CardActivitiesResults,
|
|
34623
34709
|
{
|
|
34624
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(
|
|
34710
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime145.jsx)(import_react116.SealWarningIcon, { size: 16, weight: "regular", className: "text-white" }),
|
|
34625
34711
|
title: labels.biggestDifficultyLabel,
|
|
34626
34712
|
subTitle: data.biggestDifficulty || "-",
|
|
34627
34713
|
header: "",
|
|
@@ -34668,7 +34754,7 @@ var StudentLessonProgressModal = ({
|
|
|
34668
34754
|
error = null,
|
|
34669
34755
|
labels: customLabels
|
|
34670
34756
|
}) => {
|
|
34671
|
-
const labels = (0,
|
|
34757
|
+
const labels = (0, import_react115.useMemo)(
|
|
34672
34758
|
() => ({ ...DEFAULT_LESSON_PROGRESS_LABELS, ...customLabels }),
|
|
34673
34759
|
[customLabels]
|
|
34674
34760
|
);
|
|
@@ -34872,6 +34958,7 @@ var StudentLessonProgressModal = ({
|
|
|
34872
34958
|
Support,
|
|
34873
34959
|
SupportCategory,
|
|
34874
34960
|
SupportStatus,
|
|
34961
|
+
SupportType,
|
|
34875
34962
|
Table,
|
|
34876
34963
|
TableBody,
|
|
34877
34964
|
TableCaption,
|
|
@@ -34892,6 +34979,7 @@ var StudentLessonProgressModal = ({
|
|
|
34892
34979
|
VideoPlayer,
|
|
34893
34980
|
WS_STATES,
|
|
34894
34981
|
Whiteboard,
|
|
34982
|
+
ZendeskWidget,
|
|
34895
34983
|
activitiesHistoryApiResponseSchema,
|
|
34896
34984
|
activityModelsApiResponseSchema,
|
|
34897
34985
|
buildUserFilterData,
|
|
@@ -35027,6 +35115,7 @@ var StudentLessonProgressModal = ({
|
|
|
35027
35115
|
useSendActivity,
|
|
35028
35116
|
useSendActivityModal,
|
|
35029
35117
|
useSendLessonModal,
|
|
35118
|
+
useSupportFeatureFlag,
|
|
35030
35119
|
useTableFilter,
|
|
35031
35120
|
useTableSort,
|
|
35032
35121
|
useTheme,
|