@daeryun/dr_components 0.4.37 → 0.4.39
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/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/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/Login/LoginComp/Modal/AlertConfirmModal.jsx +2 -0
- package/dist/components/page/Login/LoginComp/Modal/AlertConfirmModal.tsx +3 -0
- package/dist/components/page/Login/LoginComp/Modal/ConfirmModal.jsx +2 -0
- package/dist/components/page/Login/LoginComp/Modal/ConfirmModal.tsx +2 -0
- package/dist/components/page/Login/LoginComp/Modal/TermModal.jsx +2 -0
- package/dist/components/page/Login/LoginComp/Modal/TermModal.tsx +2 -0
- package/dist/components/page/Login/_hooks/useModalScroll.d.ts +1 -0
- package/dist/components/page/Login/_hooks/useModalScroll.js +13 -0
- package/dist/components/page/Login/_hooks/useModalScroll.ts +15 -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 +938 -158
- 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,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
|
+
};
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { IListPagesType, IListTypes } from './integrateType';
|
|
2
|
+
import React, { useRef, useState } from 'react';
|
|
3
|
+
import Image from 'next/image';
|
|
4
|
+
import { useTranslation } from 'next-i18next';
|
|
5
|
+
import { NoResult } from './NoResult';
|
|
6
|
+
import { Title } from './Title';
|
|
7
|
+
import { ViewMore } from './ViewMore';
|
|
8
|
+
import { useRouter } from 'next/router';
|
|
9
|
+
import { searchColorText } from '../../common/integrate';
|
|
10
|
+
|
|
11
|
+
const Map = (props: {
|
|
12
|
+
tab: string;
|
|
13
|
+
onMoreViewText: (str: string) => void;
|
|
14
|
+
onMoreView: () => void;
|
|
15
|
+
list: IListTypes;
|
|
16
|
+
pages: IListPagesType;
|
|
17
|
+
search: string;
|
|
18
|
+
listCount: {
|
|
19
|
+
lawyer: number;
|
|
20
|
+
field: number;
|
|
21
|
+
success: number;
|
|
22
|
+
info: number;
|
|
23
|
+
broadcast: number;
|
|
24
|
+
reply: number;
|
|
25
|
+
map: number;
|
|
26
|
+
};
|
|
27
|
+
}) => {
|
|
28
|
+
const router = useRouter();
|
|
29
|
+
const { tab, onMoreViewText, list, pages } = props;
|
|
30
|
+
|
|
31
|
+
const [loading, setLoading] = useState<boolean>(false);
|
|
32
|
+
|
|
33
|
+
const firstAddRef = useRef<HTMLButtonElement>(null);
|
|
34
|
+
|
|
35
|
+
return props.tab === '전체' || props.tab === 'map' ? (
|
|
36
|
+
//구성원 탭에서는 결과 없음
|
|
37
|
+
tab === 'map' && props.listCount.map < 1 ? (
|
|
38
|
+
<NoResult />
|
|
39
|
+
) : (
|
|
40
|
+
<>
|
|
41
|
+
{/*전체 탭에서는 없게*/}
|
|
42
|
+
{props.listCount.map > 0 ? (
|
|
43
|
+
<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
|
|
44
|
+
<Title
|
|
45
|
+
title={'오시는길'}
|
|
46
|
+
tab={tab}
|
|
47
|
+
type={'map'}
|
|
48
|
+
count={props.listCount.map}
|
|
49
|
+
onClick={async () => {
|
|
50
|
+
await router.push('/map');
|
|
51
|
+
}}
|
|
52
|
+
/>
|
|
53
|
+
|
|
54
|
+
<div className={'mt-[-1.5rem] w-full'}>
|
|
55
|
+
{(tab === '전체' && !props.search && list.mainMapList
|
|
56
|
+
? list.mainMapList.slice(0, 5)
|
|
57
|
+
: tab === '전체' && props.search
|
|
58
|
+
? list.mapList.slice(0, 5)
|
|
59
|
+
: list.mapList
|
|
60
|
+
).map((item, index: number) => {
|
|
61
|
+
return (
|
|
62
|
+
<div
|
|
63
|
+
key={'integrate_' + item.key}
|
|
64
|
+
className={
|
|
65
|
+
'group/mapBox flex gap-[60px] border-b-[1px] border-solid border-[#DDDDDD] hover:bg-[#FCFCFC] ' +
|
|
66
|
+
//1280px
|
|
67
|
+
'max-xl:gap-[0] ' +
|
|
68
|
+
//1024px
|
|
69
|
+
'max-lg:flex-col max-lg:px-[40px] ' +
|
|
70
|
+
//768px
|
|
71
|
+
'max-md:px-[25px] '
|
|
72
|
+
}
|
|
73
|
+
>
|
|
74
|
+
<span
|
|
75
|
+
className={
|
|
76
|
+
'relative w-[450px] shrink-0 px-[40px] py-[45px] ' +
|
|
77
|
+
//1024px
|
|
78
|
+
'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] ' +
|
|
79
|
+
//768px
|
|
80
|
+
'max-md:py-[30px] ' +
|
|
81
|
+
//640px
|
|
82
|
+
'max-sm:border-0'
|
|
83
|
+
}
|
|
84
|
+
>
|
|
85
|
+
<p
|
|
86
|
+
className={
|
|
87
|
+
'text-[22px] font-normal leading-none tracking-[-1.2px] ' +
|
|
88
|
+
//768px
|
|
89
|
+
'max-md:text-[20px]'
|
|
90
|
+
}
|
|
91
|
+
>
|
|
92
|
+
{item.lawyer_text}
|
|
93
|
+
</p>
|
|
94
|
+
<p
|
|
95
|
+
className={
|
|
96
|
+
'mt-[12px] text-[26px] font-bold leading-none tracking-[-1.4px] ' +
|
|
97
|
+
//768px
|
|
98
|
+
'max-md:mt-[8px] max-md:text-[24px]'
|
|
99
|
+
}
|
|
100
|
+
>
|
|
101
|
+
{searchColorText(item.title, props.search)}
|
|
102
|
+
</p>
|
|
103
|
+
<button
|
|
104
|
+
className={
|
|
105
|
+
'mt-[40px] flex w-[250px] items-center justify-between border-[1px] border-solid border-[#0F0F0F] bg-white p-[20px] ' +
|
|
106
|
+
//1024px
|
|
107
|
+
'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] ' +
|
|
108
|
+
//768px
|
|
109
|
+
'max-md:w-[160px] max-md:p-[14px] ' +
|
|
110
|
+
//640px
|
|
111
|
+
'max-sm:relative max-sm:mx-auto max-sm:mt-[30px] max-sm:w-[85%] max-sm:translate-y-0'
|
|
112
|
+
}
|
|
113
|
+
onClick={() => {
|
|
114
|
+
void router.push('/map/' + item.key);
|
|
115
|
+
}}
|
|
116
|
+
aria-label={item.title + ' 자세히 보기'}
|
|
117
|
+
ref={
|
|
118
|
+
index === 0 || (index > 12 && index === list.mapList.length - 12)
|
|
119
|
+
? firstAddRef
|
|
120
|
+
: null
|
|
121
|
+
}
|
|
122
|
+
>
|
|
123
|
+
<span
|
|
124
|
+
className={
|
|
125
|
+
'text-[18px] font-[600] leading-none tracking-[-1px] ' +
|
|
126
|
+
//1024px
|
|
127
|
+
'max-lg:text-[16px] '
|
|
128
|
+
}
|
|
129
|
+
>
|
|
130
|
+
자세히보기
|
|
131
|
+
</span>
|
|
132
|
+
<Image
|
|
133
|
+
src={'/images/integrate/window.webp'}
|
|
134
|
+
alt={''}
|
|
135
|
+
width={30}
|
|
136
|
+
height={30}
|
|
137
|
+
objectFit={'cover'}
|
|
138
|
+
className={
|
|
139
|
+
'aspect-square w-[16px] ' +
|
|
140
|
+
//1024px
|
|
141
|
+
'max-lg:w-[14px]'
|
|
142
|
+
}
|
|
143
|
+
/>
|
|
144
|
+
</button>
|
|
145
|
+
</span>
|
|
146
|
+
<span
|
|
147
|
+
className={
|
|
148
|
+
'grow ' +
|
|
149
|
+
//640px
|
|
150
|
+
'max-sm:hidden'
|
|
151
|
+
}
|
|
152
|
+
>
|
|
153
|
+
<MapInfoCon
|
|
154
|
+
locale={router.locale ?? ''}
|
|
155
|
+
title={'주소'}
|
|
156
|
+
text={
|
|
157
|
+
<>
|
|
158
|
+
{item.address
|
|
159
|
+
.replaceAll('법무법인(유한)대륜', '')
|
|
160
|
+
.replaceAll('법무법인(유한) 대륜', '')}
|
|
161
|
+
</>
|
|
162
|
+
}
|
|
163
|
+
/>
|
|
164
|
+
<MapInfoCon
|
|
165
|
+
locale={router.locale ?? ''}
|
|
166
|
+
title={'업무시간'}
|
|
167
|
+
text={
|
|
168
|
+
<>
|
|
169
|
+
{item.worktime.split(' | ').map((i, index) => (
|
|
170
|
+
<span
|
|
171
|
+
key={item.key + '_work_time_' + index}
|
|
172
|
+
className={'block'}
|
|
173
|
+
>
|
|
174
|
+
{i}
|
|
175
|
+
</span>
|
|
176
|
+
))}
|
|
177
|
+
</>
|
|
178
|
+
}
|
|
179
|
+
/>
|
|
180
|
+
<MapInfoCon
|
|
181
|
+
locale={router.locale ?? ''}
|
|
182
|
+
title={'대표번호'}
|
|
183
|
+
text={<>{item.tel}</>}
|
|
184
|
+
/>
|
|
185
|
+
</span>
|
|
186
|
+
</div>
|
|
187
|
+
);
|
|
188
|
+
})}
|
|
189
|
+
</div>
|
|
190
|
+
{tab != '전체' ? (
|
|
191
|
+
<ViewMore
|
|
192
|
+
flag={list.mapList.length != props.listCount.map}
|
|
193
|
+
func={() => {
|
|
194
|
+
setLoading(true);
|
|
195
|
+
props.onMoreView();
|
|
196
|
+
setLoading(false);
|
|
197
|
+
}}
|
|
198
|
+
loading={loading}
|
|
199
|
+
totalPage={Math.ceil(props.listCount.map / 12)}
|
|
200
|
+
nowPage={pages.mapList}
|
|
201
|
+
/>
|
|
202
|
+
) : (
|
|
203
|
+
<button
|
|
204
|
+
className={
|
|
205
|
+
'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]'
|
|
206
|
+
}
|
|
207
|
+
onClick={str => onMoreViewText('map')}
|
|
208
|
+
aria-label={'오시는길 더보기'}
|
|
209
|
+
>
|
|
210
|
+
<span className={'pt-[2px] leading-[15px] text-[#666666] '}>더보기</span>
|
|
211
|
+
<Image
|
|
212
|
+
src={'/images/plus_g.webp'}
|
|
213
|
+
alt={'+'}
|
|
214
|
+
title={'+'}
|
|
215
|
+
width={30}
|
|
216
|
+
height={30}
|
|
217
|
+
className={
|
|
218
|
+
'aspect-square w-[18px] max-lg:w-[16px] max-sm:w-[15px] max-2xs:w-[13px]'
|
|
219
|
+
}
|
|
220
|
+
/>
|
|
221
|
+
</button>
|
|
222
|
+
)}
|
|
223
|
+
</div>
|
|
224
|
+
) : (
|
|
225
|
+
<></>
|
|
226
|
+
)}
|
|
227
|
+
</>
|
|
228
|
+
)
|
|
229
|
+
) : null;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
export default Map;
|
|
233
|
+
|
|
234
|
+
const MapInfoCon = (props: { title: string; text: React.ReactNode; locale: string }) => {
|
|
235
|
+
return (
|
|
236
|
+
<div
|
|
237
|
+
className={
|
|
238
|
+
'flex items-start gap-[30px] border-b-[1px] border-solid border-[#DDDDDD] py-[35px] last:border-0 ' +
|
|
239
|
+
//1024px
|
|
240
|
+
'max-lg:py-[25px] ' +
|
|
241
|
+
//768px
|
|
242
|
+
'max-md:py-[20px]'
|
|
243
|
+
}
|
|
244
|
+
>
|
|
245
|
+
<p
|
|
246
|
+
className={
|
|
247
|
+
'block shrink-0 text-[18px] font-[600] leading-[30px] tracking-[-1px] ' +
|
|
248
|
+
//768px
|
|
249
|
+
'max-md:text-[16px] max-md:leading-[27px] ' +
|
|
250
|
+
`${props.locale === 'en' ? ' w-[110px] max-md:w-[100px]' : ' w-[75px] max-md:w-[60px]'}`
|
|
251
|
+
}
|
|
252
|
+
>
|
|
253
|
+
{props.title}
|
|
254
|
+
</p>
|
|
255
|
+
<p
|
|
256
|
+
className={
|
|
257
|
+
'text-[20px] font-[300] leading-[1.5] tracking-[-1.2px] ' +
|
|
258
|
+
//768px
|
|
259
|
+
'max-md:text-[18px] '
|
|
260
|
+
}
|
|
261
|
+
>
|
|
262
|
+
{props.text}
|
|
263
|
+
</p>
|
|
264
|
+
</div>
|
|
265
|
+
);
|
|
266
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { RefObject } from 'react';
|
|
2
|
+
interface TabProps {
|
|
3
|
+
search: string | null;
|
|
4
|
+
searchDoneRef: RefObject<HTMLAnchorElement>;
|
|
5
|
+
setChoiceTabValue?: React.Dispatch<React.SetStateAction<string>>;
|
|
6
|
+
count: {
|
|
7
|
+
lawyer: number;
|
|
8
|
+
field: number;
|
|
9
|
+
success: number;
|
|
10
|
+
info: number;
|
|
11
|
+
broadcast: number;
|
|
12
|
+
reply: number;
|
|
13
|
+
map: number;
|
|
14
|
+
};
|
|
15
|
+
totalCount: number;
|
|
16
|
+
}
|
|
17
|
+
declare const MenuTab: ({ search, searchDoneRef, setChoiceTabValue, totalCount, count }: TabProps) => React.JSX.Element;
|
|
18
|
+
export default MenuTab;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import React, { useEffect, useState } from 'react';
|
|
12
|
+
import { useRouter } from 'next/navigation';
|
|
13
|
+
import { useSearchParams } from 'next/navigation';
|
|
14
|
+
import Link from 'next/link';
|
|
15
|
+
import { tabTypes } from '../../common/integrate';
|
|
16
|
+
const MenuTab = ({ search, searchDoneRef, setChoiceTabValue, totalCount, count }) => {
|
|
17
|
+
const router = useRouter();
|
|
18
|
+
const [tab, setTab] = useState('');
|
|
19
|
+
const searchParams = useSearchParams();
|
|
20
|
+
const querySearch = searchParams.get('search');
|
|
21
|
+
const queryTab = searchParams.get('tab');
|
|
22
|
+
const handleChange = (event) => __awaiter(void 0, void 0, void 0, function* () {
|
|
23
|
+
yield router.push(`/integrate?search=${querySearch}&tab=${event.target.value}`);
|
|
24
|
+
});
|
|
25
|
+
const onClickEvent = (tab, search) => __awaiter(void 0, void 0, void 0, function* () {
|
|
26
|
+
yield router.push(`/integrate?search=${querySearch}&tab=${tab}`);
|
|
27
|
+
});
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
setTab(String(queryTab));
|
|
30
|
+
setChoiceTabValue === null || setChoiceTabValue === void 0 ? void 0 : setChoiceTabValue(queryTab ? String(queryTab) : '전체'); // 부모에게 tab button value 넘겨주는 setState
|
|
31
|
+
}, [searchParams]);
|
|
32
|
+
return (<>
|
|
33
|
+
<div className={'mx-auto w-full max-sm:hidden '}>
|
|
34
|
+
<Link href={tab !== '전체'
|
|
35
|
+
? `/integrate?search=${querySearch}&tab=전체`
|
|
36
|
+
: `/integrate?search=${querySearch}&tab=${tab}`} ref={searchDoneRef} className={`
|
|
37
|
+
${totalCount < 1 ? 'hidden' : ''}
|
|
38
|
+
${tab === '전체' ? ' bg-[#285FA7] text-[#fff] ' : 'bg-[#F8F8F8] '}
|
|
39
|
+
mt-12 flex h-[56px] cursor-pointer items-center justify-center rounded-[30px] text-center font-semibold sm:h-[50px] sm:w-[155px]
|
|
40
|
+
sm:text-[16px] lg:w-[165px] lg:text-[17px] `} onKeyDown={e => {
|
|
41
|
+
var _a, _b;
|
|
42
|
+
if (e.key === 'Enter') {
|
|
43
|
+
if (tab === '전체') {
|
|
44
|
+
(_b = (_a = document.getElementById('integrate-result')) === null || _a === void 0 ? void 0 : _a.querySelector('a')) === null || _b === void 0 ? void 0 : _b.focus();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}} aria-label={'전체 ' +
|
|
48
|
+
totalCount.toLocaleString() +
|
|
49
|
+
'개의 검색결과 보기 ' +
|
|
50
|
+
`${tab === '전체' ? '선택된 메뉴입니다.' : ''}`}>
|
|
51
|
+
전체 ({totalCount.toLocaleString()})
|
|
52
|
+
</Link>
|
|
53
|
+
<div className={'mb-16 mt-3 flex-col flex-wrap gap-2 sm:flex sm:w-auto sm:flex-row'}>
|
|
54
|
+
{tabTypes.map(item => {
|
|
55
|
+
return (<TabButton key={item.value} tab={tab} count={
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
count[String(item.value)]} title={item.tab} type={item.value} onClickEvent={onClickEvent} search={search}/>);
|
|
58
|
+
})}
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
{/*모바일*/}
|
|
62
|
+
<div className={"relative after:absolute after:right-[2em] after:top-[1.2em] after:h-[10px] after:w-[10px] after:rotate-[135deg] after:border-r-[2px] after:border-t-[2px] after:border-[#fff] after:content-[''] sm:hidden"}>
|
|
63
|
+
<select onChange={handleChange} aria-label={'search-tab'} className="z-9 relative my-10 block w-full appearance-none rounded-[30px] border border-gray-400 bg-[#285FA7] px-6 py-3 text-[18px] font-[800] text-[#fff] hover:border-gray-500 sm:hidden">
|
|
64
|
+
<option value="전체">
|
|
65
|
+
전체
|
|
66
|
+
{`(${totalCount.toLocaleString()})`}
|
|
67
|
+
</option>
|
|
68
|
+
|
|
69
|
+
{tabTypes.map(t => {
|
|
70
|
+
// @ts-ignore
|
|
71
|
+
const tabNum = count[t.value];
|
|
72
|
+
return (tabNum > 0 && (<option value={t.value} key={t.value}>
|
|
73
|
+
{t.tab} {`(${tabNum.toLocaleString()})`}
|
|
74
|
+
</option>));
|
|
75
|
+
})}
|
|
76
|
+
</select>
|
|
77
|
+
</div>
|
|
78
|
+
</>);
|
|
79
|
+
};
|
|
80
|
+
const TabButton = (props) => {
|
|
81
|
+
const searchParams = useSearchParams();
|
|
82
|
+
const buttonClass = 'block flex items-center justify-center sm:w-[155px] sm:text-[16px] lg:w-[165px] lg:text-[17px] text-center cursor-pointer font-semibold rounded-[30px] h-[56px] ';
|
|
83
|
+
const { tab, count, type, title, onClickEvent, search } = props;
|
|
84
|
+
const querySearch = searchParams.get('search');
|
|
85
|
+
return (<Link href={`/integrate?search=${querySearch}&tab=${type}`} className={`${tab === type ? ' bg-[#285FA7] text-[#fff] ' : ' bg-[#F8F8F8] '} ${buttonClass} ${count < 1 ? 'hidden' : ''}`}>
|
|
86
|
+
{`${title}`}
|
|
87
|
+
{` (${count.toLocaleString()})`}
|
|
88
|
+
</Link>);
|
|
89
|
+
};
|
|
90
|
+
export default MenuTab;
|