touchstudy-core 0.1.118 → 0.1.120

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/index.js CHANGED
@@ -833,7 +833,7 @@ var no_message = "메시지 없음";
833
833
  var this_is_the_guidance_text = "안내 텍스트입니다.";
834
834
  var the_page_you_are_looking_for_was_not_found = "찾으시는 페이지를 찾을 수 없습니다.";
835
835
  var oops = "이런! 당신이졌다.";
836
- var please_enter = "들어 오세요...";
836
+ var please_enter = "입력...";
837
837
  var hint = "힌트";
838
838
  var save_and_add_next_question = "저장하고 다음 질문 추가";
839
839
  var question_text = "질문 텍스트";
@@ -24013,6 +24013,7 @@ var useTextbookDetail = function useTextbookDetail(props) {
24013
24013
  return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
24014
24014
  });
24015
24015
  var isAdmin = user === null || user === void 0 ? void 0 : (_user$roles = user.roles) === null || _user$roles === void 0 ? void 0 : _user$roles.includes(exports.Role.Admin);
24016
+ var onAcademy = !!(user !== null && user !== void 0 && user.academyDomain);
24016
24017
  var _useExam = useExam({
24017
24018
  navigate: navigate
24018
24019
  }),
@@ -24711,12 +24712,12 @@ var useTextbookDetail = function useTextbookDetail(props) {
24711
24712
  }, [id, t]);
24712
24713
  var isReadonly = React.useMemo(function () {
24713
24714
  var _textbook$createdBy;
24714
- if (!user.id) return true;
24715
+ if (!user.id || !onAcademy) return true;
24715
24716
  if (!textbook.id) return false;
24716
24717
  if (isReadonlyParam) return true;
24717
24718
  if (isAdminSite && isAdmin || !textbook.isCreatedByAdmin && !isAdmin && !isAdminSite && (textbook === null || textbook === void 0 ? void 0 : (_textbook$createdBy = textbook.createdBy) === null || _textbook$createdBy === void 0 ? void 0 : _textbook$createdBy.id) === (user === null || user === void 0 ? void 0 : user.id)) return false;
24718
24719
  return true;
24719
- }, [isReadonlyParam, textbook.isCreatedByAdmin, isAdminSite, isAdmin, textbook.id, textbook === null || textbook === void 0 ? void 0 : (_textbook$createdBy2 = textbook.createdBy) === null || _textbook$createdBy2 === void 0 ? void 0 : _textbook$createdBy2.id, user === null || user === void 0 ? void 0 : user.id]);
24720
+ }, [onAcademy, isReadonlyParam, textbook.isCreatedByAdmin, isAdminSite, isAdmin, textbook.id, textbook === null || textbook === void 0 ? void 0 : (_textbook$createdBy2 = textbook.createdBy) === null || _textbook$createdBy2 === void 0 ? void 0 : _textbook$createdBy2.id, user === null || user === void 0 ? void 0 : user.id]);
24720
24721
  return {
24721
24722
  id: id,
24722
24723
  t: t,
@@ -25604,7 +25605,7 @@ var useTextbookShare = function useTextbookShare(props) {
25604
25605
  setShared(existsTeachers);
25605
25606
  };
25606
25607
  var enabledSave = function enabledSave(textbook) {
25607
- return isAdminSite || isSuperAdmin || isSuperAdminUser || !isAdmin && textbook.isShared && textbook.createdBy.id === infoUser.id;
25608
+ return onAcademy && (isAdminSite || isSuperAdmin || isSuperAdminUser || !isAdmin && textbook.isShared && textbook.createdBy.id === infoUser.id);
25608
25609
  };
25609
25610
  var enabledShare = function enabledShare(textbook) {
25610
25611
  return textbook.isShared && onAcademy && (isAdminSite || isSuperAdminUser || !isAdmin && textbook.createdBy.id === infoUser.id);