@daeryun/dr_components 1.3.9 → 1.3.10

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 (44) hide show
  1. package/dist/components/Daeryuntalk/_hooks/talkprovider/useWorkFlow.js +4 -4
  2. package/dist/components/Daeryuntalk/_hooks/talkprovider/useWorkFlow.ts +5 -5
  3. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.js +4 -4
  4. package/dist/components/DaeryuntalkBackup/_hooks/talkprovider/useWorkFlow.ts +4 -4
  5. package/dist/components/Fix/index.jsx +10 -10
  6. package/dist/components/Fix/index.tsx +10 -10
  7. package/dist/components/Footer/index.jsx +4 -4
  8. package/dist/components/Footer/index.tsx +4 -4
  9. package/dist/components/Menu/MobileMenu.jsx +1 -1
  10. package/dist/components/Menu/MobileMenu.tsx +1 -1
  11. package/dist/components/Menu/PCMenu.jsx +1 -1
  12. package/dist/components/Menu/PCMenu.tsx +1 -1
  13. package/dist/components/Seo/SeoAdditionalLink.jsx +2 -2
  14. package/dist/components/Seo/SeoAdditionalLink.tsx +2 -2
  15. package/dist/components/Seo/SeoConsulting.jsx +3 -3
  16. package/dist/components/Seo/SeoConsulting.tsx +3 -3
  17. package/dist/components/hook/useLoginUuidSync.d.ts +8 -0
  18. package/dist/components/hook/useLoginUuidSync.js +87 -78
  19. package/dist/components/hook/useLoginUuidSync.ts +95 -95
  20. package/dist/components/index.js +1 -1
  21. package/dist/components/index.ts +1 -1
  22. package/dist/components/page/Choice/Choice.jsx +4 -4
  23. package/dist/components/page/Choice/Choice.tsx +4 -4
  24. package/dist/components/page/ConsultComplete/ConsultComplete.jsx +3 -3
  25. package/dist/components/page/ConsultComplete/ConsultComplete.tsx +3 -3
  26. package/dist/components/page/LawyerDetail/component/BasicInfo.jsx +1 -1
  27. package/dist/components/page/LawyerDetail/component/BasicInfo.tsx +1 -1
  28. package/dist/components/page/Login/LoginComp/LoginContainer.jsx +11 -12
  29. package/dist/components/page/Login/LoginComp/LoginContainer.tsx +9 -10
  30. package/dist/components/page/Login/StepOne.jsx +11 -10
  31. package/dist/components/page/Login/StepOne.tsx +10 -10
  32. package/dist/components/page/Login/StepTwo.jsx +11 -10
  33. package/dist/components/page/Login/StepTwo.tsx +10 -10
  34. package/dist/components/page/Login/Withdraw.jsx +1 -1
  35. package/dist/components/page/Login/Withdraw.tsx +1 -1
  36. package/dist/components/page/SuccessNew/components/SeoAdditionalLink.jsx +2 -2
  37. package/dist/components/page/SuccessNew/components/SeoAdditionalLink.tsx +2 -2
  38. package/dist/lib/gtag.d.ts +3 -5
  39. package/dist/lib/gtag.js +26 -17
  40. package/dist/lib/handleGtagClick.d.ts +3 -3
  41. package/dist/lib/handleGtagClick.js +5 -5
  42. package/dist/lib/handleGtagClick.ts +6 -6
  43. package/dist/tsconfig.tsbuildinfo +1 -1
  44. package/package.json +1 -1
@@ -13,6 +13,7 @@ import Image from 'next/image';
13
13
  import { useMutation } from '@tanstack/react-query';
14
14
  import { getCookie, setCookie } from '../../../lib';
15
15
  import ConfirmModal from './LoginComp/Modal/ConfirmModal';
16
+ import * as gtag from '../../../lib/gtag';
16
17
  const Box = ({ code, code_name, selected, selectedList, setSelectedList, activeTooltipId, setActiveTooltipId, tooltipTimeoutRef }) => {
17
18
  const [tooltipStyle, setTooltipStyle] = useState({});
18
19
  const buttonRef = useRef(null);
@@ -172,15 +173,15 @@ const StepOne = () => {
172
173
  { code: 'CT0029', code_name: '디지털포렌식' },
173
174
  { code: 'CT0030', code_name: '경호' }
174
175
  ];
175
- // const signUpGAEvent = (userId: string) => {
176
- // gtag.event({
177
- // event_name: 'sign_up_ga_event',
178
- // category: 'sign_up',
179
- // label: `회원가입 완료 - ${userId}`,
180
- // value: '1',
181
- // user_id: userId
182
- // });
183
- // };
176
+ const signUpGAEvent = (userId) => {
177
+ gtag.event({
178
+ event_name: 'sign_up_ga_event',
179
+ category: 'sign_up',
180
+ label: `회원가입 완료 - ${userId}`,
181
+ value: '1',
182
+ user_id: userId
183
+ });
184
+ };
184
185
  const appendUuidToRedirect = (redirect, uuid) => {
185
186
  if (!uuid)
186
187
  return redirect;
@@ -252,7 +253,7 @@ const StepOne = () => {
252
253
  setIsModal(true);
253
254
  sessionStorage.removeItem('login');
254
255
  // ga trigger
255
- // signUpGAEvent(String(userIdx ?? ''));
256
+ signUpGAEvent(String(userIdx !== null && userIdx !== void 0 ? userIdx : ''));
256
257
  },
257
258
  onError: error => {
258
259
  console.error('Skip API 호출 실패:', error);
@@ -235,15 +235,15 @@ const StepOne = () => {
235
235
  { code: 'CT0030', code_name: '경호' }
236
236
  ];
237
237
 
238
- // const signUpGAEvent = (userId: string) => {
239
- // gtag.event({
240
- // event_name: 'sign_up_ga_event',
241
- // category: 'sign_up',
242
- // label: `회원가입 완료 - ${userId}`,
243
- // value: '1',
244
- // user_id: userId
245
- // });
246
- // };
238
+ const signUpGAEvent = (userId: string) => {
239
+ gtag.event({
240
+ event_name: 'sign_up_ga_event',
241
+ category: 'sign_up',
242
+ label: `회원가입 완료 - ${userId}`,
243
+ value: '1',
244
+ user_id: userId
245
+ });
246
+ };
247
247
 
248
248
  const appendUuidToRedirect = (redirect: string, uuid?: string) => {
249
249
  if (!uuid) return redirect;
@@ -325,7 +325,7 @@ const StepOne = () => {
325
325
  sessionStorage.removeItem('login');
326
326
 
327
327
  // ga trigger
328
- // signUpGAEvent(String(userIdx ?? ''));
328
+ signUpGAEvent(String(userIdx ?? ''));
329
329
  },
330
330
  onError: error => {
331
331
  console.error('Skip API 호출 실패:', error);
@@ -14,6 +14,7 @@ import { useMutation } from '@tanstack/react-query';
14
14
  import { getCookie, setCookie } from '../../../lib';
15
15
  import ConfirmModal from './LoginComp/Modal/ConfirmModal';
16
16
  import Loader from '../../../components/Loader/Loader';
17
+ import * as gtag from '../../../lib/gtag';
17
18
  const Box = ({ type_idx, tag_title, selected, selectedList, setSelectedList, activeTooltipId, setActiveTooltipId, tooltipTimeoutRef }) => {
18
19
  const [tooltipStyle, setTooltipStyle] = useState({});
19
20
  const buttonRef = useRef(null);
@@ -191,15 +192,15 @@ const StepTwo = () => {
191
192
  { code: 'CT0029', code_name: '디지털포렌식' },
192
193
  { code: 'CT0030', code_name: '경호' }
193
194
  ];
194
- // const signUpGAEvent = (userId: string) => {
195
- // gtag.event({
196
- // event_name: 'sign_up_ga_event',
197
- // category: 'sign_up',
198
- // label: `회원가입 완료 - ${userId}`,
199
- // value: '1',
200
- // user_id: userId
201
- // });
202
- // };
195
+ const signUpGAEvent = (userId) => {
196
+ gtag.event({
197
+ event_name: 'sign_up_ga_event',
198
+ category: 'sign_up',
199
+ label: `회원가입 완료 - ${userId}`,
200
+ value: '1',
201
+ user_id: userId
202
+ });
203
+ };
203
204
  // API 호출 함수
204
205
  const fetchFieldData = (centerCode) => __awaiter(void 0, void 0, void 0, function* () {
205
206
  try {
@@ -291,7 +292,7 @@ const StepTwo = () => {
291
292
  setIsModal(true);
292
293
  sessionStorage.removeItem('login');
293
294
  // ga trigger
294
- // signUpGAEvent(String(userIdx ?? ''));
295
+ signUpGAEvent(String(userIdx !== null && userIdx !== void 0 ? userIdx : ''));
295
296
  },
296
297
  onError: error => {
297
298
  console.error('Skip API 호출 실패:', error);
@@ -246,15 +246,15 @@ const StepTwo = () => {
246
246
  { code: 'CT0030', code_name: '경호' }
247
247
  ];
248
248
 
249
- // const signUpGAEvent = (userId: string) => {
250
- // gtag.event({
251
- // event_name: 'sign_up_ga_event',
252
- // category: 'sign_up',
253
- // label: `회원가입 완료 - ${userId}`,
254
- // value: '1',
255
- // user_id: userId
256
- // });
257
- // };
249
+ const signUpGAEvent = (userId: string) => {
250
+ gtag.event({
251
+ event_name: 'sign_up_ga_event',
252
+ category: 'sign_up',
253
+ label: `회원가입 완료 - ${userId}`,
254
+ value: '1',
255
+ user_id: userId
256
+ });
257
+ };
258
258
 
259
259
  // API 호출 함수
260
260
  const fetchFieldData = async (centerCode: string) => {
@@ -365,7 +365,7 @@ const StepTwo = () => {
365
365
  sessionStorage.removeItem('login');
366
366
 
367
367
  // ga trigger
368
- // signUpGAEvent(String(userIdx ?? ''));
368
+ signUpGAEvent(String(userIdx ?? ''));
369
369
  },
370
370
 
371
371
  onError: error => {
@@ -147,7 +147,7 @@ const Withdraw = ({ layoutClassName = `py-[128px] max-lg:py-[112px] max-sm:py-[1
147
147
  <button type={'button'} onClick={() => __awaiter(void 0, void 0, void 0, function* () {
148
148
  yield completeWithdraw(reasons, etcReason);
149
149
  // uuid 쿠키 삭제
150
- // document.cookie = '_dr_uuid=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
150
+ document.cookie = '_dr_uuid=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
151
151
  })} className={` ${isAll ? ' bg-[#AE0E36] text-white ' : ' bg-[#EDEDED] text-[#909090] '} ` +
152
152
  ' title_small h-[72px] w-[740px] rounded-[36px] ' +
153
153
  ' max-lg:body_medium2 max-lg:h-[60px] max-lg:w-[620px] ' +
@@ -209,7 +209,7 @@ const Withdraw = ({ layoutClassName = `py-[128px] max-lg:py-[112px] max-sm:py-[1
209
209
  onClick={async () => {
210
210
  await completeWithdraw(reasons, etcReason);
211
211
  // uuid 쿠키 삭제
212
- // document.cookie = '_dr_uuid=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
212
+ document.cookie = '_dr_uuid=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
213
213
  }}
214
214
  className={
215
215
  ` ${isAll ? ' bg-[#AE0E36] text-white ' : ' bg-[#EDEDED] text-[#909090] '} ` +
@@ -7,7 +7,7 @@ import { getPowerLinkStr } from '../../../../lib';
7
7
  const SeoAdditionalLink = ({ type, linkList }) => {
8
8
  const referClick = () => {
9
9
  gtag.event({
10
- action: 'contents_refer',
10
+ event_name: 'contents_refer',
11
11
  category: 'contents',
12
12
  label: '컨텐츠 내 참고 컨텐츠 클릭',
13
13
  value: '1'
@@ -15,7 +15,7 @@ const SeoAdditionalLink = ({ type, linkList }) => {
15
15
  };
16
16
  const newsClick = () => {
17
17
  gtag.event({
18
- action: 'contents_news',
18
+ event_name: 'contents_news',
19
19
  category: 'contents',
20
20
  label: '컨텐츠 내 관련 기사 클릭',
21
21
  value: '1'
@@ -9,7 +9,7 @@ import { getPowerLinkStr } from '../../../../lib';
9
9
  const SeoAdditionalLink = ({ type, linkList }: { type: string; linkList: IAddLinkTypes[] }) => {
10
10
  const referClick = () => {
11
11
  gtag.event({
12
- action: 'contents_refer',
12
+ event_name: 'contents_refer',
13
13
  category: 'contents',
14
14
  label: '컨텐츠 내 참고 컨텐츠 클릭',
15
15
  value: '1'
@@ -18,7 +18,7 @@ const SeoAdditionalLink = ({ type, linkList }: { type: string; linkList: IAddLin
18
18
 
19
19
  const newsClick = () => {
20
20
  gtag.event({
21
- action: 'contents_news',
21
+ event_name: 'contents_news',
22
22
  category: 'contents',
23
23
  label: '컨텐츠 내 관련 기사 클릭',
24
24
  value: '1'
@@ -1,8 +1,6 @@
1
1
  export const GA_TRACKING_ID: "G-8ZNZYTEZQ5";
2
2
  export function page_view(screen_name: any): void;
3
- export function event({ action, category, label, value }: {
4
- action: any;
5
- category: any;
6
- label: any;
7
- value: any;
3
+ export function event({ event_name, ...params }: {
4
+ [x: string]: any;
5
+ event_name: any;
8
6
  }): void;
package/dist/lib/gtag.js CHANGED
@@ -1,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  export const GA_TRACKING_ID = 'G-8ZNZYTEZQ5';
2
13
  // https://developers.google.com/analytics/devguides/collection/ga4/events?hl=ko&client_type=gtag
3
14
  export const page_view = screen_name => {
@@ -11,27 +22,25 @@ export const page_view = screen_name => {
11
22
  console.warn('gtag is not defined');
12
23
  }
13
24
  };
14
- export const event = ({ action, category, label, value }) => {
15
- if (typeof window !== 'undefined' && typeof window.gtag === 'function') {
16
- window.gtag('event', action, {
17
- app_name: process.env.NEXT_PUBLIC_SERVICE_DOMAIN || 'default_app',
18
- event_name: label,
19
- event_category: category,
20
- value: value
21
- });
22
- }
23
- else {
24
- console.warn('gtag is not defined');
25
- }
26
- };
27
- // 로그인/회원가입 ga 이벤트 적용할 때, 주석 해제하고 혜인님과 기훈님에게 event_name 변경된 것 내용 공유드려야함
28
- // export const event = ({ event_name, ...params }) => { // 이름 변경 및 매개변수 이름 수정
25
+ // export const event = ({ action, category, label, value }) => {
29
26
  // if (typeof window !== 'undefined' && typeof window.gtag === 'function') {
30
- // window.gtag('event', event_name, { // event_name 사용
27
+ // window.gtag('event', action, {
31
28
  // app_name: process.env.NEXT_PUBLIC_SERVICE_DOMAIN || 'default_app',
32
- // ...params // 커스텀 매개변수들을 바로 전달
29
+ // event_name: label,
30
+ // event_category: category,
31
+ // value: value
33
32
  // });
34
33
  // } else {
35
34
  // console.warn('gtag is not defined');
36
35
  // }
37
36
  // };
37
+ export const event = (_a) => {
38
+ var { event_name } = _a, params = __rest(_a, ["event_name"]);
39
+ if (typeof window !== 'undefined' && typeof window.gtag === 'function') {
40
+ window.gtag('event', event_name, Object.assign({ app_name: process.env.NEXT_PUBLIC_SERVICE_DOMAIN || 'default_app' }, params // 커스텀 매개변수들을 바로 전달
41
+ ));
42
+ }
43
+ else {
44
+ console.warn('gtag is not defined');
45
+ }
46
+ };
@@ -1,8 +1,8 @@
1
1
  interface GtagClickProps {
2
- action: string;
2
+ event_name: string;
3
3
  category: string;
4
4
  label: string;
5
5
  }
6
- export declare const GtagClick: ({ action, category, label }: GtagClickProps) => void;
7
- export declare const handleGtagClick: (action: string, category: string, label: string) => void;
6
+ export declare const GtagClick: ({ event_name, category, label }: GtagClickProps) => void;
7
+ export declare const handleGtagClick: (event_name: string, category: string, label: string) => void;
8
8
  export {};
@@ -1,13 +1,13 @@
1
1
  import * as gtag from './gtag';
2
- export const GtagClick = ({ action, category, label }) => {
2
+ export const GtagClick = ({ event_name, category, label }) => {
3
3
  gtag.event({
4
- action: action,
4
+ event_name: event_name,
5
5
  category: category,
6
6
  label: label,
7
7
  value: '1'
8
8
  });
9
- console.log("I'm clicked", action);
9
+ console.log("I'm clicked", event_name);
10
10
  };
11
- export const handleGtagClick = (action, category, label) => {
12
- GtagClick({ action, category, label });
11
+ export const handleGtagClick = (event_name, category, label) => {
12
+ GtagClick({ event_name, category, label });
13
13
  };
@@ -1,21 +1,21 @@
1
1
  import * as gtag from './gtag';
2
2
 
3
3
  interface GtagClickProps {
4
- action: string;
4
+ event_name: string;
5
5
  category: string;
6
6
  label: string;
7
7
  }
8
8
 
9
- export const GtagClick = ({ action, category, label }: GtagClickProps) => {
9
+ export const GtagClick = ({ event_name, category, label }: GtagClickProps) => {
10
10
  gtag.event({
11
- action: action,
11
+ event_name: event_name,
12
12
  category: category,
13
13
  label: label,
14
14
  value: '1'
15
15
  });
16
- console.log("I'm clicked", action);
16
+ console.log("I'm clicked", event_name);
17
17
  };
18
18
 
19
- export const handleGtagClick = (action: string, category: string, label: string) => {
20
- GtagClick({ action, category, label });
19
+ export const handleGtagClick = (event_name: string, category: string, label: string) => {
20
+ GtagClick({ event_name, category, label });
21
21
  };