ctt-puro 0.46.17 → 0.46.19
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/esm2022/lib/components/puro-faqs/puro-faqs.component.mjs +3 -2
- package/esm2022/lib/directives/puro-script/puro-script.directive.mjs +7 -7
- package/esm2022/lib/services/mapper/mapper.service.mjs +6 -4
- package/fesm2022/ctt-puro.mjs +12 -10
- package/fesm2022/ctt-puro.mjs.map +1 -1
- package/lib/services/mapper/mapper.service.d.ts +2 -2
- package/package.json +1 -1
package/fesm2022/ctt-puro.mjs
CHANGED
|
@@ -815,12 +815,12 @@ class PuroScriptDirective {
|
|
|
815
815
|
/* --- Accordion --- */
|
|
816
816
|
(function (a, $) {
|
|
817
817
|
if (a.length) {
|
|
818
|
-
$('.js-accordion')
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
818
|
+
$('.js-accordion')
|
|
819
|
+
.off('click')
|
|
820
|
+
.on('click', function () {
|
|
821
|
+
const tab = $(this);
|
|
822
|
+
tab.parents('.faq__item').toggleClass('active');
|
|
823
|
+
tab.next('.faq__content').slideToggle();
|
|
824
824
|
});
|
|
825
825
|
}
|
|
826
826
|
})(document.querySelectorAll('.js-accordion'), jQuery);
|
|
@@ -3340,7 +3340,7 @@ class PuroFaqsComponent {
|
|
|
3340
3340
|
}
|
|
3341
3341
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PuroFaqsComponent, decorators: [{
|
|
3342
3342
|
type: Component,
|
|
3343
|
-
args: [{ selector: 'lib-puro-faqs', standalone: true, imports: [CommonModule, PuroDynamicHeadingComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"faq\">\n @if (title) {\n <lib-puro-dynamic-heading\n [tag]=\"tags?.title || 'span'\"\n cssClass=\"faq__title\"\n [color]=\"textColors?.title\"\n [content]=\"title\"\n ></lib-puro-dynamic-heading>\n }\n <div class=\"faq__container\">\n @if (items?.length) {\n <div class=\"faq__list\">\n @for (item of items; track $index) {\n <div class=\"faq__item\">\n <div class=\"faq__heading js-accordion\" role=\"button\">\n @if (item.title) {\n <span>{{ item.title }}</span>\n }\n <span class=\"faq__icon\">\n <i class=\"icon-6\"></i>\n </span>\n </div>\n @if (item.content) {\n <div class=\"faq__content\">\n <p>\n {{ item.content }}\n </p>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>\n" }]
|
|
3343
|
+
args: [{ selector: 'lib-puro-faqs', standalone: true, imports: [CommonModule, PuroDynamicHeadingComponent, PuroScriptDirective], changeDetection: ChangeDetectionStrategy.OnPush, template: "<section class=\"faq\">\n @if (title) {\n <lib-puro-dynamic-heading\n [tag]=\"tags?.title || 'span'\"\n cssClass=\"faq__title\"\n [color]=\"textColors?.title\"\n [content]=\"title\"\n ></lib-puro-dynamic-heading>\n }\n <div class=\"faq__container\">\n @if (items?.length) {\n <div class=\"faq__list\">\n @for (item of items; track $index) {\n <div class=\"faq__item\">\n <div class=\"faq__heading js-accordion\" role=\"button\">\n @if (item.title) {\n <span>{{ item.title }}</span>\n }\n <span class=\"faq__icon\">\n <i class=\"icon-6\"></i>\n </span>\n </div>\n @if (item.content) {\n <div class=\"faq__content\">\n <p>\n {{ item.content }}\n </p>\n </div>\n }\n </div>\n }\n </div>\n }\n </div>\n</section>\n" }]
|
|
3344
3344
|
}], propDecorators: { title: [{
|
|
3345
3345
|
type: Input
|
|
3346
3346
|
}], items: [{
|
|
@@ -3953,6 +3953,9 @@ class MapperService {
|
|
|
3953
3953
|
case 'iframe':
|
|
3954
3954
|
componentMapped.props = this.mapIframe(component.props);
|
|
3955
3955
|
break;
|
|
3956
|
+
case 'faqs':
|
|
3957
|
+
componentMapped.props = this.mapFaqs(component.props);
|
|
3958
|
+
break;
|
|
3956
3959
|
case 'faqsimg':
|
|
3957
3960
|
componentMapped.props = this.mapFaqsImg(component.props, component.view);
|
|
3958
3961
|
break;
|
|
@@ -5506,7 +5509,6 @@ class MapperService {
|
|
|
5506
5509
|
})),
|
|
5507
5510
|
};
|
|
5508
5511
|
}
|
|
5509
|
-
//TODO: Check back props
|
|
5510
5512
|
mapFaqs(props) {
|
|
5511
5513
|
return {
|
|
5512
5514
|
title: typeof props?.texts?.title === 'string'
|
|
@@ -5518,9 +5520,9 @@ class MapperService {
|
|
|
5518
5520
|
textColors: {
|
|
5519
5521
|
title: props?.texts?.title?.color?.trim(),
|
|
5520
5522
|
},
|
|
5521
|
-
items: props?.
|
|
5523
|
+
items: props?.Items?.map((item) => ({
|
|
5522
5524
|
title: item.title,
|
|
5523
|
-
content: item.content,
|
|
5525
|
+
content: item.content ?? item.text,
|
|
5524
5526
|
})),
|
|
5525
5527
|
};
|
|
5526
5528
|
}
|