@elice/material-survey 1.240508.0-globalization.1 → 1.240514.1

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.
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var messageTh = {"materialSurvey.error":"การโหลดแบบสำรวจล้มเหลว\nโปรดลองอีกครั้งในภายหลัง","materialSurvey.submit":"ส่ง","materialSurvey.submittedAnswer":"ส่งคำตอบ","materialSurvey.next":"ย้ายไปที่ต่อไป >","materialSurvey.myAnswer":"การตอบของฉัน","materialSurvey.empty.title":"การสำรวจกำลังจะเริ่มขึ้นค่ะ.","materialSurvey.empty.description":"โปสต์แบบสำรวจแล้ว กรุณาตรวจสอบอีกครั้งค่ะ!","materialSurvey.survey.empty.title":"การสำรวจกำลังจะเริ่มต้น โปรดรอสัก{_termCourseRoleEducator}่.","materialSurvey.survey.empty.description":"กรุณาตรวจสอบแบบสำรวจอีกครั้งหลังจากที่โพสต์แล้วค่ะ!","materialSurvey.submitStatus.success":"ส่งแล้วครับ.","materialSurvey.submitStatus.failure":"การส่งล้มเหลวแล้วค่ะ.","materialSurvey.resultStatus.submitted":"การส่งแบบทำเสร็จแล้ว","materialSurvey.text.placeholder":"โปรดใส่คำตอบของคุณ."};
5
+ var messageTh = {"materialSurvey.error":"ไม่สามารถเรียกดูแบบสำรวจได้","materialSurvey.submit":"ส่งใบสมัคร","materialSurvey.submittedAnswer":"ฉันสามารถตอบคำถามเช่นนี้ได้","materialSurvey.next":"คำถามถัดไป >","materialSurvey.myAnswer":"คำตอบของฉัน","materialSurvey.empty.title":"การสำรวจกำลังเตรียมการอยู่ค่ะ","materialSurvey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialSurvey.survey.empty.title":"การสำรวจกำลังเตรียมการอยู่ค่ะ","materialSurvey.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialSurvey.submitStatus.success":"เสนอ","materialSurvey.submitStatus.failure":"การส่งล้มเหลว","materialSurvey.resultStatus.submitted":"เสนอ","materialSurvey.text.placeholder":"กรุณากรอกคำตอบ"};
6
6
 
7
7
  exports.default = messageTh;
@@ -7,6 +7,7 @@ var reactHookForm = require('react-hook-form');
7
7
  var blocks = require('@elice/blocks');
8
8
  var intl = require('@elice/intl');
9
9
  var markdown = require('@elice/markdown');
10
+ var materialSharedUtils = require('@elice/material-shared-utils');
10
11
  var types = require('@elice/types');
11
12
  var styled = require('styled-components');
12
13
  var randomId = require('./utils/randomId.js');
@@ -33,7 +34,7 @@ const MaterialSurveyEditContent = () => {
33
34
  //
34
35
  // Change `optionInfo` according to `optionType`.
35
36
  //
36
- React.useEffect(() => {
37
+ materialSharedUtils.useDeepClonedCompareEffect(() => {
37
38
  const get = () => {
38
39
  switch (watchedOptionType) {
39
40
  case types.enums.SurveyOptionType.SelectOne:
@@ -64,7 +65,7 @@ const MaterialSurveyEditContent = () => {
64
65
  setValue('questionInfoList.0.optionInfo', get());
65
66
  },
66
67
  // eslint-disable-next-line react-hooks/exhaustive-deps
67
- [watchedOptionType, setValue, intl$1]);
68
+ [watchedOptionType, intl$1]);
68
69
  /**
69
70
  * Input of option info and answer info,
70
71
  * according to option type.
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var messageTh = {"common.option":"ตัวเลือก {number}","common.errorMessage.range":"โปรดป้อนข้อความระหว่าง {min} ถึง {max} ตัวอักษร","content.title":"คำถาม","content.title.errorMessage.required":"กรุณาใส่คำถาม","content.title.placeholder":"กรุณาใส่คำถาม","content.description.title":"รายละเอียด","content.description.placeholder":"โปรดใส่คำอธิบายหรือรูปภาพสำหรับคำถามของคุณ","content.option.title":"คำตอบ","content.option.tooltip.disabled":"หากการสำรวจถูกเปิดเผยแล้วหรือมี{_termCourseRoleStudent}ที่ส่งแล้ว\nจะไม่สามารถแก้ไขได้","content.option.select.items.selectOne":"ปรนัย (เลือกหนึ่ง)","content.option.select.items.selectMultiple":"ปรนัย (เลือกหลายอย่าง)","content.option.select.items.text":"คำตอบอัตนัย","option.common.select.errorMessage.required":"กรุณาใส่ตัวเลือก","option.common.select.placeholder":"ใส่ตัวเลือก","option.common.select.tooltip.minOptionInfoItem":"ต้องใส่ตัวเลือกอย่างน้อย 2 ตัว","option.common.select.tooltip.maxOptionInfoItem":"ไม่สามารถใส่ตัวเลือกได้เกิน 20 ตัว","option.common.select.addButton":"เพิ่มตัวเลือก"};
5
+ var messageTh = {"common.option":"ตัวเลือก {number}","common.errorMessage.range":"กรุณากรอกภายใน {min} ~ {max} ตัวอักษร","content.title":"คำถาม","content.title.errorMessage.required":"กรุณากรอกคำถาม","content.title.placeholder":"กรุณากรอกคำถาม","content.description.title":"เนื้อหาอย่างละเอียด","content.description.placeholder":"กรุณากรอกคำอธิบายข้อความหรือรูปภาพอย่างละเอียด ฯลฯ","content.option.title":"ตอบ","content.option.tooltip.disabled":"การแก้ไขไม่สามารถทำได้เมื่อคำถามเป็นสาธารณะหรือมี {_termPathRoleStudent} ที่ส่งคำถามแล้ว\nคุณสามารถตรวจสอบคำถามที่กำหนดค่าไว้ในแท็บ {_termLibraryLecturePage} ของผู้เรียนทางซ้ายได้","content.option.select.items.selectOne":"เลือกเดียว","content.option.select.items.selectMultiple":"ตัวเลือกหลายอย่าง","content.option.select.items.text":"คำตอบสั้นๆ","option.common.select.errorMessage.required":"กรุณากรอกตัวเลือก","option.common.select.placeholder":"ป้อนตัวเลือก","option.common.select.tooltip.minOptionInfoItem":"คุณต้องป้อนตัวเลือกอย่างน้อย 2 ตัวเลือก","option.common.select.tooltip.maxOptionInfoItem":"คุณไม่สามารถป้อนตัวเลือกได้มากกว่า 20 ตัวเลือก","option.common.select.addButton":"เพิ่มตัวเลือก"};
6
6
 
7
7
  exports.default = messageTh;
@@ -1,3 +1,3 @@
1
- var messageTh = {"materialSurvey.error":"การโหลดแบบสำรวจล้มเหลว\nโปรดลองอีกครั้งในภายหลัง","materialSurvey.submit":"ส่ง","materialSurvey.submittedAnswer":"ส่งคำตอบ","materialSurvey.next":"ย้ายไปที่ต่อไป >","materialSurvey.myAnswer":"การตอบของฉัน","materialSurvey.empty.title":"การสำรวจกำลังจะเริ่มขึ้นค่ะ.","materialSurvey.empty.description":"โปสต์แบบสำรวจแล้ว กรุณาตรวจสอบอีกครั้งค่ะ!","materialSurvey.survey.empty.title":"การสำรวจกำลังจะเริ่มต้น โปรดรอสัก{_termCourseRoleEducator}่.","materialSurvey.survey.empty.description":"กรุณาตรวจสอบแบบสำรวจอีกครั้งหลังจากที่โพสต์แล้วค่ะ!","materialSurvey.submitStatus.success":"ส่งแล้วครับ.","materialSurvey.submitStatus.failure":"การส่งล้มเหลวแล้วค่ะ.","materialSurvey.resultStatus.submitted":"การส่งแบบทำเสร็จแล้ว","materialSurvey.text.placeholder":"โปรดใส่คำตอบของคุณ."};
1
+ var messageTh = {"materialSurvey.error":"ไม่สามารถเรียกดูแบบสำรวจได้","materialSurvey.submit":"ส่งใบสมัคร","materialSurvey.submittedAnswer":"ฉันสามารถตอบคำถามเช่นนี้ได้","materialSurvey.next":"คำถามถัดไป >","materialSurvey.myAnswer":"คำตอบของฉัน","materialSurvey.empty.title":"การสำรวจกำลังเตรียมการอยู่ค่ะ","materialSurvey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialSurvey.survey.empty.title":"การสำรวจกำลังเตรียมการอยู่ค่ะ","materialSurvey.survey.empty.description":"โปรดตรวจสอบอีกครั้งหลังจากโพสต์แบบสำรวจ!","materialSurvey.submitStatus.success":"เสนอ","materialSurvey.submitStatus.failure":"การส่งล้มเหลว","materialSurvey.resultStatus.submitted":"เสนอ","materialSurvey.text.placeholder":"กรุณากรอกคำตอบ"};
2
2
 
3
3
  export { messageTh as default };
@@ -3,6 +3,7 @@ import { useFormContext, Controller } from 'react-hook-form';
3
3
  import { FormInputVerticalLayout, Label, Input, Tooltip, Select, Vspace } from '@elice/blocks';
4
4
  import { useRawEliceIntl } from '@elice/intl';
5
5
  import { MarkdownEditor } from '@elice/markdown';
6
+ import { useDeepClonedCompareEffect } from '@elice/material-shared-utils';
6
7
  import { enums } from '@elice/types';
7
8
  import styled from 'styled-components';
8
9
  import { createRandomId } from './utils/randomId.js';
@@ -29,7 +30,7 @@ const MaterialSurveyEditContent = () => {
29
30
  //
30
31
  // Change `optionInfo` according to `optionType`.
31
32
  //
32
- React.useEffect(() => {
33
+ useDeepClonedCompareEffect(() => {
33
34
  const get = () => {
34
35
  switch (watchedOptionType) {
35
36
  case enums.SurveyOptionType.SelectOne:
@@ -60,7 +61,7 @@ const MaterialSurveyEditContent = () => {
60
61
  setValue('questionInfoList.0.optionInfo', get());
61
62
  },
62
63
  // eslint-disable-next-line react-hooks/exhaustive-deps
63
- [watchedOptionType, setValue, intl]);
64
+ [watchedOptionType, intl]);
64
65
  /**
65
66
  * Input of option info and answer info,
66
67
  * according to option type.
@@ -1,3 +1,3 @@
1
- var messageTh = {"common.option":"ตัวเลือก {number}","common.errorMessage.range":"โปรดป้อนข้อความระหว่าง {min} ถึง {max} ตัวอักษร","content.title":"คำถาม","content.title.errorMessage.required":"กรุณาใส่คำถาม","content.title.placeholder":"กรุณาใส่คำถาม","content.description.title":"รายละเอียด","content.description.placeholder":"โปรดใส่คำอธิบายหรือรูปภาพสำหรับคำถามของคุณ","content.option.title":"คำตอบ","content.option.tooltip.disabled":"หากการสำรวจถูกเปิดเผยแล้วหรือมี{_termCourseRoleStudent}ที่ส่งแล้ว\nจะไม่สามารถแก้ไขได้","content.option.select.items.selectOne":"ปรนัย (เลือกหนึ่ง)","content.option.select.items.selectMultiple":"ปรนัย (เลือกหลายอย่าง)","content.option.select.items.text":"คำตอบอัตนัย","option.common.select.errorMessage.required":"กรุณาใส่ตัวเลือก","option.common.select.placeholder":"ใส่ตัวเลือก","option.common.select.tooltip.minOptionInfoItem":"ต้องใส่ตัวเลือกอย่างน้อย 2 ตัว","option.common.select.tooltip.maxOptionInfoItem":"ไม่สามารถใส่ตัวเลือกได้เกิน 20 ตัว","option.common.select.addButton":"เพิ่มตัวเลือก"};
1
+ var messageTh = {"common.option":"ตัวเลือก {number}","common.errorMessage.range":"กรุณากรอกภายใน {min} ~ {max} ตัวอักษร","content.title":"คำถาม","content.title.errorMessage.required":"กรุณากรอกคำถาม","content.title.placeholder":"กรุณากรอกคำถาม","content.description.title":"เนื้อหาอย่างละเอียด","content.description.placeholder":"กรุณากรอกคำอธิบายข้อความหรือรูปภาพอย่างละเอียด ฯลฯ","content.option.title":"ตอบ","content.option.tooltip.disabled":"การแก้ไขไม่สามารถทำได้เมื่อคำถามเป็นสาธารณะหรือมี {_termPathRoleStudent} ที่ส่งคำถามแล้ว\nคุณสามารถตรวจสอบคำถามที่กำหนดค่าไว้ในแท็บ {_termLibraryLecturePage} ของผู้เรียนทางซ้ายได้","content.option.select.items.selectOne":"เลือกเดียว","content.option.select.items.selectMultiple":"ตัวเลือกหลายอย่าง","content.option.select.items.text":"คำตอบสั้นๆ","option.common.select.errorMessage.required":"กรุณากรอกตัวเลือก","option.common.select.placeholder":"ป้อนตัวเลือก","option.common.select.tooltip.minOptionInfoItem":"คุณต้องป้อนตัวเลือกอย่างน้อย 2 ตัวเลือก","option.common.select.tooltip.maxOptionInfoItem":"คุณไม่สามารถป้อนตัวเลือกได้มากกว่า 20 ตัวเลือก","option.common.select.addButton":"เพิ่มตัวเลือก"};
2
2
 
3
3
  export { messageTh as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-survey",
3
- "version": "1.240508.0-globalization.1",
3
+ "version": "1.240514.1",
4
4
  "description": "User view and editing components of Elice material survey",
5
5
  "repository": "https://git.elicer.io/elice/frontend/library/elice-material",
6
6
  "license": "UNLICENSED",
@@ -46,14 +46,14 @@
46
46
  },
47
47
  "devDependencies": {
48
48
  "@elice/api-client": "^1.230815.0",
49
- "@elice/blocks": "^1.230816.0",
49
+ "@elice/blocks": "^1.240514.0",
50
50
  "@elice/design-tokens": "^1.220803.0",
51
51
  "@elice/icons": "^1.230814.0",
52
52
  "@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
53
- "@elice/intl": "0.240425.0-alpha.9",
53
+ "@elice/intl": "0.240425.0-rc.0",
54
54
  "@elice/markdown": "^1.220815.0",
55
- "@elice/material-shared-types": "1.240508.0-globalization.1",
56
- "@elice/material-shared-utils": "1.240508.0-globalization.1",
55
+ "@elice/material-shared-types": "1.240514.1",
56
+ "@elice/material-shared-utils": "1.240514.1",
57
57
  "@elice/types": "^1.240208.0",
58
58
  "@types/classnames": "^2.3.1",
59
59
  "@types/react": "~17.0.9",
@@ -63,5 +63,5 @@
63
63
  "react-use": "^17.2.4",
64
64
  "styled-components": "^5.3.0"
65
65
  },
66
- "gitHead": "359abc2f14610a96b1c4514aedb4a7d0ad02aed3"
66
+ "gitHead": "dbab58374d0a0311909a04cfa8621970e8f43a18"
67
67
  }