@getlupa/client 0.8.0-alpha-2 → 0.8.0-alpha-3
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/cjs/index.min.js +10 -1
- package/dist/es/index.min.js +10 -1
- package/dist/iife/index.min.js +1 -1
- package/package.json +1 -1
package/dist/cjs/index.min.js
CHANGED
|
@@ -22472,7 +22472,7 @@ const app = {
|
|
|
22472
22472
|
const tracking = (options) => {
|
|
22473
22473
|
initTracking(options);
|
|
22474
22474
|
};
|
|
22475
|
-
const
|
|
22475
|
+
const applySearchBox = (options, mountOptions) => {
|
|
22476
22476
|
const existingInstance = app.box[options.inputSelector];
|
|
22477
22477
|
if (existingInstance) {
|
|
22478
22478
|
existingInstance.searchBoxOptions = options;
|
|
@@ -22493,6 +22493,15 @@ const searchBox = (options, mountOptions) => {
|
|
|
22493
22493
|
});
|
|
22494
22494
|
app.box[options.inputSelector] = instance;
|
|
22495
22495
|
};
|
|
22496
|
+
const searchBox = (options, mountOptions) => {
|
|
22497
|
+
var _a;
|
|
22498
|
+
// Support for multiple search box selectors separated by a comma
|
|
22499
|
+
// Quite often multiple search boxes are required, since mobile and desktop has different inputs in html layout
|
|
22500
|
+
const inputs = (_a = options.inputSelector) === null || _a === void 0 ? void 0 : _a.split(",");
|
|
22501
|
+
for (const input of inputs) {
|
|
22502
|
+
applySearchBox(Object.assign(Object.assign({}, options), { inputSelector: input.trim() }), mountOptions);
|
|
22503
|
+
}
|
|
22504
|
+
};
|
|
22496
22505
|
const searchResults = (options, mountOptions) => {
|
|
22497
22506
|
const existingInstance = app.results[options.containerSelector];
|
|
22498
22507
|
if (existingInstance) {
|
package/dist/es/index.min.js
CHANGED
|
@@ -22468,7 +22468,7 @@ const app = {
|
|
|
22468
22468
|
const tracking = (options) => {
|
|
22469
22469
|
initTracking(options);
|
|
22470
22470
|
};
|
|
22471
|
-
const
|
|
22471
|
+
const applySearchBox = (options, mountOptions) => {
|
|
22472
22472
|
const existingInstance = app.box[options.inputSelector];
|
|
22473
22473
|
if (existingInstance) {
|
|
22474
22474
|
existingInstance.searchBoxOptions = options;
|
|
@@ -22489,6 +22489,15 @@ const searchBox = (options, mountOptions) => {
|
|
|
22489
22489
|
});
|
|
22490
22490
|
app.box[options.inputSelector] = instance;
|
|
22491
22491
|
};
|
|
22492
|
+
const searchBox = (options, mountOptions) => {
|
|
22493
|
+
var _a;
|
|
22494
|
+
// Support for multiple search box selectors separated by a comma
|
|
22495
|
+
// Quite often multiple search boxes are required, since mobile and desktop has different inputs in html layout
|
|
22496
|
+
const inputs = (_a = options.inputSelector) === null || _a === void 0 ? void 0 : _a.split(",");
|
|
22497
|
+
for (const input of inputs) {
|
|
22498
|
+
applySearchBox(Object.assign(Object.assign({}, options), { inputSelector: input.trim() }), mountOptions);
|
|
22499
|
+
}
|
|
22500
|
+
};
|
|
22492
22501
|
const searchResults = (options, mountOptions) => {
|
|
22493
22502
|
const existingInstance = app.results[options.containerSelector];
|
|
22494
22503
|
if (existingInstance) {
|