@ilo-org/twig 0.3.0 → 0.4.0

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 (30) hide show
  1. package/.turbo/turbo-build:lib.log +2 -2
  2. package/CHANGELOG.md +23 -0
  3. package/package.json +2 -2
  4. package/src/patterns/components/accordion/accordion.behavior.js +5 -6
  5. package/src/patterns/components/accordion/accordion.js +0 -1
  6. package/src/patterns/components/breadcrumb/breadcrumb.behavior.js +5 -6
  7. package/src/patterns/components/callout/callout.behavior.js +5 -6
  8. package/src/patterns/components/callout/callout.js +0 -2
  9. package/src/patterns/components/card/card.twig +7 -3
  10. package/src/patterns/components/card/card.wingsuit.yml +10 -14
  11. package/src/patterns/components/cardgroup/cardgroup.twig +2 -0
  12. package/src/patterns/components/cardgroup/cardgroup.wingsuit.yml +20 -0
  13. package/src/patterns/components/form/fileupload.behavior.js +0 -1
  14. package/src/patterns/components/image/image.twig +6 -1
  15. package/src/patterns/components/image/image.wingsuit.yml +5 -5
  16. package/src/patterns/components/loading/loading.behavior.js +4 -5
  17. package/src/patterns/components/modal/modal.behavior.js +4 -5
  18. package/src/patterns/components/navigation/navigation.behavior.js +0 -1
  19. package/src/patterns/components/notification/notification.behavior.js +0 -1
  20. package/src/patterns/components/readmore/readmore.behavior.js +5 -6
  21. package/src/patterns/components/table/table.behavior.js +5 -6
  22. package/src/patterns/components/tableofcontents/tableofcontents.behavior.js +5 -6
  23. package/src/patterns/components/tabs/tabs.behavior.js +10 -12
  24. package/src/patterns/components/tabs/tabs.js +0 -1
  25. package/src/patterns/components/tags/tag.behavior.js +5 -6
  26. package/src/patterns/components/tags/tag.js +0 -1
  27. package/src/patterns/components/tooltip/tooltip.behavior.js +5 -6
  28. package/src/patterns/components/video/video.behavior.js +5 -6
  29. package/src/patterns/components/video/video.js +3 -2
  30. package/src/patterns/components/video/videoplayer.twig +0 -1
@@ -1,9 +1,9 @@
1
1
 
2
- > @ilo-org/twig@0.3.0 build:lib /home/runner/work/designsystem/designsystem/packages/twig
2
+ > @ilo-org/twig@0.4.0 build:lib /home/runner/work/designsystem/designsystem/packages/twig
3
3
  > node importprefix.js && node importsvgs.js && pnpm output
4
4
 
5
5
  theme prefix added
6
6
 
7
- > @ilo-org/twig@0.3.0 output /home/runner/work/designsystem/designsystem/packages/twig
7
+ > @ilo-org/twig@0.4.0 output /home/runner/work/designsystem/designsystem/packages/twig
8
8
  > node outputtwigs.js
9
9
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @ilo-org/twig
2
2
 
3
+ ## 0.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 36f5da68a: In responsive images, allow the breakpoint property to take either a string containing a media query or a number that will indicate the minimum width of the viewport at which the image should be displayed.
8
+
9
+ ### Patch Changes
10
+
11
+ - 11801070b: Change request for videojs player to be able to work with Youtube videos.
12
+ - 1692a67dc: Remove needless console.logs
13
+ - bbfa1d9b9: Add Alt and loading card variables on cardgroup template.
14
+ - 1b942833b: Remove max-width for the video component. Not needed.
15
+ - Updated dependencies [11801070b]
16
+ - Updated dependencies [1b942833b]
17
+ - @ilo-org/styles@0.3.5
18
+
19
+ ## 0.3.1
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [ee2e53f51]
24
+ - @ilo-org/styles@0.3.4
25
+
3
26
  ## 0.3.0
4
27
 
5
28
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ilo-org/twig",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Twig components for the ILO's Design System",
6
6
  "main": "",
@@ -25,7 +25,7 @@
25
25
  "@ilo-org/brand-assets": "0.1.0",
26
26
  "@ilo-org/fonts": "0.1.0",
27
27
  "@ilo-org/icons": "0.1.17",
28
- "@ilo-org/styles": "0.3.3",
28
+ "@ilo-org/styles": "0.3.5",
29
29
  "@ilo-org/themes": "0.1.15",
30
30
  "@ilo-org/utils": "0.0.11"
31
31
  },
@@ -5,12 +5,11 @@ Drupal.behaviors.accordion = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="Accordion"]`),
7
7
  (element) => {
8
- if(!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- console.log("loading Accordion component....");
11
- new Accordion(element);
12
- element.dataset.jsProcessed = true;
13
- }
8
+ if (!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ new Accordion(element);
11
+ element.dataset.jsProcessed = true;
12
+ }
14
13
  }
15
14
  );
16
15
  },
@@ -63,7 +63,6 @@ export default class Accordion {
63
63
  this.accordionButtons = this.element.querySelectorAll(
64
64
  ".ilo--accordion--button"
65
65
  );
66
- console.log(this.multipleExpanded);
67
66
 
68
67
  return this;
69
68
  }
@@ -5,12 +5,11 @@ Drupal.behaviors.breadcrumb = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="Breadcrumb"]`),
7
7
  (element) => {
8
- if(!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- console.log("loading Breadcrumb component....");
11
- new Breadcrumb(element);
12
- element.dataset.jsProcessed = true;
13
- }
8
+ if (!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ new Breadcrumb(element);
11
+ element.dataset.jsProcessed = true;
12
+ }
14
13
  }
15
14
  );
16
15
  },
@@ -5,12 +5,11 @@ Drupal.behaviors.callout = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="Callout"]`),
7
7
  (element) => {
8
- if(!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- console.log("loading Callout component....");
11
- new Callout(element);
12
- element.dataset.jsProcessed = true;
13
- }
8
+ if (!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ new Callout(element);
11
+ element.dataset.jsProcessed = true;
12
+ }
14
13
  }
15
14
  );
16
15
  },
@@ -121,8 +121,6 @@ export default class Callout {
121
121
  */
122
122
  handleClick() {
123
123
  // callback of sorts
124
- console.log("button clicked");
125
-
126
124
  return this;
127
125
  }
128
126
 
@@ -16,14 +16,18 @@
16
16
  <picture>
17
17
  {% for img in image|reverse %}
18
18
  {% if loop.last == false %}
19
- <source srcset="{{img.src}}" media="(min-width: {{img.breakpoint}}px)">
19
+ {% if img.breakpoint matches '/^\\d+$/' %}
20
+ <source srcset="{{img.src}}" media="(min-width: {{img.breakpoint}}px)">
21
+ {% else %}
22
+ <source srcset="{{img.src}}" media="{{img.breakpoint}}">
23
+ {% endif %}
20
24
  {% endif %}
21
25
  {% endfor %}
22
- <img class="{{prefix}}--card--image" src="{{image|reverse|last.src}}" alt="{{imageAlt}}" {% if loading %} loading="{{ loading }}"{% endif %}>
26
+ <img class="{{prefix}}--card--image" src="{{image|reverse|last.src}}" alt="{{imageAlt}}" {% if loading %} loading="{{ loading }}" {% endif %}>
23
27
  </picture>
24
28
  {% else %}
25
29
  <picture>
26
- <img class="{{prefix}}--card--image" src="{{image}}" alt="{{imageAlt}}">
30
+ <img class="{{prefix}}--card--image" src="{{image}}" alt="{{imageAlt}}" {% if loading %} loading="{{ loading }}" {% endif %}>
27
31
  </picture>
28
32
  {% endif %}
29
33
  </div>
@@ -33,8 +33,16 @@ card:
33
33
  image:
34
34
  type: object
35
35
  label: Image
36
- description: Image settings for the card. Only applies to `Graphic Promo` and `Graphic Text` cards. Image can be a string consisting of an image src or an array of objects with `src` and `breakpoint` properties for responsive images.
37
- preview: ""
36
+ description: Image settings for the card. For responsive images, this can be an array of objects with an `src` property pointing to the image file and a `breakpoint` property which is either a number indicating the minimum viewport width at which the image should be displayed or a media query. For static images, this can be a string pointing to the image file.
37
+ preview:
38
+ - breakpoint: "(min-width: 0px)"
39
+ src: "/images/small.jpg"
40
+ - breakpoint: "(min-width: 800px)"
41
+ src: "/images/medium.jpg"
42
+ - breakpoint: "(min-width: 1200px)"
43
+ src: "/images/large.jpg"
44
+ - breakpoint: "(min-width: 1440px)"
45
+ src: "/images/large.jpg"
38
46
  imageAlt:
39
47
  type: string
40
48
  label: Image Alt
@@ -135,7 +143,6 @@ card:
135
143
  date:
136
144
  human: 20 September 2022
137
145
  unix: 1670389200
138
- image: ""
139
146
  link: "https:/www.ilo.org"
140
147
  profile:
141
148
  avatar: "/images/ilo-dg.jpg"
@@ -166,15 +173,6 @@ card:
166
173
  fields:
167
174
  eyebrow: High-level meeting
168
175
  title: "ILO welcomes G7 call to make a just transition to a green economy happen"
169
- image:
170
- - breakpoint: 0
171
- src: "/images/small.jpg"
172
- - breakpoint: 800
173
- src: "/images/medium.jpg"
174
- - breakpoint: 1200
175
- src: "/images/large.jpg"
176
- - breakpoint: 1440
177
- src: "/images/large.jpg"
178
176
  intro: "At the end of their meeting the G7 Labour Ministers highlighted the urgent need to greater focus on rights and occupational safety and health."
179
177
  linklist:
180
178
  linkgroup:
@@ -206,7 +204,6 @@ card:
206
204
  human: 17 March 2022
207
205
  unix: 1670389200
208
206
  link: "https://www.ilo.org/search?q=graphic"
209
- image: "/images/hero.jpg"
210
207
  linklist:
211
208
  headline: ""
212
209
  linkgroup:
@@ -225,7 +222,6 @@ card:
225
222
  human: 17 March 2022
226
223
  unix: 1670389200
227
224
  link: "https://www.ilo.org"
228
- image: "/images/medium.jpg"
229
225
  profile:
230
226
  eventdetails: "8:30 - 12:00 CET | Geneva"
231
227
  factlist:
@@ -19,6 +19,8 @@
19
19
  list: card.list,
20
20
  linklist: card.linklist,
21
21
  color: card.color,
22
+ imageAlt: card.imageAlt,
23
+ loading: card.loading,
22
24
  prefix: prefix,
23
25
  theme: theme,
24
26
  cornercut: cornercut,
@@ -23,6 +23,8 @@ cardgroup:
23
23
  group:
24
24
  - title: "Multi-link card - first"
25
25
  image: "/images/hero.jpg"
26
+ imageAlt: "The alt text of the image"
27
+ loading: lazy
26
28
  intro: "Lorem ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas lacus."
27
29
  eyebrow: ""
28
30
  date: ""
@@ -45,6 +47,8 @@ cardgroup:
45
47
  url: "http://www.google.com"
46
48
  - title: "Multi-link card second - right aligned image, wide option"
47
49
  image: "/images/medium.jpg"
50
+ imageAlt: "The alt text of the image"
51
+ loading: "lazy"
48
52
  intro: "Lorem ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas lacus."
49
53
  eyebrow: ""
50
54
  date: ""
@@ -66,6 +70,8 @@ cardgroup:
66
70
  url: "http://www.google.com"
67
71
  - title: "Multi-link card - right aligned image, wide option"
68
72
  image: "/images/ilo-headquarters.jpg"
73
+ imageAlt: "The alt text of the image"
74
+ loading: "lazy"
69
75
  intro: "Lorem ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas ipsum dolor sit amet consectetur adipiscing elit. Lobortis egestas lacus."
70
76
  eyebrow: ""
71
77
  date: ""
@@ -94,6 +100,8 @@ cardgroup:
94
100
  group:
95
101
  - title: "Vertical info card descriptive headline text"
96
102
  image: "/images/small.jpg"
103
+ imageAlt: "The alt text of the image"
104
+ loading: "lazy"
97
105
  intro: ""
98
106
  eyebrow: "Eyebrow title"
99
107
  date:
@@ -109,6 +117,8 @@ cardgroup:
109
117
  color: ""
110
118
  - title: "Vertical info card descriptive headline text"
111
119
  image: "/images/hero.jpg"
120
+ imageAlt: "The alt text of the image"
121
+ loading: "lazy"
112
122
  intro: ""
113
123
  eyebrow: "Eyebrow title"
114
124
  date:
@@ -124,6 +134,8 @@ cardgroup:
124
134
  color: ""
125
135
  - title: "Vertical info card descriptive headline text Vertical info card descriptive headline text Vertical info card descriptive headline text"
126
136
  image: "images/ilo-headquarters.jpg"
137
+ imageAlt: "The alt text of the image"
138
+ loading: "lazy"
127
139
  intro: ""
128
140
  eyebrow: "Eyebrow title"
129
141
  date:
@@ -139,6 +151,8 @@ cardgroup:
139
151
  color: ""
140
152
  - title: "Vertical info card descriptive headline text"
141
153
  image: "/images/youtube-video-poster.avif"
154
+ imageAlt: "The alt text of the image"
155
+ loading: "lazy"
142
156
  intro: ""
143
157
  eyebrow: "Eyebrow title"
144
158
  date:
@@ -161,6 +175,8 @@ cardgroup:
161
175
  group:
162
176
  - title: "Horizontal info card descriptive headline text"
163
177
  image: "/images/ilo-headquarters.jpg"
178
+ imageAlt: "The alt text of the image"
179
+ loading: "lazy"
164
180
  intro: "This ILO flagship report details the effects of the COVID-19 crisis on the world of work. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eu auctor tusrpis, this is 200 characters."
165
181
  eyebrow: "Eyebrow title"
166
182
  date:
@@ -177,6 +193,8 @@ cardgroup:
177
193
  color: ""
178
194
  - title: "Horizontal info card descriptive headline text"
179
195
  image: "/images/small.jpg"
196
+ imageAlt: "The alt text of the image"
197
+ loading: "lazy"
180
198
  intro: "This ILO flagship report details the effects of the COVID-19 crisis on the world of work. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum eu auctor tusrpis, this is 200 characters."
181
199
  eyebrow: "Eyebrow title"
182
200
  date:
@@ -335,6 +353,8 @@ cardgroup:
335
353
  group:
336
354
  - title: ""
337
355
  image: "/images/small.jpg"
356
+ imageAlt: "The alt text of the image"
357
+ loading: "lazy"
338
358
  intro: ""
339
359
  eyebrow: "Event details"
340
360
  date: ""
@@ -6,7 +6,6 @@ Drupal.behaviors.fileupload = {
6
6
  document.querySelectorAll(`[data-loadcomponent="FileUpload"]`),
7
7
  (element) => {
8
8
  // eslint-disable-next-line no-console
9
- console.log("loading FileUpload component....");
10
9
  new FileUpload(element);
11
10
  }
12
11
  );
@@ -6,7 +6,12 @@
6
6
  <picture class="{{prefix}}--image--img" {% if credit and ishero and ishero != 'false' %}title="{{credit}}"{% endif %}>
7
7
  {% for img in url|reverse %}
8
8
  {% if loop.last == false %}
9
- <source srcset="{{img.src}}" media="(min-width: {{img.breakpoint}}px)">
9
+ {% if img.breakpoint matches '/^\\d+$/' %}
10
+ <source srcset="{{img.src}}" media="(min-width: {{img.breakpoint}}px)">
11
+ {% else %}
12
+ <source srcset="{{img.src}}" media="{{img.breakpoint}}">
13
+ {% endif %}
14
+ <source srcset="{{img.src}}" media="{{img.breakpoint}}">
10
15
  {% endif %}
11
16
  {% endfor %}
12
17
  <img src="{{url|reverse|last.src}}" alt="{{alt}}" {% if loading %}loading="{{ loading }}"{% endif %}>
@@ -32,16 +32,16 @@ image:
32
32
  url:
33
33
  type: object
34
34
  label: URL
35
- description: The image url(s), and at which breakpoint each should be displayed.
35
+ description: The image url(s), and at which breakpoint each should be displayed. This is a list of objects, each with a breakpoint and src property. The `src`` property is the url of the image, and the `breakpoint` property can be either a media query string or an integer that will be supplied to a `min-width` media query. The first url object in the list is the default image, and will be used if no other breakpoint matches.
36
36
  required: true
37
37
  preview:
38
- - breakpoint: 0
38
+ - breakpoint: "(min-width: 0px)"
39
39
  src: "/images/small.jpg"
40
- - breakpoint: 800
40
+ - breakpoint: "(min-width: 800px)"
41
41
  src: "/images/medium.jpg"
42
- - breakpoint: 1200
42
+ - breakpoint: "(min-width: 1200px)"
43
43
  src: "/images/large.jpg"
44
- - breakpoint: 1440
44
+ - breakpoint: "(min-width: 1440px)"
45
45
  src: "/images/large.jpg"
46
46
  settings:
47
47
  ishero:
@@ -5,11 +5,10 @@ Drupal.behaviors.loading = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="Loading"]`),
7
7
  (element) => {
8
- if(!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- console.log("loading Loading component....");
11
- new Loading(element);
12
- element.dataset.jsProcessed = true;
8
+ if (!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ new Loading(element);
11
+ element.dataset.jsProcessed = true;
13
12
  }
14
13
  }
15
14
  );
@@ -5,11 +5,10 @@ Drupal.behaviors.modal = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="Modal"]`),
7
7
  (element) => {
8
- if(!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- console.log("loading Modal component....");
11
- new Modal(element);
12
- element.dataset.jsProcessed = true;
8
+ if (!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ new Modal(element);
11
+ element.dataset.jsProcessed = true;
13
12
  }
14
13
  }
15
14
  );
@@ -7,7 +7,6 @@ Drupal.behaviors.navigation = {
7
7
  (element) => {
8
8
  if (!element.dataset.jsProcessed) {
9
9
  // eslint-disable-next-line no-console
10
- console.log("loading Navigation component....");
11
10
  new Navigation(element);
12
11
  element.dataset.jsProcessed = true;
13
12
  }
@@ -7,7 +7,6 @@ Drupal.behaviors.notification = {
7
7
  (element) => {
8
8
  if (!element.dataset.jsProcessed) {
9
9
  // eslint-disable-next-line no-console
10
- console.log("loading Notification component....");
11
10
  new Notification(element);
12
11
  element.dataset.jsProcessed = true;
13
12
  }
@@ -5,12 +5,11 @@ Drupal.behaviors.readmore = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="ReadMore"]`),
7
7
  (element) => {
8
- if(!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- console.log("loading ReadMore component....");
11
- new ReadMore(element);
12
- element.dataset.jsProcessed = true;
13
- }
8
+ if (!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ new ReadMore(element);
11
+ element.dataset.jsProcessed = true;
12
+ }
14
13
  }
15
14
  );
16
15
  },
@@ -5,12 +5,11 @@ Drupal.behaviors.table = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="Table"]`),
7
7
  (element) => {
8
- if(!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- console.log("loading Table component....");
11
- new Table(element);
12
- element.dataset.jsProcessed = true;
13
- }
8
+ if (!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ new Table(element);
11
+ element.dataset.jsProcessed = true;
12
+ }
14
13
  }
15
14
  );
16
15
  },
@@ -5,12 +5,11 @@ Drupal.behaviors.tableofcontents = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="TableOfContents"]`),
7
7
  (element) => {
8
- if(!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- console.log("loading TableOfContents component....");
11
- new TableOfContents(element);
12
- element.dataset.jsProcessed = true;
13
- }
8
+ if (!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ new TableOfContents(element);
11
+ element.dataset.jsProcessed = true;
12
+ }
14
13
  }
15
14
  );
16
15
  },
@@ -6,23 +6,21 @@ Drupal.behaviors.tabs = {
6
6
  Array.prototype.forEach.call(
7
7
  document.querySelectorAll(`[data-loadcomponent="Tabs"]`),
8
8
  (element) => {
9
- if(!element.dataset.jsProcessed) {
10
- // eslint-disable-next-line no-console
11
- console.log("loading Tabs component....");
12
- new Tabs(element);
13
- element.dataset.jsProcessed = true;
14
- }
9
+ if (!element.dataset.jsProcessed) {
10
+ // eslint-disable-next-line no-console
11
+ new Tabs(element);
12
+ element.dataset.jsProcessed = true;
13
+ }
15
14
  }
16
15
  );
17
16
  Array.prototype.forEach.call(
18
17
  document.querySelectorAll(`[data-loadcomponent="Tooltip"]`),
19
18
  (element) => {
20
- if(!element.dataset.jsProcessed) {
21
- // eslint-disable-next-line no-console
22
- console.log("loading Tooltip component....");
23
- new Tooltip(element);
24
- element.dataset.jsProcessed = true;
25
- }
19
+ if (!element.dataset.jsProcessed) {
20
+ // eslint-disable-next-line no-console
21
+ new Tooltip(element);
22
+ element.dataset.jsProcessed = true;
23
+ }
26
24
  }
27
25
  );
28
26
  },
@@ -121,7 +121,6 @@ export default class Tabs {
121
121
  onKeyPress(e) {
122
122
  let flag = false;
123
123
  const tabid = e.currentTarget.getAttribute(ARIA.CONTROLS);
124
- console.log(e.key);
125
124
 
126
125
  switch (e.key) {
127
126
  case "ArrowLeft":
@@ -5,12 +5,11 @@ Drupal.behaviors.tag = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="Tag"]`),
7
7
  (element) => {
8
- if(!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- console.log("loading Tag component....");
11
- new Tag(element);
12
- element.dataset.jsProcessed = true;
13
- }
8
+ if (!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ new Tag(element);
11
+ element.dataset.jsProcessed = true;
12
+ }
14
13
  }
15
14
  );
16
15
  },
@@ -113,7 +113,6 @@ export default class Tag {
113
113
  });
114
114
 
115
115
  // this.updateTagItems();
116
- console.log(id);
117
116
  this.removeParentDom(id);
118
117
 
119
118
  return this;
@@ -5,12 +5,11 @@ Drupal.behaviors.tooltip = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="Tooltip"]`),
7
7
  (element) => {
8
- if(!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- console.log("loading Tooltip component....");
11
- new Tooltip(element);
12
- element.dataset.jsProcessed = true;
13
- }
8
+ if (!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ new Tooltip(element);
11
+ element.dataset.jsProcessed = true;
12
+ }
14
13
  }
15
14
  );
16
15
  },
@@ -5,12 +5,11 @@ Drupal.behaviors.media = {
5
5
  Array.prototype.forEach.call(
6
6
  document.querySelectorAll(`[data-loadcomponent="Video"]`),
7
7
  (element) => {
8
- if(!element.dataset.jsProcessed) {
9
- // eslint-disable-next-line no-console
10
- console.log("loading Video component....");
11
- new Video(element);
12
- element.dataset.jsProcessed = true;
13
- }
8
+ if (!element.dataset.jsProcessed) {
9
+ // eslint-disable-next-line no-console
10
+ new Video(element);
11
+ element.dataset.jsProcessed = true;
12
+ }
14
13
  }
15
14
  );
16
15
  },
@@ -86,8 +86,6 @@ export default class Video {
86
86
  * @chainable
87
87
  */
88
88
  start() {
89
- console.log("this.VideoElement", this.VideoElement);
90
-
91
89
  this.player = videojs(this.VideoElement, {
92
90
  autoplay: false,
93
91
  controls: true,
@@ -108,6 +106,9 @@ export default class Video {
108
106
  errorDisplay: false,
109
107
  textTrackSettings: false,
110
108
  resizeManager: false,
109
+ sources: [
110
+ { type: this.element.dataset.vjsType, src: this.element.dataset.src },
111
+ ],
111
112
  });
112
113
 
113
114
  return this;
@@ -4,7 +4,6 @@
4
4
  {% set poster = url|last %}
5
5
  <div class="{{prefix}}--videoplayer" data-loadcomponent="Video" data-prefix="{{prefix}}"">
6
6
  <video class="{{prefix}}--video--element" poster="{{poster.src}}">
7
- <source src="{{src}}" />
8
7
  </video>
9
8
  </div>
10
9