@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,116 @@
|
|
|
1
|
+
import React, { useRef, useState } from 'react';
|
|
2
|
+
import Link from 'next/link';
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { NoResult } from './NoResult';
|
|
5
|
+
import { IListPagesType, IListTypes } from './integrateType';
|
|
6
|
+
import { Title } from './Title';
|
|
7
|
+
import { ViewMore } from './ViewMore';
|
|
8
|
+
import { searchColorText } from '../../common/integrate';
|
|
9
|
+
|
|
10
|
+
const LawInfo = (props: {
|
|
11
|
+
tab: string;
|
|
12
|
+
onMoreViewText: (str: string) => void;
|
|
13
|
+
onMoreView: () => void;
|
|
14
|
+
list: IListTypes;
|
|
15
|
+
pages: IListPagesType;
|
|
16
|
+
center_code: string;
|
|
17
|
+
listCount: {
|
|
18
|
+
lawyer: number;
|
|
19
|
+
field: number;
|
|
20
|
+
success: number;
|
|
21
|
+
info: number;
|
|
22
|
+
broadcast: number;
|
|
23
|
+
reply: number;
|
|
24
|
+
map: number;
|
|
25
|
+
};
|
|
26
|
+
search: string;
|
|
27
|
+
}) => {
|
|
28
|
+
const { tab, onMoreViewText, list, pages, onMoreView, search, listCount } = props;
|
|
29
|
+
const [loading, setLoading] = useState<boolean>(false);
|
|
30
|
+
|
|
31
|
+
const firstAddRef = useRef<HTMLAnchorElement>(null);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<>
|
|
35
|
+
{tab === '전체' || tab === 'info' ? (
|
|
36
|
+
tab === 'info' && listCount.info < 1 ? (
|
|
37
|
+
<NoResult />
|
|
38
|
+
) : (
|
|
39
|
+
<>
|
|
40
|
+
{listCount.info > 0 ? (
|
|
41
|
+
<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
|
|
42
|
+
<Title
|
|
43
|
+
title={'법률정보'}
|
|
44
|
+
tab={tab}
|
|
45
|
+
type={'info'}
|
|
46
|
+
onClick={str => onMoreViewText(str)}
|
|
47
|
+
count={listCount.info}
|
|
48
|
+
/>
|
|
49
|
+
|
|
50
|
+
<div
|
|
51
|
+
className={
|
|
52
|
+
'grid w-full gap-[40px] sm:grid-cols-2 sm:gap-[30px] lg:grid-cols-4 lg:gap-[16px]'
|
|
53
|
+
}
|
|
54
|
+
>
|
|
55
|
+
{(tab === '전체' ? list.infoList.slice(0, 4) : list.infoList).map((item, index) => {
|
|
56
|
+
return (
|
|
57
|
+
<Link
|
|
58
|
+
key={item.pathname + 'lawinfo_new/' + item.idx}
|
|
59
|
+
href={item.pathname + 'lawinfo_new/' + item.idx}
|
|
60
|
+
target={item.center_code === props.center_code ? '' : '_blank'}
|
|
61
|
+
className={'mb-3 flex flex-col gap-3 overflow-hidden'}
|
|
62
|
+
ref={
|
|
63
|
+
index === 0 || (index > 12 && index === list.infoList.length - 12)
|
|
64
|
+
? firstAddRef
|
|
65
|
+
: null
|
|
66
|
+
}
|
|
67
|
+
>
|
|
68
|
+
<div
|
|
69
|
+
className={
|
|
70
|
+
'relative aspect-[1.47] w-full overflow-hidden max-sm:h-full max-sm:w-full'
|
|
71
|
+
}
|
|
72
|
+
>
|
|
73
|
+
<Image
|
|
74
|
+
src={'https://d1tgonli21s4df.cloudfront.net' + item.img}
|
|
75
|
+
alt={item.alt}
|
|
76
|
+
fill
|
|
77
|
+
sizes="(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 25vw"
|
|
78
|
+
className={'h-full w-full object-contain '}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
<p
|
|
82
|
+
className={
|
|
83
|
+
'mt-1 w-full text-[19px] text-black max-xl:text-[18px] max-sm:text-[16px] '
|
|
84
|
+
}
|
|
85
|
+
>
|
|
86
|
+
{searchColorText(item.title, search)}
|
|
87
|
+
</p>
|
|
88
|
+
</Link>
|
|
89
|
+
);
|
|
90
|
+
})}
|
|
91
|
+
</div>
|
|
92
|
+
{tab != '전체' && (
|
|
93
|
+
<ViewMore
|
|
94
|
+
flag={list.infoList.length != listCount.info}
|
|
95
|
+
loading={loading}
|
|
96
|
+
totalPage={Math.ceil(listCount.info / 12)}
|
|
97
|
+
nowPage={pages.infoList}
|
|
98
|
+
func={() => {
|
|
99
|
+
setLoading(true);
|
|
100
|
+
onMoreView();
|
|
101
|
+
setLoading(false);
|
|
102
|
+
}}
|
|
103
|
+
/>
|
|
104
|
+
)}
|
|
105
|
+
</div>
|
|
106
|
+
) : (
|
|
107
|
+
<></>
|
|
108
|
+
)}
|
|
109
|
+
</>
|
|
110
|
+
)
|
|
111
|
+
) : null}
|
|
112
|
+
</>
|
|
113
|
+
);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
export default LawInfo;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IListPagesType, IListTypes } from './integrateType';
|
|
3
|
+
export interface LawyerData {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
image: string;
|
|
7
|
+
code: string;
|
|
8
|
+
array_to_string: string;
|
|
9
|
+
careers_summary?: string;
|
|
10
|
+
ability: string;
|
|
11
|
+
mark: string;
|
|
12
|
+
tel: string | null;
|
|
13
|
+
l_sort_center: string[] | null;
|
|
14
|
+
exist_l_sort_center: string[] | null;
|
|
15
|
+
l_position: string | null;
|
|
16
|
+
email: string | null;
|
|
17
|
+
group_career: string | null;
|
|
18
|
+
}
|
|
19
|
+
declare const Lawyer: (props: {
|
|
20
|
+
tab: string;
|
|
21
|
+
onMoreViewText: (str: string) => void;
|
|
22
|
+
onMoreView: () => void;
|
|
23
|
+
list: IListTypes;
|
|
24
|
+
pages: IListPagesType;
|
|
25
|
+
center_code: string;
|
|
26
|
+
listCount: {
|
|
27
|
+
lawyer: number;
|
|
28
|
+
field: number;
|
|
29
|
+
success: number;
|
|
30
|
+
info: number;
|
|
31
|
+
broadcast: number;
|
|
32
|
+
reply: number;
|
|
33
|
+
map: number;
|
|
34
|
+
};
|
|
35
|
+
}) => React.JSX.Element | null;
|
|
36
|
+
export default Lawyer;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
2
|
+
import { NoResult } from './NoResult';
|
|
3
|
+
import { Title } from './Title';
|
|
4
|
+
import { ViewMore } from './ViewMore';
|
|
5
|
+
import * as gtag from '../../../lib/gtag';
|
|
6
|
+
import mobile from 'is-mobile';
|
|
7
|
+
import { useRouter } from 'next/router';
|
|
8
|
+
import Link from 'next/link';
|
|
9
|
+
import Image from 'next/image';
|
|
10
|
+
import style from './index.module.css';
|
|
11
|
+
import Mark from '../../Mark/Mark';
|
|
12
|
+
const Lawyer = (props) => {
|
|
13
|
+
const { tab, onMoreViewText, list, pages, listCount } = props;
|
|
14
|
+
const [loading, setLoading] = useState(false);
|
|
15
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
16
|
+
const lawyerImagePath = 'https://d1tgonli21s4df.cloudfront.net/upload/lawyer';
|
|
17
|
+
const firstAddRef = useRef(null);
|
|
18
|
+
useEffect(() => {
|
|
19
|
+
const is_mobile = mobile();
|
|
20
|
+
setIsMobile(is_mobile);
|
|
21
|
+
}, []);
|
|
22
|
+
return props.tab === '전체' || props.tab === 'lawyer' ? (
|
|
23
|
+
//구성원 탭에서는 결과 없음
|
|
24
|
+
tab === 'lawyer' && listCount.lawyer < 1 ? (<NoResult />) : (<>
|
|
25
|
+
{/*전체 탭에서는 없게*/}
|
|
26
|
+
{listCount.lawyer > 0 ? (<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
|
|
27
|
+
<Title title={'구성원'} tab={tab} type={'lawyer'} onClick={str => onMoreViewText(str)} count={listCount.lawyer}/>
|
|
28
|
+
|
|
29
|
+
<div className={'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'}>
|
|
30
|
+
{(tab === '전체' ? list.lawyerList.slice(0, 8) : list.lawyerList).map((item, index) => {
|
|
31
|
+
var _a;
|
|
32
|
+
const newItem = {
|
|
33
|
+
id: item.id,
|
|
34
|
+
name: item.name,
|
|
35
|
+
image: (_a = item.nukki) !== null && _a !== void 0 ? _a : '',
|
|
36
|
+
code: item.code,
|
|
37
|
+
group_career: item.group_career,
|
|
38
|
+
array_to_string: item.careers,
|
|
39
|
+
careers_summary: item.careers_summary,
|
|
40
|
+
ability: item.ability,
|
|
41
|
+
mark: item.mark,
|
|
42
|
+
tel: item.tel,
|
|
43
|
+
l_position: item.position,
|
|
44
|
+
email: item.email,
|
|
45
|
+
l_sort_center: item.l_sort_center,
|
|
46
|
+
exist_l_sort_center: item.exist_l_sort_center,
|
|
47
|
+
thumbnail: item.image
|
|
48
|
+
};
|
|
49
|
+
return (<LawyerContainer key={item.id} center_code={props.center_code} item={newItem} lawyerImagePath={lawyerImagePath} specialtyArr={item.l_sort_center ? item.l_sort_center : []} firstAddRef={index === 0 || (index > 12 && index === list.lawyerList.length - 12)
|
|
50
|
+
? firstAddRef
|
|
51
|
+
: null}/>);
|
|
52
|
+
})}
|
|
53
|
+
</div>
|
|
54
|
+
{tab != '전체' && (<ViewMore flag={list.lawyerList.length != listCount.lawyer} func={() => {
|
|
55
|
+
setLoading(true);
|
|
56
|
+
props.onMoreView();
|
|
57
|
+
setLoading(false);
|
|
58
|
+
}} loading={loading} totalPage={Math.ceil(listCount.lawyer / 12)} nowPage={pages.lawyerList}/>)}
|
|
59
|
+
</div>) : (<></>)}
|
|
60
|
+
</>)) : null;
|
|
61
|
+
};
|
|
62
|
+
export default Lawyer;
|
|
63
|
+
const LawyerContainer = (props) => {
|
|
64
|
+
var _a;
|
|
65
|
+
const { item, lawyerImagePath, selectedFilter = '', specialtyArr = [], onClickTel, isPro = false, firstAddRef = null } = props;
|
|
66
|
+
const router = useRouter();
|
|
67
|
+
const MailClick = () => {
|
|
68
|
+
gtag.event({
|
|
69
|
+
action: 'mail_complete',
|
|
70
|
+
category: 'mail',
|
|
71
|
+
label: '변호사이메일버튼',
|
|
72
|
+
value: '1'
|
|
73
|
+
});
|
|
74
|
+
};
|
|
75
|
+
if (!isPro) {
|
|
76
|
+
return (<span className={'relative flex justify-center'}>
|
|
77
|
+
<div className={'flex w-[95%] flex-col sm:w-[80%]'}>
|
|
78
|
+
<Link href={{
|
|
79
|
+
pathname: '/lawyer/' + item.id
|
|
80
|
+
}} tabIndex={-1}>
|
|
81
|
+
<div className={'relative flex items-center justify-center bg-[#F8F8F8]'}>
|
|
82
|
+
<Image loading={'lazy'} src={lawyerImagePath + '/' + item.image} alt={item.array_to_string &&
|
|
83
|
+
item.array_to_string.indexOf(selectedFilter) > -1 &&
|
|
84
|
+
selectedFilter !== '전체'
|
|
85
|
+
? `${selectedFilter}전문변호사 ${item.name} ${item.code}`
|
|
86
|
+
: `${item.name} ${item.code}`} title={item.array_to_string &&
|
|
87
|
+
item.array_to_string.indexOf(selectedFilter) > -1 &&
|
|
88
|
+
selectedFilter !== '전체'
|
|
89
|
+
? `${selectedFilter}전문변호사 ${item.name} ${item.code}`
|
|
90
|
+
: `${item.name} ${item.code}`} width={210} height={280} className={'mt-6 h-auto w-[90%]'} quality={100}/>
|
|
91
|
+
{item.mark ? (<Mark type={item.mark} color={'#e8bb71'} className={'absolute bottom-[15px] right-[15px] h-auto w-[25%]'}/>) : (<></>)}
|
|
92
|
+
</div>
|
|
93
|
+
</Link>
|
|
94
|
+
<div className={'m-3 flex h-full flex-col justify-between'}>
|
|
95
|
+
<Link href={{
|
|
96
|
+
pathname: '/lawyer/' + item.id,
|
|
97
|
+
query: Object.assign({}, router.query)
|
|
98
|
+
}} ref={firstAddRef}>
|
|
99
|
+
<span>
|
|
100
|
+
<div className={'flex items-center justify-between'}>
|
|
101
|
+
<p className={'my-2 text-[20px] font-[700] tracking-[-1.6px] sm:text-[25px] lg:text-[32px]'}>
|
|
102
|
+
{item.name}
|
|
103
|
+
</p>
|
|
104
|
+
<Image draggable={'false'} alt="" src={`/images/lawyer/arr_bl.webp`} className={'h-auto w-[15px] sm:h-auto sm:w-[20px]'} width={34} height={40}/>
|
|
105
|
+
</div>
|
|
106
|
+
|
|
107
|
+
<p className={'text-[16px] font-[600] tracking-[-1px] text-[#454545] lg:text-[22px]'}>
|
|
108
|
+
{item.code}
|
|
109
|
+
</p>
|
|
110
|
+
|
|
111
|
+
{item.l_position ? (<p className={' bg-[#F7FBFF] py-1 text-[14px] font-[600] tracking-[-1px] text-[#454545] lg:text-[18px]'}>
|
|
112
|
+
{item.l_position}
|
|
113
|
+
</p>) : (<div className={'h-[35px] max-lg:hidden'}></div>)}
|
|
114
|
+
</span>
|
|
115
|
+
</Link>
|
|
116
|
+
{item.group_career &&
|
|
117
|
+
item.group_career != '' &&
|
|
118
|
+
((_a = item.exist_l_sort_center) === null || _a === void 0 ? void 0 : _a.includes(props.center_code)) ? (<p className={'mt-[11px] whitespace-pre-wrap text-[14px] font-[800] leading-tight tracking-[-1px] text-[#285FA7] lg:text-[18px] ' +
|
|
119
|
+
(item.group_career.length > 32 ? 'break-all' : '')}>
|
|
120
|
+
{item.group_career.length > 32
|
|
121
|
+
? item.group_career.replace(',', ', ')
|
|
122
|
+
: item.group_career.replace(',', '\n')}
|
|
123
|
+
</p>) : (<p className={`
|
|
124
|
+
${item.ability.length > 29 ? '' : 'break-keep '}
|
|
125
|
+
${item.ability.length > 29
|
|
126
|
+
? 'text-[13px] lg:text-[16px] '
|
|
127
|
+
: 'text-[14px] lg:text-[18px] '}whitespace-pre-wrap mt-[11px] font-medium leading-tight tracking-[-1px] text-[#143F79] max-lg:mb-[5px]`}>
|
|
128
|
+
<span className="font-[800] max-sm:hidden">{item.ability}</span>
|
|
129
|
+
<span className="font-[800] sm:hidden">
|
|
130
|
+
{item.ability.length > 29 ? item.ability.split('\n').join(', ') : item.ability}
|
|
131
|
+
</span>
|
|
132
|
+
</p>)}
|
|
133
|
+
<span className={'relative mb-[10px] mt-[5px] max-lg:my-[2px] '}>
|
|
134
|
+
{item.tel ? (<Link onClick={onClickTel} href={'tel:' + item.tel} className={'block w-fit'} aria-label={item.name + '변호사에게 전화하기 ' + item.tel}>
|
|
135
|
+
<p className={'text-[14px] font-[600] max-xs:text-[12px] lg:text-[18px]'}>
|
|
136
|
+
T. <span className={'font-[800] text-[#6e6e6e] underline'}>{item.tel}</span>
|
|
137
|
+
</p>
|
|
138
|
+
</Link>) : (<div className={'h-[21px] lg:h-[27px]'}></div>)}
|
|
139
|
+
{/*이메일*/}
|
|
140
|
+
{item.email ? (<Link href={'https://www.daeryunlaw.com/mail?lawyer=' + item.name} rel={'nofollow'} className={'absolute -bottom-[2px] right-0 block h-fit w-fit '} aria-label={item.name + '변호사에게 메일보내기'}>
|
|
141
|
+
<Image src={'/images/lawyer/email_icon.webp'} alt={'이메일'} width={64} height={64} className={'w-[32px] max-lg:w-[28px] max-xs:w-[25px]'}/>
|
|
142
|
+
</Link>) : (<></>)}
|
|
143
|
+
</span>
|
|
144
|
+
{specialtyArr.length > 1 ? (<div className={'relative mt-2 border-t border-solid border-[#D0D0D0]'}>
|
|
145
|
+
<p className={'mt-3 line-clamp-1 text-ellipsis text-[14px] font-medium text-[#6e6e6e] lg:text-[18px]'}>
|
|
146
|
+
{specialtyArr.join('·')} 전문
|
|
147
|
+
</p>
|
|
148
|
+
</div>) : (<></>)}
|
|
149
|
+
</div>
|
|
150
|
+
</div>
|
|
151
|
+
</span>);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
return (<Link href={{
|
|
155
|
+
pathname: '/lawyer/' + item.id
|
|
156
|
+
}} ref={firstAddRef} key={item.id} className={'flex justify-center'} aria-label={`${item.name} ${item.code}`}>
|
|
157
|
+
<div className={'w-[90%] sm:w-[80%]'}>
|
|
158
|
+
<div className={'relative flex items-center justify-center bg-[#F8F8F8]'}>
|
|
159
|
+
<Image src={lawyerImagePath + '/' + (item.image ? item.image : item.thumbnail)} alt={item.name} title={item.name} width={210} height={280} className={'mt-6 h-auto w-[90%]'}/>
|
|
160
|
+
</div>
|
|
161
|
+
<div className={style.textbox}>
|
|
162
|
+
<div className={'m-3'}>
|
|
163
|
+
<div className={'flex items-center justify-between'}>
|
|
164
|
+
<p className={'my-2 text-[20px] font-[800] tracking-[-1.6px] sm:text-[28px]'}>
|
|
165
|
+
{item.name}
|
|
166
|
+
</p>
|
|
167
|
+
<Image draggable={'false'} alt="" src={`/images/profile.webp`} className={'h-[16px] w-[13px] sm:h-[20px] sm:w-[16px]'} width={34} height={40}/>
|
|
168
|
+
</div>
|
|
169
|
+
<p className={'text-lg font-[600] tracking-[-1.1px] text-[#454545]'}>{item.code}</p>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
</div>
|
|
173
|
+
</Link>);
|
|
174
|
+
}
|
|
175
|
+
};
|