libreria-astro-lefebvre 0.0.180 → 0.0.181

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libreria-astro-lefebvre",
3
- "version": "0.0.180",
3
+ "version": "0.0.181",
4
4
  "description": "Librería de componentes Astro, React y Vue para Lefebvre",
5
5
  "author": "Equipo web desarrollo Lefebvre",
6
6
  "type": "module",
@@ -81,5 +81,13 @@ export const metadata: ComponentMetadata = {
81
81
  mandatory: false,
82
82
  example_value: '27925 Formulario Solicitar Demo GenIA-L'
83
83
  },
84
+ {
85
+ name: 'idebook',
86
+ type: 'text',
87
+ help: 'ID del ebook, whitepaper o documento registrado en BI con formato EXXXXXXX para pasar como parámetro oculto al formulario de LF2. No es obligatorio, solo debe usarse para formularios que acabaran con una descarga',
88
+ label: 'ID de documento en BI (opcional)',
89
+ mandatory: false,
90
+ example_value: ''
91
+ },
84
92
  ]
85
93
  };
@@ -9,8 +9,7 @@ const {
9
9
  title='',
10
10
  tag='',
11
11
  description='',
12
- author='',
13
- authorURL='#',
12
+ author=''
14
13
  } = Astro.props;
15
14
 
16
15
  const imageUrl = extractImageUrl(image);
@@ -12,6 +12,7 @@ const {
12
12
  titleModal = '',
13
13
  descriptionModal = '',
14
14
  lf2FormTitle = '',
15
+ idebook = '',
15
16
  } = Astro.props;
16
17
 
17
18
  const imageModalUrl = extractImageUrl(imageModal);
@@ -65,7 +66,7 @@ const structuredData = `<script type="application/ld+json">
65
66
 
66
67
  <Fragment set:html={structuredData} />
67
68
 
68
- <script is:inline define:vars={{ randomId, lf2FormTitle }}>
69
+ <script is:inline define:vars={{ randomId, lf2FormTitle, idebook }}>
69
70
 
70
71
  document.addEventListener('DOMContentLoaded', () => {
71
72
 
@@ -73,9 +74,16 @@ const structuredData = `<script type="application/ld+json">
73
74
  fake: true,
74
75
  formulario: lf2FormTitle,
75
76
  bootstrap: true,
76
- target: '#'+ `lf2-form-container-${randomId}`
77
+ target: '#'+ `lf2-form-container-${randomId}`,
77
78
  };
78
79
 
80
+ if (idebook && idebook !== '') {
81
+ configLf2.defaultparameters = {
82
+ 'idebook': idebook,
83
+ 'codprod': idebook
84
+ };
85
+ }
86
+
79
87
  try {
80
88
  apiManager.pintarFormularioAutogestionado(configLf2);
81
89
  } catch (error) {