@daeryun/dr_components 0.9.97 → 0.9.99

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.
@@ -89,7 +89,7 @@ const LawInfoNew = ({ data, tel }) => {
89
89
  const convertFaqItemType = (template) => {
90
90
  console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
91
91
  if (faqElementMaxCountInContents >= 2) {
92
- template.description = template.description.replaceAll(/item(scope|type)\s*=\s*["'][^"']*["']/gi, '');
92
+ template.description = template.description.replaceAll(/<div\s+itemscope=""\s+itemtype="https:\/\/schema\.org\/FAQPage">/gi, '<div>');
93
93
  return template;
94
94
  }
95
95
  return template;
@@ -121,7 +121,10 @@ const LawInfoNew = ({ data, tel }: ILawInfoNewPageTypes) => {
121
121
  const convertFaqItemType = (template: ISeoTemplateTypes): ISeoTemplateTypes => {
122
122
  console.log('faqElementMaxCountInContents : ', faqElementMaxCountInContents);
123
123
  if ((faqElementMaxCountInContents as number) >= 2) {
124
- template.description = template.description.replaceAll(/item(scope|type)\s*=\s*["'][^"']*["']/gi, '');
124
+ template.description = template.description.replaceAll(
125
+ /<div\s+itemscope=""\s+itemtype="https:\/\/schema\.org\/FAQPage">/gi,
126
+ '<div>'
127
+ );
125
128
 
126
129
  return template;
127
130
  }
@@ -3,13 +3,13 @@ import { htmlUrlDecode } from '../../../../lib';
3
3
  const H2Contents = ({ h2Template, index, faqCount }) => {
4
4
  const { active_faq } = h2Template;
5
5
  const getItemScope = () => {
6
- if (active_faq || faqCount >= 1) {
6
+ if (active_faq || faqCount === 0) {
7
7
  return undefined;
8
8
  }
9
9
  return true;
10
10
  };
11
11
  const getItemProp = (category) => {
12
- if (active_faq || faqCount >= 1) {
12
+ if (active_faq || faqCount === 0) {
13
13
  return undefined;
14
14
  }
15
15
  else {
@@ -28,7 +28,7 @@ const H2Contents = ({ h2Template, index, faqCount }) => {
28
28
  }
29
29
  };
30
30
  const getItemType = (category) => {
31
- if (active_faq || faqCount >= 1) {
31
+ if (active_faq || faqCount === 0) {
32
32
  return undefined;
33
33
  }
34
34
  else {
@@ -17,14 +17,15 @@ const H2Contents = ({
17
17
  const { active_faq } = h2Template;
18
18
 
19
19
  const getItemScope = (): boolean | undefined => {
20
- if (active_faq || (faqCount as number) >= 1) {
20
+ if (active_faq || (faqCount as number) === 0) {
21
21
  return undefined;
22
22
  }
23
+
23
24
  return true;
24
25
  };
25
26
 
26
27
  const getItemProp = (category: ItemPropTypes): string | undefined => {
27
- if (active_faq || (faqCount as number) >= 1) {
28
+ if (active_faq || (faqCount as number) === 0) {
28
29
  return undefined;
29
30
  } else {
30
31
  switch (category) {
@@ -43,7 +44,7 @@ const H2Contents = ({
43
44
  };
44
45
 
45
46
  const getItemType = (category: ItemTypes): string | undefined => {
46
- if (active_faq || (faqCount as number) >= 1) {
47
+ if (active_faq || (faqCount as number) === 0) {
47
48
  return undefined;
48
49
  } else {
49
50
  switch (category) {
@@ -5,13 +5,13 @@ import FieldIcon from '../../../../asset/images/success_new/field_icon.webp';
5
5
  const H3Contents = ({ h3Template, faqCount }) => {
6
6
  const { active_faq } = h3Template;
7
7
  const getItemScope = () => {
8
- if (active_faq || faqCount >= 1) {
8
+ if (active_faq || faqCount === 0) {
9
9
  return undefined;
10
10
  }
11
11
  return true;
12
12
  };
13
13
  const getItemProp = (category) => {
14
- if (active_faq || faqCount >= 1) {
14
+ if (active_faq || faqCount === 0) {
15
15
  return undefined;
16
16
  }
17
17
  else {
@@ -30,7 +30,7 @@ const H3Contents = ({ h3Template, faqCount }) => {
30
30
  }
31
31
  };
32
32
  const getItemType = (category) => {
33
- if (active_faq || faqCount >= 1) {
33
+ if (active_faq || faqCount === 0) {
34
34
  return undefined;
35
35
  }
36
36
  else {
@@ -11,14 +11,14 @@ const H3Contents = ({ h3Template, faqCount }: { h3Template: ISeoTemplateTypes; f
11
11
  const { active_faq } = h3Template;
12
12
 
13
13
  const getItemScope = (): boolean | undefined => {
14
- if (active_faq || (faqCount as number) >= 1) {
14
+ if (active_faq || (faqCount as number) === 0) {
15
15
  return undefined;
16
16
  }
17
17
  return true;
18
18
  };
19
19
 
20
20
  const getItemProp = (category: ItemPropTypes): string | undefined => {
21
- if (active_faq || (faqCount as number) >= 1) {
21
+ if (active_faq || (faqCount as number) === 0) {
22
22
  return undefined;
23
23
  } else {
24
24
  switch (category) {
@@ -37,7 +37,7 @@ const H3Contents = ({ h3Template, faqCount }: { h3Template: ISeoTemplateTypes; f
37
37
  };
38
38
 
39
39
  const getItemType = (category: ItemTypes): string | undefined => {
40
- if (active_faq || (faqCount as number) >= 1) {
40
+ if (active_faq || (faqCount as number) === 0) {
41
41
  return undefined;
42
42
  } else {
43
43
  switch (category) {