@searchcraft/javascript-sdk 0.13.1 → 0.13.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/dist/components/{p-D0j0UFpV.js → CoreInstanceRegistry.js} +2 -2
- package/dist/components/CoreInstanceRegistry.js.map +1 -0
- package/dist/components/defineCustomElements.js +23 -23
- package/dist/components/{p-_aHgRsRD.js → html.js} +3 -3
- package/dist/components/html.js.map +1 -0
- package/dist/components/index.js +28 -28
- package/dist/components/{p-DO5g2x-l.js → index2.js} +11 -5
- package/dist/components/index2.js.map +1 -0
- package/dist/components/{p-BfTCfPZ1.js → index3.js} +2 -2
- package/dist/components/index3.js.map +1 -0
- package/dist/components/{p-BlYgaV0q.js → purify.es.js} +10 -4
- package/dist/components/purify.es.js.map +1 -0
- package/dist/components/searchcraft-ad.js +1 -1
- package/dist/components/{p-C1S92_N8.js → searchcraft-ad2.js} +8 -8
- package/dist/components/searchcraft-ad2.js.map +1 -0
- package/dist/components/searchcraft-button.js +1 -1
- package/dist/components/{p-C681KruS.js → searchcraft-button2.js} +6 -6
- package/dist/components/searchcraft-button2.js.map +1 -0
- package/dist/components/searchcraft-error-message.js +1 -1
- package/dist/components/{p-DjPZkCLP.js → searchcraft-error-message2.js} +5 -5
- package/dist/components/searchcraft-error-message2.js.map +1 -0
- package/dist/components/searchcraft-facet-list.js +1 -1
- package/dist/components/{p-BV4HUriZ.js → searchcraft-facet-list2.js} +7 -7
- package/dist/components/searchcraft-facet-list2.js.map +1 -0
- package/dist/components/searchcraft-filter-panel.js +10 -10
- package/dist/components/searchcraft-input-form.js +1 -1
- package/dist/components/{p-C-wcIch1.js → searchcraft-input-form2.js} +13 -13
- package/dist/components/searchcraft-input-form2.js.map +1 -0
- package/dist/components/searchcraft-input-label.js +1 -1
- package/dist/components/{p-L4PwHqQC.js → searchcraft-input-label2.js} +6 -6
- package/dist/components/searchcraft-input-label2.js.map +1 -0
- package/dist/components/searchcraft-loading.js +1 -1
- package/dist/components/{p-B_415D4A.js → searchcraft-loading2.js} +5 -5
- package/dist/components/searchcraft-loading2.js.map +1 -0
- package/dist/components/searchcraft-pagination.js +7 -7
- package/dist/components/searchcraft-popover-button.js +5 -5
- package/dist/components/searchcraft-popover-footer.js +1 -1
- package/dist/components/{p-C7ZK8CYu.js → searchcraft-popover-footer2.js} +8 -8
- package/dist/components/searchcraft-popover-footer2.js.map +1 -0
- package/dist/components/searchcraft-popover-form.js +22 -22
- package/dist/components/searchcraft-popover-list-item.js +1 -1
- package/dist/components/{p-Cju73I1E.js → searchcraft-popover-list-item2.js} +8 -8
- package/dist/components/searchcraft-popover-list-item2.js.map +1 -0
- package/dist/components/searchcraft-popover-list-view.js +1 -1
- package/dist/components/{p-Dr9rPC9v.js → searchcraft-popover-list-view2.js} +10 -10
- package/dist/components/searchcraft-popover-list-view2.js.map +1 -0
- package/dist/components/searchcraft-results-info.js +6 -6
- package/dist/components/searchcraft-search-result.js +1 -1
- package/dist/components/{p-DotXR-Gz.js → searchcraft-search-result2.js} +7 -7
- package/dist/components/searchcraft-search-result2.js.map +1 -0
- package/dist/components/searchcraft-search-results-per-page.js +6 -6
- package/dist/components/searchcraft-search-results.js +10 -10
- package/dist/components/searchcraft-select.js +1 -1
- package/dist/components/{p-Dc7S4y3b.js → searchcraft-select2.js} +5 -5
- package/dist/components/searchcraft-select2.js.map +1 -0
- package/dist/components/searchcraft-slider.js +1 -1
- package/dist/components/{p-BbSxfaD7.js → searchcraft-slider2.js} +8 -8
- package/dist/components/searchcraft-slider2.js.map +1 -0
- package/dist/components/searchcraft-summary-box.js +7 -7
- package/dist/components/searchcraft-theme.js +3 -3
- package/dist/components/searchcraft-toggle-button.js +1 -1
- package/dist/components/{p-D5p2scT9.js → searchcraft-toggle-button2.js} +7 -7
- package/dist/components/searchcraft-toggle-button2.js.map +1 -0
- package/dist/components/{p-i8oXh7db.js → units.js} +2 -2
- package/dist/components/units.js.map +1 -0
- package/dist/hydrate/index.d.ts +12 -0
- package/dist/hydrate/index.js +1186 -1136
- package/dist/hydrate/index.mjs +1185 -1137
- package/dist/types/stencil-public-runtime.d.ts +43 -0
- package/package.json +3 -3
- package/dist/components/p-BV4HUriZ.js.map +0 -1
- package/dist/components/p-B_415D4A.js.map +0 -1
- package/dist/components/p-BbSxfaD7.js.map +0 -1
- package/dist/components/p-BfTCfPZ1.js.map +0 -1
- package/dist/components/p-BlYgaV0q.js.map +0 -1
- package/dist/components/p-C-wcIch1.js.map +0 -1
- package/dist/components/p-C1S92_N8.js.map +0 -1
- package/dist/components/p-C681KruS.js.map +0 -1
- package/dist/components/p-C7ZK8CYu.js.map +0 -1
- package/dist/components/p-Cju73I1E.js.map +0 -1
- package/dist/components/p-D0j0UFpV.js.map +0 -1
- package/dist/components/p-D5p2scT9.js.map +0 -1
- package/dist/components/p-DO5g2x-l.js.map +0 -1
- package/dist/components/p-Dc7S4y3b.js.map +0 -1
- package/dist/components/p-DjPZkCLP.js.map +0 -1
- package/dist/components/p-DotXR-Gz.js.map +0 -1
- package/dist/components/p-Dr9rPC9v.js.map +0 -1
- package/dist/components/p-L4PwHqQC.js.map +0 -1
- package/dist/components/p-_aHgRsRD.js.map +0 -1
- package/dist/components/p-i8oXh7db.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-C681KruS.js","mappings":";;;MAoBa,iBAAiB,iBAAAA,kBAAA,CAAA,MAAA,iBAAA,SAAAC,CAAA,CAAA;;;;;;;;AAC5B;;AAEG;IACK,SAAS,GAA4B,SAAS;AACtD;;AAEG;IACK,QAAQ,GAAa,KAAK;AAClC;;AAEG;AACK,IAAA,IAAI;AACZ;;AAEG;IACK,QAAQ,GAAa,KAAK;AAClC;;AAEG;IACK,YAAY,GAAsB,MAAM;AAChD;;AAEG;IACK,KAAK,GAAG,QAAQ;AACxB;;AAEG;IACK,IAAI,GAAmC,QAAQ;AACvD;;AAEG;AACM,IAAA,WAAW;IAEZ,iBAAiB,GAAG,MAAK;AAC/B,QAAA,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE;AACzB,KAAC;IAED,MAAM,GAAA;QACJ,QACE,CACc,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,YAAA,EAAA,IAAI,CAAC,KAAK,EACtB,KAAK,EAAE,UAAU,CAAC,oBAAoB,EAAE;AACtC,gBAAA,4BAA4B,EAAE,IAAI,CAAC,SAAS,KAAK,SAAS;AAC1D,gBAAA,6BAA6B,EAAE,IAAI,CAAC,SAAS,KAAK,UAAU;gBAC5D,6BAA6B,EAAE,IAAI,CAAC,QAAQ;AAC7C,aAAA,CAAC,EACF,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,OAAO,EAAE,IAAI,CAAC,iBAAiB,EAC/B,IAAI,EAAE,IAAI,CAAC,IAAI,EAAA,EAEd,IAAI,CAAC,QAAQ,IACZ,IAAI,CAAC,IAAI,KAET,EAAC,QAAQ,EAAA,IAAA,EACN,IAAI,CAAC,YAAY,KAAK,MAAM,IAAI,IAAI,CAAC,IAAI,EAC1C,CAAO,CAAA,MAAA,EAAA,IAAA,EAAA,IAAI,CAAC,KAAK,CAAQ,EACxB,IAAI,CAAC,YAAY,KAAK,OAAO,IAAI,IAAI,CAAC,IAAI,CAClC,CACZ,CACM;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/searchcraft-button/searchcraft-button.tsx"],"sourcesContent":["import {\n Component,\n Event,\n type EventEmitter,\n Fragment,\n Prop,\n h,\n} from '@stencil/core';\nimport classNames from 'classnames';\n\n/**\n * This web component represents a button.\n * It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.\n *\n * @internal\n */\n@Component({\n tag: 'searchcraft-button',\n shadow: false,\n})\nexport class SearchcraftButton {\n /**\n * Controls the visual representation of the button.\n */\n @Prop() hierarchy?: 'primary' | 'tertiary' = 'primary';\n /**\n * Whether the button is disabled.\n */\n @Prop() disabled?: boolean = false;\n /**\n * The icon element.\n */\n @Prop() icon?: Element;\n /**\n * Should the button only display an icon.\n */\n @Prop() iconOnly?: boolean = false;\n /**\n * The position of the icon.\n */\n @Prop() iconPosition?: 'left' | 'right' = 'left';\n /**\n * The label for the button.\n */\n @Prop() label = 'Search';\n /**\n * The type of the button.\n */\n @Prop() type?: 'submit' | 'reset' | 'button' = 'button';\n /**\n * The event fired when the button is clicked.\n */\n @Event() buttonClick!: EventEmitter<void>;\n\n private handleButtonClick = () => {\n this.buttonClick.emit();\n };\n\n render() {\n return (\n <button\n aria-label={this.label}\n class={classNames('searchcraft-button', {\n 'searchcraft-button-primary': this.hierarchy === 'primary',\n 'searchcraft-button-tertiary': this.hierarchy === 'tertiary',\n 'searchcraft-button-disabled': this.disabled,\n })}\n disabled={this.disabled}\n onClick={this.handleButtonClick}\n type={this.type}\n >\n {this.iconOnly ? (\n this.icon\n ) : (\n <Fragment>\n {this.iconPosition === 'left' && this.icon}\n <span>{this.label}</span>\n {this.iconPosition === 'right' && this.icon}\n </Fragment>\n )}\n </button>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-C7ZK8CYu.js","mappings":";;;;;MAea,wBAAwB,iBAAAA,kBAAA,CAAA,MAAA,wBAAA,SAAAC,CAAA,CAAA;;;;;;;AACnC;;AAEG;AACK,IAAA,aAAa;AACZ,IAAA,kBAAkB;AAEnB,IAAA,WAAW,GAAe,MAAK,GAAG;AAClC,IAAA,WAAW;AAEnB,IAAA,eAAe,CAAC,IAAqB,EAAA;QACnC,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,kBAAkB;AAElE,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;AAChD,YAAA,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,kBAAkB;AACpD,SAAC,CAAC;;IAGJ,iBAAiB,GAAA;QACf,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,eAAe,CACzC,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAChC;;IAGH,oBAAoB,GAAA;AAClB,QAAA,IAAI,CAAC,WAAW,IAAI;AACpB,QAAA,IAAI,CAAC,WAAW,IAAI;;IAGtB,MAAM,GAAA;AACJ,QAAA,QACE,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAQ,KAAK,EAAC,4BAA4B,EAAA,EACxC,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,yCAAyC,EAC/C,EAAA,IAAI,CAAC;cACF,GAAG,sBAAsB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAgB,cAAA;cAClE,GAAG,CACL,EACJ,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,iCAAiC,EACvC,IAAI,EAAC,yBAAyB,EAC9B,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,YAAY,EAAA,EAEhB,CACE,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,uCAAuC,EAC7C,KAAK,EAAC,KAAK,EACX,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,YAAY,EACpB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAAA,EAElC,CAAqC,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,wBAAA,CAAA,EACrC,CAAA,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,CAAC,EAAC,kmOAAkmO,EACpmO,IAAI,EAAC,cAAc,EAAA,CACnB,CACE,CACJ,CACG;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/searchcraft-popover-footer/searchcraft-popover-footer.tsx"],"sourcesContent":["import type { SearchcraftCore } from '@classes';\nimport { registry } from '@classes/CoreInstanceRegistry';\nimport { Component, Prop, State, h } from '@stencil/core';\n\nimport { formatNumberWithCommas } from '@utils';\n\n/**\n * Renders the footer for the searchcraft-popover-form.\n *\n * @internal\n */\n@Component({\n tag: 'searchcraft-popover-footer',\n shadow: false,\n})\nexport class SearchcraftPopoverFooter {\n /**\n * The id of the Searchcraft instance that this component should use.\n */\n @Prop() searchcraftId?: string;\n @State() searchResultsCount;\n\n private unsubscribe: () => void = () => {};\n private cleanupCore?: () => void;\n\n onCoreAvailable(core: SearchcraftCore) {\n this.searchResultsCount = core.store.getState().searchResultsCount;\n\n this.unsubscribe = core.store.subscribe((state) => {\n this.searchResultsCount = state.searchResultsCount;\n });\n }\n\n connectedCallback() {\n this.cleanupCore = registry.useCoreInstance(\n this.searchcraftId,\n this.onCoreAvailable.bind(this),\n );\n }\n\n disconnectedCallback() {\n this.unsubscribe?.();\n this.cleanupCore?.();\n }\n\n render() {\n return (\n <footer class='searchcraft-popover-footer'>\n <p class='searchcraft-popover-footer-results-info'>\n {this.searchResultsCount\n ? `${formatNumberWithCommas(this.searchResultsCount)} Results Found`\n : ' '}\n </p>\n <a\n class='searchcraft-popover-footer-link'\n href='https://searchcraft.io/'\n target='_blank'\n rel='noreferrer'\n >\n <svg\n class='searchcraft-popover-footer-link-image'\n width='169'\n height='16'\n viewBox='0 0 169 16'\n fill='none'\n xmlns='http://www.w3.org/2000/svg'\n >\n <title>Powered by Searchcraft</title>\n <path\n d='M5.07288 0.608C7.60088 0.608 8.84888 2.064 8.84888 4.112C8.84888 6.16 7.60088 7.616 5.07288 7.616H1.68088V12H0.336875V0.608H5.07288ZM5.07288 6.4C6.67288 6.4 7.45688 5.552 7.45688 4.112C7.45688 2.672 6.67288 1.824 5.07288 1.824H1.68088V6.4H5.07288ZM13.31 12.192C10.99 12.192 9.31 10.512 9.31 7.872C9.31 5.232 10.99 3.552 13.31 3.552C15.63 3.552 17.31 5.232 17.31 7.872C17.31 10.512 15.63 12.192 13.31 12.192ZM13.31 11.04C14.91 11.04 15.966 9.872 15.966 7.872C15.966 5.872 14.91 4.704 13.31 4.704C11.71 4.704 10.654 5.872 10.654 7.872C10.654 9.872 11.71 11.04 13.31 11.04ZM28.3826 3.744H29.7586L27.0066 12H25.6626L24.4466 8.176C24.1586 7.264 23.8706 6.304 23.6146 5.376C23.3426 6.304 23.0546 7.264 22.7666 8.176L21.5666 12H20.2226L17.4706 3.744H18.8466L20.0146 7.472C20.3346 8.48 20.6226 9.472 20.9106 10.48C21.1826 9.472 21.4706 8.48 21.7906 7.472L22.9426 3.744H24.2866L25.4386 7.472C25.7426 8.464 26.0466 9.456 26.3346 10.448C26.6066 9.456 26.9106 8.464 27.2146 7.472L28.3826 3.744ZM37.5194 7.872V8.32H31.2474C31.3754 10.176 32.3514 11.024 33.7914 11.024C34.9594 11.024 35.6954 10.416 35.9834 9.488H37.3114C36.9114 11.04 35.7274 12.192 33.7594 12.192C31.5034 12.192 29.9194 10.544 29.9194 7.872C29.9194 5.28 31.4394 3.552 33.7274 3.552C36.1914 3.552 37.5194 5.504 37.5194 7.872ZM33.7274 4.72C32.4314 4.72 31.4874 5.536 31.2794 7.168H36.1434C36.0154 5.808 35.1994 4.72 33.7274 4.72ZM42.9101 3.616C43.0381 3.616 43.1661 3.616 43.3421 3.632V4.864H43.0221C41.3741 4.864 40.3181 5.696 40.3181 7.296V12H39.0381V3.744H40.2541V5.2C40.7181 4.336 41.5661 3.616 42.9101 3.616ZM51.2538 7.872V8.32H44.9818C45.1098 10.176 46.0858 11.024 47.5258 11.024C48.6938 11.024 49.4298 10.416 49.7178 9.488H51.0458C50.6458 11.04 49.4618 12.192 47.4938 12.192C45.2378 12.192 43.6538 10.544 43.6538 7.872C43.6538 5.28 45.1738 3.552 47.4618 3.552C49.9258 3.552 51.2538 5.504 51.2538 7.872ZM47.4618 4.72C46.1658 4.72 45.2218 5.536 45.0138 7.168H49.8778C49.7498 5.808 48.9338 4.72 47.4618 4.72ZM58.9805 0.608H60.2605V12H59.0445V10.72C58.4205 11.664 57.4445 12.192 56.2125 12.192C53.8925 12.192 52.3725 10.512 52.3725 7.872C52.3725 5.232 53.8925 3.552 56.2125 3.552C57.4125 3.552 58.3565 4.048 58.9805 4.928V0.608ZM56.3725 11.04C57.9725 11.04 59.0285 9.872 59.0285 7.872C59.0285 5.872 57.9725 4.704 56.3725 4.704C54.7725 4.704 53.7165 5.936 53.7165 7.936C53.7165 9.936 54.7725 11.04 56.3725 11.04ZM69.2736 3.552C71.5936 3.552 73.1136 5.232 73.1136 7.872C73.1136 10.512 71.5936 12.192 69.2736 12.192C68.0416 12.192 67.0656 11.664 66.4416 10.72V12H65.2256V0.608H66.5056V4.928C67.1296 4.048 68.0736 3.552 69.2736 3.552ZM69.1136 11.04C70.7136 11.04 71.7696 9.808 71.7696 7.808C71.7696 5.808 70.7136 4.704 69.1136 4.704C67.5136 4.704 66.4576 5.872 66.4576 7.872C66.4576 9.872 67.5136 11.04 69.1136 11.04ZM79.3795 3.744H80.7715L77.2835 13.296C76.7555 14.752 75.9075 15.184 74.5955 15.184C74.3395 15.184 74.0995 15.168 73.8275 15.136V14.064H74.5795C75.3955 14.064 75.8275 13.696 76.0835 13.04C76.1795 12.8 76.2755 12.528 76.3715 12.272L73.2675 3.744H74.6755L75.8435 7.184C76.2595 8.384 76.6435 9.568 77.0275 10.752C77.3955 9.568 77.7955 8.368 78.2115 7.168L79.3795 3.744ZM89.1546 12.256C86.1146 12.256 84.2906 10.864 84.2746 8.24H86.4026C86.4346 10.032 87.6346 10.512 89.2186 10.512C90.7066 10.512 91.5226 9.936 91.5226 8.864C91.5226 7.968 90.9306 7.568 89.1866 7.216L88.2266 7.024C86.0186 6.608 84.5626 5.632 84.5626 3.568C84.5626 1.68 86.0506 0.351999 88.7866 0.351999C91.9866 0.351999 93.3466 1.856 93.4266 4H91.3306C91.2506 2.784 90.6266 2.096 88.8186 2.096C87.4426 2.096 86.7706 2.64 86.7706 3.504C86.7706 4.416 87.2986 4.832 88.9946 5.184L89.9866 5.376C92.6746 5.904 93.7626 6.944 93.7626 8.752C93.7626 11.008 92.0026 12.256 89.1546 12.256ZM102.952 8.016V8.496H96.7758C96.9198 9.968 97.7518 10.624 98.9198 10.624C99.8798 10.624 100.504 10.176 100.808 9.44H102.744C102.328 11.12 100.888 12.192 98.9038 12.192C96.4718 12.192 94.7918 10.512 94.7918 7.872C94.7918 5.28 96.4238 3.552 98.8718 3.552C101.4 3.552 102.952 5.392 102.952 8.016ZM98.8558 5.12C97.7838 5.12 96.9838 5.728 96.7918 7.088H100.936C100.776 5.92 100.056 5.12 98.8558 5.12ZM111.599 12H109.583C109.455 11.776 109.391 11.392 109.359 10.992C108.815 11.76 107.919 12.192 106.703 12.192C104.943 12.192 103.727 11.312 103.727 9.712C103.727 8.336 104.559 7.36 106.895 7.136L108.143 7.024C108.911 6.928 109.311 6.688 109.311 6.08C109.311 5.44 108.975 5.056 107.807 5.056C106.655 5.056 106.175 5.36 106.095 6.368H104.111C104.223 4.624 105.247 3.552 107.823 3.552C110.287 3.552 111.263 4.544 111.263 6.032V10.432C111.263 11.024 111.375 11.68 111.599 12ZM107.183 10.752C108.255 10.752 109.311 10.176 109.311 8.736V7.984C109.103 8.176 108.799 8.272 108.367 8.32L107.279 8.448C106.159 8.576 105.791 8.976 105.791 9.632C105.791 10.32 106.255 10.752 107.183 10.752ZM117.216 3.616C117.392 3.616 117.536 3.616 117.712 3.648V5.504H117.2C115.712 5.504 114.816 6.24 114.816 7.808V12H112.8V3.744H114.752V5.216C115.152 4.288 115.936 3.616 117.216 3.616ZM122.137 12.192C119.689 12.192 118.057 10.512 118.057 7.872C118.057 5.232 119.673 3.552 122.137 3.552C124.297 3.552 125.737 4.784 125.977 6.72H123.961C123.769 5.696 123.033 5.232 122.137 5.232C120.937 5.232 120.121 6.064 120.121 7.872C120.121 9.68 120.969 10.512 122.137 10.512C123.049 10.512 123.833 10.016 123.993 8.928H126.009C125.785 10.944 124.249 12.192 122.137 12.192ZM131.641 3.552C133.369 3.552 134.537 4.56 134.537 6.528V12H132.521V6.864C132.521 5.808 131.993 5.296 130.969 5.296C130.089 5.296 129.129 5.904 129.129 7.376V12H127.113V0.608H129.129V4.848C129.673 4.096 130.521 3.552 131.641 3.552ZM139.887 12.192C137.439 12.192 135.807 10.512 135.807 7.872C135.807 5.232 137.423 3.552 139.887 3.552C142.047 3.552 143.487 4.784 143.727 6.72H141.711C141.519 5.696 140.783 5.232 139.887 5.232C138.687 5.232 137.871 6.064 137.871 7.872C137.871 9.68 138.719 10.512 139.887 10.512C140.799 10.512 141.583 10.016 141.743 8.928H143.759C143.535 10.944 141.999 12.192 139.887 12.192ZM149.279 3.616C149.455 3.616 149.599 3.616 149.775 3.648V5.504H149.263C147.775 5.504 146.879 6.24 146.879 7.808V12H144.863V3.744H146.815V5.216C147.215 4.288 147.999 3.616 149.279 3.616ZM157.803 12H155.787C155.659 11.776 155.595 11.392 155.563 10.992C155.019 11.76 154.123 12.192 152.907 12.192C151.147 12.192 149.931 11.312 149.931 9.712C149.931 8.336 150.763 7.36 153.099 7.136L154.347 7.024C155.115 6.928 155.515 6.688 155.515 6.08C155.515 5.44 155.179 5.056 154.011 5.056C152.859 5.056 152.379 5.36 152.299 6.368H150.315C150.427 4.624 151.451 3.552 154.027 3.552C156.491 3.552 157.467 4.544 157.467 6.032V10.432C157.467 11.024 157.579 11.68 157.803 12ZM153.387 10.752C154.459 10.752 155.515 10.176 155.515 8.736V7.984C155.307 8.176 155.003 8.272 154.571 8.32L153.483 8.448C152.363 8.576 151.995 8.976 151.995 9.632C151.995 10.32 152.459 10.752 153.387 10.752ZM162.466 2.16C161.746 2.16 161.426 2.512 161.426 3.152V3.744H163.122V5.28H161.426V12H159.426V5.28H158.146V3.744H159.426V3.12C159.426 1.664 160.146 0.559999 162.13 0.559999C162.45 0.559999 162.882 0.575999 163.17 0.608V2.16H162.466ZM168.636 5.28H167.004V9.744C167.004 10.288 167.276 10.464 167.948 10.464H168.636V12C168.268 12.032 167.9 12.064 167.58 12.064C165.836 12.064 165.004 11.472 165.004 9.952V5.28H163.724V3.744H165.004V1.344H167.004V3.744H168.636V5.28Z'\n fill='currentColor'\n />\n </svg>\n </a>\n </footer>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-Cju73I1E.js","mappings":";;;;;MAmBa,0BAA0B,iBAAAA,kBAAA,CAAA,MAAA,0BAAA,SAAAC,CAAA,CAAA;;;;;;;AAC7B,IAAA,IAAI;AACJ,IAAA,qBAAqB;;IAErB,gBAAgB,GAAG,CAAC;AAC5B;;AAEG;AACK,IAAA,aAAa;AAEZ,IAAA,KAAK;AACL,IAAA,QAAQ;AACR,IAAA,IAAI;AACJ,IAAA,WAAW;AACX,IAAA,QAAQ;AACjB,IAAA,IAAI;AACI,IAAA,WAAW;AAEnB,IAAA,qBAAqB,CAAC,QAAwB,EAAA;AAC5C,QAAA,IAAI,CAAC,KAAK,GAAG,uCAAuC,CAClD,QAAQ,EACR,IAAI,CAAC,qBAAqB,EAAE,KAAK,CAClC;AACD,QAAA,IAAI,CAAC,QAAQ,GAAG,uCAAuC,CACrD,QAAQ,EACR,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CACrC;AACD,QAAA,IAAI,CAAC,IAAI,GAAG,uCAAuC,CACjD,QAAQ,EACR,IAAI,CAAC,qBAAqB,EAAE,IAAI,CACjC;AACD,QAAA,IAAI,CAAC,WAAW,GAAG,uCAAuC,CACxD,QAAQ,EACR,IAAI,CAAC,qBAAqB,EAAE,WAAW,CACxC;AACD,QAAA,IAAI,CAAC,QAAQ,GAAG,uCAAuC,CACrD,QAAQ,EACR,IAAI,CAAC,qBAAqB,EAAE,QAAQ,CACrC;;AAGH,IAAA,eAAe,CAAC,IAAqB,EAAA;AACnC,QAAA,IAAI,CAAC,IAAI,GAAG,IAAI;;IAGlB,iBAAiB,GAAA;AACf,QAAA,IAAI,IAAI,CAAC,IAAI,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EAAE,IAAI,CAAC,QAAQ,EAClB,GAAG,EAAE,IAAI,CAAC,WAAW,EACrB,KAAK,EAAC,qCAAqC,EAAA,CAC3C,CACE,CACP,EACD,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,uCAAuC,EAAA,EAC/C,IAAI,CAAC,KAAK,KACT,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,6CAA6C,EACnD,EAAA,IAAI,CAAC,KAAK,CACT,CACL,EACA,IAAI,CAAC,QAAQ,KACZ,CAAG,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,gDAAgD,EAAA,EACtD,IAAI,CAAC,QAAQ,CACZ,CACL,CACG,CACJ,CACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/searchcraft-popover-list-item/searchcraft-popover-list-item.tsx"],"sourcesContent":["import type { SearchcraftCore } from '@classes';\nimport { registry } from '@classes/CoreInstanceRegistry';\nimport { Component, Prop, State, h } from '@stencil/core';\nimport type {\n PopoverResultMappings,\n SearchClientResponseItem,\n SearchDocument,\n} from '@types';\nimport { getDocumentValueFromSearchResultMapping } from '@utils';\n\n/**\n * A single list item rendered in a searchcraft-popover-list-view.\n *\n * @internal\n */\n@Component({\n tag: 'searchcraft-popover-list-item',\n shadow: false,\n})\nexport class SearchcraftPopoverListItem {\n @Prop() item: SearchClientResponseItem | undefined;\n @Prop() popoverResultMappings: PopoverResultMappings | undefined;\n /** The document position relative to the search results (For Measure) */\n @Prop() documentPosition = 0;\n /**\n * The id of the Searchcraft instance that this component should use.\n */\n @Prop() searchcraftId?: string;\n\n @State() title?: string;\n @State() subtitle?: string;\n @State() href?: string;\n @State() imageSource?: string;\n @State() imageAlt?: string;\n core?: SearchcraftCore;\n private cleanupCore?: () => void;\n\n mapValuesFromDocument(document: SearchDocument) {\n this.title = getDocumentValueFromSearchResultMapping(\n document,\n this.popoverResultMappings?.title,\n );\n this.subtitle = getDocumentValueFromSearchResultMapping(\n document,\n this.popoverResultMappings?.subtitle,\n );\n this.href = getDocumentValueFromSearchResultMapping(\n document,\n this.popoverResultMappings?.href,\n );\n this.imageSource = getDocumentValueFromSearchResultMapping(\n document,\n this.popoverResultMappings?.imageSource,\n );\n this.imageAlt = getDocumentValueFromSearchResultMapping(\n document,\n this.popoverResultMappings?.imageAlt,\n );\n }\n\n onCoreAvailable(core: SearchcraftCore) {\n this.core = core;\n }\n\n connectedCallback() {\n if (this.item) {\n this.mapValuesFromDocument(this.item.document);\n }\n this.cleanupCore = registry.useCoreInstance(\n this.searchcraftId,\n this.onCoreAvailable.bind(this),\n );\n }\n\n disconnectedCallback() {\n this.cleanupCore?.();\n }\n\n handleLinkClick = () => {\n if (this.core) {\n const document_position = this.documentPosition;\n const search_term = this.core.store.getState().searchTerm;\n const number_of_documents =\n this.core.store.getState().searchClientResponseItems.length || 0;\n\n this.core.measureClient?.sendMeasureEvent('document_clicked', {\n document_position,\n number_of_documents,\n search_term,\n });\n }\n };\n\n render() {\n return (\n <div class='searchcraft-popover-list-item'>\n <a\n class='searchcraft-popover-list-item-link'\n href={this.href}\n onClick={this.handleLinkClick.bind(this)}\n >\n {this.imageSource && (\n <div class='searchcraft-popover-list-item-image-wrapper'>\n <img\n alt={this.imageAlt}\n src={this.imageSource}\n class='searchcraft-popover-list-item-image'\n />\n </div>\n )}\n <div class='searchcraft-popover-list-item-content'>\n {this.title && (\n <p class='searchcraft-popover-list-item-content-title'>\n {this.title}\n </p>\n )}\n {this.subtitle && (\n <p class='searchcraft-popover-list-item-content-subtitle'>\n {this.subtitle}\n </p>\n )}\n </div>\n </a>\n </div>\n );\n }\n}\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"file":"p-D0j0UFpV.js","mappings":"AAEA;;;AAGG;AACI,MAAM,wBAAwB,GAAG;AAExC;;;;;;AAMG;AACH,MAAM,oBAAoB,CAAA;IAChB,aAAa,GAAoC,EAAE;IACnD,aAAa,GACnB,EAAE;AAEJ;;;;;;;;AAQG;IACH,eAAe,CACb,YAA6B,EAC7B,aAAiC,EAAA;AAEjC,QAAA,MAAM,EAAE,GAAG,aAAa,IAAI,wBAAwB;AACpD,QAAA,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,YAAY;AAErC,QAAA,KAAK,MAAM,QAAQ,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,EAAE;YACnD,QAAQ,CAAC,YAAY,CAAC;;;AAI1B;;;;;;AAMG;IACH,eAAe,CACb,aAAiC,EACjC,WAAoD,EAAA;AAEpD,QAAA,MAAM,EAAE,GAAG,aAAa,IAAI,wBAAwB;;AAEpD,QAAA,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE;YAC1B,WAAW,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;AACnC,YAAA,OAAO,MAAO,GAAC;;;QAGjB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE;AAC3B,YAAA,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE;;QAE7B,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;AAExC,QAAA,OAAO,MAAK;AACV,YAAA,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,EAAE;gBAC1B,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC,MAAM,CACpD,CAAC,EAAE,KAAK,EAAE,KAAK,WAAW,CAC3B;;AAEL,SAAC;;AAEJ;AAEY,MAAA,QAAQ,GAAG,IAAI,oBAAoB;;;;","names":[],"sources":["src/classes/CoreInstanceRegistry.ts"],"sourcesContent":["import type { SearchcraftCore } from '@classes';\n\n/**\n * This is the default instance id for searchcraft core instances.\n * When no id is specified in a component's props, use this one.\n */\nexport const DEFAULT_CORE_INSTANCE_ID = 'searchcraft';\n\n/**\n * CoreInstanceRegistry\n *\n * This class is responsible for managing all of the instances of SearchcraftCore on a page.\n * It provides a means for consuming components to use the instance of SearchcraftCore that\n * they need to use when that instance of core gets added to the Registry.\n */\nclass CoreInstanceRegistry {\n private coreInstances: Record<string, SearchcraftCore> = {};\n private subscriptions: Record<string, ((core: SearchcraftCore) => void)[]> =\n {};\n\n /**\n * Adds a SearchcraftCore instance to the Registry.\n *\n * When the instance is added, iterates through the onAvailable callbacks\n * that have been subscribed via useCoreInstance.\n *\n * @param coreInstance The SearchcraftCore instance to add to the registry\n * @param searchcraftId The unique identifier for this SearchcraftCore instance.\n */\n addCoreInstance(\n coreInstance: SearchcraftCore,\n searchcraftId: string | undefined,\n ) {\n const id = searchcraftId || DEFAULT_CORE_INSTANCE_ID;\n this.coreInstances[id] = coreInstance;\n\n for (const callback of this.subscriptions[id] || []) {\n callback(coreInstance);\n }\n }\n\n /**\n * Use the specified instance of SearchcraftCore. When the instance becomes available,\n * the onAvailable callback will be called.\n *\n * @param searchcraftId The SearchcraftCore instance to use.\n * @param onAvailable The callback that gets called when the core instance becomes available.\n */\n useCoreInstance(\n searchcraftId: string | undefined,\n onAvailable: (coreInstance: SearchcraftCore) => void,\n ): () => void {\n const id = searchcraftId || DEFAULT_CORE_INSTANCE_ID;\n // If the core instance already is available, call the onAvailable callback immediately.\n if (this.coreInstances[id]) {\n onAvailable(this.coreInstances[id]);\n return () => {};\n }\n // Add the callback to the collection of callbacks for this searchcraft instance.\n if (!this.subscriptions[id]) {\n this.subscriptions[id] = [];\n }\n this.subscriptions[id].push(onAvailable);\n\n return () => {\n if (this.subscriptions[id]) {\n this.subscriptions[id] = this.subscriptions[id].filter(\n (cb) => cb !== onAvailable,\n );\n }\n };\n }\n}\n\nexport const registry = new CoreInstanceRegistry();\n"],"version":3}
|
|
@@ -1 +0,0 @@
|
|
|
1
|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A2B,EAAE;gBAC7C,kCAAkC,EAAE,IAAI,CAAC,QAAQ;aAClD,CAAC,EAAA,EAEF,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACE,CAAA,CAAA,GAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAG,KAAK,EAAC,iCAAiC,IAAE,IAAI,CAAC,KAAK,CAAK,EAC1D,IAAI,CAAC,QAAQ,KACZ,0DAAG,KAAK,EAAC,qCAAqC,EAAA,EAAE,IAAI,CAAC,QAAQ,CAAK,CACnE,CACG,EACN,CAAA,CAAA,QAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAC,sCAAsC,EAC5C,OAAO,EAAE,IAAI,CAAC,YAAY,EAC1B,IAAI,EAAC,QAAQ,EAAA,EAEb,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,kCAAkC,GAAG,CACzC,CACL;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/searchcraft-toggle-button/searchcraft-toggle-button.tsx"],"sourcesContent":["import type { SearchcraftCore } from '@classes';\nimport { registry } from '@classes/CoreInstanceRegistry';\nimport {\n Component,\n Event,\n type EventEmitter,\n Prop,\n State,\n h,\n} from '@stencil/core';\nimport classNames from 'classnames';\n\n/**\n * This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.\n *\n * @internal\n */\n@Component({\n tag: 'searchcraft-toggle-button',\n shadow: false,\n})\nexport class SearchcraftToggleButton {\n /**\n * The label.\n */\n @Prop() label = 'Toggle';\n /**\n * The secondary label displayed below the main label.\n */\n @Prop() subLabel: string | undefined;\n /**\n * The id of the Searchcraft instance that this component should use.\n */\n @Prop() searchcraftId?: string;\n\n /**\n * When the toggle element is changed.\n */\n @Event() toggleUpdated?: EventEmitter<boolean>;\n\n @State() isActive = false;\n @State() lastSearchTerm: string | undefined;\n private unsubscribe: (() => void) | undefined;\n private cleanupCore?: () => void;\n\n private handleToggle = async () => {\n this.isActive = !this.isActive;\n this.toggleUpdated?.emit(this.isActive);\n };\n\n onCoreAvailable(core: SearchcraftCore) {\n /** When the query changes, sets toggle button state back to inactive. */\n this.unsubscribe = core.store.subscribe((state) => {\n if (\n state.searchTerm !== this.lastSearchTerm &&\n state.searchTerm.trim().length === 0\n ) {\n this.isActive = false;\n }\n this.lastSearchTerm = state.searchTerm;\n });\n }\n\n connectedCallback() {\n this.cleanupCore = registry.useCoreInstance(\n this.searchcraftId,\n this.onCoreAvailable.bind(this),\n );\n }\n\n disconnectedCallback() {\n this.unsubscribe?.();\n this.cleanupCore?.();\n }\n\n render() {\n return (\n <div\n class={classNames('searchcraft-toggle-button', {\n 'searchcraft-toggle-button-active': this.isActive,\n })}\n >\n <div>\n <p class='searchcraft-toggle-button-label'>{this.label}</p>\n {this.subLabel && (\n <p class='searchcraft-toggle-button-sub-label'>{this.subLabel}</p>\n )}\n </div>\n <button\n class='searchcraft-toggle-button-background'\n onClick={this.handleToggle}\n type='button'\n >\n <div class='searchcraft-toggle-button-handle' />\n </button>\n </div>\n );\n }\n}\n"],"version":3}
|