mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-06-28 05:25:11 +00:00
Compare commits
4 Commits
d3931a9cbe
...
typescript
Author | SHA1 | Date | |
---|---|---|---|
0209e2d9a1
|
|||
a3afad6d6b
|
|||
59d7895f62
|
|||
82796d5a8c
|
@ -22,6 +22,7 @@
|
||||
"include": [
|
||||
"src/**/*.d.ts",
|
||||
"src/**/*.js",
|
||||
"src/**/*.ts",
|
||||
"src/**/*.svelte"
|
||||
]
|
||||
}
|
||||
|
267
frontend/package-lock.json
generated
267
frontend/package-lock.json
generated
@ -16,6 +16,7 @@
|
||||
"date-fns": "^2.30.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@garraflavatra/yeslint": "^1.0.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^1.0.1",
|
||||
"eslint": "^8.43.0",
|
||||
"eslint-config-svelte3": "github:johbog/eslint-config-svelte3",
|
||||
@ -212,6 +213,24 @@
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@garraflavatra/yeslint": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@garraflavatra/yeslint/-/yeslint-1.0.0.tgz",
|
||||
"integrity": "sha512-LvpQq+buhjjGMtzdzgj5iFCOG9ZGvbgOsFMvtRCYiqpzzNjhXsfO4IGUrJuVL+AwWUzNPJNTzKI5OyQZbh07Jg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"eslint-plugin-import": "^2.27.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.9.0 || ^8.0.0",
|
||||
"eslint-plugin-svelte": "^2.32.4"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"eslint-plugin-svelte": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@humanwhocodes/config-array": {
|
||||
"version": "0.11.10",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz",
|
||||
@ -654,6 +673,18 @@
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/cssesc": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
|
||||
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"cssesc": "bin/cssesc"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/date-fns": {
|
||||
"version": "2.30.0",
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
|
||||
@ -1349,20 +1380,22 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-svelte": {
|
||||
"version": "2.30.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.30.0.tgz",
|
||||
"integrity": "sha512-2/qj0BJsfM0U2j4EjGb7iC/0nbUvXx1Gn78CdtyuXpi/rSomLPCPwnsZsloXMzlt6Xwe8LBlpRvZObSKEHLP5A==",
|
||||
"version": "2.32.4",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.32.4.tgz",
|
||||
"integrity": "sha512-VJ12i2Iogug1jvhwxSlognnfGj76P5gks/V4pUD4SCSVQOp14u47MNP0zAG8AQR3LT0Fi1iUvIFnY4l9z5Rwbg==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14",
|
||||
"debug": "^4.3.1",
|
||||
"esutils": "^2.0.3",
|
||||
"known-css-properties": "^0.27.0",
|
||||
"known-css-properties": "^0.28.0",
|
||||
"postcss": "^8.4.5",
|
||||
"postcss-load-config": "^3.1.4",
|
||||
"postcss-safe-parser": "^6.0.0",
|
||||
"svelte-eslint-parser": "^0.30.0"
|
||||
"postcss-selector-parser": "^6.0.11",
|
||||
"semver": "^7.5.3",
|
||||
"svelte-eslint-parser": "^0.32.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^14.17.0 || >=16.0.0"
|
||||
@ -1372,7 +1405,7 @@
|
||||
},
|
||||
"peerDependencies": {
|
||||
"eslint": "^7.0.0 || ^8.0.0-0",
|
||||
"svelte": "^3.37.0 || ^4.0.0-0"
|
||||
"svelte": "^3.37.0 || ^4.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"svelte": {
|
||||
@ -1380,6 +1413,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-svelte/node_modules/semver": {
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-scope": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.0.tgz",
|
||||
@ -2157,9 +2205,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/known-css-properties": {
|
||||
"version": "0.27.0",
|
||||
"resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.27.0.tgz",
|
||||
"integrity": "sha512-uMCj6+hZYDoffuvAJjFAPz56E9uoowFHmTkqRtRq5WyC5Q6Cu/fTZKNQpX/RbzChBYLLl3lo8CjFZBAZXq9qFg==",
|
||||
"version": "0.28.0",
|
||||
"resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.28.0.tgz",
|
||||
"integrity": "sha512-9pSL5XB4J+ifHP0e0jmmC98OGC1nL8/JjS+fi6mnTlIf//yt/MfVLtKg7S6nCtj/8KTcWX7nRlY0XywoYY1ISQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/levn": {
|
||||
@ -2205,6 +2253,18 @@
|
||||
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/magic-string": {
|
||||
"version": "0.26.7",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.7.tgz",
|
||||
@ -2245,10 +2305,16 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/nanoid": {
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
|
||||
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"bin": {
|
||||
"nanoid": "bin/nanoid.cjs"
|
||||
},
|
||||
@ -2423,9 +2489,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/postcss": {
|
||||
"version": "8.4.20",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz",
|
||||
"integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==",
|
||||
"version": "8.4.27",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz",
|
||||
"integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
@ -2435,10 +2501,14 @@
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/postcss"
|
||||
},
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/ai"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"nanoid": "^3.3.4",
|
||||
"nanoid": "^3.3.6",
|
||||
"picocolors": "^1.0.0",
|
||||
"source-map-js": "^1.0.2"
|
||||
},
|
||||
@ -2491,6 +2561,41 @@
|
||||
"postcss": "^8.3.3"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-scss": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.6.tgz",
|
||||
"integrity": "sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==",
|
||||
"dev": true,
|
||||
"funding": [
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/postcss/"
|
||||
},
|
||||
{
|
||||
"type": "tidelift",
|
||||
"url": "https://tidelift.com/funding/github/npm/postcss-scss"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=12.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"postcss": "^8.4.19"
|
||||
}
|
||||
},
|
||||
"node_modules/postcss-selector-parser": {
|
||||
"version": "6.0.13",
|
||||
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
|
||||
"integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"cssesc": "^3.0.0",
|
||||
"util-deprecate": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4"
|
||||
}
|
||||
},
|
||||
"node_modules/prelude-ls": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
|
||||
@ -2831,14 +2936,16 @@
|
||||
}
|
||||
},
|
||||
"node_modules/svelte-eslint-parser": {
|
||||
"version": "0.30.0",
|
||||
"resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.30.0.tgz",
|
||||
"integrity": "sha512-H0Cn2TKr70DU9p/Gb04CfwtS7eK28MYumrHYPaDNkIFbfwGDLADpbERBn7u8G1Rcm2RMr2/mL6mq0J2e8iKFlA==",
|
||||
"version": "0.32.2",
|
||||
"resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.32.2.tgz",
|
||||
"integrity": "sha512-Ok9D3A4b23iLQsONrjqtXtYDu5ZZ/826Blaw2LeFZVTg1pwofKDG4mz3/GYTax8fQ0plRGHI6j+d9VQYy5Lo/A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"eslint-scope": "^7.0.0",
|
||||
"eslint-visitor-keys": "^3.0.0",
|
||||
"espree": "^9.0.0"
|
||||
"espree": "^9.0.0",
|
||||
"postcss": "^8.4.25",
|
||||
"postcss-scss": "^4.0.6"
|
||||
},
|
||||
"engines": {
|
||||
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
|
||||
@ -2847,7 +2954,7 @@
|
||||
"url": "https://github.com/sponsors/ota-meshi"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"svelte": "^3.37.0 || ^4.0.0-0"
|
||||
"svelte": "^3.37.0 || ^4.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"svelte": {
|
||||
@ -2947,6 +3054,12 @@
|
||||
"punycode": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/vite": {
|
||||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz",
|
||||
@ -3081,6 +3194,12 @@
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/yaml": {
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
||||
@ -3248,6 +3367,15 @@
|
||||
"integrity": "sha512-s2UHCoiXfxMvmfzqoN+vrQ84ahUSYde9qNO1MdxmoEhyHWsfmwOpFlwYV+ePJEVc7gFnATGUi376WowX1N7tFg==",
|
||||
"dev": true
|
||||
},
|
||||
"@garraflavatra/yeslint": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@garraflavatra/yeslint/-/yeslint-1.0.0.tgz",
|
||||
"integrity": "sha512-LvpQq+buhjjGMtzdzgj5iFCOG9ZGvbgOsFMvtRCYiqpzzNjhXsfO4IGUrJuVL+AwWUzNPJNTzKI5OyQZbh07Jg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"eslint-plugin-import": "^2.27.5"
|
||||
}
|
||||
},
|
||||
"@humanwhocodes/config-array": {
|
||||
"version": "0.11.10",
|
||||
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz",
|
||||
@ -3567,6 +3695,12 @@
|
||||
"which": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"cssesc": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz",
|
||||
"integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==",
|
||||
"dev": true
|
||||
},
|
||||
"date-fns": {
|
||||
"version": "2.30.0",
|
||||
"resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.30.0.tgz",
|
||||
@ -4007,20 +4141,33 @@
|
||||
}
|
||||
},
|
||||
"eslint-plugin-svelte": {
|
||||
"version": "2.30.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.30.0.tgz",
|
||||
"integrity": "sha512-2/qj0BJsfM0U2j4EjGb7iC/0nbUvXx1Gn78CdtyuXpi/rSomLPCPwnsZsloXMzlt6Xwe8LBlpRvZObSKEHLP5A==",
|
||||
"version": "2.32.4",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-svelte/-/eslint-plugin-svelte-2.32.4.tgz",
|
||||
"integrity": "sha512-VJ12i2Iogug1jvhwxSlognnfGj76P5gks/V4pUD4SCSVQOp14u47MNP0zAG8AQR3LT0Fi1iUvIFnY4l9z5Rwbg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@eslint-community/eslint-utils": "^4.2.0",
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14",
|
||||
"debug": "^4.3.1",
|
||||
"esutils": "^2.0.3",
|
||||
"known-css-properties": "^0.27.0",
|
||||
"known-css-properties": "^0.28.0",
|
||||
"postcss": "^8.4.5",
|
||||
"postcss-load-config": "^3.1.4",
|
||||
"postcss-safe-parser": "^6.0.0",
|
||||
"svelte-eslint-parser": "^0.30.0"
|
||||
"postcss-selector-parser": "^6.0.11",
|
||||
"semver": "^7.5.3",
|
||||
"svelte-eslint-parser": "^0.32.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"semver": {
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"lru-cache": "^6.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"eslint-scope": {
|
||||
@ -4563,9 +4710,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"known-css-properties": {
|
||||
"version": "0.27.0",
|
||||
"resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.27.0.tgz",
|
||||
"integrity": "sha512-uMCj6+hZYDoffuvAJjFAPz56E9uoowFHmTkqRtRq5WyC5Q6Cu/fTZKNQpX/RbzChBYLLl3lo8CjFZBAZXq9qFg==",
|
||||
"version": "0.28.0",
|
||||
"resolved": "https://registry.npmjs.org/known-css-properties/-/known-css-properties-0.28.0.tgz",
|
||||
"integrity": "sha512-9pSL5XB4J+ifHP0e0jmmC98OGC1nL8/JjS+fi6mnTlIf//yt/MfVLtKg7S6nCtj/8KTcWX7nRlY0XywoYY1ISQ==",
|
||||
"dev": true
|
||||
},
|
||||
"levn": {
|
||||
@ -4599,6 +4746,15 @@
|
||||
"integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
|
||||
"dev": true
|
||||
},
|
||||
"lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"yallist": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"magic-string": {
|
||||
"version": "0.26.7",
|
||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.26.7.tgz",
|
||||
@ -4630,9 +4786,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"nanoid": {
|
||||
"version": "3.3.4",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
|
||||
"integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
|
||||
"version": "3.3.6",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
||||
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
|
||||
"dev": true
|
||||
},
|
||||
"natural-compare": {
|
||||
@ -4757,12 +4913,12 @@
|
||||
"dev": true
|
||||
},
|
||||
"postcss": {
|
||||
"version": "8.4.20",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.20.tgz",
|
||||
"integrity": "sha512-6Q04AXR1212bXr5fh03u8aAwbLxAQNGQ/Q1LNa0VfOI06ZAlhPHtQvE4OIdpj4kLThXilalPnmDSOD65DcHt+g==",
|
||||
"version": "8.4.27",
|
||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.27.tgz",
|
||||
"integrity": "sha512-gY/ACJtJPSmUFPDCHtX78+01fHa64FaU4zaaWfuh1MhGJISufJAH4cun6k/8fwsHYeK4UQmENQK+tRLCFJE8JQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"nanoid": "^3.3.4",
|
||||
"nanoid": "^3.3.6",
|
||||
"picocolors": "^1.0.0",
|
||||
"source-map-js": "^1.0.2"
|
||||
}
|
||||
@ -4784,6 +4940,23 @@
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"postcss-scss": {
|
||||
"version": "4.0.6",
|
||||
"resolved": "https://registry.npmjs.org/postcss-scss/-/postcss-scss-4.0.6.tgz",
|
||||
"integrity": "sha512-rLDPhJY4z/i4nVFZ27j9GqLxj1pwxE80eAzUNRMXtcpipFYIeowerzBgG3yJhMtObGEXidtIgbUpQ3eLDsf5OQ==",
|
||||
"dev": true,
|
||||
"requires": {}
|
||||
},
|
||||
"postcss-selector-parser": {
|
||||
"version": "6.0.13",
|
||||
"resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz",
|
||||
"integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cssesc": "^3.0.0",
|
||||
"util-deprecate": "^1.0.2"
|
||||
}
|
||||
},
|
||||
"prelude-ls": {
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
|
||||
@ -5004,14 +5177,16 @@
|
||||
"dev": true
|
||||
},
|
||||
"svelte-eslint-parser": {
|
||||
"version": "0.30.0",
|
||||
"resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.30.0.tgz",
|
||||
"integrity": "sha512-H0Cn2TKr70DU9p/Gb04CfwtS7eK28MYumrHYPaDNkIFbfwGDLADpbERBn7u8G1Rcm2RMr2/mL6mq0J2e8iKFlA==",
|
||||
"version": "0.32.2",
|
||||
"resolved": "https://registry.npmjs.org/svelte-eslint-parser/-/svelte-eslint-parser-0.32.2.tgz",
|
||||
"integrity": "sha512-Ok9D3A4b23iLQsONrjqtXtYDu5ZZ/826Blaw2LeFZVTg1pwofKDG4mz3/GYTax8fQ0plRGHI6j+d9VQYy5Lo/A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"eslint-scope": "^7.0.0",
|
||||
"eslint-visitor-keys": "^3.0.0",
|
||||
"espree": "^9.0.0"
|
||||
"espree": "^9.0.0",
|
||||
"postcss": "^8.4.25",
|
||||
"postcss-scss": "^4.0.6"
|
||||
}
|
||||
},
|
||||
"svelte-hmr": {
|
||||
@ -5086,6 +5261,12 @@
|
||||
"punycode": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"util-deprecate": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
|
||||
"integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==",
|
||||
"dev": true
|
||||
},
|
||||
"vite": {
|
||||
"version": "3.2.7",
|
||||
"resolved": "https://registry.npmjs.org/vite/-/vite-3.2.7.tgz",
|
||||
@ -5159,6 +5340,12 @@
|
||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||
"dev": true
|
||||
},
|
||||
"yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
||||
"dev": true
|
||||
},
|
||||
"yaml": {
|
||||
"version": "1.10.2",
|
||||
"resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz",
|
||||
|
@ -17,6 +17,7 @@
|
||||
"date-fns": "^2.30.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@garraflavatra/yeslint": "^1.0.0",
|
||||
"@sveltejs/vite-plugin-svelte": "^1.0.1",
|
||||
"eslint": "^8.43.0",
|
||||
"eslint-config-svelte3": "github:johbog/eslint-config-svelte3",
|
||||
@ -24,16 +25,12 @@
|
||||
"vite": "^3.2.7"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "svelte3",
|
||||
"ignorePatterns": ["dist", "wailsjs"],
|
||||
"extends": "./node_modules/@garraflavatra/yeslint/configs/svelte.js",
|
||||
"ignorePatterns": [
|
||||
"dist",
|
||||
"wailsjs"
|
||||
],
|
||||
"rules": {
|
||||
"svelte/html-quotes": [
|
||||
"warn",
|
||||
{
|
||||
"prefer": "double",
|
||||
"dynamic": { "quoted": false }
|
||||
}
|
||||
],
|
||||
"svelte/no-useless-mustaches": "off",
|
||||
"svelte/no-extra-reactive-curlies": "off"
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
7fc6d7b66151030191ded7136d96970e
|
||||
015746ba33749cd2864cd336088387ef
|
@ -1,14 +1,14 @@
|
||||
<script>
|
||||
import BlankState from '$components/blankstate.svelte';
|
||||
import ContextMenu from '$components/contextmenu.svelte';
|
||||
import dialogs from '$lib/dialogs';
|
||||
import contextMenu from '$lib/stores/contextmenu';
|
||||
import environment from '$lib/stores/environment';
|
||||
import hostTree from '$lib/stores/hosttree';
|
||||
import applicationInited from '$lib/stores/inited';
|
||||
import windowTitle from '$lib/stores/windowtitle';
|
||||
import dialogs from '$lib/dialogs.js';
|
||||
import contextMenu from '$lib/stores/contextmenu.js';
|
||||
import environment from '$lib/stores/environment.js';
|
||||
import hostTree from '$lib/stores/hosttree.js';
|
||||
import applicationInited from '$lib/stores/inited.js';
|
||||
import windowTitle from '$lib/stores/windowtitle.js';
|
||||
import Connection from '$organisms/connection/index.svelte';
|
||||
import { EventsOn } from '$wails/runtime';
|
||||
import { EventsOn } from '$wails/runtime/runtime.js';
|
||||
import { tick } from 'svelte';
|
||||
import AboutDialog from './dialogs/about.svelte';
|
||||
import SettingsDialog from './dialogs/settings/index.svelte';
|
||||
|
@ -50,7 +50,7 @@
|
||||
<svelte:window on:keydown={keydown} />
|
||||
|
||||
{#if items && position}
|
||||
<div class="backdrop" on:pointerdown={close}></div>
|
||||
<div class="backdrop" on:pointerdown={close} />
|
||||
<nav>
|
||||
<ul class="contextmenu" role="" style:left="{position[0]}px" style:top="{position[1]}px">
|
||||
{#each items as item, index}
|
||||
|
@ -40,7 +40,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<div bind:this={editorParent} class="editor"></div>
|
||||
<div bind:this={editorParent} class="editor" />
|
||||
|
||||
<style>
|
||||
.editor {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { daysAbbr, months } from '$lib/constants';
|
||||
import { daysAbbr, months } from '$lib/constants.js';
|
||||
import { addDays, getWeek, isDate, isSameDay, startOfWeek } from 'date-fns';
|
||||
import { onMount } from 'svelte';
|
||||
import Clock from '../clock.svelte';
|
||||
@ -97,7 +97,7 @@
|
||||
<table class="calendar">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th />
|
||||
{#each daysAbbr as dayName}
|
||||
<th>{dayName}</th>
|
||||
{/each}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { OpenDirectory } from '$wails/go/ui/UI';
|
||||
import { OpenDirectory } from '$wails/go/ui/UI.js';
|
||||
|
||||
export let value = '';
|
||||
export let id = '';
|
||||
@ -10,7 +10,13 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<input type="text" on:pointerdown={selectDir} readonly {id} {value} />
|
||||
<input
|
||||
type="text"
|
||||
on:pointerdown={selectDir}
|
||||
readonly
|
||||
{id}
|
||||
{value}
|
||||
/>
|
||||
|
||||
<style>
|
||||
input {
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import input from '$lib/actions/input';
|
||||
import { canBeObjectId, numericInputTypes } from '$lib/mongo';
|
||||
import input from '$lib/actions/input.js';
|
||||
import { canBeObjectId, numericInputTypes } from '$lib/mongo/index.js';
|
||||
import { ObjectId } from 'bson';
|
||||
import { onMount } from 'svelte';
|
||||
import Datepicker from './datepicker.svelte';
|
||||
@ -70,7 +70,12 @@
|
||||
<div class="forminput {type}">
|
||||
<div class="field">
|
||||
{#if type === 'string'}
|
||||
<input type="text" bind:value use:input={{ type, onValid, onInvalid, mandatory, autofocus }} autocomplete="off" spellcheck="false" />
|
||||
<input
|
||||
type="text"
|
||||
bind:value
|
||||
use:input={{ type, onValid, onInvalid, mandatory, autofocus }}
|
||||
autocomplete="off"
|
||||
spellcheck="false" />
|
||||
{:else if type === 'objectid'}
|
||||
<input
|
||||
type="text"
|
||||
@ -79,7 +84,11 @@
|
||||
use:input={{ type, onValid, onInvalid, mandatory, autofocus }}
|
||||
/>
|
||||
{:else if numericInputTypes.includes(type)}
|
||||
<input type="number" bind:value use:input={{ type, onValid, onInvalid, mandatory, autofocus }} />
|
||||
<input
|
||||
type="number"
|
||||
bind:value
|
||||
use:input={{ type, onValid, onInvalid, mandatory, autofocus }}
|
||||
/>
|
||||
{:else if type === 'bool'}
|
||||
<select bind:value on:change={selectChange} bind:this={selectInput}>
|
||||
<option value={undefined} disabled={mandatory}>Unset</option>
|
||||
@ -98,18 +107,38 @@
|
||||
<Icon name="edit" />
|
||||
</button>
|
||||
{/if}
|
||||
<button class="button-small" type="button" title="Generate random object id" on:click={generateObjectId}>
|
||||
<button
|
||||
class="button-small"
|
||||
type="button"
|
||||
title="Generate random object id"
|
||||
on:click={generateObjectId}
|
||||
>
|
||||
<Icon name="reload" />
|
||||
</button>
|
||||
{:else if type === 'date'}
|
||||
<button class="button-small" type="button" title="Edit date" on:click={() => showDatepicker = true}>
|
||||
<button
|
||||
class="button-small"
|
||||
type="button"
|
||||
title="Edit date"
|
||||
on:click={() => showDatepicker = true}
|
||||
>
|
||||
<Icon name="edit" />
|
||||
</button>
|
||||
<button class="button-small" type="button" title="Set date to now" on:click={() => value = new Date()}>
|
||||
<button
|
||||
class="button-small"
|
||||
type="button"
|
||||
title="Set date to now"
|
||||
on:click={() => value = new Date()}
|
||||
>
|
||||
<Icon name="o" />
|
||||
</button>
|
||||
{/if}
|
||||
<button class="button-small" type="button" title="Reset field to default value" on:click={() => value = undefined}>
|
||||
<button
|
||||
class="button-small"
|
||||
type="button"
|
||||
title="Reset field to default value"
|
||||
on:click={() => value = undefined}
|
||||
>
|
||||
<Icon name="trash" />
|
||||
</button>
|
||||
</div>
|
||||
|
@ -7,9 +7,7 @@
|
||||
export let editor = undefined;
|
||||
export let readonly = false;
|
||||
|
||||
const extensions = [
|
||||
javascript(),
|
||||
];
|
||||
const extensions = [ javascript() ];
|
||||
|
||||
onMount(() => {
|
||||
editor.dispatch({
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import { pathsAreEqual, resolveKeypath, setValue } from '$lib/objects';
|
||||
import contextMenu from '$lib/stores/contextmenu';
|
||||
import { pathsAreEqual, resolveKeypath, setValue } from '$lib/objects.js';
|
||||
import contextMenu from '$lib/stores/contextmenu.js';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import FormInput from '$components/editors/forminput.svelte';
|
||||
import Icon from '$components/icon.svelte';
|
||||
@ -131,7 +131,7 @@
|
||||
on:dblclick={() => doubleClick(item[key], index)}
|
||||
on:contextmenu|preventDefault={evt => showContextMenu(evt, item)}
|
||||
class:selectable={canSelect}
|
||||
class:selected={canSelect && pathsAreEqual(activePath, [ ...path, item[key] ])}
|
||||
class:selected={canSelect && pathsAreEqual(activePath, ...path, item[key])}
|
||||
class:striped
|
||||
>
|
||||
{#if !hideChildrenToggles}
|
||||
@ -157,7 +157,11 @@
|
||||
{#each columns as column, columnIndex}
|
||||
<td class:right={column.right} title={keypathProxies[index][column.key]}>
|
||||
{#if column.inputType}
|
||||
<FormInput {column} bind:value={keypathProxies[index][column.key]} bind:valid={validity[columnIndex]} />
|
||||
<FormInput
|
||||
{column}
|
||||
bind:value={keypathProxies[index][column.key]}
|
||||
bind:valid={validity[columnIndex]}
|
||||
/>
|
||||
{:else}
|
||||
<div class="value" style:margin-left="{level * 10}px">
|
||||
{formatValue(keypathProxies[index][column.key])}
|
||||
@ -168,7 +172,12 @@
|
||||
|
||||
{#if canRemoveItems}
|
||||
<td class="has-button">
|
||||
<button class="button-small" type="button" on:click|stopPropagation={() => removeItem(index, item[key])} on:dblclick|stopPropagation>
|
||||
<button
|
||||
class="button-small"
|
||||
type="button"
|
||||
on:click|stopPropagation={() => removeItem(index, item[key])}
|
||||
on:dblclick|stopPropagation
|
||||
>
|
||||
<Icon name="x" />
|
||||
</button>
|
||||
</td>
|
||||
|
@ -57,17 +57,17 @@
|
||||
<thead>
|
||||
<tr>
|
||||
{#if !hideChildrenToggles}
|
||||
<th class="has-toggle"></th>
|
||||
<th class="has-toggle" />
|
||||
{/if}
|
||||
|
||||
<th class="has-icon"></th>
|
||||
<th class="has-icon" />
|
||||
|
||||
{#each columns as column}
|
||||
<th scope="col">{column.title || ''}</th>
|
||||
{/each}
|
||||
|
||||
{#if canRemoveItems}
|
||||
<th class="has-button"></th>
|
||||
<th class="has-button" />
|
||||
{/if}
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { isBsonBuiltin } from '$lib/mongo';
|
||||
import { isBsonBuiltin } from '$lib/mongo/index.js';
|
||||
import { isDate } from 'date-fns';
|
||||
import Grid from './grid.svelte';
|
||||
|
||||
@ -22,7 +22,6 @@
|
||||
].filter(c => !!c);
|
||||
|
||||
$: if (data) {
|
||||
// items = dissectObject(data).map(item => ({ ...item, menu: getRootMenu(item.key, item) }));
|
||||
items = [];
|
||||
|
||||
if (Array.isArray(data)) {
|
||||
|
@ -3,7 +3,7 @@
|
||||
</script>
|
||||
|
||||
<script>
|
||||
import { Beep } from '$wails/go/ui/UI';
|
||||
import { Beep } from '$wails/go/ui/UI.js';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import Icon from './icon.svelte';
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { looseJsonIsValid } from '$lib/strings';
|
||||
import { looseJsonIsValid } from '$lib/strings.js';
|
||||
import { EJSON } from 'bson';
|
||||
import { createEventDispatcher, onDestroy } from 'svelte';
|
||||
import Icon from './icon.svelte';
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import Modal from '$components/modal.svelte';
|
||||
import alink from '$lib/actions/alink';
|
||||
import environment from '$lib/stores/environment';
|
||||
import alink from '$lib/actions/alink.js';
|
||||
import environment from '$lib/stores/environment.js';
|
||||
</script>
|
||||
|
||||
<Modal width="400px" title=" " on:close>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<script>
|
||||
import DirectoryChooser from '$components/editors/directorychooser.svelte';
|
||||
import Modal from '$components/modal.svelte';
|
||||
import input from '$lib/actions/input';
|
||||
import settings from '$lib/stores/settings';
|
||||
import input from '$lib/actions/input.js';
|
||||
import settings from '$lib/stores/settings.js';
|
||||
</script>
|
||||
|
||||
<Modal title="Preferences" on:close>
|
||||
@ -15,7 +15,13 @@
|
||||
|
||||
<label for="defaultSort">Default sort query</label>
|
||||
<label class="field">
|
||||
<input type="text" class="code" bind:value={$settings.defaultSort} id="defaultSort" use:input={{ type: 'json' }} />
|
||||
<input
|
||||
type="text"
|
||||
class="code"
|
||||
bind:value={$settings.defaultSort}
|
||||
id="defaultSort"
|
||||
use:input={{ type: 'json' }}
|
||||
/>
|
||||
</label>
|
||||
|
||||
<label for="autosubmitQuery">Autosubmit query</label>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { BrowserOpenURL } from '$wails/runtime/runtime';
|
||||
import { BrowserOpenURL } from '$wails/runtime/runtime.js';
|
||||
|
||||
export default function alink(node) {
|
||||
node.addEventListener('click', e => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
import environment from '$lib/stores/environment';
|
||||
import environment from '$lib/stores/environment.js';
|
||||
import { get } from 'svelte/store';
|
||||
|
||||
export function controlKeyDown(event) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { isInt } from '$lib/math';
|
||||
import { canBeObjectId, int32, int64, uint64 } from '$lib/mongo';
|
||||
import { jsonLooseParse } from '$lib/strings';
|
||||
import { isInt } from '$lib/math.js';
|
||||
import { canBeObjectId, int32, int64, uint64 } from '$lib/mongo/index.js';
|
||||
import { jsonLooseParse } from '$lib/strings.js';
|
||||
|
||||
export default function input(node, { autofocus, type, onValid, onInvalid, mandatory } = {
|
||||
autofocus: false,
|
||||
@ -14,7 +14,7 @@ export default function input(node, { autofocus, type, onValid, onInvalid, manda
|
||||
node.setAttribute('autocomplete', false);
|
||||
|
||||
const getMessage = () => {
|
||||
const checkInteger = () => (isInt(node.value) ? false : 'Value must be an integer');
|
||||
const checkInteger = () => (Number.isInteger(node.value) ? false : 'Value must be an integer');
|
||||
const checkNumberBoundaries = boundaries => {
|
||||
if (node.value < boundaries[0]) {
|
||||
return `Input is too low for type ${type}`;
|
||||
|
@ -1,7 +0,0 @@
|
||||
// Months
|
||||
export const months = [ 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ];
|
||||
export const monthsAbbr = months.map(m => m.slice(0, 3));
|
||||
|
||||
// Days
|
||||
export const days = [ 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday' ];
|
||||
export const daysAbbr = days.map(d => d.slice(0, 3));
|
27
frontend/src/lib/constants.ts
Normal file
27
frontend/src/lib/constants.ts
Normal file
@ -0,0 +1,27 @@
|
||||
export const months = [
|
||||
'January',
|
||||
'February',
|
||||
'March',
|
||||
'April',
|
||||
'May',
|
||||
'June',
|
||||
'July',
|
||||
'August',
|
||||
'September',
|
||||
'October',
|
||||
'November',
|
||||
'December'
|
||||
];
|
||||
|
||||
export const days = [
|
||||
'Monday',
|
||||
'Tuesday',
|
||||
'Wednesday',
|
||||
'Thursday',
|
||||
'Friday',
|
||||
'Saturday',
|
||||
'Sunday'
|
||||
];
|
||||
|
||||
export const daysAbbr = days.map(d => d.slice(0, 3));
|
||||
export const monthsAbbr = months.map(m => m.slice(0, 3));
|
@ -1,4 +1,4 @@
|
||||
import { AskConfirmation } from '$wails/go/app/App';
|
||||
import { AskConfirmation } from '$wails/go/app/App.js';
|
||||
import InputDialog from '../dialogs/input.svelte';
|
||||
|
||||
function newDialog(dialogComponent, data = {}) {
|
||||
|
@ -1,13 +1,4 @@
|
||||
// https://stackoverflow.com/a/14794066
|
||||
export function isInt(value) {
|
||||
if (isNaN(value)) {
|
||||
return false;
|
||||
}
|
||||
const x = parseFloat(value);
|
||||
return (x | 0) === x;
|
||||
}
|
||||
|
||||
export function randInt(min, max) {
|
||||
export function randInt(min: number, max: number) {
|
||||
return Math.round(Math.random() * (max - min) + min);
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script>
|
||||
import { locales } from '$lib/mongo';
|
||||
import { locales } from './index.js';
|
||||
|
||||
const defaultCollation = {
|
||||
locale: 'en_US',
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { StartProgressBar, StopProgressBar } from '$wails/go/ui/UI';
|
||||
import { StartProgressBar, StopProgressBar } from '$wails/go/ui/UI.js';
|
||||
|
||||
let taskCounter = 0;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Environment } from '$wails/go/app/App';
|
||||
import { Environment } from '$wails/go/app/App.js';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
const { set, subscribe } = writable({});
|
||||
|
@ -1,9 +1,9 @@
|
||||
import dialogs from '$lib/dialogs';
|
||||
import { startProgress } from '$lib/progress';
|
||||
import dialogs from '$lib/dialogs.js';
|
||||
import { startProgress } from '$lib/progress.js';
|
||||
import { get, writable } from 'svelte/store';
|
||||
import applicationInited from './inited';
|
||||
import queries from './queries';
|
||||
import windowTitle from './windowtitle';
|
||||
import applicationInited from './inited.js';
|
||||
import queries from './queries.js';
|
||||
import windowTitle from './windowtitle.js';
|
||||
|
||||
import ExportDialog from '$organisms/connection/collection/dialogs/export.svelte';
|
||||
import IndexDetailDialog from '$organisms/connection/collection/dialogs/indexdetail.svelte';
|
||||
@ -30,7 +30,7 @@ import {
|
||||
RemoveHost,
|
||||
RenameCollection,
|
||||
TruncateCollection
|
||||
} from '$wails/go/app/App';
|
||||
} from '$wails/go/app/App.js';
|
||||
|
||||
const { set, subscribe } = writable({});
|
||||
const getValue = () => get({ subscribe });
|
||||
@ -121,7 +121,10 @@ async function refresh() {
|
||||
collection.rename = async function() {
|
||||
const newCollKey = await dialogs.enterText('Rename collection', `Enter a new name for collection ${collKey}.`, collKey);
|
||||
if (newCollKey && (newCollKey !== collKey)) {
|
||||
const progress = startProgress(`Renaming collection "${collKey}" to "${newCollKey}"…`);
|
||||
const progress = startProgress(
|
||||
`Renaming collection "${collKey}" to "${newCollKey}"…`
|
||||
);
|
||||
|
||||
const ok = await RenameCollection(hostKey, dbKey, collKey, newCollKey);
|
||||
await database.open();
|
||||
progress.end();
|
||||
@ -155,7 +158,13 @@ async function refresh() {
|
||||
const dialog = dialogs.new(ExportDialog, { collection, query });
|
||||
return new Promise(resolve => {
|
||||
dialog.$on('export', async event => {
|
||||
const success = await PerformFindExport(hostKey, dbKey, collKey, JSON.stringify(event.detail.exportInfo));
|
||||
const success = await PerformFindExport(
|
||||
hostKey,
|
||||
dbKey,
|
||||
collKey,
|
||||
JSON.stringify(event.detail.exportInfo)
|
||||
);
|
||||
|
||||
if (success) {
|
||||
dialog.$close();
|
||||
resolve();
|
||||
@ -230,10 +239,17 @@ async function refresh() {
|
||||
|
||||
return new Promise(resolve => {
|
||||
dialog.$on('create', async event => {
|
||||
const newIndexName = await CreateIndex(collection.hostKey, collection.dbKey, collection.key, JSON.stringify(event.detail.index));
|
||||
const newIndexName = await CreateIndex(
|
||||
collection.hostKey,
|
||||
collection.dbKey,
|
||||
collection.key,
|
||||
JSON.stringify(event.detail.index)
|
||||
);
|
||||
|
||||
if (newIndexName) {
|
||||
dialog.$close();
|
||||
}
|
||||
|
||||
resolve(newIndexName);
|
||||
});
|
||||
});
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { derived } from 'svelte/store';
|
||||
import environment from './environment';
|
||||
import applicationSettings from './settings';
|
||||
import environment from './environment.js';
|
||||
import applicationSettings from './settings.js';
|
||||
|
||||
let alreadyInited = false;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { RemoveQuery, SavedQueries, SaveQuery, UpdateQueries } from '$wails/go/app/App';
|
||||
import { RemoveQuery, SavedQueries, SaveQuery, UpdateQueries } from '$wails/go/app/App.js';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
const { set, subscribe } = writable({});
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Settings, UpdateSettings } from '$wails/go/app/App';
|
||||
import { Settings, UpdateSettings } from '$wails/go/app/App.js';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
const { set, subscribe } = writable({});
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ReportSharedStateVariable } from '$wails/go/app/App';
|
||||
import { ReportSharedStateVariable } from '$wails/go/app/App.js';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
function sharedStateStore(name) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import dialogs from '$lib/dialogs';
|
||||
import dialogs from '$lib/dialogs.js';
|
||||
import ViewConfigDialog from '$organisms/connection/collection/dialogs/viewconfig.svelte';
|
||||
import { UpdateViewStore, Views } from '$wails/go/app/App';
|
||||
import { UpdateViewStore, Views } from '$wails/go/app/App.js';
|
||||
import { get, writable } from 'svelte/store';
|
||||
|
||||
const { set, subscribe } = writable({});
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { WindowSetTitle } from '$wails/runtime/runtime';
|
||||
import { WindowSetTitle } from '$wails/runtime/runtime.js';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
const { set, subscribe } = writable('Rolens');
|
||||
|
@ -1,19 +1,19 @@
|
||||
export function capitalise(string = '') {
|
||||
export function capitalise(string = ''): string {
|
||||
const capitalised = string.charAt(0).toUpperCase() + string.slice(1);
|
||||
return capitalised;
|
||||
}
|
||||
|
||||
export function jsonLooseParse(json) {
|
||||
const obj = new Function(`return (${json})`)();
|
||||
export function jsonLooseParse<T>(json: string): T {
|
||||
const obj: T = new Function(`return (${json})`)();
|
||||
return obj;
|
||||
}
|
||||
|
||||
export function convertLooseJson(json) {
|
||||
export function convertLooseJson(json: any) {
|
||||
const j = JSON.stringify(jsonLooseParse(json));
|
||||
return j;
|
||||
}
|
||||
|
||||
export function looseJsonIsValid(json) {
|
||||
export function looseJsonIsValid(json: string): boolean {
|
||||
try {
|
||||
jsonLooseParse(json);
|
||||
return true;
|
||||
@ -23,6 +23,6 @@ export function looseJsonIsValid(json) {
|
||||
}
|
||||
}
|
||||
|
||||
export function stringCouldBeID(string) {
|
||||
export function stringCouldBeID(string: string) {
|
||||
return /^[a-zA-Z0-9_-]{1,}$/.test(string);
|
||||
}
|
@ -2,7 +2,7 @@ import './styles/loading.css';
|
||||
import './styles/reset.css';
|
||||
import './styles/style.css';
|
||||
|
||||
import { LogError } from '$wails/runtime';
|
||||
import { LogError } from '$wails/runtime/runtime.js';
|
||||
import App from './app.svelte';
|
||||
|
||||
window.addEventListener('unhandledrejection', event => {
|
||||
|
@ -3,11 +3,11 @@
|
||||
import Icon from '$components/icon.svelte';
|
||||
import Modal from '$components/modal.svelte';
|
||||
import ObjectEditor from '$components/editors/objecteditor.svelte';
|
||||
import { aggregationStageDocumentationURL, aggregationStages } from '$lib/mongo';
|
||||
import { aggregationStageDocumentationURL, aggregationStages } from '$lib/mongo/index.js';
|
||||
import Collation from '$lib/mongo/collation.svelte';
|
||||
import { jsonLooseParse, looseJsonIsValid } from '$lib/strings';
|
||||
import { Aggregate } from '$wails/go/app/App';
|
||||
import { BrowserOpenURL } from '$wails/runtime/runtime';
|
||||
import { jsonLooseParse, looseJsonIsValid } from '$lib/strings.js';
|
||||
import { Aggregate } from '$wails/go/app/App.js';
|
||||
import { BrowserOpenURL } from '$wails/runtime/runtime.js';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
export let collection;
|
||||
|
@ -2,8 +2,8 @@
|
||||
import FormInput from '$components/editors/forminput.svelte';
|
||||
import Hint from '$components/hint.svelte';
|
||||
import Icon from '$components/icon.svelte';
|
||||
import { inputTypes } from '$lib/mongo';
|
||||
import { resolveKeypath, setValue } from '$lib/objects';
|
||||
import { inputTypes } from '$lib/mongo/index.js';
|
||||
import { resolveKeypath, setValue } from '$lib/objects.js';
|
||||
|
||||
export let item = {};
|
||||
export let view = {};
|
||||
@ -50,7 +50,12 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="input">
|
||||
<FormInput {column} bind:value={keypathProxy[column.key]} bind:valid={validity[column.key]} autofocus={index === 0} />
|
||||
<FormInput
|
||||
{column}
|
||||
bind:value={keypathProxy[column.key]}
|
||||
bind:valid={validity[column.key]}
|
||||
autofocus={index === 0}
|
||||
/>
|
||||
</div>
|
||||
</label>
|
||||
{:else}
|
||||
|
@ -1,9 +1,9 @@
|
||||
<script>
|
||||
import Icon from '$components/icon.svelte';
|
||||
import Modal from '$components/modal.svelte';
|
||||
import input from '$lib/actions/input';
|
||||
import hostTree from '$lib/stores/hosttree';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import input from '$lib/actions/input.js';
|
||||
import hostTree from '$lib/stores/hosttree.js';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
export let host = {};
|
||||
export let dbKey = '';
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import Icon from '$components/icon.svelte';
|
||||
import Modal from '$components/modal.svelte';
|
||||
import views from '$lib/stores/views';
|
||||
import views from '$lib/stores/views.js';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
export let collection;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import Icon from '$components/icon.svelte';
|
||||
import Modal from '$components/modal.svelte';
|
||||
import input from '$lib/actions/input';
|
||||
import input from '$lib/actions/input.js';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
export let collection;
|
||||
@ -27,7 +27,12 @@
|
||||
<form on:submit|preventDefault={create}>
|
||||
<label class="field name">
|
||||
<span class="label">Name</span>
|
||||
<input type="text" placeholder="Optional" bind:value={index.name} use:input={{ autofocus: true }} />
|
||||
<input
|
||||
type="text"
|
||||
placeholder="Optional"
|
||||
bind:value={index.name}
|
||||
use:input={{ autofocus: true }}
|
||||
/>
|
||||
</label>
|
||||
|
||||
<div class="toggles">
|
||||
@ -62,8 +67,9 @@
|
||||
<div class="row">
|
||||
<label class="field">
|
||||
<span class="label">Key</span>
|
||||
<input type="text" placeholder="_id" bind:value={rule.key}>
|
||||
<input type="text" placeholder="_id" bind:value={rule.key} />
|
||||
</label>
|
||||
|
||||
<label class="field">
|
||||
<select bind:value={rule.sort}>
|
||||
<option value={1}>Ascending</option>
|
||||
@ -71,6 +77,7 @@
|
||||
<option value="hashed" disabled={index.model.length > 1}>Hashed</option>
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<button type="button" class="button danger" on:click={() => removeRule(ruleIndex)} disabled={index.model.length < 2}>
|
||||
<Icon name="-" />
|
||||
</button>
|
||||
@ -85,6 +92,7 @@
|
||||
<button class="button" on:click={addRule} disabled={index.model.some(r => r.sort === 'hashed')}>
|
||||
<Icon name="+" /> Add rule
|
||||
</button>
|
||||
|
||||
<button class="button" on:click={create} disabled={!index.model.length || index.model.some(r => !r.key)}>
|
||||
<Icon name="+" /> Create index
|
||||
</button>
|
||||
|
@ -3,9 +3,9 @@
|
||||
import Hint from '$components/hint.svelte';
|
||||
import Icon from '$components/icon.svelte';
|
||||
import Modal from '$components/modal.svelte';
|
||||
import input from '$lib/actions/input';
|
||||
import hostTree from '$lib/stores/hosttree';
|
||||
import queries from '$lib/stores/queries';
|
||||
import input from '$lib/actions/input.js';
|
||||
import hostTree from '$lib/stores/hosttree.js';
|
||||
import queries from '$lib/stores/queries.js';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
export let queryToSave = undefined;
|
||||
@ -71,7 +71,7 @@
|
||||
<input type="text" bind:value={queryToSave.name} use:input={{ autofocus: true }} />
|
||||
</label>
|
||||
<label class="field">
|
||||
<textarea bind:value={queryToSave.remarks} placeholder="Remarks…" use:input></textarea>
|
||||
<textarea bind:value={queryToSave.remarks} placeholder="Remarks…" use:input />
|
||||
</label>
|
||||
{/if}
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
import Icon from '$components/icon.svelte';
|
||||
import Modal from '$components/modal.svelte';
|
||||
import TabBar from '$components/tabbar.svelte';
|
||||
import input from '$lib/actions/input';
|
||||
import { randomString } from '$lib/math';
|
||||
import views from '$lib/stores/views';
|
||||
import input from '$lib/actions/input.js';
|
||||
import { randomString } from '$lib/math.js';
|
||||
import views from '$lib/stores/views.js';
|
||||
|
||||
export let collection;
|
||||
export let firstItem = {};
|
||||
@ -114,7 +114,12 @@
|
||||
{#key collection.viewKey}
|
||||
<label class="field">
|
||||
<span class="label">View name</span>
|
||||
<input type="text" use:input={{ autofocus: true }} bind:value={$views[collection.viewKey].name} disabled={collection.viewKey === 'list'} />
|
||||
<input
|
||||
type="text"
|
||||
use:input={{ autofocus: true }}
|
||||
bind:value={$views[collection.viewKey].name}
|
||||
disabled={collection.viewKey === 'list'}
|
||||
/>
|
||||
</label>
|
||||
{/key}
|
||||
<label class="field">
|
||||
@ -128,7 +133,11 @@
|
||||
|
||||
{#if $views[collection.viewKey].type === 'list'}
|
||||
<div class="flex">
|
||||
<input type="checkbox" id="hideObjectIndicators" bind:checked={$views[collection.viewKey].hideObjectIndicators} />
|
||||
<input
|
||||
type="checkbox"
|
||||
id="hideObjectIndicators"
|
||||
bind:checked={$views[collection.viewKey].hideObjectIndicators}
|
||||
/>
|
||||
<label for="hideObjectIndicators">
|
||||
Hide object indicators ({'{...}'} and [...]) in list view and show nothing instead
|
||||
</label>
|
||||
@ -185,16 +194,41 @@
|
||||
</span>
|
||||
</label>
|
||||
|
||||
<button class="button" type="button" on:click={() => addColumn(columnIndex)} title="Add column before this one">
|
||||
<button
|
||||
class="button"
|
||||
type="button"
|
||||
on:click={() => addColumn(columnIndex)}
|
||||
title="Add column before this one"
|
||||
>
|
||||
<Icon name="+" />
|
||||
</button>
|
||||
<button class="button" type="button" on:click={() => moveColumn(columnIndex, -1)} disabled={columnIndex === 0} title="Move column one position up">
|
||||
|
||||
<button
|
||||
class="button"
|
||||
type="button"
|
||||
on:click={() => moveColumn(columnIndex, -1)}
|
||||
disabled={columnIndex === 0}
|
||||
title="Move column one position up"
|
||||
>
|
||||
<Icon name="chev-u" />
|
||||
</button>
|
||||
<button class="button" type="button" on:click={() => moveColumn(columnIndex, 1)} disabled={columnIndex === $views[collection.viewKey].columns.length - 1} title="Move column one position down">
|
||||
|
||||
<button
|
||||
class="button"
|
||||
type="button"
|
||||
on:click={() => moveColumn(columnIndex, 1)}
|
||||
disabled={columnIndex === $views[collection.viewKey].columns.length - 1}
|
||||
title="Move column one position down"
|
||||
>
|
||||
<Icon name="chev-d" />
|
||||
</button>
|
||||
<button class="button danger" type="button" on:click={() => removeColumn(columnIndex)} title="Remove this column">
|
||||
|
||||
<button
|
||||
class="button danger"
|
||||
type="button"
|
||||
on:click={() => removeColumn(columnIndex)}
|
||||
title="Remove this column"
|
||||
>
|
||||
<Icon name="x" />
|
||||
</button>
|
||||
</div>
|
||||
@ -202,10 +236,16 @@
|
||||
<p>No columns yet</p>
|
||||
{/each}
|
||||
</div>
|
||||
|
||||
<button class="button" on:click={addColumn}>
|
||||
<Icon name="+" /> Add column
|
||||
</button>
|
||||
<button class="button" on:click={addSuggestedColumns} disabled={!Object.keys(firstItem || {}).length}>
|
||||
|
||||
<button
|
||||
class="button"
|
||||
on:click={addSuggestedColumns}
|
||||
disabled={!Object.keys(firstItem || {}).length}
|
||||
>
|
||||
<Icon name="zap" /> Add suggested columns
|
||||
</button>
|
||||
{/if}
|
||||
|
@ -3,14 +3,14 @@
|
||||
import Icon from '$components/icon.svelte';
|
||||
import ObjectGrid from '$components/grid/objectgrid.svelte';
|
||||
import ObjectViewer from '$components/objectviewer.svelte';
|
||||
import input from '$lib/actions/input';
|
||||
import dialogs from '$lib/dialogs';
|
||||
import { deepClone } from '$lib/objects';
|
||||
import { startProgress } from '$lib/progress';
|
||||
import applicationSettings from '$lib/stores/settings';
|
||||
import views from '$lib/stores/views';
|
||||
import { convertLooseJson, stringCouldBeID } from '$lib/strings';
|
||||
import { CountItems, FindItems, RemoveItemById, UpdateFoundDocument } from '$wails/go/app/App';
|
||||
import input from '$lib/actions/input.js';
|
||||
import dialogs from '$lib/dialogs.js';
|
||||
import { deepClone } from '$lib/objects.js';
|
||||
import { startProgress } from '$lib/progress.js';
|
||||
import applicationSettings from '$lib/stores/settings.js';
|
||||
import views from '$lib/stores/views.js';
|
||||
import { convertLooseJson, stringCouldBeID } from '$lib/strings.js';
|
||||
import { CountItems, FindItems, RemoveItemById, UpdateFoundDocument } from '$wails/go/app/App.js';
|
||||
import { EJSON } from 'bson';
|
||||
|
||||
export let collection;
|
||||
@ -36,7 +36,11 @@
|
||||
let objectViewerSuccessMessage = '';
|
||||
let viewsForCollection = {};
|
||||
|
||||
// $: code = `db.${collection.key}.find(${form.query || '{}'}${form.fields && form.fields !== '{}' ? `, ${form.fields}` : ''}).sort(${form.sort})${form.skip ? `.skip(${form.skip})` : ''}${form.limit ? `.limit(${form.limit})` : ''};`;
|
||||
// $: code = `db.${collection.key}.find(${form.query || '{}'}${form.fields &&
|
||||
// form.fields !== '{}' ? `, ${form.fields}` : ''}).sort(${form.sort})
|
||||
// ${form.skip ? `.skip(${form.skip})` : ''}${form.limit ? `
|
||||
// .limit(${form.limit})` : ''};`;
|
||||
|
||||
$: lastPage = (submittedForm.limit && result?.results?.length) ? Math.max(0, Math.ceil((result.total - submittedForm.limit) / submittedForm.limit)) : 0;
|
||||
$: activePage = (submittedForm.limit && submittedForm.skip && result?.results?.length) ? submittedForm.skip / submittedForm.limit : 0;
|
||||
|
||||
@ -55,13 +59,17 @@
|
||||
|
||||
querying = `Querying ${collection.key}…`;
|
||||
activePath = [];
|
||||
const newResult = await FindItems(collection.hostKey, collection.dbKey, collection.key, JSON.stringify({
|
||||
fields: convertLooseJson(form.fields || defaults.fields),
|
||||
limit: form.limit ?? defaults.limit,
|
||||
query: convertLooseJson(form.query) || defaults.query,
|
||||
skip: form.skip ?? defaults.skip,
|
||||
sort: convertLooseJson(form.sort) || defaults.sort,
|
||||
}));
|
||||
const newResult = await FindItems(
|
||||
collection.hostKey,
|
||||
collection.dbKey,
|
||||
collection.key, JSON.stringify({
|
||||
fields: convertLooseJson(form.fields || defaults.fields),
|
||||
limit: form.limit ?? defaults.limit,
|
||||
query: convertLooseJson(form.query) || defaults.query,
|
||||
skip: form.skip ?? defaults.skip,
|
||||
sort: convertLooseJson(form.sort) || defaults.sort,
|
||||
})
|
||||
);
|
||||
|
||||
if (newResult) {
|
||||
newResult.results = newResult.results?.map(s => EJSON.parse(s, { relaxed: false }));
|
||||
@ -137,7 +145,14 @@
|
||||
if (!sure) {
|
||||
return;
|
||||
}
|
||||
const ok = await RemoveItemById(collection.hostKey, collection.dbKey, collection.key, activePath[0]);
|
||||
|
||||
const ok = await RemoveItemById(
|
||||
collection.hostKey,
|
||||
collection.dbKey,
|
||||
collection.key,
|
||||
activePath[0]
|
||||
);
|
||||
|
||||
if (ok) {
|
||||
await submitQuery();
|
||||
}
|
||||
@ -189,7 +204,8 @@
|
||||
<div class="formrow one">
|
||||
<label class="field">
|
||||
<span class="label">Query or id</span>
|
||||
<input type="text"
|
||||
<input
|
||||
type="text"
|
||||
class="code"
|
||||
placeholder={defaults.query}
|
||||
autocomplete="off"
|
||||
@ -230,7 +246,8 @@
|
||||
|
||||
<label class="field">
|
||||
<span class="label">Skip</span>
|
||||
<input type="number"
|
||||
<input
|
||||
type="number"
|
||||
min="0"
|
||||
bind:value={form.skip}
|
||||
use:input
|
||||
@ -241,7 +258,8 @@
|
||||
|
||||
<label class="field">
|
||||
<span class="label">Limit</span>
|
||||
<input type="number"
|
||||
<input
|
||||
type="number"
|
||||
min="0"
|
||||
bind:value={form.limit}
|
||||
use:input
|
||||
@ -334,19 +352,49 @@
|
||||
<Icon name="cog" />
|
||||
</button>
|
||||
</label>
|
||||
<button class="button danger" on:click={removeActive} disabled={!activePath?.length} title="Drop selected item">
|
||||
|
||||
<button
|
||||
class="button danger"
|
||||
on:click={removeActive}
|
||||
disabled={!activePath?.length}
|
||||
title="Drop selected item"
|
||||
>
|
||||
<Icon name="-" />
|
||||
</button>
|
||||
<button class="button" on:click={first} disabled={!submittedForm.limit || (submittedForm.skip <= 0) || !result?.results || (activePage === 0)} title="First page">
|
||||
|
||||
<button
|
||||
class="button"
|
||||
on:click={first}
|
||||
disabled={!submittedForm.limit || (submittedForm.skip <= 0) || !result?.results || (activePage === 0)}
|
||||
title="First page"
|
||||
>
|
||||
<Icon name="chevs-l" />
|
||||
</button>
|
||||
<button class="button" on:click={prev} disabled={!submittedForm.limit || (submittedForm.skip <= 0) || !result?.results || (activePage === 0)} title="Previous {submittedForm.limit} items">
|
||||
|
||||
<button
|
||||
class="button"
|
||||
on:click={prev}
|
||||
disabled={!submittedForm.limit || (submittedForm.skip <= 0) || !result?.results || (activePage === 0)}
|
||||
title="Previous {submittedForm.limit} items"
|
||||
>
|
||||
<Icon name="chev-l" />
|
||||
</button>
|
||||
<button class="button" on:click={next} disabled={!submittedForm.limit || ((result?.results?.length || 0) < submittedForm.limit) || !result?.results || !lastPage || (activePage >= lastPage)} title="Next {submittedForm.limit} items">
|
||||
|
||||
<button
|
||||
class="button"
|
||||
on:click={next}
|
||||
disabled={!submittedForm.limit || ((result?.results?.length || 0) < submittedForm.limit) || !result?.results || !lastPage || (activePage >= lastPage)}
|
||||
title="Next {submittedForm.limit} items"
|
||||
>
|
||||
<Icon name="chev-r" />
|
||||
</button>
|
||||
<button class="button" on:click={last} disabled={!submittedForm.limit || ((result?.results?.length || 0) < submittedForm.limit) || !result?.results || !lastPage || (activePage >= lastPage)} title="Last page">
|
||||
|
||||
<button
|
||||
class="button"
|
||||
on:click={last}
|
||||
disabled={!submittedForm.limit || ((result?.results?.length || 0) < submittedForm.limit) || !result?.results || !lastPage || (activePage >= lastPage)}
|
||||
title="Last page"
|
||||
>
|
||||
<Icon name="chevs-r" />
|
||||
</button>
|
||||
</div>
|
||||
@ -355,7 +403,12 @@
|
||||
</div>
|
||||
|
||||
{#if objectViewerData}
|
||||
<ObjectViewer bind:data={objectViewerData} saveable on:save={saveDocument} bind:successMessage={objectViewerSuccessMessage} />
|
||||
<ObjectViewer
|
||||
bind:data={objectViewerData}
|
||||
saveable
|
||||
on:save={saveDocument}
|
||||
bind:successMessage={objectViewerSuccessMessage}
|
||||
/>
|
||||
{/if}
|
||||
|
||||
<datalist id="limits">
|
||||
|
@ -18,14 +18,14 @@
|
||||
export let tab = 'find';
|
||||
|
||||
const tabs = {
|
||||
'stats': { icon: 'chart', title: 'Stats', component: Stats },
|
||||
'find': { icon: 'db', title: 'Find', component: Find },
|
||||
'insert': { icon: '+', title: 'Insert', component: Insert },
|
||||
'update': { icon: 'edit', title: 'Update', component: Update },
|
||||
'remove': { icon: 'trash', title: 'Remove', component: Remove },
|
||||
'indexes': { icon: 'list', title: 'Indexes', component: Indexes },
|
||||
'aggregate': { icon: 're', title: 'Aggregate', component: Aggregate },
|
||||
'shell': { icon: 'shell', title: 'Shell', component: Shell },
|
||||
stats: { icon: 'chart', title: 'Stats', component: Stats },
|
||||
find: { icon: 'db', title: 'Find', component: Find },
|
||||
insert: { icon: '+', title: 'Insert', component: Insert },
|
||||
update: { icon: 'edit', title: 'Update', component: Update },
|
||||
remove: { icon: 'trash', title: 'Remove', component: Remove },
|
||||
indexes: { icon: 'list', title: 'Indexes', component: Indexes },
|
||||
aggregate: { icon: 're', title: 'Aggregate', component: Aggregate },
|
||||
shell: { icon: 'shell', title: 'Shell', component: Shell },
|
||||
};
|
||||
|
||||
for (const key of Object.keys(tabs)) {
|
||||
|
@ -73,9 +73,11 @@
|
||||
<button class="button" on:click={refresh}>
|
||||
<Icon name="reload" spin={busy} /> Reload
|
||||
</button>
|
||||
|
||||
<button class="button" on:click={createIndex}>
|
||||
<Icon name="+" /> Create index…
|
||||
</button>
|
||||
|
||||
<button class="button danger" on:click={dropIndex} disabled={!_indexes.length || !activePath[0]}>
|
||||
<Icon name="x" /> Drop selected
|
||||
</button>
|
||||
|
@ -4,11 +4,11 @@
|
||||
import Icon from '$components/icon.svelte';
|
||||
import ObjectEditor from '$components/editors/objecteditor.svelte';
|
||||
import ObjectViewer from '$components/objectviewer.svelte';
|
||||
import { randomString } from '$lib/math';
|
||||
import { inputTypes } from '$lib/mongo';
|
||||
import views from '$lib/stores/views';
|
||||
import { capitalise, convertLooseJson, jsonLooseParse } from '$lib/strings';
|
||||
import { InsertItems } from '$wails/go/app/App';
|
||||
import { randomString } from '$lib/math.js';
|
||||
import { inputTypes } from '$lib/mongo/index.js';
|
||||
import views from '$lib/stores/views.js';
|
||||
import { capitalise, convertLooseJson, jsonLooseParse } from '$lib/strings.js';
|
||||
import { InsertItems } from '$wails/go/app/App.js';
|
||||
import { EJSON } from 'bson';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
import Form from './components/form.svelte';
|
||||
|
@ -1,8 +1,8 @@
|
||||
<script>
|
||||
import Icon from '$components/icon.svelte';
|
||||
import ObjectEditor from '$components/editors/objecteditor.svelte';
|
||||
import { convertLooseJson } from '$lib/strings';
|
||||
import { RemoveItems } from '$wails/go/app/App';
|
||||
import { convertLooseJson } from '$lib/strings.js';
|
||||
import { RemoveItems } from '$wails/go/app/App.js';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
export let collection;
|
||||
|
@ -1,10 +1,10 @@
|
||||
<script>
|
||||
import Icon from '$components/icon.svelte';
|
||||
import input from '$lib/actions/input';
|
||||
import { atomicUpdateOperators } from '$lib/mongo';
|
||||
import { deepClone } from '$lib/objects';
|
||||
import { convertLooseJson, jsonLooseParse } from '$lib/strings';
|
||||
import { UpdateItems } from '$wails/go/app/App';
|
||||
import input from '$lib/actions/input.js';
|
||||
import { atomicUpdateOperators } from '$lib/mongo/index.js';
|
||||
import { deepClone } from '$lib/objects.js';
|
||||
import { convertLooseJson, jsonLooseParse } from '$lib/strings.js';
|
||||
import { UpdateItems } from '$wails/go/app/App.js';
|
||||
|
||||
export let collection = {};
|
||||
|
||||
@ -27,7 +27,8 @@
|
||||
});
|
||||
|
||||
// function buildCode(form) {
|
||||
// let operation = '{ ' + form.parameters.filter(p => p.type).map(p => `${p.type}: ${p.value || '{}'}`).join(', ') + ' }';
|
||||
// let operation = '{ ' + form.parameters.filter(p => p.type).map(p =>
|
||||
// `${p.type}: ${p.value || '{}'}`).join(', ') + ' }';
|
||||
// if (operation === '{ }') {
|
||||
// operation = '{}';
|
||||
// }
|
||||
@ -38,7 +39,8 @@
|
||||
// form.many && (options += 'multi: true');
|
||||
// (form.upsert || form.many) && (options += ' }');
|
||||
|
||||
// const code = `db.${collection.key}.update(${form.query || '{}'}, ${operation}${options});`;
|
||||
// const code = `db.${collection.key}.update(${form.query || '{}'},
|
||||
// ${operation}${options});`;
|
||||
// return code;
|
||||
// }
|
||||
|
||||
@ -48,7 +50,13 @@
|
||||
f.parameters = f.parameters.map(param => {
|
||||
return { ...param, value: convertLooseJson(param.value) };
|
||||
});
|
||||
updatedCount = await UpdateItems(collection.hostKey, collection.dbKey, collection.key, JSON.stringify(f));
|
||||
|
||||
updatedCount = await UpdateItems(
|
||||
collection.hostKey,
|
||||
collection.dbKey,
|
||||
collection.key,
|
||||
JSON.stringify(f)
|
||||
);
|
||||
}
|
||||
|
||||
function removeParam(index) {
|
||||
@ -114,7 +122,12 @@
|
||||
|
||||
<label class="field">
|
||||
<span class="label">Filter</span>
|
||||
<input type="text" class="code" bind:value={form.query} use:input={{ type: 'json', autofocus: true }} placeholder={'{}'} />
|
||||
<input
|
||||
type="text"
|
||||
class="code"
|
||||
bind:value={form.query}
|
||||
use:input={{ type: 'json', autofocus: true }}
|
||||
placeholder={'{}'} />
|
||||
</label>
|
||||
|
||||
<fieldset class="parameters">
|
||||
@ -132,7 +145,13 @@
|
||||
</optgroup>
|
||||
{/each}
|
||||
</select>
|
||||
<input type="text" class="code" bind:value={param.value} placeholder={'{}'} use:input={{ type: 'json' }} />
|
||||
<input
|
||||
type="text"
|
||||
class="code"
|
||||
bind:value={param.value}
|
||||
placeholder={'{}'}
|
||||
use:input={{ type: 'json' }}
|
||||
/>
|
||||
</label>
|
||||
|
||||
<button class="button" disabled={form.parameters.length >= allOperators.length} on:click={() => addParameter()} type="button">
|
||||
|
@ -2,10 +2,10 @@
|
||||
import DirectoryChooser from '$components/editors/directorychooser.svelte';
|
||||
import Grid from '$components/grid/grid.svelte';
|
||||
import Modal from '$components/modal.svelte';
|
||||
import { startProgress } from '$lib/progress';
|
||||
import hostTree from '$lib/stores/hosttree';
|
||||
import applicationSettings from '$lib/stores/settings';
|
||||
import { OpenConnection, OpenDatabase } from '$wails/go/app/App';
|
||||
import { startProgress } from '$lib/progress.js';
|
||||
import hostTree from '$lib/stores/hosttree.js';
|
||||
import applicationSettings from '$lib/stores/settings.js';
|
||||
import { OpenConnection, OpenDatabase } from '$wails/go/app/App.js';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
|
||||
export let info = {};
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import BlankState from '$components/blankstate.svelte';
|
||||
import TabBar from '$components/tabbar.svelte';
|
||||
import { EventsOn } from '$wails/runtime/runtime';
|
||||
import { EventsOn } from '$wails/runtime/runtime.js';
|
||||
|
||||
import Shell from '../shell.svelte';
|
||||
import Stats from './stats.svelte';
|
||||
@ -11,8 +11,8 @@
|
||||
export let tab = 'stats';
|
||||
|
||||
const tabs = {
|
||||
'stats': { icon: 'chart', title: 'Database stats', component: Stats },
|
||||
'shell': { icon: 'shell', title: 'Shell', component: Shell },
|
||||
stats: { icon: 'chart', title: 'Database stats', component: Stats },
|
||||
shell: { icon: 'shell', title: 'Shell', component: Shell },
|
||||
};
|
||||
|
||||
for (const key of Object.keys(tabs)) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
<script>
|
||||
import Modal from '$components/modal.svelte';
|
||||
import input from '$lib/actions/input';
|
||||
import hostTree from '$lib/stores/hosttree';
|
||||
import { AddHost, UpdateHost } from '$wails/go/app/App';
|
||||
import input from '$lib/actions/input.js';
|
||||
import hostTree from '$lib/stores/hosttree.js';
|
||||
import { AddHost, UpdateHost } from '$wails/go/app/App.js';
|
||||
import { createEventDispatcher, onMount } from 'svelte';
|
||||
|
||||
export let hostKey = '';
|
||||
@ -54,7 +54,13 @@
|
||||
|
||||
<label class="field">
|
||||
<span class="label">Connection string</span>
|
||||
<input type="text" placeholder="mongodb://..." bind:value={form.uri} spellcheck="false" use:input />
|
||||
<input
|
||||
type="text"
|
||||
placeholder="mongodb://..."
|
||||
bind:value={form.uri}
|
||||
spellcheck="false"
|
||||
use:input
|
||||
/>
|
||||
</label>
|
||||
</form>
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
<script>
|
||||
import BlankState from '$components/blankstate.svelte';
|
||||
import TabBar from '$components/tabbar.svelte';
|
||||
import { EventsOn } from '$wails/runtime/runtime';
|
||||
import { EventsOn } from '$wails/runtime/runtime.js';
|
||||
|
||||
import Logs from './logs.svelte';
|
||||
import Shell from '../shell.svelte';
|
||||
@ -12,10 +12,10 @@
|
||||
export let tab = 'status';
|
||||
|
||||
const tabs = {
|
||||
'status': { icon: 'chart', title: 'Host status', component: Status },
|
||||
'shell': { icon: 'shell', title: 'Shell', component: Shell },
|
||||
'logs': { icon: 'doc', title: 'Logs', component: Logs },
|
||||
'systemInfo': { icon: 'server', title: 'System info', component: SystemInfo },
|
||||
status: { icon: 'chart', title: 'Host status', component: Status },
|
||||
shell: { icon: 'shell', title: 'Shell', component: Shell },
|
||||
logs: { icon: 'doc', title: 'Logs', component: Logs },
|
||||
systemInfo: { icon: 'server', title: 'System info', component: SystemInfo },
|
||||
};
|
||||
|
||||
for (const key of Object.keys(tabs)) {
|
||||
|
@ -2,9 +2,9 @@
|
||||
import Grid from '$components/grid/grid.svelte';
|
||||
import Icon from '$components/icon.svelte';
|
||||
import ObjectViewer from '$components/objectviewer.svelte';
|
||||
import input from '$lib/actions/input';
|
||||
import { logComponents, logLevels } from '$lib/mongo';
|
||||
import { BrowserOpenURL } from '$wails/runtime/runtime';
|
||||
import input from '$lib/actions/input.js';
|
||||
import { logComponents, logLevels } from '$lib/mongo/index.js';
|
||||
import { BrowserOpenURL } from '$wails/runtime/runtime.js';
|
||||
import { onDestroy } from 'svelte';
|
||||
|
||||
export let host;
|
||||
@ -82,7 +82,13 @@
|
||||
<div class="formrow">
|
||||
<label class="field">
|
||||
<span class="label">Auto reload (seconds)</span>
|
||||
<input type="number" class="autoreloadinput" bind:value={autoReloadInterval} list="autoreloadintervals" use:input />
|
||||
<input
|
||||
type="number"
|
||||
class="autoreloadinput"
|
||||
bind:value={autoReloadInterval}
|
||||
list="autoreloadintervals"
|
||||
use:input
|
||||
/>
|
||||
</label>
|
||||
|
||||
<label class="field">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script>
|
||||
import Grid from '$components/grid/grid.svelte';
|
||||
import hostTree from '$lib/stores/hosttree';
|
||||
import hostTree from '$lib/stores/hosttree.js';
|
||||
|
||||
export let path = [];
|
||||
</script>
|
||||
|
@ -1,8 +1,8 @@
|
||||
<script>
|
||||
import Icon from '$components/icon.svelte';
|
||||
import hostTree from '$lib/stores/hosttree';
|
||||
import sharedState from '$lib/stores/sharedstate';
|
||||
import { EventsOn } from '$wails/runtime/runtime';
|
||||
import hostTree from '$lib/stores/hosttree.js';
|
||||
import sharedState from '$lib/stores/sharedstate.js';
|
||||
import { EventsOn } from '$wails/runtime/runtime.js';
|
||||
import CollectionView from './collection/index.svelte';
|
||||
import DatabaseView from './database/index.svelte';
|
||||
import HostView from './host/index.svelte';
|
||||
|
@ -2,9 +2,9 @@
|
||||
import BlankState from '$components/blankstate.svelte';
|
||||
import CodeEditor from '$components/editors/codeeditor.svelte';
|
||||
import Icon from '$components/icon.svelte';
|
||||
import environment from '$lib/stores/environment';
|
||||
import { OpenShellScript, SaveShellScript } from '$wails/go/app/App';
|
||||
import { BrowserOpenURL } from '$wails/runtime/runtime';
|
||||
import environment from '$lib/stores/environment.js';
|
||||
import { OpenShellScript, SaveShellScript } from '$wails/go/app/App.js';
|
||||
import { BrowserOpenURL } from '$wails/runtime/runtime.js';
|
||||
import { javascript } from '@codemirror/lang-javascript';
|
||||
import { onDestroy, onMount } from 'svelte';
|
||||
|
||||
|
@ -9,10 +9,10 @@ export default defineConfig({
|
||||
plugins: [ svelte() ],
|
||||
resolve: {
|
||||
alias: {
|
||||
'$components': currentDir + '/src/components',
|
||||
'$organisms': currentDir + '/src/organisms',
|
||||
'$wails': currentDir + '/wailsjs',
|
||||
'$lib': currentDir + '/src/lib',
|
||||
$components: currentDir + '/src/components',
|
||||
$organisms: currentDir + '/src/organisms',
|
||||
$wails: currentDir + '/wailsjs',
|
||||
$lib: currentDir + '/src/lib',
|
||||
},
|
||||
},
|
||||
});
|
||||
|
Reference in New Issue
Block a user