npm updates
This commit is contained in:
parent
2d73315a9a
commit
70b431a1c5
|
@ -21,7 +21,7 @@
|
||||||
"@capacitor/ios": "^5.2.2",
|
"@capacitor/ios": "^5.2.2",
|
||||||
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
||||||
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
||||||
"@solid-primitives/i18n": "^1.4.0",
|
"@solid-primitives/i18n": "^1.4.1",
|
||||||
"@solidjs/router": "^0.8.2",
|
"@solidjs/router": "^0.8.2",
|
||||||
"@suid/icons-material": "^0.6.9",
|
"@suid/icons-material": "^0.6.9",
|
||||||
"@suid/material": "^0.14.2",
|
"@suid/material": "^0.14.2",
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
"license-report": "^6.4.0",
|
"license-report": "^6.4.0",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vite": ">=4.4.8",
|
"vite": ">=4.4.9",
|
||||||
"vite-plugin-solid": "^2.7.0",
|
"vite-plugin-solid": "^2.7.0",
|
||||||
"vitest": "^0.34.1"
|
"vitest": "^0.34.1"
|
||||||
}
|
}
|
||||||
|
@ -1496,9 +1496,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@solid-primitives/i18n": {
|
"node_modules/@solid-primitives/i18n": {
|
||||||
"version": "1.4.0",
|
"version": "1.4.1",
|
||||||
"resolved": "https://registry.npmjs.org/@solid-primitives/i18n/-/i18n-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/@solid-primitives/i18n/-/i18n-1.4.1.tgz",
|
||||||
"integrity": "sha512-jKNa9cl9JFnJdYMh8cQUDb8n89Qc6UTJS9Q0DBjx04du86cv9OOCqnbc+xIKJy+QHV7MfBf7KFDdg3sSGwLstA==",
|
"integrity": "sha512-lUUb/hmI77O9oMH8Jj4pPta/pAV21gRgN52UJ7cCXVdv1QkiyzX586gDDU+Tj8NsK/U6OrmMk2tClPwqHAk/xA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@solid-primitives/context": "^0.2.1"
|
"@solid-primitives/context": "^0.2.1"
|
||||||
},
|
},
|
||||||
|
@ -7714,9 +7714,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/rollup": {
|
"node_modules/rollup": {
|
||||||
"version": "3.26.2",
|
"version": "3.27.2",
|
||||||
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.2.tgz",
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.27.2.tgz",
|
||||||
"integrity": "sha512-6umBIGVz93er97pMgQO08LuH3m6PUb3jlDUUGFsNJB6VgTCUaDFpupf5JfU30529m/UKOgmiX+uY6Sx8cOYpLA==",
|
"integrity": "sha512-YGwmHf7h2oUHkVBT248x0yt6vZkYQ3/rvE5iQuVBh3WO8GcJ6BNeOkpoX1yMHIiBm18EMLjBPIoUDkhgnyxGOQ==",
|
||||||
"bin": {
|
"bin": {
|
||||||
"rollup": "dist/bin/rollup"
|
"rollup": "dist/bin/rollup"
|
||||||
},
|
},
|
||||||
|
@ -8881,13 +8881,13 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/vite": {
|
"node_modules/vite": {
|
||||||
"version": "4.4.8",
|
"version": "4.4.9",
|
||||||
"resolved": "https://registry.npmjs.org/vite/-/vite-4.4.8.tgz",
|
"resolved": "https://registry.npmjs.org/vite/-/vite-4.4.9.tgz",
|
||||||
"integrity": "sha512-LONawOUUjxQridNWGQlNizfKH89qPigK36XhMI7COMGztz8KNY0JHim7/xDd71CZwGT4HtSRgI7Hy+RlhG0Gvg==",
|
"integrity": "sha512-2mbUn2LlUmNASWwSCNSJ/EG2HuSRTnVNaydp6vMCm5VIqJsjMfbIWtbH2kDuwUVW5mMUKKZvGPX/rqeqVvv1XA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"esbuild": "^0.18.10",
|
"esbuild": "^0.18.10",
|
||||||
"postcss": "^8.4.26",
|
"postcss": "^8.4.27",
|
||||||
"rollup": "^3.25.2"
|
"rollup": "^3.27.1"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"vite": "bin/vite.js"
|
"vite": "bin/vite.js"
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
"license-report": "^6.4.0",
|
"license-report": "^6.4.0",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"typescript": "^5.1.6",
|
"typescript": "^5.1.6",
|
||||||
"vite": ">=4.4.8",
|
"vite": ">=4.4.9",
|
||||||
"vite-plugin-solid": "^2.7.0",
|
"vite-plugin-solid": "^2.7.0",
|
||||||
"vitest": "^0.34.1"
|
"vitest": "^0.34.1"
|
||||||
},
|
},
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
"@capacitor/ios": "^5.2.2",
|
"@capacitor/ios": "^5.2.2",
|
||||||
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
|
||||||
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
|
||||||
"@solid-primitives/i18n": "^1.4.0",
|
"@solid-primitives/i18n": "^1.4.1",
|
||||||
"@solidjs/router": "^0.8.2",
|
"@solidjs/router": "^0.8.2",
|
||||||
"@suid/icons-material": "^0.6.9",
|
"@suid/icons-material": "^0.6.9",
|
||||||
"@suid/material": "^0.14.2",
|
"@suid/material": "^0.14.2",
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
import { useI18n } from '@solid-primitives/i18n';
|
import { useI18n } from '@solid-primitives/i18n';
|
||||||
import { Box, Button, IconButton, SvgIcon, TextField } from '@suid/material';
|
import {
|
||||||
|
Box,
|
||||||
|
Button,
|
||||||
|
FormControlLabel,
|
||||||
|
IconButton,
|
||||||
|
Radio,
|
||||||
|
RadioGroup,
|
||||||
|
SvgIcon,
|
||||||
|
TextField,
|
||||||
|
} from '@suid/material';
|
||||||
import { cloneDeep, isPlainObject } from 'lodash';
|
import { cloneDeep, isPlainObject } from 'lodash';
|
||||||
import { Component, createSignal, Show } from 'solid-js';
|
import { Component, createSignal, Show } from 'solid-js';
|
||||||
import { newEmptyGpx } from '../../db/gpx';
|
import { newEmptyGpx } from '../../db/gpx';
|
||||||
|
@ -10,6 +19,7 @@ import GpxChooser from '../gpx-chooser';
|
||||||
import GpxIcon from '../gpx/GpxIcon';
|
import GpxIcon from '../gpx/GpxIcon';
|
||||||
//import GpxesIcon from '../../icons/adventure-journey-location-svgrepo-com.svg';
|
//import GpxesIcon from '../../icons/adventure-journey-location-svgrepo-com.svg';
|
||||||
import style from './GpxDialog.module.css';
|
import style from './GpxDialog.module.css';
|
||||||
|
import { getTagValue, getTagsFromObj } from '../../lib/tags/tags';
|
||||||
|
|
||||||
export const [currentGpxId, setCurrentGpxId] = createSignal<string>('new');
|
export const [currentGpxId, setCurrentGpxId] = createSignal<string>('new');
|
||||||
|
|
||||||
|
@ -189,6 +199,23 @@ const GpxDialog: Component<{}> = (props) => {
|
||||||
onChange={gpxDescChangeHandler}
|
onChange={gpxDescChangeHandler}
|
||||||
InputProps={{ inputComponent: 'textarea' }}
|
InputProps={{ inputComponent: 'textarea' }}
|
||||||
/>
|
/>
|
||||||
|
<div>Locomotion</div>
|
||||||
|
<RadioGroup
|
||||||
|
value={
|
||||||
|
getTagValue(getTagsFromObj(gpx()), 'locomotion') || 'hiking'
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<FormControlLabel
|
||||||
|
value='hiking'
|
||||||
|
control={<Radio />}
|
||||||
|
label='Hiking'
|
||||||
|
></FormControlLabel>
|
||||||
|
<FormControlLabel
|
||||||
|
value='cycling'
|
||||||
|
control={<Radio />}
|
||||||
|
label='Cycling'
|
||||||
|
></FormControlLabel>
|
||||||
|
</RadioGroup>
|
||||||
<TextField
|
<TextField
|
||||||
label={t('gpxTo')}
|
label={t('gpxTo')}
|
||||||
multiline={true}
|
multiline={true}
|
||||||
|
|
|
@ -13,3 +13,28 @@ export const getTagsFromObj = (obj: any) => {
|
||||||
|
|
||||||
return obj.extensions.tags;
|
return obj.extensions.tags;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const setTagsIntoObj = (obj: any, tags: any) => {
|
||||||
|
if (!obj) {
|
||||||
|
obj = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!obj.extensions) {
|
||||||
|
obj.extensions = {};
|
||||||
|
}
|
||||||
|
|
||||||
|
obj.extensions.tags = tags;
|
||||||
|
|
||||||
|
return obj;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getTagValue = (tags: any, tagName: keyof any) => {
|
||||||
|
if (Object.hasOwn(tags, tagName)) {
|
||||||
|
return tags[tagName];
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const setTagValue = (tags: any, tagName: keyof any, tagValue: any) => {
|
||||||
|
tags[tagName] = tagValue;
|
||||||
|
};
|
||||||
|
|
Loading…
Reference in New Issue