Update svelte and rollup

This commit is contained in:
rxdn 2022-06-04 23:18:25 +01:00
parent 042a25f90a
commit bef65fb494
5 changed files with 38 additions and 22 deletions

View File

@ -22,12 +22,12 @@
"@rollup/plugin-json": "^4.1.0", "@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.0", "@rollup/plugin-node-resolve": "^11.0.0",
"@rollup/plugin-replace": "^2.4.2", "@rollup/plugin-replace": "^2.4.2",
"rollup": "^2.3.4", "rollup": "^2.75.5",
"rollup-plugin-css-only": "^3.1.0", "rollup-plugin-css-only": "^3.1.0",
"rollup-plugin-livereload": "^2.0.0", "rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-svelte": "^7.0.0", "rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-terser": "^7.0.0", "rollup-plugin-terser": "^7.0.0",
"svelte": "^3.0.0" "svelte": "^3.48.0"
} }
}, },
"node_modules/@babel/code-frame": { "node_modules/@babel/code-frame": {
@ -2880,9 +2880,9 @@
} }
}, },
"node_modules/rollup": { "node_modules/rollup": {
"version": "2.50.4", "version": "2.75.5",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.50.4.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.5.tgz",
"integrity": "sha512-mBQa9O6bdqur7a6R+TXcbdYgfO2arXlDG+rSrWfwAvsiumpJjD4OS23R9QuhItuz8ysWb8mZ91CFFDQUhJY+8Q==", "integrity": "sha512-JzNlJZDison3o2mOxVmb44Oz7t74EfSd1SQrplQk0wSaXV7uLQXtVdHbxlcT3w+8tZ1TL4r/eLfc7nAbz38BBA==",
"dev": true, "dev": true,
"bin": { "bin": {
"rollup": "dist/bin/rollup" "rollup": "dist/bin/rollup"
@ -2891,7 +2891,7 @@
"node": ">=10.0.0" "node": ">=10.0.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"fsevents": "~2.3.1" "fsevents": "~2.3.2"
} }
}, },
"node_modules/rollup-plugin-css-only": { "node_modules/rollup-plugin-css-only": {
@ -3122,9 +3122,9 @@
} }
}, },
"node_modules/svelte": { "node_modules/svelte": {
"version": "3.38.2", "version": "3.48.0",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.38.2.tgz", "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.48.0.tgz",
"integrity": "sha512-q5Dq0/QHh4BLJyEVWGe7Cej5NWs040LWjMbicBGZ+3qpFWJ1YObRmUDZKbbovddLC9WW7THTj3kYbTOFmU9fbg==", "integrity": "sha512-fN2YRm/bGumvjUpu6yI3BpvZnpIm9I6A7HR4oUNYd7ggYyIwSA/BX7DJ+UXXffLp6XNcUijyLvttbPVCYa/3xQ==",
"engines": { "engines": {
"node": ">= 8" "node": ">= 8"
} }
@ -5377,12 +5377,12 @@
} }
}, },
"rollup": { "rollup": {
"version": "2.50.4", "version": "2.75.5",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-2.50.4.tgz", "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.75.5.tgz",
"integrity": "sha512-mBQa9O6bdqur7a6R+TXcbdYgfO2arXlDG+rSrWfwAvsiumpJjD4OS23R9QuhItuz8ysWb8mZ91CFFDQUhJY+8Q==", "integrity": "sha512-JzNlJZDison3o2mOxVmb44Oz7t74EfSd1SQrplQk0wSaXV7uLQXtVdHbxlcT3w+8tZ1TL4r/eLfc7nAbz38BBA==",
"dev": true, "dev": true,
"requires": { "requires": {
"fsevents": "~2.3.1" "fsevents": "~2.3.2"
} }
}, },
"rollup-plugin-css-only": { "rollup-plugin-css-only": {
@ -5553,9 +5553,9 @@
} }
}, },
"svelte": { "svelte": {
"version": "3.38.2", "version": "3.48.0",
"resolved": "https://registry.npmjs.org/svelte/-/svelte-3.38.2.tgz", "resolved": "https://registry.npmjs.org/svelte/-/svelte-3.48.0.tgz",
"integrity": "sha512-q5Dq0/QHh4BLJyEVWGe7Cej5NWs040LWjMbicBGZ+3qpFWJ1YObRmUDZKbbovddLC9WW7THTj3kYbTOFmU9fbg==" "integrity": "sha512-fN2YRm/bGumvjUpu6yI3BpvZnpIm9I6A7HR4oUNYd7ggYyIwSA/BX7DJ+UXXffLp6XNcUijyLvttbPVCYa/3xQ=="
}, },
"svelte-click-outside": { "svelte-click-outside": {
"version": "1.0.0", "version": "1.0.0",

View File

@ -15,12 +15,12 @@
"@rollup/plugin-json": "^4.1.0", "@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.0", "@rollup/plugin-node-resolve": "^11.0.0",
"@rollup/plugin-replace": "^2.4.2", "@rollup/plugin-replace": "^2.4.2",
"rollup": "^2.3.4", "rollup": "^2.75.5",
"rollup-plugin-css-only": "^3.1.0", "rollup-plugin-css-only": "^3.1.0",
"rollup-plugin-livereload": "^2.0.0", "rollup-plugin-livereload": "^2.0.0",
"rollup-plugin-svelte": "^7.0.0", "rollup-plugin-svelte": "^7.1.0",
"rollup-plugin-terser": "^7.0.0", "rollup-plugin-terser": "^7.0.0",
"svelte": "^3.0.0" "svelte": "^3.48.0"
}, },
"dependencies": { "dependencies": {
"axios": "^0.21.4", "axios": "^0.21.4",

View File

@ -61,7 +61,7 @@ export default {
}), }),
commonjs({ sourceMap: false }), commonjs({ sourceMap: false }),
json(), json(),
babel({ production && babel({
babelHelpers: 'bundled', babelHelpers: 'bundled',
extensions: ['.js', '.mjs', '.html', '.svelte'], extensions: ['.js', '.mjs', '.html', '.svelte'],
include: ['src/**', 'node_modules/svelte/**'], include: ['src/**', 'node_modules/svelte/**'],

View File

@ -1,6 +1,6 @@
<Dropdown {col1} {col2} {col3} {col4} bind:value label={label}> <Dropdown {col1} {col2} {col3} {col4} bind:value label={label}>
{#if withNull} {#if withNull}
<option value="null"> <option value=null>
{nullLabel} {nullLabel}
</option> </option>
{/if} {/if}
@ -22,8 +22,16 @@
export let withNull = false; export let withNull = false;
export let nullLabel = "Disabled"; export let nullLabel = "Disabled";
$: value, ensureStringified();
export let col1 = false; export let col1 = false;
export let col2 = false; export let col2 = false;
export let col3 = false; export let col3 = false;
export let col4 = false; export let col4 = false;
function ensureStringified() {
if (value === null) {
value = "null";
}
}
</script> </script>

View File

@ -20,6 +20,14 @@
export let allowNone = false; export let allowNone = false;
export let panels = []; export let panels = [];
$: value, ensureStringified();
function ensureStringified() {
if (value === null) {
value = "null";
}
}
export let col1 = false; export let col1 = false;
export let col2 = false; export let col2 = false;
export let col3 = false; export let col3 = false;