@elice/material-survey 1.220803.0
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/README.md +3 -0
- package/cjs/components/material-survey/MaterialSurvey.d.ts +4 -0
- package/cjs/components/material-survey/MaterialSurvey.i18n.d.ts +16 -0
- package/cjs/components/material-survey/MaterialSurvey.i18n.js +37 -0
- package/cjs/components/material-survey/MaterialSurvey.js +109 -0
- package/cjs/components/material-survey/MaterialSurveyError.d.ts +3 -0
- package/cjs/components/material-survey/MaterialSurveyInfo.d.ts +3 -0
- package/cjs/components/material-survey/MaterialSurveyInfo.js +73 -0
- package/cjs/components/material-survey/MaterialSurveySelectMultiple.d.ts +3 -0
- package/cjs/components/material-survey/MaterialSurveySelectMultiple.js +184 -0
- package/cjs/components/material-survey/MaterialSurveySelectOne.d.ts +3 -0
- package/cjs/components/material-survey/MaterialSurveySelectOne.js +164 -0
- package/cjs/components/material-survey/MaterialSurveyShimmer.d.ts +3 -0
- package/cjs/components/material-survey/MaterialSurveyShimmer.js +61 -0
- package/cjs/components/material-survey/MaterialSurveyText.d.ts +3 -0
- package/cjs/components/material-survey/MaterialSurveyText.js +159 -0
- package/cjs/components/material-survey/SurveyResultBadge.d.ts +7 -0
- package/cjs/components/material-survey/SurveyResultBadge.js +32 -0
- package/cjs/components/material-survey/SurveySubmitStatusText.d.ts +7 -0
- package/cjs/components/material-survey/SurveySubmitStatusText.js +38 -0
- package/cjs/components/material-survey/context/MaterialSurveyContext.d.ts +31 -0
- package/cjs/components/material-survey/context/MaterialSurveyContext.js +134 -0
- package/cjs/components/material-survey/index.d.ts +3 -0
- package/cjs/components/material-survey-edit/MaterialSurveyEdit.d.ts +25 -0
- package/cjs/components/material-survey-edit/MaterialSurveyEdit.js +91 -0
- package/cjs/components/material-survey-edit/MaterialSurveyEditContent.d.ts +3 -0
- package/cjs/components/material-survey-edit/MaterialSurveyEditContent.js +235 -0
- package/cjs/components/material-survey-edit/MaterialSurveyEditOptionSelect.d.ts +3 -0
- package/cjs/components/material-survey-edit/MaterialSurveyEditOptionSelect.js +132 -0
- package/cjs/components/material-survey-edit/context.d.ts +6 -0
- package/cjs/components/material-survey-edit/context.js +15 -0
- package/cjs/components/material-survey-edit/index.d.ts +2 -0
- package/cjs/components/material-survey-edit/locales.d.ts +20 -0
- package/cjs/components/material-survey-edit/locales.js +45 -0
- package/cjs/components/material-survey-edit/utils/editValue.d.ts +19 -0
- package/cjs/components/material-survey-edit/utils/editValue.js +46 -0
- package/cjs/components/material-survey-edit/utils/randomId.d.ts +4 -0
- package/cjs/components/material-survey-edit/utils/randomId.js +12 -0
- package/cjs/components/shared/StyledMarkdown.d.ts +3 -0
- package/cjs/components/shared/StyledMarkdown.js +14 -0
- package/cjs/components/shared/SurveyContentBox.d.ts +15 -0
- package/cjs/components/shared/SurveyContentBox.js +108 -0
- package/cjs/components/shared/index.d.ts +4 -0
- package/cjs/components/shared/question-checkbox/QuestionCheckbox.d.ts +8 -0
- package/cjs/components/shared/question-checkbox/QuestionCheckbox.js +26 -0
- package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +9 -0
- package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.js +42 -0
- package/cjs/components/shared/question-checkbox/QuestionCheckboxOption.d.ts +9 -0
- package/cjs/components/shared/question-checkbox/QuestionCheckboxOption.js +226 -0
- package/cjs/components/shared/question-radio/QuestionRadio.d.ts +8 -0
- package/cjs/components/shared/question-radio/QuestionRadio.js +26 -0
- package/cjs/components/shared/question-radio/QuestionRadioContext.d.ts +9 -0
- package/cjs/components/shared/question-radio/QuestionRadioContext.js +42 -0
- package/cjs/components/shared/question-radio/QuestionRadioOption.d.ts +9 -0
- package/cjs/components/shared/question-radio/QuestionRadioOption.js +187 -0
- package/cjs/helpers/index.d.ts +22 -0
- package/cjs/helpers/index.js +26 -0
- package/cjs/index.d.ts +3 -0
- package/cjs/index.js +21 -0
- package/es/components/material-survey/MaterialSurvey.d.ts +4 -0
- package/es/components/material-survey/MaterialSurvey.i18n.d.ts +16 -0
- package/es/components/material-survey/MaterialSurvey.i18n.js +32 -0
- package/es/components/material-survey/MaterialSurvey.js +101 -0
- package/es/components/material-survey/MaterialSurveyError.d.ts +3 -0
- package/es/components/material-survey/MaterialSurveyInfo.d.ts +3 -0
- package/es/components/material-survey/MaterialSurveyInfo.js +67 -0
- package/es/components/material-survey/MaterialSurveySelectMultiple.d.ts +3 -0
- package/es/components/material-survey/MaterialSurveySelectMultiple.js +178 -0
- package/es/components/material-survey/MaterialSurveySelectOne.d.ts +3 -0
- package/es/components/material-survey/MaterialSurveySelectOne.js +158 -0
- package/es/components/material-survey/MaterialSurveyShimmer.d.ts +3 -0
- package/es/components/material-survey/MaterialSurveyShimmer.js +54 -0
- package/es/components/material-survey/MaterialSurveyText.d.ts +3 -0
- package/es/components/material-survey/MaterialSurveyText.js +152 -0
- package/es/components/material-survey/SurveyResultBadge.d.ts +7 -0
- package/es/components/material-survey/SurveyResultBadge.js +26 -0
- package/es/components/material-survey/SurveySubmitStatusText.d.ts +7 -0
- package/es/components/material-survey/SurveySubmitStatusText.js +32 -0
- package/es/components/material-survey/context/MaterialSurveyContext.d.ts +31 -0
- package/es/components/material-survey/context/MaterialSurveyContext.js +124 -0
- package/es/components/material-survey/index.d.ts +3 -0
- package/es/components/material-survey-edit/MaterialSurveyEdit.d.ts +25 -0
- package/es/components/material-survey-edit/MaterialSurveyEdit.js +86 -0
- package/es/components/material-survey-edit/MaterialSurveyEditContent.d.ts +3 -0
- package/es/components/material-survey-edit/MaterialSurveyEditContent.js +228 -0
- package/es/components/material-survey-edit/MaterialSurveyEditOptionSelect.d.ts +3 -0
- package/es/components/material-survey-edit/MaterialSurveyEditOptionSelect.js +125 -0
- package/es/components/material-survey-edit/context.d.ts +6 -0
- package/es/components/material-survey-edit/context.js +6 -0
- package/es/components/material-survey-edit/index.d.ts +2 -0
- package/es/components/material-survey-edit/locales.d.ts +20 -0
- package/es/components/material-survey-edit/locales.js +40 -0
- package/es/components/material-survey-edit/utils/editValue.d.ts +19 -0
- package/es/components/material-survey-edit/utils/editValue.js +41 -0
- package/es/components/material-survey-edit/utils/randomId.d.ts +4 -0
- package/es/components/material-survey-edit/utils/randomId.js +8 -0
- package/es/components/shared/StyledMarkdown.d.ts +3 -0
- package/es/components/shared/StyledMarkdown.js +8 -0
- package/es/components/shared/SurveyContentBox.d.ts +15 -0
- package/es/components/shared/SurveyContentBox.js +98 -0
- package/es/components/shared/index.d.ts +4 -0
- package/es/components/shared/question-checkbox/QuestionCheckbox.d.ts +8 -0
- package/es/components/shared/question-checkbox/QuestionCheckbox.js +19 -0
- package/es/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +9 -0
- package/es/components/shared/question-checkbox/QuestionCheckboxContext.js +33 -0
- package/es/components/shared/question-checkbox/QuestionCheckboxOption.d.ts +9 -0
- package/es/components/shared/question-checkbox/QuestionCheckboxOption.js +219 -0
- package/es/components/shared/question-radio/QuestionRadio.d.ts +8 -0
- package/es/components/shared/question-radio/QuestionRadio.js +19 -0
- package/es/components/shared/question-radio/QuestionRadioContext.d.ts +9 -0
- package/es/components/shared/question-radio/QuestionRadioContext.js +33 -0
- package/es/components/shared/question-radio/QuestionRadioOption.d.ts +9 -0
- package/es/components/shared/question-radio/QuestionRadioOption.js +180 -0
- package/es/helpers/index.d.ts +22 -0
- package/es/helpers/index.js +21 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +7 -0
- package/package.json +71 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { enums } from '@elice/types';
|
|
2
|
+
|
|
3
|
+
var SurveyResultStatus;
|
|
4
|
+
|
|
5
|
+
(function (SurveyResultStatus) {
|
|
6
|
+
SurveyResultStatus[SurveyResultStatus["Submitted"] = 0] = "Submitted";
|
|
7
|
+
SurveyResultStatus[SurveyResultStatus["NotSubmitted"] = 1] = "NotSubmitted";
|
|
8
|
+
})(SurveyResultStatus || (SurveyResultStatus = {}));
|
|
9
|
+
|
|
10
|
+
function getSurveyResultStatus(materialSurveyResponse) {
|
|
11
|
+
if (materialSurveyResponse) {
|
|
12
|
+
return SurveyResultStatus.Submitted;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return SurveyResultStatus.NotSubmitted;
|
|
16
|
+
}
|
|
17
|
+
function checkUserLectureTestEnded(lecture) {
|
|
18
|
+
return (lecture === null || lecture === void 0 ? void 0 : lecture.testAdmissionStatus) === enums.TestAdmissionStatus.Completed;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { SurveyResultStatus, checkUserLectureTestEnded, getSurveyResultStatus };
|
package/es/index.d.ts
ADDED
package/es/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { default as MaterialSurvey } from './components/material-survey/MaterialSurvey.js';
|
|
2
|
+
export { default as MaterialSurveyInfo } from './components/material-survey/MaterialSurveyInfo.js';
|
|
3
|
+
export { default as MaterialSurveyEdit } from './components/material-survey-edit/MaterialSurveyEdit.js';
|
|
4
|
+
export { default as QuestionRadio } from './components/shared/question-radio/QuestionRadio.js';
|
|
5
|
+
export { default as QuestionRadioOption } from './components/shared/question-radio/QuestionRadioOption.js';
|
|
6
|
+
export { default as QuestionCheckbox } from './components/shared/question-checkbox/QuestionCheckbox.js';
|
|
7
|
+
export { default as QuestionCheckboxOption } from './components/shared/question-checkbox/QuestionCheckboxOption.js';
|
package/package.json
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elice/material-survey",
|
|
3
|
+
"version": "1.220803.0",
|
|
4
|
+
"description": "User view and editing components of Elice material survey",
|
|
5
|
+
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
|
+
"license": "UNLICENSED",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"module": "./es/index.js",
|
|
9
|
+
"types": "./es/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"es",
|
|
12
|
+
"cjs",
|
|
13
|
+
"package.json",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": "~16.14",
|
|
19
|
+
"yarn": ">=1.20 <2"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"start": "run-s watch",
|
|
23
|
+
"prebuild": "run-s clean",
|
|
24
|
+
"build": "run-p build:es build:cjs",
|
|
25
|
+
"build:es": "rollup -c ../../rollup.config.ts -f es",
|
|
26
|
+
"build:cjs": "rollup -c ../../rollup.config.ts -f cjs",
|
|
27
|
+
"watch": "rollup -c ../../rollup.config.ts -f es -w",
|
|
28
|
+
"lint": "eslint --ext .ts,.tsx ./src --max-warnings=0",
|
|
29
|
+
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"@elice/api-client": "^1.220802.1",
|
|
33
|
+
"@elice/blocks": "^1.220803.0",
|
|
34
|
+
"@elice/design-tokens": "^1.220803.0",
|
|
35
|
+
"@elice/icons": "^1.220803.0",
|
|
36
|
+
"@elice/markdown": "^1.220803.0",
|
|
37
|
+
"@elice/material-shared-types": "22.7.2-1",
|
|
38
|
+
"@elice/material-shared-utils": "22.7.2-1",
|
|
39
|
+
"@elice/types": "^1.220802.1",
|
|
40
|
+
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
41
|
+
"react-intl": "^5.0.0",
|
|
42
|
+
"react-use": "^17.0.0",
|
|
43
|
+
"styled-components": "^5.2.0"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"classnames": "^2.2.0",
|
|
47
|
+
"react-hook-form": "~7.12.0",
|
|
48
|
+
"react-transition-group": "^4.4.0",
|
|
49
|
+
"tslib": "^2.3.1"
|
|
50
|
+
},
|
|
51
|
+
"devDependencies": {
|
|
52
|
+
"@elice/api-client": "^1.220802.1",
|
|
53
|
+
"@elice/blocks": "^1.220803.0",
|
|
54
|
+
"@elice/design-tokens": "^1.220803.0",
|
|
55
|
+
"@elice/icons": "^1.220803.0",
|
|
56
|
+
"@elice/icons-legacy": "npm:@elice/icons@0.220803.1",
|
|
57
|
+
"@elice/markdown": "^1.220803.0",
|
|
58
|
+
"@elice/material-shared-types": "1.220803.0",
|
|
59
|
+
"@elice/material-shared-utils": "1.220803.0",
|
|
60
|
+
"@elice/types": "^1.220802.1",
|
|
61
|
+
"@types/classnames": "^2.3.1",
|
|
62
|
+
"@types/react": "~17.0.9",
|
|
63
|
+
"@types/react-transition-group": "^4.4.4",
|
|
64
|
+
"@types/styled-components": "^5.1.21",
|
|
65
|
+
"react": "^17.0.2",
|
|
66
|
+
"react-intl": "^5.20.10",
|
|
67
|
+
"react-use": "^17.2.4",
|
|
68
|
+
"styled-components": "^5.3.0"
|
|
69
|
+
},
|
|
70
|
+
"gitHead": "21c6b42ae6550e7899c57bf39fa78cea0f47e64c"
|
|
71
|
+
}
|