@searchstax-inc/searchstudio-ux-react 0.2.0 → 0.2.2
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/README.md +440 -4
- package/dist/@searchstax-inc/components/SearchstaxExternalPromotionsWidget.d.ts +5 -0
- package/dist/@searchstax-inc/components/SearchstaxFacetsWidget.d.ts +14 -0
- package/dist/@searchstax-inc/components/SearchstaxRelatedSearchesWidget.d.ts +7 -0
- package/dist/@searchstax-inc/main.d.ts +4 -1
- package/dist/@searchstax-inc/searchstudio-ux-react.cjs +15 -15
- package/dist/@searchstax-inc/searchstudio-ux-react.d.cts +4 -1
- package/dist/@searchstax-inc/searchstudio-ux-react.iife.js +18 -18
- package/dist/@searchstax-inc/searchstudio-ux-react.mjs +1502 -996
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -374,13 +374,366 @@ function paginationTemplate(
|
|
|
374
374
|
|
|
375
375
|
example of facets widget initialization with minimum options
|
|
376
376
|
```
|
|
377
|
-
|
|
377
|
+
<SearchstaxFacetsWidget
|
|
378
|
+
facetingType="and"
|
|
379
|
+
itemsPerPageDesktop={2}
|
|
380
|
+
itemsPerPageMobile={3}
|
|
381
|
+
specificFacets={undefined}
|
|
382
|
+
></SearchstaxFacetsWidget>
|
|
378
383
|
```
|
|
379
384
|
|
|
380
385
|
|
|
381
386
|
example of facets widget initialization with template overrides
|
|
382
387
|
```
|
|
388
|
+
function facetsTemplateDesktop(
|
|
389
|
+
facetsTemplateDataDesktop: IFacetsTemplateData | null,
|
|
390
|
+
facetContainers: {
|
|
391
|
+
[key: string]: React.LegacyRef<HTMLDivElement> | undefined;
|
|
392
|
+
},
|
|
393
|
+
isNotDeactivated: (name: string) => boolean,
|
|
394
|
+
toggleFacetGroup: (name: string) => void,
|
|
395
|
+
selectFacet: (
|
|
396
|
+
index: string,
|
|
397
|
+
event: React.MouseEvent<HTMLDivElement, MouseEvent>,
|
|
398
|
+
data: IFacetValueData,
|
|
399
|
+
isInput: boolean
|
|
400
|
+
) => void,
|
|
401
|
+
isChecked: (facetValue: IFacetValueData) => boolean | undefined,
|
|
402
|
+
showMoreLessDesktop: (
|
|
403
|
+
e: React.MouseEvent<HTMLDivElement, MouseEvent>,
|
|
404
|
+
data: IFacetData
|
|
405
|
+
) => void
|
|
406
|
+
) {
|
|
407
|
+
return (
|
|
408
|
+
<div className="searchstax-facets-container-desktop">
|
|
409
|
+
{facetsTemplateDataDesktop?.facets.map((facet) => {
|
|
410
|
+
return (
|
|
411
|
+
<div
|
|
412
|
+
className={`searchstax-facet-container ${
|
|
413
|
+
isNotDeactivated(facet.name) ? "active" : ""
|
|
414
|
+
}`}
|
|
415
|
+
key={facet.name + "desktop"}
|
|
416
|
+
>
|
|
417
|
+
<div>
|
|
418
|
+
<div
|
|
419
|
+
className="searchstax-facet-title-container"
|
|
420
|
+
onClick={() => {
|
|
421
|
+
toggleFacetGroup(facet.name);
|
|
422
|
+
}}
|
|
423
|
+
>
|
|
424
|
+
<div className="searchstax-facet-title"> {facet.label} kjhjk</div>
|
|
425
|
+
<div className="searchstax-facet-title-arrow active"></div>
|
|
426
|
+
</div>
|
|
427
|
+
<div className="searchstax-facet-values-container">
|
|
428
|
+
{facet.values.map(
|
|
429
|
+
//@ts-ignore
|
|
430
|
+
(facetValue: IFacetValueData, key) => {
|
|
431
|
+
facetContainers[key + facet.name] = createRef();
|
|
432
|
+
return (
|
|
433
|
+
<div
|
|
434
|
+
key={facetValue.value + facetValue.parentName}
|
|
435
|
+
className={`searchstax-facet-value-container ${
|
|
436
|
+
facetValue.disabled
|
|
437
|
+
? "searchstax-facet-value-disabled"
|
|
438
|
+
: ""
|
|
439
|
+
}`}
|
|
440
|
+
ref={facetContainers[key + facet.name]}
|
|
441
|
+
>
|
|
442
|
+
<div className="searchstax-facet-input">
|
|
443
|
+
<input
|
|
444
|
+
type="checkbox"
|
|
445
|
+
className="searchstax-facet-input-checkbox"
|
|
446
|
+
checked={isChecked(facetValue)}
|
|
447
|
+
readOnly={true}
|
|
448
|
+
disabled={facetValue.disabled}
|
|
449
|
+
onClick={(e) => {
|
|
450
|
+
selectFacet(
|
|
451
|
+
key + facet.name,
|
|
452
|
+
e,
|
|
453
|
+
facetValue,
|
|
454
|
+
true
|
|
455
|
+
);
|
|
456
|
+
}}
|
|
457
|
+
/>
|
|
458
|
+
</div>
|
|
459
|
+
<div
|
|
460
|
+
className="searchstax-facet-value-label"
|
|
461
|
+
onClick={(e) => {
|
|
462
|
+
selectFacet(
|
|
463
|
+
key + facet.name,
|
|
464
|
+
e,
|
|
465
|
+
facetValue,
|
|
466
|
+
false
|
|
467
|
+
);
|
|
468
|
+
}}
|
|
469
|
+
>
|
|
470
|
+
{facetValue.value}
|
|
471
|
+
</div>
|
|
472
|
+
<div
|
|
473
|
+
className="searchstax-facet-value-count"
|
|
474
|
+
onClick={(e) => {
|
|
475
|
+
selectFacet(
|
|
476
|
+
key + facet.name,
|
|
477
|
+
e,
|
|
478
|
+
facetValue,
|
|
479
|
+
false
|
|
480
|
+
);
|
|
481
|
+
}}
|
|
482
|
+
>
|
|
483
|
+
({facetValue.count})
|
|
484
|
+
</div>
|
|
485
|
+
</div>
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
)}
|
|
489
|
+
|
|
490
|
+
{facet.hasMoreFacets && (
|
|
491
|
+
<div className="searchstax-facet-show-more-container">
|
|
492
|
+
<div
|
|
493
|
+
className="searchstax-facet-show-more-container"
|
|
494
|
+
onClick={(e) => {
|
|
495
|
+
showMoreLessDesktop(e, facet);
|
|
496
|
+
}}
|
|
497
|
+
>
|
|
498
|
+
{facet.showingAllFacets && (
|
|
499
|
+
<div className="searchstax-facet-show-less-button searchstax-facet-show-button">
|
|
500
|
+
less
|
|
501
|
+
</div>
|
|
502
|
+
)}
|
|
503
|
+
{!facet.showingAllFacets && (
|
|
504
|
+
<div className="searchstax-facet-show-more-button searchstax-facet-show-button">
|
|
505
|
+
more
|
|
506
|
+
</div>
|
|
507
|
+
)}
|
|
508
|
+
</div>
|
|
509
|
+
</div>
|
|
510
|
+
)}
|
|
511
|
+
</div>
|
|
512
|
+
</div>
|
|
513
|
+
</div>
|
|
514
|
+
);
|
|
515
|
+
})}
|
|
516
|
+
</div>
|
|
517
|
+
);
|
|
518
|
+
}
|
|
383
519
|
|
|
520
|
+
function facetsTemplateMobile(
|
|
521
|
+
facetsTemplateDataMobile: IFacetsTemplateData | null,
|
|
522
|
+
selectedFacetsCheckboxes: IFacetValue[],
|
|
523
|
+
facetContainers: {
|
|
524
|
+
[key: string]: React.LegacyRef<HTMLDivElement> | undefined;
|
|
525
|
+
},
|
|
526
|
+
isNotDeactivated: (name: string) => boolean,
|
|
527
|
+
toggleFacetGroup: (name: string) => void,
|
|
528
|
+
selectFacet: (
|
|
529
|
+
index: string,
|
|
530
|
+
event: React.MouseEvent<HTMLDivElement, MouseEvent>,
|
|
531
|
+
data: IFacetValueData,
|
|
532
|
+
isInput: boolean
|
|
533
|
+
) => void,
|
|
534
|
+
isChecked: (facetValue: IFacetValueData) => boolean | undefined,
|
|
535
|
+
unselectFacet: (facet: IFacetValue) => void,
|
|
536
|
+
showMoreLessMobile: (
|
|
537
|
+
e: React.MouseEvent<HTMLDivElement, MouseEvent>,
|
|
538
|
+
data: IFacetData
|
|
539
|
+
) => void,
|
|
540
|
+
openOverlay: () => void,
|
|
541
|
+
closeOverlay: () => void,
|
|
542
|
+
unselectAll: () => void
|
|
543
|
+
) {
|
|
544
|
+
return facetsTemplateDataMobile ? (
|
|
545
|
+
<div className="searchstax-facets-container-mobile">
|
|
546
|
+
<div className="searchstax-facets-pills-container">
|
|
547
|
+
<div
|
|
548
|
+
className="searchstax-facets-pill searchstax-facets-pill-filter-by"
|
|
549
|
+
onClick={() => {
|
|
550
|
+
openOverlay();
|
|
551
|
+
}}
|
|
552
|
+
>
|
|
553
|
+
<div className="searchstax-facets-pill-label">Filter By</div>
|
|
554
|
+
</div>
|
|
555
|
+
<div className="searchstax-facets-pills-selected">
|
|
556
|
+
{selectedFacetsCheckboxes.map((facet) => {
|
|
557
|
+
return (
|
|
558
|
+
<div
|
|
559
|
+
className="searchstax-facets-pill searchstax-facets-pill-facets"
|
|
560
|
+
key={facet.value}
|
|
561
|
+
onClick={() => {
|
|
562
|
+
unselectFacet(facet);
|
|
563
|
+
}}
|
|
564
|
+
>
|
|
565
|
+
<div className="searchstax-facets-pill-label">
|
|
566
|
+
{facet.value} ({facet.count})
|
|
567
|
+
</div>
|
|
568
|
+
<div className="searchstax-facets-pill-icon-close"></div>
|
|
569
|
+
</div>
|
|
570
|
+
);
|
|
571
|
+
})}
|
|
572
|
+
{selectedFacetsCheckboxes.length !== 0 && (
|
|
573
|
+
<div
|
|
574
|
+
className="searchstax-facets-pill searchstax-clear-filters searchstax-facets-pill-clear-all"
|
|
575
|
+
onClick={() => {
|
|
576
|
+
unselectAll();
|
|
577
|
+
}}
|
|
578
|
+
>
|
|
579
|
+
<div className="searchstax-facets-pill-label">
|
|
580
|
+
Clear Filters
|
|
581
|
+
</div>
|
|
582
|
+
</div>
|
|
583
|
+
)}
|
|
584
|
+
</div>
|
|
585
|
+
<div
|
|
586
|
+
className={`searchstax-facets-mobile-overlay ${
|
|
587
|
+
//@ts-ignore
|
|
588
|
+
facetsTemplateDataMobile.overlayOpened ? "searchstax-show" : ""
|
|
589
|
+
}`}
|
|
590
|
+
>
|
|
591
|
+
<div className="searchstax-facets-mobile-overlay-header">
|
|
592
|
+
<div className="searchstax-facets-mobile-overlay-header-title">
|
|
593
|
+
Filter By
|
|
594
|
+
</div>
|
|
595
|
+
<div
|
|
596
|
+
className="searchstax-search-close"
|
|
597
|
+
onClick={() => {
|
|
598
|
+
closeOverlay();
|
|
599
|
+
}}
|
|
600
|
+
></div>
|
|
601
|
+
</div>
|
|
602
|
+
<div className="searchstax-facets-container-mobile">
|
|
603
|
+
{facetsTemplateDataMobile?.facets.map((facet) => {
|
|
604
|
+
return (
|
|
605
|
+
<div
|
|
606
|
+
key={facet.name + "mobile"}
|
|
607
|
+
className={`searchstax-facet-container ${
|
|
608
|
+
isNotDeactivated(facet.name) ? `active` : ``
|
|
609
|
+
}`}
|
|
610
|
+
>
|
|
611
|
+
<div>
|
|
612
|
+
<div
|
|
613
|
+
className="searchstax-facet-title-container"
|
|
614
|
+
onClick={() => {
|
|
615
|
+
toggleFacetGroup(facet.name);
|
|
616
|
+
}}
|
|
617
|
+
>
|
|
618
|
+
<div className="searchstax-facet-title">
|
|
619
|
+
{" "}
|
|
620
|
+
{facet.label}{" "}
|
|
621
|
+
</div>
|
|
622
|
+
<div className="searchstax-facet-title-arrow active"></div>
|
|
623
|
+
</div>
|
|
624
|
+
<div className="searchstax-facet-values-container">
|
|
625
|
+
{facet.values.map(
|
|
626
|
+
//@ts-ignore
|
|
627
|
+
(facetValue: IFacetValueData, key) => {
|
|
628
|
+
facetContainers[key + facet.name] = createRef();
|
|
629
|
+
|
|
630
|
+
return (
|
|
631
|
+
<div
|
|
632
|
+
key={facetValue.value + facetValue.parentName}
|
|
633
|
+
className={`searchstax-facet-value-container ${
|
|
634
|
+
facetValue.disabled
|
|
635
|
+
? `searchstax-facet-value-disabled`
|
|
636
|
+
: ``
|
|
637
|
+
}`}
|
|
638
|
+
ref={facetContainers[key + facet.name]}
|
|
639
|
+
>
|
|
640
|
+
<div className="searchstax-facet-input">
|
|
641
|
+
<input
|
|
642
|
+
type="checkbox"
|
|
643
|
+
className="searchstax-facet-input-checkbox"
|
|
644
|
+
checked={isChecked(facetValue)}
|
|
645
|
+
readOnly={true}
|
|
646
|
+
disabled={facetValue.disabled}
|
|
647
|
+
onClick={(e) => {
|
|
648
|
+
selectFacet(
|
|
649
|
+
key + facet.name,
|
|
650
|
+
e,
|
|
651
|
+
facetValue,
|
|
652
|
+
true
|
|
653
|
+
);
|
|
654
|
+
}}
|
|
655
|
+
/>
|
|
656
|
+
</div>
|
|
657
|
+
<div
|
|
658
|
+
className="searchstax-facet-value-label"
|
|
659
|
+
onClick={(e) => {
|
|
660
|
+
selectFacet(
|
|
661
|
+
key + facet.name,
|
|
662
|
+
e,
|
|
663
|
+
facetValue,
|
|
664
|
+
false
|
|
665
|
+
);
|
|
666
|
+
}}
|
|
667
|
+
>
|
|
668
|
+
{facetValue.value}
|
|
669
|
+
</div>
|
|
670
|
+
<div
|
|
671
|
+
className="searchstax-facet-value-count"
|
|
672
|
+
onClick={(e) => {
|
|
673
|
+
selectFacet(
|
|
674
|
+
key + facet.name,
|
|
675
|
+
e,
|
|
676
|
+
facetValue,
|
|
677
|
+
false
|
|
678
|
+
);
|
|
679
|
+
}}
|
|
680
|
+
>
|
|
681
|
+
({facetValue.count})
|
|
682
|
+
</div>
|
|
683
|
+
</div>
|
|
684
|
+
);
|
|
685
|
+
}
|
|
686
|
+
)}
|
|
687
|
+
|
|
688
|
+
<div
|
|
689
|
+
className="searchstax-facet-show-more-container"
|
|
690
|
+
v-if="facet.hasMoreFacets"
|
|
691
|
+
>
|
|
692
|
+
<div
|
|
693
|
+
className="searchstax-facet-show-more-container"
|
|
694
|
+
onClick={(e) => {
|
|
695
|
+
showMoreLessMobile(e, facet);
|
|
696
|
+
}}
|
|
697
|
+
>
|
|
698
|
+
{facet.showingAllFacets && (
|
|
699
|
+
<div className="searchstax-facet-show-less-button searchstax-facet-show-button">
|
|
700
|
+
less
|
|
701
|
+
</div>
|
|
702
|
+
)}
|
|
703
|
+
{!facet.showingAllFacets && (
|
|
704
|
+
<div className="searchstax-facet-show-more-button searchstax-facet-show-button">
|
|
705
|
+
more
|
|
706
|
+
</div>
|
|
707
|
+
)}
|
|
708
|
+
</div>
|
|
709
|
+
</div>
|
|
710
|
+
</div>
|
|
711
|
+
</div>
|
|
712
|
+
</div>
|
|
713
|
+
);
|
|
714
|
+
})}
|
|
715
|
+
</div>
|
|
716
|
+
<button
|
|
717
|
+
className="searchstax-facets-mobile-overlay-done"
|
|
718
|
+
onClick={() => {
|
|
719
|
+
closeOverlay();
|
|
720
|
+
}}
|
|
721
|
+
>
|
|
722
|
+
Done
|
|
723
|
+
</button>
|
|
724
|
+
</div>
|
|
725
|
+
</div>
|
|
726
|
+
</div>
|
|
727
|
+
) : (<></>);
|
|
728
|
+
}
|
|
729
|
+
<SearchstaxFacetsWidget
|
|
730
|
+
facetingType="and"
|
|
731
|
+
itemsPerPageDesktop={2}
|
|
732
|
+
itemsPerPageMobile={3}
|
|
733
|
+
specificFacets={undefined}
|
|
734
|
+
facetsTemplateDesktop={facetsTemplateDesktop}
|
|
735
|
+
facetsTemplateMobile={facetsTemplateMobile}
|
|
736
|
+
></SearchstaxFacetsWidget>
|
|
384
737
|
```
|
|
385
738
|
|
|
386
739
|
### SearchFeedback Widget ###
|
|
@@ -443,12 +796,52 @@ function searchOverviewTemplate(
|
|
|
443
796
|
|
|
444
797
|
example of search feedback widget initialization with minimum options
|
|
445
798
|
```
|
|
446
|
-
|
|
799
|
+
<SearchstaxRelatedSearchesWidget
|
|
800
|
+
relatedSearchesURL={config.relatedSearchesURL}
|
|
801
|
+
relatedSearchesAPIKey={config.relatedSearchesAPIKey}
|
|
802
|
+
></SearchstaxRelatedSearchesWidget>
|
|
447
803
|
```
|
|
448
804
|
|
|
449
805
|
|
|
450
806
|
example of search feedback widget initialization with template overrides
|
|
451
807
|
```
|
|
808
|
+
function searchRelatedSearchesTemplate(
|
|
809
|
+
relatedData: null | ISearchstaxRelatedSearchesData,
|
|
810
|
+
executeSearch: (result: ISearchstaxRelatedSearchResult) => void
|
|
811
|
+
) {
|
|
812
|
+
return (
|
|
813
|
+
<>
|
|
814
|
+
{relatedData && relatedData?.searchExecuted && relatedData?.hasRelatedSearches && (
|
|
815
|
+
<div className="searchstax-related-searches-container" id="searchstax-related-searches-container">
|
|
816
|
+
{" "}
|
|
817
|
+
Related searches: <span id="searchstax-related-searches"></span>
|
|
818
|
+
{relatedData.relatedSearches && (
|
|
819
|
+
<span className="searchstax-related-search">
|
|
820
|
+
{relatedData.relatedSearches.map((related) => (
|
|
821
|
+
<span
|
|
822
|
+
key={related.related_search}
|
|
823
|
+
onClick={() => {
|
|
824
|
+
executeSearch(related);
|
|
825
|
+
}}
|
|
826
|
+
className="searchstax-related-search searchstax-related-search-item"
|
|
827
|
+
>
|
|
828
|
+
{" "}
|
|
829
|
+
{related.related_search}
|
|
830
|
+
{!related.last && <span>,</span>}
|
|
831
|
+
</span>
|
|
832
|
+
))}
|
|
833
|
+
</span>
|
|
834
|
+
)}
|
|
835
|
+
</div>
|
|
836
|
+
)}
|
|
837
|
+
</>
|
|
838
|
+
);
|
|
839
|
+
}
|
|
840
|
+
<SearchstaxRelatedSearchesWidget
|
|
841
|
+
relatedSearchesURL={config.relatedSearchesURL}
|
|
842
|
+
relatedSearchesAPIKey={config.relatedSearchesAPIKey}
|
|
843
|
+
searchRelatedSearchesTemplate={searchRelatedSearchesTemplate}
|
|
844
|
+
></SearchstaxRelatedSearchesWidget>
|
|
452
845
|
|
|
453
846
|
```
|
|
454
847
|
|
|
@@ -456,13 +849,56 @@ example of search feedback widget initialization with template overrides
|
|
|
456
849
|
|
|
457
850
|
example of search feedback widget initialization with minimum options
|
|
458
851
|
```
|
|
459
|
-
|
|
852
|
+
<SearchstaxExternalPromotionsWidget></SearchstaxExternalPromotionsWidget>
|
|
460
853
|
```
|
|
461
854
|
|
|
462
855
|
|
|
463
856
|
example of search feedback widget initialization with template overrides
|
|
464
857
|
```
|
|
465
|
-
|
|
858
|
+
function searchExternalPromotionsTemplate(
|
|
859
|
+
externalPromotionsData: null | ISearchstaxExternalPromotionsData,
|
|
860
|
+
trackClick: (externalPromotion: IExternalPromotion, event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void
|
|
861
|
+
) {
|
|
862
|
+
return (
|
|
863
|
+
<>
|
|
864
|
+
{externalPromotionsData &&
|
|
865
|
+
externalPromotionsData?.searchExecuted &&
|
|
866
|
+
externalPromotionsData?.hasExternalPromotions &&
|
|
867
|
+
externalPromotionsData.externalPromotions.map((externalPromotion) => (
|
|
868
|
+
<div className="searchstax-external-promotion searchstax-search-result" key={externalPromotion.id}>
|
|
869
|
+
<div className="icon-elevated"></div>
|
|
870
|
+
{externalPromotion.url && (
|
|
871
|
+
<a
|
|
872
|
+
href={externalPromotion.url}
|
|
873
|
+
onClick={(event) => {
|
|
874
|
+
trackClick(externalPromotion, event);
|
|
875
|
+
}}
|
|
876
|
+
className="searchstax-result-item-link"
|
|
877
|
+
></a>
|
|
878
|
+
)}
|
|
879
|
+
<div className="searchstax-search-result-title-container">
|
|
880
|
+
<span className="searchstax-search-result-title">{externalPromotion.name}</span>
|
|
881
|
+
</div>
|
|
882
|
+
{externalPromotion.description && (
|
|
883
|
+
<p className="searchstax-search-result-description searchstax-search-result-common">
|
|
884
|
+
{" "}
|
|
885
|
+
{externalPromotion.description}{" "}
|
|
886
|
+
</p>
|
|
887
|
+
)}
|
|
888
|
+
{externalPromotion.url && (
|
|
889
|
+
<p className="searchstax-search-result-description searchstax-search-result-common">
|
|
890
|
+
{" "}
|
|
891
|
+
{externalPromotion.url}{" "}
|
|
892
|
+
</p>
|
|
893
|
+
)}
|
|
894
|
+
</div>
|
|
895
|
+
))}
|
|
896
|
+
</>
|
|
897
|
+
);
|
|
898
|
+
}
|
|
899
|
+
<SearchstaxExternalPromotionsWidget
|
|
900
|
+
searchExternalPromotionsTemplate={searchExternalPromotionsTemplate}
|
|
901
|
+
></SearchstaxExternalPromotionsWidget>
|
|
466
902
|
```
|
|
467
903
|
|
|
468
904
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { ISearchstaxExternalPromotionsData, IExternalPromotion } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
|
+
declare function SearchstaxExternalPromotionsWidget(props: {
|
|
3
|
+
searchExternalPromotionsTemplate?: (externalPromotionsData: null | ISearchstaxExternalPromotionsData, trackClick: (externalPromotion: IExternalPromotion, event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void) => React.ReactElement;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export default SearchstaxExternalPromotionsWidget;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IFacetsTemplateData, IFacetValue, IFacetData, IFacetValueData } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
|
+
declare function SearchstaxFacetsWidget(props: {
|
|
3
|
+
facetingType: "and" | "or" | "showUnavailable" | "tabs";
|
|
4
|
+
itemsPerPageDesktop: number;
|
|
5
|
+
itemsPerPageMobile: number;
|
|
6
|
+
specificFacets: string[] | undefined;
|
|
7
|
+
facetsTemplateDesktop?: (facetsTemplateDataDesktop: IFacetsTemplateData | null, facetContainers: {
|
|
8
|
+
[key: string]: React.LegacyRef<HTMLDivElement> | undefined;
|
|
9
|
+
}, isNotDeactivated: (name: string) => boolean, toggleFacetGroup: (name: string) => void, selectFacet: (index: string, event: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetValueData, isInput: boolean) => void, isChecked: (facetValue: IFacetValueData) => boolean | undefined, showMoreLessDesktop: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetData) => void) => React.ReactElement;
|
|
10
|
+
facetsTemplateMobile?: (facetsTemplateDataMobile: IFacetsTemplateData | null, selectedFacetsCheckboxes: IFacetValue[], facetContainers: {
|
|
11
|
+
[key: string]: React.LegacyRef<HTMLDivElement> | undefined;
|
|
12
|
+
}, isNotDeactivated: (name: string) => boolean, toggleFacetGroup: (name: string) => void, selectFacet: (index: string, event: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetValueData, isInput: boolean) => void, isChecked: (facetValue: IFacetValueData) => boolean | undefined, unselectFacet: (facet: IFacetValue) => void, showMoreLessMobile: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetData) => void, openOverlay: () => void, closeOverlay: () => void, unselectAll: () => void) => React.ReactElement;
|
|
13
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export default SearchstaxFacetsWidget;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ISearchstaxRelatedSearchesData, ISearchstaxRelatedSearchResult } from "@searchstax-inc/searchstudio-ux-js";
|
|
2
|
+
declare function SearchstaxRelatedSearchesWidget(props: {
|
|
3
|
+
relatedSearchesURL: string;
|
|
4
|
+
relatedSearchesAPIKey: string;
|
|
5
|
+
searchRelatedSearchesTemplate?: (relatedData: null | ISearchstaxRelatedSearchesData, executeSearch: (result: ISearchstaxRelatedSearchResult) => void) => React.ReactElement;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SearchstaxRelatedSearchesWidget;
|
|
@@ -4,4 +4,7 @@ import SearchstaxResultWidget from "./components/SearchstaxResultWidget";
|
|
|
4
4
|
import SearchstaxPaginationWidget from "./components/SearchstaxPaginationWidget";
|
|
5
5
|
import SearchstaxSortingWidget from "./components/SearchstaxSortingWidget";
|
|
6
6
|
import SearchstaxOverviewWidget from "./components/SearchstaxOverviewWidget";
|
|
7
|
-
|
|
7
|
+
import SearchstaxFacetsWidget from "./components/SearchstaxFacetsWidget";
|
|
8
|
+
import SearchstaxRelatedSearchesWidget from './components/SearchstaxRelatedSearchesWidget';
|
|
9
|
+
import SearchstaxExternalPromotionsWidget from './components/SearchstaxExternalPromotionsWidget';
|
|
10
|
+
export { SearchstaxWrapper, SearchstaxResultWidget, SearchstaxInputWidget, SearchstaxPaginationWidget, SearchstaxSortingWidget, SearchstaxOverviewWidget, SearchstaxFacetsWidget, SearchstaxRelatedSearchesWidget, SearchstaxExternalPromotionsWidget };
|