Skip to content

Commit 704b0b9

Browse files
author
Marko Petzold
committed
refactor: update package dependencies and scripts
- Changed the start script to run concurrently with watch and wds. - Updated dependencies in package.json, including: - lit to version 3.3.0 - @custom-elements-manifest/analyzer to version 0.10.4 - rollup to version 4.43.0 - typescript to version 5.8.3 - eslint and related packages to latest versions. - Removed headerBackground from default-data.json. - Enhanced widget-table.ts to support theme properties and dynamic styling based on theme.
1 parent c6aac29 commit 704b0b9

File tree

7 files changed

+1405
-647
lines changed

7 files changed

+1405
-647
lines changed

demo/index.html

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,14 @@
1010
padding: 0;
1111
width: 100%;
1212
height: 100%;
13+
background-color: aliceblue;
1314
}
1415

1516
* {
1617
width: 100%;
1718
height: 100%;
1819
}
1920
</style>
20-
<link
21-
rel="stylesheet"
22-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200"
23-
/>
2421
</head>
2522

2623
<body>
@@ -29,23 +26,27 @@
2926

3027
<script type="module">
3128
import { html, render } from 'lit'
32-
import '../dist/src/widget-table.js'
33-
const response = await fetch('../src/default-data.json')
34-
const data = await response.json()
35-
29+
import '../dist/widget-table.js'
30+
const data = await fetch('../src/default-data.json').then((res) => res.json())
31+
const themeObject = await fetch('themes/vintage.json').then((res) => res.json())
32+
const theme = { theme_name: 'vintage', theme_object: themeObject }
33+
render(
34+
html`
35+
<widget-table-1.1.4 .theme="${theme}" .inputData=${data}>
36+
web component is not registered. Make sure to use the tag with the correct version
37+
string from the package.json
38+
</widget-table-1.1.4>
39+
`,
40+
document.getElementById('demo')
41+
)
42+
const widget = document.getElementById('demo').children[0]
3643
const keyPathsToRandomize = ['table.rows.0.1', 'table.rows.1.1', 'settings.title']
37-
setInterval(() => {
44+
const inter = setInterval(() => {
3845
const randomizedObj = randomizeObjectValues(data, keyPathsToRandomize)
3946

40-
// console.log('random', randomizedObj.dataseries[0].data[0]);
41-
render(
42-
html`
43-
<widget-table-versionplaceholder .inputData=${randomizedObj}>
44-
some light-dom
45-
</widget-table-versionplaceholder>
46-
`,
47-
document.querySelector('#demo')
48-
)
47+
// console.log('random', randomizedObj.dataseries[0].data[0])
48+
widget.inputData = randomizedObj
49+
// clearInterval(inter)
4950
}, 1000)
5051
</script>
5152
</body>

0 commit comments

Comments
 (0)