@daeryun/dr_components 0.9.86 → 0.9.88
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/components/page/LawInfoNew/LawInfoNew.jsx +1 -1
- package/dist/components/page/LawInfoNew/LawInfoNew.tsx +0 -4
- package/dist/components/page/SuccessNew/SuccessNewType.d.ts +1 -0
- package/dist/components/page/SuccessNew/SuccessNewType.ts +1 -0
- package/dist/components/page/SuccessNew/components/H2Contents.jsx +27 -23
- package/dist/components/page/SuccessNew/components/H2Contents.tsx +66 -54
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -129,7 +129,7 @@ const LawInfoNew = ({ data, tel }) => {
|
|
|
129
129
|
{/*h2*/}
|
|
130
130
|
{h2List &&
|
|
131
131
|
h2List.map((h2Template, index) => {
|
|
132
|
-
return (<section className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'} key={'h2영역' + h2Template.idx}
|
|
132
|
+
return (<section className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'} key={'h2영역' + h2Template.idx}>
|
|
133
133
|
<H2Contents h2Template={convertFaqItemType(h2Template)} index={index} faqCount={faqCount}/>
|
|
134
134
|
|
|
135
135
|
{/*h3*/}
|
|
@@ -202,10 +202,6 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
|
|
|
202
202
|
<section
|
|
203
203
|
className={'mt-[52px] sm:mt-[62px] lg:mt-[75px]'}
|
|
204
204
|
key={'h2영역' + h2Template.idx}
|
|
205
|
-
itemScope={(faqCount as number) >= 2 ? true : undefined}
|
|
206
|
-
itemType={
|
|
207
|
-
(faqCount as number) >= 2 ? 'https://schema.org/FAQPage' : undefined
|
|
208
|
-
}
|
|
209
205
|
>
|
|
210
206
|
<H2Contents
|
|
211
207
|
h2Template={convertFaqItemType(h2Template)}
|
|
@@ -11,15 +11,16 @@ const H2Contents = ({ h2Template, index, faqCount }) => {
|
|
|
11
11
|
const getItemProp = (category) => {
|
|
12
12
|
if (active_faq || faqCount >= 2) {
|
|
13
13
|
switch (category) {
|
|
14
|
-
case
|
|
15
|
-
return
|
|
16
|
-
case
|
|
17
|
-
return
|
|
18
|
-
case
|
|
19
|
-
return
|
|
20
|
-
case
|
|
21
|
-
return
|
|
22
|
-
default:
|
|
14
|
+
case 'mainEntity':
|
|
15
|
+
return 'mainEntity';
|
|
16
|
+
case 'acceptedAnswer':
|
|
17
|
+
return 'acceptedAnswer';
|
|
18
|
+
case 'name':
|
|
19
|
+
return 'name';
|
|
20
|
+
case 'text':
|
|
21
|
+
return 'text';
|
|
22
|
+
default:
|
|
23
|
+
undefined;
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
return undefined;
|
|
@@ -27,25 +28,28 @@ const H2Contents = ({ h2Template, index, faqCount }) => {
|
|
|
27
28
|
const getItemType = (category) => {
|
|
28
29
|
if (active_faq || faqCount >= 2) {
|
|
29
30
|
switch (category) {
|
|
30
|
-
case
|
|
31
|
-
return
|
|
32
|
-
case
|
|
33
|
-
return
|
|
34
|
-
default:
|
|
31
|
+
case 'question':
|
|
32
|
+
return 'https://schema.org/Question';
|
|
33
|
+
case 'answer':
|
|
34
|
+
return 'https://schema.org/Answer';
|
|
35
|
+
default:
|
|
36
|
+
undefined;
|
|
35
37
|
}
|
|
36
38
|
}
|
|
37
39
|
return undefined;
|
|
38
40
|
};
|
|
39
|
-
return (<div itemScope={
|
|
40
|
-
<
|
|
41
|
-
{
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
{
|
|
41
|
+
return (<div itemScope={faqCount >= 2 ? true : undefined} itemType={faqCount >= 2 ? 'https://schema.org/FAQPage' : undefined}>
|
|
42
|
+
<div itemScope={getItemScope()} itemProp={getItemProp('mainEntity')} itemType={getItemType('question')}>
|
|
43
|
+
<h2 className={'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'} id={h2Template.idx.toString()} itemProp={getItemProp('name')}>
|
|
44
|
+
{index + 1}. {h2Template.tag_title}
|
|
45
|
+
</h2>
|
|
46
|
+
<div className={'px-[10px] sm:px-[18px]'}>
|
|
47
|
+
{/*h2 설명글*/}
|
|
48
|
+
<div className={'lg::mt-[37.5px] mb-[44px] mt-[26px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:mt-[32px] sm:text-[17.25px] lg:mb-[78px]'} itemScope={getItemScope()} itemProp={getItemProp('acceptedAnswer')} itemType={getItemType('answer')}>
|
|
49
|
+
{h2Template.is_editor ? (<div itemProp={getItemProp('text')} id={'ck-content'} dangerouslySetInnerHTML={{
|
|
47
50
|
__html: htmlUrlDecode(h2Template.description.replace('../../UploadFile', '/SE2/upload'))
|
|
48
|
-
}}/>) : (<div itemProp={getItemProp(
|
|
51
|
+
}}/>) : (<div itemProp={getItemProp('text')}>{h2Template.description}</div>)}
|
|
52
|
+
</div>
|
|
49
53
|
</div>
|
|
50
54
|
</div>
|
|
51
55
|
</div>);
|
|
@@ -2,32 +2,40 @@ import React from 'react';
|
|
|
2
2
|
import { ISeoTemplateTypes } from '../SuccessNewType';
|
|
3
3
|
import { htmlUrlDecode } from '../../../../lib';
|
|
4
4
|
|
|
5
|
-
type ItemPropTypes =
|
|
6
|
-
type ItemTypes =
|
|
5
|
+
type ItemPropTypes = 'mainEntity' | 'acceptedAnswer' | 'name' | 'text';
|
|
6
|
+
type ItemTypes = 'question' | 'answer';
|
|
7
7
|
|
|
8
|
-
const H2Contents = ({
|
|
8
|
+
const H2Contents = ({
|
|
9
|
+
h2Template,
|
|
10
|
+
index,
|
|
11
|
+
faqCount
|
|
12
|
+
}: {
|
|
13
|
+
h2Template: ISeoTemplateTypes;
|
|
14
|
+
index: number;
|
|
15
|
+
faqCount?: number;
|
|
16
|
+
}) => {
|
|
9
17
|
const { active_faq } = h2Template;
|
|
10
18
|
|
|
11
|
-
|
|
12
19
|
const getItemScope = (): boolean | undefined => {
|
|
13
|
-
if (active_faq || faqCount as number >= 2) {
|
|
20
|
+
if (active_faq || (faqCount as number) >= 2) {
|
|
14
21
|
return true;
|
|
15
22
|
}
|
|
16
23
|
return undefined;
|
|
17
24
|
};
|
|
18
25
|
|
|
19
26
|
const getItemProp = (category: ItemPropTypes): string | undefined => {
|
|
20
|
-
if (active_faq || faqCount as number >= 2) {
|
|
21
|
-
switch(category) {
|
|
22
|
-
case
|
|
23
|
-
return
|
|
24
|
-
case
|
|
25
|
-
return
|
|
26
|
-
case
|
|
27
|
-
return
|
|
28
|
-
case
|
|
29
|
-
return
|
|
30
|
-
default:
|
|
27
|
+
if (active_faq || (faqCount as number) >= 2) {
|
|
28
|
+
switch (category) {
|
|
29
|
+
case 'mainEntity':
|
|
30
|
+
return 'mainEntity';
|
|
31
|
+
case 'acceptedAnswer':
|
|
32
|
+
return 'acceptedAnswer';
|
|
33
|
+
case 'name':
|
|
34
|
+
return 'name';
|
|
35
|
+
case 'text':
|
|
36
|
+
return 'text';
|
|
37
|
+
default:
|
|
38
|
+
undefined;
|
|
31
39
|
}
|
|
32
40
|
}
|
|
33
41
|
|
|
@@ -35,55 +43,59 @@ const H2Contents = ({ h2Template, index, faqCount }: { h2Template: ISeoTemplateT
|
|
|
35
43
|
};
|
|
36
44
|
|
|
37
45
|
const getItemType = (category: ItemTypes): string | undefined => {
|
|
38
|
-
if (active_faq || faqCount as number >= 2) {
|
|
39
|
-
switch(category) {
|
|
40
|
-
case
|
|
41
|
-
return
|
|
42
|
-
case
|
|
43
|
-
return
|
|
44
|
-
default:
|
|
46
|
+
if (active_faq || (faqCount as number) >= 2) {
|
|
47
|
+
switch (category) {
|
|
48
|
+
case 'question':
|
|
49
|
+
return 'https://schema.org/Question';
|
|
50
|
+
case 'answer':
|
|
51
|
+
return 'https://schema.org/Answer';
|
|
52
|
+
default:
|
|
53
|
+
undefined;
|
|
45
54
|
}
|
|
46
55
|
}
|
|
47
56
|
|
|
48
57
|
return undefined;
|
|
49
58
|
};
|
|
50
|
-
|
|
59
|
+
|
|
51
60
|
return (
|
|
52
61
|
<div
|
|
53
|
-
itemScope={
|
|
54
|
-
|
|
55
|
-
itemType={getItemType("question")}
|
|
62
|
+
itemScope={(faqCount as number) >= 2 ? true : undefined}
|
|
63
|
+
itemType={(faqCount as number) >= 2 ? 'https://schema.org/FAQPage' : undefined}
|
|
56
64
|
>
|
|
57
|
-
<
|
|
58
|
-
|
|
59
|
-
'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'
|
|
60
|
-
}
|
|
61
|
-
id={h2Template.idx.toString()}
|
|
62
|
-
itemProp={getItemProp("name")}
|
|
63
|
-
>
|
|
64
|
-
{index + 1}. {h2Template.tag_title}
|
|
65
|
-
</h2>
|
|
66
|
-
<div className={'px-[10px] sm:px-[18px]'}>
|
|
67
|
-
{/*h2 설명글*/}
|
|
68
|
-
<div
|
|
65
|
+
<div itemScope={getItemScope()} itemProp={getItemProp('mainEntity')} itemType={getItemType('question')}>
|
|
66
|
+
<h2
|
|
69
67
|
className={
|
|
70
|
-
'
|
|
68
|
+
'flex h-fit w-full items-center break-keep rounded-[40px] bg-[#285FA7] py-[6.75px] pl-[40px] pr-[20px] -indent-[20px] text-[20px] font-bold leading-[28px] tracking-tight text-white sm:pl-[46px] sm:pr-[26px] sm:text-[26px] sm:leading-[34px] lg:pl-[53px] lg:pr-[33px] lg:text-[31.5px] lg:leading-[38px]'
|
|
71
69
|
}
|
|
72
|
-
|
|
73
|
-
itemProp={getItemProp(
|
|
74
|
-
itemType={getItemType("answer")}
|
|
70
|
+
id={h2Template.idx.toString()}
|
|
71
|
+
itemProp={getItemProp('name')}
|
|
75
72
|
>
|
|
76
|
-
{h2Template.
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
73
|
+
{index + 1}. {h2Template.tag_title}
|
|
74
|
+
</h2>
|
|
75
|
+
<div className={'px-[10px] sm:px-[18px]'}>
|
|
76
|
+
{/*h2 설명글*/}
|
|
77
|
+
<div
|
|
78
|
+
className={
|
|
79
|
+
'lg::mt-[37.5px] mb-[44px] mt-[26px] whitespace-break-spaces text-[16px] tracking-[-0.69px] sm:mx-[20px] sm:mx-[33px] sm:mb-[50px] sm:mt-[32px] sm:text-[17.25px] lg:mb-[78px]'
|
|
80
|
+
}
|
|
81
|
+
itemScope={getItemScope()}
|
|
82
|
+
itemProp={getItemProp('acceptedAnswer')}
|
|
83
|
+
itemType={getItemType('answer')}
|
|
84
|
+
>
|
|
85
|
+
{h2Template.is_editor ? (
|
|
86
|
+
<div
|
|
87
|
+
itemProp={getItemProp('text')}
|
|
88
|
+
id={'ck-content'}
|
|
89
|
+
dangerouslySetInnerHTML={{
|
|
90
|
+
__html: htmlUrlDecode(
|
|
91
|
+
h2Template.description.replace('../../UploadFile', '/SE2/upload')
|
|
92
|
+
)
|
|
93
|
+
}}
|
|
94
|
+
/>
|
|
95
|
+
) : (
|
|
96
|
+
<div itemProp={getItemProp('text')}>{h2Template.description}</div>
|
|
97
|
+
)}
|
|
98
|
+
</div>
|
|
87
99
|
</div>
|
|
88
100
|
</div>
|
|
89
101
|
</div>
|