hr-design-system-handlebars 1.67.6 → 1.67.8
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/CHANGELOG.md +25 -0
- package/dist/assets/icons/icons/svgmap/print.svg +16 -16
- package/dist/assets/icons/icons/svgmap.min.svg +1 -1
- package/dist/assets/index.css +3 -3
- package/dist/assets/js/components/externalService/dataWrapperContentRefresher.subfeature.js +23 -5
- package/dist/assets/js/components/externalService/externalServiceDs.feature.js +47 -15
- package/dist/views/components/externalService/external_service_with_datapolicy_check.hbs +3 -2
- package/dist/views_static/components/externalService/external_service_with_datapolicy_check.hbs +3 -2
- package/package.json +1 -1
- package/src/assets/icons/icons/svgmap/print.svg +16 -16
- package/src/assets/icons/icons/svgmap.min.svg +1 -1
- package/src/stories/views/components/externalService/dataWrapperContentRefresher.subfeature.js +23 -5
- package/src/stories/views/components/externalService/externalServiceDs.feature.js +47 -15
- package/src/stories/views/components/externalService/external_service_with_datapolicy_check.hbs +3 -2
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
|
|
2
|
-
const DataWrapperContentRefresher = function (context, id, refreshIntervall) {
|
|
2
|
+
const DataWrapperContentRefresher = function (context, id, refreshIntervall, webcomponent) {
|
|
3
3
|
const { element: rootElement } = context
|
|
4
4
|
let remainingTime
|
|
5
5
|
let timer
|
|
6
6
|
let uniqueID = id
|
|
7
7
|
let intervall = refreshIntervall
|
|
8
|
+
|
|
9
|
+
if (webcomponent) {
|
|
10
|
+
let container = document.getElementById('datawrapper-chart-' + uniqueID)
|
|
11
|
+
let script = document.getElementById('datawrapper-component-js')
|
|
12
|
+
}
|
|
13
|
+
else{
|
|
8
14
|
let iframeRefresh = document.getElementById('datawrapper-chart-' + uniqueID)
|
|
15
|
+
}
|
|
9
16
|
|
|
10
17
|
const createRefresher = function () {
|
|
11
18
|
console.log("Refresher bauen")
|
|
@@ -45,15 +52,26 @@ const DataWrapperContentRefresher = function (context, id, refreshIntervall) {
|
|
|
45
52
|
|
|
46
53
|
const refreshIframe = function () {
|
|
47
54
|
console.log('Reload')
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
if(webcomponent) {
|
|
56
|
+
container.style.opacity = '0'
|
|
57
|
+
script.src = script.src.split('?')[0] + '?_=' + new Date().getTime()
|
|
58
|
+
}
|
|
59
|
+
else{
|
|
60
|
+
iframeRefresh.style.opacity = '0'
|
|
61
|
+
iframeRefresh.src =
|
|
62
|
+
iframeRefresh.src.split('?')[0] + '?_=' + new Date().getTime()
|
|
63
|
+
}
|
|
51
64
|
clearInterval(timer)
|
|
52
65
|
}
|
|
53
66
|
const startCountdown = function () {
|
|
54
67
|
remainingTime = Number(intervall)
|
|
55
68
|
setTimeout(function () {
|
|
56
|
-
|
|
69
|
+
if(webcomponent) {
|
|
70
|
+
container.style.opacity = '1'
|
|
71
|
+
}
|
|
72
|
+
else{
|
|
73
|
+
iframeRefresh.style.opacity = '1'
|
|
74
|
+
}
|
|
57
75
|
document.getElementById('overlay' + uniqueID).style.display = 'none'
|
|
58
76
|
}, 1000)
|
|
59
77
|
timer = setInterval(function () {
|
|
@@ -172,19 +172,11 @@ const ExternalService = function (context) {
|
|
|
172
172
|
const createDataWrapperEmbed = function () {
|
|
173
173
|
removeDatapolicyBox()
|
|
174
174
|
createUniqueID()
|
|
175
|
-
if (iFrameConfig.
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
if (iFrameConfig.refreshContent == 'true') {
|
|
180
|
-
console.log("contentRefresher anfügen")
|
|
181
|
-
contentRefresher = new DataWrapperContentRefresher(context, uniqueId, iFrameConfig.refreshIntervall)
|
|
182
|
-
contentRefresher.createRefresher()
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
else {
|
|
175
|
+
if (iFrameConfig.responsiveIframe == 'true') {
|
|
176
|
+
|
|
177
|
+
//Responsives Iframe
|
|
186
178
|
var iframe = document.createElement('iframe')
|
|
187
|
-
|
|
179
|
+
//Auflösen nach Tailwind-Klassen //dataWrapper-embed
|
|
188
180
|
iframe.className = 'w-0 !min-w-full border-0'
|
|
189
181
|
iframe.setAttribute('webkitallowfullscreen', '')
|
|
190
182
|
iframe.setAttribute('mozallowfullscreen', '')
|
|
@@ -199,13 +191,53 @@ const ExternalService = function (context) {
|
|
|
199
191
|
'datawrapper-js',
|
|
200
192
|
'https://static.hr.de/hessenschau/datawrapper/responsiveIframe.js',
|
|
201
193
|
true
|
|
202
|
-
)
|
|
203
|
-
|
|
194
|
+
)
|
|
204
195
|
if (iFrameConfig.refreshContent == 'true') {
|
|
205
196
|
console.log("contentRefresher anfügen")
|
|
206
|
-
contentRefresher = new DataWrapperContentRefresher(context, uniqueId, iFrameConfig.refreshIntervall)
|
|
197
|
+
contentRefresher = new DataWrapperContentRefresher(context, uniqueId, iFrameConfig.refreshIntervall, false)
|
|
207
198
|
contentRefresher.createRefresher()
|
|
208
199
|
}
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
if(iFrameConfig.webcomponent == 'true') {
|
|
203
|
+
|
|
204
|
+
// Webcomponent
|
|
205
|
+
const divTag = document.createElement('div')
|
|
206
|
+
divTag.id = 'datawrapper-chart-' + uniqueID
|
|
207
|
+
rootElement.insertBefore(divTag, null)
|
|
208
|
+
const scriptTag = document.createElement('script')
|
|
209
|
+
scriptTag.setAttribute('id', 'datawrapper-component-js')
|
|
210
|
+
scriptTag.setAttribute('type', 'text/javascript')
|
|
211
|
+
scriptTag.setAttribute('defer', 'defer')
|
|
212
|
+
scriptTag.setAttribute('src', embedCode + 'embed.js?v=1')
|
|
213
|
+
scriptTag.setAttribute('charset', 'utf-8')
|
|
214
|
+
const noScriptTag = document.createElement('noscript')
|
|
215
|
+
const imageTag = document.createElement('img')
|
|
216
|
+
imageTag.src = embedCode + 'full.png'
|
|
217
|
+
imageTag.alt = ''
|
|
218
|
+
noScriptTag.appendChild(imageTag)
|
|
219
|
+
divTag.appendChild(scriptTag)
|
|
220
|
+
divTag.appendChild(noScriptTag)
|
|
221
|
+
|
|
222
|
+
if (iFrameConfig.refreshContent == 'true') {
|
|
223
|
+
console.log("contentRefresher anfügen")
|
|
224
|
+
contentRefresher = new DataWrapperContentRefresher(context, uniqueId, iFrameConfig.refreshIntervall, true)
|
|
225
|
+
contentRefresher.createRefresher()
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
else {
|
|
229
|
+
//Klassisches Iframe mit AR-Wrapper oder fester Höhe
|
|
230
|
+
noResponsiveIframe = new DataWrapperNoResponsiveIframe(context, iFrameConfig.aspectRatio, iFrameConfig.fixedHeight, uniqueId, embedCode)
|
|
231
|
+
noResponsiveIframe.createNoResponsiveIframe()
|
|
232
|
+
|
|
233
|
+
if (iFrameConfig.refreshContent == 'true') {
|
|
234
|
+
console.log("contentRefresher anfügen")
|
|
235
|
+
contentRefresher = new DataWrapperContentRefresher(context, uniqueId, iFrameConfig.refreshIntervall, false)
|
|
236
|
+
contentRefresher.createRefresher()
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
|
|
209
241
|
}
|
|
210
242
|
}
|
|
211
243
|
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<div class="grid clear-both{{#unless _isTeaser}} mt-10{{/unless}}">
|
|
2
2
|
{{~> components/base/a11y/hiddenText _locaTag="story_externalservice_intro_sr" ~}}
|
|
3
|
-
<div class="c-externalService c-externalService__{{this.externalServiceConfig.externalServiceId}}
|
|
3
|
+
<div class="c-externalService c-externalService__{{this.externalServiceConfig.externalServiceId}}{{#unless
|
|
4
|
+
this.fixedHeight }} -noFixedHeight{{/unless}} js-load"
|
|
4
5
|
data-hr-external-service-ds='{"id":"{{this.externalServiceConfig.externalServiceId}}","embedCode":"{{this.serviceUrl}}","embedType":"{{this.externalServiceConfig.externalServiceEmbedType}}","dataPolicyCheck": true,"iFrameConfig": { {{#if this.fixedHeight}}
|
|
5
|
-
"fixedHeight":"{{this.fixedHeight}}"{{else}}{{#if this.aspectRatio}}"aspectRatio":"{{this.aspectRatio}}"{{else}}"aspectRatio":"16x9"{{/if}}{{/if}},"
|
|
6
|
+
"fixedHeight":"{{this.fixedHeight}}"{{else}}{{#if this.aspectRatio}}"aspectRatio":"{{this.aspectRatio}}"{{else}}"aspectRatio":"16x9"{{/if}}{{/if}},"responsiveIframe":"{{{this.setResponsiveIframe}}}","webcomponent":"{{{this.setWebcomponent}}}"{{#if this.setTimedReloadIframe}},"refreshContent":"{{{this.setTimedReloadIframe}}}","refreshIntervall":"{{this.setTimeForReload}}"{{/if}} }}'>
|
|
6
7
|
{{~> components/externalService/components/external_service_data_policy ~}}
|
|
7
8
|
</div>
|
|
8
9
|
{{~> components/externalService/components/external_service_caption ~}}
|
package/dist/views_static/components/externalService/external_service_with_datapolicy_check.hbs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
<div class="grid clear-both{{#unless _isTeaser}} mt-10{{/unless}}">
|
|
2
2
|
{{~> components/base/a11y/hiddenText _locaTag="story_externalservice_intro_sr" ~}}
|
|
3
|
-
<div class="c-externalService c-externalService__{{this.externalServiceConfig.externalServiceId}}
|
|
3
|
+
<div class="c-externalService c-externalService__{{this.externalServiceConfig.externalServiceId}}{{#unless
|
|
4
|
+
this.fixedHeight }} -noFixedHeight{{/unless}} js-load"
|
|
4
5
|
data-hr-external-service-ds='{"id":"{{this.externalServiceConfig.externalServiceId}}","embedCode":"{{this.serviceUrl}}","embedType":"{{this.externalServiceConfig.externalServiceEmbedType}}","dataPolicyCheck": true,"iFrameConfig": { {{#if this.fixedHeight}}
|
|
5
|
-
"fixedHeight":"{{this.fixedHeight}}"{{else}}{{#if this.aspectRatio}}"aspectRatio":"{{this.aspectRatio}}"{{else}}"aspectRatio":"16x9"{{/if}}{{/if}},"
|
|
6
|
+
"fixedHeight":"{{this.fixedHeight}}"{{else}}{{#if this.aspectRatio}}"aspectRatio":"{{this.aspectRatio}}"{{else}}"aspectRatio":"16x9"{{/if}}{{/if}},"responsiveIframe":"{{{this.setResponsiveIframe}}}","webcomponent":"{{{this.setWebcomponent}}}"{{#if this.setTimedReloadIframe}},"refreshContent":"{{{this.setTimedReloadIframe}}}","refreshIntervall":"{{this.setTimeForReload}}"{{/if}} }}'>
|
|
6
7
|
{{~> components/externalService/components/external_service_data_policy ~}}
|
|
7
8
|
</div>
|
|
8
9
|
{{~> components/externalService/components/external_service_caption ~}}
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"main": "dist/index.js",
|
|
8
8
|
"repository": "https://github.com/szuelch/hr-design-system-handlebars",
|
|
9
|
-
"version": "1.67.
|
|
9
|
+
"version": "1.67.8",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
12
12
|
"storybook": "storybook dev -p 6006 public",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
</svg>
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<!-- Generator: Adobe Illustrator 16.0.3, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
4
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="88px"
|
|
5
|
+
height="88px" viewBox="0 0 88 88" enable-background="new 0 0 88 88" xml:space="preserve">
|
|
6
|
+
<g id="Ebene_1">
|
|
7
|
+
</g>
|
|
8
|
+
<g id="Ebene_2">
|
|
9
|
+
<path d="M0,0v88h88V0H0z M27.644,23.183c0-1.487,1.189-2.378,2.379-2.378h27.954c1.488,0,2.379,1.189,2.379,2.378v1.785
|
|
10
|
+
c0,1.487-1.19,2.378-2.379,2.378H30.022c-1.189,0-2.379-1.189-2.379-2.378V23.183z M53.814,67.195H34.483
|
|
11
|
+
c-1.487,0-2.379-1.188-2.379-2.379V50.244c0-1.486,1.189-2.379,2.379-2.379h19.033c1.488,0,2.379,1.191,2.379,2.379l0.296,14.572
|
|
12
|
+
C56.191,66.305,55.005,67.195,53.814,67.195z M71.359,58.572h-8.92c-1.488,0-2.379-1.189-2.379-2.381V43.404H28.536v12.49
|
|
13
|
+
c0,1.488-1.189,2.379-2.38,2.379H16.64c-1.486,0-2.378-1.188-2.378-2.379V34.483c0-1.487,1.189-2.379,2.378-2.379h54.42
|
|
14
|
+
c1.488,0,2.384,1.19,2.384,2.379l0.295,21.708C73.738,57.678,72.548,58.572,71.359,58.572z"/>
|
|
15
|
+
</g>
|
|
16
|
+
</svg>
|