@ilo-org/twig 0.3.1 → 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.
- package/.turbo/turbo-build:lib.log +2 -2
- package/CHANGELOG.md +16 -0
- package/package.json +2 -2
- package/src/patterns/components/accordion/accordion.behavior.js +5 -6
- package/src/patterns/components/accordion/accordion.js +0 -1
- package/src/patterns/components/breadcrumb/breadcrumb.behavior.js +5 -6
- package/src/patterns/components/callout/callout.behavior.js +5 -6
- package/src/patterns/components/callout/callout.js +0 -2
- package/src/patterns/components/card/card.twig +7 -3
- package/src/patterns/components/card/card.wingsuit.yml +5 -5
- package/src/patterns/components/cardgroup/cardgroup.twig +2 -0
- package/src/patterns/components/cardgroup/cardgroup.wingsuit.yml +20 -0
- package/src/patterns/components/form/fileupload.behavior.js +0 -1
- package/src/patterns/components/image/image.twig +6 -1
- package/src/patterns/components/image/image.wingsuit.yml +5 -5
- package/src/patterns/components/loading/loading.behavior.js +4 -5
- package/src/patterns/components/modal/modal.behavior.js +4 -5
- package/src/patterns/components/navigation/navigation.behavior.js +0 -1
- package/src/patterns/components/notification/notification.behavior.js +0 -1
- package/src/patterns/components/readmore/readmore.behavior.js +5 -6
- package/src/patterns/components/table/table.behavior.js +5 -6
- package/src/patterns/components/tableofcontents/tableofcontents.behavior.js +5 -6
- package/src/patterns/components/tabs/tabs.behavior.js +10 -12
- package/src/patterns/components/tabs/tabs.js +0 -1
- package/src/patterns/components/tags/tag.behavior.js +5 -6
- package/src/patterns/components/tags/tag.js +0 -1
- package/src/patterns/components/tooltip/tooltip.behavior.js +5 -6
- package/src/patterns/components/video/video.behavior.js +5 -6
- package/src/patterns/components/video/video.js +3 -2
- package/src/patterns/components/video/videoplayer.twig +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @ilo-org/twig@0.
|
|
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.
|
|
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,21 @@
|
|
|
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
|
+
|
|
3
19
|
## 0.3.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilo-org/twig",
|
|
3
|
-
"version": "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.
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
},
|
|
@@ -5,12 +5,11 @@ Drupal.behaviors.breadcrumb = {
|
|
|
5
5
|
Array.prototype.forEach.call(
|
|
6
6
|
document.querySelectorAll(`[data-loadcomponent="Breadcrumb"]`),
|
|
7
7
|
(element) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
},
|
|
@@ -16,14 +16,18 @@
|
|
|
16
16
|
<picture>
|
|
17
17
|
{% for img in image|reverse %}
|
|
18
18
|
{% if loop.last == false %}
|
|
19
|
-
|
|
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,15 +33,15 @@ card:
|
|
|
33
33
|
image:
|
|
34
34
|
type: object
|
|
35
35
|
label: Image
|
|
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 indicating the minimum viewport width at which the image should be displayed. For static images, this can be a string pointing to the image file.
|
|
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
37
|
preview:
|
|
38
|
-
- breakpoint:
|
|
38
|
+
- breakpoint: "(min-width: 0px)"
|
|
39
39
|
src: "/images/small.jpg"
|
|
40
|
-
- breakpoint:
|
|
40
|
+
- breakpoint: "(min-width: 800px)"
|
|
41
41
|
src: "/images/medium.jpg"
|
|
42
|
-
- breakpoint:
|
|
42
|
+
- breakpoint: "(min-width: 1200px)"
|
|
43
43
|
src: "/images/large.jpg"
|
|
44
|
-
- breakpoint:
|
|
44
|
+
- breakpoint: "(min-width: 1440px)"
|
|
45
45
|
src: "/images/large.jpg"
|
|
46
46
|
imageAlt:
|
|
47
47
|
type: string
|
|
@@ -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,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
|
-
|
|
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:
|
|
38
|
+
- breakpoint: "(min-width: 0px)"
|
|
39
39
|
src: "/images/small.jpg"
|
|
40
|
-
- breakpoint:
|
|
40
|
+
- breakpoint: "(min-width: 800px)"
|
|
41
41
|
src: "/images/medium.jpg"
|
|
42
|
-
- breakpoint:
|
|
42
|
+
- breakpoint: "(min-width: 1200px)"
|
|
43
43
|
src: "/images/large.jpg"
|
|
44
|
-
- breakpoint:
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
);
|
|
@@ -5,12 +5,11 @@ Drupal.behaviors.readmore = {
|
|
|
5
5
|
Array.prototype.forEach.call(
|
|
6
6
|
document.querySelectorAll(`[data-loadcomponent="ReadMore"]`),
|
|
7
7
|
(element) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
},
|
|
@@ -5,12 +5,11 @@ Drupal.behaviors.tag = {
|
|
|
5
5
|
Array.prototype.forEach.call(
|
|
6
6
|
document.querySelectorAll(`[data-loadcomponent="Tag"]`),
|
|
7
7
|
(element) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
},
|
|
@@ -5,12 +5,11 @@ Drupal.behaviors.tooltip = {
|
|
|
5
5
|
Array.prototype.forEach.call(
|
|
6
6
|
document.querySelectorAll(`[data-loadcomponent="Tooltip"]`),
|
|
7
7
|
(element) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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;
|