@daeryun/dr_components 1.1.99 → 1.2.0

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 (35) hide show
  1. package/dist/cjs/tsconfig-cjs.tsbuildinfo +1 -1
  2. package/dist/components/common/integrate/index.d.ts +1 -1
  3. package/dist/components/common/integrate/index.jsx +2 -1
  4. package/dist/components/common/integrate/index.tsx +2 -1
  5. package/dist/components/page/Integrate/Broadcast.d.ts +1 -1
  6. package/dist/components/page/Integrate/Broadcast.tsx +1 -1
  7. package/dist/components/page/Integrate/Field.d.ts +1 -1
  8. package/dist/components/page/Integrate/Field.tsx +1 -1
  9. package/dist/components/page/Integrate/LawInfo.d.ts +1 -1
  10. package/dist/components/page/Integrate/LawInfo.tsx +1 -1
  11. package/dist/components/page/Integrate/Lawyer.d.ts +1 -1
  12. package/dist/components/page/Integrate/Lawyer.tsx +1 -1
  13. package/dist/components/page/Integrate/Map.d.ts +2 -2
  14. package/dist/components/page/Integrate/Map.jsx +198 -110
  15. package/dist/components/page/Integrate/Map.tsx +198 -197
  16. package/dist/components/page/Integrate/MenuTab.d.ts +1 -1
  17. package/dist/components/page/Integrate/MenuTab.jsx +7 -2
  18. package/dist/components/page/Integrate/MenuTab.tsx +8 -3
  19. package/dist/components/page/Integrate/Reply.d.ts +1 -1
  20. package/dist/components/page/Integrate/Reply.jsx +17 -21
  21. package/dist/components/page/Integrate/Reply.tsx +48 -55
  22. package/dist/components/page/Integrate/SearchData.d.ts +1 -1
  23. package/dist/components/page/Integrate/SearchData.jsx +53 -35
  24. package/dist/components/page/Integrate/SearchData.tsx +57 -38
  25. package/dist/components/page/Integrate/Success.d.ts +1 -1
  26. package/dist/components/page/Integrate/Success.tsx +1 -1
  27. package/dist/components/page/Integrate/Trend.d.ts +21 -0
  28. package/dist/components/page/Integrate/Trend.jsx +78 -0
  29. package/dist/components/page/Integrate/Trend.tsx +173 -0
  30. package/dist/components/page/Integrate/integrateType.d.ts +39 -35
  31. package/dist/components/page/Integrate/integrateType.js +3 -4
  32. package/dist/components/page/Integrate/integrateType.ts +44 -40
  33. package/dist/styles/globals.css +420 -407
  34. package/dist/tsconfig.tsbuildinfo +1 -1
  35. package/package.json +1 -1
@@ -1,120 +1,208 @@
1
- import React, { useEffect, useState } from 'react';
2
- import Image from 'next/image';
3
- import { NoResult } from './NoResult';
4
- import { Title } from './Title';
5
- import { ViewMore } from './ViewMore';
1
+ import React, { useState } from 'react';
6
2
  import { useRouter } from 'next/navigation';
7
- import { searchColorText } from '../../common/integrate';
8
3
  const Map = (props) => {
9
4
  const router = useRouter();
10
5
  const { tab, onMoreViewText, list, isMobileSize, pages } = props;
11
6
  const [loading, setLoading] = useState(false);
12
7
  const [allTabPage, setAllTabPage] = useState(0);
13
8
  const [allTabList, setAllTabList] = useState([]);
14
- const getAllPage = () => {
15
- const itemsToAdd = 5;
16
- // imapList에서 잘라낼 시작 인덱스 계산
17
- const startIndex = allTabList.length;
18
- const endIndex = startIndex + itemsToAdd;
19
- const newItems = list.mapList.slice(startIndex, endIndex);
20
- const updatedList = [...allTabList, ...newItems];
21
- setAllTabList(updatedList);
22
- // 다음 호출 후 예상 총 개수
23
- const nextTotalCount = updatedList.length + itemsToAdd;
24
- // 현재 successList의 길이
25
- const currentListLength = list.mapList.length;
26
- // 다음 총 개수가 mapList 길이를 초과하면 api 호출
27
- // 예: mapList가 24일 때, 22 -> 26이 되면 호출
28
- if (nextTotalCount > currentListLength) {
29
- props.onMoreView();
30
- }
31
- // 페이지 상태 증가
32
- setAllTabPage(allTabPage + 1);
33
- };
34
- useEffect(() => {
35
- if (allTabList.length === 0) {
36
- setAllTabList(list.mapList.slice(0, 5));
37
- }
38
- }, [list.mapList]);
39
- return props.tab === '전체' || props.tab === 'map' ? (
40
- //구성원 탭에서는 결과 없음
41
- tab === 'map' && props.listCount.map < 1 ? (<NoResult />) : (<>
42
- {/*전체 탭에서는 없게*/}
43
- {props.listCount.map > 0 ? (<div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
44
- <Title title={'오시는길'} tab={tab} type={'map'} count={props.listCount.map} onClick={str => onMoreViewText(str)}/>
45
- <div className={'mt-[-1.5rem] w-full'}>
46
- {(tab === '전체' ? allTabList : list.mapList).map((item, index) => {
47
- return (<div key={'integrate_map' + item.key} className={'group/mapBox flex gap-[60px] border-b-[1px] border-solid border-[#DDDDDD] hover:bg-[#FCFCFC] ' +
48
- //1280px
49
- 'max-xl:gap-[0] ' +
50
- //1024px
51
- 'max-lg:flex-col max-lg:px-[40px] ' +
52
- //768px
53
- 'max-md:px-[25px] '}>
54
- <span className={'relative w-[450px] shrink-0 px-[40px] py-[45px] ' +
55
- //1024px
56
- '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] ' +
57
- //768px
58
- 'max-md:py-[30px] ' +
59
- //640px
60
- 'max-sm:border-0'}>
61
- <p className={'text-[22px] font-normal leading-none tracking-[-1.2px] ' +
62
- //768px
63
- 'max-md:text-[20px]'}>
64
- {item.lawyer_text}
65
- </p>
66
- <p className={'mt-[12px] text-[26px] font-bold leading-none tracking-[-1.4px] ' +
67
- //768px
68
- 'max-md:mt-[8px] max-md:text-[24px]'}>
69
- {searchColorText(item.title, props.search)}
70
- </p>
71
- <button className={'mt-[40px] flex w-[250px] items-center justify-between border-[1px] border-solid border-[#0F0F0F] bg-white p-[20px] ' +
72
- //1024px
73
- '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] ' +
74
- //768px
75
- 'max-md:w-[160px] max-md:p-[14px] ' +
76
- //640px
77
- 'max-sm:relative max-sm:mx-auto max-sm:mt-[30px] max-sm:w-[85%] max-sm:translate-y-0'} onClick={() => {
78
- void router.push('/map/' + item.key);
79
- }} aria-label={item.title + ' 자세히 보기'}>
80
- <span className={'text-[18px] font-[600] leading-none tracking-[-1px] ' +
81
- //1024px
82
- 'max-lg:text-[16px] '}>
83
- 자세히보기
84
- </span>
85
- <Image src={'/images/integrate/window.webp'} alt={''} width={30} height={30} objectFit={'cover'} className={'aspect-square w-[16px] ' +
86
- //1024px
87
- 'max-lg:w-[14px]'}/>
88
- </button>
89
- </span>
90
- <span className={'grow ' +
91
- //640px
92
- 'max-sm:hidden'}>
93
- <MapInfoCon locale={'ko'} title={'주소'} text={<>
94
- {item.address
95
- .replaceAll('법무법인(유한)대륜', '')
96
- .replaceAll('법무법인(유한) 대륜', '')}
97
- </>}/>
98
- <MapInfoCon locale={'ko'} title={'업무시간'} text={<>
99
- {item.worktime.split(' | ').map((i, index) => (<span key={item.key + '_work_time_' + index} className={'block'}>
100
- {i}
101
- </span>))}
102
- </>}/>
103
- <MapInfoCon locale={'ko'} title={'대표번호'} text={<>{item.tel}</>}/>
104
- </span>
105
- </div>);
106
- })}
107
- </div>
108
- {tab != '전체' && (<ViewMore flag={list.mapList.length != props.listCount.map} func={() => {
109
- setLoading(true);
110
- props.onMoreView();
111
- setLoading(false);
112
- }} loading={loading} totalPage={Math.ceil(props.listCount.map / 12)} nowPage={pages.mapList}/>)}
113
- {tab === '전체' && (<ViewMore flag={allTabList.length != props.listCount.map} func={() => {
114
- getAllPage();
115
- }}/>)}
116
- </div>) : (<></>)}
117
- </>)) : null;
9
+ // const getAllPage = () => {
10
+ // const itemsToAdd = 5;
11
+ //
12
+ // // imapList에서 잘라낼 시작 인덱스 계산
13
+ // const startIndex = allTabList.length;
14
+ // const endIndex = startIndex + itemsToAdd;
15
+ // const newItems = list.mapList.slice(startIndex, endIndex);
16
+ // const updatedList = [...allTabList, ...newItems];
17
+ // setAllTabList(updatedList);
18
+ //
19
+ // // 다음 호출 후 예상 총 개수
20
+ // const nextTotalCount = updatedList.length + itemsToAdd;
21
+ // // 현재 successList의 길이
22
+ // const currentListLength = list.mapList.length;
23
+ //
24
+ // // 다음 총 개수가 mapList 길이를 초과하면 api 호출
25
+ // // 예: mapList가 24일 때, 22 -> 26이 되면 호출
26
+ // if (nextTotalCount > currentListLength) {
27
+ // props.onMoreView();
28
+ // }
29
+ //
30
+ // // 페이지 상태 증가
31
+ // setAllTabPage(allTabPage + 1);
32
+ // };
33
+ //
34
+ // useEffect(() => {
35
+ // if (allTabList.length === 0) {
36
+ // setAllTabList(list.mapList.slice(0, 5));
37
+ // }
38
+ // }, [list.mapList]);
39
+ return <></>;
40
+ // props.tab === '전체' || props.tab === 'map' ? (
41
+ // //구성원 탭에서는 결과 없음
42
+ // tab === 'map' && props.listCount.map < 1 ? (
43
+ // <NoResult />
44
+ // ) : (
45
+ // <>
46
+ // {/*전체 탭에서는 없게*/}
47
+ // {props.listCount.map > 0 ? (
48
+ // <div className={'mb-[180px] max-sm:mb-[100px] max-xs:mb-[50px]'}>
49
+ // <Title
50
+ // title={'오시는길'}
51
+ // tab={tab}
52
+ // type={'map'}
53
+ // count={props.listCount.map}
54
+ // onClick={str => onMoreViewText(str)}
55
+ // />
56
+ // <div className={'mt-[-1.5rem] w-full'}>
57
+ // {(tab === '전체' ? allTabList : list.mapList).map((item, index: number) => {
58
+ // return (
59
+ // <div
60
+ // key={'integrate_map' + item.key}
61
+ // className={
62
+ // 'group/mapBox flex gap-[60px] border-b-[1px] border-solid border-[#DDDDDD] hover:bg-[#FCFCFC] ' +
63
+ // //1280px
64
+ // 'max-xl:gap-[0] ' +
65
+ // //1024px
66
+ // 'max-lg:flex-col max-lg:px-[40px] ' +
67
+ // //768px
68
+ // 'max-md:px-[25px] '
69
+ // }
70
+ // >
71
+ // <span
72
+ // className={
73
+ // 'relative w-[450px] shrink-0 px-[40px] py-[45px] ' +
74
+ // //1024px
75
+ // '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] ' +
76
+ // //768px
77
+ // 'max-md:py-[30px] ' +
78
+ // //640px
79
+ // 'max-sm:border-0'
80
+ // }
81
+ // >
82
+ // <p
83
+ // className={
84
+ // 'text-[22px] font-normal leading-none tracking-[-1.2px] ' +
85
+ // //768px
86
+ // 'max-md:text-[20px]'
87
+ // }
88
+ // >
89
+ // {item.lawyer_text}
90
+ // </p>
91
+ // <p
92
+ // className={
93
+ // 'mt-[12px] text-[26px] font-bold leading-none tracking-[-1.4px] ' +
94
+ // //768px
95
+ // 'max-md:mt-[8px] max-md:text-[24px]'
96
+ // }
97
+ // >
98
+ // {searchColorText(item.title, props.search)}
99
+ // </p>
100
+ // <button
101
+ // className={
102
+ // 'mt-[40px] flex w-[250px] items-center justify-between border-[1px] border-solid border-[#0F0F0F] bg-white p-[20px] ' +
103
+ // //1024px
104
+ // '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] ' +
105
+ // //768px
106
+ // 'max-md:w-[160px] max-md:p-[14px] ' +
107
+ // //640px
108
+ // 'max-sm:relative max-sm:mx-auto max-sm:mt-[30px] max-sm:w-[85%] max-sm:translate-y-0'
109
+ // }
110
+ // onClick={() => {
111
+ // void router.push('/map/' + item.key);
112
+ // }}
113
+ // aria-label={item.title + ' 자세히 보기'}
114
+ // >
115
+ // <span
116
+ // className={
117
+ // 'text-[18px] font-[600] leading-none tracking-[-1px] ' +
118
+ // //1024px
119
+ // 'max-lg:text-[16px] '
120
+ // }
121
+ // >
122
+ // 자세히보기
123
+ // </span>
124
+ // <Image
125
+ // src={'/images/integrate/window.webp'}
126
+ // alt={''}
127
+ // width={30}
128
+ // height={30}
129
+ // objectFit={'cover'}
130
+ // className={
131
+ // 'aspect-square w-[16px] ' +
132
+ // //1024px
133
+ // 'max-lg:w-[14px]'
134
+ // }
135
+ // />
136
+ // </button>
137
+ // </span>
138
+ // <span
139
+ // className={
140
+ // 'grow ' +
141
+ // //640px
142
+ // 'max-sm:hidden'
143
+ // }
144
+ // >
145
+ // <MapInfoCon
146
+ // locale={'ko'}
147
+ // title={'주소'}
148
+ // text={
149
+ // <>
150
+ // {item.address
151
+ // .replaceAll('법무법인(유한)대륜', '')
152
+ // .replaceAll('법무법인(유한) 대륜', '')}
153
+ // </>
154
+ // }
155
+ // />
156
+ // <MapInfoCon
157
+ // locale={'ko'}
158
+ // title={'업무시간'}
159
+ // text={
160
+ // <>
161
+ // {item.worktime.split(' | ').map((i, index) => (
162
+ // <span
163
+ // key={item.key + '_work_time_' + index}
164
+ // className={'block'}
165
+ // >
166
+ // {i}
167
+ // </span>
168
+ // ))}
169
+ // </>
170
+ // }
171
+ // />
172
+ // <MapInfoCon locale={'ko'} title={'대표번호'} text={<>{item.tel}</>} />
173
+ // </span>
174
+ // </div>
175
+ // );
176
+ // })}
177
+ // </div>
178
+ // {tab != '전체' && (
179
+ // <ViewMore
180
+ // flag={list.mapList.length != props.listCount.map}
181
+ // func={() => {
182
+ // setLoading(true);
183
+ // props.onMoreView();
184
+ // setLoading(false);
185
+ // }}
186
+ // loading={loading}
187
+ // totalPage={Math.ceil(props.listCount.map / 12)}
188
+ // nowPage={pages.mapList}
189
+ // />
190
+ // )}
191
+ // {tab === '전체' && (
192
+ // <ViewMore
193
+ // flag={allTabList.length != props.listCount.map}
194
+ // func={() => {
195
+ // getAllPage();
196
+ // }}
197
+ // />
198
+ // )}
199
+ // </div>
200
+ // ) : (
201
+ // <></>
202
+ // )}
203
+ // </>
204
+ // )
205
+ // ) : null;
118
206
  };
119
207
  export default Map;
120
208
  const MapInfoCon = (props) => {