@searchcraft/javascript-sdk 0.3.0 → 0.4.0
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 +198 -0
- package/dist/cjs/{index-6c5282a0.js → index-c8a8e492.js} +317 -10
- package/dist/cjs/index-c8a8e492.js.map +1 -0
- package/dist/cjs/index.cjs.js +4 -5
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/package-ccc7e307.js +68 -0
- package/dist/cjs/package-ccc7e307.js.map +1 -0
- package/dist/cjs/searchcraft-auto-search-form.cjs.entry.js +160 -0
- package/dist/cjs/searchcraft-auto-search-form.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-base-search-form.cjs.entry.js +13 -8
- package/dist/cjs/searchcraft-base-search-form.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-base-search-result.cjs.entry.js +74 -0
- package/dist/cjs/searchcraft-base-search-result.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-base-search-results.cjs.entry.js +129 -0
- package/dist/cjs/searchcraft-base-search-results.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-button-icon.cjs.entry.js +1 -1
- package/dist/cjs/searchcraft-button.cjs.entry.js +4 -9
- package/dist/cjs/searchcraft-button.cjs.entry.js.map +1 -1
- package/dist/cjs/searchcraft-check-icon_2.cjs.entry.js +28 -0
- package/dist/cjs/searchcraft-check-icon_2.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-clear-icon-set.cjs.entry.js +30 -0
- package/dist/cjs/searchcraft-clear-icon-set.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-error-message_3.cjs.entry.js +95 -0
- package/dist/cjs/searchcraft-error-message_3.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-facet-list_3.cjs.entry.js +183 -0
- package/dist/cjs/searchcraft-facet-list_3.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-filter-panel.cjs.entry.js +134 -0
- package/dist/cjs/searchcraft-filter-panel.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-javascript-sdk.cjs.js +2 -2
- package/dist/cjs/searchcraft-results-info.cjs.entry.js +46 -0
- package/dist/cjs/searchcraft-results-info.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-search-icon-set.cjs.entry.js +33 -0
- package/dist/cjs/searchcraft-search-icon-set.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-spinner-dark.cjs.entry.js +22 -0
- package/dist/cjs/searchcraft-spinner-dark.cjs.entry.js.map +1 -0
- package/dist/cjs/searchcraft-spinner-light.cjs.entry.js +22 -0
- package/dist/cjs/searchcraft-spinner-light.cjs.entry.js.map +1 -0
- package/dist/cjs/store-72205332.js +945 -0
- package/dist/cjs/store-72205332.js.map +1 -0
- package/dist/cjs/utils-4ee2b88d.js +169 -0
- package/dist/cjs/utils-4ee2b88d.js.map +1 -0
- package/dist/collection/assets/searchcraft-button-icons.js.map +1 -1
- package/dist/collection/assets/searchcraft-check-icon.js.map +1 -1
- package/dist/collection/assets/searchcraft-clear-icon-set.js.map +1 -1
- package/dist/collection/assets/searchcraft-dash-icon.js.map +1 -1
- package/dist/collection/assets/searchcraft-search-icon-set.js.map +1 -1
- package/dist/collection/collection-manifest.json +2 -4
- package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js +68 -94
- package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js.map +1 -1
- package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.module.css +98 -9
- package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js +42 -20
- package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.js.map +1 -1
- package/dist/collection/components/searchcraft-base-search-form/searchcraft-base-search-form.module.css +94 -8
- package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +158 -136
- package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js.map +1 -1
- package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.module.css +142 -189
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +172 -83
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +1 -1
- package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.module.css +105 -23
- package/dist/collection/components/searchcraft-button/searchcraft-button.js +3 -10
- package/dist/collection/components/searchcraft-button/searchcraft-button.js.map +1 -1
- package/dist/collection/components/searchcraft-button/searchcraft-button.module.css +107 -65
- package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js +2 -24
- package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js.map +1 -1
- package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.module.css +101 -15
- package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.js +140 -0
- package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.js.map +1 -0
- package/dist/collection/components/searchcraft-facet-list/searchcraft-facet-list.module.css +216 -0
- package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.js +166 -0
- package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.js.map +1 -0
- package/dist/collection/components/searchcraft-filter-panel/searchcraft-filter-panel.module.css +118 -0
- package/dist/collection/components/searchcraft-input/searchcraft-input.js +43 -133
- package/dist/collection/components/searchcraft-input/searchcraft-input.js.map +1 -1
- package/dist/collection/components/searchcraft-input/searchcraft-input.module.css +162 -221
- package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js +1 -13
- package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.js.map +1 -1
- package/dist/collection/components/searchcraft-input-label/searchcraft-input-label.module.css +102 -14
- package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.js +4 -3
- package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.js.map +1 -1
- package/dist/collection/components/searchcraft-results-info/searchcraft-results-info.module.css +111 -7
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.js +101 -58
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.js.map +1 -1
- package/dist/collection/components/searchcraft-slider/searchcraft-slider.module.css +136 -23
- package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js +1 -1
- package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js.map +1 -1
- package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.module.css +103 -4
- package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js +1 -1
- package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js.map +1 -1
- package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.module.css +102 -3
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js +51 -64
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.js.map +1 -1
- package/dist/collection/components/searchcraft-toggle-button/searchcraft-toggle-button.module.css +135 -9
- package/dist/collection/index.js +2 -1
- package/dist/collection/index.js.map +1 -1
- package/dist/collection/provider/store.js +46 -31
- package/dist/collection/provider/store.js.map +1 -1
- package/dist/collection/types/index.js +3 -0
- package/dist/collection/types/index.js.map +1 -0
- package/dist/collection/types/searchcraft-base-search-results.types.js +2 -0
- package/dist/collection/types/searchcraft-base-search-results.types.js.map +1 -0
- package/dist/collection/types/searchcraft-filter-panel.types.js +2 -0
- package/dist/collection/types/searchcraft-filter-panel.types.js.map +1 -0
- package/dist/collection/utils/utils.js +117 -35
- package/dist/collection/utils/utils.js.map +1 -1
- package/dist/components/index.js +7 -11
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-d3187f5a.js → p-04d13314.js} +2 -2
- package/dist/components/{p-d3187f5a.js.map → p-04d13314.js.map} +1 -1
- package/dist/components/p-0deddac7.js +161 -0
- package/dist/components/p-0deddac7.js.map +1 -0
- package/dist/components/p-37f54c0b.js +54 -0
- package/dist/components/p-37f54c0b.js.map +1 -0
- package/dist/components/{p-7498e493.js → p-5639be85.js} +311 -10
- package/dist/components/p-5639be85.js.map +1 -0
- package/dist/components/p-68897c11.js +124 -0
- package/dist/components/p-68897c11.js.map +1 -0
- package/dist/components/p-69eed21e.js +66 -0
- package/dist/components/p-69eed21e.js.map +1 -0
- package/dist/components/p-8062f0ea.js +82 -0
- package/dist/components/p-8062f0ea.js.map +1 -0
- package/dist/components/p-9f2b8375.js +33 -0
- package/dist/components/p-9f2b8375.js.map +1 -0
- package/dist/components/p-ace4e6a0.js +35 -0
- package/dist/components/p-ace4e6a0.js.map +1 -0
- package/dist/components/p-b1a59f07.js +101 -0
- package/dist/components/p-b1a59f07.js.map +1 -0
- package/dist/components/p-be63dcac.js +941 -0
- package/dist/components/p-be63dcac.js.map +1 -0
- package/dist/components/p-c8bc1e4f.js +40 -0
- package/dist/components/p-c8bc1e4f.js.map +1 -0
- package/dist/components/{p-e5471fcf.js → p-de50441f.js} +2 -2
- package/dist/components/{p-e5471fcf.js.map → p-de50441f.js.map} +1 -1
- package/dist/components/p-e3c8b1ef.js +91 -0
- package/dist/components/p-e3c8b1ef.js.map +1 -0
- package/dist/components/p-ebf021b5.js +49 -0
- package/dist/components/p-ebf021b5.js.map +1 -0
- package/dist/components/searchcraft-auto-search-form.js +70 -84
- package/dist/components/searchcraft-auto-search-form.js.map +1 -1
- package/dist/components/searchcraft-base-search-form.js +27 -58
- package/dist/components/searchcraft-base-search-form.js.map +1 -1
- package/dist/components/searchcraft-base-search-result.js +1 -1
- package/dist/components/searchcraft-base-search-results.js +81 -53
- package/dist/components/searchcraft-base-search-results.js.map +1 -1
- package/dist/components/searchcraft-button-icon.js +1 -1
- package/dist/components/searchcraft-button.js +1 -1
- package/dist/components/searchcraft-check-icon.js +1 -1
- package/dist/components/searchcraft-clear-icon-set.js +39 -1
- package/dist/components/searchcraft-clear-icon-set.js.map +1 -1
- package/dist/components/searchcraft-dash-icon.js +1 -1
- package/dist/components/searchcraft-error-message.js +1 -1
- package/dist/components/searchcraft-facet-list.d.ts +11 -0
- package/dist/components/searchcraft-facet-list.js +8 -0
- package/dist/components/searchcraft-facet-list.js.map +1 -0
- package/dist/components/searchcraft-filter-panel.d.ts +11 -0
- package/dist/components/searchcraft-filter-panel.js +184 -0
- package/dist/components/searchcraft-filter-panel.js.map +1 -0
- package/dist/components/searchcraft-input-label.js +1 -1
- package/dist/components/searchcraft-input.js +1 -1
- package/dist/components/searchcraft-results-info.js +8 -7
- package/dist/components/searchcraft-results-info.js.map +1 -1
- package/dist/components/searchcraft-search-icon-set.js +44 -1
- package/dist/components/searchcraft-search-icon-set.js.map +1 -1
- package/dist/components/searchcraft-slider.js +1 -95
- package/dist/components/searchcraft-slider.js.map +1 -1
- package/dist/components/searchcraft-spinner-dark.js +1 -1
- package/dist/components/searchcraft-spinner-light.js +29 -1
- package/dist/components/searchcraft-spinner-light.js.map +1 -1
- package/dist/components/searchcraft-toggle-button.js +1 -91
- package/dist/components/searchcraft-toggle-button.js.map +1 -1
- package/dist/esm/{index-0ac5bb53.js → index-88dc5f88.js} +317 -10
- package/dist/esm/index-88dc5f88.js.map +1 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/package-ee16f835.js +66 -0
- package/dist/esm/package-ee16f835.js.map +1 -0
- package/dist/esm/searchcraft-auto-search-form.entry.js +156 -0
- package/dist/esm/searchcraft-auto-search-form.entry.js.map +1 -0
- package/dist/esm/searchcraft-base-search-form.entry.js +13 -8
- package/dist/esm/searchcraft-base-search-form.entry.js.map +1 -1
- package/dist/esm/searchcraft-base-search-result.entry.js +70 -0
- package/dist/esm/searchcraft-base-search-result.entry.js.map +1 -0
- package/dist/esm/searchcraft-base-search-results.entry.js +125 -0
- package/dist/esm/searchcraft-base-search-results.entry.js.map +1 -0
- package/dist/esm/searchcraft-button-icon.entry.js +1 -1
- package/dist/esm/searchcraft-button.entry.js +4 -9
- package/dist/esm/searchcraft-button.entry.js.map +1 -1
- package/dist/esm/searchcraft-check-icon_2.entry.js +23 -0
- package/dist/esm/searchcraft-check-icon_2.entry.js.map +1 -0
- package/dist/{components/p-70722ab2.js → esm/searchcraft-clear-icon-set.entry.js} +7 -24
- package/dist/esm/searchcraft-clear-icon-set.entry.js.map +1 -0
- package/dist/esm/searchcraft-error-message_3.entry.js +89 -0
- package/dist/esm/searchcraft-error-message_3.entry.js.map +1 -0
- package/dist/esm/searchcraft-facet-list_3.entry.js +177 -0
- package/dist/esm/searchcraft-facet-list_3.entry.js.map +1 -0
- package/dist/esm/searchcraft-filter-panel.entry.js +130 -0
- package/dist/esm/searchcraft-filter-panel.entry.js.map +1 -0
- package/dist/esm/searchcraft-javascript-sdk.js +3 -3
- package/dist/esm/searchcraft-results-info.entry.js +42 -0
- package/dist/esm/searchcraft-results-info.entry.js.map +1 -0
- package/dist/{components/p-a3bd1bc8.js → esm/searchcraft-search-icon-set.entry.js} +7 -26
- package/dist/esm/searchcraft-search-icon-set.entry.js.map +1 -0
- package/dist/esm/searchcraft-spinner-dark.entry.js +18 -0
- package/dist/esm/searchcraft-spinner-dark.entry.js.map +1 -0
- package/dist/esm/searchcraft-spinner-light.entry.js +18 -0
- package/dist/esm/searchcraft-spinner-light.entry.js.map +1 -0
- package/dist/esm/store-52436995.js +941 -0
- package/dist/esm/store-52436995.js.map +1 -0
- package/dist/esm/utils-89a02921.js +161 -0
- package/dist/esm/utils-89a02921.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/index.esm.js +1 -1
- package/dist/searchcraft-javascript-sdk/p-08bd95f1.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-08bd95f1.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-0deddac7.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-0deddac7.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-15f9891d.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-15f9891d.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-2419a8c5.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-2419a8c5.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-343adbe3.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-343adbe3.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-3a2d9be9.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-3a2d9be9.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-4278ff89.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-4278ff89.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-4c32c87d.js +3 -0
- package/dist/searchcraft-javascript-sdk/p-4c32c87d.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-56413bef.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-56413bef.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-69eed21e.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-69eed21e.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/{p-5ec960bd.entry.js → p-69f64bdd.entry.js} +2 -2
- package/dist/searchcraft-javascript-sdk/p-7c59b3cd.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-7c59b3cd.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-93e9de71.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-93e9de71.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-9647ae41.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-9647ae41.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-a613a6ba.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-a613a6ba.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-acc645c7.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-acc645c7.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-bb03e946.js +11 -0
- package/dist/searchcraft-javascript-sdk/p-bb03e946.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-bf80bbee.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-bf80bbee.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/p-f4612b94.entry.js +2 -0
- package/dist/searchcraft-javascript-sdk/p-f4612b94.entry.js.map +1 -0
- package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +1 -1
- package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
- package/dist/types/components/searchcraft-auto-search-form/searchcraft-auto-search-form.d.ts +7 -7
- package/dist/types/components/searchcraft-base-search-form/searchcraft-base-search-form.d.ts +5 -4
- package/dist/types/components/searchcraft-base-search-result/searchcraft-base-search-result.d.ts +18 -17
- package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +17 -5
- package/dist/types/components/searchcraft-button/searchcraft-button.d.ts +0 -2
- package/dist/types/components/searchcraft-error-message/searchcraft-error-message.d.ts +0 -7
- package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +21 -0
- package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +25 -0
- package/dist/types/components/searchcraft-input/searchcraft-input.d.ts +5 -11
- package/dist/types/components/searchcraft-input-label/searchcraft-input-label.d.ts +0 -2
- package/dist/types/components/searchcraft-slider/searchcraft-slider.d.ts +14 -10
- package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +4 -9
- package/dist/types/components.d.ts +157 -193
- package/dist/types/index.d.ts +2 -1
- package/dist/types/provider/store.d.ts +16 -9
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/searchcraft-base-search-results.types.d.ts +17 -0
- package/dist/types/types/searchcraft-filter-panel.types.d.ts +42 -0
- package/dist/types/utils/utils.d.ts +24 -15
- package/package.json +2 -2
- package/dist/cjs/index-6c5282a0.js.map +0 -1
- package/dist/cjs/searchcraft-auto-search-form_19.cjs.entry.js +0 -861
- package/dist/cjs/searchcraft-auto-search-form_19.cjs.entry.js.map +0 -1
- package/dist/cjs/store-f3bec622.js +0 -406
- package/dist/cjs/store-f3bec622.js.map +0 -1
- package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.js +0 -95
- package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.js.map +0 -1
- package/dist/collection/components/searchcraft-clear-input-button/searchcraft-clear-input-button.module.css +0 -33
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js +0 -172
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.js.map +0 -1
- package/dist/collection/components/searchcraft-filters-list/searchcraft-filters-list.module.css +0 -110
- package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.js +0 -122
- package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.js.map +0 -1
- package/dist/collection/components/searchcraft-input-caption/searchcraft-input-caption.module.css +0 -79
- package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js +0 -109
- package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js.map +0 -1
- package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.module.css +0 -17
- package/dist/components/p-07edaa9b.js +0 -67
- package/dist/components/p-07edaa9b.js.map +0 -1
- package/dist/components/p-27a6ca57.js +0 -149
- package/dist/components/p-27a6ca57.js.map +0 -1
- package/dist/components/p-4468fba3.js +0 -61
- package/dist/components/p-4468fba3.js.map +0 -1
- package/dist/components/p-498c7ef9.js +0 -40
- package/dist/components/p-498c7ef9.js.map +0 -1
- package/dist/components/p-6237f03e.js +0 -60
- package/dist/components/p-6237f03e.js.map +0 -1
- package/dist/components/p-70722ab2.js.map +0 -1
- package/dist/components/p-7498e493.js.map +0 -1
- package/dist/components/p-7d1bcd2d.js +0 -88
- package/dist/components/p-7d1bcd2d.js.map +0 -1
- package/dist/components/p-8c38185e.js +0 -53
- package/dist/components/p-8c38185e.js.map +0 -1
- package/dist/components/p-a3bd1bc8.js.map +0 -1
- package/dist/components/p-ae84b899.js +0 -48
- package/dist/components/p-ae84b899.js.map +0 -1
- package/dist/components/p-bc3f9025.js +0 -33
- package/dist/components/p-bc3f9025.js.map +0 -1
- package/dist/components/p-bfb22305.js +0 -33
- package/dist/components/p-bfb22305.js.map +0 -1
- package/dist/components/p-c31274dd.js +0 -89
- package/dist/components/p-c31274dd.js.map +0 -1
- package/dist/components/p-ff049f0a.js +0 -313
- package/dist/components/p-ff049f0a.js.map +0 -1
- package/dist/components/searchcraft-clear-input-button.d.ts +0 -11
- package/dist/components/searchcraft-clear-input-button.js +0 -8
- package/dist/components/searchcraft-clear-input-button.js.map +0 -1
- package/dist/components/searchcraft-filters-list.d.ts +0 -11
- package/dist/components/searchcraft-filters-list.js +0 -155
- package/dist/components/searchcraft-filters-list.js.map +0 -1
- package/dist/components/searchcraft-input-caption.d.ts +0 -11
- package/dist/components/searchcraft-input-caption.js +0 -8
- package/dist/components/searchcraft-input-caption.js.map +0 -1
- package/dist/components/searchcraft-input-icon.d.ts +0 -11
- package/dist/components/searchcraft-input-icon.js +0 -8
- package/dist/components/searchcraft-input-icon.js.map +0 -1
- package/dist/esm/index-0ac5bb53.js.map +0 -1
- package/dist/esm/searchcraft-auto-search-form_19.entry.js +0 -839
- package/dist/esm/searchcraft-auto-search-form_19.entry.js.map +0 -1
- package/dist/esm/store-6af9ea01.js +0 -396
- package/dist/esm/store-6af9ea01.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-05416a3e.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-05416a3e.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-0880cfbb.js +0 -3
- package/dist/searchcraft-javascript-sdk/p-0880cfbb.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-1ab836bf.js +0 -11
- package/dist/searchcraft-javascript-sdk/p-1ab836bf.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-3cb77ee1.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-3cb77ee1.entry.js.map +0 -1
- package/dist/searchcraft-javascript-sdk/p-72382d90.entry.js +0 -2
- package/dist/searchcraft-javascript-sdk/p-72382d90.entry.js.map +0 -1
- package/dist/types/components/searchcraft-clear-input-button/searchcraft-clear-input-button.d.ts +0 -10
- package/dist/types/components/searchcraft-filters-list/searchcraft-filters-list.d.ts +0 -34
- package/dist/types/components/searchcraft-input-caption/searchcraft-input-caption.d.ts +0 -9
- package/dist/types/components/searchcraft-input-icon/searchcraft-input-icon.d.ts +0 -9
- package/readme.md +0 -11
- /package/dist/searchcraft-javascript-sdk/{p-5ec960bd.entry.js.map → p-69f64bdd.entry.js.map} +0 -0
|
@@ -1,18 +1,104 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
|
|
2
|
+
/** Appearance & Layout */
|
|
3
|
+
--sc-spinner-size: 20px;
|
|
4
|
+
--sc-input-border-radius: 8px;
|
|
5
|
+
--sc-input-search-icon-size: 20px;
|
|
6
|
+
--sc-input-clear-icon-size: 20px;
|
|
7
|
+
--sc-input-padding-left: 44px;
|
|
8
|
+
--sc-input-padding-right: 44px;
|
|
9
|
+
--sc-image-border-radius: 8px;
|
|
3
10
|
}
|
|
4
11
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
12
|
+
:root {
|
|
13
|
+
--sc-surface-disabled: #D9D9D9;
|
|
14
|
+
--sc-surface-neutral-primary: #FFFFFF;
|
|
15
|
+
--sc-surface-neutral-secondary: #F3F3F3;
|
|
16
|
+
--sc-surface-neutral-light: #FFFFFF;
|
|
17
|
+
--sc-surface-neutral-primary-hover: #FAFAFA;
|
|
18
|
+
--sc-surface-neutral-primary-active: #F7F7F7;
|
|
19
|
+
--sc-surface-neutral-secondary-hover: #EDEDED;
|
|
20
|
+
--sc-surface-neutral-secondary-active: #E6E6E6;
|
|
21
|
+
--sc-surface-brand-primary: #000000;
|
|
22
|
+
--sc-surface-brand-secondary: #E6E6E6;
|
|
23
|
+
--sc-surface-brand-primary-hover: #2E2E2E;
|
|
24
|
+
--sc-surface-brand-primary-active: #292929;
|
|
25
|
+
--sc-surface-brand-secondary-hover: #EBEBEB;
|
|
26
|
+
--sc-surface-brand-secondary-active: #E0E0E0;
|
|
27
|
+
--sc-surface-success-primary: #008000;
|
|
28
|
+
--sc-surface-success-secondary: #CCFFCC;
|
|
29
|
+
--sc-surface-success-primary-hover: #009900;
|
|
30
|
+
--sc-surface-success-primary-active: #006600;
|
|
31
|
+
--sc-surface-success-secondary-hover: #E6FFE6;
|
|
32
|
+
--sc-surface-success-secondary-active: #E6FFE6;
|
|
33
|
+
--sc-surface-caution-primary: #CC6600;
|
|
34
|
+
--sc-surface-caution-secondary: #FFD9B3;
|
|
35
|
+
--sc-surface-caution-primary-hover: #E57300;
|
|
36
|
+
--sc-surface-caution-primary-active: #B25A00;
|
|
37
|
+
--sc-surface-caution-secondary-hover: #FFE5CC;
|
|
38
|
+
--sc-surface-caution-secondary-active: #FFCC99;
|
|
39
|
+
--sc-surface-danger-primary: #CC0000;
|
|
40
|
+
--sc-surface-danger-secondary: #FFCCCC;
|
|
41
|
+
--sc-surface-danger-primary-hover: #E50000;
|
|
42
|
+
--sc-surface-danger-primary-active: #B30000;
|
|
43
|
+
--sc-surface-danger-secondary-hover: #FFE7E7;
|
|
44
|
+
--sc-surface-danger-secondary-active: #FFB3B3;
|
|
45
|
+
--sc-content-brand: #000000;
|
|
46
|
+
--sc-content-success: #008000;
|
|
47
|
+
--sc-content-caution: #994D00;
|
|
48
|
+
--sc-content-danger: #990000;
|
|
49
|
+
--sc-content-disabled: #737373;
|
|
50
|
+
--sc-content-neutral-primary: #292929;
|
|
51
|
+
--sc-content-neutral-secondary: #404040;
|
|
52
|
+
--sc-content-brand-on-primary: #FFFFFF;
|
|
53
|
+
--sc-content-success-on-primary: #FFFFFF;
|
|
54
|
+
--sc-content-caution-on-primary: #FFFFFF;
|
|
55
|
+
--sc-content-danger-on-primary: #FFFFFF;
|
|
56
|
+
--sc-content-disabled-on-disabled: #737373;
|
|
57
|
+
--sc-border-neutral: rgba(0,0,0, 0.1);
|
|
58
|
+
--sc-border-brand: #000000;
|
|
59
|
+
--sc-border-success: #008000;
|
|
60
|
+
--sc-border-caution: #CC6600;
|
|
61
|
+
--sc-border-danger: #CC0000;
|
|
62
|
+
--sc-border-disabled: #737373;
|
|
8
63
|
}
|
|
9
64
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
65
|
+
:root {
|
|
66
|
+
/** Typography */
|
|
67
|
+
--sc-font-family: sans-serif;
|
|
68
|
+
--sc-heading-1-font-size: 32px;
|
|
69
|
+
--sc-heading-1-line-height: 36px;
|
|
70
|
+
--sc-heading-1-font-weight: 700;
|
|
71
|
+
--sc-heading-2-font-size: 29px;
|
|
72
|
+
--sc-heading-2-line-height: 32px;
|
|
73
|
+
--sc-heading-2-font-weight: 700;
|
|
74
|
+
--sc-heading-3-font-size: 26px;
|
|
75
|
+
--sc-heading-3-line-height: 28px;
|
|
76
|
+
--sc-heading-3-font-weight: 700;
|
|
77
|
+
--sc-heading-4-font-size: 23px;
|
|
78
|
+
--sc-heading-4-line-height: 24px;
|
|
79
|
+
--sc-heading-4-font-weight: 700;
|
|
80
|
+
--sc-heading-5-font-size: 20px;
|
|
81
|
+
--sc-heading-5-line-height: 24px;
|
|
82
|
+
--sc-heading-5-font-weight: 700;
|
|
83
|
+
--sc-heading-6-font-size: 10px;
|
|
84
|
+
--sc-heading-6-line-height: 12px;
|
|
85
|
+
--sc-heading-6-font-weight: 700;
|
|
86
|
+
--sc-body-bold-font-size: 16px;
|
|
87
|
+
--sc-body-bold-line-height: 20px;
|
|
88
|
+
--sc-body-bold-font-weight: 700;
|
|
89
|
+
--sc-body-font-size: 16px;
|
|
90
|
+
--sc-body-line-height: 20px;
|
|
91
|
+
--sc-body-font-weight:400;
|
|
92
|
+
--sc-body-small-bold-font-size: 12px;
|
|
93
|
+
--sc-body-small-bold-line-height: 16px;
|
|
94
|
+
--sc-body-small-bold-font-weight: 700;
|
|
95
|
+
--sc-body-small-font-size: 12px;
|
|
96
|
+
--sc-body-small-line-height: 16px;
|
|
97
|
+
--sc-body-small-font-weight: 400;
|
|
13
98
|
}
|
|
14
99
|
|
|
15
|
-
.
|
|
100
|
+
.searchcraft-base-search-form-input-container {
|
|
16
101
|
align-items: center;
|
|
17
102
|
display: flex;
|
|
103
|
+
gap: 8px;
|
|
18
104
|
}
|
package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js
CHANGED
|
@@ -1,52 +1,63 @@
|
|
|
1
|
+
import { useSearchcraftStore } from "../../provider/store";
|
|
1
2
|
import { Fragment, h } from "@stencil/core";
|
|
2
3
|
export class SearchcraftBaseSearchResult {
|
|
3
4
|
constructor() {
|
|
4
|
-
this.
|
|
5
|
-
this.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
this.searchcraftStore = useSearchcraftStore.getState();
|
|
6
|
+
this.recordMeasureEvent = () => {
|
|
7
|
+
var _a, _b, _c;
|
|
8
|
+
const searchcraft = this.searchcraftStore.getSearchcraftInstance();
|
|
9
|
+
if (searchcraft) {
|
|
10
|
+
const document_position = this.documentPosition;
|
|
11
|
+
const search_term = this.searchcraftStore.query;
|
|
12
|
+
const number_of_documents = ((_c = (_b = (_a = this.searchcraftStore.searchResults) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.hits) === null || _c === void 0 ? void 0 : _c.length) || 0;
|
|
13
|
+
searchcraft.sendMeasureEvent('document_clicked', {
|
|
14
|
+
document_position,
|
|
15
|
+
number_of_documents,
|
|
16
|
+
search_term,
|
|
17
|
+
});
|
|
13
18
|
}
|
|
14
19
|
};
|
|
15
|
-
this.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
this.themeMode = 'light';
|
|
26
|
-
this.placeImageRight = false;
|
|
27
|
-
}
|
|
28
|
-
parseStyles() {
|
|
29
|
-
try {
|
|
30
|
-
return JSON.parse(this.customStyles);
|
|
31
|
-
}
|
|
32
|
-
catch (error) {
|
|
33
|
-
console.error('Error parsing custom styles:', error);
|
|
20
|
+
this.parseStyles = () => {
|
|
21
|
+
if (this.customStyles) {
|
|
22
|
+
try {
|
|
23
|
+
return JSON.parse(this.customStyles);
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
console.error('Error parsing custom styles:', error);
|
|
27
|
+
return {};
|
|
28
|
+
}
|
|
29
|
+
}
|
|
34
30
|
return {};
|
|
35
|
-
}
|
|
31
|
+
};
|
|
32
|
+
this.titleContent = undefined;
|
|
33
|
+
this.subtitleContent = undefined;
|
|
34
|
+
this.bodyContent = undefined;
|
|
35
|
+
this.footerContent = undefined;
|
|
36
|
+
this.buttonLabel = undefined;
|
|
37
|
+
this.buttonHref = undefined;
|
|
38
|
+
this.buttonTarget = '_blank';
|
|
39
|
+
this.buttonRel = undefined;
|
|
40
|
+
this.containerHref = undefined;
|
|
41
|
+
this.containerTarget = '_blank';
|
|
42
|
+
this.containerRel = undefined;
|
|
43
|
+
this.imageSrc = undefined;
|
|
44
|
+
this.imageAlt = undefined;
|
|
45
|
+
this.imagePlacement = undefined;
|
|
46
|
+
this.customStyles = undefined;
|
|
47
|
+
this.documentPosition = 0;
|
|
36
48
|
}
|
|
37
49
|
render() {
|
|
38
|
-
const isLightTheme = this.themeMode === 'light';
|
|
39
50
|
const styles = this.parseStyles();
|
|
40
|
-
const imageContainer = this.
|
|
41
|
-
const contentContainer = (h(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
51
|
+
const imageContainer = this.imageSrc && (h("img", { alt: this.imageAlt, class: 'searchcraft-search-result-image', src: this.imageSrc, style: styles.image || {} }));
|
|
52
|
+
const contentContainer = (h(Fragment, null, this.imageSrc && this.imagePlacement === 'left' && imageContainer, h("div", { class: 'searchcraft-base-search-result-content-container' }, this.titleContent && (h("h2", { class: 'searchcraft-base-search-result-title', style: styles.title || {} }, this.titleContent)), this.subtitleContent && (h("h3", { class: 'searchcraft-base-search-result-subtitle', style: styles.subtitle || {} }, this.subtitleContent)), this.bodyContent && (h("p", { class: 'searchcraft-base-search-result-body-content', style: styles.primaryContent || {} }, this.bodyContent)), this.footerContent && (h("p", { class: 'searchcraft-base-search-result-footer-content', style: styles.secondaryContent || {} }, this.footerContent)), this.buttonHref && !this.containerHref && this.buttonLabel && (h("a", { class: 'searchcraft-search-result-button', href: this.buttonHref, style: styles.button || {}, target: this.buttonTarget, rel: this.buttonRel }, this.buttonLabel))), this.imageSrc && this.imagePlacement === 'right' && imageContainer));
|
|
53
|
+
/** Render as an anchor tag if the containerHref prop is present. */
|
|
54
|
+
if (this.containerHref) {
|
|
55
|
+
return (h("a", { class: 'searchcraft-search-result-container', onClick: this.recordMeasureEvent, href: this.containerHref, rel: this.containerRel, style: styles.container || {}, tabindex: '0', target: this.containerTarget }, contentContainer));
|
|
56
|
+
}
|
|
57
|
+
/** Render as a div if no href prop. */
|
|
58
|
+
return (h("div", { class: 'searchcraft-search-result-container', style: styles.container || {} }, contentContainer));
|
|
47
59
|
}
|
|
48
60
|
static get is() { return "searchcraft-base-search-result"; }
|
|
49
|
-
static get encapsulation() { return "shadow"; }
|
|
50
61
|
static get originalStyleUrls() {
|
|
51
62
|
return {
|
|
52
63
|
"$": ["searchcraft-base-search-result.module.scss"]
|
|
@@ -59,11 +70,11 @@ export class SearchcraftBaseSearchResult {
|
|
|
59
70
|
}
|
|
60
71
|
static get properties() {
|
|
61
72
|
return {
|
|
62
|
-
"
|
|
73
|
+
"titleContent": {
|
|
63
74
|
"type": "string",
|
|
64
75
|
"mutable": false,
|
|
65
76
|
"complexType": {
|
|
66
|
-
"original": "string",
|
|
77
|
+
"original": "string | undefined",
|
|
67
78
|
"resolved": "string",
|
|
68
79
|
"references": {}
|
|
69
80
|
},
|
|
@@ -73,15 +84,14 @@ export class SearchcraftBaseSearchResult {
|
|
|
73
84
|
"tags": [],
|
|
74
85
|
"text": ""
|
|
75
86
|
},
|
|
76
|
-
"attribute": "
|
|
77
|
-
"reflect": false
|
|
78
|
-
"defaultValue": "''"
|
|
87
|
+
"attribute": "title-content",
|
|
88
|
+
"reflect": false
|
|
79
89
|
},
|
|
80
|
-
"
|
|
90
|
+
"subtitleContent": {
|
|
81
91
|
"type": "string",
|
|
82
92
|
"mutable": false,
|
|
83
93
|
"complexType": {
|
|
84
|
-
"original": "string",
|
|
94
|
+
"original": "string | undefined",
|
|
85
95
|
"resolved": "string",
|
|
86
96
|
"references": {}
|
|
87
97
|
},
|
|
@@ -91,15 +101,14 @@ export class SearchcraftBaseSearchResult {
|
|
|
91
101
|
"tags": [],
|
|
92
102
|
"text": ""
|
|
93
103
|
},
|
|
94
|
-
"attribute": "
|
|
95
|
-
"reflect": false
|
|
96
|
-
"defaultValue": "'{}'"
|
|
104
|
+
"attribute": "subtitle-content",
|
|
105
|
+
"reflect": false
|
|
97
106
|
},
|
|
98
|
-
"
|
|
107
|
+
"bodyContent": {
|
|
99
108
|
"type": "string",
|
|
100
109
|
"mutable": false,
|
|
101
110
|
"complexType": {
|
|
102
|
-
"original": "string",
|
|
111
|
+
"original": "string | undefined",
|
|
103
112
|
"resolved": "string",
|
|
104
113
|
"references": {}
|
|
105
114
|
},
|
|
@@ -109,15 +118,14 @@ export class SearchcraftBaseSearchResult {
|
|
|
109
118
|
"tags": [],
|
|
110
119
|
"text": ""
|
|
111
120
|
},
|
|
112
|
-
"attribute": "
|
|
113
|
-
"reflect": false
|
|
114
|
-
"defaultValue": "''"
|
|
121
|
+
"attribute": "body-content",
|
|
122
|
+
"reflect": false
|
|
115
123
|
},
|
|
116
|
-
"
|
|
124
|
+
"footerContent": {
|
|
117
125
|
"type": "string",
|
|
118
126
|
"mutable": false,
|
|
119
127
|
"complexType": {
|
|
120
|
-
"original": "string",
|
|
128
|
+
"original": "string | undefined",
|
|
121
129
|
"resolved": "string",
|
|
122
130
|
"references": {}
|
|
123
131
|
},
|
|
@@ -127,15 +135,14 @@ export class SearchcraftBaseSearchResult {
|
|
|
127
135
|
"tags": [],
|
|
128
136
|
"text": ""
|
|
129
137
|
},
|
|
130
|
-
"attribute": "
|
|
131
|
-
"reflect": false
|
|
132
|
-
"defaultValue": "''"
|
|
138
|
+
"attribute": "footer-content",
|
|
139
|
+
"reflect": false
|
|
133
140
|
},
|
|
134
|
-
"
|
|
141
|
+
"buttonLabel": {
|
|
135
142
|
"type": "string",
|
|
136
143
|
"mutable": false,
|
|
137
144
|
"complexType": {
|
|
138
|
-
"original": "string",
|
|
145
|
+
"original": "string | undefined",
|
|
139
146
|
"resolved": "string",
|
|
140
147
|
"references": {}
|
|
141
148
|
},
|
|
@@ -145,16 +152,15 @@ export class SearchcraftBaseSearchResult {
|
|
|
145
152
|
"tags": [],
|
|
146
153
|
"text": ""
|
|
147
154
|
},
|
|
148
|
-
"attribute": "
|
|
149
|
-
"reflect": false
|
|
150
|
-
"defaultValue": "''"
|
|
155
|
+
"attribute": "button-label",
|
|
156
|
+
"reflect": false
|
|
151
157
|
},
|
|
152
|
-
"
|
|
153
|
-
"type": "
|
|
158
|
+
"buttonHref": {
|
|
159
|
+
"type": "string",
|
|
154
160
|
"mutable": false,
|
|
155
161
|
"complexType": {
|
|
156
|
-
"original": "
|
|
157
|
-
"resolved": "
|
|
162
|
+
"original": "string | undefined",
|
|
163
|
+
"resolved": "string",
|
|
158
164
|
"references": {}
|
|
159
165
|
},
|
|
160
166
|
"required": false,
|
|
@@ -163,16 +169,15 @@ export class SearchcraftBaseSearchResult {
|
|
|
163
169
|
"tags": [],
|
|
164
170
|
"text": ""
|
|
165
171
|
},
|
|
166
|
-
"attribute": "
|
|
167
|
-
"reflect": false
|
|
168
|
-
"defaultValue": "false"
|
|
172
|
+
"attribute": "button-href",
|
|
173
|
+
"reflect": false
|
|
169
174
|
},
|
|
170
|
-
"
|
|
175
|
+
"buttonTarget": {
|
|
171
176
|
"type": "string",
|
|
172
177
|
"mutable": false,
|
|
173
178
|
"complexType": {
|
|
174
|
-
"original": "
|
|
175
|
-
"resolved": "
|
|
179
|
+
"original": "'_blank' | '_self' | '_top' | '_parent'",
|
|
180
|
+
"resolved": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\"",
|
|
176
181
|
"references": {}
|
|
177
182
|
},
|
|
178
183
|
"required": false,
|
|
@@ -181,16 +186,16 @@ export class SearchcraftBaseSearchResult {
|
|
|
181
186
|
"tags": [],
|
|
182
187
|
"text": ""
|
|
183
188
|
},
|
|
184
|
-
"attribute": "
|
|
189
|
+
"attribute": "button-target",
|
|
185
190
|
"reflect": false,
|
|
186
|
-
"defaultValue": "''"
|
|
191
|
+
"defaultValue": "'_blank'"
|
|
187
192
|
},
|
|
188
|
-
"
|
|
193
|
+
"buttonRel": {
|
|
189
194
|
"type": "string",
|
|
190
195
|
"mutable": false,
|
|
191
196
|
"complexType": {
|
|
192
|
-
"original": "
|
|
193
|
-
"resolved": "
|
|
197
|
+
"original": "'noreferrer' | 'noopener' | 'nofollow' | undefined",
|
|
198
|
+
"resolved": "\"nofollow\" | \"noopener\" | \"noreferrer\"",
|
|
194
199
|
"references": {}
|
|
195
200
|
},
|
|
196
201
|
"required": false,
|
|
@@ -199,15 +204,14 @@ export class SearchcraftBaseSearchResult {
|
|
|
199
204
|
"tags": [],
|
|
200
205
|
"text": ""
|
|
201
206
|
},
|
|
202
|
-
"attribute": "
|
|
203
|
-
"reflect": false
|
|
204
|
-
"defaultValue": "''"
|
|
207
|
+
"attribute": "button-rel",
|
|
208
|
+
"reflect": false
|
|
205
209
|
},
|
|
206
|
-
"
|
|
210
|
+
"containerHref": {
|
|
207
211
|
"type": "string",
|
|
208
212
|
"mutable": false,
|
|
209
213
|
"complexType": {
|
|
210
|
-
"original": "string",
|
|
214
|
+
"original": "string | undefined",
|
|
211
215
|
"resolved": "string",
|
|
212
216
|
"references": {}
|
|
213
217
|
},
|
|
@@ -217,16 +221,15 @@ export class SearchcraftBaseSearchResult {
|
|
|
217
221
|
"tags": [],
|
|
218
222
|
"text": ""
|
|
219
223
|
},
|
|
220
|
-
"attribute": "
|
|
221
|
-
"reflect": false
|
|
222
|
-
"defaultValue": "''"
|
|
224
|
+
"attribute": "container-href",
|
|
225
|
+
"reflect": false
|
|
223
226
|
},
|
|
224
|
-
"
|
|
227
|
+
"containerTarget": {
|
|
225
228
|
"type": "string",
|
|
226
229
|
"mutable": false,
|
|
227
230
|
"complexType": {
|
|
228
|
-
"original": "
|
|
229
|
-
"resolved": "
|
|
231
|
+
"original": "'_blank' | '_self' | '_top' | '_parent'",
|
|
232
|
+
"resolved": "\"_blank\" | \"_parent\" | \"_self\" | \"_top\"",
|
|
230
233
|
"references": {}
|
|
231
234
|
},
|
|
232
235
|
"required": false,
|
|
@@ -235,16 +238,16 @@ export class SearchcraftBaseSearchResult {
|
|
|
235
238
|
"tags": [],
|
|
236
239
|
"text": ""
|
|
237
240
|
},
|
|
238
|
-
"attribute": "
|
|
241
|
+
"attribute": "container-target",
|
|
239
242
|
"reflect": false,
|
|
240
|
-
"defaultValue": "''"
|
|
243
|
+
"defaultValue": "'_blank'"
|
|
241
244
|
},
|
|
242
|
-
"
|
|
245
|
+
"containerRel": {
|
|
243
246
|
"type": "string",
|
|
244
247
|
"mutable": false,
|
|
245
248
|
"complexType": {
|
|
246
|
-
"original": "'
|
|
247
|
-
"resolved": "\"
|
|
249
|
+
"original": "'noreferrer' | 'noopener' | 'nofollow' | undefined",
|
|
250
|
+
"resolved": "\"nofollow\" | \"noopener\" | \"noreferrer\"",
|
|
248
251
|
"references": {}
|
|
249
252
|
},
|
|
250
253
|
"required": false,
|
|
@@ -253,16 +256,15 @@ export class SearchcraftBaseSearchResult {
|
|
|
253
256
|
"tags": [],
|
|
254
257
|
"text": ""
|
|
255
258
|
},
|
|
256
|
-
"attribute": "
|
|
257
|
-
"reflect": false
|
|
258
|
-
"defaultValue": "'light'"
|
|
259
|
+
"attribute": "container-rel",
|
|
260
|
+
"reflect": false
|
|
259
261
|
},
|
|
260
|
-
"
|
|
261
|
-
"type": "
|
|
262
|
+
"imageSrc": {
|
|
263
|
+
"type": "string",
|
|
262
264
|
"mutable": false,
|
|
263
265
|
"complexType": {
|
|
264
|
-
"original": "
|
|
265
|
-
"resolved": "
|
|
266
|
+
"original": "string | undefined",
|
|
267
|
+
"resolved": "string",
|
|
266
268
|
"references": {}
|
|
267
269
|
},
|
|
268
270
|
"required": false,
|
|
@@ -271,59 +273,79 @@ export class SearchcraftBaseSearchResult {
|
|
|
271
273
|
"tags": [],
|
|
272
274
|
"text": ""
|
|
273
275
|
},
|
|
274
|
-
"attribute": "
|
|
275
|
-
"reflect": false
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
"
|
|
286
|
-
"
|
|
276
|
+
"attribute": "image-src",
|
|
277
|
+
"reflect": false
|
|
278
|
+
},
|
|
279
|
+
"imageAlt": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"mutable": false,
|
|
282
|
+
"complexType": {
|
|
283
|
+
"original": "string | undefined",
|
|
284
|
+
"resolved": "string",
|
|
285
|
+
"references": {}
|
|
286
|
+
},
|
|
287
|
+
"required": false,
|
|
288
|
+
"optional": false,
|
|
287
289
|
"docs": {
|
|
288
290
|
"tags": [],
|
|
289
291
|
"text": ""
|
|
290
292
|
},
|
|
293
|
+
"attribute": "image-alt",
|
|
294
|
+
"reflect": false
|
|
295
|
+
},
|
|
296
|
+
"imagePlacement": {
|
|
297
|
+
"type": "string",
|
|
298
|
+
"mutable": false,
|
|
291
299
|
"complexType": {
|
|
292
|
-
"original": "
|
|
293
|
-
"resolved": "
|
|
300
|
+
"original": "'left' | 'right'",
|
|
301
|
+
"resolved": "\"left\" | \"right\"",
|
|
294
302
|
"references": {}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
"
|
|
298
|
-
"name": "keyDownCallback",
|
|
299
|
-
"bubbles": true,
|
|
300
|
-
"cancelable": true,
|
|
301
|
-
"composed": true,
|
|
303
|
+
},
|
|
304
|
+
"required": false,
|
|
305
|
+
"optional": false,
|
|
302
306
|
"docs": {
|
|
303
307
|
"tags": [],
|
|
304
308
|
"text": ""
|
|
305
309
|
},
|
|
310
|
+
"attribute": "image-placement",
|
|
311
|
+
"reflect": false
|
|
312
|
+
},
|
|
313
|
+
"customStyles": {
|
|
314
|
+
"type": "string",
|
|
315
|
+
"mutable": false,
|
|
306
316
|
"complexType": {
|
|
307
|
-
"original": "
|
|
308
|
-
"resolved": "
|
|
317
|
+
"original": "string | undefined",
|
|
318
|
+
"resolved": "string",
|
|
309
319
|
"references": {}
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
"
|
|
313
|
-
"name": "resultCallback",
|
|
314
|
-
"bubbles": true,
|
|
315
|
-
"cancelable": true,
|
|
316
|
-
"composed": true,
|
|
320
|
+
},
|
|
321
|
+
"required": false,
|
|
322
|
+
"optional": false,
|
|
317
323
|
"docs": {
|
|
318
324
|
"tags": [],
|
|
319
325
|
"text": ""
|
|
320
326
|
},
|
|
327
|
+
"attribute": "custom-styles",
|
|
328
|
+
"reflect": false
|
|
329
|
+
},
|
|
330
|
+
"documentPosition": {
|
|
331
|
+
"type": "number",
|
|
332
|
+
"mutable": false,
|
|
321
333
|
"complexType": {
|
|
322
|
-
"original": "
|
|
323
|
-
"resolved": "
|
|
334
|
+
"original": "number",
|
|
335
|
+
"resolved": "number",
|
|
324
336
|
"references": {}
|
|
325
|
-
}
|
|
326
|
-
|
|
337
|
+
},
|
|
338
|
+
"required": false,
|
|
339
|
+
"optional": false,
|
|
340
|
+
"docs": {
|
|
341
|
+
"tags": [],
|
|
342
|
+
"text": ""
|
|
343
|
+
},
|
|
344
|
+
"attribute": "document-position",
|
|
345
|
+
"reflect": false,
|
|
346
|
+
"defaultValue": "0"
|
|
347
|
+
}
|
|
348
|
+
};
|
|
327
349
|
}
|
|
328
350
|
}
|
|
329
351
|
//# sourceMappingURL=searchcraft-base-search-result.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchcraft-base-search-result.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"searchcraft-base-search-result.js","sourceRoot":"","sources":["../../../../src/components/searchcraft-base-search-result/searchcraft-base-search-result.tsx"],"names":[],"mappings":"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","sourcesContent":["import { useSearchcraftStore } from '@provider/store';\nimport { Component, Fragment, h, Prop } from '@stencil/core';\n\n@Component({\n tag: 'searchcraft-base-search-result',\n styleUrl: 'searchcraft-base-search-result.module.scss',\n shadow: false,\n})\nexport class SearchcraftBaseSearchResult {\n @Prop() titleContent: string | undefined;\n @Prop() subtitleContent: string | undefined;\n @Prop() bodyContent: string | undefined;\n @Prop() footerContent: string | undefined;\n @Prop() buttonLabel: string | undefined;\n @Prop() buttonHref: string | undefined;\n @Prop() buttonTarget: '_blank' | '_self' | '_top' | '_parent' = '_blank';\n @Prop() buttonRel: 'noreferrer' | 'noopener' | 'nofollow' | undefined;\n @Prop() containerHref: string | undefined;\n @Prop() containerTarget: '_blank' | '_self' | '_top' | '_parent' = '_blank';\n @Prop() containerRel: 'noreferrer' | 'noopener' | 'nofollow' | undefined;\n @Prop() imageSrc: string | undefined;\n @Prop() imageAlt: string | undefined;\n @Prop() imagePlacement: 'left' | 'right';\n @Prop() customStyles: string | undefined;\n @Prop() documentPosition = 0;\n\n private searchcraftStore = useSearchcraftStore.getState();\n\n private recordMeasureEvent = () => {\n const searchcraft = this.searchcraftStore.getSearchcraftInstance();\n\n if (searchcraft) {\n const document_position = this.documentPosition;\n const search_term = this.searchcraftStore.query;\n const number_of_documents =\n this.searchcraftStore.searchResults?.data?.hits?.length || 0;\n\n searchcraft.sendMeasureEvent('document_clicked', {\n document_position,\n number_of_documents,\n search_term,\n });\n }\n };\n\n private parseStyles = (): Record<string, { [key: string]: string }> => {\n if (this.customStyles) {\n try {\n return JSON.parse(this.customStyles);\n } catch (error) {\n console.error('Error parsing custom styles:', error);\n return {};\n }\n }\n return {};\n };\n\n render() {\n const styles = this.parseStyles();\n const imageContainer = this.imageSrc && (\n <img\n alt={this.imageAlt}\n class='searchcraft-search-result-image'\n src={this.imageSrc}\n style={styles.image || {}}\n />\n );\n\n const contentContainer = (\n <Fragment>\n {this.imageSrc && this.imagePlacement === 'left' && imageContainer}\n <div class='searchcraft-base-search-result-content-container'>\n {this.titleContent && (\n <h2\n class='searchcraft-base-search-result-title'\n style={styles.title || {}}\n >\n {this.titleContent}\n </h2>\n )}\n {this.subtitleContent && (\n <h3\n class='searchcraft-base-search-result-subtitle'\n style={styles.subtitle || {}}\n >\n {this.subtitleContent}\n </h3>\n )}\n {this.bodyContent && (\n <p\n class='searchcraft-base-search-result-body-content'\n style={styles.primaryContent || {}}\n >\n {this.bodyContent}\n </p>\n )}\n\n {this.footerContent && (\n <p\n class='searchcraft-base-search-result-footer-content'\n style={styles.secondaryContent || {}}\n >\n {this.footerContent}\n </p>\n )}\n {this.buttonHref && !this.containerHref && this.buttonLabel && (\n <a\n class='searchcraft-search-result-button'\n href={this.buttonHref}\n style={styles.button || {}}\n target={this.buttonTarget}\n rel={this.buttonRel}\n >\n {this.buttonLabel}\n </a>\n )}\n </div>\n {this.imageSrc && this.imagePlacement === 'right' && imageContainer}\n </Fragment>\n );\n\n /** Render as an anchor tag if the containerHref prop is present. */\n if (this.containerHref) {\n return (\n <a\n class='searchcraft-search-result-container'\n onClick={this.recordMeasureEvent}\n href={this.containerHref}\n rel={this.containerRel}\n style={styles.container || {}}\n tabindex='0'\n target={this.containerTarget}\n >\n {contentContainer}\n </a>\n );\n }\n\n /** Render as a div if no href prop. */\n return (\n <div\n class='searchcraft-search-result-container'\n style={styles.container || {}}\n >\n {contentContainer}\n </div>\n );\n }\n}\n"]}
|