mario-education 2.4.462-release → 2.4.463-release
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/components/Dialog/CommonModal.d.ts +3 -0
- package/dist/components/Questions/SurveyQuestionSelector.d.ts +24 -0
- package/dist/components/Tabs/CustomTab.d.ts +2 -0
- package/dist/components/layouts/icons/OrderIcon.d.ts +3 -0
- package/dist/components/layouts/icons/PenIcon.d.ts +3 -0
- package/dist/components/layouts/icons/SurveyIcon.d.ts +3 -0
- package/dist/components/layouts/icons/SurveyManagementIcon.d.ts +3 -0
- package/dist/containers/QuestionBank/components/AdditionalSurvey.d.ts +10 -0
- package/dist/containers/QuestionBank/components/SubSurveyQuestions.d.ts +7 -0
- package/dist/containers/QuestionBank/components/SurveyAnswerList.d.ts +14 -0
- package/dist/containers/QuestionBank/components/SurveyQuestionsList.d.ts +11 -0
- package/dist/containers/QuestionBank/hooks/useCategoriesQuestions.d.ts +6 -0
- package/dist/containers/QuestionBank/hooks/useQuestionSurveyList.d.ts +21 -0
- package/dist/containers/QuestionBank/views/CategoriesAndQuestion.d.ts +9 -0
- package/dist/containers/QuestionBank/views/SurveyQuestion.d.ts +3 -0
- package/dist/containers/TemplateSurvey/hooks/useCategorySelector.d.ts +23 -0
- package/dist/containers/TemplateSurvey/views/SurveyTemplates.d.ts +2 -0
- package/dist/index.js +13 -5
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +13 -5
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
categoryId?: number;
|
|
4
|
+
onChange: Function;
|
|
5
|
+
value: any | null;
|
|
6
|
+
externalQuestion: Option[];
|
|
7
|
+
isDefaultQuestionSurvey?: boolean;
|
|
8
|
+
isDefaultQuestion?: boolean;
|
|
9
|
+
isDefaultClassReflection?: boolean;
|
|
10
|
+
isDefaultConference?: boolean;
|
|
11
|
+
noCategory?: boolean;
|
|
12
|
+
setTemporaryQuestion: Function;
|
|
13
|
+
removeQuestion: any;
|
|
14
|
+
updatedQuestions: any;
|
|
15
|
+
}
|
|
16
|
+
interface Option {
|
|
17
|
+
label: string;
|
|
18
|
+
value: number;
|
|
19
|
+
text: string;
|
|
20
|
+
id: number;
|
|
21
|
+
category: string;
|
|
22
|
+
}
|
|
23
|
+
declare const SurveyQuestionSelector: FC<Props>;
|
|
24
|
+
export default SurveyQuestionSelector;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { IQuestionLabel } from "../configs/type";
|
|
3
|
+
interface Props {
|
|
4
|
+
values: any;
|
|
5
|
+
setFieldValue: any;
|
|
6
|
+
labelQuestions?: IQuestionLabel;
|
|
7
|
+
questionType?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const AdditionalSurvey: FC<Props>;
|
|
10
|
+
export default AdditionalSurvey;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
type: string;
|
|
4
|
+
answers: any[];
|
|
5
|
+
setFieldValue: () => any;
|
|
6
|
+
isSurvey: boolean;
|
|
7
|
+
isDropdown?: boolean;
|
|
8
|
+
isMultipleChoice?: boolean;
|
|
9
|
+
answerLabels: string[];
|
|
10
|
+
answerLabelsEmotional?: string[];
|
|
11
|
+
questionType?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const SurveyAnswerList: FC<Props>;
|
|
14
|
+
export default SurveyAnswerList;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
isDefaultQuestion: boolean;
|
|
4
|
+
isDefaultClassReflection: boolean;
|
|
5
|
+
isDefaultConference?: boolean;
|
|
6
|
+
isDefaultSurvey?: boolean;
|
|
7
|
+
categorySelected: any;
|
|
8
|
+
setCategorySelected: Function;
|
|
9
|
+
}
|
|
10
|
+
declare const SurveyQuestionsList: FC<Props>;
|
|
11
|
+
export default SurveyQuestionsList;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const useQuestionSurveyList: (isDefaultQuestion: boolean, isDefaultClassReflection: boolean, isDefaultConference?: boolean | undefined, isDefaultSurvey?: boolean | undefined, categorySelected?: any) => {
|
|
3
|
+
gridOptions: any;
|
|
4
|
+
setRef: (node: any) => any;
|
|
5
|
+
questionList: any;
|
|
6
|
+
totalItems: any;
|
|
7
|
+
filters: any;
|
|
8
|
+
changeFilters: (updatedFilters: any) => void;
|
|
9
|
+
getData: () => Promise<void>;
|
|
10
|
+
removeData: (id: number) => void;
|
|
11
|
+
goToDetail: (id?: number | undefined) => void;
|
|
12
|
+
updateOrderQuestions: (data: any, isDefaulClassReflection: boolean) => Promise<void>;
|
|
13
|
+
onToggleIntervention: () => void;
|
|
14
|
+
handleSortFilter: (colId: string) => void;
|
|
15
|
+
classFontSize: string;
|
|
16
|
+
onSelectCategory: (id: any) => void;
|
|
17
|
+
handleChangeInputSearch: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
18
|
+
inputSearch: import("react").MutableRefObject<any>;
|
|
19
|
+
goToDetailSurvey: (id?: number | undefined) => void;
|
|
20
|
+
};
|
|
21
|
+
export default useQuestionSurveyList;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
interface Props {
|
|
3
|
+
isDefaultQuestion: boolean;
|
|
4
|
+
isDefaultClassReflection: boolean;
|
|
5
|
+
isDefaultConference?: boolean;
|
|
6
|
+
isDefaultSurvey?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const CategoriesAndQuestion: FC<Props>;
|
|
9
|
+
export default CategoriesAndQuestion;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface CategoryOption {
|
|
3
|
+
id: number;
|
|
4
|
+
name: string;
|
|
5
|
+
level?: number;
|
|
6
|
+
value: number;
|
|
7
|
+
label: string;
|
|
8
|
+
parentCategoryId?: Array<number>;
|
|
9
|
+
numberOfchidren?: number;
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface CategoriesOption {
|
|
13
|
+
id: number;
|
|
14
|
+
value: number;
|
|
15
|
+
label: string;
|
|
16
|
+
level?: number;
|
|
17
|
+
}
|
|
18
|
+
declare const useCategorySelector: () => {
|
|
19
|
+
categories: CategoriesOption[];
|
|
20
|
+
categorySelected: CategoriesOption;
|
|
21
|
+
setCategorySelected: import("react").Dispatch<import("react").SetStateAction<CategoriesOption>>;
|
|
22
|
+
};
|
|
23
|
+
export default useCategorySelector;
|
package/dist/index.js
CHANGED
|
@@ -16507,9 +16507,11 @@ var QuestionDetail = function QuestionDetail() {
|
|
|
16507
16507
|
var header = !!id ? t(EDIT_QUESTION_HEADER) : t(CREATE_QUESTION_HEADER);
|
|
16508
16508
|
var confirmText = !!id ? t("update") : t("create");
|
|
16509
16509
|
var additionalFields = ["fromLabel", "toLabel", "numberOfStars"];
|
|
16510
|
-
var activeModelLanguage =
|
|
16511
|
-
return
|
|
16512
|
-
|
|
16510
|
+
var activeModelLanguage = React.useMemo(function () {
|
|
16511
|
+
return modelQuestionLang.find(function (r) {
|
|
16512
|
+
return r.lang === activeLanguage;
|
|
16513
|
+
});
|
|
16514
|
+
}, [activeLanguage, modelQuestionLang]);
|
|
16513
16515
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(reactstrap.Nav, {
|
|
16514
16516
|
tabs: true,
|
|
16515
16517
|
className: "mb-3"
|
|
@@ -16521,7 +16523,6 @@ var QuestionDetail = function QuestionDetail() {
|
|
|
16521
16523
|
}
|
|
16522
16524
|
}, item.name));
|
|
16523
16525
|
})), React__default.createElement(formik.Formik, {
|
|
16524
|
-
key: activeLanguage,
|
|
16525
16526
|
initialValues: !id && !!activeModelLanguage ? activeModelLanguage : questionDetail,
|
|
16526
16527
|
enableReinitialize: true,
|
|
16527
16528
|
validationSchema: schema$a,
|
|
@@ -16576,7 +16577,14 @@ var QuestionDetail = function QuestionDetail() {
|
|
|
16576
16577
|
};
|
|
16577
16578
|
|
|
16578
16579
|
React.useEffect(function () {
|
|
16579
|
-
|
|
16580
|
+
console.log({
|
|
16581
|
+
values: values
|
|
16582
|
+
});
|
|
16583
|
+
console.log({
|
|
16584
|
+
activeModelLanguage: activeModelLanguage
|
|
16585
|
+
});
|
|
16586
|
+
|
|
16587
|
+
if (!id && !!activeModelLanguage && activeModelLanguage.lang == values.lang && JSON.stringify(activeModelLanguage) !== JSON.stringify(values)) {
|
|
16580
16588
|
var categoryId = values.categoryId != 0 ? values.categoryId : questionDetail.categoryId;
|
|
16581
16589
|
var updatedModelQuestionLang = modelQuestionLang.map(function (item) {
|
|
16582
16590
|
return item.lang === activeLanguage ? _extends({}, item, values, {
|