@iamproperty/components 3.4.5 → 3.4.7
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/assets/css/components/accordion.css +1 -0
- package/assets/css/components/accordion.css.map +1 -0
- package/assets/css/components/alert.css +1 -0
- package/assets/css/components/alert.css.map +1 -0
- package/assets/css/components/applied-filters.css +1 -0
- package/assets/css/components/applied-filters.css.map +1 -0
- package/assets/css/components/buttons.css +1 -0
- package/assets/css/components/buttons.css.map +1 -0
- package/assets/css/components/card.css +1 -0
- package/assets/css/components/card.css.map +1 -0
- package/assets/css/components/carousel.css +1 -0
- package/assets/css/components/carousel.css.map +1 -0
- package/assets/css/components/charts.css +1 -0
- package/assets/css/components/charts.css.map +1 -0
- package/assets/css/components/container.css +1 -0
- package/assets/css/components/container.css.map +1 -0
- package/assets/css/components/dialog.css +1 -0
- package/assets/css/components/dialog.css.map +1 -0
- package/assets/css/components/forms.css +1 -0
- package/assets/css/components/forms.css.map +1 -0
- package/assets/css/components/header.css +1 -0
- package/assets/css/components/header.css.map +1 -0
- package/assets/css/components/lists.css +1 -0
- package/assets/css/components/lists.css.map +1 -0
- package/assets/css/components/nav.css +1 -0
- package/assets/css/components/nav.css.map +1 -0
- package/assets/css/components/pagination.css +1 -0
- package/assets/css/components/pagination.css.map +1 -0
- package/assets/css/components/panel.css +1 -0
- package/assets/css/components/panel.css.map +1 -0
- package/assets/css/components/property-searchbar.css +1 -0
- package/assets/css/components/property-searchbar.css.map +1 -0
- package/assets/css/components/snapshot.css +1 -0
- package/assets/css/components/snapshot.css.map +1 -0
- package/assets/css/components/stepper.css +1 -0
- package/assets/css/components/stepper.css.map +1 -0
- package/assets/css/components/table.css +1 -0
- package/assets/css/components/table.css.map +1 -0
- package/assets/css/components/tabs.css +1 -0
- package/assets/css/components/tabs.css.map +1 -0
- package/assets/css/components/testimonial.css +1 -0
- package/assets/css/components/testimonial.css.map +1 -0
- package/assets/css/components/timeline.css +1 -0
- package/assets/css/components/timeline.css.map +1 -0
- package/assets/css/components/tooltips.css +1 -0
- package/assets/css/components/tooltips.css.map +1 -0
- package/assets/css/core.min.css +1 -1
- package/assets/css/core.min.css.map +1 -1
- package/assets/css/style.min.css +1 -1
- package/assets/css/style.min.css.map +1 -1
- package/assets/fonts/qanelas-bold-webfont.woff +0 -0
- package/assets/fonts/qanelas-bold-webfont.woff2 +0 -0
- package/assets/js/bundle.js +68 -0
- package/assets/js/components/accordion/accordion.component.js +33 -0
- package/assets/js/components/accordion/accordion.component.min.js +14 -0
- package/assets/js/components/accordion/accordion.component.min.js.map +1 -0
- package/assets/js/components/applied-filters/applied-filters.component.js +26 -0
- package/assets/js/components/card/card.component.js +91 -0
- package/assets/js/components/card/card.component.min.js +21 -0
- package/assets/js/components/card/card.component.min.js.map +1 -0
- package/assets/js/components/filterlist/filterlist.component.js +49 -0
- package/assets/js/components/filterlist/filterlist.component.min.js +23 -0
- package/assets/js/components/filterlist/filterlist.component.min.js.map +1 -0
- package/assets/js/components/header/header.component.js +51 -0
- package/assets/js/components/header/header.component.min.js +30 -0
- package/assets/js/components/header/header.component.min.js.map +1 -0
- package/assets/js/components/pagination/pagination.component.js +34 -0
- package/assets/js/components/table/table.component.js +104 -0
- package/assets/js/components/table/table.component.min.js +24 -0
- package/assets/js/components/table/table.component.min.js.map +1 -0
- package/assets/js/components/tabs/tabs.component.js +34 -0
- package/assets/js/components/tabs/tabs.component.min.js +17 -0
- package/assets/js/components/tabs/tabs.component.min.js.map +1 -0
- package/assets/js/dynamic.js +74 -0
- package/assets/js/dynamic.min.js +5 -0
- package/assets/js/dynamic.min.js.map +1 -0
- package/assets/js/flat-components.js +79 -0
- package/assets/js/modules/accordion.js +11 -14
- package/assets/js/modules/applied-filters.js +100 -0
- package/assets/js/modules/data-layer.js +45 -0
- package/assets/js/modules/filterlist.js +32 -0
- package/assets/js/modules/helpers.js +80 -47
- package/assets/js/modules/pagination.js +33 -0
- package/assets/js/modules/table.js +507 -420
- package/assets/js/modules/tabs.js +97 -0
- package/assets/js/modules/youtubevideo.js +53 -61
- package/assets/js/scripts.bundle.js +111 -984
- package/assets/js/scripts.bundle.js.map +1 -1
- package/assets/js/scripts.bundle.min.js +3 -4
- package/assets/js/scripts.bundle.min.js.map +1 -1
- package/assets/js/tests/filterlist.spec.js +22 -0
- package/assets/js/tests/pagination.spec.js +15 -0
- package/assets/js/tests/table.spec.js +147 -0
- package/assets/sass/_components.scss +1 -2
- package/assets/sass/_corefiles.scss +5 -4
- package/assets/sass/_fonts.scss +4 -4
- package/assets/sass/_func.scss +1 -0
- package/assets/sass/_functions/functions.scss +6 -0
- package/assets/sass/_functions/mixins.scss +9 -9
- package/assets/sass/_functions/utilities.scss +16 -0
- package/assets/sass/_functions/variables.scss +128 -86
- package/assets/sass/_tests/colours.spec.scss +1 -1
- package/assets/sass/_tests/mixins.spec.scss +1 -1
- package/assets/sass/_tests/typography.spec.scss +2 -2
- package/assets/sass/components/accordion.scss +9 -6
- package/assets/sass/components/applied-filters.scss +65 -0
- package/assets/sass/components/card.scss +178 -227
- package/assets/sass/components/charts.scss +4 -0
- package/assets/sass/components/container.scss +13 -8
- package/assets/sass/components/dialog.scss +202 -0
- package/assets/sass/components/forms.scss +39 -5
- package/assets/sass/components/header.scss +34 -11
- package/assets/sass/components/lists.scss +15 -0
- package/assets/sass/components/nav.scss +5 -1
- package/assets/sass/components/pagination.scss +140 -0
- package/assets/sass/components/panel.scss +3 -4
- package/assets/sass/components/snapshot.scss +1 -1
- package/assets/sass/components/table.scss +419 -0
- package/assets/sass/components/tabs.scss +52 -36
- package/assets/sass/components/timeline.scss +2 -2
- package/assets/sass/foundations/icons.scss +1 -1
- package/assets/sass/{components → foundations}/links.scss +29 -2
- package/assets/sass/foundations/reboot.scss +21 -15
- package/assets/sass/foundations/root.scss +12 -5
- package/assets/sass/foundations/type.scss +90 -66
- package/assets/svg/illustrations/table.svg +165 -0
- package/assets/ts/README.md +12 -0
- package/assets/ts/bundle.ts +87 -0
- package/assets/ts/components/accordion/README.md +17 -0
- package/assets/ts/components/accordion/accordion.component.ts +43 -0
- package/assets/ts/components/applied-filters/README.md +5 -0
- package/assets/ts/components/applied-filters/applied-filters.component.ts +33 -0
- package/assets/ts/components/card/README.md +22 -0
- package/assets/ts/components/card/card.component.ts +117 -0
- package/assets/ts/components/filterlist/README.md +17 -0
- package/assets/ts/components/filterlist/filterlist.component.ts +60 -0
- package/assets/ts/components/header/README.md +26 -0
- package/assets/ts/components/header/header.component.ts +61 -0
- package/assets/ts/components/pagination/README.md +11 -0
- package/assets/ts/components/pagination/pagination.component.ts +45 -0
- package/assets/ts/components/table/README.md +23 -0
- package/assets/ts/components/table/table.component.ts +128 -0
- package/assets/ts/components/tabs/README.md +18 -0
- package/assets/ts/components/tabs/tabs.component.ts +41 -0
- package/assets/ts/dynamic.ts +98 -0
- package/assets/ts/flat-components.ts +100 -0
- package/assets/ts/html.d.ts +4 -0
- package/assets/ts/modules/accordion.ts +15 -21
- package/assets/ts/modules/applied-filters.ts +146 -0
- package/assets/ts/modules/data-layer.ts +58 -0
- package/assets/ts/modules/filterlist.ts +46 -0
- package/assets/ts/modules/helpers.ts +93 -55
- package/assets/ts/modules/pagination.ts +44 -0
- package/assets/ts/modules/table.ts +598 -433
- package/assets/ts/modules/tabs.ts +136 -0
- package/assets/ts/modules/youtubevideo.ts +58 -63
- package/assets/ts/tests/filterlist.spec.ts +29 -0
- package/assets/ts/tests/pagination.spec.ts +21 -0
- package/assets/ts/tests/table.spec.ts +191 -0
- package/dist/components.es.js +1359 -1356
- package/dist/components.umd.js +103 -54
- package/dist/style.css +1 -1
- package/package.json +20 -12
- package/src/components/Accordion/Accordion.spec.js +1 -1
- package/src/components/Accordion/Accordion.vue +7 -5
- package/src/components/Accordion/AccordionItem.vue +3 -6
- package/src/components/Accordion/README.md +0 -2
- package/src/components/AppliedFilters/AppliedFilters.vue +20 -0
- package/src/components/AppliedFilters/README.md +5 -0
- package/src/components/Card/Card.vue +11 -112
- package/src/components/Card/README.md +16 -18
- package/src/components/Carousel/Carousel.vue +49 -10
- package/src/components/Chart/Chart.vue +46 -4
- package/src/components/Filterlist/Filterlist.vue +20 -0
- package/src/components/Filterlist/README.md +17 -0
- package/src/components/Header/Header.spec.js +5 -4
- package/src/components/Header/Header.vue +14 -20
- package/src/components/Pagination/Pagination.vue +30 -0
- package/src/components/Pagination/README.md +11 -0
- package/src/components/Snapshot/Snapshot.vue +1 -1
- package/src/components/Table/README.md +29 -44
- package/src/components/Table/Table.spec.js +5 -37
- package/src/components/Table/Table.vue +16 -91
- package/src/components/Tabs/README.md +0 -2
- package/src/components/Tabs/Tab.vue +3 -2
- package/src/components/Tabs/Tabs.vue +8 -64
- package/src/foundations/YoutubeVideo/YoutubeVideo.vue +1 -1
- package/src/index.js +3 -2
- package/assets/fonts/qanelassoft-extrabold-webfont.woff +0 -0
- package/assets/fonts/qanelassoft-extrabold-webfont.woff2 +0 -0
- package/assets/js/main.js +0 -57
- package/assets/js/modules/modal.js +0 -69
- package/assets/sass/components/cardDeck.scss +0 -108
- package/assets/sass/components/modal.scss +0 -136
- package/assets/sass/components/tables.scss +0 -291
- package/assets/ts/main.ts +0 -68
- package/assets/ts/modules/modal.ts +0 -91
- package/src/components/CardDeck/CardDeck.spec.js +0 -99
- package/src/components/CardDeck/CardDeck.vue +0 -77
- package/src/components/CardDeck/README.md +0 -25
- package/src/components/Modal/Modal.spec.js +0 -22
- package/src/components/Modal/Modal.vue +0 -43
- package/src/components/Modal/README.md +0 -20
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
export const createTabsLinks = function (tabsElement) {
|
|
3
|
+
const details = tabsElement.querySelectorAll(':scope > details');
|
|
4
|
+
let summaries = tabsElement.querySelectorAll(':scope > details > summary');
|
|
5
|
+
let tabLinks = tabsElement.querySelector(':scope > .tabs__links');
|
|
6
|
+
if (tabsElement.shadowRoot && tabsElement.shadowRoot.querySelector('.tabs__links'))
|
|
7
|
+
tabLinks = tabsElement.shadowRoot.querySelector('.tabs__links');
|
|
8
|
+
if (!tabLinks) {
|
|
9
|
+
tabLinks = document.createElement('div');
|
|
10
|
+
tabLinks.classList.add('tabs__links');
|
|
11
|
+
tabsElement.prepend(tabLinks);
|
|
12
|
+
}
|
|
13
|
+
// Create the tab buttons from the summary titles
|
|
14
|
+
details.forEach((detail, index) => {
|
|
15
|
+
let summary = detail.querySelector(':scope > summary');
|
|
16
|
+
summary.classList.add('visually-hidden');
|
|
17
|
+
let button = document.createElement('button');
|
|
18
|
+
if (detail.hasAttribute('id')) {
|
|
19
|
+
button = document.createElement('a');
|
|
20
|
+
button.setAttribute('href', `#${detail.getAttribute('id')}`);
|
|
21
|
+
}
|
|
22
|
+
if (detail.hasAttribute('open')) {
|
|
23
|
+
button.setAttribute('aria-pressed', true);
|
|
24
|
+
}
|
|
25
|
+
button.innerHTML = `${summary.innerText}`;
|
|
26
|
+
button.classList.add('link');
|
|
27
|
+
button.setAttribute('data-index', index);
|
|
28
|
+
button.setAttribute('tabindex', '-1');
|
|
29
|
+
tabLinks.appendChild(button);
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
export const setTabsEventHandlers = function (tabsElement) {
|
|
33
|
+
let details = tabsElement.querySelectorAll(':scope > details');
|
|
34
|
+
let summaries = tabsElement.querySelectorAll(':scope > details > summary');
|
|
35
|
+
let buttons = tabsElement.querySelectorAll(':scope > .tabs__links > button, .tabs__links > a');
|
|
36
|
+
if (tabsElement.shadowRoot)
|
|
37
|
+
buttons = tabsElement.shadowRoot.querySelectorAll('.tabs__links > button, .tabs__links > a');
|
|
38
|
+
// Set the on click for the tab buttons, these will open the details box it matches too
|
|
39
|
+
buttons.forEach((button) => {
|
|
40
|
+
button.addEventListener("click", (e) => {
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
buttons.forEach((buttonLoopItem) => {
|
|
43
|
+
let buttonPressed = buttonLoopItem == button ? true : false;
|
|
44
|
+
buttonLoopItem.setAttribute('aria-pressed', buttonPressed);
|
|
45
|
+
});
|
|
46
|
+
details.forEach((detail, detailsIndex) => {
|
|
47
|
+
let detailsOpen = button.getAttribute('data-index') == detailsIndex ? true : false;
|
|
48
|
+
if (detailsOpen)
|
|
49
|
+
detail.setAttribute('open', detailsOpen);
|
|
50
|
+
else
|
|
51
|
+
detail.removeAttribute('open');
|
|
52
|
+
});
|
|
53
|
+
if (button.hasAttribute('href'))
|
|
54
|
+
history.pushState(undefined, undefined, button.getAttribute('href'));
|
|
55
|
+
// Data layer Open Event
|
|
56
|
+
window.dataLayer = window.dataLayer || [];
|
|
57
|
+
window.dataLayer.push({
|
|
58
|
+
"event": "openTab",
|
|
59
|
+
"tabTitle": button.textContent
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
// Make sure we dont loose existing summary functionality
|
|
64
|
+
summaries.forEach((summary, index) => {
|
|
65
|
+
// Maintain the focus on the summary element but visually highlight the tab button
|
|
66
|
+
summary.addEventListener("focus", (e) => {
|
|
67
|
+
buttons.forEach((button) => {
|
|
68
|
+
button.classList.remove('focus');
|
|
69
|
+
});
|
|
70
|
+
buttons[index].classList.add('focus');
|
|
71
|
+
});
|
|
72
|
+
summary.addEventListener("click", (e) => {
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
buttons[index].click();
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
export const openFirstTab = function (tabsElement) {
|
|
79
|
+
let details = tabsElement.querySelectorAll(':scope > details');
|
|
80
|
+
let buttons = tabsElement.querySelectorAll(':scope > .tabs__links > button, .tabs__links > a');
|
|
81
|
+
if (tabsElement.shadowRoot)
|
|
82
|
+
buttons = tabsElement.shadowRoot.querySelectorAll('.tabs__links > button, .tabs__links > a');
|
|
83
|
+
if (location.hash && tabsElement.querySelector(`.tabs__links [href="${location.hash}"]`)) {
|
|
84
|
+
tabsElement.querySelector(`[href="${location.hash}"]`).setAttribute('open', true);
|
|
85
|
+
tabsElement.querySelector(`details[id="${location.hash.replace('#', '')}"]`).setAttribute('open', true);
|
|
86
|
+
}
|
|
87
|
+
else if (!tabsElement.querySelector(`details[open]`)) {
|
|
88
|
+
details[0].setAttribute('open', true);
|
|
89
|
+
buttons[0].setAttribute('aria-pressed', true);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const tabs = function (tabsElement) {
|
|
93
|
+
createTabsLinks(tabsElement);
|
|
94
|
+
setTabsEventHandlers(tabsElement);
|
|
95
|
+
openFirstTab(tabsElement);
|
|
96
|
+
};
|
|
97
|
+
export default tabs;
|
|
@@ -5,15 +5,14 @@
|
|
|
5
5
|
class youtubeVideo {
|
|
6
6
|
/** @param {Element} embed dom element */
|
|
7
7
|
constructor(embed) {
|
|
8
|
-
let createEmbed = this.createEmbed;
|
|
9
8
|
// If the scripts is already loaded then lets just create the embed
|
|
10
9
|
if (document.body.classList.contains('youtubeLoaded')) {
|
|
11
10
|
embed.addEventListener('click', function (e) {
|
|
12
11
|
// loop parent nodes from the target to the delegation node
|
|
13
12
|
for (var target = e.target; target && target != this; target = target.parentNode) {
|
|
14
|
-
if (target.matches('a
|
|
13
|
+
if (target.matches('a')) {
|
|
15
14
|
e.preventDefault();
|
|
16
|
-
createEmbed(
|
|
15
|
+
createEmbed(target);
|
|
17
16
|
break;
|
|
18
17
|
}
|
|
19
18
|
}
|
|
@@ -26,9 +25,8 @@ class youtubeVideo {
|
|
|
26
25
|
/**
|
|
27
26
|
* Load the YouTube scripts before trying to create the embed
|
|
28
27
|
* @param {HTMLElement} embed dom element
|
|
29
|
-
* @param {Function} createEmbed function to create the embed after script loaded.
|
|
30
28
|
*/
|
|
31
|
-
loadScripts(embed
|
|
29
|
+
loadScripts(embed) {
|
|
32
30
|
return new Promise((resolve, reject) => {
|
|
33
31
|
const image = new Image();
|
|
34
32
|
image.onload = function () {
|
|
@@ -41,14 +39,12 @@ class youtubeVideo {
|
|
|
41
39
|
resolve(true);
|
|
42
40
|
// script has loaded, you can now use it safely
|
|
43
41
|
tag.onload = () => {
|
|
44
|
-
embed.addEventListener('click', function (
|
|
42
|
+
embed.addEventListener('click', function (event) {
|
|
43
|
+
console.log('click');
|
|
45
44
|
// loop parent nodes from the target to the delegation node
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
createEmbed(embed, target);
|
|
50
|
-
break;
|
|
51
|
-
}
|
|
45
|
+
if (event && event.target instanceof HTMLElement && event.target.closest('a')) {
|
|
46
|
+
event.preventDefault();
|
|
47
|
+
createEmbed(event.target.closest('a'));
|
|
52
48
|
}
|
|
53
49
|
}, false);
|
|
54
50
|
};
|
|
@@ -59,56 +55,52 @@ class youtubeVideo {
|
|
|
59
55
|
image.src = "https://youtube.com/favicon.ico";
|
|
60
56
|
});
|
|
61
57
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
events: {
|
|
91
|
-
'onReady': onPlayerReady,
|
|
92
|
-
'onStateChange': onPlayerStateChange
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
}
|
|
96
|
-
onYouTubeIframeAPIReady();
|
|
97
|
-
// The API will call this function when the video player is ready.
|
|
98
|
-
function onPlayerReady(event) {
|
|
99
|
-
// Play the video straight away
|
|
100
|
-
event.target.playVideo();
|
|
101
|
-
}
|
|
102
|
-
// The API calls this function when the player's state changes.
|
|
103
|
-
// The function indicates that when playing a video (state=1)
|
|
104
|
-
var done = false;
|
|
105
|
-
function onPlayerStateChange(event) {
|
|
106
|
-
if (event.data == YT.PlayerState.PLAYING && !done) {
|
|
107
|
-
var link = document.getElementById(link_id);
|
|
108
|
-
link.classList.add('player-ready');
|
|
109
|
-
done = true;
|
|
58
|
+
}
|
|
59
|
+
export const createEmbed = function (target) {
|
|
60
|
+
// If there is more than one video lets make sure there is only one playing at a time.
|
|
61
|
+
if (typeof window.player != "undefined" && typeof window.player.pauseVideo == "function")
|
|
62
|
+
window.player.pauseVideo();
|
|
63
|
+
var video_id = target.getAttribute('data-id');
|
|
64
|
+
var link_id = target.getAttribute('id');
|
|
65
|
+
// create an id to pass t the script if one isn't present
|
|
66
|
+
if (typeof link_id == 'undefined' || link_id == null) {
|
|
67
|
+
var randLetter = String.fromCharCode(65 + Math.floor(Math.random() * 26));
|
|
68
|
+
link_id = randLetter + Date.now();
|
|
69
|
+
target.setAttribute('id', link_id);
|
|
70
|
+
}
|
|
71
|
+
// This function creates an <iframe> (and YouTube player) after the API code downloads.
|
|
72
|
+
function onYouTubeIframeAPIReady() {
|
|
73
|
+
window.player = new YT.Player(link_id, {
|
|
74
|
+
height: '100%',
|
|
75
|
+
width: '100%',
|
|
76
|
+
videoId: video_id,
|
|
77
|
+
playerVars: {
|
|
78
|
+
'modestbranding': 1,
|
|
79
|
+
'playsinline': 1,
|
|
80
|
+
'rel': 0,
|
|
81
|
+
'showinfo': 0
|
|
82
|
+
},
|
|
83
|
+
events: {
|
|
84
|
+
'onReady': onPlayerReady,
|
|
85
|
+
'onStateChange': onPlayerStateChange
|
|
110
86
|
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
onYouTubeIframeAPIReady();
|
|
90
|
+
// The API will call this function when the video player is ready.
|
|
91
|
+
function onPlayerReady(event) {
|
|
92
|
+
// Play the video straight away
|
|
93
|
+
event.target.playVideo();
|
|
94
|
+
}
|
|
95
|
+
// The API calls this function when the player's state changes.
|
|
96
|
+
// The function indicates that when playing a video (state=1)
|
|
97
|
+
var done = false;
|
|
98
|
+
function onPlayerStateChange(event) {
|
|
99
|
+
if (event.data == YT.PlayerState.PLAYING && !done) {
|
|
100
|
+
var link = document.getElementById(link_id);
|
|
101
|
+
link.classList.add('player-ready');
|
|
102
|
+
done = true;
|
|
111
103
|
}
|
|
112
104
|
}
|
|
113
|
-
}
|
|
105
|
+
};
|
|
114
106
|
export default youtubeVideo;
|