@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.
Files changed (25) hide show
  1. package/dist/shared/components/Scheduler/Scheduler.d.ts +2 -2
  2. package/dist/shared/components/Scheduler/Scheduler.mjs +164 -164
  3. package/dist/shared/components/Scheduler/Scheduler.utils.d.ts +13 -7
  4. package/dist/shared/components/Scheduler/Scheduler.utils.mjs +65 -54
  5. package/dist/teacher/profile/components/ActivityGallery/ActivityGallery.mjs +23 -24
  6. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.d.ts +3 -3
  7. package/dist/teacher/profile/components/ActivityGallery/ActivityGalleryItem/ActivityGalleryItem.mjs +3 -3
  8. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.d.ts +5 -2
  9. package/dist/teacher/profile/components/CareerSection/CareerItem/CareerItem.mjs +24 -24
  10. package/dist/teacher/profile/components/CareerSection/CareerSection.mjs +42 -41
  11. package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.d.ts +5 -2
  12. package/dist/teacher/profile/components/CertificationSection/CertificationItem/CertificationItem.mjs +27 -22
  13. package/dist/teacher/profile/components/CertificationSection/CertificationSection.mjs +41 -37
  14. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.d.ts +6 -3
  15. package/dist/teacher/profile/components/EducationSection/EducationItem/EducationItem.mjs +38 -30
  16. package/dist/teacher/profile/components/EducationSection/EducationSection.mjs +35 -34
  17. package/dist/teacher/profile/components/ParentReviewSection/ParentReviewSection.mjs +33 -31
  18. package/dist/teacher/profile/components/PreferredAgeGroup/PreferredAgeGroup.utils.mjs +4 -4
  19. package/dist/teacher/profile/utils/index.d.ts +1 -0
  20. package/dist/teacher/profile/utils/index.mjs +5 -0
  21. package/dist/teacher/profile/utils/sortItems/index.d.ts +3 -0
  22. package/dist/teacher/profile/utils/sortItems/index.mjs +6 -0
  23. package/dist/teacher/profile/utils/sortItems/sortItems.d.ts +9 -0
  24. package/dist/teacher/profile/utils/sortItems/sortItems.mjs +29 -0
  25. package/package.json +9 -1
@@ -20,13 +20,19 @@ export declare function getDayScheduleEvents(scheduleEvents: ScheduleEventWithRa
20
20
  export declare function resolvePositionedScheduleEventsForDate(scheduleEvents: ScheduleEventWithRange[], date: Dayjs): PositionedScheduleEvent[];
21
21
  export declare function assignColumnsToGroup(group: InternalScheduleEvent[]): PositionedScheduleEvent[];
22
22
  export declare function getMinutesFromMidnight(date: string): number;
23
- export declare function getAvailableDateRange(startDate: string | Date | Dayjs, endDate: string | Date | Dayjs, schedules: {
24
- startTime: number;
25
- endTime: number;
26
- weekDay: string | number;
27
- oneDayDate: string | null;
28
- }[]): {
29
- id: string;
23
+ export declare function getAvailableDateRange(startDate: string | Date | Dayjs, endDate: string | Date | Dayjs, { schedules, mergedTimeBlocks }: {
24
+ schedules: {
25
+ id: string | number;
26
+ startDate: string;
27
+ endDate: string;
28
+ startTime: number;
29
+ endTime: number;
30
+ weekDay: string | number;
31
+ oneDayDate: string | null;
32
+ }[];
33
+ mergedTimeBlocks: boolean;
34
+ }): {
35
+ id: string | number;
30
36
  startDate: string;
31
37
  endDate: string;
32
38
  }[];
@@ -1,92 +1,103 @@
1
1
  import s from "dayjs";
2
2
  import g from "../../utils/getDateRange/getDateRange.mjs";
3
- import v from "../../utils/getTimeRange/getTimeRange.mjs";
4
- function S(a, n = []) {
5
- const r = Array.from({ length: 7 }, (e, u) => a.add(u, "day")), o = a, i = a.add(6, "day").endOf("day"), d = n.map((e) => {
6
- const u = s(e.startDate), t = s(e.endDate).endOf("day"), l = u.isBefore(o) ? o : u, h = t.isAfter(i) ? i : t, c = l.diff(o, "day"), p = h.diff(l, "day") + 1;
3
+ import y from "../../utils/getTimeRange/getTimeRange.mjs";
4
+ function M(u, n = []) {
5
+ const a = Array.from({ length: 7 }, (e, f) => u.add(f, "day")), i = u, o = u.add(6, "day").endOf("day"), m = n.map((e) => {
6
+ const f = s(e.startDate), t = s(e.endDate).endOf("day"), r = f.isBefore(i) ? i : f, c = t.isAfter(o) ? o : t, l = r.diff(i, "day"), p = c.diff(r, "day") + 1;
7
7
  return {
8
8
  ...e,
9
- start: c,
10
- end: c + p - 1
9
+ start: l,
10
+ end: l + p - 1
11
11
  };
12
12
  }).filter((e) => e.start <= 6 && e.end >= 0);
13
- return { days: r.map((e) => e), scheduleEvents: d };
13
+ return { days: a.map((e) => e), scheduleEvents: m };
14
14
  }
15
- function M(a, n) {
16
- return a.filter(
17
- (r) => s(r.startDate).isBefore(n.endOf("day")) && s(r.endDate).isAfter(n.startOf("day"))
15
+ function _(u, n) {
16
+ return u.filter(
17
+ (a) => s(a.startDate).isBefore(n.endOf("day")) && s(a.endDate).isAfter(n.startOf("day"))
18
18
  );
19
19
  }
20
- function _(a, n) {
21
- const r = n.startOf("day"), o = n.endOf("day"), d = [...a.filter(
22
- (t) => s(t.startDate).isBefore(o) && s(t.endDate).isAfter(r)
20
+ function Y(u, n) {
21
+ const a = n.startOf("day"), i = n.endOf("day"), m = [...u.filter(
22
+ (t) => s(t.startDate).isBefore(i) && s(t.endDate).isAfter(a)
23
23
  ).map((t) => ({
24
24
  ...t,
25
25
  _start: Math.max(
26
26
  s(t.startDate).minute() + s(t.startDate).hour() * 60,
27
- r.minute() + r.hour() * 60
27
+ a.minute() + a.hour() * 60
28
28
  ),
29
29
  _end: Math.min(
30
30
  s(t.endDate).minute() + s(t.endDate).hour() * 60,
31
- o.minute() + o.hour() * 60
31
+ i.minute() + i.hour() * 60
32
32
  )
33
- }))].sort((t, l) => t._start - l._start), f = [];
34
- let e = [], u = -1;
35
- for (const t of d)
36
- e.length === 0 || t._start < u ? (e.push(t), u = Math.max(u, t._end)) : (f.push(...m(e)), e = [t], u = t._end);
37
- return e.length > 0 && f.push(...m(e)), f;
33
+ }))].sort((t, r) => t._start - r._start), d = [];
34
+ let e = [], f = -1;
35
+ for (const t of m)
36
+ e.length === 0 || t._start < f ? (e.push(t), f = Math.max(f, t._end)) : (d.push(...D(e)), e = [t], f = t._end);
37
+ return e.length > 0 && d.push(...D(e)), d;
38
38
  }
39
- function m(a) {
40
- const n = [], r = [];
41
- for (const i of a) {
42
- let d = !1;
43
- for (let f = 0; f < n.length; f++) {
44
- const e = n[f];
39
+ function D(u) {
40
+ const n = [], a = [];
41
+ for (const o of u) {
42
+ let m = !1;
43
+ for (let d = 0; d < n.length; d++) {
44
+ const e = n[d];
45
45
  if (!e.some(
46
46
  (t) => !(t._end <= t._start || t._end <= t._start)
47
47
  )) {
48
- e.push(i), r.push({
49
- ...i,
50
- columnIndex: f,
48
+ e.push(o), a.push({
49
+ ...o,
50
+ columnIndex: d,
51
51
  totalColumns: 0
52
- }), d = !0;
52
+ }), m = !0;
53
53
  break;
54
54
  }
55
55
  }
56
- d || (n.push([i]), r.push({
57
- ...i,
56
+ m || (n.push([o]), a.push({
57
+ ...o,
58
58
  columnIndex: n.length - 1,
59
59
  totalColumns: 0
60
60
  }));
61
61
  }
62
- const o = n.length;
63
- return r.forEach((i) => i.totalColumns = o), r;
62
+ const i = n.length;
63
+ return a.forEach((o) => o.totalColumns = i), a;
64
64
  }
65
- function Y(a) {
66
- const n = s(a);
65
+ function C(u) {
66
+ const n = s(u);
67
67
  return n.hour() * 60 + n.minute();
68
68
  }
69
- function C(a, n, r) {
70
- return g(a, n).flatMap(({ value: o }, i) => {
71
- const f = r.filter(({ weekDay: t }) => String(t) === o.getDay().toString()).filter(({ oneDayDate: t }) => t ? s(t).isSame(o, "date") : !0).flatMap(
72
- ({ startTime: t, endTime: l }) => v(Number(t), Number(l), {
73
- pairs: !0
74
- })
75
- ), e = 2, u = [];
76
- for (let t = 0; t < f.length; t += e)
77
- u.push(f.slice(t, t + e));
78
- return u.map(([{ value: t }, { value: l }]) => ({
79
- id: `${i}-${t}-${l}`,
80
- startDate: s(o).hour(Math.floor(t)).minute(t % 1 * 60).format("YYYY-MM-DD HH:mm"),
69
+ function O(u, n, {
70
+ schedules: a,
71
+ mergedTimeBlocks: i = !1
72
+ }) {
73
+ return g(u, n).flatMap(({ value: o }, m) => {
74
+ const e = a.filter(({ startDate: r, endDate: c, weekDay: l }) => {
75
+ const p = s(r), h = s(c);
76
+ return p.isAfter(o) || h.isBefore(o) ? !1 : String(l) === o.getDay().toString();
77
+ }).filter(({ oneDayDate: r }) => r ? s(r).isSame(o, "date") : !0).flatMap(
78
+ ({ id: r, startTime: c, endTime: l }) => y(Number(c), Number(l), {
79
+ step: i ? l - c : void 0,
80
+ pairs: !i
81
+ }).map(({ value: p, label: h }) => ({
82
+ id: r,
83
+ value: p,
84
+ label: h
85
+ }))
86
+ ), f = 2, t = [];
87
+ for (let r = 0; r < e.length; r += f)
88
+ t.push(e.slice(r, r + f));
89
+ return t.map(([{ id: r, value: c }, { value: l }]) => ({
90
+ id: r || `${m}-${c}-${l}`,
91
+ startDate: s(o).hour(Math.floor(c)).minute(c % 1 * 60).format("YYYY-MM-DD HH:mm"),
81
92
  endDate: s(o).hour(Math.floor(l)).minute(l % 1 * 60).format("YYYY-MM-DD HH:mm")
82
93
  }));
83
94
  });
84
95
  }
85
96
  export {
86
- m as assignColumnsToGroup,
87
- S as generateWeek,
88
- C as getAvailableDateRange,
89
- M as getDayScheduleEvents,
90
- Y as getMinutesFromMidnight,
91
- _ as resolvePositionedScheduleEventsForDate
97
+ D as assignColumnsToGroup,
98
+ M as generateWeek,
99
+ O as getAvailableDateRange,
100
+ _ as getDayScheduleEvents,
101
+ C as getMinutesFromMidnight,
102
+ Y as resolvePositionedScheduleEventsForDate
92
103
  };
@@ -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
  })
@@ -1,9 +1,9 @@
1
1
  import { MasonryBlockProps } from '../../../../../shared/components/Masonry/MasonryBlock';
2
- export interface ActivityGalleryItemProps extends MasonryBlockProps {
2
+ export interface ActivityGalleryItemProps extends Omit<MasonryBlockProps, 'id'> {
3
3
  type: 'VIDEO' | 'VIMEO' | 'YOUTUBE' | 'IMAGE';
4
4
  primary: boolean;
5
5
  status: 'VERIFIED' | 'PENDING' | 'REJECTED' | 'DELETED';
6
- index?: number;
6
+ id: string | number;
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
  };