@searchcraft/javascript-sdk 0.1.4 → 0.1.6

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.
Files changed (131) hide show
  1. package/dist/cjs/{index-e7bd239c.js → index-7b49313c.js} +5 -2
  2. package/dist/cjs/index-7b49313c.js.map +1 -0
  3. package/dist/cjs/index.cjs.js +1 -1
  4. package/dist/cjs/loader.cjs.js +2 -2
  5. package/dist/cjs/searchcraft-auto-search-form_13.cjs.entry.js +62 -28
  6. package/dist/cjs/searchcraft-auto-search-form_13.cjs.entry.js.map +1 -1
  7. package/dist/cjs/searchcraft-base-search-form.cjs.entry.js +2 -2
  8. package/dist/cjs/searchcraft-button-icon.cjs.entry.js +1 -1
  9. package/dist/cjs/searchcraft-button.cjs.entry.js +2 -2
  10. package/dist/cjs/searchcraft-javascript-sdk.cjs.js +2 -2
  11. package/dist/cjs/{store-ab3978ce.js → store-3d577aac.js} +2 -2
  12. package/dist/cjs/{store-ab3978ce.js.map → store-3d577aac.js.map} +1 -1
  13. package/dist/collection/assets/searchcraft-search-icon-set.js +44 -5
  14. package/dist/collection/assets/searchcraft-search-icon-set.js.map +1 -1
  15. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js +49 -4
  16. package/dist/collection/components/searchcraft-auto-search-form/searchcraft-auto-search-form.js.map +1 -1
  17. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js +2 -3
  18. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.js.map +1 -1
  19. package/dist/collection/components/searchcraft-base-search-result/searchcraft-base-search-result.module.css +2 -2
  20. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js +61 -6
  21. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.js.map +1 -1
  22. package/dist/collection/components/searchcraft-base-search-results/searchcraft-base-search-results.module.css +16 -0
  23. package/dist/collection/components/searchcraft-button/searchcraft-button.js +1 -1
  24. package/dist/collection/components/searchcraft-error-message/searchcraft-error-message.js +1 -1
  25. package/dist/collection/components/searchcraft-input/searchcraft-input.js +60 -3
  26. package/dist/collection/components/searchcraft-input/searchcraft-input.js.map +1 -1
  27. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js +41 -3
  28. package/dist/collection/components/searchcraft-input-icon/searchcraft-input-icon.js.map +1 -1
  29. package/dist/collection/components/searchcraft-spinner-dark/searchcraft-spinner-dark.js +1 -1
  30. package/dist/collection/components/searchcraft-spinner-light/searchcraft-spinner-light.js +1 -1
  31. package/dist/collection/provider/store.js +1 -1
  32. package/dist/collection/provider/store.js.map +1 -1
  33. package/dist/components/index.js +2 -2
  34. package/dist/components/{p-4f201f41.js → p-04409bad.js} +5 -6
  35. package/dist/components/p-04409bad.js.map +1 -0
  36. package/dist/components/{p-16a533e3.js → p-04bad430.js} +3 -3
  37. package/dist/components/{p-16a533e3.js.map → p-04bad430.js.map} +1 -1
  38. package/dist/components/{p-2cc8c074.js → p-07fba086.js} +5 -5
  39. package/dist/components/{p-2cc8c074.js.map → p-07fba086.js.map} +1 -1
  40. package/dist/components/{p-4244171c.js → p-350c8005.js} +18 -12
  41. package/dist/components/p-350c8005.js.map +1 -0
  42. package/dist/components/{p-a7ab9d65.js → p-3b07b0dc.js} +8 -4
  43. package/dist/components/p-3b07b0dc.js.map +1 -0
  44. package/dist/components/{p-f83f2b59.js → p-3ea9ba3a.js} +4 -4
  45. package/dist/components/{p-f83f2b59.js.map → p-3ea9ba3a.js.map} +1 -1
  46. package/dist/components/{p-e8e40447.js → p-781a9a8c.js} +3 -3
  47. package/dist/components/{p-e8e40447.js.map → p-781a9a8c.js.map} +1 -1
  48. package/dist/components/{p-199065b5.js → p-85d96d9b.js} +2 -2
  49. package/dist/components/{p-199065b5.js.map → p-85d96d9b.js.map} +1 -1
  50. package/dist/components/{p-36c95064.js → p-9c617862.js} +2 -2
  51. package/dist/components/{p-36c95064.js.map → p-9c617862.js.map} +1 -1
  52. package/dist/components/{p-155f7a59.js → p-a3ea7edc.js} +2 -2
  53. package/dist/components/{p-155f7a59.js.map → p-a3ea7edc.js.map} +1 -1
  54. package/dist/components/{p-c69651f6.js → p-af65953e.js} +5 -2
  55. package/dist/components/p-af65953e.js.map +1 -0
  56. package/dist/components/{p-0c25e95d.js → p-c14731ca.js} +3 -3
  57. package/dist/components/{p-0c25e95d.js.map → p-c14731ca.js.map} +1 -1
  58. package/dist/components/p-d33fdd81.js +49 -0
  59. package/dist/components/p-d33fdd81.js.map +1 -0
  60. package/dist/components/{p-9283a3c2.js → p-d73bc01d.js} +2 -2
  61. package/dist/components/{p-9283a3c2.js.map → p-d73bc01d.js.map} +1 -1
  62. package/dist/components/searchcraft-auto-search-form.js +27 -16
  63. package/dist/components/searchcraft-auto-search-form.js.map +1 -1
  64. package/dist/components/searchcraft-base-search-form.js +13 -13
  65. package/dist/components/searchcraft-base-search-result.js +1 -1
  66. package/dist/components/searchcraft-base-search-results.js +32 -11
  67. package/dist/components/searchcraft-base-search-results.js.map +1 -1
  68. package/dist/components/searchcraft-button-icon.js +1 -1
  69. package/dist/components/searchcraft-button.js +1 -1
  70. package/dist/components/searchcraft-clear-icon-set.js +1 -1
  71. package/dist/components/searchcraft-clear-input-button.js +1 -1
  72. package/dist/components/searchcraft-error-message.js +1 -1
  73. package/dist/components/searchcraft-input-caption.js +1 -1
  74. package/dist/components/searchcraft-input-icon.js +1 -1
  75. package/dist/components/searchcraft-input-label.js +1 -1
  76. package/dist/components/searchcraft-input.js +1 -1
  77. package/dist/components/searchcraft-search-icon-set.js +1 -1
  78. package/dist/components/searchcraft-spinner-dark.js +1 -1
  79. package/dist/components/searchcraft-spinner-light.js +1 -1
  80. package/dist/esm/{index-0d9f850d.js → index-e4a4f86d.js} +5 -2
  81. package/dist/esm/index-e4a4f86d.js.map +1 -0
  82. package/dist/esm/index.js +1 -1
  83. package/dist/esm/loader.js +3 -3
  84. package/dist/esm/searchcraft-auto-search-form_13.entry.js +62 -28
  85. package/dist/esm/searchcraft-auto-search-form_13.entry.js.map +1 -1
  86. package/dist/esm/searchcraft-base-search-form.entry.js +2 -2
  87. package/dist/esm/searchcraft-button-icon.entry.js +1 -1
  88. package/dist/esm/searchcraft-button.entry.js +2 -2
  89. package/dist/esm/searchcraft-javascript-sdk.js +3 -3
  90. package/dist/esm/{store-e55b12aa.js → store-03dc618f.js} +2 -2
  91. package/dist/esm/{store-e55b12aa.js.map → store-03dc618f.js.map} +1 -1
  92. package/dist/searchcraft-javascript-sdk/index.esm.js +1 -1
  93. package/dist/searchcraft-javascript-sdk/p-130b0a12.entry.js +2 -0
  94. package/dist/searchcraft-javascript-sdk/p-130b0a12.entry.js.map +1 -0
  95. package/dist/searchcraft-javascript-sdk/{p-40791ead.entry.js → p-6a17384e.entry.js} +2 -2
  96. package/dist/searchcraft-javascript-sdk/{p-04e2f067.entry.js → p-6c825f8c.entry.js} +2 -2
  97. package/dist/searchcraft-javascript-sdk/{p-4d18a44a.entry.js → p-98eab6f9.entry.js} +2 -2
  98. package/dist/searchcraft-javascript-sdk/{p-36c95064.js → p-9c617862.js} +2 -2
  99. package/dist/searchcraft-javascript-sdk/{p-36c95064.js.map → p-9c617862.js.map} +1 -1
  100. package/dist/searchcraft-javascript-sdk/p-e6f6972c.js +3 -0
  101. package/dist/searchcraft-javascript-sdk/p-e6f6972c.js.map +1 -0
  102. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js +1 -1
  103. package/dist/searchcraft-javascript-sdk/searchcraft-javascript-sdk.esm.js.map +1 -1
  104. package/dist/types/assets/searchcraft-search-icon-set.d.ts +3 -1
  105. package/dist/types/components/searchcraft-auto-search-form/searchcraft-auto-search-form.d.ts +5 -0
  106. package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +9 -0
  107. package/dist/types/components/searchcraft-input/searchcraft-input.d.ts +3 -0
  108. package/dist/types/components/searchcraft-input-icon/searchcraft-input-icon.d.ts +8 -0
  109. package/dist/types/components.d.ts +48 -2
  110. package/package.json +1 -1
  111. package/dist/cjs/index-e7bd239c.js.map +0 -1
  112. package/dist/components/p-04e7305e.js +0 -44
  113. package/dist/components/p-04e7305e.js.map +0 -1
  114. package/dist/components/p-4244171c.js.map +0 -1
  115. package/dist/components/p-4f201f41.js.map +0 -1
  116. package/dist/components/p-a7ab9d65.js.map +0 -1
  117. package/dist/components/p-c69651f6.js.map +0 -1
  118. package/dist/esm/index-0d9f850d.js.map +0 -1
  119. package/dist/loader/cdn.js +0 -1
  120. package/dist/loader/index.cjs.js +0 -1
  121. package/dist/loader/index.d.ts +0 -24
  122. package/dist/loader/index.es2017.js +0 -1
  123. package/dist/loader/index.js +0 -2
  124. package/dist/loader/package.json +0 -11
  125. package/dist/searchcraft-javascript-sdk/p-09af71e8.entry.js +0 -2
  126. package/dist/searchcraft-javascript-sdk/p-09af71e8.entry.js.map +0 -1
  127. package/dist/searchcraft-javascript-sdk/p-329c3f66.js +0 -3
  128. package/dist/searchcraft-javascript-sdk/p-329c3f66.js.map +0 -1
  129. /package/dist/searchcraft-javascript-sdk/{p-40791ead.entry.js.map → p-6a17384e.entry.js.map} +0 -0
  130. /package/dist/searchcraft-javascript-sdk/{p-04e2f067.entry.js.map → p-6c825f8c.entry.js.map} +0 -0
  131. /package/dist/searchcraft-javascript-sdk/{p-4d18a44a.entry.js.map → p-98eab6f9.entry.js.map} +0 -0
@@ -1,16 +1,16 @@
1
- import { p as proxyCustomElement, H, c as createEvent, h } from './p-c69651f6.js';
2
- import { u as useSearchcraftStore, g } from './p-36c95064.js';
1
+ import { p as proxyCustomElement, H, c as createEvent, h } from './p-af65953e.js';
2
+ import { u as useSearchcraftStore, g } from './p-9c617862.js';
3
3
  import { p as parseCustomStyles } from './p-17c94ac1.js';
4
- import { d as defineCustomElement$b } from './p-155f7a59.js';
5
- import { d as defineCustomElement$a } from './p-2cc8c074.js';
6
- import { d as defineCustomElement$9 } from './p-0c25e95d.js';
7
- import { d as defineCustomElement$8 } from './p-4244171c.js';
8
- import { d as defineCustomElement$7 } from './p-199065b5.js';
9
- import { d as defineCustomElement$6 } from './p-a7ab9d65.js';
10
- import { d as defineCustomElement$5 } from './p-9283a3c2.js';
11
- import { d as defineCustomElement$4 } from './p-04e7305e.js';
12
- import { d as defineCustomElement$3 } from './p-16a533e3.js';
13
- import { d as defineCustomElement$2 } from './p-e8e40447.js';
4
+ import { d as defineCustomElement$b } from './p-a3ea7edc.js';
5
+ import { d as defineCustomElement$a } from './p-07fba086.js';
6
+ import { d as defineCustomElement$9 } from './p-c14731ca.js';
7
+ import { d as defineCustomElement$8 } from './p-350c8005.js';
8
+ import { d as defineCustomElement$7 } from './p-85d96d9b.js';
9
+ import { d as defineCustomElement$6 } from './p-3b07b0dc.js';
10
+ import { d as defineCustomElement$5 } from './p-d73bc01d.js';
11
+ import { d as defineCustomElement$4 } from './p-d33fdd81.js';
12
+ import { d as defineCustomElement$3 } from './p-04bad430.js';
13
+ import { d as defineCustomElement$2 } from './p-781a9a8c.js';
14
14
 
15
15
  const searchcraftAutoSearchFormModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.formLTR{text-align:left;width:100%}.formRTL{text-align:right;width:100%}.searchContainer{align-items:center;display:flex;width:100%}";
16
16
  const SearchcraftAutoSearchFormStyle0 = searchcraftAutoSearchFormModuleCss;
@@ -33,13 +33,11 @@ const SearchcraftAutoSearchForm$1 = /*@__PURE__*/ proxyCustomElement(class Searc
33
33
  }
34
34
  // Set a new debounce timeout
35
35
  this.debounceTimeout = setTimeout(() => {
36
- console.log('Debounced search triggered');
37
36
  this.runSearch();
38
37
  }, this.debounceDelay);
39
38
  };
40
39
  this.handleClearInput = () => {
41
40
  this.query = '';
42
- console.log('Input cleared');
43
41
  if (typeof this.clearInput === 'function') {
44
42
  this.clearInput();
45
43
  }
@@ -79,23 +77,33 @@ const SearchcraftAutoSearchForm$1 = /*@__PURE__*/ proxyCustomElement(class Searc
79
77
  };
80
78
  this.customStylesForInput = {};
81
79
  this.inputCaptionValue = '';
80
+ this.inputIconHeight = 20;
81
+ this.inputIconWidth = 20;
82
82
  this.labelForInput = '';
83
83
  this.placeholderValue = 'Search here';
84
84
  this.rightToLeftOrientation = false;
85
85
  this.searchContainerClass = '';
86
86
  this.error = false;
87
+ this.isRequesting = false;
87
88
  this.query = '';
88
89
  this.searchResults = '';
89
90
  }
90
91
  componentDidLoad() {
91
92
  const searchcraft = new g(this.config);
92
93
  this.searchStore.initialize(searchcraft, true);
93
- console.log('Component initialized');
94
+ this.unsubscribe = useSearchcraftStore.subscribe((state) => {
95
+ this.isRequesting = state.isRequesting;
96
+ });
97
+ }
98
+ disconnectedCallback() {
99
+ if (this.unsubscribe) {
100
+ this.unsubscribe();
101
+ }
94
102
  }
95
103
  render() {
96
104
  const formClass = this.rightToLeftOrientation ? 'formRTL' : 'formLTR';
97
105
  const parsedCustomStyles = parseCustomStyles(this.customStylesForInput);
98
- return (h("form", { key: '60978e813198af27c34232ebd1bda4ca4a6f5199', class: `${formClass}`, onSubmit: this.handleFormSubmit }, h("searchcraft-input-label", { key: '4418b675769d041c684f15afb2d9b919f765c133', label: this.labelForInput }), h("div", { key: '73581bf8fee7deee1bcf426f80493c78e92d8ada', class: 'searchContainer' }, h("searchcraft-input", { key: '6e90612f4fc8c773c9f98f5fcfffb303909d3c6f', customStyles: parsedCustomStyles, "input-caption-value": this.inputCaptionValue, onClearInput: this.handleClearInput, onSearchInputChange: this.handleInputChange, "placeholder-value": this.placeholderValue, query: this.query, "right-to-left-orientation": this.rightToLeftOrientation })), this.error && (h("searchcraft-error-message", { key: '1637aff0dcac83d975d9d53545e7fee26c41aa7f', errorMessage: 'Please enter a search query.' }))));
106
+ return (h("form", { key: '6b735bbdba6e7ff105d176fffa32b9431d5c4e49', class: `${formClass}`, onSubmit: this.handleFormSubmit }, h("searchcraft-input-label", { key: 'c7284dead137677ee7cd6aedac4dbfb38fac8c4c', label: this.labelForInput }), h("div", { key: 'a59294d9b406a1df9beb6264808f6e6a43cedbdd', class: 'searchContainer' }, h("searchcraft-input", { key: 'c1faa2d11c94ec3d4d39456612209e72fd208629', customStyles: parsedCustomStyles, "input-caption-value": this.inputCaptionValue, "is-requesting": this.isRequesting, "input-icon-height": this.inputIconHeight, "input-icon-width": this.inputIconWidth, onClearInput: this.handleClearInput, onSearchInputChange: this.handleInputChange, "placeholder-value": this.placeholderValue, query: this.query, "right-to-left-orientation": this.rightToLeftOrientation })), this.error && (h("searchcraft-error-message", { key: 'b8b1e5b4b212a30f07f3756c8ce33c142e520420', errorMessage: 'Please enter a search query.' }))));
99
107
  }
100
108
  static get style() { return SearchcraftAutoSearchFormStyle0; }
101
109
  }, [1, "searchcraft-auto-search-form", {
@@ -104,11 +112,14 @@ const SearchcraftAutoSearchForm$1 = /*@__PURE__*/ proxyCustomElement(class Searc
104
112
  "config": [16],
105
113
  "customStylesForInput": [1, "custom-styles-for-input"],
106
114
  "inputCaptionValue": [1, "input-caption-value"],
115
+ "inputIconHeight": [2, "input-icon-height"],
116
+ "inputIconWidth": [2, "input-icon-width"],
107
117
  "labelForInput": [1, "label-for-input"],
108
118
  "placeholderValue": [1, "placeholder-value"],
109
119
  "rightToLeftOrientation": [4, "right-to-left-orientation"],
110
120
  "searchContainerClass": [1, "search-container-class"],
111
121
  "error": [32],
122
+ "isRequesting": [32],
112
123
  "query": [32],
113
124
  "searchResults": [32]
114
125
  }]);
@@ -1 +1 @@
1
- {"file":"searchcraft-auto-search-form.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,kCAAkC,GAAG,uLAAuL,CAAC;AACnO,wCAAe,kCAAkC;;MCqBpCA,2BAAyB;;;;;;QAqB5B,oBAAe,GAAyC,IAAI,CAAC;QAC7D,kBAAa,GAAG,GAAG,CAAC;QACpB,gBAAW,GAAG,mBAAmB,CAAC,QAAQ,EAAE,CAAC;QAQrD,sBAAiB,GAAG,CAAC,KAAiC;YACpD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC;YAC1B,IAAI,CAAC,WAAW,CAA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,YAAY,EAAC,8BAA8B,GAAG,CAC1E,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SearchcraftAutoSearchForm","SearchcraftCore"],"sources":["src/components/searchcraft-auto-search-form/searchcraft-auto-search-form.module.scss?tag=searchcraft-auto-search-form&encapsulation=shadow","src/components/searchcraft-auto-search-form/searchcraft-auto-search-form.tsx"],"sourcesContent":[":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.formLTR {\n text-align: left;\n width: 100%;\n}\n\n.formRTL {\n text-align: right;\n width: 100%;\n}\n\n.searchContainer {\n align-items: center;\n display: flex;\n width: 100%;\n}","import {\n Component,\n Prop,\n State,\n Event,\n type EventEmitter,\n h,\n} from '@stencil/core';\nimport {\n type CoreConfigSDK,\n CoreSDK as SearchcraftCore,\n} from '@searchcraft/core';\n\nimport type { ScInputCustomEvent } from '@components/searchcraft-input/searchcraft-input';\nimport { parseCustomStyles } from '@utils/utils';\nimport { useSearchcraftStore } from '@provider/store';\n\n@Component({\n tag: 'searchcraft-auto-search-form',\n styleUrl: 'searchcraft-auto-search-form.module.scss',\n shadow: true,\n})\nexport class SearchcraftAutoSearchForm {\n @Prop() autoSearchFormClass = '';\n @Prop() clearInput: () => void = () => {};\n @Prop() config: CoreConfigSDK = {\n apiKey: '',\n endpointURL: '',\n index: [],\n };\n @Prop() customStylesForInput: string | Record<string, string> = {};\n @Prop() inputCaptionValue = '';\n @Prop() labelForInput = '';\n @Prop() placeholderValue = 'Search here';\n @Prop() rightToLeftOrientation = false;\n @Prop() searchContainerClass = '';\n\n @Event() querySubmit: EventEmitter<string>;\n\n @State() error = false;\n @State() query = '';\n @State() searchResults = '';\n\n private debounceTimeout: ReturnType<typeof setTimeout> | null = null;\n private debounceDelay = 300; // 300ms debounce delay\n private searchStore = useSearchcraftStore.getState();\n\n componentDidLoad() {\n const searchcraft = new SearchcraftCore(this.config);\n this.searchStore.initialize(searchcraft, true);\n console.log('Component initialized');\n }\n\n handleInputChange = (event: ScInputCustomEvent<string>) => {\n this.query = event.detail;\n this.querySubmit.emit(this.query);\n\n // Clear the previous debounce timeout\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout);\n }\n\n // Set a new debounce timeout\n this.debounceTimeout = setTimeout(() => {\n console.log('Debounced search triggered');\n this.runSearch();\n }, this.debounceDelay);\n };\n\n handleClearInput = () => {\n this.query = '';\n console.log('Input cleared');\n\n if (typeof this.clearInput === 'function') {\n this.clearInput();\n }\n\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout);\n }\n\n this.error = false;\n this.searchResults = '';\n };\n\n private runSearch = async () => {\n if (this.query.trim() === '') {\n this.error = true;\n this.searchResults = '';\n } else {\n this.error = false;\n this.searchStore.setQuery(this.query);\n\n try {\n await this.searchStore.search();\n this.searchResults = JSON.stringify(this.searchStore.searchResults);\n } catch (error) {\n this.error = true;\n }\n }\n };\n\n handleFormSubmit = async (event: Event) => {\n event.preventDefault();\n await this.runSearch();\n };\n\n render() {\n const formClass = this.rightToLeftOrientation ? 'formRTL' : 'formLTR';\n const parsedCustomStyles = parseCustomStyles(this.customStylesForInput);\n return (\n <form class={`${formClass}`} onSubmit={this.handleFormSubmit}>\n <searchcraft-input-label label={this.labelForInput} />\n <div class='searchContainer'>\n <searchcraft-input\n customStyles={parsedCustomStyles}\n input-caption-value={this.inputCaptionValue}\n onClearInput={this.handleClearInput}\n onSearchInputChange={this.handleInputChange}\n placeholder-value={this.placeholderValue}\n query={this.query}\n right-to-left-orientation={this.rightToLeftOrientation}\n />\n </div>\n {this.error && (\n <searchcraft-error-message errorMessage='Please enter a search query.' />\n )}\n </form>\n );\n }\n}\n"],"version":3}
1
+ {"file":"searchcraft-auto-search-form.js","mappings":";;;;;;;;;;;;;;AAAA,MAAM,kCAAkC,GAAG,uLAAuL,CAAC;AACnO,wCAAe,kCAAkC;;MCqBpCA,2BAAy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,gBAAgB,IAC1D,gFAAyB,KAAK,EAAE,IAAI,CAAC,aAAa,GAAI,EACtD,4DAAK,KAAK,EAAC,iBAAiB,IAC1B,0EACE,YAAY,EAAE,kBAAkB,yBACX,IAAI,CAAC,iBAAiB,mBAC5B,IAAI,CAAC,YAAY,uBACb,IAAI,CAAC,eAAe,sBACrB,IAAI,CAAC,cAAc,EACrC,YAAY,EAAE,IAAI,CAAC,gBAAgB,EACnC,mBAAmB,EAAE,IAAI,CAAC,iBAAiB,uBACxB,IAAI,CAAC,gBAAgB,EACxC,KAAK,EAAE,IAAI,CAAC,KAAK,+BACU,IAAI,CAAC,sBAAsB,GACtD,CACE,EACL,IAAI,CAAC,KAAK,KACT,kFAA2B,YAAY,EAAC,8BAA8B,GAAG,CAC1E,CACI,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SearchcraftAutoSearchForm","SearchcraftCore"],"sources":["src/components/searchcraft-auto-search-form/searchcraft-auto-search-form.module.scss?tag=searchcraft-auto-search-form&encapsulation=shadow","src/components/searchcraft-auto-search-form/searchcraft-auto-search-form.tsx"],"sourcesContent":[":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.formLTR {\n text-align: left;\n width: 100%;\n}\n\n.formRTL {\n text-align: right;\n width: 100%;\n}\n\n.searchContainer {\n align-items: center;\n display: flex;\n width: 100%;\n}","import {\n Component,\n Prop,\n State,\n Event,\n type EventEmitter,\n h,\n} from '@stencil/core';\nimport {\n type CoreConfigSDK,\n CoreSDK as SearchcraftCore,\n} from '@searchcraft/core';\n\nimport type { ScInputCustomEvent } from '@components/searchcraft-input/searchcraft-input';\nimport { parseCustomStyles } from '@utils/utils';\nimport { useSearchcraftStore } from '@provider/store';\n\n@Component({\n tag: 'searchcraft-auto-search-form',\n styleUrl: 'searchcraft-auto-search-form.module.scss',\n shadow: true,\n})\nexport class SearchcraftAutoSearchForm {\n @Prop() autoSearchFormClass = '';\n @Prop() clearInput: () => void = () => {};\n @Prop() config: CoreConfigSDK = {\n apiKey: '',\n endpointURL: '',\n index: [],\n };\n @Prop() customStylesForInput: string | Record<string, string> = {};\n @Prop() inputCaptionValue = '';\n @Prop() inputIconHeight = 20;\n @Prop() inputIconWidth = 20;\n @Prop() labelForInput = '';\n @Prop() placeholderValue = 'Search here';\n @Prop() rightToLeftOrientation = false;\n @Prop() searchContainerClass = '';\n\n @Event() querySubmit: EventEmitter<string>;\n\n @State() error = false;\n @State() isRequesting = false;\n @State() query = '';\n @State() searchResults = '';\n\n private debounceTimeout: ReturnType<typeof setTimeout> | null = null;\n private debounceDelay = 300; // 300ms debounce delay\n private searchStore = useSearchcraftStore.getState();\n unsubscribe: () => void;\n\n componentDidLoad() {\n const searchcraft = new SearchcraftCore(this.config);\n this.searchStore.initialize(searchcraft, true);\n\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n this.isRequesting = state.isRequesting;\n });\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n handleInputChange = (event: ScInputCustomEvent<string>) => {\n this.query = event.detail;\n this.querySubmit.emit(this.query);\n\n // Clear the previous debounce timeout\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout);\n }\n\n // Set a new debounce timeout\n this.debounceTimeout = setTimeout(() => {\n this.runSearch();\n }, this.debounceDelay);\n };\n\n handleClearInput = () => {\n this.query = '';\n\n if (typeof this.clearInput === 'function') {\n this.clearInput();\n }\n\n if (this.debounceTimeout) {\n clearTimeout(this.debounceTimeout);\n }\n\n this.error = false;\n this.searchResults = '';\n };\n\n private runSearch = async () => {\n if (this.query.trim() === '') {\n this.error = true;\n this.searchResults = '';\n } else {\n this.error = false;\n this.searchStore.setQuery(this.query);\n\n try {\n await this.searchStore.search();\n this.searchResults = JSON.stringify(this.searchStore.searchResults);\n } catch (error) {\n this.error = true;\n }\n }\n };\n\n handleFormSubmit = async (event: Event) => {\n event.preventDefault();\n await this.runSearch();\n };\n\n render() {\n const formClass = this.rightToLeftOrientation ? 'formRTL' : 'formLTR';\n const parsedCustomStyles = parseCustomStyles(this.customStylesForInput);\n return (\n <form class={`${formClass}`} onSubmit={this.handleFormSubmit}>\n <searchcraft-input-label label={this.labelForInput} />\n <div class='searchContainer'>\n <searchcraft-input\n customStyles={parsedCustomStyles}\n input-caption-value={this.inputCaptionValue}\n is-requesting={this.isRequesting}\n input-icon-height={this.inputIconHeight}\n input-icon-width={this.inputIconWidth}\n onClearInput={this.handleClearInput}\n onSearchInputChange={this.handleInputChange}\n placeholder-value={this.placeholderValue}\n query={this.query}\n right-to-left-orientation={this.rightToLeftOrientation}\n />\n </div>\n {this.error && (\n <searchcraft-error-message errorMessage='Please enter a search query.' />\n )}\n </form>\n );\n }\n}\n"],"version":3}
@@ -1,16 +1,16 @@
1
- import { p as proxyCustomElement, H, c as createEvent, h } from './p-c69651f6.js';
2
- import { u as useSearchcraftStore, a as useThemeStore, g } from './p-36c95064.js';
3
- import { d as defineCustomElement$c } from './p-f83f2b59.js';
4
- import { d as defineCustomElement$b } from './p-155f7a59.js';
5
- import { d as defineCustomElement$a } from './p-2cc8c074.js';
6
- import { d as defineCustomElement$9 } from './p-0c25e95d.js';
7
- import { d as defineCustomElement$8 } from './p-4244171c.js';
8
- import { d as defineCustomElement$7 } from './p-199065b5.js';
9
- import { d as defineCustomElement$6 } from './p-a7ab9d65.js';
10
- import { d as defineCustomElement$5 } from './p-9283a3c2.js';
11
- import { d as defineCustomElement$4 } from './p-04e7305e.js';
12
- import { d as defineCustomElement$3 } from './p-16a533e3.js';
13
- import { d as defineCustomElement$2 } from './p-e8e40447.js';
1
+ import { p as proxyCustomElement, H, c as createEvent, h } from './p-af65953e.js';
2
+ import { u as useSearchcraftStore, a as useThemeStore, g } from './p-9c617862.js';
3
+ import { d as defineCustomElement$c } from './p-3ea9ba3a.js';
4
+ import { d as defineCustomElement$b } from './p-a3ea7edc.js';
5
+ import { d as defineCustomElement$a } from './p-07fba086.js';
6
+ import { d as defineCustomElement$9 } from './p-c14731ca.js';
7
+ import { d as defineCustomElement$8 } from './p-350c8005.js';
8
+ import { d as defineCustomElement$7 } from './p-85d96d9b.js';
9
+ import { d as defineCustomElement$6 } from './p-3b07b0dc.js';
10
+ import { d as defineCustomElement$5 } from './p-d73bc01d.js';
11
+ import { d as defineCustomElement$4 } from './p-d33fdd81.js';
12
+ import { d as defineCustomElement$3 } from './p-04bad430.js';
13
+ import { d as defineCustomElement$2 } from './p-781a9a8c.js';
14
14
 
15
15
  const searchcraftBaseSearchFormModuleCss = ".formLTR{font-family:Helvetica, Arial, sans-serif;text-align:left}.formRTL{font-family:Helvetica, Arial, sans-serif;text-align:right}.searchContainer{align-items:center;display:flex}";
16
16
  const SearchcraftBaseSearchFormStyle0 = searchcraftBaseSearchFormModuleCss;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftBaseSearchResult$1, d as defineCustomElement$1 } from './p-4f201f41.js';
1
+ import { S as SearchcraftBaseSearchResult$1, d as defineCustomElement$1 } from './p-04409bad.js';
2
2
 
3
3
  const SearchcraftBaseSearchResult = SearchcraftBaseSearchResult$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,10 +1,10 @@
1
- import { p as proxyCustomElement, H, h } from './p-c69651f6.js';
2
- import { u as useSearchcraftStore } from './p-36c95064.js';
1
+ import { p as proxyCustomElement, H, h } from './p-af65953e.js';
2
+ import { u as useSearchcraftStore } from './p-9c617862.js';
3
3
  import { a as parseSearchKeys, s as serializeStyles, e as extractDynamicProperties } from './p-17c94ac1.js';
4
- import { d as defineCustomElement$3 } from './p-4f201f41.js';
5
- import { d as defineCustomElement$2 } from './p-0c25e95d.js';
4
+ import { d as defineCustomElement$3 } from './p-04409bad.js';
5
+ import { d as defineCustomElement$2 } from './p-c14731ca.js';
6
6
 
7
- const searchcraftBaseSearchResultsModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.resultsContainer{display:flex;flex-direction:column;justify-content:center;margin:100px 20px}.resultsContainer>p{align-self:center}.resultsContainer>div{margin-bottom:20px}.resultsContainer>div img{height:300px;width:200px}";
7
+ const searchcraftBaseSearchResultsModuleCss = ":root{--font-stack:Helvetica, Arial, sans-serif}.resultsContainer{display:flex;flex-direction:column;justify-content:center;margin:100px 20px}.resultsContainer>p{align-self:center}.resultsContainer>div{margin-bottom:20px}.resultsContainer>div img{height:300px;width:200px}.adSection{align-items:center;border:1px solid #DCDDDE;display:flex;flex-direction:column;font-size:16px;justify-content:center;margin:auto;min-height:150px;text-align:center;width:100%}.adSection p{margin-top:5px}";
8
8
  const SearchcraftBaseSearchResultsStyle0 = searchcraftBaseSearchResultsModuleCss;
9
9
 
10
10
  const SearchcraftBaseSearchResults$1 = /*@__PURE__*/ proxyCustomElement(class SearchcraftBaseSearchResults extends H {
@@ -16,6 +16,8 @@ const SearchcraftBaseSearchResults$1 = /*@__PURE__*/ proxyCustomElement(class Se
16
16
  this.searchResults = null;
17
17
  this.searchKeys = '';
18
18
  this.customStylesForResults = {};
19
+ this.placeAdAtEnd = false;
20
+ this.adInterval = 4;
19
21
  }
20
22
  componentDidLoad() {
21
23
  if (!this.searchKeys || this.searchKeys.length === 0) {
@@ -45,18 +47,37 @@ const SearchcraftBaseSearchResults$1 = /*@__PURE__*/ proxyCustomElement(class Se
45
47
  const serializedStyles = typeof this.customStylesForResults === 'string'
46
48
  ? this.customStylesForResults
47
49
  : serializeStyles(this.customStylesForResults);
48
- return (h("div", { class: 'resultsContainer' }, (_d = (_c = (_b = this.searchResults) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.hits) === null || _d === void 0 ? void 0 :
49
- _d.map((document, index) => {
50
- const { doc: result } = document;
51
- const dynamicProperties = extractDynamicProperties(result, parsedSearchKeys);
52
- return (h("searchcraft-base-search-result", { key: `${dynamicProperties.id}-${index}`, "button-callback": () => console.log('button callback'), "result-callback": () => console.log('interactive element'), "keydown-callback": () => console.log('keydown'), "is-interactive": true, "heading-text": dynamicProperties[parsedSearchKeys[0]], "subheading-text": dynamicProperties[parsedSearchKeys[1]], "primary-content": dynamicProperties[parsedSearchKeys[2]], "secondary-content": dynamicProperties[parsedSearchKeys[3]], "tertiary-content": dynamicProperties[parsedSearchKeys[4]], "image-source": dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]], "custom-styles": serializedStyles }));
53
- }), this.query.length > 0 &&
50
+ const resultsComponents = (_d = (_c = (_b = this.searchResults) === null || _b === void 0 ? void 0 : _b.data) === null || _c === void 0 ? void 0 : _c.hits) === null || _d === void 0 ? void 0 : _d.map((document, index) => {
51
+ const { doc: result } = document;
52
+ const dynamicProperties = extractDynamicProperties(result, parsedSearchKeys);
53
+ return (h("searchcraft-base-search-result", { key: `${document.document_id}-${index}`, "button-callback": () => console.log('button callback'), "result-callback": () => console.log('interactive element'), "keydown-callback": () => console.log('keydown'), "is-interactive": true, "heading-text": dynamicProperties[parsedSearchKeys[0]], "subheading-text": dynamicProperties[parsedSearchKeys[1]], "primary-content": dynamicProperties[parsedSearchKeys[2]], "secondary-content": dynamicProperties[parsedSearchKeys[3]], "tertiary-content": dynamicProperties[parsedSearchKeys[4]], "image-source": dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]], "custom-styles": serializedStyles }));
54
+ });
55
+ const finalComponents = [];
56
+ // Add ads at specified intervals
57
+ if (this.adInterval > 0) {
58
+ resultsComponents.forEach((component, index) => {
59
+ finalComponents.push(component);
60
+ if ((index + 1) % this.adInterval === 0) {
61
+ finalComponents.push(h("div", { key: `ad-section-${index + 1}`, class: 'adSection' }, h("span", null, "##"), h("p", null, " Ad Impressions")));
62
+ }
63
+ });
64
+ }
65
+ else {
66
+ finalComponents.push(...resultsComponents);
67
+ }
68
+ // Add ad at the end if specified
69
+ if (this.placeAdAtEnd) {
70
+ finalComponents.push(h("div", { key: 'ad-section-end', class: 'adSection' }, h("span", null, "##"), h("p", null, " Ad Impressions")));
71
+ }
72
+ return (h("div", { class: 'resultsContainer' }, finalComponents, this.query.length > 0 &&
54
73
  ((_g = (_f = (_e = this.searchResults) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f.hits) === null || _g === void 0 ? void 0 : _g.length) === 0 && (h("searchcraft-error-message", { "error-message": `No search results found for "${this.query}" query` }))));
55
74
  }
56
75
  static get style() { return SearchcraftBaseSearchResultsStyle0; }
57
76
  }, [1, "searchcraft-base-search-results", {
58
77
  "searchKeys": [1, "search-keys"],
59
78
  "customStylesForResults": [1, "custom-styles-for-results"],
79
+ "placeAdAtEnd": [4, "place-ad-at-end"],
80
+ "adInterval": [2, "ad-interval"],
60
81
  "query": [32],
61
82
  "searchResults": [32]
62
83
  }]);
@@ -1 +1 @@
1
- {"file":"searchcraft-base-search-results.js","mappings":";;;;;;AAAA,MAAM,qCAAqC,GAAG,kRAAkR,CAAC;AACjU,2CAAe,qCAAqC;;MCcvCA,8BAA4B;;;;;qBACtB,EAAE;6BACkC,IAAI;0BAMpC,EAAE;sCAOsB,EAAE;;IAI/C,gBAAgB;QACd,IAAI,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YACpD,OAAO,CAAC,IAAI,CAAC,iDAAiD,CAAC,CAAC;YAChE,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;SACtB;QAED,IAAI,CAAC,WAAW,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC,KAAK;YACrD,IAAI,CAAC,aAAa,qBAAQ,KAAK,CAAC,aAAa,CAAE,CAAC;YAChD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;SAC1B,CAAC,CAAC;QAEH,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,mBAAmB,CAAC,QAAQ,EAAE,CAAC;QAChE,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;KACp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AAiB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,kBAEtD,iBAAiB,CAAC,gBAAgB,CAAC,gBAAgB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,mBAEnD,gBAAgB,GAC/B,EACF;aACH,CAAC,EACD,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YACpB,CAAA,MAAA,MAAA,MAAA,IAAI,CAAC,aAAa,0CAAE,IAAI,0CAAE,IAAI,0CAAE,MAAM,MAAK,CAAC,KAC1C,kDACiB,gCAAgC,IAAI,CAAC,KAAK,SAAS,GAClE,CACH,CACC,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SearchcraftBaseSearchResults"],"sources":["src/components/searchcraft-base-search-results/searchcraft-base-search-results.module.scss?tag=searchcraft-base-search-results&encapsulation=shadow","src/components/searchcraft-base-search-results/searchcraft-base-search-results.tsx"],"sourcesContent":[":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.resultsContainer {\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin: 100px 20px;\n\n & > p {\n align-self: center;\n }\n\n & > div {\n margin-bottom: 20px;\n img {\n height: 300px;\n width: 200px;\n }\n }\n}\n","import { Component, h, Prop, State } from '@stencil/core';\nimport type { SearchcraftResponse } from '@searchcraft/core';\n\nimport { useSearchcraftStore } from '@provider/store';\nimport {\n extractDynamicProperties,\n parseSearchKeys,\n serializeStyles,\n} from '@utils/utils';\n\n@Component({\n tag: 'searchcraft-base-search-results',\n styleUrl: 'searchcraft-base-search-results.module.scss',\n shadow: true,\n})\nexport class SearchcraftBaseSearchResults {\n @State() query = '';\n @State() searchResults: SearchcraftResponse | null = null;\n\n /**\n * Array of keys to dynamically extract properties from each document.\n * Must be explicitly set by the parent component.\n */\n @Prop() searchKeys = '';\n /**\n * Custom styles to apply to search results.\n * Expected format: JSON string, e.g., '{\"borderRadius\": \"10px\", \"padding\": \"16px\"}'\n */\n @Prop() customStylesForResults:\n | string\n | Record<string, Record<string, string>> = {};\n\n private unsubscribe: () => void;\n\n componentDidLoad() {\n if (!this.searchKeys || this.searchKeys.length === 0) {\n console.warn('No searchKeys provided; using empty keys array.');\n this.searchKeys = '';\n }\n\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n this.searchResults = { ...state.searchResults };\n this.query = state.query;\n });\n\n const { searchResults, query } = useSearchcraftStore.getState();\n this.searchResults = searchResults;\n this.query = query;\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n render() {\n if (!this.searchResults?.data) {\n console.warn('No search results data available');\n return <div>No results to display.</div>;\n }\n\n const parsedSearchKeys = parseSearchKeys(this.searchKeys);\n const serializedStyles =\n typeof this.customStylesForResults === 'string'\n ? this.customStylesForResults\n : serializeStyles(this.customStylesForResults);\n\n return (\n <div class='resultsContainer'>\n {this.searchResults?.data?.hits?.map((document, index) => {\n const { doc: result } = document;\n const dynamicProperties = extractDynamicProperties(\n result,\n parsedSearchKeys,\n );\n\n return (\n <searchcraft-base-search-result\n key={`${dynamicProperties.id}-${index}`}\n button-callback={() => console.log('button callback')}\n result-callback={() => console.log('interactive element')}\n keydown-callback={() => console.log('keydown')}\n is-interactive={true}\n heading-text={dynamicProperties[parsedSearchKeys[0]]}\n subheading-text={dynamicProperties[parsedSearchKeys[1]]}\n primary-content={dynamicProperties[parsedSearchKeys[2]]}\n secondary-content={dynamicProperties[parsedSearchKeys[3]]}\n tertiary-content={dynamicProperties[parsedSearchKeys[4]]}\n image-source={\n dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]]\n }\n custom-styles={serializedStyles}\n />\n );\n })}\n {this.query.length > 0 &&\n this.searchResults?.data?.hits?.length === 0 && (\n <searchcraft-error-message\n error-message={`No search results found for \"${this.query}\" query`}\n />\n )}\n </div>\n );\n }\n}\n"],"version":3}
1
+ {"file":"searchcraft-base-search-results.js","mappings":";;;;;;AAAA,MAAM,qCAAqC,GAAG,weAAwe,CAAC;AAC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D,qBAAe,EACf,+BAAsB,CAClB,CACP,CAAC;iBACH;aACF,CAAC,CAAC;SACJ;aAAM;YACL,eAAe,CAAC,IAAI,CAAC,GAAG,iBAAiB,CAAC,CAAC;SAC5C;;QAGD,IAAI,IAAI,CAAC,YAAY,EAAE;YACrB,eAAe,CAAC,IAAI,CAClB,WAAK,GAAG,EAAC,gBAAgB,EAAC,KAAK,EAAC,WAAW,IACzC,qBAAe,EACf,+BAAsB,CAClB,CACP,CAAC;SACH;QAED,QACE,WAAK,KAAK,EAAC,kBAAkB,IAC1B,eAAe,EACf,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC;YACpB,CAAA,MAAA,MAAA,MAAA,IAAI,CAAC,aAAa,0CAAE,IAAI,0CAAE,IAAI,0CAAE,MAAM,MAAK,CAAC,KAC1C,kDACiB,gCAAgC,IAAI,CAAC,KAAK,SAAS,GAClE,CACH,CACC,EACN;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SearchcraftBaseSearchResults"],"sources":["src/components/searchcraft-base-search-results/searchcraft-base-search-results.module.scss?tag=searchcraft-base-search-results&encapsulation=shadow","src/components/searchcraft-base-search-results/searchcraft-base-search-results.tsx"],"sourcesContent":[":root {\n --font-stack: Helvetica, Arial, sans-serif;\n}\n\n.resultsContainer {\n display: flex;\n flex-direction: column;\n justify-content: center;\n margin: 100px 20px;\n\n & > p {\n align-self: center;\n }\n\n & > div {\n margin-bottom: 20px;\n img {\n height: 300px;\n width: 200px;\n }\n }\n}\n\n.adSection {\n align-items: center;\n border: 1px solid #DCDDDE;\n display: flex;\n flex-direction: column;\n font-size: 16px;\n justify-content: center;\n margin: auto;\n min-height: 150px;\n text-align: center;\n width: 100%;\n\n p {\n margin-top: 5px;\n }\n}\n","import { Component, h, Prop, State } from '@stencil/core';\nimport type { SearchcraftResponse } from '@searchcraft/core';\n\nimport { useSearchcraftStore } from '@provider/store';\nimport {\n extractDynamicProperties,\n parseSearchKeys,\n serializeStyles,\n} from '@utils/utils';\n\n@Component({\n tag: 'searchcraft-base-search-results',\n styleUrl: 'searchcraft-base-search-results.module.scss',\n shadow: true,\n})\nexport class SearchcraftBaseSearchResults {\n @State() query = '';\n @State() searchResults: SearchcraftResponse | null = null;\n\n /**\n * Array of keys to dynamically extract properties from each document.\n * Must be explicitly set by the parent component.\n */\n @Prop() searchKeys = '';\n /**\n * Custom styles to apply to search results.\n * Expected format: JSON string, e.g., '{\"borderRadius\": \"10px\", \"padding\": \"16px\"}'\n */\n @Prop() customStylesForResults:\n | string\n | Record<string, Record<string, string>> = {};\n\n /**\n * Place ad at the end of the results.\n */\n @Prop() placeAdAtEnd = false;\n\n /**\n * Place ad every N results (e.g., every 4 results).\n * Default value: 4\n */\n @Prop() adInterval = 4;\n\n private unsubscribe: () => void;\n\n componentDidLoad() {\n if (!this.searchKeys || this.searchKeys.length === 0) {\n console.warn('No searchKeys provided; using empty keys array.');\n this.searchKeys = '';\n }\n\n this.unsubscribe = useSearchcraftStore.subscribe((state) => {\n this.searchResults = { ...state.searchResults };\n this.query = state.query;\n });\n\n const { searchResults, query } = useSearchcraftStore.getState();\n this.searchResults = searchResults;\n this.query = query;\n }\n\n disconnectedCallback() {\n if (this.unsubscribe) {\n this.unsubscribe();\n }\n }\n\n render() {\n if (!this.searchResults?.data) {\n console.warn('No search results data available');\n return <div>No results to display.</div>;\n }\n\n const parsedSearchKeys = parseSearchKeys(this.searchKeys);\n const serializedStyles =\n typeof this.customStylesForResults === 'string'\n ? this.customStylesForResults\n : serializeStyles(this.customStylesForResults);\n\n const resultsComponents = this.searchResults?.data?.hits?.map(\n (document, index) => {\n const { doc: result } = document;\n const dynamicProperties = extractDynamicProperties(\n result,\n parsedSearchKeys,\n );\n\n return (\n <searchcraft-base-search-result\n key={`${document.document_id}-${index}`}\n button-callback={() => console.log('button callback')}\n result-callback={() => console.log('interactive element')}\n keydown-callback={() => console.log('keydown')}\n is-interactive={true}\n heading-text={dynamicProperties[parsedSearchKeys[0]]}\n subheading-text={dynamicProperties[parsedSearchKeys[1]]}\n primary-content={dynamicProperties[parsedSearchKeys[2]]}\n secondary-content={dynamicProperties[parsedSearchKeys[3]]}\n tertiary-content={dynamicProperties[parsedSearchKeys[4]]}\n image-source={\n dynamicProperties[parsedSearchKeys[parsedSearchKeys.length - 1]]\n }\n custom-styles={serializedStyles}\n />\n );\n },\n );\n\n const finalComponents: JSX.Element[] = [];\n\n // Add ads at specified intervals\n if (this.adInterval > 0) {\n resultsComponents.forEach((component, index) => {\n finalComponents.push(component);\n if ((index + 1) % this.adInterval === 0) {\n finalComponents.push(\n <div key={`ad-section-${index + 1}`} class='adSection'>\n <span>##</span>\n <p> Ad Impressions</p>\n </div>,\n );\n }\n });\n } else {\n finalComponents.push(...resultsComponents);\n }\n\n // Add ad at the end if specified\n if (this.placeAdAtEnd) {\n finalComponents.push(\n <div key='ad-section-end' class='adSection'>\n <span>##</span>\n <p> Ad Impressions</p>\n </div>,\n );\n }\n\n return (\n <div class='resultsContainer'>\n {finalComponents}\n {this.query.length > 0 &&\n this.searchResults?.data?.hits?.length === 0 && (\n <searchcraft-error-message\n error-message={`No search results found for \"${this.query}\" query`}\n />\n )}\n </div>\n );\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { p as proxyCustomElement, H, h } from './p-c69651f6.js';
1
+ import { p as proxyCustomElement, H, h } from './p-af65953e.js';
2
2
 
3
3
  const SearchcraftButtonIcon$1 = /*@__PURE__*/ proxyCustomElement(class SearchcraftButtonIcon extends H {
4
4
  constructor() {
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftButton$1, d as defineCustomElement$1 } from './p-f83f2b59.js';
1
+ import { S as SearchcraftButton$1, d as defineCustomElement$1 } from './p-3ea9ba3a.js';
2
2
 
3
3
  const SearchcraftButton = SearchcraftButton$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftClearIconSet$1, d as defineCustomElement$1 } from './p-155f7a59.js';
1
+ import { S as SearchcraftClearIconSet$1, d as defineCustomElement$1 } from './p-a3ea7edc.js';
2
2
 
3
3
  const SearchcraftClearIconSet = SearchcraftClearIconSet$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftClearInputButton$1, d as defineCustomElement$1 } from './p-2cc8c074.js';
1
+ import { S as SearchcraftClearInputButton$1, d as defineCustomElement$1 } from './p-07fba086.js';
2
2
 
3
3
  const SearchcraftClearInputButton = SearchcraftClearInputButton$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftErrorMessage$1, d as defineCustomElement$1 } from './p-0c25e95d.js';
1
+ import { S as SearchcraftErrorMessage$1, d as defineCustomElement$1 } from './p-c14731ca.js';
2
2
 
3
3
  const SearchcraftErrorMessage = SearchcraftErrorMessage$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftInputCaption$1, d as defineCustomElement$1 } from './p-199065b5.js';
1
+ import { S as SearchcraftInputCaption$1, d as defineCustomElement$1 } from './p-85d96d9b.js';
2
2
 
3
3
  const SearchcraftInputCaption = SearchcraftInputCaption$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftInputIcon$1, d as defineCustomElement$1 } from './p-a7ab9d65.js';
1
+ import { S as SearchcraftInputIcon$1, d as defineCustomElement$1 } from './p-3b07b0dc.js';
2
2
 
3
3
  const SearchcraftInputIcon = SearchcraftInputIcon$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftInputLabel$1, d as defineCustomElement$1 } from './p-9283a3c2.js';
1
+ import { S as SearchcraftInputLabel$1, d as defineCustomElement$1 } from './p-d73bc01d.js';
2
2
 
3
3
  const SearchcraftInputLabel = SearchcraftInputLabel$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftInput$1, d as defineCustomElement$1 } from './p-4244171c.js';
1
+ import { S as SearchcraftInput$1, d as defineCustomElement$1 } from './p-350c8005.js';
2
2
 
3
3
  const SearchcraftInput = SearchcraftInput$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftSearchIconSet$1, d as defineCustomElement$1 } from './p-04e7305e.js';
1
+ import { S as SearchcraftSearchIconSet$1, d as defineCustomElement$1 } from './p-d33fdd81.js';
2
2
 
3
3
  const SearchcraftSearchIconSet = SearchcraftSearchIconSet$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftSpinnerDark$1, d as defineCustomElement$1 } from './p-16a533e3.js';
1
+ import { S as SearchcraftSpinnerDark$1, d as defineCustomElement$1 } from './p-04bad430.js';
2
2
 
3
3
  const SearchcraftSpinnerDark = SearchcraftSpinnerDark$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { S as SearchcraftSpinnerLight$1, d as defineCustomElement$1 } from './p-e8e40447.js';
1
+ import { S as SearchcraftSpinnerLight$1, d as defineCustomElement$1 } from './p-781a9a8c.js';
2
2
 
3
3
  const SearchcraftSpinnerLight = SearchcraftSpinnerLight$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'searchcraft-javascript-sdk';
2
- const BUILD = /* searchcraft-javascript-sdk */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
2
+ const BUILD = /* searchcraft-javascript-sdk */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: true, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: false, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: false, member: true, method: false, mode: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: false, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: true, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: true, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: true, vdomText: true, vdomXlink: false, watchCallback: false };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.22.3 | MIT Licensed | https://stenciljs.com
@@ -302,6 +302,9 @@ var parsePropertyValue = (propValue, propType) => {
302
302
  if (propType & 4 /* Boolean */) {
303
303
  return propValue === "false" ? false : propValue === "" || !!propValue;
304
304
  }
305
+ if (propType & 2 /* Number */) {
306
+ return parseFloat(propValue);
307
+ }
305
308
  if (propType & 1 /* String */) {
306
309
  return String(propValue);
307
310
  }
@@ -1239,4 +1242,4 @@ var setNonce = (nonce) => plt.$nonce$ = nonce;
1239
1242
 
1240
1243
  export { Fragment as F, bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r, setNonce as s };
1241
1244
 
1242
- //# sourceMappingURL=index-0d9f850d.js.map
1245
+ //# sourceMappingURL=index-e4a4f86d.js.map