@daeryun/dr_components 1.1.26 → 1.1.28

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 (32) hide show
  1. package/dist/asset/images/board/calendar.webp +0 -0
  2. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  3. package/dist/components/common/integrate/index.d.ts +1 -1
  4. package/dist/components/index.js +1 -0
  5. package/dist/components/index.ts +1 -0
  6. package/dist/components/page/Broadcast/BroadcastDetail.d.ts +30 -0
  7. package/dist/components/page/Broadcast/BroadcastDetail.jsx +114 -0
  8. package/dist/components/page/Broadcast/BroadcastDetail.stories.d.ts +6 -0
  9. package/dist/components/page/Broadcast/BroadcastDetail.stories.jsx +40 -0
  10. package/dist/components/page/Broadcast/BroadcastDetail.stories.tsx +50 -0
  11. package/dist/components/page/Broadcast/BroadcastDetail.tsx +240 -0
  12. package/dist/components/page/Broadcast/BroadcastList.d.ts +17 -0
  13. package/dist/components/page/Broadcast/BroadcastList.jsx +91 -0
  14. package/dist/components/page/Broadcast/BroadcastList.stories.d.ts +6 -0
  15. package/dist/components/page/Broadcast/BroadcastList.stories.jsx +105 -0
  16. package/dist/components/page/Broadcast/BroadcastList.stories.tsx +123 -0
  17. package/dist/components/page/Broadcast/BroadcastList.tsx +187 -0
  18. package/dist/components/page/Notice/NoticeList.d.ts +50 -0
  19. package/dist/components/page/Notice/NoticeList.jsx +125 -0
  20. package/dist/components/page/Notice/NoticeList.stories.d.ts +9 -0
  21. package/dist/components/page/Notice/NoticeList.stories.jsx +259 -0
  22. package/dist/components/page/Notice/NoticeList.stories.tsx +277 -0
  23. package/dist/components/page/Notice/NoticeList.tsx +265 -0
  24. package/dist/components/page/index.d.ts +3 -0
  25. package/dist/components/page/index.js +3 -0
  26. package/dist/components/page/index.ts +3 -0
  27. package/dist/components/postNavigation/PostNavigation.d.ts +23 -0
  28. package/dist/components/postNavigation/PostNavigation.jsx +31 -0
  29. package/dist/components/postNavigation/PostNavigation.tsx +94 -0
  30. package/dist/styles/globals.css +678 -386
  31. package/dist/tsconfig.tsbuildinfo +1 -1
  32. package/package.json +1 -1
@@ -0,0 +1,259 @@
1
+ import NoticeList from './NoticeList';
2
+ const mockRouter = {
3
+ push: (url) => {
4
+ console.log('Router push:', url);
5
+ return Promise.resolve(true);
6
+ },
7
+ pathname: '/notice',
8
+ query: {},
9
+ asPath: '/notice'
10
+ };
11
+ const meta = {
12
+ title: 'NoticeList',
13
+ component: NoticeList,
14
+ argTypes: {
15
+ SearchBarProps: {
16
+ description: '검색바 관련 props'
17
+ },
18
+ PaginationProps: {
19
+ description: '페이지네이션 관련 props'
20
+ },
21
+ noticeName: {
22
+ description: '공지사항 카테고리 목록'
23
+ },
24
+ noticeList: {
25
+ description: '공지사항 목록 데이터'
26
+ },
27
+ nameFilter: {
28
+ description: '현재 선택된 필터'
29
+ },
30
+ search: {
31
+ description: '현재 검색어'
32
+ },
33
+ indexOfFirstPost: {
34
+ description: '현재 페이지의 첫 번째 게시물 인덱스'
35
+ },
36
+ indexOfLastPost: {
37
+ description: '현재 페이지의 마지막 게시물 인덱스'
38
+ },
39
+ postPerPage: {
40
+ description: '페이지당 게시물 수'
41
+ },
42
+ currentPage: {
43
+ description: '현재 페이지 번호'
44
+ }
45
+ }
46
+ };
47
+ export default meta;
48
+ // Mock 데이터
49
+ const mockNoticeName = [
50
+ {
51
+ code: 'N0001',
52
+ code_name: '사무소안내',
53
+ code_desc: null,
54
+ created_at: '2024-03-04T16:42:25.730Z',
55
+ creator: 'jeonghansol',
56
+ en_name: null,
57
+ etc: null,
58
+ etc2: null,
59
+ g_sorting: null,
60
+ gubun: null,
61
+ i_sorting: null,
62
+ kr_name: null,
63
+ modified_at: null,
64
+ modifier: null,
65
+ parent_code: 'notice',
66
+ sorting: 1,
67
+ use_bool: true
68
+ },
69
+ {
70
+ code: 'N0002',
71
+ code_name: '인사/동정',
72
+ code_desc: null,
73
+ created_at: '2024-03-04T16:42:25.730Z',
74
+ creator: 'jeonghansol',
75
+ en_name: null,
76
+ etc: null,
77
+ etc2: null,
78
+ g_sorting: null,
79
+ gubun: null,
80
+ i_sorting: null,
81
+ kr_name: null,
82
+ modified_at: null,
83
+ modifier: null,
84
+ parent_code: 'notice',
85
+ sorting: 2,
86
+ use_bool: true
87
+ },
88
+ {
89
+ code: 'N0003',
90
+ code_name: '업무협약',
91
+ code_desc: null,
92
+ created_at: '2024-03-04T16:42:25.730Z',
93
+ creator: 'jeonghansol',
94
+ en_name: null,
95
+ etc: null,
96
+ etc2: null,
97
+ g_sorting: null,
98
+ gubun: null,
99
+ i_sorting: null,
100
+ kr_name: null,
101
+ modified_at: null,
102
+ modifier: null,
103
+ parent_code: 'notice',
104
+ sorting: 3,
105
+ use_bool: true
106
+ },
107
+ {
108
+ code: 'N0004',
109
+ code_name: '기타소식',
110
+ code_desc: null,
111
+ created_at: '2024-03-04T16:42:25.730Z',
112
+ creator: 'jeonghansol',
113
+ en_name: null,
114
+ etc: null,
115
+ etc2: null,
116
+ g_sorting: null,
117
+ gubun: null,
118
+ i_sorting: null,
119
+ kr_name: null,
120
+ modified_at: null,
121
+ modifier: null,
122
+ parent_code: 'notice',
123
+ sorting: 4,
124
+ use_bool: true
125
+ }
126
+ ];
127
+ const mockNoticeList = [
128
+ {
129
+ id: 5734,
130
+ title: '10월 3일~9일 연휴 법률상담 정상운영 공지',
131
+ summary: '안녕하세요, 법무법인(유한) 대륜입니다.대륜은 개천절, 추석, 한글날에도 아래 일정과 같이…무소 운영으로 접근성 제고 📞아래 이미지를 클릭하시면 법률상담 접수페이지로 이동합니다.',
132
+ code_name: '기타소식',
133
+ top_count: 0
134
+ },
135
+ {
136
+ id: 5703,
137
+ title: '법무법인 대륜 변관훈변호사, 대한변호사협회 형사전문변호사에 이어 민사전문변호사 등록',
138
+ summary: '대한변호사협회 등록 민사전문변호사… 솔루션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
139
+ code_name: '인사/동정',
140
+ top_count: 0
141
+ },
142
+ {
143
+ id: 5702,
144
+ title: '법무법인 대륜 변관훈변호사 대한변호사협회 형사전문변호사 등록',
145
+ summary: '대한변호사협회 등록 형사전문변호사는 재…션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
146
+ code_name: '인사/동정',
147
+ top_count: 0
148
+ },
149
+ {
150
+ id: 5688,
151
+ title: '법무법인 대륜 이동근변호사 대한변호사협회 형사전문변호사 등록',
152
+ summary: '대한변호사협회 등록 형사전문변호사는 재…션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
153
+ code_name: '인사/동정',
154
+ top_count: 0
155
+ },
156
+ {
157
+ id: 5687,
158
+ title: '이동근 前 경찰 영입',
159
+ summary: '경찰 경력 이동근 책임총괄변호사 영입…울산지방경찰청 경위울산남부경찰서 경위경찰교육원하나은행한국어린이집총연합회 사내변호사',
160
+ code_name: '인사/동정',
161
+ top_count: 0
162
+ }
163
+ ];
164
+ // 기본 스토리
165
+ export const Default = {
166
+ args: {
167
+ SearchBarProps: {
168
+ searchInput: '',
169
+ handleSearch: () => console.log('검색 실행'),
170
+ handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
171
+ },
172
+ PaginationProps: {
173
+ onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
174
+ totalCount: mockNoticeList.length,
175
+ currentPage: 1
176
+ },
177
+ noticeName: mockNoticeName,
178
+ noticeList: mockNoticeList,
179
+ nameFilter: { code_name: '전체', code: '' },
180
+ search: '',
181
+ indexOfFirstPost: 1,
182
+ indexOfLastPost: 10,
183
+ postPerPage: 10,
184
+ currentPage: 1,
185
+ router: mockRouter
186
+ }
187
+ };
188
+ // 검색어가 있는 상태
189
+ export const WithSearch = {
190
+ args: {
191
+ SearchBarProps: {
192
+ searchInput: '법무법인',
193
+ handleSearch: () => console.log('검색 실행'),
194
+ handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
195
+ },
196
+ PaginationProps: {
197
+ onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
198
+ totalCount: mockNoticeList.length,
199
+ currentPage: 1
200
+ },
201
+ noticeName: mockNoticeName,
202
+ noticeList: mockNoticeList,
203
+ nameFilter: { code_name: '전체', code: '' },
204
+ search: '법무법인',
205
+ indexOfFirstPost: 1,
206
+ indexOfLastPost: 10,
207
+ postPerPage: 10,
208
+ currentPage: 1,
209
+ router: mockRouter
210
+ }
211
+ };
212
+ // 필터가 선택된 상태
213
+ export const WithFilter = {
214
+ args: {
215
+ SearchBarProps: {
216
+ searchInput: '',
217
+ handleSearch: () => console.log('검색 실행'),
218
+ handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
219
+ },
220
+ PaginationProps: {
221
+ onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
222
+ totalCount: mockNoticeList.length,
223
+ currentPage: 1
224
+ },
225
+ noticeName: mockNoticeName,
226
+ noticeList: mockNoticeList,
227
+ nameFilter: { code_name: '사무소안내', code: 'N0001' },
228
+ search: '',
229
+ indexOfFirstPost: 1,
230
+ indexOfLastPost: 10,
231
+ postPerPage: 10,
232
+ currentPage: 1,
233
+ router: mockRouter
234
+ }
235
+ };
236
+ // 빈 목록 상태
237
+ export const EmptyList = {
238
+ args: {
239
+ SearchBarProps: {
240
+ searchInput: '',
241
+ handleSearch: () => console.log('검색 실행'),
242
+ handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
243
+ },
244
+ PaginationProps: {
245
+ onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
246
+ totalCount: 0,
247
+ currentPage: 1
248
+ },
249
+ noticeName: mockNoticeName,
250
+ noticeList: [],
251
+ nameFilter: { code_name: '전체', code: '' },
252
+ search: '',
253
+ indexOfFirstPost: 1,
254
+ indexOfLastPost: 10,
255
+ postPerPage: 10,
256
+ currentPage: 1,
257
+ router: mockRouter
258
+ }
259
+ };
@@ -0,0 +1,277 @@
1
+ import type { Meta, StoryObj } from '@storybook/react';
2
+ import NoticeList from './NoticeList';
3
+ import { NextRouter } from 'next/router';
4
+
5
+ const mockRouter: Partial<NextRouter> = {
6
+ push: (url: string) => {
7
+ console.log('Router push:', url);
8
+ return Promise.resolve(true);
9
+ },
10
+ pathname: '/notice',
11
+ query: {},
12
+ asPath: '/notice'
13
+ };
14
+
15
+ const meta: Meta<typeof NoticeList> = {
16
+ title: 'NoticeList',
17
+ component: NoticeList,
18
+ argTypes: {
19
+ SearchBarProps: {
20
+ description: '검색바 관련 props'
21
+ },
22
+ PaginationProps: {
23
+ description: '페이지네이션 관련 props'
24
+ },
25
+ noticeName: {
26
+ description: '공지사항 카테고리 목록'
27
+ },
28
+ noticeList: {
29
+ description: '공지사항 목록 데이터'
30
+ },
31
+ nameFilter: {
32
+ description: '현재 선택된 필터'
33
+ },
34
+ search: {
35
+ description: '현재 검색어'
36
+ },
37
+ indexOfFirstPost: {
38
+ description: '현재 페이지의 첫 번째 게시물 인덱스'
39
+ },
40
+ indexOfLastPost: {
41
+ description: '현재 페이지의 마지막 게시물 인덱스'
42
+ },
43
+ postPerPage: {
44
+ description: '페이지당 게시물 수'
45
+ },
46
+ currentPage: {
47
+ description: '현재 페이지 번호'
48
+ }
49
+ }
50
+ };
51
+
52
+ export default meta;
53
+
54
+ type Story = StoryObj<typeof meta>;
55
+
56
+ // Mock 데이터
57
+ const mockNoticeName = [
58
+ {
59
+ code: 'N0001',
60
+ code_name: '사무소안내',
61
+ code_desc: null,
62
+ created_at: '2024-03-04T16:42:25.730Z',
63
+ creator: 'jeonghansol',
64
+ en_name: null,
65
+ etc: null,
66
+ etc2: null,
67
+ g_sorting: null,
68
+ gubun: null,
69
+ i_sorting: null,
70
+ kr_name: null,
71
+ modified_at: null,
72
+ modifier: null,
73
+ parent_code: 'notice',
74
+ sorting: 1,
75
+ use_bool: true
76
+ },
77
+ {
78
+ code: 'N0002',
79
+ code_name: '인사/동정',
80
+ code_desc: null,
81
+ created_at: '2024-03-04T16:42:25.730Z',
82
+ creator: 'jeonghansol',
83
+ en_name: null,
84
+ etc: null,
85
+ etc2: null,
86
+ g_sorting: null,
87
+ gubun: null,
88
+ i_sorting: null,
89
+ kr_name: null,
90
+ modified_at: null,
91
+ modifier: null,
92
+ parent_code: 'notice',
93
+ sorting: 2,
94
+ use_bool: true
95
+ },
96
+ {
97
+ code: 'N0003',
98
+ code_name: '업무협약',
99
+ code_desc: null,
100
+ created_at: '2024-03-04T16:42:25.730Z',
101
+ creator: 'jeonghansol',
102
+ en_name: null,
103
+ etc: null,
104
+ etc2: null,
105
+ g_sorting: null,
106
+ gubun: null,
107
+ i_sorting: null,
108
+ kr_name: null,
109
+ modified_at: null,
110
+ modifier: null,
111
+ parent_code: 'notice',
112
+ sorting: 3,
113
+ use_bool: true
114
+ },
115
+ {
116
+ code: 'N0004',
117
+ code_name: '기타소식',
118
+ code_desc: null,
119
+ created_at: '2024-03-04T16:42:25.730Z',
120
+ creator: 'jeonghansol',
121
+ en_name: null,
122
+ etc: null,
123
+ etc2: null,
124
+ g_sorting: null,
125
+ gubun: null,
126
+ i_sorting: null,
127
+ kr_name: null,
128
+ modified_at: null,
129
+ modifier: null,
130
+ parent_code: 'notice',
131
+ sorting: 4,
132
+ use_bool: true
133
+ }
134
+ ];
135
+
136
+ const mockNoticeList = [
137
+ {
138
+ id: 5734,
139
+ title: '10월 3일~9일 연휴 법률상담 정상운영 공지',
140
+ summary:
141
+ '안녕하세요, 법무법인(유한) 대륜입니다.대륜은 개천절, 추석, 한글날에도 아래 일정과 같이…무소 운영으로 접근성 제고 📞아래 이미지를 클릭하시면 법률상담 접수페이지로 이동합니다.',
142
+ code_name: '기타소식',
143
+ top_count: 0
144
+ },
145
+ {
146
+ id: 5703,
147
+ title: '법무법인 대륜 변관훈변호사, 대한변호사협회 형사전문변호사에 이어 민사전문변호사 등록',
148
+ summary:
149
+ '대한변호사협회 등록 민사전문변호사… 솔루션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
150
+ code_name: '인사/동정',
151
+ top_count: 0
152
+ },
153
+ {
154
+ id: 5702,
155
+ title: '법무법인 대륜 변관훈변호사 대한변호사협회 형사전문변호사 등록',
156
+ summary:
157
+ '대한변호사협회 등록 형사전문변호사는 재…션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
158
+ code_name: '인사/동정',
159
+ top_count: 0
160
+ },
161
+ {
162
+ id: 5688,
163
+ title: '법무법인 대륜 이동근변호사 대한변호사협회 형사전문변호사 등록',
164
+ summary:
165
+ '대한변호사협회 등록 형사전문변호사는 재…션을 제공하고, 원하시는 결과를 받을 수 있도록 최선을 다할 것을 약속드리겠습니다.',
166
+ code_name: '인사/동정',
167
+ top_count: 0
168
+ },
169
+ {
170
+ id: 5687,
171
+ title: '이동근 前 경찰 영입',
172
+ summary:
173
+ '경찰 경력 이동근 책임총괄변호사 영입…울산지방경찰청 경위울산남부경찰서 경위경찰교육원하나은행한국어린이집총연합회 사내변호사',
174
+ code_name: '인사/동정',
175
+ top_count: 0
176
+ }
177
+ ];
178
+
179
+ // 기본 스토리
180
+ export const Default: Story = {
181
+ args: {
182
+ SearchBarProps: {
183
+ searchInput: '',
184
+ handleSearch: () => console.log('검색 실행'),
185
+ handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
186
+ },
187
+ PaginationProps: {
188
+ onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
189
+ totalCount: mockNoticeList.length,
190
+ currentPage: 1
191
+ },
192
+ noticeName: mockNoticeName,
193
+ noticeList: mockNoticeList,
194
+ nameFilter: { code_name: '전체', code: '' },
195
+ search: '',
196
+ indexOfFirstPost: 1,
197
+ indexOfLastPost: 10,
198
+ postPerPage: 10,
199
+ currentPage: 1,
200
+ router: mockRouter
201
+ }
202
+ };
203
+
204
+ // 검색어가 있는 상태
205
+ export const WithSearch: Story = {
206
+ args: {
207
+ SearchBarProps: {
208
+ searchInput: '법무법인',
209
+ handleSearch: () => console.log('검색 실행'),
210
+ handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
211
+ },
212
+ PaginationProps: {
213
+ onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
214
+ totalCount: mockNoticeList.length,
215
+ currentPage: 1
216
+ },
217
+ noticeName: mockNoticeName,
218
+ noticeList: mockNoticeList,
219
+ nameFilter: { code_name: '전체', code: '' },
220
+ search: '법무법인',
221
+ indexOfFirstPost: 1,
222
+ indexOfLastPost: 10,
223
+ postPerPage: 10,
224
+ currentPage: 1,
225
+ router: mockRouter
226
+ }
227
+ };
228
+
229
+ // 필터가 선택된 상태
230
+ export const WithFilter: Story = {
231
+ args: {
232
+ SearchBarProps: {
233
+ searchInput: '',
234
+ handleSearch: () => console.log('검색 실행'),
235
+ handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
236
+ },
237
+ PaginationProps: {
238
+ onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
239
+ totalCount: mockNoticeList.length,
240
+ currentPage: 1
241
+ },
242
+ noticeName: mockNoticeName,
243
+ noticeList: mockNoticeList,
244
+ nameFilter: { code_name: '사무소안내', code: 'N0001' },
245
+ search: '',
246
+ indexOfFirstPost: 1,
247
+ indexOfLastPost: 10,
248
+ postPerPage: 10,
249
+ currentPage: 1,
250
+ router: mockRouter
251
+ }
252
+ };
253
+
254
+ // 빈 목록 상태
255
+ export const EmptyList: Story = {
256
+ args: {
257
+ SearchBarProps: {
258
+ searchInput: '',
259
+ handleSearch: () => console.log('검색 실행'),
260
+ handleInputChange: e => console.log('입력 변경:', e.currentTarget.value)
261
+ },
262
+ PaginationProps: {
263
+ onPaginationChange: pageNum => console.log('페이지 변경:', pageNum),
264
+ totalCount: 0,
265
+ currentPage: 1
266
+ },
267
+ noticeName: mockNoticeName,
268
+ noticeList: [],
269
+ nameFilter: { code_name: '전체', code: '' },
270
+ search: '',
271
+ indexOfFirstPost: 1,
272
+ indexOfLastPost: 10,
273
+ postPerPage: 10,
274
+ currentPage: 1,
275
+ router: mockRouter
276
+ }
277
+ };