mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2026-05-24 07:00:27 -04:00
* chore: change snapper to es6 * chore: jimp 1.6.0 * chore: change snapper back * chore: ems import of jimp * chore: ems import of jimp * chore: get rid of jimp * chore: add baseline
42 lines
749 B
JavaScript
42 lines
749 B
JavaScript
const pie = {
|
|
component: {
|
|
mounted(el) {
|
|
el.innerHTML = 'Hello pie'; // eslint-disable-line
|
|
},
|
|
},
|
|
};
|
|
|
|
const bar = function (env) {
|
|
env.translator.add({
|
|
id: 'hello',
|
|
locale: {
|
|
'sv-SE': 'Hej {0}!',
|
|
},
|
|
});
|
|
return {
|
|
component: {
|
|
mounted(el) {
|
|
el.innerHTML = `<div style="font-size: 64px;">${env.translator.get('hello', ['bar'])}</div>`; // eslint-disable-line
|
|
},
|
|
},
|
|
};
|
|
};
|
|
|
|
// eslint-disable-next-line
|
|
const configured = stardust.embed.createConfiguration({
|
|
context: {
|
|
theme: 'dark',
|
|
language: 'sv-SE',
|
|
},
|
|
types: [
|
|
{
|
|
name: 'pie',
|
|
load: () => Promise.resolve(pie),
|
|
},
|
|
{
|
|
name: 'bar',
|
|
load: () => Promise.resolve(bar),
|
|
},
|
|
],
|
|
});
|