Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ON HOLD] 850 search search popup #935

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
819 changes: 819 additions & 0 deletions blocks/header/coveo-body-requests.js

Large diffs are not rendered by default.

507 changes: 395 additions & 112 deletions blocks/header/header.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions icons/arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/arrow-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/chevron-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion icons/icon-arrow-right.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions icons/user.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 1 addition & 7 deletions scripts/carousel.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
function debounce(func, timeout = 300) {
let timer;
return (...args) => {
clearTimeout(timer);
timer = setTimeout(() => { func.apply(this, args); }, timeout);
};
}
import { debounce } from './scripts.js';

export default function Carousel({
wrapperEl,
Expand Down
30 changes: 30 additions & 0 deletions scripts/scripts-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,36 @@ const TEMPLATE_LIST = {
info: 'library',
};

export function debounce(func, timeout = 300) {
let timer;
return (...args) => {
clearTimeout(timer);
timer = setTimeout(() => { func.apply(this, args); }, timeout);
};
}

export function createRequest(config) {
const {
url,
method = 'GET',
authToken,
type = 'application/json',
body,
} = config;
const headers = {
'Content-Type': type,
Accept: 'application/json',
};
const configuration = { method, headers };
if (body) {
configuration.body = body;
}
if (authToken && authToken.trim() !== '') {
headers.Authorization = `Bearer ${authToken}`;
}
return fetch(url, configuration);
}

/**
* Get the Image URL from Scene7 and Optimize the picture
* @param {string} imageUrl
Expand Down
2 changes: 1 addition & 1 deletion scripts/scripts.js

Large diffs are not rendered by default.

Loading
Loading