@dotss/tictoccroc 0.0.0 → 0.0.2

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.
Files changed (159) hide show
  1. package/dist/LessonNotesSection-a2QNdQtj.js +196 -0
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.mjs +109 -52
  4. package/dist/shared/components/Calendar/Calendar.d.ts +3 -2
  5. package/dist/shared/components/Calendar/Calendar.mjs +1 -1
  6. package/dist/shared/components/Carousel/Carousel.d.ts +1 -1
  7. package/dist/shared/components/Carousel/Carousel.mjs +13 -13
  8. package/dist/shared/components/Carousel/CarouselSlide/CarouselSlide.d.ts +1 -1
  9. package/dist/shared/components/Carousel/CarouselSlide/CarouselSlide.mjs +1 -1
  10. package/dist/shared/components/Image/Image.d.ts +1 -1
  11. package/dist/shared/components/Image/Image.mjs +94 -93
  12. package/dist/shared/components/ImageZoomDialog/ImageBlock/ImageBlock.mjs +12 -26
  13. package/dist/shared/components/ImageZoomDialog/ImageZoomDialog.mjs +77 -98
  14. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogContent/ImageZoomDialogContent.mjs +4 -4
  15. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogFooter/ImageZoomDialogFooter.mjs +4 -4
  16. package/dist/shared/components/ImageZoomDialog/ImageZoomDialogToolbar/ImageZoomDialogToolbar.mjs +1 -1
  17. package/dist/shared/components/LoadingAnnouncer/LoadingAnnouncer.d.ts +7 -0
  18. package/dist/shared/components/LoadingAnnouncer/LoadingAnnouncer.mjs +19 -0
  19. package/dist/shared/components/LoadingAnnouncer/index.d.ts +3 -0
  20. package/dist/shared/components/LoadingAnnouncer/index.mjs +4 -0
  21. package/dist/shared/components/Masonry/Masonry.d.ts +12 -0
  22. package/dist/shared/components/Masonry/Masonry.mjs +220 -0
  23. package/dist/shared/components/Masonry/Masonry.utils.d.ts +7 -0
  24. package/dist/shared/components/Masonry/Masonry.utils.mjs +76 -0
  25. package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.d.ts +11 -0
  26. package/dist/shared/components/Masonry/MasonryBlock/MasonryBlock.mjs +77 -0
  27. package/dist/shared/components/Masonry/MasonryBlock/index.d.ts +3 -0
  28. package/dist/shared/components/Masonry/MasonryBlock/index.mjs +4 -0
  29. package/dist/shared/components/Masonry/index.d.ts +4 -0
  30. package/dist/shared/components/Masonry/index.mjs +6 -0
  31. package/dist/shared/components/Roller/Roller.d.ts +1 -2
  32. package/dist/shared/components/Roller/Roller.mjs +7 -120
  33. package/dist/shared/components/Roller/RollerBlock/RollerBlock.d.ts +1 -1
  34. package/dist/shared/components/Roller/RollerBlock/RollerBlock.mjs +1 -1
  35. package/dist/shared/components/Roller/index.mjs +3 -3
  36. package/dist/shared/components/Scheduler/ScheduleBlock/ScheduleBlock.d.ts +2 -5
  37. package/dist/shared/components/Scheduler/ScheduleBlock/ScheduleBlock.mjs +1 -1
  38. package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.d.ts +1 -1
  39. package/dist/shared/components/Scheduler/ScheduleEvent/ScheduleEvent.mjs +2 -2
  40. package/dist/shared/components/Scheduler/Scheduler.d.ts +4 -4
  41. package/dist/shared/components/Scheduler/Scheduler.mjs +167 -178
  42. package/dist/shared/components/Swiper/Swiper.d.ts +1 -1
  43. package/dist/shared/components/Swiper/Swiper.mjs +77 -97
  44. package/dist/shared/components/Swiper/SwiperBlock/SwiperBlock.d.ts +1 -1
  45. package/dist/shared/components/Swiper/SwiperBlock/SwiperBlock.mjs +1 -1
  46. package/dist/shared/components/TimePicker/TimePicker.d.ts +2 -2
  47. package/dist/shared/components/TimePicker/TimePicker.mjs +1 -1
  48. package/dist/shared/components/index.d.ts +14 -1
  49. package/dist/shared/components/index.mjs +40 -28
  50. package/dist/shared/utils/birthDateToAge/birthDateToAge.test.mjs +9 -10
  51. package/dist/shared/utils/getDateRange/getDateRange.d.ts +1 -1
  52. package/dist/shared/utils/getDateRange/getDateRange.test.mjs +27 -28
  53. package/dist/shared/utils/getImageUrl/getImageUrl.test.mjs +19 -20
  54. package/dist/shared/utils/getTimeRange/getTimeRange.test.mjs +22 -23
  55. package/dist/shared/utils/getVimeoId/getVimeoId.test.mjs +11 -12
  56. package/dist/shared/utils/index.d.ts +1 -0
  57. package/dist/shared/utils/index.mjs +6 -4
  58. package/dist/shared/utils/isAndroid/isAndroid.test.mjs +9 -10
  59. package/dist/shared/utils/isApp/isApp.test.mjs +14 -15
  60. package/dist/shared/utils/isDesktop/isDesktop.test.mjs +8 -9
  61. package/dist/shared/utils/isServer/isServer.test.mjs +10 -11
  62. package/dist/shared/utils/objectToQueryString/objectToQueryString.test.mjs +7 -7
  63. package/dist/shared/utils/parseQueryString/parseQueryString.test.mjs +10 -11
  64. package/dist/shared/utils/share/index.d.ts +2 -0
  65. package/dist/shared/utils/share/index.mjs +4 -0
  66. package/dist/shared/utils/share/share.d.ts +9 -0
  67. package/dist/shared/utils/share/share.mjs +15 -0
  68. package/dist/shared/utils/share/share.test.d.ts +1 -0
  69. package/dist/shared/utils/share/share.test.mjs +31 -0
  70. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.d.ts +15 -0
  71. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/AbilityBadge.mjs +441 -0
  72. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/index.d.ts +3 -0
  73. package/dist/teacher/profile/components/AbilityCollection/AbilityBadge/index.mjs +5 -0
  74. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.d.ts +6 -0
  75. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.mjs +111 -0
  76. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.utils.d.ts +6 -0
  77. package/dist/teacher/profile/components/AbilityCollection/AbilityCollection.utils.mjs +43 -0
  78. package/dist/teacher/profile/components/AbilityCollection/index.d.ts +5 -0
  79. package/dist/teacher/profile/components/AbilityCollection/index.mjs +8 -0
  80. package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.d.ts +11 -0
  81. package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +101 -0
  82. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.d.ts +8 -0
  83. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +124 -0
  84. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/index.d.ts +3 -0
  85. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/index.mjs +4 -0
  86. package/dist/teacher/profile/components/ActivityGallery/index.d.ts +4 -0
  87. package/dist/teacher/profile/components/ActivityGallery/index.mjs +6 -0
  88. package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.d.ts +22 -0
  89. package/dist/teacher/profile/components/AvailableScheduleSection/AvailableScheduleSection.mjs +179 -0
  90. package/dist/teacher/profile/components/AvailableScheduleSection/index.d.ts +3 -0
  91. package/dist/teacher/profile/components/AvailableScheduleSection/index.mjs +4 -0
  92. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.d.ts +10 -0
  93. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +136 -0
  94. package/dist/teacher/profile/components/CareerSection/CareerItem/index.d.ts +3 -0
  95. package/dist/teacher/profile/components/CareerSection/CareerItem/index.mjs +4 -0
  96. package/dist/teacher/profile/components/CareerSection/CareerSection.d.ts +9 -0
  97. package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +185 -0
  98. package/dist/teacher/profile/components/CareerSection/index.d.ts +4 -0
  99. package/dist/teacher/profile/components/CareerSection/index.mjs +6 -0
  100. package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.d.ts +8 -0
  101. package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.mjs +91 -0
  102. package/dist/teacher/profile/components/CertificationSection/CertificationItem/index.d.ts +3 -0
  103. package/dist/teacher/profile/components/CertificationSection/CertificationItem/index.mjs +4 -0
  104. package/dist/teacher/profile/components/CertificationSection/CertificationSection.d.ts +9 -0
  105. package/dist/teacher/profile/components/CertificationSection/CertificationSection.mjs +152 -0
  106. package/dist/teacher/profile/components/CertificationSection/index.d.ts +4 -0
  107. package/dist/teacher/profile/components/CertificationSection/index.mjs +6 -0
  108. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.d.ts +9 -0
  109. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +105 -0
  110. package/dist/teacher/profile/components/EducationSection/EducationItem/index.d.ts +3 -0
  111. package/dist/teacher/profile/components/EducationSection/EducationItem/index.mjs +4 -0
  112. package/dist/teacher/profile/components/EducationSection/EducationSection.d.ts +9 -0
  113. package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +152 -0
  114. package/dist/teacher/profile/components/EducationSection/index.d.ts +4 -0
  115. package/dist/teacher/profile/components/EducationSection/index.mjs +6 -0
  116. package/dist/teacher/profile/components/LessonNotesSection/LessonNote/LessonNote.d.ts +9 -0
  117. package/dist/teacher/profile/components/LessonNotesSection/LessonNote/LessonNote.mjs +54 -0
  118. package/dist/teacher/profile/components/LessonNotesSection/LessonNote/index.d.ts +3 -0
  119. package/dist/teacher/profile/components/LessonNotesSection/LessonNote/index.mjs +4 -0
  120. package/dist/teacher/profile/components/LessonNotesSection/LessonNotesSection.d.ts +7 -0
  121. package/dist/teacher/profile/components/LessonNotesSection/LessonNotesSection.mjs +8 -0
  122. package/dist/teacher/profile/components/LessonNotesSection/LessonNotesSection.utils.d.ts +4 -0
  123. package/dist/teacher/profile/components/LessonNotesSection/LessonNotesSection.utils.mjs +13 -0
  124. package/dist/teacher/profile/components/LessonNotesSection/index.d.ts +4 -0
  125. package/dist/teacher/profile/components/LessonNotesSection/index.mjs +6 -0
  126. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.d.ts +10 -0
  127. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/ParentReviewCard.mjs +103 -0
  128. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/index.d.ts +3 -0
  129. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewCard/index.mjs +4 -0
  130. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.d.ts +7 -0
  131. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +79 -0
  132. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.d.ts +4 -0
  133. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.utils.mjs +13 -0
  134. package/dist/teacher/profile/components/ParentReviewSection/index.d.ts +4 -0
  135. package/dist/teacher/profile/components/ParentReviewSection/index.mjs +6 -0
  136. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.d.ts +9 -0
  137. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/PreferredActivityKeywordGroup.mjs +37 -0
  138. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/index.d.ts +3 -0
  139. package/dist/teacher/profile/components/PreferredActivityKeywordGroup/index.mjs +4 -0
  140. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.d.ts +8 -0
  141. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.mjs +32 -0
  142. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.d.ts +18 -0
  143. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +14 -0
  144. package/dist/teacher/profile/components/PreferredAgeGroup/index.d.ts +4 -0
  145. package/dist/teacher/profile/components/PreferredAgeGroup/index.mjs +6 -0
  146. package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.d.ts +25 -1
  147. package/dist/teacher/profile/components/ProfileSummary/ProfileSummary.mjs +413 -5
  148. package/dist/teacher/profile/components/ProfileSummary/index.d.ts +2 -1
  149. package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.d.ts +7 -0
  150. package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/StatBadge.mjs +105 -0
  151. package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/index.d.ts +3 -0
  152. package/dist/teacher/profile/components/StatBadgeCollection/StatBadge/index.mjs +4 -0
  153. package/dist/teacher/profile/components/StatBadgeCollection/StatBadgeCollection.d.ts +6 -0
  154. package/dist/teacher/profile/components/StatBadgeCollection/StatBadgeCollection.mjs +28 -0
  155. package/dist/teacher/profile/components/StatBadgeCollection/index.d.ts +4 -0
  156. package/dist/teacher/profile/components/StatBadgeCollection/index.mjs +6 -0
  157. package/dist/teacher/profile/components/index.d.ts +24 -0
  158. package/dist/teacher/profile/components/index.mjs +46 -0
  159. package/package.json +2 -2
@@ -1,9 +1,8 @@
1
- import { describe as t, test as u, expect as l } from "vitest";
2
1
  import e from "./getTimeRange.mjs";
3
- t("getTimeRange", () => {
4
- u("시작 시간과 종료 시간 사이의 시간을 배열로 반환한다.", () => {
5
- const a = e(5.5, 10.5);
6
- l(a).toEqual([
2
+ describe("getTimeRange", () => {
3
+ test("시작 시간과 종료 시간 사이의 시간을 배열로 반환한다.", () => {
4
+ const l = e(5.5, 10.5);
5
+ expect(l).toEqual([
7
6
  { label: "05:30", value: 5.5 },
8
7
  { label: "06:00", value: 6 },
9
8
  { label: "06:30", value: 6.5 },
@@ -16,18 +15,18 @@ t("getTimeRange", () => {
16
15
  { label: "10:00", value: 10 },
17
16
  { label: "10:30", value: 10.5 }
18
17
  ]);
19
- }), u("시작 시간이 종료 시간보다 크면 빈 배열을 반환한다.", () => {
20
- l(e(10.5, 5.5)).toEqual([]);
21
- }), u("음수 시간이 포함되면 빈 배열을 반환한다.", () => {
22
- l(e(-1, 5.5)).toEqual([]), l(e(5.5, -1)).toEqual([]);
23
- }), u("step이 0 이하면 빈 배열을 반환한다.", () => {
24
- l(e(5.5, 10.5, { step: 0 })).toEqual([]), l(e(5.5, 10.5, { step: -0.5 })).toEqual([]);
25
- }), u("minTime과 maxTime을 적용할 수 있다.", () => {
26
- const a = e(5.5, 10.5, {
18
+ }), test("시작 시간이 종료 시간보다 크면 빈 배열을 반환한다.", () => {
19
+ expect(e(10.5, 5.5)).toEqual([]);
20
+ }), test("음수 시간이 포함되면 빈 배열을 반환한다.", () => {
21
+ expect(e(-1, 5.5)).toEqual([]), expect(e(5.5, -1)).toEqual([]);
22
+ }), test("step이 0 이하면 빈 배열을 반환한다.", () => {
23
+ expect(e(5.5, 10.5, { step: 0 })).toEqual([]), expect(e(5.5, 10.5, { step: -0.5 })).toEqual([]);
24
+ }), test("minTime과 maxTime을 적용할 수 있다.", () => {
25
+ const l = e(5.5, 10.5, {
27
26
  minTime: 6,
28
27
  maxTime: 9.5
29
28
  });
30
- l(a).toEqual([
29
+ expect(l).toEqual([
31
30
  { label: "06:00", value: 6 },
32
31
  { label: "06:30", value: 6.5 },
33
32
  { label: "07:00", value: 7 },
@@ -37,16 +36,16 @@ t("getTimeRange", () => {
37
36
  { label: "09:00", value: 9 },
38
37
  { label: "09:30", value: 9.5 }
39
38
  ]);
40
- }), u("step을 조정할 수 있다.", () => {
41
- const a = e(5.5, 7.5, { step: 1 });
42
- l(a).toEqual([
39
+ }), test("step을 조정할 수 있다.", () => {
40
+ const l = e(5.5, 7.5, { step: 1 });
41
+ expect(l).toEqual([
43
42
  { label: "05:30", value: 5.5 },
44
43
  { label: "06:30", value: 6.5 },
45
44
  { label: "07:30", value: 7.5 }
46
45
  ]);
47
- }), u("pairs 옵션을 사용하면 연속된 시간 쌍을 반환한다.", () => {
48
- const a = e(8.5, 9.5, { pairs: !0 });
49
- l(a).toEqual([
46
+ }), test("pairs 옵션을 사용하면 연속된 시간 쌍을 반환한다.", () => {
47
+ const l = e(8.5, 9.5, { pairs: !0 });
48
+ expect(l).toEqual([
50
49
  { label: "08:30", value: 8.5 },
51
50
  // 첫 번째 쌍의 시작 시간
52
51
  { label: "09:00", value: 9 },
@@ -56,13 +55,13 @@ t("getTimeRange", () => {
56
55
  { label: "09:30", value: 9.5 }
57
56
  // 두 번째 쌍의 종료 시간
58
57
  ]);
59
- }), u("pairs 옵션과 다른 옵션을 함께 사용할 수 있다.", () => {
60
- const a = e(8.5, 10.5, {
58
+ }), test("pairs 옵션과 다른 옵션을 함께 사용할 수 있다.", () => {
59
+ const l = e(8.5, 10.5, {
61
60
  pairs: !0,
62
61
  minTime: 9,
63
62
  maxTime: 10
64
63
  });
65
- l(a).toEqual([
64
+ expect(l).toEqual([
66
65
  { label: "09:00", value: 9 },
67
66
  // 첫 번째 쌍의 시작 시간
68
67
  { label: "09:30", value: 9.5 },
@@ -1,15 +1,14 @@
1
- import { describe as c, expect as o } from "vitest";
2
1
  import e from "./getVimeoId.mjs";
3
- c("getVimeoId", (t) => {
4
- t("유효한 Vimeo URL에서 ID를 추출한다.", () => {
5
- o(e("https://vimeo.com/123456789")).toBe(123456789);
6
- }), t("URL이 비어있으면 0을 반환한다.", () => {
7
- o(e("")).toBe(0);
8
- }), t("Vimeo URL이 아니면 0을 반환한다.", () => {
9
- o(e("https://youtube.com/watch?v=abcdef")).toBe(0);
10
- }), t("ID가 포함되지 않은 Vimeo URL이면 0을 반환한다.", () => {
11
- o(e("https://vimeo.com/")).toBe(0);
12
- }), t("올바르지 않은 URL 형식이면 0을 반환한다.", () => {
13
- o(e("")).toBe(0), o(e(void 0)).toBe(0), o(e("parent.tictoccroc.com")).toBe(0), o(e("parent.tictoccroc.com///")).toBe(0), o(e("tictocisland")).toBe(0);
2
+ describe("getVimeoId", (o) => {
3
+ o("유효한 Vimeo URL에서 ID를 추출한다.", () => {
4
+ expect(e("https://vimeo.com/123456789")).toBe(123456789);
5
+ }), o("URL이 비어있으면 0을 반환한다.", () => {
6
+ expect(e("")).toBe(0);
7
+ }), o("Vimeo URL이 아니면 0을 반환한다.", () => {
8
+ expect(e("https://youtube.com/watch?v=abcdef")).toBe(0);
9
+ }), o("ID가 포함되지 않은 Vimeo URL이면 0을 반환한다.", () => {
10
+ expect(e("https://vimeo.com/")).toBe(0);
11
+ }), o("올바르지 않은 URL 형식이면 0을 반환한다.", () => {
12
+ expect(e("")).toBe(0), expect(e(void 0)).toBe(0), expect(e("parent.tictoccroc.com")).toBe(0), expect(e("parent.tictoccroc.com///")).toBe(0), expect(e("tictocisland")).toBe(0);
14
13
  });
15
14
  });
@@ -9,3 +9,4 @@ export { default as birthDateToAge } from './birthDateToAge';
9
9
  export { default as objectToQueryString } from './objectToQueryString';
10
10
  export { default as getVimeoId } from './getVimeoId';
11
11
  export { default as parseQueryString } from './parseQueryString';
12
+ export { default as share } from './share';
@@ -1,4 +1,4 @@
1
- import { default as r } from "./getImageUrl/getImageUrl.mjs";
1
+ import { default as t } from "./getImageUrl/getImageUrl.mjs";
2
2
  import { default as o } from "./isServer/isServer.mjs";
3
3
  import { default as s } from "./getTimeRange/getTimeRange.mjs";
4
4
  import { default as d } from "./getDateRange/getDateRange.mjs";
@@ -8,11 +8,12 @@ import { default as i } from "./isDesktop/isDesktop.mjs";
8
8
  import { default as A } from "./birthDateToAge/birthDateToAge.mjs";
9
9
  import { default as S } from "./objectToQueryString/objectToQueryString.mjs";
10
10
  import { default as b } from "./getVimeoId/getVimeoId.mjs";
11
- import { default as I } from "./parseQueryString/parseQueryString.mjs";
11
+ import { default as y } from "./parseQueryString/parseQueryString.mjs";
12
+ import { default as Q } from "./share/share.mjs";
12
13
  export {
13
14
  A as birthDateToAge,
14
15
  d as getDateRange,
15
- r as getImageUrl,
16
+ t as getImageUrl,
16
17
  s as getTimeRange,
17
18
  b as getVimeoId,
18
19
  u as isAndroid,
@@ -20,5 +21,6 @@ export {
20
21
  i as isDesktop,
21
22
  o as isServer,
22
23
  S as objectToQueryString,
23
- I as parseQueryString
24
+ y as parseQueryString,
25
+ Q as share
24
26
  };
@@ -1,13 +1,12 @@
1
- import { describe as t, afterEach as l, vi as e, test as i, expect as o } from "vitest";
2
- import r from "./isAndroid.mjs";
3
- t("isAndroid", () => {
4
- l(() => {
5
- e.restoreAllMocks();
6
- }), i("Android userAgent true를 반환한다.", () => {
7
- e.stubGlobal("navigator", { userAgent: "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36" }), o(r()).toBe(!0);
8
- }), i("Android가 아닌 userAgent일 때 false를 반환한다.", () => {
9
- e.stubGlobal("navigator", {
1
+ import e from "./isAndroid.mjs";
2
+ describe("isAndroid", () => {
3
+ afterEach(() => {
4
+ vi.restoreAllMocks();
5
+ }), test("Android userAgent일 때 true를 반환한다.", () => {
6
+ vi.stubGlobal("navigator", { userAgent: "Mozilla/5.0 (Linux; Android 10) AppleWebKit/537.36" }), expect(e()).toBe(!0);
7
+ }), test("Android가 아닌 userAgent false를 반환한다.", () => {
8
+ vi.stubGlobal("navigator", {
10
9
  userAgent: "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0 like Mac OS X) AppleWebKit/537.36"
11
- }), o(r()).toBe(!1);
10
+ }), expect(e()).toBe(!1);
12
11
  });
13
12
  });
@@ -1,23 +1,22 @@
1
- import { describe as a, beforeEach as r, vi as e, afterEach as i, test as o, expect as t } from "vitest";
2
- import l from "./isApp.mjs";
3
- a("isApp", () => {
4
- r(() => {
5
- e.stubGlobal("document", {}), e.stubGlobal("window", {});
6
- }), i(() => {
7
- e.restoreAllMocks();
8
- }), o("웹 환경에서는 false를 반환한다.", () => {
9
- t(l()).toBe(!1);
10
- }), o("앱 환경에서는 true를 반환한다.", () => {
1
+ import e from "./isApp.mjs";
2
+ describe("isApp", () => {
3
+ beforeEach(() => {
4
+ vi.stubGlobal("document", {}), vi.stubGlobal("window", {});
5
+ }), afterEach(() => {
6
+ vi.restoreAllMocks();
7
+ }), test("웹 환경에서는 false를 반환한다.", () => {
8
+ expect(e()).toBe(!1);
9
+ }), test("앱 환경에서는 true를 반환한다.", () => {
11
10
  Object.defineProperty(window, "flutter_inappwebview", {
12
11
  value: {
13
12
  callHandler: () => {
14
13
  }
15
14
  },
16
15
  configurable: !0
17
- }), t(l()).toBe(!0);
18
- }), o("document가 존재하지 않으면 false를 반환한다.", () => {
19
- e.stubGlobal("document", void 0), t(l()).toBe(!1);
20
- }), o("window가 존재하지 않으면 false를 반환한다.", () => {
21
- e.stubGlobal("window", void 0), t(l()).toBe(!1);
16
+ }), expect(e()).toBe(!0);
17
+ }), test("document가 존재하지 않으면 false를 반환한다.", () => {
18
+ vi.stubGlobal("document", void 0), expect(e()).toBe(!1);
19
+ }), test("window가 존재하지 않으면 false를 반환한다.", () => {
20
+ vi.stubGlobal("window", void 0), expect(e()).toBe(!1);
22
21
  });
23
22
  });
@@ -1,11 +1,10 @@
1
- import { describe as r, afterEach as s, vi as e, expect as t } from "vitest";
2
- import o from "./isDesktop.mjs";
3
- r("isDesktop", (a) => {
4
- s(() => {
5
- e.restoreAllMocks();
6
- }), a("모바일 환경인 경우 false를 반환한다.", () => {
7
- e.stubGlobal("navigator", { userAgent: "android" }), t(o()).toBe(!1), e.stubGlobal("navigator", { userAgent: "iphone" }), t(o()).toBe(!1), e.stubGlobal("navigator", { userAgent: "ipad" }), t(o()).toBe(!1), e.stubGlobal("navigator", { userAgent: "mobile" }), t(o()).toBe(!1);
8
- }), a("데스크탑 환경인 경우 true를 반환한다.", () => {
9
- e.stubGlobal("navigator", { userAgent: "windows" }), t(o()).toBe(!0), e.stubGlobal("navigator", { userAgent: "mac" }), t(o()).toBe(!0), e.stubGlobal("navigator", { userAgent: "linux" }), t(o()).toBe(!0);
1
+ import e from "./isDesktop.mjs";
2
+ describe("isDesktop", (t) => {
3
+ afterEach(() => {
4
+ vi.restoreAllMocks();
5
+ }), t("모바일 환경인 경우 false를 반환한다.", () => {
6
+ vi.stubGlobal("navigator", { userAgent: "android" }), expect(e()).toBe(!1), vi.stubGlobal("navigator", { userAgent: "iphone" }), expect(e()).toBe(!1), vi.stubGlobal("navigator", { userAgent: "ipad" }), expect(e()).toBe(!1), vi.stubGlobal("navigator", { userAgent: "mobile" }), expect(e()).toBe(!1);
7
+ }), t("데스크탑 환경인 경우 true를 반환한다.", () => {
8
+ vi.stubGlobal("navigator", { userAgent: "windows" }), expect(e()).toBe(!0), vi.stubGlobal("navigator", { userAgent: "mac" }), expect(e()).toBe(!0), vi.stubGlobal("navigator", { userAgent: "linux" }), expect(e()).toBe(!0);
10
9
  });
11
10
  });
@@ -1,13 +1,12 @@
1
- import { describe as u, afterEach as i, vi as e, expect as r } from "vitest";
2
- import t from "./isServer.mjs";
3
- u("isServer", (o) => {
4
- i(() => {
5
- e.restoreAllMocks();
6
- }), o("document가 존재하면 false를 반환한다.", () => {
7
- e.stubGlobal("document", {}), r(t()).toBe(!1);
8
- }), o("document 존재하지 않으면 true를 반환한다.", () => {
9
- e.stubGlobal("document", void 0), r(t()).toBe(!0);
10
- }), o("window 존재하지 않으면 true를 반환한다.", () => {
11
- e.stubGlobal("window", void 0), r(t()).toBe(!0);
1
+ import o from "./isServer.mjs";
2
+ describe("isServer", (e) => {
3
+ afterEach(() => {
4
+ vi.restoreAllMocks();
5
+ }), e("document가 존재하면 false를 반환한다.", () => {
6
+ vi.stubGlobal("document", {}), expect(o()).toBe(!1);
7
+ }), e("document가 존재하지 않으면 true를 반환한다.", () => {
8
+ vi.stubGlobal("document", void 0), expect(o()).toBe(!0);
9
+ }), e("window가 존재하지 않으면 true를 반환한다.", () => {
10
+ vi.stubGlobal("window", void 0), expect(o()).toBe(!0);
12
11
  });
13
12
  });
@@ -1,11 +1,11 @@
1
- import { describe as r, expect as e } from "vitest";
2
- import t from "./objectToQueryString.mjs";
3
- r("convertObjectToQueryString", (o) => {
4
- o("object 타입이 들어왔을 query string으로 변환한다.", () => {
5
- e(t({ a: 1, b: !0, c: "test", d: void 0, e: null, f: { fa: 1 } })).toEqual(
1
+ import e from "./objectToQueryString.mjs";
2
+ describe("convertObjectToQueryString", (t) => {
3
+ t("object 타입이 들어왔을 때 query string으로 변환한다.", () => {
4
+ const c = { a: 1, b: !0, c: "test", d: void 0, e: null, f: { fa: 1 } };
5
+ expect(e(c)).toEqual(
6
6
  "?a=1&b=true&c=test&d=undefined&e=null&f=%5Bobject+Object%5D"
7
7
  );
8
- }), o("변환할 수 없는 타입이 들어온 경우 빈 문자열을 반환한다.", () => {
9
- e(t(null)).toEqual(""), e(t(void 0)).toEqual("");
8
+ }), t("변환할 수 없는 타입이 들어온 경우 빈 문자열을 반환한다.", () => {
9
+ expect(e(null)).toEqual(""), expect(e(void 0)).toEqual("");
10
10
  });
11
11
  });
@@ -1,16 +1,15 @@
1
- import { describe as l, expect as e } from "vitest";
2
- import a from "./parseQueryString.mjs";
3
- l("parseQueryStrings", (u) => {
4
- u("단일 키:값 쌍을 넘겼을 떄 Object를 리턴한다.", () => {
5
- e(a("key=value")).toEqual({ key: "value" });
6
- }), u("두 개 이상의 키:값 쌍을 넘겼을 때 Object를 리턴한다.", () => {
7
- e(a("key1=value1&key2=value2")).toEqual({
1
+ import e from "./parseQueryString.mjs";
2
+ describe("parseQueryStrings", (a) => {
3
+ a("단일 키:값 쌍을 넘겼을 떄 Object를 리턴한다.", () => {
4
+ expect(e("key=value")).toEqual({ key: "value" });
5
+ }), a(" 이상의 키:값 쌍을 넘겼을 때 Object를 리턴한다.", () => {
6
+ expect(e("key1=value1&key2=value2")).toEqual({
8
7
  key1: "value1",
9
8
  key2: "value2"
10
9
  });
11
- }), u("빈 값을 넘겼을 때 빈 Object를 리턴한다.", () => {
12
- e(a()).toEqual({}), e(a(void 0)).toEqual({}), e(a("")).toEqual({});
13
- }), u("유효하지 않은 값을 넘겼을 때에도 Object를 리턴한다.", () => {
14
- e(a("key=")).toEqual({ key: "" }), e(a("key")).toEqual({ key: "" }), e(a("=value")).toEqual({ "": "value" });
10
+ }), a("빈 값을 넘겼을 때 빈 Object를 리턴한다.", () => {
11
+ expect(e()).toEqual({}), expect(e(void 0)).toEqual({}), expect(e("")).toEqual({});
12
+ }), a("유효하지 않은 값을 넘겼을 때에도 Object를 리턴한다.", () => {
13
+ expect(e("key=")).toEqual({ key: "" }), expect(e("key")).toEqual({ key: "" }), expect(e("=value")).toEqual({ "": "value" });
15
14
  });
16
15
  });
@@ -0,0 +1,2 @@
1
+ import { default as share } from './share';
2
+ export default share;
@@ -0,0 +1,4 @@
1
+ import a from "./share.mjs";
2
+ export {
3
+ a as default
4
+ };
@@ -0,0 +1,9 @@
1
+ export default function share(data: {
2
+ title: string;
3
+ text: string;
4
+ url: string;
5
+ files?: File[];
6
+ }, { onSuccess, onError }?: {
7
+ onSuccess?: () => void;
8
+ onError?: () => void;
9
+ }): Promise<void> | undefined;
@@ -0,0 +1,15 @@
1
+ function a(n, { onSuccess: t, onError: e } = {}) {
2
+ if (window.navigator.canShare) {
3
+ if (!window.navigator.canShare(n)) {
4
+ typeof e == "function" && e();
5
+ return;
6
+ }
7
+ } else {
8
+ typeof e == "function" && e();
9
+ return;
10
+ }
11
+ return window.navigator.share(n).then(t).catch(e);
12
+ }
13
+ export {
14
+ a as default
15
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,31 @@
1
+ import o from "./share.mjs";
2
+ describe("share", () => {
3
+ const a = { title: "test", text: "test", url: "test" }, t = vi.fn(() => !0), e = vi.fn(() => !0), r = vi.fn(async () => !0).mockResolvedValue(!0);
4
+ afterEach(() => {
5
+ vi.restoreAllMocks();
6
+ }), test("navigator에 canShare가 없는 경우 onError를 호출한다.", () => {
7
+ vi.stubGlobal("window", { navigator: { share: r } }), o(a, { onError: e }), expect(e).toHaveBeenCalledTimes(1);
8
+ }), test("navigator.canShare가 false를 반환하는 경우 onError를 호출한다.", () => {
9
+ vi.stubGlobal("window", {
10
+ navigator: {
11
+ canShare: () => !1,
12
+ share: r
13
+ }
14
+ }), o(a, { onError: e }), expect(e).toHaveBeenCalledTimes(1);
15
+ }), test("navigator.canShare가 true를 반환하는 경우 navigator.share를 호출하고 onSuccess를 실행한다.", async () => {
16
+ vi.stubGlobal("window", {
17
+ navigator: {
18
+ canShare: () => !0,
19
+ share: r
20
+ }
21
+ }), await o(a, { onSuccess: t, onError: e }), expect(r).toHaveBeenCalledWith(a), expect(t).toHaveBeenCalledTimes(1), expect(e).not.toHaveBeenCalled();
22
+ }), test("navigator.share가 실패하면 onSucces를 호출하지 않는다.", async () => {
23
+ const n = vi.fn().mockRejectedValue(new Error("Share failed"));
24
+ vi.stubGlobal("window", {
25
+ navigator: {
26
+ canShare: () => !0,
27
+ share: n
28
+ }
29
+ }), await o(a, { onSuccess: t, onError: e }), expect(t).not.toHaveBeenCalled();
30
+ });
31
+ });
@@ -0,0 +1,15 @@
1
+ import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
+ export interface AbilityBadgeProps extends FlexboxProps {
3
+ name: string;
4
+ iconBasePath: string;
5
+ completed: boolean;
6
+ detail: {
7
+ open?: boolean;
8
+ label: string;
9
+ description: string;
10
+ onClose?: () => void;
11
+ onClickApply?: () => void;
12
+ };
13
+ }
14
+ declare function AbillityBadge({ name, iconBasePath, completed, detail: { open, label, description, onClose, onClickApply }, ...props }: AbilityBadgeProps): import("@emotion/react/jsx-runtime").JSX.Element;
15
+ export default AbillityBadge;