catchup-library-web 1.20.16 → 1.20.18

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.d.mts CHANGED
@@ -23,13 +23,14 @@ interface ITimedProgressBarProperties {
23
23
  interface IScoreBarProperties {
24
24
  score: number;
25
25
  className?: string;
26
+ size?: string;
26
27
  }
27
28
 
28
29
  declare const ProgressBar: ({ title, showRemainingTime, totalTimeInSeconds, remainingTimeInSeconds, color, borderColor, height, }: IProgressBarProperties) => react_jsx_runtime.JSX.Element;
29
30
 
30
31
  declare const TimedProgressBar: ({ title, startTimer, showRemainingTime, totalTimeInSeconds, remainingTimeInSeconds, handleOnTimerEnds, }: ITimedProgressBarProperties) => react_jsx_runtime.JSX.Element;
31
32
 
32
- declare const ScoreBar: ({ score, className }: IScoreBarProperties) => react_jsx_runtime.JSX.Element;
33
+ declare const ScoreBar: ({ score, className, size }: IScoreBarProperties) => react_jsx_runtime.JSX.Element;
33
34
 
34
35
  interface IButtonProps {
35
36
  title: string;
@@ -658,7 +659,7 @@ declare const retrieveOtherBadgeDTOList: () => {
658
659
  badgeDTO: {
659
660
  coterieType: string;
660
661
  sourceType: string;
661
- badgeType: string;
662
+ trackingType: string;
662
663
  };
663
664
  level: number;
664
665
  }[];
@@ -666,7 +667,7 @@ declare const retrieveAllEarnedBadgeDTOListByCoterieTypeList: (coterieTypeList:
666
667
  badgeDTO: {
667
668
  coterieType: string;
668
669
  sourceType: string;
669
- badgeType: string;
670
+ trackingType: string;
670
671
  };
671
672
  level: number;
672
673
  }[];
@@ -674,15 +675,15 @@ declare const retrieveAllEarnedBadgeDTOListByCoterieType: (coterieType: string)
674
675
  badgeDTO: {
675
676
  coterieType: string;
676
677
  sourceType: string;
677
- badgeType: string;
678
+ trackingType: string;
678
679
  };
679
680
  level: number;
680
681
  }[];
681
- declare const retrieveBadgeRuleListByParams: (coterieType: string, sourceType: string, badgeType: string) => {
682
+ declare const retrieveBadgeRuleListByParams: (coterieType: string, sourceType: string, trackingType: string) => {
682
683
  level: number;
683
684
  value: number;
684
685
  }[];
685
- declare const retrieveBadgeRuleTextByParams: (coterieType: string, sourceType: string, badgeType: string, level: number) => string | null;
686
+ declare const retrieveBadgeRuleTextByParams: (coterieType: string, sourceType: string, trackingType: string, level: number) => string | null;
686
687
 
687
688
  declare const constructBaseVerbalIndvidualModel: (userId: any) => {
688
689
  easy: number;
package/dist/index.d.ts CHANGED
@@ -23,13 +23,14 @@ interface ITimedProgressBarProperties {
23
23
  interface IScoreBarProperties {
24
24
  score: number;
25
25
  className?: string;
26
+ size?: string;
26
27
  }
27
28
 
28
29
  declare const ProgressBar: ({ title, showRemainingTime, totalTimeInSeconds, remainingTimeInSeconds, color, borderColor, height, }: IProgressBarProperties) => react_jsx_runtime.JSX.Element;
29
30
 
30
31
  declare const TimedProgressBar: ({ title, startTimer, showRemainingTime, totalTimeInSeconds, remainingTimeInSeconds, handleOnTimerEnds, }: ITimedProgressBarProperties) => react_jsx_runtime.JSX.Element;
31
32
 
32
- declare const ScoreBar: ({ score, className }: IScoreBarProperties) => react_jsx_runtime.JSX.Element;
33
+ declare const ScoreBar: ({ score, className, size }: IScoreBarProperties) => react_jsx_runtime.JSX.Element;
33
34
 
34
35
  interface IButtonProps {
35
36
  title: string;
@@ -658,7 +659,7 @@ declare const retrieveOtherBadgeDTOList: () => {
658
659
  badgeDTO: {
659
660
  coterieType: string;
660
661
  sourceType: string;
661
- badgeType: string;
662
+ trackingType: string;
662
663
  };
663
664
  level: number;
664
665
  }[];
@@ -666,7 +667,7 @@ declare const retrieveAllEarnedBadgeDTOListByCoterieTypeList: (coterieTypeList:
666
667
  badgeDTO: {
667
668
  coterieType: string;
668
669
  sourceType: string;
669
- badgeType: string;
670
+ trackingType: string;
670
671
  };
671
672
  level: number;
672
673
  }[];
@@ -674,15 +675,15 @@ declare const retrieveAllEarnedBadgeDTOListByCoterieType: (coterieType: string)
674
675
  badgeDTO: {
675
676
  coterieType: string;
676
677
  sourceType: string;
677
- badgeType: string;
678
+ trackingType: string;
678
679
  };
679
680
  level: number;
680
681
  }[];
681
- declare const retrieveBadgeRuleListByParams: (coterieType: string, sourceType: string, badgeType: string) => {
682
+ declare const retrieveBadgeRuleListByParams: (coterieType: string, sourceType: string, trackingType: string) => {
682
683
  level: number;
683
684
  value: number;
684
685
  }[];
685
- declare const retrieveBadgeRuleTextByParams: (coterieType: string, sourceType: string, badgeType: string, level: number) => string | null;
686
+ declare const retrieveBadgeRuleTextByParams: (coterieType: string, sourceType: string, trackingType: string, level: number) => string | null;
686
687
 
687
688
  declare const constructBaseVerbalIndvidualModel: (userId: any) => {
688
689
  easy: number;
package/dist/index.js CHANGED
@@ -366,7 +366,7 @@ var TimedProgressBar_default = TimedProgressBar;
366
366
 
367
367
  // src/components/bars/ScoreBar.tsx
368
368
  var import_jsx_runtime3 = require("react/jsx-runtime");
369
- var ScoreBar = ({ score, className }) => {
369
+ var ScoreBar = ({ score, className, size }) => {
370
370
  const getProgressBarColor = (score2) => {
371
371
  if (score2 >= 70) return "bg-catchup-green";
372
372
  if (score2 >= 30) return "bg-catchup-orange";
@@ -378,15 +378,21 @@ var ScoreBar = ({ score, className }) => {
378
378
  return "text-catchup-red";
379
379
  };
380
380
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: `flex items-center gap-2 ${className}`, children: [
381
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex-1 h-5 bg-catchup-gray-100 rounded-catchup-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
381
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
382
382
  "div",
383
383
  {
384
- className: `h-full rounded-catchup-full transition-all duration-300 ${getProgressBarColor(
385
- score
386
- )}`,
387
- style: { width: `${score}%` }
384
+ className: `flex-1 ${size === "large" ? "h-7" : size === "medium" ? "h-5" : size === "small" ? "h-3" : "h-5"} bg-catchup-gray-100 rounded-catchup-full overflow-hidden`,
385
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
386
+ "div",
387
+ {
388
+ className: `h-full rounded-catchup-full transition-all duration-300 ${getProgressBarColor(
389
+ score
390
+ )}`,
391
+ style: { width: `${score}%` }
392
+ }
393
+ )
388
394
  }
389
- ) }),
395
+ ),
390
396
  /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
391
397
  "span",
392
398
  {
@@ -4985,7 +4991,7 @@ var FillInTheBlanksActivityMaterialContent = ({
4985
4991
  component: contentMap.type === "TEXT" ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4986
4992
  "div",
4987
4993
  {
4988
- className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer",
4994
+ className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer",
4989
4995
  onMouseDown: () => {
4990
4996
  setSelectedOption(option);
4991
4997
  setPasteOptionIndex(null);
@@ -4994,7 +5000,7 @@ var FillInTheBlanksActivityMaterialContent = ({
4994
5000
  InputWithSpecialExpression_default,
4995
5001
  {
4996
5002
  value: option,
4997
- showSpecialOnly: true
5003
+ showSpecialOnly: false
4998
5004
  }
4999
5005
  ) })
5000
5006
  }
@@ -5056,7 +5062,7 @@ var FillInTheBlanksActivityMaterialContent = ({
5056
5062
  InputWithSpecialExpression_default,
5057
5063
  {
5058
5064
  value: answerMap[materialKey],
5059
- showSpecialOnly: true
5065
+ showSpecialOnly: false
5060
5066
  }
5061
5067
  ) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-gray-400 italic" })
5062
5068
  }
@@ -5368,7 +5374,7 @@ var GroupingActivityMaterialContent = ({
5368
5374
  }) }),
5369
5375
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(DividerLine_default, {})
5370
5376
  ] }) : null,
5371
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "overflow-y-auto max-h-[600px]", children: Object.keys(answerMap).map((answerMapKey, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-row w-full", children: [
5377
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "overflow-y-auto max-h-[500px]", children: Object.keys(answerMap).map((answerMapKey, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "flex flex-row w-full", children: [
5372
5378
  /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "w-1/3", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
5373
5379
  "div",
5374
5380
  {
@@ -5661,7 +5667,7 @@ var MatchingActivityMaterialContent = ({
5661
5667
  ),
5662
5668
  /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "flex-shrink-0", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(DividerLine_default, {}) })
5663
5669
  ] }) : null,
5664
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "overflow-y-auto max-h-[600px]", children: Object.keys(answerMap).map((answerMapKey, index) => {
5670
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "overflow-y-auto max-h-[500px]", children: Object.keys(answerMap).map((answerMapKey, index) => {
5665
5671
  const learnerAnswerState = checkAnswerState(
5666
5672
  materialMap[answerMapKey],
5667
5673
  answerMap[answerMapKey]
@@ -9445,10 +9451,6 @@ var retrieveSourceTypeOptionList = (coterieOnly) => {
9445
9451
  value: "CATCHXAM",
9446
9452
  text: i18n_default.t("CATCHXAM")
9447
9453
  },
9448
- // {
9449
- // value: "STANDARD_EXAM",
9450
- // text: i18n.t("STANDARD_EXAM"),
9451
- // },
9452
9454
  {
9453
9455
  value: "ETUDE",
9454
9456
  text: i18n_default.t("ETUDE")
@@ -9460,6 +9462,18 @@ var retrieveSourceTypeOptionList = (coterieOnly) => {
9460
9462
  {
9461
9463
  value: "ACTIVITY",
9462
9464
  text: i18n_default.t("ACTIVITY")
9465
+ },
9466
+ {
9467
+ value: "ACTIVITY_CORRECT",
9468
+ text: i18n_default.t("ACTIVITY_CORRECT")
9469
+ },
9470
+ {
9471
+ value: "ACTIVITY_REVIEW",
9472
+ text: i18n_default.t("ACTIVITY_REVIEW")
9473
+ },
9474
+ {
9475
+ value: "ACTIVITY_TIME_SPENT",
9476
+ text: i18n_default.t("ACTIVITY_TIME_SPENT")
9463
9477
  }
9464
9478
  ];
9465
9479
  if (!coterieOnly) {
@@ -9470,28 +9484,14 @@ var retrieveSourceTypeOptionList = (coterieOnly) => {
9470
9484
  }
9471
9485
  return currentSourceTypeOptionList;
9472
9486
  };
9473
- var retrieveBadgeTypeOptionList = (isActivity) => {
9474
- const currentBadgeTypeOptionList = [
9487
+ var retrieveTrackingTypeOptionList = () => {
9488
+ const currentTrackingTypeOptionList = [
9475
9489
  {
9476
9490
  value: "COUNT",
9477
9491
  text: i18n_default.t("COUNT")
9478
9492
  }
9479
9493
  ];
9480
- if (isActivity) {
9481
- currentBadgeTypeOptionList.push({
9482
- value: "CORRECT",
9483
- text: i18n_default.t("CORRECT")
9484
- });
9485
- currentBadgeTypeOptionList.push({
9486
- value: "REVIEW",
9487
- text: i18n_default.t("REVIEW")
9488
- });
9489
- currentBadgeTypeOptionList.push({
9490
- value: "TIME_SPENT",
9491
- text: i18n_default.t("TIME_SPENT")
9492
- });
9493
- }
9494
- return currentBadgeTypeOptionList;
9494
+ return currentTrackingTypeOptionList;
9495
9495
  };
9496
9496
  var retrieveOtherBadgeDTOList = () => {
9497
9497
  const badgeList = [];
@@ -9501,15 +9501,13 @@ var retrieveOtherBadgeDTOList = () => {
9501
9501
  );
9502
9502
  for (let i = 1; i <= 5; i++) {
9503
9503
  for (const sourceTypeOption of filteredSourceTypeOptionList) {
9504
- const badgeTypeOptionList = retrieveBadgeTypeOptionList(
9505
- sourceTypeOption.value === "ACTIVITY"
9506
- );
9507
- for (const badgeTypeOption of badgeTypeOptionList) {
9504
+ const trackingTypeOptionList = retrieveTrackingTypeOptionList();
9505
+ for (const trackingTypeOption of trackingTypeOptionList) {
9508
9506
  badgeList.push({
9509
9507
  badgeDTO: {
9510
9508
  coterieType: "MANAGEMENT",
9511
9509
  sourceType: sourceTypeOption.value,
9512
- badgeType: badgeTypeOption.value
9510
+ trackingType: trackingTypeOption.value
9513
9511
  },
9514
9512
  level: i
9515
9513
  });
@@ -9530,15 +9528,13 @@ var retrieveAllEarnedBadgeDTOListByCoterieType = (coterieType) => {
9530
9528
  const badgeList = [];
9531
9529
  for (let i = 1; i <= 5; i++) {
9532
9530
  for (const sourceTypeOption of sourceTypeOptionList) {
9533
- const badgeTypeOptionList = retrieveBadgeTypeOptionList(
9534
- sourceTypeOption.value === "ACTIVITY"
9535
- );
9536
- for (const badgeTypeOption of badgeTypeOptionList) {
9531
+ const trackingTypeOptionList = retrieveTrackingTypeOptionList();
9532
+ for (const trackingTypeOption of trackingTypeOptionList) {
9537
9533
  badgeList.push({
9538
9534
  badgeDTO: {
9539
9535
  coterieType,
9540
9536
  sourceType: sourceTypeOption.value,
9541
- badgeType: badgeTypeOption.value
9537
+ trackingType: trackingTypeOption.value
9542
9538
  },
9543
9539
  level: i
9544
9540
  });
@@ -9549,13 +9545,13 @@ var retrieveAllEarnedBadgeDTOListByCoterieType = (coterieType) => {
9549
9545
  if (a.badgeDTO.sourceType !== b.badgeDTO.sourceType) {
9550
9546
  return a.badgeDTO.sourceType.localeCompare(b.badgeDTO.sourceType);
9551
9547
  }
9552
- return a.badgeDTO.badgeType.localeCompare(b.badgeDTO.badgeType);
9548
+ return a.badgeDTO.trackingType.localeCompare(b.badgeDTO.trackingType);
9553
9549
  });
9554
9550
  };
9555
- var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9551
+ var retrieveBadgeRuleListByParams = (coterieType, sourceType, trackingType) => {
9556
9552
  if (coterieType === "MANAGEMENT") {
9557
9553
  if (sourceType === "ACTIVITY") {
9558
- if (badgeType === "COUNT") {
9554
+ if (trackingType === "COUNT") {
9559
9555
  return [
9560
9556
  {
9561
9557
  level: 1,
@@ -9578,7 +9574,7 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9578
9574
  value: 5e3
9579
9575
  }
9580
9576
  ];
9581
- } else if (badgeType === "TIME_SPENT") {
9577
+ } else if (trackingType === "TIME_SPENT") {
9582
9578
  return [
9583
9579
  {
9584
9580
  level: 1,
@@ -9649,7 +9645,7 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9649
9645
  }
9650
9646
  ];
9651
9647
  } else {
9652
- if (badgeType === "COUNT") {
9648
+ if (trackingType === "COUNT") {
9653
9649
  return [
9654
9650
  {
9655
9651
  level: 1,
@@ -9699,7 +9695,7 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9699
9695
  }
9700
9696
  } else {
9701
9697
  if (sourceType === "ACTIVITY") {
9702
- if (badgeType === "COUNT") {
9698
+ if (trackingType === "COUNT") {
9703
9699
  return [
9704
9700
  {
9705
9701
  level: 1,
@@ -9722,7 +9718,7 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9722
9718
  value: 1e3
9723
9719
  }
9724
9720
  ];
9725
- } else if (badgeType === "TIME_SPENT") {
9721
+ } else if (trackingType === "TIME_SPENT") {
9726
9722
  return [
9727
9723
  {
9728
9724
  level: 1,
@@ -9772,7 +9768,7 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9772
9768
  } else if (sourceType === "LOGIN") {
9773
9769
  return [];
9774
9770
  } else {
9775
- if (badgeType === "COUNT") {
9771
+ if (trackingType === "COUNT") {
9776
9772
  return [
9777
9773
  {
9778
9774
  level: 1,
@@ -9800,34 +9796,34 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9800
9796
  }
9801
9797
  return [];
9802
9798
  };
9803
- var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level) => {
9799
+ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, trackingType, level) => {
9804
9800
  const badgeRuleList = retrieveBadgeRuleListByParams(
9805
9801
  coterieType,
9806
9802
  sourceType,
9807
- badgeType
9803
+ trackingType
9808
9804
  );
9809
9805
  const foundBadgeRule = badgeRuleList[level - 1];
9810
9806
  if (coterieType === "MANAGEMENT") {
9811
9807
  if (sourceType === "ACTIVITY") {
9812
- if (badgeType === "COUNT") {
9808
+ if (trackingType === "COUNT") {
9813
9809
  if (foundBadgeRule) {
9814
9810
  return `${i18n_default.t("total_activity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_count_text_2")}`;
9815
9811
  } else {
9816
9812
  return i18n_default.t("none_activity_count_text");
9817
9813
  }
9818
- } else if (badgeType === "CORRECT") {
9814
+ } else if (trackingType === "CORRECT") {
9819
9815
  if (foundBadgeRule) {
9820
9816
  return `${i18n_default.t("total_activity_correct_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_correct_text_2")}`;
9821
9817
  } else {
9822
9818
  return i18n_default.t("none_activity_correct_text");
9823
9819
  }
9824
- } else if (badgeType === "REVIEW") {
9820
+ } else if (trackingType === "REVIEW") {
9825
9821
  if (foundBadgeRule) {
9826
9822
  return `${i18n_default.t("total_activity_review_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_review_text_2")}`;
9827
9823
  } else {
9828
9824
  return i18n_default.t("none_activity_review_text");
9829
9825
  }
9830
- } else if (badgeType === "TIME_SPENT") {
9826
+ } else if (trackingType === "TIME_SPENT") {
9831
9827
  if (foundBadgeRule) {
9832
9828
  return `${i18n_default.t("total_activity_time_spent_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_time_spent_text_2")}`;
9833
9829
  } else {
@@ -9835,7 +9831,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9835
9831
  }
9836
9832
  }
9837
9833
  } else if (sourceType === "CATCHTIVITY") {
9838
- if (badgeType === "COUNT") {
9834
+ if (trackingType === "COUNT") {
9839
9835
  if (foundBadgeRule) {
9840
9836
  return `${i18n_default.t("total_catchtivity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_catchtivity_count_text_2")}`;
9841
9837
  } else {
@@ -9843,7 +9839,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9843
9839
  }
9844
9840
  }
9845
9841
  } else if (sourceType === "CATCHXAM") {
9846
- if (badgeType === "COUNT") {
9842
+ if (trackingType === "COUNT") {
9847
9843
  if (foundBadgeRule) {
9848
9844
  return `${i18n_default.t("total_catchxam_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_catchxam_count_text_2")}`;
9849
9845
  } else {
@@ -9851,7 +9847,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9851
9847
  }
9852
9848
  }
9853
9849
  } else if (sourceType === "ETUDE") {
9854
- if (badgeType === "COUNT") {
9850
+ if (trackingType === "COUNT") {
9855
9851
  if (foundBadgeRule) {
9856
9852
  return `${i18n_default.t("total_etude_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_etude_count_text_2")}`;
9857
9853
  } else {
@@ -9859,7 +9855,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9859
9855
  }
9860
9856
  }
9861
9857
  } else if (sourceType === "CONTEST") {
9862
- if (badgeType === "COUNT") {
9858
+ if (trackingType === "COUNT") {
9863
9859
  if (foundBadgeRule) {
9864
9860
  return `${i18n_default.t("total_contest_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_contest_count_text_2")}`;
9865
9861
  } else {
@@ -9867,7 +9863,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9867
9863
  }
9868
9864
  }
9869
9865
  } else if (sourceType === "LOGIN") {
9870
- if (badgeType === "COUNT") {
9866
+ if (trackingType === "COUNT") {
9871
9867
  if (foundBadgeRule) {
9872
9868
  return `${i18n_default.t("total_login_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_login_count_text_2")}`;
9873
9869
  } else {
@@ -9877,25 +9873,25 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9877
9873
  }
9878
9874
  } else {
9879
9875
  if (sourceType === "ACTIVITY") {
9880
- if (badgeType === "COUNT") {
9876
+ if (trackingType === "COUNT") {
9881
9877
  if (foundBadgeRule) {
9882
9878
  return `${i18n_default.t("coterie_activity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_count_text_2")}`;
9883
9879
  } else {
9884
9880
  return i18n_default.t("none_activity_count_text");
9885
9881
  }
9886
- } else if (badgeType === "CORRECT") {
9882
+ } else if (trackingType === "CORRECT") {
9887
9883
  if (foundBadgeRule) {
9888
9884
  return `${i18n_default.t("coterie_activity_correct_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_correct_text_2")}`;
9889
9885
  } else {
9890
9886
  return i18n_default.t("none_activity_correct_text");
9891
9887
  }
9892
- } else if (badgeType === "REVIEW") {
9888
+ } else if (trackingType === "REVIEW") {
9893
9889
  if (foundBadgeRule) {
9894
9890
  return `${i18n_default.t("coterie_activity_review_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_review_text_2")}`;
9895
9891
  } else {
9896
9892
  return i18n_default.t("none_activity_review_text");
9897
9893
  }
9898
- } else if (badgeType === "TIME_SPENT") {
9894
+ } else if (trackingType === "TIME_SPENT") {
9899
9895
  if (foundBadgeRule) {
9900
9896
  return `${i18n_default.t("coterie_activity_time_spent_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_time_spent_text_2")}`;
9901
9897
  } else {
@@ -9903,7 +9899,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9903
9899
  }
9904
9900
  }
9905
9901
  } else if (sourceType === "CATCHTIVITY") {
9906
- if (badgeType === "COUNT") {
9902
+ if (trackingType === "COUNT") {
9907
9903
  if (foundBadgeRule) {
9908
9904
  return `${i18n_default.t("coterie_catchtivity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_catchtivity_count_text_2")}`;
9909
9905
  } else {
@@ -9911,7 +9907,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9911
9907
  }
9912
9908
  }
9913
9909
  } else if (sourceType === "CATCHXAM") {
9914
- if (badgeType === "COUNT") {
9910
+ if (trackingType === "COUNT") {
9915
9911
  if (foundBadgeRule) {
9916
9912
  return `${i18n_default.t("coterie_catchxam_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_catchxam_count_text_2")}`;
9917
9913
  } else {
@@ -9919,7 +9915,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9919
9915
  }
9920
9916
  }
9921
9917
  } else if (sourceType === "ETUDE") {
9922
- if (badgeType === "COUNT") {
9918
+ if (trackingType === "COUNT") {
9923
9919
  if (foundBadgeRule) {
9924
9920
  return `${i18n_default.t("coterie_etude_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_etude_count_text_2")}`;
9925
9921
  } else {
@@ -9927,7 +9923,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9927
9923
  }
9928
9924
  }
9929
9925
  } else if (sourceType === "CONTEST") {
9930
- if (badgeType === "COUNT") {
9926
+ if (trackingType === "COUNT") {
9931
9927
  if (foundBadgeRule) {
9932
9928
  return `${i18n_default.t("coterie_contest_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_contest_count_text_2")}`;
9933
9929
  } else {
package/dist/index.mjs CHANGED
@@ -150,7 +150,7 @@ var TimedProgressBar_default = TimedProgressBar;
150
150
 
151
151
  // src/components/bars/ScoreBar.tsx
152
152
  import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
153
- var ScoreBar = ({ score, className }) => {
153
+ var ScoreBar = ({ score, className, size }) => {
154
154
  const getProgressBarColor = (score2) => {
155
155
  if (score2 >= 70) return "bg-catchup-green";
156
156
  if (score2 >= 30) return "bg-catchup-orange";
@@ -162,15 +162,21 @@ var ScoreBar = ({ score, className }) => {
162
162
  return "text-catchup-red";
163
163
  };
164
164
  return /* @__PURE__ */ jsxs2("div", { className: `flex items-center gap-2 ${className}`, children: [
165
- /* @__PURE__ */ jsx3("div", { className: "flex-1 h-5 bg-catchup-gray-100 rounded-catchup-full overflow-hidden", children: /* @__PURE__ */ jsx3(
165
+ /* @__PURE__ */ jsx3(
166
166
  "div",
167
167
  {
168
- className: `h-full rounded-catchup-full transition-all duration-300 ${getProgressBarColor(
169
- score
170
- )}`,
171
- style: { width: `${score}%` }
168
+ className: `flex-1 ${size === "large" ? "h-7" : size === "medium" ? "h-5" : size === "small" ? "h-3" : "h-5"} bg-catchup-gray-100 rounded-catchup-full overflow-hidden`,
169
+ children: /* @__PURE__ */ jsx3(
170
+ "div",
171
+ {
172
+ className: `h-full rounded-catchup-full transition-all duration-300 ${getProgressBarColor(
173
+ score
174
+ )}`,
175
+ style: { width: `${score}%` }
176
+ }
177
+ )
172
178
  }
173
- ) }),
179
+ ),
174
180
  /* @__PURE__ */ jsxs2(
175
181
  "span",
176
182
  {
@@ -4769,7 +4775,7 @@ var FillInTheBlanksActivityMaterialContent = ({
4769
4775
  component: contentMap.type === "TEXT" ? /* @__PURE__ */ jsx30(
4770
4776
  "div",
4771
4777
  {
4772
- className: "border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer",
4778
+ className: "border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer",
4773
4779
  onMouseDown: () => {
4774
4780
  setSelectedOption(option);
4775
4781
  setPasteOptionIndex(null);
@@ -4778,7 +4784,7 @@ var FillInTheBlanksActivityMaterialContent = ({
4778
4784
  InputWithSpecialExpression_default,
4779
4785
  {
4780
4786
  value: option,
4781
- showSpecialOnly: true
4787
+ showSpecialOnly: false
4782
4788
  }
4783
4789
  ) })
4784
4790
  }
@@ -4840,7 +4846,7 @@ var FillInTheBlanksActivityMaterialContent = ({
4840
4846
  InputWithSpecialExpression_default,
4841
4847
  {
4842
4848
  value: answerMap[materialKey],
4843
- showSpecialOnly: true
4849
+ showSpecialOnly: false
4844
4850
  }
4845
4851
  ) : /* @__PURE__ */ jsx30("p", { className: "text-gray-400 italic" })
4846
4852
  }
@@ -5152,7 +5158,7 @@ var GroupingActivityMaterialContent = ({
5152
5158
  }) }),
5153
5159
  /* @__PURE__ */ jsx32(DividerLine_default, {})
5154
5160
  ] }) : null,
5155
- /* @__PURE__ */ jsx32("div", { className: "overflow-y-auto max-h-[600px]", children: Object.keys(answerMap).map((answerMapKey, index) => /* @__PURE__ */ jsxs19("div", { className: "flex flex-row w-full", children: [
5161
+ /* @__PURE__ */ jsx32("div", { className: "overflow-y-auto max-h-[500px]", children: Object.keys(answerMap).map((answerMapKey, index) => /* @__PURE__ */ jsxs19("div", { className: "flex flex-row w-full", children: [
5156
5162
  /* @__PURE__ */ jsx32("div", { className: "w-1/3", children: /* @__PURE__ */ jsx32(
5157
5163
  "div",
5158
5164
  {
@@ -5445,7 +5451,7 @@ var MatchingActivityMaterialContent = ({
5445
5451
  ),
5446
5452
  /* @__PURE__ */ jsx34("div", { className: "flex-shrink-0", children: /* @__PURE__ */ jsx34(DividerLine_default, {}) })
5447
5453
  ] }) : null,
5448
- /* @__PURE__ */ jsx34("div", { className: "overflow-y-auto max-h-[600px]", children: Object.keys(answerMap).map((answerMapKey, index) => {
5454
+ /* @__PURE__ */ jsx34("div", { className: "overflow-y-auto max-h-[500px]", children: Object.keys(answerMap).map((answerMapKey, index) => {
5449
5455
  const learnerAnswerState = checkAnswerState(
5450
5456
  materialMap[answerMapKey],
5451
5457
  answerMap[answerMapKey]
@@ -9229,10 +9235,6 @@ var retrieveSourceTypeOptionList = (coterieOnly) => {
9229
9235
  value: "CATCHXAM",
9230
9236
  text: i18n_default.t("CATCHXAM")
9231
9237
  },
9232
- // {
9233
- // value: "STANDARD_EXAM",
9234
- // text: i18n.t("STANDARD_EXAM"),
9235
- // },
9236
9238
  {
9237
9239
  value: "ETUDE",
9238
9240
  text: i18n_default.t("ETUDE")
@@ -9244,6 +9246,18 @@ var retrieveSourceTypeOptionList = (coterieOnly) => {
9244
9246
  {
9245
9247
  value: "ACTIVITY",
9246
9248
  text: i18n_default.t("ACTIVITY")
9249
+ },
9250
+ {
9251
+ value: "ACTIVITY_CORRECT",
9252
+ text: i18n_default.t("ACTIVITY_CORRECT")
9253
+ },
9254
+ {
9255
+ value: "ACTIVITY_REVIEW",
9256
+ text: i18n_default.t("ACTIVITY_REVIEW")
9257
+ },
9258
+ {
9259
+ value: "ACTIVITY_TIME_SPENT",
9260
+ text: i18n_default.t("ACTIVITY_TIME_SPENT")
9247
9261
  }
9248
9262
  ];
9249
9263
  if (!coterieOnly) {
@@ -9254,28 +9268,14 @@ var retrieveSourceTypeOptionList = (coterieOnly) => {
9254
9268
  }
9255
9269
  return currentSourceTypeOptionList;
9256
9270
  };
9257
- var retrieveBadgeTypeOptionList = (isActivity) => {
9258
- const currentBadgeTypeOptionList = [
9271
+ var retrieveTrackingTypeOptionList = () => {
9272
+ const currentTrackingTypeOptionList = [
9259
9273
  {
9260
9274
  value: "COUNT",
9261
9275
  text: i18n_default.t("COUNT")
9262
9276
  }
9263
9277
  ];
9264
- if (isActivity) {
9265
- currentBadgeTypeOptionList.push({
9266
- value: "CORRECT",
9267
- text: i18n_default.t("CORRECT")
9268
- });
9269
- currentBadgeTypeOptionList.push({
9270
- value: "REVIEW",
9271
- text: i18n_default.t("REVIEW")
9272
- });
9273
- currentBadgeTypeOptionList.push({
9274
- value: "TIME_SPENT",
9275
- text: i18n_default.t("TIME_SPENT")
9276
- });
9277
- }
9278
- return currentBadgeTypeOptionList;
9278
+ return currentTrackingTypeOptionList;
9279
9279
  };
9280
9280
  var retrieveOtherBadgeDTOList = () => {
9281
9281
  const badgeList = [];
@@ -9285,15 +9285,13 @@ var retrieveOtherBadgeDTOList = () => {
9285
9285
  );
9286
9286
  for (let i = 1; i <= 5; i++) {
9287
9287
  for (const sourceTypeOption of filteredSourceTypeOptionList) {
9288
- const badgeTypeOptionList = retrieveBadgeTypeOptionList(
9289
- sourceTypeOption.value === "ACTIVITY"
9290
- );
9291
- for (const badgeTypeOption of badgeTypeOptionList) {
9288
+ const trackingTypeOptionList = retrieveTrackingTypeOptionList();
9289
+ for (const trackingTypeOption of trackingTypeOptionList) {
9292
9290
  badgeList.push({
9293
9291
  badgeDTO: {
9294
9292
  coterieType: "MANAGEMENT",
9295
9293
  sourceType: sourceTypeOption.value,
9296
- badgeType: badgeTypeOption.value
9294
+ trackingType: trackingTypeOption.value
9297
9295
  },
9298
9296
  level: i
9299
9297
  });
@@ -9314,15 +9312,13 @@ var retrieveAllEarnedBadgeDTOListByCoterieType = (coterieType) => {
9314
9312
  const badgeList = [];
9315
9313
  for (let i = 1; i <= 5; i++) {
9316
9314
  for (const sourceTypeOption of sourceTypeOptionList) {
9317
- const badgeTypeOptionList = retrieveBadgeTypeOptionList(
9318
- sourceTypeOption.value === "ACTIVITY"
9319
- );
9320
- for (const badgeTypeOption of badgeTypeOptionList) {
9315
+ const trackingTypeOptionList = retrieveTrackingTypeOptionList();
9316
+ for (const trackingTypeOption of trackingTypeOptionList) {
9321
9317
  badgeList.push({
9322
9318
  badgeDTO: {
9323
9319
  coterieType,
9324
9320
  sourceType: sourceTypeOption.value,
9325
- badgeType: badgeTypeOption.value
9321
+ trackingType: trackingTypeOption.value
9326
9322
  },
9327
9323
  level: i
9328
9324
  });
@@ -9333,13 +9329,13 @@ var retrieveAllEarnedBadgeDTOListByCoterieType = (coterieType) => {
9333
9329
  if (a.badgeDTO.sourceType !== b.badgeDTO.sourceType) {
9334
9330
  return a.badgeDTO.sourceType.localeCompare(b.badgeDTO.sourceType);
9335
9331
  }
9336
- return a.badgeDTO.badgeType.localeCompare(b.badgeDTO.badgeType);
9332
+ return a.badgeDTO.trackingType.localeCompare(b.badgeDTO.trackingType);
9337
9333
  });
9338
9334
  };
9339
- var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9335
+ var retrieveBadgeRuleListByParams = (coterieType, sourceType, trackingType) => {
9340
9336
  if (coterieType === "MANAGEMENT") {
9341
9337
  if (sourceType === "ACTIVITY") {
9342
- if (badgeType === "COUNT") {
9338
+ if (trackingType === "COUNT") {
9343
9339
  return [
9344
9340
  {
9345
9341
  level: 1,
@@ -9362,7 +9358,7 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9362
9358
  value: 5e3
9363
9359
  }
9364
9360
  ];
9365
- } else if (badgeType === "TIME_SPENT") {
9361
+ } else if (trackingType === "TIME_SPENT") {
9366
9362
  return [
9367
9363
  {
9368
9364
  level: 1,
@@ -9433,7 +9429,7 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9433
9429
  }
9434
9430
  ];
9435
9431
  } else {
9436
- if (badgeType === "COUNT") {
9432
+ if (trackingType === "COUNT") {
9437
9433
  return [
9438
9434
  {
9439
9435
  level: 1,
@@ -9483,7 +9479,7 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9483
9479
  }
9484
9480
  } else {
9485
9481
  if (sourceType === "ACTIVITY") {
9486
- if (badgeType === "COUNT") {
9482
+ if (trackingType === "COUNT") {
9487
9483
  return [
9488
9484
  {
9489
9485
  level: 1,
@@ -9506,7 +9502,7 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9506
9502
  value: 1e3
9507
9503
  }
9508
9504
  ];
9509
- } else if (badgeType === "TIME_SPENT") {
9505
+ } else if (trackingType === "TIME_SPENT") {
9510
9506
  return [
9511
9507
  {
9512
9508
  level: 1,
@@ -9556,7 +9552,7 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9556
9552
  } else if (sourceType === "LOGIN") {
9557
9553
  return [];
9558
9554
  } else {
9559
- if (badgeType === "COUNT") {
9555
+ if (trackingType === "COUNT") {
9560
9556
  return [
9561
9557
  {
9562
9558
  level: 1,
@@ -9584,34 +9580,34 @@ var retrieveBadgeRuleListByParams = (coterieType, sourceType, badgeType) => {
9584
9580
  }
9585
9581
  return [];
9586
9582
  };
9587
- var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level) => {
9583
+ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, trackingType, level) => {
9588
9584
  const badgeRuleList = retrieveBadgeRuleListByParams(
9589
9585
  coterieType,
9590
9586
  sourceType,
9591
- badgeType
9587
+ trackingType
9592
9588
  );
9593
9589
  const foundBadgeRule = badgeRuleList[level - 1];
9594
9590
  if (coterieType === "MANAGEMENT") {
9595
9591
  if (sourceType === "ACTIVITY") {
9596
- if (badgeType === "COUNT") {
9592
+ if (trackingType === "COUNT") {
9597
9593
  if (foundBadgeRule) {
9598
9594
  return `${i18n_default.t("total_activity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_count_text_2")}`;
9599
9595
  } else {
9600
9596
  return i18n_default.t("none_activity_count_text");
9601
9597
  }
9602
- } else if (badgeType === "CORRECT") {
9598
+ } else if (trackingType === "CORRECT") {
9603
9599
  if (foundBadgeRule) {
9604
9600
  return `${i18n_default.t("total_activity_correct_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_correct_text_2")}`;
9605
9601
  } else {
9606
9602
  return i18n_default.t("none_activity_correct_text");
9607
9603
  }
9608
- } else if (badgeType === "REVIEW") {
9604
+ } else if (trackingType === "REVIEW") {
9609
9605
  if (foundBadgeRule) {
9610
9606
  return `${i18n_default.t("total_activity_review_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_review_text_2")}`;
9611
9607
  } else {
9612
9608
  return i18n_default.t("none_activity_review_text");
9613
9609
  }
9614
- } else if (badgeType === "TIME_SPENT") {
9610
+ } else if (trackingType === "TIME_SPENT") {
9615
9611
  if (foundBadgeRule) {
9616
9612
  return `${i18n_default.t("total_activity_time_spent_text_1")}${foundBadgeRule.value}${i18n_default.t("total_activity_time_spent_text_2")}`;
9617
9613
  } else {
@@ -9619,7 +9615,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9619
9615
  }
9620
9616
  }
9621
9617
  } else if (sourceType === "CATCHTIVITY") {
9622
- if (badgeType === "COUNT") {
9618
+ if (trackingType === "COUNT") {
9623
9619
  if (foundBadgeRule) {
9624
9620
  return `${i18n_default.t("total_catchtivity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_catchtivity_count_text_2")}`;
9625
9621
  } else {
@@ -9627,7 +9623,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9627
9623
  }
9628
9624
  }
9629
9625
  } else if (sourceType === "CATCHXAM") {
9630
- if (badgeType === "COUNT") {
9626
+ if (trackingType === "COUNT") {
9631
9627
  if (foundBadgeRule) {
9632
9628
  return `${i18n_default.t("total_catchxam_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_catchxam_count_text_2")}`;
9633
9629
  } else {
@@ -9635,7 +9631,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9635
9631
  }
9636
9632
  }
9637
9633
  } else if (sourceType === "ETUDE") {
9638
- if (badgeType === "COUNT") {
9634
+ if (trackingType === "COUNT") {
9639
9635
  if (foundBadgeRule) {
9640
9636
  return `${i18n_default.t("total_etude_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_etude_count_text_2")}`;
9641
9637
  } else {
@@ -9643,7 +9639,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9643
9639
  }
9644
9640
  }
9645
9641
  } else if (sourceType === "CONTEST") {
9646
- if (badgeType === "COUNT") {
9642
+ if (trackingType === "COUNT") {
9647
9643
  if (foundBadgeRule) {
9648
9644
  return `${i18n_default.t("total_contest_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_contest_count_text_2")}`;
9649
9645
  } else {
@@ -9651,7 +9647,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9651
9647
  }
9652
9648
  }
9653
9649
  } else if (sourceType === "LOGIN") {
9654
- if (badgeType === "COUNT") {
9650
+ if (trackingType === "COUNT") {
9655
9651
  if (foundBadgeRule) {
9656
9652
  return `${i18n_default.t("total_login_count_text_1")}${foundBadgeRule.value}${i18n_default.t("total_login_count_text_2")}`;
9657
9653
  } else {
@@ -9661,25 +9657,25 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9661
9657
  }
9662
9658
  } else {
9663
9659
  if (sourceType === "ACTIVITY") {
9664
- if (badgeType === "COUNT") {
9660
+ if (trackingType === "COUNT") {
9665
9661
  if (foundBadgeRule) {
9666
9662
  return `${i18n_default.t("coterie_activity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_count_text_2")}`;
9667
9663
  } else {
9668
9664
  return i18n_default.t("none_activity_count_text");
9669
9665
  }
9670
- } else if (badgeType === "CORRECT") {
9666
+ } else if (trackingType === "CORRECT") {
9671
9667
  if (foundBadgeRule) {
9672
9668
  return `${i18n_default.t("coterie_activity_correct_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_correct_text_2")}`;
9673
9669
  } else {
9674
9670
  return i18n_default.t("none_activity_correct_text");
9675
9671
  }
9676
- } else if (badgeType === "REVIEW") {
9672
+ } else if (trackingType === "REVIEW") {
9677
9673
  if (foundBadgeRule) {
9678
9674
  return `${i18n_default.t("coterie_activity_review_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_review_text_2")}`;
9679
9675
  } else {
9680
9676
  return i18n_default.t("none_activity_review_text");
9681
9677
  }
9682
- } else if (badgeType === "TIME_SPENT") {
9678
+ } else if (trackingType === "TIME_SPENT") {
9683
9679
  if (foundBadgeRule) {
9684
9680
  return `${i18n_default.t("coterie_activity_time_spent_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_activity_time_spent_text_2")}`;
9685
9681
  } else {
@@ -9687,7 +9683,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9687
9683
  }
9688
9684
  }
9689
9685
  } else if (sourceType === "CATCHTIVITY") {
9690
- if (badgeType === "COUNT") {
9686
+ if (trackingType === "COUNT") {
9691
9687
  if (foundBadgeRule) {
9692
9688
  return `${i18n_default.t("coterie_catchtivity_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_catchtivity_count_text_2")}`;
9693
9689
  } else {
@@ -9695,7 +9691,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9695
9691
  }
9696
9692
  }
9697
9693
  } else if (sourceType === "CATCHXAM") {
9698
- if (badgeType === "COUNT") {
9694
+ if (trackingType === "COUNT") {
9699
9695
  if (foundBadgeRule) {
9700
9696
  return `${i18n_default.t("coterie_catchxam_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_catchxam_count_text_2")}`;
9701
9697
  } else {
@@ -9703,7 +9699,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9703
9699
  }
9704
9700
  }
9705
9701
  } else if (sourceType === "ETUDE") {
9706
- if (badgeType === "COUNT") {
9702
+ if (trackingType === "COUNT") {
9707
9703
  if (foundBadgeRule) {
9708
9704
  return `${i18n_default.t("coterie_etude_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_etude_count_text_2")}`;
9709
9705
  } else {
@@ -9711,7 +9707,7 @@ var retrieveBadgeRuleTextByParams = (coterieType, sourceType, badgeType, level)
9711
9707
  }
9712
9708
  }
9713
9709
  } else if (sourceType === "CONTEST") {
9714
- if (badgeType === "COUNT") {
9710
+ if (trackingType === "COUNT") {
9715
9711
  if (foundBadgeRule) {
9716
9712
  return `${i18n_default.t("coterie_contest_count_text_1")}${foundBadgeRule.value}${i18n_default.t("coterie_contest_count_text_2")}`;
9717
9713
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "catchup-library-web",
3
- "version": "1.20.16",
3
+ "version": "1.20.18",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -112,7 +112,7 @@ const FillInTheBlanksActivityMaterialContent = ({
112
112
  component={
113
113
  contentMap.type === "TEXT" ? (
114
114
  <div
115
- className="border-catchup-blue border-2 px-2 py-1 rounded-catchup-xlarge cursor-pointer"
115
+ className="border-catchup-blue border-2 px-2 rounded-catchup-xlarge cursor-pointer"
116
116
  onMouseDown={() => {
117
117
  setSelectedOption(option);
118
118
  setPasteOptionIndex(null);
@@ -121,7 +121,7 @@ const FillInTheBlanksActivityMaterialContent = ({
121
121
  <p className="italic whitespace-pre-wrap">
122
122
  <InputWithSpecialExpression
123
123
  value={option}
124
- showSpecialOnly={true}
124
+ showSpecialOnly={false}
125
125
  />
126
126
  </p>
127
127
  </div>
@@ -177,18 +177,6 @@ const FillInTheBlanksActivityMaterialContent = ({
177
177
  contentMap.type === "TEXT" ? (
178
178
  <div className="relative">
179
179
  <div className="flex-1">
180
- {/* <InputGroup
181
- type="textarea"
182
- value={answerMap[materialKey]}
183
- useMinHeight={false}
184
- onChange={(e) => {
185
- onChange(
186
- answer,
187
- materialKey,
188
- e.target.value
189
- );
190
- }}
191
- /> */}
192
180
  <div
193
181
  className={`w-full min-h-[44px] border rounded-lg ${
194
182
  answerMap[materialKey]
@@ -204,7 +192,7 @@ const FillInTheBlanksActivityMaterialContent = ({
204
192
  {answerMap[materialKey] ? (
205
193
  <InputWithSpecialExpression
206
194
  value={answerMap[materialKey]}
207
- showSpecialOnly={true}
195
+ showSpecialOnly={false}
208
196
  />
209
197
  ) : (
210
198
  <p className="text-gray-400 italic"></p>
@@ -190,7 +190,7 @@ const GroupingActivityMaterialContent = ({
190
190
  <DividerLine />
191
191
  </>
192
192
  ) : null}
193
- <div className="overflow-y-auto max-h-[600px]">
193
+ <div className="overflow-y-auto max-h-[500px]">
194
194
  {Object.keys(answerMap).map((answerMapKey, index) => (
195
195
  <div key={index} className="flex flex-row w-full">
196
196
  <div className="w-1/3">
@@ -198,7 +198,7 @@ const MatchingActivityMaterialContent = ({
198
198
  </>
199
199
  ) : null}
200
200
 
201
- <div className="overflow-y-auto max-h-[600px]">
201
+ <div className="overflow-y-auto max-h-[500px]">
202
202
  {Object.keys(answerMap).map((answerMapKey, index) => {
203
203
  const learnerAnswerState = checkAnswerState(
204
204
  materialMap[answerMapKey],
@@ -1,6 +1,6 @@
1
1
  import { IScoreBarProperties } from "../../properties/BarProperties";
2
2
 
3
- const ScoreBar = ({ score, className }: IScoreBarProperties) => {
3
+ const ScoreBar = ({ score, className, size }: IScoreBarProperties) => {
4
4
  const getProgressBarColor = (score: number) => {
5
5
  if (score >= 70) return "bg-catchup-green";
6
6
  if (score >= 30) return "bg-catchup-orange";
@@ -15,7 +15,17 @@ const ScoreBar = ({ score, className }: IScoreBarProperties) => {
15
15
 
16
16
  return (
17
17
  <div className={`flex items-center gap-2 ${className}`}>
18
- <div className="flex-1 h-5 bg-catchup-gray-100 rounded-catchup-full overflow-hidden">
18
+ <div
19
+ className={`flex-1 ${
20
+ size === "large"
21
+ ? "h-7"
22
+ : size === "medium"
23
+ ? "h-5"
24
+ : size === "small"
25
+ ? "h-3"
26
+ : "h-5"
27
+ } bg-catchup-gray-100 rounded-catchup-full overflow-hidden`}
28
+ >
19
29
  <div
20
30
  className={`h-full rounded-catchup-full transition-all duration-300 ${getProgressBarColor(
21
31
  score
@@ -20,4 +20,5 @@ export interface ITimedProgressBarProperties {
20
20
  export interface IScoreBarProperties {
21
21
  score: number;
22
22
  className?: string;
23
+ size?: string;
23
24
  }
@@ -10,10 +10,6 @@ const retrieveSourceTypeOptionList = (coterieOnly: boolean) => {
10
10
  value: "CATCHXAM",
11
11
  text: i18n.t("CATCHXAM"),
12
12
  },
13
- // {
14
- // value: "STANDARD_EXAM",
15
- // text: i18n.t("STANDARD_EXAM"),
16
- // },
17
13
  {
18
14
  value: "ETUDE",
19
15
  text: i18n.t("ETUDE"),
@@ -26,6 +22,18 @@ const retrieveSourceTypeOptionList = (coterieOnly: boolean) => {
26
22
  value: "ACTIVITY",
27
23
  text: i18n.t("ACTIVITY"),
28
24
  },
25
+ {
26
+ value: "ACTIVITY_CORRECT",
27
+ text: i18n.t("ACTIVITY_CORRECT"),
28
+ },
29
+ {
30
+ value: "ACTIVITY_REVIEW",
31
+ text: i18n.t("ACTIVITY_REVIEW"),
32
+ },
33
+ {
34
+ value: "ACTIVITY_TIME_SPENT",
35
+ text: i18n.t("ACTIVITY_TIME_SPENT"),
36
+ },
29
37
  ];
30
38
  if (!coterieOnly) {
31
39
  currentSourceTypeOptionList.push({
@@ -36,32 +44,14 @@ const retrieveSourceTypeOptionList = (coterieOnly: boolean) => {
36
44
  return currentSourceTypeOptionList;
37
45
  };
38
46
 
39
- const retrieveBadgeTypeOptionList = (isActivity: boolean) => {
40
- const currentBadgeTypeOptionList = [
47
+ const retrieveTrackingTypeOptionList = () => {
48
+ const currentTrackingTypeOptionList = [
41
49
  {
42
50
  value: "COUNT",
43
51
  text: i18n.t("COUNT"),
44
52
  },
45
53
  ];
46
- if (isActivity) {
47
- currentBadgeTypeOptionList.push({
48
- value: "CORRECT",
49
- text: i18n.t("CORRECT"),
50
- });
51
- // currentBadgeTypeOptionList.push({
52
- // value: "INCORRECT",
53
- // text: i18n.t("INCORRECT"),
54
- // });
55
- currentBadgeTypeOptionList.push({
56
- value: "REVIEW",
57
- text: i18n.t("REVIEW"),
58
- });
59
- currentBadgeTypeOptionList.push({
60
- value: "TIME_SPENT",
61
- text: i18n.t("TIME_SPENT"),
62
- });
63
- }
64
- return currentBadgeTypeOptionList;
54
+ return currentTrackingTypeOptionList;
65
55
  };
66
56
 
67
57
  export const retrieveOtherBadgeDTOList = () => {
@@ -72,15 +62,13 @@ export const retrieveOtherBadgeDTOList = () => {
72
62
  );
73
63
  for (let i = 1; i <= 5; i++) {
74
64
  for (const sourceTypeOption of filteredSourceTypeOptionList) {
75
- const badgeTypeOptionList = retrieveBadgeTypeOptionList(
76
- sourceTypeOption.value === "ACTIVITY"
77
- );
78
- for (const badgeTypeOption of badgeTypeOptionList) {
65
+ const trackingTypeOptionList = retrieveTrackingTypeOptionList();
66
+ for (const trackingTypeOption of trackingTypeOptionList) {
79
67
  badgeList.push({
80
68
  badgeDTO: {
81
69
  coterieType: "MANAGEMENT",
82
70
  sourceType: sourceTypeOption.value,
83
- badgeType: badgeTypeOption.value,
71
+ trackingType: trackingTypeOption.value,
84
72
  },
85
73
  level: i,
86
74
  });
@@ -107,15 +95,13 @@ export const retrieveAllEarnedBadgeDTOListByCoterieType = (
107
95
  const badgeList = [];
108
96
  for (let i = 1; i <= 5; i++) {
109
97
  for (const sourceTypeOption of sourceTypeOptionList) {
110
- const badgeTypeOptionList = retrieveBadgeTypeOptionList(
111
- sourceTypeOption.value === "ACTIVITY"
112
- );
113
- for (const badgeTypeOption of badgeTypeOptionList) {
98
+ const trackingTypeOptionList = retrieveTrackingTypeOptionList();
99
+ for (const trackingTypeOption of trackingTypeOptionList) {
114
100
  badgeList.push({
115
101
  badgeDTO: {
116
102
  coterieType,
117
103
  sourceType: sourceTypeOption.value,
118
- badgeType: badgeTypeOption.value,
104
+ trackingType: trackingTypeOption.value,
119
105
  },
120
106
  level: i,
121
107
  });
@@ -126,18 +112,18 @@ export const retrieveAllEarnedBadgeDTOListByCoterieType = (
126
112
  if (a.badgeDTO.sourceType !== b.badgeDTO.sourceType) {
127
113
  return a.badgeDTO.sourceType.localeCompare(b.badgeDTO.sourceType);
128
114
  }
129
- return a.badgeDTO.badgeType.localeCompare(b.badgeDTO.badgeType);
115
+ return a.badgeDTO.trackingType.localeCompare(b.badgeDTO.trackingType);
130
116
  });
131
117
  };
132
118
 
133
119
  export const retrieveBadgeRuleListByParams = (
134
120
  coterieType: string,
135
121
  sourceType: string,
136
- badgeType: string
122
+ trackingType: string
137
123
  ) => {
138
124
  if (coterieType === "MANAGEMENT") {
139
125
  if (sourceType === "ACTIVITY") {
140
- if (badgeType === "COUNT") {
126
+ if (trackingType === "COUNT") {
141
127
  return [
142
128
  {
143
129
  level: 1,
@@ -160,7 +146,7 @@ export const retrieveBadgeRuleListByParams = (
160
146
  value: 5000,
161
147
  },
162
148
  ];
163
- } else if (badgeType === "TIME_SPENT") {
149
+ } else if (trackingType === "TIME_SPENT") {
164
150
  return [
165
151
  {
166
152
  level: 1,
@@ -231,7 +217,7 @@ export const retrieveBadgeRuleListByParams = (
231
217
  },
232
218
  ];
233
219
  } else {
234
- if (badgeType === "COUNT") {
220
+ if (trackingType === "COUNT") {
235
221
  return [
236
222
  {
237
223
  level: 1,
@@ -281,7 +267,7 @@ export const retrieveBadgeRuleListByParams = (
281
267
  }
282
268
  } else {
283
269
  if (sourceType === "ACTIVITY") {
284
- if (badgeType === "COUNT") {
270
+ if (trackingType === "COUNT") {
285
271
  return [
286
272
  {
287
273
  level: 1,
@@ -304,7 +290,7 @@ export const retrieveBadgeRuleListByParams = (
304
290
  value: 1000,
305
291
  },
306
292
  ];
307
- } else if (badgeType === "TIME_SPENT") {
293
+ } else if (trackingType === "TIME_SPENT") {
308
294
  return [
309
295
  {
310
296
  level: 1,
@@ -354,7 +340,7 @@ export const retrieveBadgeRuleListByParams = (
354
340
  } else if (sourceType === "LOGIN") {
355
341
  return [];
356
342
  } else {
357
- if (badgeType === "COUNT") {
343
+ if (trackingType === "COUNT") {
358
344
  return [
359
345
  {
360
346
  level: 1,
@@ -386,19 +372,19 @@ export const retrieveBadgeRuleListByParams = (
386
372
  export const retrieveBadgeRuleTextByParams = (
387
373
  coterieType: string,
388
374
  sourceType: string,
389
- badgeType: string,
375
+ trackingType: string,
390
376
  level: number
391
377
  ) => {
392
378
  const badgeRuleList = retrieveBadgeRuleListByParams(
393
379
  coterieType,
394
380
  sourceType,
395
- badgeType
381
+ trackingType
396
382
  );
397
383
  const foundBadgeRule = badgeRuleList[level - 1];
398
384
 
399
385
  if (coterieType === "MANAGEMENT") {
400
386
  if (sourceType === "ACTIVITY") {
401
- if (badgeType === "COUNT") {
387
+ if (trackingType === "COUNT") {
402
388
  if (foundBadgeRule) {
403
389
  return `${i18n.t("total_activity_count_text_1")}${
404
390
  foundBadgeRule.value
@@ -406,7 +392,7 @@ export const retrieveBadgeRuleTextByParams = (
406
392
  } else {
407
393
  return i18n.t("none_activity_count_text");
408
394
  }
409
- } else if (badgeType === "CORRECT") {
395
+ } else if (trackingType === "CORRECT") {
410
396
  if (foundBadgeRule) {
411
397
  return `${i18n.t("total_activity_correct_text_1")}${
412
398
  foundBadgeRule.value
@@ -414,7 +400,7 @@ export const retrieveBadgeRuleTextByParams = (
414
400
  } else {
415
401
  return i18n.t("none_activity_correct_text");
416
402
  }
417
- } else if (badgeType === "REVIEW") {
403
+ } else if (trackingType === "REVIEW") {
418
404
  if (foundBadgeRule) {
419
405
  return `${i18n.t("total_activity_review_text_1")}${
420
406
  foundBadgeRule.value
@@ -422,7 +408,7 @@ export const retrieveBadgeRuleTextByParams = (
422
408
  } else {
423
409
  return i18n.t("none_activity_review_text");
424
410
  }
425
- } else if (badgeType === "TIME_SPENT") {
411
+ } else if (trackingType === "TIME_SPENT") {
426
412
  if (foundBadgeRule) {
427
413
  return `${i18n.t("total_activity_time_spent_text_1")}${
428
414
  foundBadgeRule.value
@@ -432,7 +418,7 @@ export const retrieveBadgeRuleTextByParams = (
432
418
  }
433
419
  }
434
420
  } else if (sourceType === "CATCHTIVITY") {
435
- if (badgeType === "COUNT") {
421
+ if (trackingType === "COUNT") {
436
422
  if (foundBadgeRule) {
437
423
  return `${i18n.t("total_catchtivity_count_text_1")}${
438
424
  foundBadgeRule.value
@@ -442,7 +428,7 @@ export const retrieveBadgeRuleTextByParams = (
442
428
  }
443
429
  }
444
430
  } else if (sourceType === "CATCHXAM") {
445
- if (badgeType === "COUNT") {
431
+ if (trackingType === "COUNT") {
446
432
  if (foundBadgeRule) {
447
433
  return `${i18n.t("total_catchxam_count_text_1")}${
448
434
  foundBadgeRule.value
@@ -452,7 +438,7 @@ export const retrieveBadgeRuleTextByParams = (
452
438
  }
453
439
  }
454
440
  } else if (sourceType === "ETUDE") {
455
- if (badgeType === "COUNT") {
441
+ if (trackingType === "COUNT") {
456
442
  if (foundBadgeRule) {
457
443
  return `${i18n.t("total_etude_count_text_1")}${
458
444
  foundBadgeRule.value
@@ -462,7 +448,7 @@ export const retrieveBadgeRuleTextByParams = (
462
448
  }
463
449
  }
464
450
  } else if (sourceType === "CONTEST") {
465
- if (badgeType === "COUNT") {
451
+ if (trackingType === "COUNT") {
466
452
  if (foundBadgeRule) {
467
453
  return `${i18n.t("total_contest_count_text_1")}${
468
454
  foundBadgeRule.value
@@ -472,7 +458,7 @@ export const retrieveBadgeRuleTextByParams = (
472
458
  }
473
459
  }
474
460
  } else if (sourceType === "LOGIN") {
475
- if (badgeType === "COUNT") {
461
+ if (trackingType === "COUNT") {
476
462
  if (foundBadgeRule) {
477
463
  return `${i18n.t("total_login_count_text_1")}${
478
464
  foundBadgeRule.value
@@ -484,7 +470,7 @@ export const retrieveBadgeRuleTextByParams = (
484
470
  }
485
471
  } else {
486
472
  if (sourceType === "ACTIVITY") {
487
- if (badgeType === "COUNT") {
473
+ if (trackingType === "COUNT") {
488
474
  if (foundBadgeRule) {
489
475
  return `${i18n.t("coterie_activity_count_text_1")}${
490
476
  foundBadgeRule.value
@@ -492,7 +478,7 @@ export const retrieveBadgeRuleTextByParams = (
492
478
  } else {
493
479
  return i18n.t("none_activity_count_text");
494
480
  }
495
- } else if (badgeType === "CORRECT") {
481
+ } else if (trackingType === "CORRECT") {
496
482
  if (foundBadgeRule) {
497
483
  return `${i18n.t("coterie_activity_correct_text_1")}${
498
484
  foundBadgeRule.value
@@ -500,7 +486,7 @@ export const retrieveBadgeRuleTextByParams = (
500
486
  } else {
501
487
  return i18n.t("none_activity_correct_text");
502
488
  }
503
- } else if (badgeType === "REVIEW") {
489
+ } else if (trackingType === "REVIEW") {
504
490
  if (foundBadgeRule) {
505
491
  return `${i18n.t("coterie_activity_review_text_1")}${
506
492
  foundBadgeRule.value
@@ -508,7 +494,7 @@ export const retrieveBadgeRuleTextByParams = (
508
494
  } else {
509
495
  return i18n.t("none_activity_review_text");
510
496
  }
511
- } else if (badgeType === "TIME_SPENT") {
497
+ } else if (trackingType === "TIME_SPENT") {
512
498
  if (foundBadgeRule) {
513
499
  return `${i18n.t("coterie_activity_time_spent_text_1")}${
514
500
  foundBadgeRule.value
@@ -518,7 +504,7 @@ export const retrieveBadgeRuleTextByParams = (
518
504
  }
519
505
  }
520
506
  } else if (sourceType === "CATCHTIVITY") {
521
- if (badgeType === "COUNT") {
507
+ if (trackingType === "COUNT") {
522
508
  if (foundBadgeRule) {
523
509
  return `${i18n.t("coterie_catchtivity_count_text_1")}${
524
510
  foundBadgeRule.value
@@ -528,7 +514,7 @@ export const retrieveBadgeRuleTextByParams = (
528
514
  }
529
515
  }
530
516
  } else if (sourceType === "CATCHXAM") {
531
- if (badgeType === "COUNT") {
517
+ if (trackingType === "COUNT") {
532
518
  if (foundBadgeRule) {
533
519
  return `${i18n.t("coterie_catchxam_count_text_1")}${
534
520
  foundBadgeRule.value
@@ -538,7 +524,7 @@ export const retrieveBadgeRuleTextByParams = (
538
524
  }
539
525
  }
540
526
  } else if (sourceType === "ETUDE") {
541
- if (badgeType === "COUNT") {
527
+ if (trackingType === "COUNT") {
542
528
  if (foundBadgeRule) {
543
529
  return `${i18n.t("coterie_etude_count_text_1")}${
544
530
  foundBadgeRule.value
@@ -548,7 +534,7 @@ export const retrieveBadgeRuleTextByParams = (
548
534
  }
549
535
  }
550
536
  } else if (sourceType === "CONTEST") {
551
- if (badgeType === "COUNT") {
537
+ if (trackingType === "COUNT") {
552
538
  if (foundBadgeRule) {
553
539
  return `${i18n.t("coterie_contest_count_text_1")}${
554
540
  foundBadgeRule.value