Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
6d602c1
feature : popover 컴포넌트 추가
Noma9363 Oct 14, 2024
f656adb
fix : @atom/Input 수정 밎 ModalEditor 수정
Noma9363 Oct 18, 2024
7a72970
fix : 에디터 입력시 성능 저하 수정
Noma9363 Oct 21, 2024
fbafaa5
feature : 에디터 기본 작동 구현
Noma9363 Oct 22, 2024
62ab0fd
Revert "feature : 에디터 기본 작동 구현"
Noma9363 Nov 13, 2024
3b8e142
feat : 공지사항 이벤트 조회 API 그래파이큐엘 쿼리 추가
Noma9363 Dec 16, 2024
950c0eb
style: 관리자 페이지에 활용되는 필터 컴포넌트와 콜랩스 컴포넌트 반응형 스타일 추가
Noma9363 Dec 16, 2024
67313db
refactor: 공지사항 페이지에 사용되는 필터 및 데이터 컴포넌트 수정
Noma9363 Dec 16, 2024
678f711
feat: 관리자 공지사항 페이지 컴포넌트 추가
Noma9363 Dec 17, 2024
fa58426
feat: 이벤트 필터에 활용될 훅
Noma9363 Dec 17, 2024
f7687e7
feat: 이벤트 필터 관련 인터페이스
Noma9363 Dec 17, 2024
a70b63d
feat: 관리자 공지사항 및 이벤트 페이지에 사용될 전역 상태 아톰 추가
Noma9363 Dec 17, 2024
e9759d6
feat: Dayjs 기반 날짜 비교, 날짜 변환, 포멧 등 유틸리티 함수
Noma9363 Dec 17, 2024
6359c29
Update .name
Noma9363 Dec 17, 2024
7f513c2
refector : Mui 기반 Atom 컴포넌트 Input 수정
Noma9363 Jan 3, 2025
dcfe23a
feat: 어드민 라우터 ProductRegister 경로 추가
Noma9363 Jan 3, 2025
55be18f
feat: 상품 등록 관련 인터페이스 추가
Noma9363 Jan 3, 2025
259cf9a
feat : 상품 등록 초기값 설정
Noma9363 Jan 3, 2025
67570ff
feat : page 상품 등록 페이지 추가
Noma9363 Jan 3, 2025
36c7e11
feat : 상품등록에 사용되는 molecules 범주 컴포넌트 추가
Noma9363 Jan 3, 2025
fffa473
style : 쇼핑몰 등록 페이지 컴포넌트 스타일
Noma9363 Jan 3, 2025
a5c17a5
Feat: "Add dnd-kit libraries"
Noma9363 Apr 4, 2025
044e23c
Feat: "Add SortableItem component"
Noma9363 Apr 7, 2025
e72f2b0
style: "Add Sortable component style"
Noma9363 Apr 7, 2025
d4d8a57
feat: "Add Draggable component"
Noma9363 Apr 7, 2025
0cc1283
style: "Add Draggable component styles"
Noma9363 Apr 7, 2025
87aa183
feat: "Add Droppable component"
Noma9363 Apr 8, 2025
6575634
style: "Add Droppable component style"
Noma9363 Apr 8, 2025
c5731e6
feat: "Add SortableItem component"
Noma9363 Apr 8, 2025
5a2cdd7
style: "Add SortableItem style"
Noma9363 Apr 8, 2025
c7531a5
feat: "Add ActionIcon component"
Noma9363 Apr 8, 2025
3791e83
style: "Add ActionIcon style"
Noma9363 Apr 8, 2025
e3219b7
feat: "Add DraggableList component"
Noma9363 Apr 8, 2025
4634733
style: "Add DraggableList style"
Noma9363 Apr 8, 2025
0edf5e5
feat: "Add ImageBox component"
Noma9363 Apr 8, 2025
0f807cc
style: "Add ImageBox style"
Noma9363 Apr 8, 2025
19a7634
feat: "Add ProductImage component"
Noma9363 Apr 8, 2025
b7dc6ae
style: "Add ProductImage component style"
Noma9363 Apr 8, 2025
bbcaaa5
feat: "Add ProductPrice component"
Noma9363 Apr 8, 2025
dd9f9c6
style: "Add ProductPrice style"
Noma9363 Apr 8, 2025
c27a030
feat: "Add ThumbnailManager component"
Noma9363 Apr 8, 2025
3d25bb3
style: "Add ThumbnailManager component style"
Noma9363 Apr 8, 2025
9d27c85
feat: "Add ImageBoxManager component"
Noma9363 Apr 8, 2025
d5b15c3
style: "Add ImageBoxManager component style"
Noma9363 Apr 8, 2025
1362746
feat: "Add ImageBox interface types"
Noma9363 Apr 8, 2025
a7a230c
feat: "Add ModifierArgs interface for Dnd-Kit"
Noma9363 Apr 8, 2025
77340f4
feat: "Add ProductLayerInterface interface for component styling"
Noma9363 Apr 8, 2025
5208653
style: "Add global jiggle keyframe animations"
Noma9363 Apr 8, 2025
9d7ffa7
refactor: "Remove unnecessary IconButton defaultProps"
Noma9363 Apr 8, 2025
50dd47e
refactor: "Simplify ProductCategoryProps by extending ProductLayerInt…
Noma9363 Apr 8, 2025
643ed41
refactor: "Simplify ProductContentProps by extending ProductLayerInte…
Noma9363 Apr 8, 2025
565ad84
refactor: "Simplify ProductInfoProps by extending ProductLayerInterface"
Noma9363 Apr 8, 2025
a4e03cd
feat: "Add ProductPrice and ProductImage component"
Noma9363 Apr 8, 2025
3ada7c7
style: "Add custom scrollbar styles for ModalProductRegister"
Noma9363 Apr 8, 2025
744af61
fix: "Update ImageUrls type in ProductRegisterInterface interface"
Noma9363 Apr 8, 2025
63afe3a
style: "Add border-default-color variable to global styles"
Noma9363 Apr 8, 2025
14a3b81
style: "Add animations import and alt-hidden mixin"
Noma9363 Apr 8, 2025
468873d
chore: "Update dependencies in yarn.lock"
Noma9363 Apr 8, 2025
77e1e96
test
Noma9363 Apr 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"@apollo/client": "^3.8.4",
"@apollo/react-hooks": "^4.0.0",
"@craco/craco": "^7.1.0",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@mui/base": "^5.0.0-beta.40",
Expand Down
43 changes: 39 additions & 4 deletions src/api/apollo/gql/queries/NoticesResponseQuery.gql.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,44 @@
import { gql } from '@apollo/client';

export const SEARCH_NOTICE = gql`
query SearchNotice($request: NoticeSearchRequest!){
searchNotice(request: $request){

// 이벤트 타입들 조회
export const GET_EVENT_TYPE = gql`
query GetEventType {
__typename(name: "EventType") {
enumValues {
name
description
}
}
}
`;

// 이벤트 목록 조회
export const GET_EVENT_LIST = gql`
query GetEventList($eventType: EventType) {
getEventList(eventType: $eventType) {
id
startedAt
endedAt
title
contents
thumbnail
}
}
`;

// 이벤트 상세 조회
export const GET_EVENT_INFO = gql`
query GetEventInfo($eventId: Long!) {
getEventInfo(eventId: $eventId) {
id
startedAt
endedAt
title
contents
thumbnail
items
images
link
}
}
`;
27 changes: 27 additions & 0 deletions src/components/atoms/collaseCell/CollapseCell.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React from 'react';
import { TableCell } from '@mui/material';
import clsN from 'classnames';
import styles from './styles/CollapseCell.module.scss';

export interface CollapseHaderProps {
size?: 'small' | 'medium';
item: React.ReactNode;
className?: string;
}

export const CollapseCell = ({ ...props }: CollapseHaderProps) => {
return (
<TableCell
size={props.size}
component="th"
align="center"
className={clsN(props.className, styles['table-cell'])}
>
{props.item}
</TableCell>
);
};

CollapseCell.defaultProps = {
size: 'small',
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "index";

.table-cell{
text-wrap: nowrap;
text-overflow: ellipsis;

}
1 change: 1 addition & 0 deletions src/components/atoms/collaseCell/styles/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "../../../../styles/scss/index";
6 changes: 5 additions & 1 deletion src/components/atoms/datePicker/DatePicker.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React from 'react';
import { TextFieldClasses } from '@mui/material';
import { Dayjs } from 'dayjs';
import { DatePicker as MuiDatePicker, DatePickerProps as MuiDatePickerProps } from '@mui/x-date-pickers';
import clsN from 'classnames';
Expand All @@ -17,8 +18,10 @@ const DatePicker = <TData extends Dayjs>({
value,
onChange,
slotProps,
classes,
}: MuiDatePickerProps<TData> & {
className?: string;
classes?: Partial<TextFieldClasses>;
label?: React.ReactNode;
}): React.ReactElement => {
/* 렌더 */
Expand All @@ -29,7 +32,8 @@ const DatePicker = <TData extends Dayjs>({
textField: {
size: 'small',
classes: {
root: clsN(className, styles['date-root']),
...classes,
root: clsN(className, styles['date-root'], classes?.root),
},
inputProps: {
className: clsN(styles['date-root__input']),
Expand Down
18 changes: 12 additions & 6 deletions src/components/atoms/input/Input.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import TextField from '@mui/material/TextField';
import TextField, { TextFieldProps } from '@mui/material/TextField';
import clsN from 'classnames';
import styles from './style/Input.module.scss';

Expand All @@ -20,9 +20,9 @@ interface InputProps {
// 문자나 이미지 등의 요소가 들어갈 자리에 임시로 채워놓는 내용물을 의미
placeholder?: string | undefined;
// input 값
inputVal: string | number;
inputVal: unknown | undefined;
// onChange 이벤트 활성화 시 오브젝트 e 를 통한 작업 처리 => 반환 없음
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
onChange: TextFieldProps['onChange'];
// 여러줄 여부
multiline?: boolean | undefined;
// form 컨트롤의 이름을 지정 주로 폼에 있는 내용을 서버에 보낼때 활용
Expand All @@ -31,6 +31,9 @@ interface InputProps {
fullWidth?: boolean | undefined;
// 새로운 type 속성 추가
type?: React.InputHTMLAttributes<unknown>['type'];
// ref
ref?: TextFieldProps['ref'];
required?: TextFieldProps['required'];
}

export const Input = ({
Expand All @@ -47,9 +50,12 @@ export const Input = ({
fullWidth,
type,
inputVal,
ref,
required,
}: InputProps) => {
return (
<TextField
ref={ref}
value={inputVal}
name={name}
variant={variant}
Expand All @@ -69,19 +75,19 @@ export const Input = ({
multiline={multiline}
fullWidth={fullWidth}
type={type} // TextField에 type 속성 전달
required={required}
/>
);
};

Input.defaultProps = {
className: styles[''],
outlineClsN: styles[''],
className: styles['root-input'],
outlineClsN: styles['notched-outline'],
variant: 'filled',
size: 'medium',
endAdornment: undefined,
label: undefined,
placeholder: undefined,
onChange: undefined,
multiline: undefined,
name: undefined,
fullWidth: undefined,
Expand Down
17 changes: 17 additions & 0 deletions src/components/atoms/popover/PopOver.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React from 'react';
import { Popover, PopoverProps } from '@mui/material';

/**
* popover : 클릭 후 다음 요소가 활성화 되는 컴포넌트
* 기존의 PopoverProps 를 Omit 하여 children 을 제외한 모든 인터페이스를 상속하였으나 아토믹 디자인 관점으론 그리 유익하지 않음
*/
interface PopOverProps extends Omit<PopoverProps, 'children'> {
children?: React.ReactNode; // 리액트 노드(선택적)
}

export const PopOver = ({ ...props }: PopOverProps) => {
return <Popover {...props}>{props.children}</Popover>;
};
PopOver.defaultProps = {
children: undefined,
};
2 changes: 2 additions & 0 deletions src/components/atoms/popover/styles/PopOver.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
@import "index";

1 change: 1 addition & 0 deletions src/components/atoms/popover/styles/index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'src/styles/scss/index';
45 changes: 45 additions & 0 deletions src/components/atoms/sortableItem/SortableItem.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* eslint-disable */
import React from 'react';
import { useSortable } from '@dnd-kit/sortable';
// utilities for CSS animation
import { CSS } from '@dnd-kit/utilities';
import { Box } from '@mui/material';
import clsN from 'classnames';
import styles from './style/SortableItem.module.scss';

interface SortableItemProps {
id: string;
content: React.ReactNode;
isActive: boolean;
className?: string;
}

export const SortableItem = ({ id, content, isActive }: SortableItemProps) => {
const {
attributes,
listeners,
setNodeRef, // Element Reference
transform, // for element position moves
transition, // for smooth animation
} = useSortable({ id });

const style = {
transform: CSS.Transform.toString(transform), // when Drag start elemet's position changes
transition, // when Drag end animation end as smoothely
};

return (
<Box
ref={setNodeRef}
style={style}
className={clsN({
[styles['sortable-item']]: !isActive,
[styles['sortable-item--is-active']]: isActive,
})}
{...attributes}
{...listeners}
>
{content}
</Box>
);
};
11 changes: 11 additions & 0 deletions src/components/atoms/sortableItem/style/SortableItem.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@import "./index";

.sortable-item{
padding: 4px;
background-color: inherit;
border: $border-default-color 1px;
border-radius: 4px;
&--is-active{
box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
}
}
3 changes: 3 additions & 0 deletions src/components/commons/draggableItem/DragableItem.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const DragableItem = () => {
return <></>;
};
45 changes: 45 additions & 0 deletions src/components/commons/dropAndDrop/draggable/Draggable.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
import React from 'react';
import { useDraggable } from '@dnd-kit/core';
import { Button } from '@mui/material';
import clsN from 'classnames';
import styles from './styles/Draggable.module.scss';

interface DraggableProps {
// content
children: React.ReactNode;
// important
id: string;
// button Click Event
onClick?: () => void;
}
export const Draggable = ({ ...props }: DraggableProps) => {
/* use Button component for Draggable
* why ? button's basically can interact and focus with keyboard
* role = "button" it's means good at optimizing for screen reader
* Button compoenet has basic event example "click", "tab"
* Button compoenet are clickable element (UX) and have cursor : pointer
*/

const { attributes, listeners, setNodeRef, transform } = useDraggable({
id: props.id,
});

const style = transform
? {
transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`,
}
: undefined;

return (
<Button
ref={setNodeRef} // element Referece
className={clsN(styles.draggable)} // className
style={style} // add transform style
{...listeners} // add draggable event listerners
{...attributes} // add draggable attributes
onClick={props.onClick}
>
{props.children}
</Button>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import "./index";

.draggable{
&--transform{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "src/styles/scss/index";
32 changes: 32 additions & 0 deletions src/components/commons/dropAndDrop/droppable/Droppable.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import React from 'react';
import { useDroppable } from '@dnd-kit/core';
import { Box } from '@mui/material';
import clsN from 'classnames';
import styles from './styles/Droppable.module.scss';

interface DroppableProps {
children: React.ReactNode;
}

// for Draggable Item Landing Place
export const Droppable = ({ ...props }: DroppableProps) => {
const { isOver, setNodeRef } = useDroppable({
id: 'droppable',
});

const style = {
color: isOver ? 'green' : undefined,
};

return (
<Box
ref={setNodeRef}
className={clsN({
[styles['droppable__is-over']]: isOver,
})}
style={style}
>
{props.children}
</Box>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import "./index";

.droppable{
&--is-over{
background-color: green;
color: green;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import "src/styles/scss/index";
Loading