@dotss/tictoccroc 0.0.5 → 0.0.7
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/shared/components/Scheduler/Scheduler.d.ts +2 -2
- package/dist/shared/components/Scheduler/Scheduler.mjs +164 -164
- package/dist/shared/components/Scheduler/Scheduler.utils.d.ts +13 -7
- package/dist/shared/components/Scheduler/Scheduler.utils.mjs +65 -54
- package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +23 -24
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.d.ts +3 -3
- package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +3 -3
- package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.d.ts +5 -2
- package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +24 -24
- package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +42 -41
- package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.d.ts +5 -2
- package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.mjs +27 -22
- package/dist/teacher/profile/components/CertificationSection/CertificationSection.mjs +41 -37
- package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.d.ts +6 -3
- package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +38 -30
- package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +35 -34
- package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +33 -31
- package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +4 -4
- package/dist/teacher/profile/utils/index.d.ts +1 -0
- package/dist/teacher/profile/utils/index.mjs +5 -0
- package/dist/teacher/profile/utils/sortItems/index.d.ts +3 -0
- package/dist/teacher/profile/utils/sortItems/index.mjs +6 -0
- package/dist/teacher/profile/utils/sortItems/sortItems.d.ts +9 -0
- package/dist/teacher/profile/utils/sortItems/sortItems.mjs +29 -0
- package/package.json +9 -1
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Flexbox as n, Typography as
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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:
|
|
14
|
-
(t.key === "Enter" || t.key === " ") &&
|
|
15
|
-
},
|
|
16
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
31
|
+
/* @__PURE__ */ s(n, { alignItems: "center", justifyContent: "center", gap: 1, children: [
|
|
31
32
|
/* @__PURE__ */ e(
|
|
32
|
-
|
|
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
|
-
|
|
42
|
-
|
|
42
|
+
f && /* @__PURE__ */ e(
|
|
43
|
+
v,
|
|
43
44
|
{
|
|
44
|
-
open:
|
|
45
|
-
onClose:
|
|
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__ */
|
|
51
|
-
|
|
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:
|
|
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(
|
|
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 +
|
|
77
|
+
transform: `translateX(-${100 + a.content(1)}px)`
|
|
77
78
|
}
|
|
78
79
|
},
|
|
79
80
|
style: {
|
|
80
81
|
top: -8,
|
|
81
|
-
left: `calc(50% + 100px - ${
|
|
82
|
+
left: `calc(50% + 100px - ${a.content(0.5)}px)`
|
|
82
83
|
},
|
|
83
84
|
children: /* @__PURE__ */ e(
|
|
84
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
111
|
+
children: O(r).slice(0, !l || o ? void 0 : 3)
|
|
111
112
|
}
|
|
112
113
|
),
|
|
113
|
-
|
|
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(
|
|
127
|
-
onClick:
|
|
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
|
-
!
|
|
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:
|
|
144
|
+
children: m
|
|
144
145
|
}
|
|
145
146
|
)
|
|
146
147
|
]
|
|
@@ -148,5 +149,5 @@ function B({
|
|
|
148
149
|
);
|
|
149
150
|
}
|
|
150
151
|
export {
|
|
151
|
-
|
|
152
|
+
L as default
|
|
152
153
|
};
|
|
@@ -1,79 +1,81 @@
|
|
|
1
|
-
import { jsxs as n, jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { Flexbox as
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as s } from "react";
|
|
3
|
+
import { Flexbox as t, Typography as o, Button as h, Icon as c } from "@dotss/ui";
|
|
4
4
|
import p from "@dotss/ui/core/useTheme";
|
|
5
|
-
const
|
|
6
|
-
({ children:
|
|
5
|
+
const x = s(
|
|
6
|
+
({ children: g, totalCount: r, onClickViewAll: l, ...i }, d) => {
|
|
7
7
|
const {
|
|
8
|
-
palette: { grey:
|
|
9
|
-
spacing:
|
|
8
|
+
palette: { grey: m },
|
|
9
|
+
spacing: a
|
|
10
10
|
} = p();
|
|
11
11
|
return /* @__PURE__ */ n(
|
|
12
|
-
|
|
12
|
+
t,
|
|
13
13
|
{
|
|
14
|
-
ref:
|
|
14
|
+
ref: d,
|
|
15
15
|
tag: "section",
|
|
16
|
-
pl: 4,
|
|
17
|
-
pr: 4,
|
|
18
16
|
gap: 4,
|
|
19
17
|
flexDirection: "column",
|
|
20
18
|
"aria-labelledby": "parent-review-section-title",
|
|
21
|
-
...
|
|
19
|
+
...i,
|
|
22
20
|
inlineCSS: {
|
|
23
21
|
width: "100%",
|
|
24
|
-
...
|
|
22
|
+
...i == null ? void 0 : i.inlineCSS
|
|
25
23
|
},
|
|
26
24
|
children: [
|
|
27
|
-
/* @__PURE__ */ n(
|
|
28
|
-
/* @__PURE__ */ t
|
|
25
|
+
/* @__PURE__ */ n(t, { alignItems: "center", justifyContent: "space-between", gap: 1, children: [
|
|
26
|
+
/* @__PURE__ */ e(t, { alignItems: "center", gap: 2, children: /* @__PURE__ */ n(o, { id: "parent-review-section-title", tag: "h2", variant: "h2B", children: [
|
|
29
27
|
"부모님 리뷰",
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
/* @__PURE__ */ n(
|
|
29
|
+
o,
|
|
32
30
|
{
|
|
33
31
|
tag: "span",
|
|
34
32
|
variant: "h4R",
|
|
35
33
|
color: "grey.70",
|
|
36
|
-
inlineCSS: { marginLeft:
|
|
34
|
+
inlineCSS: { marginLeft: a.content(2), verticalAlign: 2 },
|
|
37
35
|
children: [
|
|
38
36
|
"(",
|
|
39
|
-
|
|
37
|
+
r.toLocaleString(),
|
|
40
38
|
"개)"
|
|
41
39
|
]
|
|
42
40
|
}
|
|
43
41
|
)
|
|
44
42
|
] }) }),
|
|
45
|
-
typeof
|
|
46
|
-
|
|
43
|
+
typeof l == "function" && /* @__PURE__ */ e(
|
|
44
|
+
h,
|
|
47
45
|
{
|
|
48
46
|
variant: "text",
|
|
49
47
|
size: "small",
|
|
50
48
|
color: "secondary",
|
|
51
|
-
endAdornment: /* @__PURE__ */
|
|
52
|
-
onClick:
|
|
49
|
+
endAdornment: /* @__PURE__ */ e(c, { name: "ChevronRightLine" }),
|
|
50
|
+
onClick: l,
|
|
53
51
|
children: "전체보기"
|
|
54
52
|
}
|
|
55
53
|
)
|
|
56
54
|
] }),
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
|
|
55
|
+
r > 0 && /* @__PURE__ */ e(
|
|
56
|
+
t,
|
|
59
57
|
{
|
|
60
58
|
tag: "ul",
|
|
61
59
|
flexDirection: "column",
|
|
62
60
|
inlineCSS: {
|
|
63
61
|
"& > li + li": {
|
|
64
|
-
borderTop: `1px solid ${
|
|
65
|
-
marginTop:
|
|
66
|
-
paddingTop:
|
|
62
|
+
borderTop: `1px solid ${m[10]}`,
|
|
63
|
+
marginTop: a.content(5),
|
|
64
|
+
paddingTop: a.content(5)
|
|
67
65
|
}
|
|
68
66
|
},
|
|
69
|
-
children:
|
|
67
|
+
children: g
|
|
70
68
|
}
|
|
71
|
-
)
|
|
69
|
+
),
|
|
70
|
+
r <= 0 && /* @__PURE__ */ n(t, { alignItems: "center", justifyContent: "center", gap: 1, pt: 8, pb: 8, children: [
|
|
71
|
+
/* @__PURE__ */ e(c, { name: "OngoingFill", color: "grey.50" }),
|
|
72
|
+
/* @__PURE__ */ e(o, { tag: "p", variant: "b4R", color: "grey.70", children: "아직 작성된 부모님 리뷰가 없어요." })
|
|
73
|
+
] })
|
|
72
74
|
]
|
|
73
75
|
}
|
|
74
76
|
);
|
|
75
77
|
}
|
|
76
78
|
);
|
|
77
79
|
export {
|
|
78
|
-
|
|
80
|
+
x as default
|
|
79
81
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
const l = {
|
|
2
2
|
age1: { label: "~24개월" },
|
|
3
|
-
age2: { label: "3
|
|
4
|
-
age3: { label: "
|
|
5
|
-
age4: { label: "
|
|
6
|
-
age5: { label: "
|
|
3
|
+
age2: { label: "2~3세" },
|
|
4
|
+
age3: { label: "4~6세" },
|
|
5
|
+
age4: { label: "7~9세" },
|
|
6
|
+
age5: { label: "10~12세" }
|
|
7
7
|
};
|
|
8
8
|
function r(a) {
|
|
9
9
|
return Object.keys(l).filter((e) => a[e] === "Y").map((e) => l[e].label);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as sortItems, sortItemElements } from './sortItems';
|
|
@@ -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.
|
|
4
|
+
"version": "0.0.7",
|
|
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"
|