@dotss/tictoccroc 0.0.5 → 0.0.6

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 (19) hide show
  1. package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +23 -24
  2. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.d.ts +2 -2
  3. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +3 -3
  4. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.d.ts +5 -2
  5. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +24 -24
  6. package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +42 -41
  7. package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.d.ts +5 -2
  8. package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.mjs +27 -22
  9. package/dist/teacher/profile/components/CertificationSection/CertificationSection.mjs +41 -37
  10. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.d.ts +6 -3
  11. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +38 -30
  12. package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +35 -34
  13. package/dist/teacher/profile/utils/index.d.ts +1 -0
  14. package/dist/teacher/profile/utils/index.mjs +5 -0
  15. package/dist/teacher/profile/utils/sortItems/index.d.ts +3 -0
  16. package/dist/teacher/profile/utils/sortItems/index.mjs +6 -0
  17. package/dist/teacher/profile/utils/sortItems/sortItems.d.ts +9 -0
  18. package/dist/teacher/profile/utils/sortItems/sortItems.mjs +29 -0
  19. package/package.json +9 -1
@@ -1,28 +1,28 @@
1
- import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
- import { Children as p, isValidElement as S, cloneElement as j } from "react";
1
+ import { jsxs as y, jsx as e } from "react/jsx-runtime";
2
+ import { Children as s, isValidElement as S, cloneElement as j } from "react";
3
3
  import { Flexbox as a, Typography as E, Button as $, Icon as w } from "@dotss/ui";
4
4
  import A from "../../../../shared/components/Masonry/Masonry.mjs";
5
5
  import "../../../../shared/components/Masonry/MasonryBlock/MasonryBlock.mjs";
6
6
  import B from "./ActivityGalleryItem/ActivityGalleryItem.mjs";
7
7
  function T({
8
- children: c,
8
+ children: p,
9
9
  onClickViewAll: o,
10
10
  action: m,
11
11
  hideHeader: l = !1,
12
12
  masonryProps: {
13
- columnCount: f = 2,
14
- rowCount: g = 2,
15
- spacing: h = 2,
16
- edgeSpacing: b = 0,
17
- direction: u = "horizontal",
18
- defaultContainerWidth: v = 360,
13
+ columnCount: c = 2,
14
+ rowCount: f = 2,
15
+ spacing: g = 2,
16
+ edgeSpacing: h = 0,
17
+ direction: b = "horizontal",
18
+ defaultContainerWidth: u = 360,
19
19
  defaultContainerHeight: d = 0,
20
- ...x
20
+ ...v
21
21
  } = {},
22
22
  ...r
23
23
  }) {
24
- const n = p.toArray(c).filter(S).filter((t) => t.type === B), C = n.length > 0;
25
- return /* @__PURE__ */ s(
24
+ const n = s.toArray(p).filter(S).filter((t) => t.type === B), x = n.length > 0;
25
+ return /* @__PURE__ */ y(
26
26
  a,
27
27
  {
28
28
  tag: "section",
@@ -36,7 +36,7 @@ function T({
36
36
  ...r == null ? void 0 : r.inlineCSS
37
37
  },
38
38
  children: [
39
- !l && /* @__PURE__ */ s(a, { alignItems: "center", justifyContent: "space-between", gap: 2, children: [
39
+ !l && /* @__PURE__ */ y(a, { alignItems: "center", justifyContent: "space-between", gap: 2, children: [
40
40
  /* @__PURE__ */ e(
41
41
  E,
42
42
  {
@@ -59,27 +59,26 @@ function T({
59
59
  }
60
60
  )
61
61
  ] }),
62
- C && /* @__PURE__ */ e(
62
+ x && /* @__PURE__ */ e(
63
63
  A,
64
64
  {
65
- rowCount: g,
66
- columnCount: f,
67
- spacing: h,
68
- edgeSpacing: b,
69
- direction: u,
70
- defaultContainerWidth: v,
65
+ rowCount: f,
66
+ columnCount: c,
67
+ spacing: g,
68
+ edgeSpacing: h,
69
+ direction: b,
70
+ defaultContainerWidth: u,
71
71
  defaultContainerHeight: d,
72
72
  role: "group",
73
73
  "aria-label": "콘텐츠 목록",
74
- ...x,
75
- children: p.map(n, (t, y) => {
74
+ ...v,
75
+ children: s.map(n, (t, C) => {
76
76
  let i = t.props.type === "VIDEO" || t.props.type === "VIMEO" || t.props.type === "YOUTUBE" ? "동영상" : "사진";
77
77
  i = t.props.primary ? `대표 ${i}` : i;
78
- const I = `${i} (${n.length}개 중 ${y + 1}번째)`;
78
+ const I = `${i} (${n.length}개 중 ${C + 1}번째)`;
79
79
  return j(t, {
80
80
  role: "button",
81
81
  "aria-label": I,
82
- index: y,
83
82
  ...t.props
84
83
  });
85
84
  })
@@ -3,7 +3,7 @@ export interface ActivityGalleryItemProps extends MasonryBlockProps {
3
3
  type: 'VIDEO' | 'VIMEO' | 'YOUTUBE' | 'IMAGE';
4
4
  primary: boolean;
5
5
  status: 'VERIFIED' | 'PENDING' | 'REJECTED' | 'DELETED';
6
- index?: number;
6
+ id: string;
7
7
  }
8
- declare function ActivityGalleryItem({ children, type, primary, status, index, ...props }: ActivityGalleryItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ declare function ActivityGalleryItem({ children, type, primary, status, id, ...props }: ActivityGalleryItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
9
9
  export default ActivityGalleryItem;
@@ -2,12 +2,12 @@ import { jsxs as r, jsx as e, Fragment as c } from "react/jsx-runtime";
2
2
  import { Label as u, Flexbox as l, Icon as m, Typography as b } from "@dotss/ui";
3
3
  import h from "@dotss/ui/core/useTheme";
4
4
  import p from "../../../../../shared/components/Masonry/MasonryBlock/MasonryBlock.mjs";
5
- function x({
5
+ function g({
6
6
  children: n,
7
7
  type: i,
8
8
  primary: a = !1,
9
9
  status: s,
10
- index: o = 0,
10
+ id: o,
11
11
  ...t
12
12
  }) {
13
13
  const {
@@ -92,5 +92,5 @@ function x({
92
92
  );
93
93
  }
94
94
  export {
95
- x as default
95
+ g as default
96
96
  };
@@ -1,10 +1,13 @@
1
1
  import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
- export interface CareerItemProps extends FlexboxProps {
2
+ export interface CareerItemProps extends Omit<FlexboxProps, 'id'> {
3
3
  title: string;
4
4
  status: 'VERIFIED' | 'PENDING' | 'REJECTED' | 'DELETED';
5
5
  startDate: string;
6
6
  endDate: string | null;
7
7
  primary: boolean;
8
+ id: string | number;
9
+ regDatetime: string;
10
+ priority: number;
8
11
  }
9
- declare function CareerItem({ title, status, startDate, endDate, primary, ...props }: CareerItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
12
+ declare function CareerItem({ title, status, startDate, endDate, primary, id, ...props }: CareerItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
10
13
  export default CareerItem;
@@ -1,26 +1,26 @@
1
- import { jsx as i, jsxs as e, Fragment as d } from "react/jsx-runtime";
2
- import { useId as D } from "react";
3
- import { Flexbox as t, Label as j, Typography as g, Icon as h } from "@dotss/ui";
4
- import p from "@dotss/ui/core/useTheme";
1
+ import { jsx as i, jsxs as e, Fragment as g } from "react/jsx-runtime";
2
+ import { Flexbox as t, Label as D, Typography as h, Icon as d } from "@dotss/ui";
3
+ import j from "@dotss/ui/core/useTheme";
5
4
  import { useCheckHoverPossible as E } from "@dotss/ui/hooks";
6
5
  import s from "dayjs";
7
- function A({
6
+ function T({
8
7
  title: v,
9
8
  status: f,
10
9
  startDate: y,
11
10
  endDate: o,
12
11
  primary: x = !1,
12
+ id: b,
13
13
  ...n
14
14
  }) {
15
- const b = D(), { isHoverPossible: I } = E(), {
15
+ const { isHoverPossible: I } = E(), {
16
16
  palette: { grey: a },
17
17
  spacing: c
18
- } = p(), l = typeof n.onClick == "function", k = s(y), u = (o ? s(o) : s()).diff(k, "month"), m = Math.floor(u / 12), C = u % 12;
18
+ } = j(), r = typeof n.onClick == "function", k = s(y), u = (o ? s(o) : s()).diff(k, "month"), m = Math.floor(u / 12), C = u % 12;
19
19
  return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ e(
20
20
  t,
21
21
  {
22
22
  role: "button",
23
- tabIndex: l ? 0 : -1,
23
+ tabIndex: r ? 0 : -1,
24
24
  alignItems: "center",
25
25
  gap: 4,
26
26
  pt: 2,
@@ -29,20 +29,20 @@ function A({
29
29
  pr: 4,
30
30
  ml: -4,
31
31
  mr: -4,
32
- onKeyDown: (r) => {
32
+ onKeyDown: (l) => {
33
33
  var S;
34
- (r.key === "Enter" || r.key === " ") && (r.preventDefault(), r.currentTarget.click()), (S = n.onKeyDown) == null || S.call(n, r);
34
+ (l.key === "Enter" || l.key === " ") && (l.preventDefault(), l.currentTarget.click()), (S = n.onKeyDown) == null || S.call(n, l);
35
35
  },
36
36
  "aria-labelledby": `career-item-title-${b}`,
37
37
  ...n,
38
38
  inlineCSS: {
39
- cursor: l ? "pointer" : "default",
40
- ...l && {
39
+ cursor: r ? "pointer" : "default",
40
+ ...r && {
41
41
  "&:active": {
42
42
  backgroundColor: a[10]
43
43
  }
44
44
  },
45
- ...l && I ? {
45
+ ...r && I ? {
46
46
  "&:hover": {
47
47
  backgroundColor: a[10]
48
48
  }
@@ -53,7 +53,7 @@ function A({
53
53
  /* @__PURE__ */ e(t, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
54
54
  /* @__PURE__ */ e(t, { alignItems: "center", gap: 1, children: [
55
55
  x && /* @__PURE__ */ i(
56
- j,
56
+ D,
57
57
  {
58
58
  variant: "outlined",
59
59
  size: "small",
@@ -64,11 +64,11 @@ function A({
64
64
  children: "대표"
65
65
  }
66
66
  ),
67
- /* @__PURE__ */ e(g, { id: `career-item-title-${b}`, tag: "p", variant: "b2M", children: [
67
+ /* @__PURE__ */ e(h, { id: `career-item-title-${b}`, tag: "p", variant: "b2M", children: [
68
68
  v,
69
69
  f === "VERIFIED" && // TODO 아이콘 교체 필요
70
70
  /* @__PURE__ */ i(
71
- h,
71
+ d,
72
72
  {
73
73
  name: "InfoFill",
74
74
  size: "small",
@@ -82,7 +82,7 @@ function A({
82
82
  }
83
83
  ),
84
84
  f === "REJECTED" && /* @__PURE__ */ i(
85
- h,
85
+ d,
86
86
  {
87
87
  name: "AlertFill",
88
88
  size: "small",
@@ -97,7 +97,7 @@ function A({
97
97
  )
98
98
  ] })
99
99
  ] }),
100
- /* @__PURE__ */ e(g, { tag: "p", variant: "b5R", color: "grey.50", children: [
100
+ /* @__PURE__ */ e(h, { tag: "p", variant: "b5R", color: "grey.50", children: [
101
101
  y,
102
102
  " ~ ",
103
103
  o ?? "현재"
@@ -105,7 +105,7 @@ function A({
105
105
  ] }),
106
106
  /* @__PURE__ */ e(t, { alignItems: "center", gap: 2, children: [
107
107
  /* @__PURE__ */ e(
108
- g,
108
+ h,
109
109
  {
110
110
  tag: "p",
111
111
  variant: "h5R",
@@ -113,24 +113,24 @@ function A({
113
113
  noWrap: !0,
114
114
  inlineCSS: { "& strong": { color: a[100], fontWeight: 700 } },
115
115
  children: [
116
- m > 0 && /* @__PURE__ */ e(d, { children: [
116
+ m > 0 && /* @__PURE__ */ e(g, { children: [
117
117
  /* @__PURE__ */ i("strong", { children: m }),
118
118
  "년"
119
119
  ] }),
120
- C > 0 && /* @__PURE__ */ e(d, { children: [
121
- m > 0 && /* @__PURE__ */ i(d, { children: " " }),
120
+ C > 0 && /* @__PURE__ */ e(g, { children: [
121
+ m > 0 && /* @__PURE__ */ i(g, { children: " " }),
122
122
  /* @__PURE__ */ i("strong", { children: C }),
123
123
  "개월"
124
124
  ] })
125
125
  ]
126
126
  }
127
127
  ),
128
- /* @__PURE__ */ i(h, { name: "ChevronRightLine", size: "xSmall", color: "grey.50" })
128
+ r && /* @__PURE__ */ i(d, { name: "ChevronRightLine", size: "xSmall", color: "grey.50" })
129
129
  ] })
130
130
  ]
131
131
  }
132
132
  ) });
133
133
  }
134
134
  export {
135
- A as default
135
+ T as default
136
136
  };
@@ -1,18 +1,19 @@
1
- import { jsxs as i, jsx as t, Fragment as m } from "react/jsx-runtime";
2
- import { useState as u, Children as b, isValidElement as O } from "react";
3
- import { Flexbox as r, Typography as p, Tooltip as T, Icon as f, Button as Y } from "@dotss/ui";
4
- import A from "@dotss/ui/core/useTheme";
5
- import g from "dayjs";
6
- import M from "./CareerItem/CareerItem.mjs";
7
- function G({
8
- children: y,
9
- action: S,
10
- showTooltip: w = !1,
11
- enableToggle: C = !1,
1
+ import { jsxs as i, jsx as t, Fragment as p } from "react/jsx-runtime";
2
+ import { useState as x, Children as F, isValidElement as O } from "react";
3
+ import { Flexbox as r, Typography as f, Tooltip as Y, Icon as g, Button as M } from "@dotss/ui";
4
+ import T from "@dotss/ui/core/useTheme";
5
+ import S from "dayjs";
6
+ import W from "./CareerItem/CareerItem.mjs";
7
+ import { sortItemElements as z } from "../../utils/sortItems/sortItems.mjs";
8
+ function V({
9
+ children: u,
10
+ action: y,
11
+ showTooltip: I = !1,
12
+ enableToggle: s = !1,
12
13
  ...o
13
14
  }) {
14
- const { spacing: c } = A(), [I, v] = u(!1), [a, D] = u(!1), s = b.toArray(y).filter(O).filter((e) => e.type === M), j = s.length > 0, k = s.length > 3, x = s.map((e) => [e.props.startDate, e.props.endDate ?? g().format("YYYY-MM-DD")]).map(([e, n]) => [g(e), g(n)]).map(([e, n]) => n.diff(e, "month")), l = Math.floor(x.reduce((e, n) => e + n, 0) / 12), d = x.reduce((e, n) => e + n, 0) % 12, E = () => D((e) => !e), h = () => v((e) => !e), F = (e) => {
15
- (e.key === "Enter" || e.key === " ") && h();
15
+ const { spacing: d } = T(), [b, w] = x(!1), [a, v] = x(!1), l = F.toArray(u).filter(O).filter((e) => e.type === W), D = l.length > 0, j = l.length > 3, C = l.map((e) => [e.props.startDate, e.props.endDate ?? S().format("YYYY-MM-DD")]).map(([e, n]) => [S(e), S(n)]).map(([e, n]) => n.diff(e, "month")), c = Math.floor(C.reduce((e, n) => e + n, 0) / 12), h = C.reduce((e, n) => e + n, 0) % 12, k = () => v((e) => !e), m = () => w((e) => !e), E = (e) => {
16
+ (e.key === "Enter" || e.key === " ") && m();
16
17
  };
17
18
  return /* @__PURE__ */ i(
18
19
  r,
@@ -45,7 +46,7 @@ function G({
45
46
  inlineCSS: { position: "relative" },
46
47
  children: [
47
48
  /* @__PURE__ */ t(
48
- p,
49
+ f,
49
50
  {
50
51
  id: "career-section-title",
51
52
  tag: "h2",
@@ -54,17 +55,17 @@ function G({
54
55
  children: "경력"
55
56
  }
56
57
  ),
57
- w && /* @__PURE__ */ t(
58
- T,
58
+ I && /* @__PURE__ */ t(
59
+ Y,
59
60
  {
60
- open: I,
61
- onClose: h,
61
+ open: b,
62
+ onClose: m,
62
63
  color: "secondary",
63
64
  role: "tooltip",
64
65
  "aria-labelledby": "career-section-tooltip",
65
66
  "aria-describedby": "career-section-tooltip-desc",
66
67
  body: /* @__PURE__ */ i(
67
- p,
68
+ f,
68
69
  {
69
70
  id: "career-section-tooltip-desc",
70
71
  tag: "p",
@@ -73,7 +74,7 @@ function G({
73
74
  noWrap: !0,
74
75
  inlineCSS: {
75
76
  display: "flex",
76
- gap: c.content(1),
77
+ gap: d.content(1),
77
78
  "& svg": {
78
79
  width: "20px !important",
79
80
  height: "20px !important",
@@ -82,22 +83,22 @@ function G({
82
83
  },
83
84
  children: [
84
85
  "째깍악어가 확인한 정보는",
85
- /* @__PURE__ */ t(f, { name: "InfoFill", size: "small", color: "tictoccroc-teacher.brand.green" }),
86
+ /* @__PURE__ */ t(g, { name: "InfoFill", size: "small", color: "tictoccroc-teacher.brand.green" }),
86
87
  "인증 마크가 붙어요!"
87
88
  ]
88
89
  }
89
90
  ),
90
91
  inlineCSS: {
91
92
  "&:after": {
92
- transform: `translateX(-${100 + c.content(1)}px)`
93
+ transform: `translateX(-${100 + d.content(1)}px)`
93
94
  }
94
95
  },
95
96
  style: {
96
97
  top: -8,
97
- left: `calc(50% + 100px - ${c.content(0.5)}px)`
98
+ left: `calc(50% + 100px - ${d.content(0.5)}px)`
98
99
  },
99
100
  children: /* @__PURE__ */ t(
100
- f,
101
+ g,
101
102
  {
102
103
  id: "career-section-tooltip",
103
104
  role: "button",
@@ -105,8 +106,8 @@ function G({
105
106
  name: "TooltipFill",
106
107
  size: "small",
107
108
  color: "grey.50",
108
- onClick: h,
109
- onKeyDown: F,
109
+ onClick: m,
110
+ onKeyDown: E,
110
111
  "aria-label": "추가 정보 안내",
111
112
  inlineCSS: {
112
113
  cursor: "pointer"
@@ -118,32 +119,32 @@ function G({
118
119
  ]
119
120
  }
120
121
  ),
121
- (l > 0 || d > 0) && /* @__PURE__ */ i(p, { tag: "p", variant: "h4R", inlineCSS: { "& strong": { fontWeight: 700 } }, children: [
122
+ (c > 0 || h > 0) && /* @__PURE__ */ i(f, { tag: "p", variant: "h4R", inlineCSS: { "& strong": { fontWeight: 700 } }, children: [
122
123
  "총 ",
123
- l > 0 && /* @__PURE__ */ i(m, { children: [
124
- /* @__PURE__ */ t("strong", { children: l }),
124
+ c > 0 && /* @__PURE__ */ i(p, { children: [
125
+ /* @__PURE__ */ t("strong", { children: c }),
125
126
  "년"
126
127
  ] }),
127
- d > 0 && /* @__PURE__ */ i(m, { children: [
128
- l > 0 && /* @__PURE__ */ t(m, { children: " " }),
129
- /* @__PURE__ */ t("strong", { children: d }),
128
+ h > 0 && /* @__PURE__ */ i(p, { children: [
129
+ c > 0 && /* @__PURE__ */ t(p, { children: " " }),
130
+ /* @__PURE__ */ t("strong", { children: h }),
130
131
  "개월"
131
132
  ] })
132
133
  ] })
133
134
  ]
134
135
  }
135
136
  ),
136
- j && /* @__PURE__ */ t(
137
+ D && /* @__PURE__ */ t(
137
138
  r,
138
139
  {
139
140
  id: "career-section-career-items",
140
141
  tag: "ul",
141
142
  flexDirection: "column",
142
143
  inlineCSS: { width: "inherit" },
143
- children: b.toArray(y).slice(0, a ? void 0 : 3)
144
+ children: z(l).slice(0, !s || a ? void 0 : 3)
144
145
  }
145
146
  ),
146
- C && k && /* @__PURE__ */ t(
147
+ s && j && /* @__PURE__ */ t(
147
148
  r,
148
149
  {
149
150
  alignItems: "center",
@@ -151,13 +152,13 @@ function G({
151
152
  mt: 2,
152
153
  inlineCSS: { width: "inherit" },
153
154
  children: /* @__PURE__ */ t(
154
- Y,
155
+ M,
155
156
  {
156
157
  fullWidth: !0,
157
158
  variant: "text",
158
159
  color: "secondary",
159
- endAdornment: /* @__PURE__ */ t(f, { name: a ? "ChevronUpLine" : "ChevronDownLine" }),
160
- onClick: E,
160
+ endAdornment: /* @__PURE__ */ t(g, { name: a ? "ChevronUpLine" : "ChevronDownLine" }),
161
+ onClick: k,
161
162
  "aria-controls": "career-section-career-items",
162
163
  "aria-expanded": a,
163
164
  children: a ? "접기" : "더 보기"
@@ -165,7 +166,7 @@ function G({
165
166
  )
166
167
  }
167
168
  ),
168
- !C && S && /* @__PURE__ */ t(
169
+ !s && y && /* @__PURE__ */ t(
169
170
  r,
170
171
  {
171
172
  mt: 4,
@@ -173,7 +174,7 @@ function G({
173
174
  alignItems: "center",
174
175
  justifyContent: "center",
175
176
  inlineCSS: { width: "inherit" },
176
- children: S
177
+ children: y
177
178
  }
178
179
  )
179
180
  ]
@@ -181,5 +182,5 @@ function G({
181
182
  );
182
183
  }
183
184
  export {
184
- G as default
185
+ V as default
185
186
  };
@@ -1,8 +1,11 @@
1
1
  import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
- export interface CertificationItemProps extends FlexboxProps {
2
+ export interface CertificationItemProps extends Omit<FlexboxProps, 'id'> {
3
3
  name: string;
4
4
  acquisitionDate: string;
5
5
  status: 'VERIFIED' | 'PENDING' | 'REJECTED' | 'DELETED';
6
+ id: string | number;
7
+ regDatetime: string;
8
+ priority: number;
6
9
  }
7
- declare function CertificationItem({ name, acquisitionDate, status, ...props }: CertificationItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
10
+ declare function CertificationItem({ name, acquisitionDate, status, id, ...props }: CertificationItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
8
11
  export default CertificationItem;
@@ -1,18 +1,23 @@
1
- import { jsx as n, jsxs as l } from "react/jsx-runtime";
2
- import { useId as u } from "react";
1
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
3
2
  import { Flexbox as a, Typography as g, Icon as c } from "@dotss/ui";
4
3
  import y from "@dotss/ui/core/useTheme";
5
- import { useCheckHoverPossible as C } from "@dotss/ui/hooks";
6
- function E({ name: b, acquisitionDate: h, status: o, ...e }) {
7
- const t = u(), { isHoverPossible: s } = C(), {
4
+ import { useCheckHoverPossible as u } from "@dotss/ui/hooks";
5
+ function D({
6
+ name: b,
7
+ acquisitionDate: h,
8
+ status: o,
9
+ id: l,
10
+ ...e
11
+ }) {
12
+ const { isHoverPossible: s } = u(), {
8
13
  palette: { grey: m },
9
14
  spacing: d
10
- } = y(), r = typeof e.onClick == "function";
11
- return /* @__PURE__ */ n("li", { children: /* @__PURE__ */ l(
15
+ } = y(), i = typeof e.onClick == "function";
16
+ return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ r(
12
17
  a,
13
18
  {
14
19
  role: "button",
15
- tabIndex: r ? 0 : -1,
20
+ tabIndex: i ? 0 : -1,
16
21
  alignItems: "center",
17
22
  gap: 1,
18
23
  pt: 2,
@@ -21,21 +26,21 @@ function E({ name: b, acquisitionDate: h, status: o, ...e }) {
21
26
  pr: 4,
22
27
  ml: -4,
23
28
  mr: -4,
24
- onKeyDown: (i) => {
29
+ onKeyDown: (n) => {
25
30
  var f;
26
- (i.key === "Enter" || i.key === " ") && (i.preventDefault(), i.currentTarget.click()), (f = e.onKeyDown) == null || f.call(e, i);
31
+ (n.key === "Enter" || n.key === " ") && (n.preventDefault(), n.currentTarget.click()), (f = e.onKeyDown) == null || f.call(e, n);
27
32
  },
28
- "aria-labelledby": `certification-item-name-${t}`,
29
- "aria-describedby": `certification-item-desc-${t}`,
33
+ "aria-labelledby": `certification-item-name-${l}`,
34
+ "aria-describedby": `certification-item-desc-${l}`,
30
35
  ...e,
31
36
  inlineCSS: {
32
- cursor: r ? "pointer" : "default",
33
- ...r && {
37
+ cursor: i ? "pointer" : "default",
38
+ ...i && {
34
39
  "&:active": {
35
40
  backgroundColor: m[10]
36
41
  }
37
42
  },
38
- ...r && s ? {
43
+ ...i && s ? {
39
44
  "&:hover": {
40
45
  backgroundColor: m[10]
41
46
  }
@@ -43,11 +48,11 @@ function E({ name: b, acquisitionDate: h, status: o, ...e }) {
43
48
  ...e == null ? void 0 : e.inlineCSS
44
49
  },
45
50
  children: [
46
- /* @__PURE__ */ l(a, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
47
- /* @__PURE__ */ n(a, { alignItems: "center", gap: 1, children: /* @__PURE__ */ l(g, { id: `certification-item-name-${t}`, tag: "p", variant: "b2M", children: [
51
+ /* @__PURE__ */ r(a, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
52
+ /* @__PURE__ */ t(a, { alignItems: "center", gap: 1, children: /* @__PURE__ */ r(g, { id: `certification-item-name-${l}`, tag: "p", variant: "b2M", children: [
48
53
  b,
49
54
  o === "VERIFIED" && // TODO 아이콘 교체 필요
50
- /* @__PURE__ */ n(
55
+ /* @__PURE__ */ t(
51
56
  c,
52
57
  {
53
58
  name: "InfoFill",
@@ -61,7 +66,7 @@ function E({ name: b, acquisitionDate: h, status: o, ...e }) {
61
66
  }
62
67
  }
63
68
  ),
64
- o === "REJECTED" && /* @__PURE__ */ n(
69
+ o === "REJECTED" && /* @__PURE__ */ t(
65
70
  c,
66
71
  {
67
72
  name: "AlertFill",
@@ -76,16 +81,16 @@ function E({ name: b, acquisitionDate: h, status: o, ...e }) {
76
81
  }
77
82
  )
78
83
  ] }) }),
79
- /* @__PURE__ */ l(g, { id: `certification-item-desc-${t}`, tag: "p", variant: "b5R", color: "grey.50", children: [
84
+ /* @__PURE__ */ r(g, { id: `certification-item-desc-${l}`, tag: "p", variant: "b5R", color: "grey.50", children: [
80
85
  h,
81
86
  " 취득"
82
87
  ] })
83
88
  ] }),
84
- /* @__PURE__ */ n(c, { name: "ChevronRightLine", size: "xSmall", color: "grey.50" })
89
+ i && /* @__PURE__ */ t(c, { name: "ChevronRightLine", size: "xSmall", color: "grey.50" })
85
90
  ]
86
91
  }
87
92
  ) });
88
93
  }
89
94
  export {
90
- E as default
95
+ D as default
91
96
  };
@@ -1,20 +1,21 @@
1
- import { jsxs as c, jsx as t } from "react/jsx-runtime";
2
- import { useState as m, Children as p, isValidElement as v } from "react";
3
- import { Flexbox as i, Typography as y, Tooltip as j, Icon as a, Button as k } from "@dotss/ui";
1
+ import { jsxs as s, jsx as t } from "react/jsx-runtime";
2
+ import { useState as m, Children as w, isValidElement as v } from "react";
3
+ import { Flexbox as e, Typography as h, Tooltip as j, Icon as d, Button as k } from "@dotss/ui";
4
4
  import D from "@dotss/ui/core/useTheme";
5
5
  import E from "./CertificationItem/CertificationItem.mjs";
6
- function z({
7
- children: s,
8
- action: d,
9
- showTooltip: g = !1,
10
- enableToggle: f = !1,
6
+ import { sortItemElements as O } from "../../utils/sortItems/sortItems.mjs";
7
+ function K({
8
+ children: p,
9
+ action: f,
10
+ showTooltip: x = !1,
11
+ enableToggle: r = !1,
11
12
  ...n
12
13
  }) {
13
- const { spacing: r } = D(), [x, C] = m(!1), [o, S] = m(!1), h = p.toArray(s).filter(v).filter((e) => e.type === E), u = h.length > 0, b = h.length > 3, l = () => C((e) => !e), I = (e) => {
14
- (e.key === "Enter" || e.key === " ") && l();
15
- }, w = () => S((e) => !e);
16
- return /* @__PURE__ */ c(
17
- i,
14
+ const { spacing: l } = D(), [y, C] = m(!1), [o, g] = m(!1), c = w.toArray(p).filter(v).filter((i) => i.type === E), S = c.length > 0, u = c.length > 3, a = () => C((i) => !i), I = (i) => {
15
+ (i.key === "Enter" || i.key === " ") && a();
16
+ }, b = () => g((i) => !i);
17
+ return /* @__PURE__ */ s(
18
+ e,
18
19
  {
19
20
  tag: "section",
20
21
  flexDirection: "column",
@@ -27,9 +28,9 @@ function z({
27
28
  ...n == null ? void 0 : n.inlineCSS
28
29
  },
29
30
  children: [
30
- /* @__PURE__ */ c(i, { alignItems: "center", justifyContent: "center", gap: 1, children: [
31
+ /* @__PURE__ */ s(e, { alignItems: "center", justifyContent: "center", gap: 1, children: [
31
32
  /* @__PURE__ */ t(
32
- y,
33
+ h,
33
34
  {
34
35
  id: "certification-section-title",
35
36
  tag: "h2",
@@ -38,17 +39,17 @@ function z({
38
39
  children: "자격증"
39
40
  }
40
41
  ),
41
- g && /* @__PURE__ */ t(
42
+ x && /* @__PURE__ */ t(
42
43
  j,
43
44
  {
44
- open: x,
45
- onClose: l,
45
+ open: y,
46
+ onClose: a,
46
47
  color: "secondary",
47
48
  role: "tooltip",
48
49
  "aria-labelledby": "certification-section-tooltip",
49
50
  "aria-describedby": "certification-section-tooltip-desc",
50
- body: /* @__PURE__ */ c(
51
- y,
51
+ body: /* @__PURE__ */ s(
52
+ h,
52
53
  {
53
54
  id: "certification-section-tooltip-desc",
54
55
  tag: "p",
@@ -57,7 +58,7 @@ function z({
57
58
  noWrap: !0,
58
59
  inlineCSS: {
59
60
  display: "flex",
60
- gap: r.content(1),
61
+ gap: l.content(1),
61
62
  "& svg": {
62
63
  width: "20px !important",
63
64
  height: "20px !important",
@@ -66,22 +67,22 @@ function z({
66
67
  },
67
68
  children: [
68
69
  "째깍악어가 확인한 정보는",
69
- /* @__PURE__ */ t(a, { name: "InfoFill", size: "small", color: "tictoccroc-teacher.brand.green" }),
70
+ /* @__PURE__ */ t(d, { name: "InfoFill", size: "small", color: "tictoccroc-teacher.brand.green" }),
70
71
  "인증 마크가 붙어요!"
71
72
  ]
72
73
  }
73
74
  ),
74
75
  inlineCSS: {
75
76
  "&:after": {
76
- transform: `translateX(-${82.5 + r.content(1)}px)`
77
+ transform: `translateX(-${82.5 + l.content(1)}px)`
77
78
  }
78
79
  },
79
80
  style: {
80
81
  top: -8,
81
- left: `calc(50% + 82.5px - ${r.content(0.5)}px)`
82
+ left: `calc(50% + 82.5px - ${l.content(0.5)}px)`
82
83
  },
83
84
  children: /* @__PURE__ */ t(
84
- a,
85
+ d,
85
86
  {
86
87
  id: "certification-section-tooltip",
87
88
  role: "button",
@@ -89,7 +90,7 @@ function z({
89
90
  name: "TooltipFill",
90
91
  size: "small",
91
92
  color: "grey.50",
92
- onClick: l,
93
+ onClick: a,
93
94
  onKeyDown: I,
94
95
  "aria-label": "추가 정보 안내",
95
96
  inlineCSS: {
@@ -100,18 +101,21 @@ function z({
100
101
  }
101
102
  )
102
103
  ] }),
103
- u && /* @__PURE__ */ t(
104
- i,
104
+ S && /* @__PURE__ */ t(
105
+ e,
105
106
  {
106
107
  id: "certification-section-certification-items",
107
108
  tag: "ul",
108
109
  flexDirection: "column",
109
110
  inlineCSS: { width: "inherit" },
110
- children: p.toArray(s).slice(0, o ? void 0 : 3)
111
+ children: O(c).slice(
112
+ 0,
113
+ !r || o ? void 0 : 3
114
+ )
111
115
  }
112
116
  ),
113
- f && b && /* @__PURE__ */ t(
114
- i,
117
+ r && u && /* @__PURE__ */ t(
118
+ e,
115
119
  {
116
120
  alignItems: "center",
117
121
  justifyContent: "center",
@@ -123,8 +127,8 @@ function z({
123
127
  fullWidth: !0,
124
128
  variant: "text",
125
129
  color: "secondary",
126
- endAdornment: /* @__PURE__ */ t(a, { name: o ? "ChevronUpLine" : "ChevronDownLine" }),
127
- onClick: w,
130
+ endAdornment: /* @__PURE__ */ t(d, { name: o ? "ChevronUpLine" : "ChevronDownLine" }),
131
+ onClick: b,
128
132
  "aria-controls": "certification-section-certification-items",
129
133
  "aria-expanded": o,
130
134
  children: o ? "접기" : "더 보기"
@@ -132,15 +136,15 @@ function z({
132
136
  )
133
137
  }
134
138
  ),
135
- !f && d && /* @__PURE__ */ t(
136
- i,
139
+ !r && f && /* @__PURE__ */ t(
140
+ e,
137
141
  {
138
142
  mt: 4,
139
143
  flexGrow: 1,
140
144
  alignItems: "center",
141
145
  justifyContent: "center",
142
146
  inlineCSS: { width: "inherit" },
143
- children: d
147
+ children: f
144
148
  }
145
149
  )
146
150
  ]
@@ -148,5 +152,5 @@ function z({
148
152
  );
149
153
  }
150
154
  export {
151
- z as default
155
+ K as default
152
156
  };
@@ -1,9 +1,12 @@
1
1
  import { FlexboxProps } from 'node_modules/@dotss/ui/Flexbox/Flexbox';
2
- export interface EducationItemProps extends FlexboxProps {
2
+ export interface EducationItemProps extends Omit<FlexboxProps, 'id'> {
3
3
  name: string;
4
4
  status: 'VERIFIED' | 'PENDING' | 'REJECTED' | 'DELETED';
5
- academicStatus: 'STUDYING' | 'ONBREAK' | 'GRADUATED';
5
+ academicStatus: 'STUDYING' | 'ONBREAK' | 'FINISHED';
6
6
  major: string;
7
+ id: string | number;
8
+ regDatetime: string;
9
+ priority: number;
7
10
  }
8
- declare function EducationItem({ name, status, major, academicStatus, ...props }: EducationItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
11
+ declare function EducationItem({ name, status, major, academicStatus, id, regDatetime, priority, ...props }: EducationItemProps): import("@emotion/react/jsx-runtime").JSX.Element;
9
12
  export default EducationItem;
@@ -1,18 +1,26 @@
1
- import { jsx as i, jsxs as t } from "react/jsx-runtime";
2
- import { useId as y } from "react";
3
- import { Flexbox as c, Typography as d, Icon as m } from "@dotss/ui";
4
- import C from "@dotss/ui/core/useTheme";
5
- import { useCheckHoverPossible as v } from "@dotss/ui/hooks";
6
- function R({ name: f, status: g, major: u, academicStatus: o, ...e }) {
7
- const l = y(), { isHoverPossible: s } = v(), {
1
+ import { jsx as t, jsxs as l } from "react/jsx-runtime";
2
+ import { Flexbox as c, Typography as m, Icon as g } from "@dotss/ui";
3
+ import s from "@dotss/ui/core/useTheme";
4
+ import { useCheckHoverPossible as C } from "@dotss/ui/hooks";
5
+ function R({
6
+ name: f,
7
+ status: d,
8
+ major: u,
9
+ academicStatus: o,
10
+ id: r,
11
+ regDatetime: v,
12
+ priority: x,
13
+ ...e
14
+ }) {
15
+ const { isHoverPossible: y } = C(), {
8
16
  palette: { grey: a },
9
17
  spacing: b
10
- } = C(), r = typeof e.onClick == "function";
11
- return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ t(
18
+ } = s(), n = typeof e.onClick == "function";
19
+ return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ l(
12
20
  c,
13
21
  {
14
22
  role: "button",
15
- tabIndex: r ? 0 : -1,
23
+ tabIndex: n ? 0 : -1,
16
24
  alignItems: "center",
17
25
  gap: 4,
18
26
  pt: 2,
@@ -21,21 +29,21 @@ function R({ name: f, status: g, major: u, academicStatus: o, ...e }) {
21
29
  pr: 4,
22
30
  ml: -4,
23
31
  mr: -4,
24
- onKeyDown: (n) => {
32
+ onKeyDown: (i) => {
25
33
  var h;
26
- (n.key === "Enter" || n.key === " ") && (n.preventDefault(), n.currentTarget.click()), (h = e.onKeyDown) == null || h.call(e, n);
34
+ (i.key === "Enter" || i.key === " ") && (i.preventDefault(), i.currentTarget.click()), (h = e.onKeyDown) == null || h.call(e, i);
27
35
  },
28
- "aria-labelledby": `education-item-title-${l}`,
29
- "aria-describedby": `education-item-desc-${l}`,
36
+ "aria-labelledby": `education-item-title-${r}`,
37
+ "aria-describedby": `education-item-desc-${r}`,
30
38
  ...e,
31
39
  inlineCSS: {
32
- cursor: r ? "pointer" : "default",
33
- ...r && {
40
+ cursor: n ? "pointer" : "default",
41
+ ...n && {
34
42
  "&:active": {
35
43
  backgroundColor: a[10]
36
44
  }
37
45
  },
38
- ...r && s ? {
46
+ ...n && y ? {
39
47
  "&:hover": {
40
48
  backgroundColor: a[10]
41
49
  }
@@ -43,12 +51,12 @@ function R({ name: f, status: g, major: u, academicStatus: o, ...e }) {
43
51
  ...e == null ? void 0 : e.inlineCSS
44
52
  },
45
53
  children: [
46
- /* @__PURE__ */ t(c, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
47
- /* @__PURE__ */ t(d, { id: `education-item-title-${l}`, tag: "p", variant: "b2M", children: [
54
+ /* @__PURE__ */ l(c, { flexDirection: "column", gap: 1, flexGrow: 1, children: [
55
+ /* @__PURE__ */ l(m, { id: `education-item-title-${r}`, tag: "p", variant: "b2M", children: [
48
56
  f,
49
- g === "VERIFIED" && // TODO 아이콘 교체 필요
50
- /* @__PURE__ */ i(
51
- m,
57
+ d === "VERIFIED" && // TODO 아이콘 교체 필요
58
+ /* @__PURE__ */ t(
59
+ g,
52
60
  {
53
61
  name: "InfoFill",
54
62
  size: "small",
@@ -61,8 +69,8 @@ function R({ name: f, status: g, major: u, academicStatus: o, ...e }) {
61
69
  }
62
70
  }
63
71
  ),
64
- g === "REJECTED" && /* @__PURE__ */ i(
65
- m,
72
+ d === "REJECTED" && /* @__PURE__ */ t(
73
+ g,
66
74
  {
67
75
  name: "AlertFill",
68
76
  size: "small",
@@ -76,11 +84,11 @@ function R({ name: f, status: g, major: u, academicStatus: o, ...e }) {
76
84
  }
77
85
  )
78
86
  ] }),
79
- /* @__PURE__ */ i(d, { id: `education-item-desc-${l}`, tag: "p", variant: "b5R", color: "grey.50", children: u })
87
+ /* @__PURE__ */ t(m, { id: `education-item-desc-${r}`, tag: "p", variant: "b5R", color: "grey.50", children: u })
80
88
  ] }),
81
- /* @__PURE__ */ t(c, { alignItems: "center", gap: 2, children: [
82
- /* @__PURE__ */ t(
83
- d,
89
+ /* @__PURE__ */ l(c, { alignItems: "center", gap: 2, children: [
90
+ /* @__PURE__ */ l(
91
+ m,
84
92
  {
85
93
  tag: "p",
86
94
  variant: "b4R",
@@ -90,11 +98,11 @@ function R({ name: f, status: g, major: u, academicStatus: o, ...e }) {
90
98
  children: [
91
99
  o === "STUDYING" && "재학중",
92
100
  o === "ONBREAK" && "휴학",
93
- o === "GRADUATED" && "졸업"
101
+ o === "FINISHED" && "졸업"
94
102
  ]
95
103
  }
96
104
  ),
97
- /* @__PURE__ */ i(m, { name: "ChevronRightLine", size: "xSmall", color: "grey.50" })
105
+ n && /* @__PURE__ */ t(g, { name: "ChevronRightLine", size: "xSmall", color: "grey.50" })
98
106
  ] })
99
107
  ]
100
108
  }
@@ -1,19 +1,20 @@
1
- import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { useState as u, Children as p, isValidElement as v } from "react";
3
- import { Flexbox as n, Typography as f, Tooltip as E, Icon as c, Button as j } from "@dotss/ui";
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { useState as h, Children as w, isValidElement as E } from "react";
3
+ import { Flexbox as n, Typography as p, Tooltip as v, Icon as d, Button as j } from "@dotss/ui";
4
4
  import k from "@dotss/ui/core/useTheme";
5
5
  import D from "./EducationItem/EducationItem.mjs";
6
- function B({
7
- children: s,
8
- action: d,
9
- showTooltip: y = !1,
10
- enableToggle: h = !1,
6
+ import { sortItemElements as O } from "../../utils/sortItems/sortItems.mjs";
7
+ function L({
8
+ children: u,
9
+ action: m,
10
+ showTooltip: f = !1,
11
+ enableToggle: l = !1,
11
12
  ...i
12
13
  }) {
13
- const { spacing: l } = k(), [g, x] = u(!1), [o, S] = u(!1), m = p.toArray(s).filter(v).filter((t) => t.type === D), C = m.length > 0, b = m.length > 3, a = () => x((t) => !t), I = (t) => {
14
- (t.key === "Enter" || t.key === " ") && a();
15
- }, w = () => S((t) => !t);
16
- return /* @__PURE__ */ r(
14
+ const { spacing: a } = k(), [x, y] = h(!1), [o, g] = h(!1), r = w.toArray(u).filter(E).filter((t) => t.type === D), S = r.length > 0, C = r.length > 3, c = () => y((t) => !t), I = (t) => {
15
+ (t.key === "Enter" || t.key === " ") && c();
16
+ }, b = () => g((t) => !t);
17
+ return /* @__PURE__ */ s(
17
18
  n,
18
19
  {
19
20
  tag: "section",
@@ -27,9 +28,9 @@ function B({
27
28
  ...i == null ? void 0 : i.inlineCSS
28
29
  },
29
30
  children: [
30
- /* @__PURE__ */ r(n, { alignItems: "center", justifyContent: "center", gap: 1, children: [
31
+ /* @__PURE__ */ s(n, { alignItems: "center", justifyContent: "center", gap: 1, children: [
31
32
  /* @__PURE__ */ e(
32
- f,
33
+ p,
33
34
  {
34
35
  id: "education-section-title",
35
36
  tag: "h2",
@@ -38,17 +39,17 @@ function B({
38
39
  children: "학력"
39
40
  }
40
41
  ),
41
- y && /* @__PURE__ */ e(
42
- E,
42
+ f && /* @__PURE__ */ e(
43
+ v,
43
44
  {
44
- open: g,
45
- onClose: a,
45
+ open: x,
46
+ onClose: c,
46
47
  color: "secondary",
47
48
  role: "tooltip",
48
49
  "aria-labelledby": "education-section-tooltip",
49
50
  "aria-describedby": "education-section-tooltip-desc",
50
- body: /* @__PURE__ */ r(
51
- f,
51
+ body: /* @__PURE__ */ s(
52
+ p,
52
53
  {
53
54
  id: "education-section-tooltip-desc",
54
55
  tag: "p",
@@ -57,7 +58,7 @@ function B({
57
58
  noWrap: !0,
58
59
  inlineCSS: {
59
60
  display: "flex",
60
- gap: l.content(1),
61
+ gap: a.content(1),
61
62
  "& svg": {
62
63
  width: "20px !important",
63
64
  height: "20px !important",
@@ -66,22 +67,22 @@ function B({
66
67
  },
67
68
  children: [
68
69
  "째깍악어가 확인한 정보는",
69
- /* @__PURE__ */ e(c, { name: "InfoFill", size: "small", color: "tictoccroc-teacher.brand.green" }),
70
+ /* @__PURE__ */ e(d, { name: "InfoFill", size: "small", color: "tictoccroc-teacher.brand.green" }),
70
71
  "인증 마크가 붙어요!"
71
72
  ]
72
73
  }
73
74
  ),
74
75
  inlineCSS: {
75
76
  "&:after": {
76
- transform: `translateX(-${100 + l.content(1)}px)`
77
+ transform: `translateX(-${100 + a.content(1)}px)`
77
78
  }
78
79
  },
79
80
  style: {
80
81
  top: -8,
81
- left: `calc(50% + 100px - ${l.content(0.5)}px)`
82
+ left: `calc(50% + 100px - ${a.content(0.5)}px)`
82
83
  },
83
84
  children: /* @__PURE__ */ e(
84
- c,
85
+ d,
85
86
  {
86
87
  id: "education-section-tooltip",
87
88
  role: "button",
@@ -89,7 +90,7 @@ function B({
89
90
  name: "TooltipFill",
90
91
  size: "small",
91
92
  color: "grey.50",
92
- onClick: a,
93
+ onClick: c,
93
94
  onKeyDown: I,
94
95
  "aria-label": "추가 정보 안내",
95
96
  inlineCSS: {
@@ -100,17 +101,17 @@ function B({
100
101
  }
101
102
  )
102
103
  ] }),
103
- C && /* @__PURE__ */ e(
104
+ S && /* @__PURE__ */ e(
104
105
  n,
105
106
  {
106
107
  id: "education-section-education-items",
107
108
  tag: "ul",
108
109
  flexDirection: "column",
109
110
  inlineCSS: { width: "inherit" },
110
- children: p.toArray(s).slice(0, o ? void 0 : 3)
111
+ children: O(r).slice(0, !l || o ? void 0 : 3)
111
112
  }
112
113
  ),
113
- h && b && /* @__PURE__ */ e(
114
+ l && C && /* @__PURE__ */ e(
114
115
  n,
115
116
  {
116
117
  alignItems: "center",
@@ -123,8 +124,8 @@ function B({
123
124
  fullWidth: !0,
124
125
  variant: "text",
125
126
  color: "secondary",
126
- endAdornment: /* @__PURE__ */ e(c, { name: o ? "ChevronUpLine" : "ChevronDownLine" }),
127
- onClick: w,
127
+ endAdornment: /* @__PURE__ */ e(d, { name: o ? "ChevronUpLine" : "ChevronDownLine" }),
128
+ onClick: b,
128
129
  "aria-controls": "education-section-education-items",
129
130
  "aria-expanded": o,
130
131
  children: o ? "접기" : "더 보기"
@@ -132,7 +133,7 @@ function B({
132
133
  )
133
134
  }
134
135
  ),
135
- !h && d && /* @__PURE__ */ e(
136
+ !l && m && /* @__PURE__ */ e(
136
137
  n,
137
138
  {
138
139
  mt: 4,
@@ -140,7 +141,7 @@ function B({
140
141
  alignItems: "center",
141
142
  justifyContent: "center",
142
143
  inlineCSS: { width: "inherit" },
143
- children: d
144
+ children: m
144
145
  }
145
146
  )
146
147
  ]
@@ -148,5 +149,5 @@ function B({
148
149
  );
149
150
  }
150
151
  export {
151
- B as default
152
+ L as default
152
153
  };
@@ -0,0 +1 @@
1
+ export { default as sortItems, sortItemElements } from './sortItems';
@@ -0,0 +1,5 @@
1
+ import { sortItemElements as s, default as m } from "./sortItems/sortItems.mjs";
2
+ export {
3
+ s as sortItemElements,
4
+ m as sortItems
5
+ };
@@ -0,0 +1,3 @@
1
+ import { default as sortItems, sortItemElements } from './sortItems';
2
+ export { sortItemElements };
3
+ export default sortItems;
@@ -0,0 +1,6 @@
1
+ import e from "./sortItems.mjs";
2
+ import { sortItemElements as m } from "./sortItems.mjs";
3
+ export {
4
+ e as default,
5
+ m as sortItemElements
6
+ };
@@ -0,0 +1,9 @@
1
+ import { ReactElement } from 'react';
2
+ type ItemProps = {
3
+ status: 'VERIFIED' | 'PENDING' | 'REJECTED' | 'DELETED';
4
+ regDatetime: string;
5
+ priority: number;
6
+ };
7
+ export default function sortItems<T>(items: T[], get?: (item: T) => ItemProps): T[];
8
+ export declare function sortItemElements<T extends ReactElement<ItemProps>>(items: T[]): T[];
9
+ export {};
@@ -0,0 +1,29 @@
1
+ function c(s, r = (a) => a) {
2
+ const a = s.some((o) => !!r(o).priority), n = s.filter((o) => r(o).status !== "REJECTED"), m = s.filter((o) => r(o).status === "REJECTED");
3
+ if (a)
4
+ return [
5
+ ...n.sort((o, i) => {
6
+ const t = r(o).priority, e = r(i).priority;
7
+ return t === 0 && e === 0 ? r(i).regDatetime.localeCompare(r(o).regDatetime) : t === 0 && e !== 0 ? -1 : t !== 0 && e === 0 ? 1 : e - t;
8
+ }),
9
+ ...m.sort((o, i) => {
10
+ const t = r(o).priority, e = r(i).priority;
11
+ return t === 0 && e === 0 ? r(i).regDatetime.localeCompare(r(o).regDatetime) : t === 0 && e !== 0 ? -1 : t !== 0 && e === 0 ? 1 : e - t;
12
+ })
13
+ ];
14
+ {
15
+ const o = n.filter((t) => r(t).status === "VERIFIED"), i = n.filter((t) => r(t).status !== "VERIFIED");
16
+ return [
17
+ ...o.sort((t, e) => r(e).regDatetime.localeCompare(r(t).regDatetime)),
18
+ ...i.sort((t, e) => r(e).regDatetime.localeCompare(r(t).regDatetime)),
19
+ ...m.sort((t, e) => r(e).regDatetime.localeCompare(r(t).regDatetime))
20
+ ];
21
+ }
22
+ }
23
+ function u(s) {
24
+ return c(s, (r) => r.props);
25
+ }
26
+ export {
27
+ c as default,
28
+ u as sortItemElements
29
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dotss/tictoccroc",
3
3
  "type": "module",
4
- "version": "0.0.5",
4
+ "version": "0.0.6",
5
5
  "description": "Tictoccroc shared components, hooks, utils, and APIs for Dotss",
6
6
  "main": "./dist/index.mjs",
7
7
  "module": "./dist/index.mjs",
@@ -35,6 +35,14 @@
35
35
  "import": "./dist/teacher/profile/components/*/index.mjs",
36
36
  "types": "./dist/teacher/profile/components/*/index.d.ts"
37
37
  },
38
+ "./teacher/profile/utils": {
39
+ "import": "./dist/teacher/profile/utils/index.mjs",
40
+ "types": "./dist/teacher/profile/utils/index.d.ts"
41
+ },
42
+ "./teacher/profile/utils/*": {
43
+ "import": "./dist/teacher/profile/utils/*/index.mjs",
44
+ "types": "./dist/teacher/profile/utils/*/index.d.ts"
45
+ },
38
46
  "./shared/components": {
39
47
  "import": "./dist/shared/components/index.mjs",
40
48
  "types": "./dist/shared/components/index.d.ts"