@daeryun/dr_components 0.4.38 → 0.4.40
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/cjs/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/components/common/integrate/index.d.ts +12 -0
- package/dist/components/common/integrate/index.jsx +71 -0
- package/dist/components/common/integrate/index.tsx +79 -0
- package/dist/components/page/Integrate/Broadcast.d.ts +20 -0
- package/dist/components/page/Integrate/Broadcast.jsx +107 -0
- package/dist/components/page/Integrate/Broadcast.tsx +246 -0
- package/dist/components/page/Integrate/Field.d.ts +21 -0
- package/dist/components/page/Integrate/Field.jsx +53 -0
- package/dist/components/page/Integrate/Field.tsx +119 -0
- package/dist/components/page/Integrate/LawInfo.d.ts +21 -0
- package/dist/components/page/Integrate/LawInfo.jsx +40 -0
- package/dist/components/page/Integrate/LawInfo.tsx +116 -0
- package/dist/components/page/Integrate/Lawyer.d.ts +36 -0
- package/dist/components/page/Integrate/Lawyer.jsx +175 -0
- package/dist/components/page/Integrate/Lawyer.tsx +394 -0
- package/dist/components/page/Integrate/Map.d.ts +20 -0
- package/dist/components/page/Integrate/Map.jsx +131 -0
- package/dist/components/page/Integrate/Map.tsx +266 -0
- package/dist/components/page/Integrate/MenuTab.d.ts +18 -0
- package/dist/components/page/Integrate/MenuTab.jsx +90 -0
- package/dist/components/page/Integrate/MenuTab.tsx +160 -0
- package/dist/components/page/Integrate/NoResult.d.ts +2 -0
- package/dist/components/page/Integrate/NoResult.jsx +14 -0
- package/dist/components/page/Integrate/NoResult.tsx +23 -0
- package/dist/components/page/Integrate/Reply.d.ts +21 -0
- package/dist/components/page/Integrate/Reply.jsx +68 -0
- package/dist/components/page/Integrate/Reply.tsx +162 -0
- package/dist/components/page/Integrate/SearchData.d.ts +19 -0
- package/dist/components/page/Integrate/SearchData.jsx +166 -0
- package/dist/components/page/Integrate/SearchData.tsx +273 -0
- package/dist/components/page/Integrate/Success.d.ts +21 -0
- package/dist/components/page/Integrate/Success.jsx +74 -0
- package/dist/components/page/Integrate/Success.tsx +167 -0
- package/dist/components/page/Integrate/Title.d.ts +10 -0
- package/dist/components/page/Integrate/Title.jsx +27 -0
- package/dist/components/page/Integrate/Title.tsx +62 -0
- package/dist/components/page/Integrate/ViewMore.d.ts +9 -0
- package/dist/components/page/Integrate/ViewMore.jsx +28 -0
- package/dist/components/page/Integrate/ViewMore.tsx +66 -0
- package/dist/components/page/Integrate/index.module.css +915 -0
- package/dist/components/page/Integrate/integrateType.d.ts +159 -0
- package/dist/components/page/Integrate/integrateType.js +30 -0
- package/dist/components/page/Integrate/integrateType.ts +171 -0
- package/dist/components/page/index.d.ts +2 -0
- package/dist/components/page/index.js +2 -0
- package/dist/components/page/index.ts +2 -0
- package/dist/styles/globals.css +1072 -161
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
import React, { RefObject, useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { NoResult } from './NoResult';
|
|
3
|
+
import { Title } from './Title';
|
|
4
|
+
import { IListPagesType, IListTypes } from './integrateType';
|
|
5
|
+
import { ViewMore } from './ViewMore';
|
|
6
|
+
import { insert } from '../../../lib';
|
|
7
|
+
import * as gtag from '../../../lib/gtag';
|
|
8
|
+
import mobile from 'is-mobile';
|
|
9
|
+
import { useRouter } from 'next/router';
|
|
10
|
+
import Link from 'next/link';
|
|
11
|
+
import Image from 'next/image';
|
|
12
|
+
import style from './index.module.css';
|
|
13
|
+
import Mark from '../../Mark/Mark';
|
|
14
|
+
|
|
15
|
+
export interface LawyerData {
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
image: string;
|
|
19
|
+
code: string;
|
|
20
|
+
array_to_string: string;
|
|
21
|
+
careers_summary?: string;
|
|
22
|
+
ability: string;
|
|
23
|
+
mark: string;
|
|
24
|
+
tel: string | null;
|
|
25
|
+
l_sort_center: string[] | null;
|
|
26
|
+
exist_l_sort_center: string[] | null;
|
|
27
|
+
l_position: string | null;
|
|
28
|
+
email: string | null;
|
|
29
|
+
group_career: string | null;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const Lawyer = (props: {
|
|
33
|
+
tab: string;
|
|
34
|
+
onMoreViewText: (str: string) => void;
|
|
35
|
+
onMoreView: () => void;
|
|
36
|
+
list: IListTypes;
|
|
37
|
+
pages: IListPagesType;
|
|
38
|
+
center_code: string;
|
|
39
|
+
listCount: {
|
|
40
|
+
lawyer: number;
|
|
41
|
+
field: number;
|
|
42
|
+
success: number;
|
|
43
|
+
info: number;
|
|
44
|
+
broadcast: number;
|
|
45
|
+
reply: number;
|
|
46
|
+
map: number;
|
|
47
|
+
};
|
|
48
|
+
}) => {
|
|
49
|
+
const { tab, onMoreViewText, list, pages, listCount } = props;
|
|
50
|
+
|
|
51
|
+
const [loading, setLoading] = useState<boolean>(false);
|
|
52
|
+
const [isMobile, setIsMobile] = useState<boolean>(false);
|
|
53
|
+
const lawyerImagePath: string = 'https://d1tgonli21s4df.cloudfront.net/upload/lawyer';
|
|
54
|
+
|
|
55
|
+
const firstAddRef = useRef<HTMLAnchorElement>(null);
|
|
56
|
+
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
const is_mobile = mobile();
|
|
59
|
+
setIsMobile(is_mobile);
|
|
60
|
+
}, []);
|
|
61
|
+
|
|
62
|
+
return props.tab === '전체' || props.tab === 'lawyer' ? (
|
|
63
|
+
//구성원 탭에서는 결과 없음
|
|
64
|
+
tab === 'lawyer' && listCount.lawyer < 1 ? (
|
|
65
|
+
<NoResult />
|
|
66
|
+
) : (
|
|
67
|
+
<>
|
|
68
|
+
{/*전체 탭에서는 없게*/}
|
|
69
|
+
{listCount.lawyer > 0 ? (
|
|
70
|
+
<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
|
|
71
|
+
<Title
|
|
72
|
+
title={'구성원'}
|
|
73
|
+
tab={tab}
|
|
74
|
+
type={'lawyer'}
|
|
75
|
+
onClick={str => onMoreViewText(str)}
|
|
76
|
+
count={listCount.lawyer}
|
|
77
|
+
/>
|
|
78
|
+
|
|
79
|
+
<div
|
|
80
|
+
className={
|
|
81
|
+
'mx-auto my-16 grid w-full grid-cols-2 gap-y-5 max-md:gap-y-2 md:grid-cols-3 xl:grid-cols-4'
|
|
82
|
+
}
|
|
83
|
+
>
|
|
84
|
+
{(tab === '전체' ? list.lawyerList.slice(0, 8) : list.lawyerList).map(
|
|
85
|
+
(item, index: number) => {
|
|
86
|
+
const newItem: ILawyerProData = {
|
|
87
|
+
id: item.id,
|
|
88
|
+
name: item.name,
|
|
89
|
+
image: item.nukki ?? '',
|
|
90
|
+
code: item.code,
|
|
91
|
+
group_career: item.group_career,
|
|
92
|
+
array_to_string: item.careers,
|
|
93
|
+
careers_summary: item.careers_summary,
|
|
94
|
+
ability: item.ability,
|
|
95
|
+
mark: item.mark,
|
|
96
|
+
tel: item.tel,
|
|
97
|
+
l_position: item.position,
|
|
98
|
+
email: item.email,
|
|
99
|
+
l_sort_center: item.l_sort_center,
|
|
100
|
+
exist_l_sort_center: item.exist_l_sort_center,
|
|
101
|
+
thumbnail: item.image
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
return (
|
|
105
|
+
<LawyerContainer
|
|
106
|
+
key={item.id}
|
|
107
|
+
center_code={props.center_code}
|
|
108
|
+
item={newItem}
|
|
109
|
+
lawyerImagePath={lawyerImagePath}
|
|
110
|
+
specialtyArr={item.l_sort_center ? item.l_sort_center : []}
|
|
111
|
+
firstAddRef={
|
|
112
|
+
index === 0 || (index > 12 && index === list.lawyerList.length - 12)
|
|
113
|
+
? firstAddRef
|
|
114
|
+
: null
|
|
115
|
+
}
|
|
116
|
+
/>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
)}
|
|
120
|
+
</div>
|
|
121
|
+
{tab != '전체' && (
|
|
122
|
+
<ViewMore
|
|
123
|
+
flag={list.lawyerList.length != listCount.lawyer}
|
|
124
|
+
func={() => {
|
|
125
|
+
setLoading(true);
|
|
126
|
+
props.onMoreView();
|
|
127
|
+
setLoading(false);
|
|
128
|
+
}}
|
|
129
|
+
loading={loading}
|
|
130
|
+
totalPage={Math.ceil(listCount.lawyer / 12)}
|
|
131
|
+
nowPage={pages.lawyerList}
|
|
132
|
+
/>
|
|
133
|
+
)}
|
|
134
|
+
</div>
|
|
135
|
+
) : (
|
|
136
|
+
<></>
|
|
137
|
+
)}
|
|
138
|
+
</>
|
|
139
|
+
)
|
|
140
|
+
) : null;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
export default Lawyer;
|
|
144
|
+
|
|
145
|
+
interface ILawyerProData extends LawyerData {
|
|
146
|
+
thumbnail?: string;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const LawyerContainer = (props: {
|
|
150
|
+
item: ILawyerProData;
|
|
151
|
+
lawyerImagePath: string;
|
|
152
|
+
center_code: string;
|
|
153
|
+
selectedFilter?: string; // 이미지 alt 용
|
|
154
|
+
specialtyArr?: string[]; // 업무 분야
|
|
155
|
+
onClickTel?: () => void; // 전화번호 클릭 이벤트
|
|
156
|
+
isPro?: boolean; // true 일 시 특수분야 전문가
|
|
157
|
+
firstAddRef?: RefObject<HTMLAnchorElement> | null; //통합검색용 접근성
|
|
158
|
+
}) => {
|
|
159
|
+
const {
|
|
160
|
+
item,
|
|
161
|
+
lawyerImagePath,
|
|
162
|
+
selectedFilter = '',
|
|
163
|
+
specialtyArr = [],
|
|
164
|
+
onClickTel,
|
|
165
|
+
isPro = false,
|
|
166
|
+
firstAddRef = null
|
|
167
|
+
} = props;
|
|
168
|
+
const router = useRouter();
|
|
169
|
+
|
|
170
|
+
const MailClick = () => {
|
|
171
|
+
gtag.event({
|
|
172
|
+
action: 'mail_complete',
|
|
173
|
+
category: 'mail',
|
|
174
|
+
label: '변호사이메일버튼',
|
|
175
|
+
value: '1'
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
if (!isPro) {
|
|
180
|
+
return (
|
|
181
|
+
<span className={'relative flex justify-center'}>
|
|
182
|
+
<div className={'flex w-[95%] flex-col sm:w-[80%]'}>
|
|
183
|
+
<Link
|
|
184
|
+
href={{
|
|
185
|
+
pathname: '/lawyer/' + item.id
|
|
186
|
+
}}
|
|
187
|
+
tabIndex={-1}
|
|
188
|
+
>
|
|
189
|
+
<div className={'relative flex items-center justify-center bg-[#F8F8F8]'}>
|
|
190
|
+
<Image
|
|
191
|
+
loading={'lazy'}
|
|
192
|
+
src={lawyerImagePath + '/' + item.image}
|
|
193
|
+
alt={
|
|
194
|
+
item.array_to_string &&
|
|
195
|
+
item.array_to_string.indexOf(selectedFilter) > -1 &&
|
|
196
|
+
selectedFilter !== '전체'
|
|
197
|
+
? `${selectedFilter}전문변호사 ${item.name} ${item.code}`
|
|
198
|
+
: `${item.name} ${item.code}`
|
|
199
|
+
}
|
|
200
|
+
title={
|
|
201
|
+
item.array_to_string &&
|
|
202
|
+
item.array_to_string.indexOf(selectedFilter) > -1 &&
|
|
203
|
+
selectedFilter !== '전체'
|
|
204
|
+
? `${selectedFilter}전문변호사 ${item.name} ${item.code}`
|
|
205
|
+
: `${item.name} ${item.code}`
|
|
206
|
+
}
|
|
207
|
+
width={210}
|
|
208
|
+
height={280}
|
|
209
|
+
className={'mt-6 h-auto w-[90%]'}
|
|
210
|
+
quality={100}
|
|
211
|
+
/>
|
|
212
|
+
{item.mark ? (
|
|
213
|
+
<Mark
|
|
214
|
+
type={item.mark}
|
|
215
|
+
color={'#e8bb71'}
|
|
216
|
+
className={'absolute bottom-[15px] right-[15px] h-auto w-[25%]'}
|
|
217
|
+
/>
|
|
218
|
+
) : (
|
|
219
|
+
<></>
|
|
220
|
+
)}
|
|
221
|
+
</div>
|
|
222
|
+
</Link>
|
|
223
|
+
<div className={'m-3 flex h-full flex-col justify-between'}>
|
|
224
|
+
<Link
|
|
225
|
+
href={{
|
|
226
|
+
pathname: '/lawyer/' + item.id,
|
|
227
|
+
query: {
|
|
228
|
+
...router.query
|
|
229
|
+
}
|
|
230
|
+
}}
|
|
231
|
+
ref={firstAddRef}
|
|
232
|
+
>
|
|
233
|
+
<span>
|
|
234
|
+
<div className={'flex items-center justify-between'}>
|
|
235
|
+
<p
|
|
236
|
+
className={
|
|
237
|
+
'my-2 text-[20px] font-[700] tracking-[-1.6px] sm:text-[25px] lg:text-[32px]'
|
|
238
|
+
}
|
|
239
|
+
>
|
|
240
|
+
{item.name}
|
|
241
|
+
</p>
|
|
242
|
+
<Image
|
|
243
|
+
draggable={'false'}
|
|
244
|
+
alt=""
|
|
245
|
+
src={`/images/lawyer/arr_bl.webp`}
|
|
246
|
+
className={'h-auto w-[15px] sm:h-auto sm:w-[20px]'}
|
|
247
|
+
width={34}
|
|
248
|
+
height={40}
|
|
249
|
+
/>
|
|
250
|
+
</div>
|
|
251
|
+
|
|
252
|
+
<p className={'text-[16px] font-[600] tracking-[-1px] text-[#454545] lg:text-[22px]'}>
|
|
253
|
+
{item.code}
|
|
254
|
+
</p>
|
|
255
|
+
|
|
256
|
+
{item.l_position ? (
|
|
257
|
+
<p
|
|
258
|
+
className={
|
|
259
|
+
' bg-[#F7FBFF] py-1 text-[14px] font-[600] tracking-[-1px] text-[#454545] lg:text-[18px]'
|
|
260
|
+
}
|
|
261
|
+
>
|
|
262
|
+
{item.l_position}
|
|
263
|
+
</p>
|
|
264
|
+
) : (
|
|
265
|
+
<div className={'h-[35px] max-lg:hidden'}></div>
|
|
266
|
+
)}
|
|
267
|
+
</span>
|
|
268
|
+
</Link>
|
|
269
|
+
{item.group_career &&
|
|
270
|
+
item.group_career != '' &&
|
|
271
|
+
item.exist_l_sort_center?.includes(props.center_code) ? (
|
|
272
|
+
<p
|
|
273
|
+
className={
|
|
274
|
+
'mt-[11px] whitespace-pre-wrap text-[14px] font-[800] leading-tight tracking-[-1px] text-[#285FA7] lg:text-[18px] ' +
|
|
275
|
+
(item.group_career.length > 32 ? 'break-all' : '')
|
|
276
|
+
}
|
|
277
|
+
>
|
|
278
|
+
{item.group_career.length > 32
|
|
279
|
+
? item.group_career.replace(',', ', ')
|
|
280
|
+
: item.group_career.replace(',', '\n')}
|
|
281
|
+
</p>
|
|
282
|
+
) : (
|
|
283
|
+
<p
|
|
284
|
+
className={`
|
|
285
|
+
${item.ability.length > 29 ? '' : 'break-keep '}
|
|
286
|
+
${
|
|
287
|
+
item.ability.length > 29
|
|
288
|
+
? 'text-[13px] lg:text-[16px] '
|
|
289
|
+
: 'text-[14px] lg:text-[18px] '
|
|
290
|
+
}whitespace-pre-wrap mt-[11px] font-medium leading-tight tracking-[-1px] text-[#143F79] max-lg:mb-[5px]`}
|
|
291
|
+
>
|
|
292
|
+
<span className="font-[800] max-sm:hidden">{item.ability}</span>
|
|
293
|
+
<span className="font-[800] sm:hidden">
|
|
294
|
+
{item.ability.length > 29 ? item.ability.split('\n').join(', ') : item.ability}
|
|
295
|
+
</span>
|
|
296
|
+
</p>
|
|
297
|
+
)}
|
|
298
|
+
<span className={'relative mb-[10px] mt-[5px] max-lg:my-[2px] '}>
|
|
299
|
+
{item.tel ? (
|
|
300
|
+
<Link
|
|
301
|
+
onClick={onClickTel}
|
|
302
|
+
href={'tel:' + item.tel}
|
|
303
|
+
className={'block w-fit'}
|
|
304
|
+
aria-label={item.name + '변호사에게 전화하기 ' + item.tel}
|
|
305
|
+
>
|
|
306
|
+
<p className={'text-[14px] font-[600] max-xs:text-[12px] lg:text-[18px]'}>
|
|
307
|
+
T. <span className={'font-[800] text-[#6e6e6e] underline'}>{item.tel}</span>
|
|
308
|
+
</p>
|
|
309
|
+
</Link>
|
|
310
|
+
) : (
|
|
311
|
+
<div className={'h-[21px] lg:h-[27px]'}></div>
|
|
312
|
+
)}
|
|
313
|
+
{/*이메일*/}
|
|
314
|
+
{item.email ? (
|
|
315
|
+
<Link
|
|
316
|
+
href={'https://www.daeryunlaw.com/mail?lawyer=' + item.name}
|
|
317
|
+
rel={'nofollow'}
|
|
318
|
+
className={'absolute -bottom-[2px] right-0 block h-fit w-fit '}
|
|
319
|
+
aria-label={item.name + '변호사에게 메일보내기'}
|
|
320
|
+
>
|
|
321
|
+
<Image
|
|
322
|
+
src={'/images/lawyer/email_icon.webp'}
|
|
323
|
+
alt={'이메일'}
|
|
324
|
+
width={64}
|
|
325
|
+
height={64}
|
|
326
|
+
className={'w-[32px] max-lg:w-[28px] max-xs:w-[25px]'}
|
|
327
|
+
/>
|
|
328
|
+
</Link>
|
|
329
|
+
) : (
|
|
330
|
+
<></>
|
|
331
|
+
)}
|
|
332
|
+
</span>
|
|
333
|
+
{specialtyArr.length > 1 ? (
|
|
334
|
+
<div className={'relative mt-2 border-t border-solid border-[#D0D0D0]'}>
|
|
335
|
+
<p
|
|
336
|
+
className={
|
|
337
|
+
'mt-3 line-clamp-1 text-ellipsis text-[14px] font-medium text-[#6e6e6e] lg:text-[18px]'
|
|
338
|
+
}
|
|
339
|
+
>
|
|
340
|
+
{specialtyArr.join('·')} 전문
|
|
341
|
+
</p>
|
|
342
|
+
</div>
|
|
343
|
+
) : (
|
|
344
|
+
<></>
|
|
345
|
+
)}
|
|
346
|
+
</div>
|
|
347
|
+
</div>
|
|
348
|
+
</span>
|
|
349
|
+
);
|
|
350
|
+
} else {
|
|
351
|
+
return (
|
|
352
|
+
<Link
|
|
353
|
+
href={{
|
|
354
|
+
pathname: '/lawyer/' + item.id
|
|
355
|
+
}}
|
|
356
|
+
ref={firstAddRef}
|
|
357
|
+
key={item.id}
|
|
358
|
+
className={'flex justify-center'}
|
|
359
|
+
aria-label={`${item.name} ${item.code}`}
|
|
360
|
+
>
|
|
361
|
+
<div className={'w-[90%] sm:w-[80%]'}>
|
|
362
|
+
<div className={'relative flex items-center justify-center bg-[#F8F8F8]'}>
|
|
363
|
+
<Image
|
|
364
|
+
src={lawyerImagePath + '/' + (item.image ? item.image : item.thumbnail)}
|
|
365
|
+
alt={item.name}
|
|
366
|
+
title={item.name}
|
|
367
|
+
width={210}
|
|
368
|
+
height={280}
|
|
369
|
+
className={'mt-6 h-auto w-[90%]'}
|
|
370
|
+
/>
|
|
371
|
+
</div>
|
|
372
|
+
<div className={style.textbox}>
|
|
373
|
+
<div className={'m-3'}>
|
|
374
|
+
<div className={'flex items-center justify-between'}>
|
|
375
|
+
<p className={'my-2 text-[20px] font-[800] tracking-[-1.6px] sm:text-[28px]'}>
|
|
376
|
+
{item.name}
|
|
377
|
+
</p>
|
|
378
|
+
<Image
|
|
379
|
+
draggable={'false'}
|
|
380
|
+
alt=""
|
|
381
|
+
src={`/images/profile.webp`}
|
|
382
|
+
className={'h-[16px] w-[13px] sm:h-[20px] sm:w-[16px]'}
|
|
383
|
+
width={34}
|
|
384
|
+
height={40}
|
|
385
|
+
/>
|
|
386
|
+
</div>
|
|
387
|
+
<p className={'text-lg font-[600] tracking-[-1.1px] text-[#454545]'}>{item.code}</p>
|
|
388
|
+
</div>
|
|
389
|
+
</div>
|
|
390
|
+
</div>
|
|
391
|
+
</Link>
|
|
392
|
+
);
|
|
393
|
+
}
|
|
394
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IListPagesType, IListTypes } from './integrateType';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare const Map: (props: {
|
|
4
|
+
tab: string;
|
|
5
|
+
onMoreViewText: (str: string) => void;
|
|
6
|
+
onMoreView: () => void;
|
|
7
|
+
list: IListTypes;
|
|
8
|
+
pages: IListPagesType;
|
|
9
|
+
search: string;
|
|
10
|
+
listCount: {
|
|
11
|
+
lawyer: number;
|
|
12
|
+
field: number;
|
|
13
|
+
success: number;
|
|
14
|
+
info: number;
|
|
15
|
+
broadcast: number;
|
|
16
|
+
reply: number;
|
|
17
|
+
map: number;
|
|
18
|
+
};
|
|
19
|
+
}) => React.JSX.Element | null;
|
|
20
|
+
export default Map;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import React, { useRef, useState } from 'react';
|
|
11
|
+
import Image from 'next/image';
|
|
12
|
+
import { NoResult } from './NoResult';
|
|
13
|
+
import { Title } from './Title';
|
|
14
|
+
import { ViewMore } from './ViewMore';
|
|
15
|
+
import { useRouter } from 'next/router';
|
|
16
|
+
import { searchColorText } from '../../common/integrate';
|
|
17
|
+
const Map = (props) => {
|
|
18
|
+
const router = useRouter();
|
|
19
|
+
const { tab, onMoreViewText, list, pages } = props;
|
|
20
|
+
const [loading, setLoading] = useState(false);
|
|
21
|
+
const firstAddRef = useRef(null);
|
|
22
|
+
return props.tab === '전체' || props.tab === 'map' ? (
|
|
23
|
+
//구성원 탭에서는 결과 없음
|
|
24
|
+
tab === 'map' && props.listCount.map < 1 ? (<NoResult />) : (<>
|
|
25
|
+
{/*전체 탭에서는 없게*/}
|
|
26
|
+
{props.listCount.map > 0 ? (<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
|
|
27
|
+
<Title title={'오시는길'} tab={tab} type={'map'} count={props.listCount.map} onClick={() => __awaiter(void 0, void 0, void 0, function* () {
|
|
28
|
+
yield router.push('/map');
|
|
29
|
+
})}/>
|
|
30
|
+
|
|
31
|
+
<div className={'mt-[-1.5rem] w-full'}>
|
|
32
|
+
{(tab === '전체' && !props.search && list.mainMapList
|
|
33
|
+
? list.mainMapList.slice(0, 5)
|
|
34
|
+
: tab === '전체' && props.search
|
|
35
|
+
? list.mapList.slice(0, 5)
|
|
36
|
+
: list.mapList).map((item, index) => {
|
|
37
|
+
var _a, _b, _c;
|
|
38
|
+
return (<div key={'integrate_' + item.key} className={'group/mapBox flex gap-[60px] border-b-[1px] border-solid border-[#DDDDDD] hover:bg-[#FCFCFC] ' +
|
|
39
|
+
//1280px
|
|
40
|
+
'max-xl:gap-[0] ' +
|
|
41
|
+
//1024px
|
|
42
|
+
'max-lg:flex-col max-lg:px-[40px] ' +
|
|
43
|
+
//768px
|
|
44
|
+
'max-md:px-[25px] '}>
|
|
45
|
+
<span className={'relative w-[450px] shrink-0 px-[40px] py-[45px] ' +
|
|
46
|
+
//1024px
|
|
47
|
+
'max-lg:w-full max-lg:border-b-[1px] max-lg:border-solid max-lg:border-[#DDDDDD] max-lg:px-0 max-lg:py-[40px] ' +
|
|
48
|
+
//768px
|
|
49
|
+
'max-md:py-[30px] ' +
|
|
50
|
+
//640px
|
|
51
|
+
'max-sm:border-0'}>
|
|
52
|
+
<p className={'text-[22px] font-normal leading-none tracking-[-1.2px] ' +
|
|
53
|
+
//768px
|
|
54
|
+
'max-md:text-[20px]'}>
|
|
55
|
+
{item.lawyer_text}
|
|
56
|
+
</p>
|
|
57
|
+
<p className={'mt-[12px] text-[26px] font-bold leading-none tracking-[-1.4px] ' +
|
|
58
|
+
//768px
|
|
59
|
+
'max-md:mt-[8px] max-md:text-[24px]'}>
|
|
60
|
+
{searchColorText(item.title, props.search)}
|
|
61
|
+
</p>
|
|
62
|
+
<button className={'mt-[40px] flex w-[250px] items-center justify-between border-[1px] border-solid border-[#0F0F0F] bg-white p-[20px] ' +
|
|
63
|
+
//1024px
|
|
64
|
+
'max-lg:absolute max-lg:right-0 max-lg:top-[50%] max-lg:m-0 max-lg:w-[200px] max-lg:translate-y-[-50%] max-lg:p-[16px] ' +
|
|
65
|
+
//768px
|
|
66
|
+
'max-md:w-[160px] max-md:p-[14px] ' +
|
|
67
|
+
//640px
|
|
68
|
+
'max-sm:relative max-sm:mx-auto max-sm:mt-[30px] max-sm:w-[85%] max-sm:translate-y-0'} onClick={() => {
|
|
69
|
+
void router.push('/map/' + item.key);
|
|
70
|
+
}} aria-label={item.title + ' 자세히 보기'} ref={index === 0 || (index > 12 && index === list.mapList.length - 12)
|
|
71
|
+
? firstAddRef
|
|
72
|
+
: null}>
|
|
73
|
+
<span className={'text-[18px] font-[600] leading-none tracking-[-1px] ' +
|
|
74
|
+
//1024px
|
|
75
|
+
'max-lg:text-[16px] '}>
|
|
76
|
+
자세히보기
|
|
77
|
+
</span>
|
|
78
|
+
<Image src={'/images/integrate/window.webp'} alt={''} width={30} height={30} objectFit={'cover'} className={'aspect-square w-[16px] ' +
|
|
79
|
+
//1024px
|
|
80
|
+
'max-lg:w-[14px]'}/>
|
|
81
|
+
</button>
|
|
82
|
+
</span>
|
|
83
|
+
<span className={'grow ' +
|
|
84
|
+
//640px
|
|
85
|
+
'max-sm:hidden'}>
|
|
86
|
+
<MapInfoCon locale={(_a = router.locale) !== null && _a !== void 0 ? _a : ''} title={'주소'} text={<>
|
|
87
|
+
{item.address
|
|
88
|
+
.replaceAll('법무법인(유한)대륜', '')
|
|
89
|
+
.replaceAll('법무법인(유한) 대륜', '')}
|
|
90
|
+
</>}/>
|
|
91
|
+
<MapInfoCon locale={(_b = router.locale) !== null && _b !== void 0 ? _b : ''} title={'업무시간'} text={<>
|
|
92
|
+
{item.worktime.split(' | ').map((i, index) => (<span key={item.key + '_work_time_' + index} className={'block'}>
|
|
93
|
+
{i}
|
|
94
|
+
</span>))}
|
|
95
|
+
</>}/>
|
|
96
|
+
<MapInfoCon locale={(_c = router.locale) !== null && _c !== void 0 ? _c : ''} title={'대표번호'} text={<>{item.tel}</>}/>
|
|
97
|
+
</span>
|
|
98
|
+
</div>);
|
|
99
|
+
})}
|
|
100
|
+
</div>
|
|
101
|
+
{tab != '전체' ? (<ViewMore flag={list.mapList.length != props.listCount.map} func={() => {
|
|
102
|
+
setLoading(true);
|
|
103
|
+
props.onMoreView();
|
|
104
|
+
setLoading(false);
|
|
105
|
+
}} loading={loading} totalPage={Math.ceil(props.listCount.map / 12)} nowPage={pages.mapList}/>) : (<button className={'relative m-auto mb-20 mt-20 flex w-[10em] cursor-pointer items-center justify-between border-[1px] border-solid border-[#707070] px-5 py-4 text-[#666666]'} onClick={str => onMoreViewText('map')} aria-label={'오시는길 더보기'}>
|
|
106
|
+
<span className={'pt-[2px] leading-[15px] text-[#666666] '}>더보기</span>
|
|
107
|
+
<Image src={'/images/plus_g.webp'} alt={'+'} title={'+'} width={30} height={30} className={'aspect-square w-[18px] max-lg:w-[16px] max-sm:w-[15px] max-2xs:w-[13px]'}/>
|
|
108
|
+
</button>)}
|
|
109
|
+
</div>) : (<></>)}
|
|
110
|
+
</>)) : null;
|
|
111
|
+
};
|
|
112
|
+
export default Map;
|
|
113
|
+
const MapInfoCon = (props) => {
|
|
114
|
+
return (<div className={'flex items-start gap-[30px] border-b-[1px] border-solid border-[#DDDDDD] py-[35px] last:border-0 ' +
|
|
115
|
+
//1024px
|
|
116
|
+
'max-lg:py-[25px] ' +
|
|
117
|
+
//768px
|
|
118
|
+
'max-md:py-[20px]'}>
|
|
119
|
+
<p className={'block shrink-0 text-[18px] font-[600] leading-[30px] tracking-[-1px] ' +
|
|
120
|
+
//768px
|
|
121
|
+
'max-md:text-[16px] max-md:leading-[27px] ' +
|
|
122
|
+
`${props.locale === 'en' ? ' w-[110px] max-md:w-[100px]' : ' w-[75px] max-md:w-[60px]'}`}>
|
|
123
|
+
{props.title}
|
|
124
|
+
</p>
|
|
125
|
+
<p className={'text-[20px] font-[300] leading-[1.5] tracking-[-1.2px] ' +
|
|
126
|
+
//768px
|
|
127
|
+
'max-md:text-[18px] '}>
|
|
128
|
+
{props.text}
|
|
129
|
+
</p>
|
|
130
|
+
</div>);
|
|
131
|
+
};
|