Compare commits
5 Commits
v1.71.0
...
rf/flowFix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ea08f1e8f | ||
|
|
d302c92766 | ||
|
|
128622117d | ||
|
|
150ce7f731 | ||
|
|
fae406ee8f |
19
CHANGELOG.md
19
CHANGELOG.md
@@ -1,25 +1,6 @@
|
||||
# Changelog
|
||||
|
||||
|
||||
## [1.71.0](https://github.com/windmill-labs/windmill/compare/v1.70.1...v1.71.0) (2023-02-28)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **backend:** use counter for sleep/execution/pull durations ([e568690](https://github.com/windmill-labs/windmill/commit/e56869092a03fec4703ddd9ef65c89edb8122962))
|
||||
* **cli:** add autocompletions ([287b2db](https://github.com/windmill-labs/windmill/commit/287b2db22f7b56e90bcd0c4727c00096695c2e0d))
|
||||
* **frontend:** App drawer ([#1246](https://github.com/windmill-labs/windmill/issues/1246)) ([8a0d115](https://github.com/windmill-labs/windmill/commit/8a0d1158c4d7e970cb91e1adf4838e5efdbb39ff))
|
||||
* **frontend:** drawer for editing workspace scripts in flows ([6adc875](https://github.com/windmill-labs/windmill/commit/6adc87561070d8aceaba1838008cd7e6be2e2660))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **frontend:** Add more app custom css ([#1229](https://github.com/windmill-labs/windmill/issues/1229)) ([a4e4d18](https://github.com/windmill-labs/windmill/commit/a4e4d188ad10443dd0b7f104389594efc768dc59))
|
||||
* **frontend:** Add more app custom css ([#1247](https://github.com/windmill-labs/windmill/issues/1247)) ([1bb5ed9](https://github.com/windmill-labs/windmill/commit/1bb5ed9ae01fd7998b06833b6222e5dd5d774d35))
|
||||
* **frontend:** display currently selected filter even if not in list ([42d1cd6](https://github.com/windmill-labs/windmill/commit/42d1cd6456620ba917c560c87d736dc93634adff))
|
||||
* **frontend:** Fix deeply nested move ([#1245](https://github.com/windmill-labs/windmill/issues/1245)) ([a67f10e](https://github.com/windmill-labs/windmill/commit/a67f10eeb6fdb44bbb3a510badcc5ad0ae187a2b))
|
||||
* **frontend:** invisible subgrids have h-0 + app policies fix ([2244e83](https://github.com/windmill-labs/windmill/commit/2244e83b9da803a4cf46ab0825d7cb6cb0e24872))
|
||||
|
||||
## [1.70.1](https://github.com/windmill-labs/windmill/compare/v1.70.0...v1.70.1) (2023-02-27)
|
||||
|
||||
|
||||
|
||||
110
backend/Cargo.lock
generated
110
backend/Cargo.lock
generated
@@ -525,9 +525,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap"
|
||||
version = "4.1.8"
|
||||
version = "4.1.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5"
|
||||
checksum = "ec0b0588d44d4d63a87dbd75c136c166bbfd9a86a31cb89e09906521c7d3f5e3"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"clap_derive",
|
||||
@@ -540,9 +540,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "clap_derive"
|
||||
version = "4.1.8"
|
||||
version = "4.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0"
|
||||
checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro-error",
|
||||
@@ -704,9 +704,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "crossbeam-utils"
|
||||
version = "0.8.15"
|
||||
version = "0.8.14"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b"
|
||||
checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
@@ -966,9 +966,9 @@ checksum = "03d8c417d7a8cb362e0c37e5d815f5eb7c37f79ff93707329d5a194e42e54ca0"
|
||||
|
||||
[[package]]
|
||||
name = "dyn-clone"
|
||||
version = "1.0.11"
|
||||
version = "1.0.10"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30"
|
||||
checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60"
|
||||
|
||||
[[package]]
|
||||
name = "dyn-iter"
|
||||
@@ -1324,9 +1324,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "h2"
|
||||
version = "0.3.16"
|
||||
version = "0.3.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d"
|
||||
checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"fnv",
|
||||
@@ -1678,9 +1678,9 @@ checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440"
|
||||
|
||||
[[package]]
|
||||
name = "jobserver"
|
||||
version = "0.1.26"
|
||||
version = "0.1.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2"
|
||||
checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
@@ -2048,6 +2048,15 @@ dependencies = [
|
||||
"minimal-lexical",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nom8"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nu-ansi-term"
|
||||
version = "0.46.0"
|
||||
@@ -2507,9 +2516,9 @@ checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-crate"
|
||||
version = "1.3.1"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
|
||||
checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"toml_edit",
|
||||
@@ -2985,7 +2994,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rustpython-ast"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/RustPython/RustPython#f2515405b59f8fe3b9be59d4454783c2dc2d83d1"
|
||||
source = "git+https://github.com/RustPython/RustPython#351d464448607413dc12de6905f1165f8d45af54"
|
||||
dependencies = [
|
||||
"num-bigint",
|
||||
"rustpython-compiler-core",
|
||||
@@ -2994,7 +3003,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rustpython-compiler-core"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/RustPython/RustPython#f2515405b59f8fe3b9be59d4454783c2dc2d83d1"
|
||||
source = "git+https://github.com/RustPython/RustPython#351d464448607413dc12de6905f1165f8d45af54"
|
||||
dependencies = [
|
||||
"bincode",
|
||||
"bitflags",
|
||||
@@ -3011,7 +3020,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rustpython-parser"
|
||||
version = "0.2.0"
|
||||
source = "git+https://github.com/RustPython/RustPython#f2515405b59f8fe3b9be59d4454783c2dc2d83d1"
|
||||
source = "git+https://github.com/RustPython/RustPython#351d464448607413dc12de6905f1165f8d45af54"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"anyhow",
|
||||
@@ -3679,9 +3688,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601"
|
||||
|
||||
[[package]]
|
||||
name = "swc_atoms"
|
||||
version = "0.4.38"
|
||||
version = "0.4.37"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5a172f2e444ae1378286cd27ff2a5cb26eadfd7a77c98ccb0edde8992857be1e"
|
||||
checksum = "f88175a66f5a7c189e752bda520e148317776ecb22c75adc2c2f24c490834bd0"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"rustc-hash",
|
||||
@@ -3693,9 +3702,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swc_common"
|
||||
version = "0.29.33"
|
||||
version = "0.29.32"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a8a75c46065858a37cdda2c1c6fd056986e3b7752d5ec332e91ce312c6a22749"
|
||||
checksum = "1fc8e0e8109b26be70c82d9709562fc88cbcc09e03c2458221cf216c0088dea2"
|
||||
dependencies = [
|
||||
"ahash",
|
||||
"ast_node",
|
||||
@@ -3720,9 +3729,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_ast"
|
||||
version = "0.98.0"
|
||||
version = "0.96.7"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7b1f6bc913d0f1daf0fa713a64660aed27848e0047ee671ab2206ad602730d1f"
|
||||
checksum = "621c66e27fbb6cbb6434a4e2b25e439e9a2583cc3419a4a83eba51d16ac0cd7b"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"is-macro",
|
||||
@@ -3737,9 +3746,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "swc_ecma_parser"
|
||||
version = "0.127.0"
|
||||
version = "0.124.12"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3875db58a1515382c670679062133294e5ec88aff08776f5fb6e4f3c09c0f5f9"
|
||||
checksum = "89b3f472b3dfbfd279de364d2b014459a281824b938e243a8739037c445d6b6c"
|
||||
dependencies = [
|
||||
"either",
|
||||
"enum_kind",
|
||||
@@ -4071,19 +4080,19 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "toml_datetime"
|
||||
version = "0.6.1"
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
|
||||
checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5"
|
||||
|
||||
[[package]]
|
||||
name = "toml_edit"
|
||||
version = "0.19.4"
|
||||
version = "0.18.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825"
|
||||
checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b"
|
||||
dependencies = [
|
||||
"indexmap",
|
||||
"nom8",
|
||||
"toml_datetime",
|
||||
"winnow",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4456,11 +4465,9 @@ checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
|
||||
|
||||
[[package]]
|
||||
name = "unicode_names2"
|
||||
version = "0.6.0"
|
||||
source = "git+https://github.com/youknowone/unicode_names2.git?tag=v0.6.0+character-alias#4ce16aa85cbcdd9cc830410f1a72ef9a235f2fde"
|
||||
dependencies = [
|
||||
"phf",
|
||||
]
|
||||
version = "0.5.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "029df4cc8238cefc911704ff8fa210853a0f3bce2694d8f51181dd41ee0f3301"
|
||||
|
||||
[[package]]
|
||||
name = "unsafe-libyaml"
|
||||
@@ -4749,7 +4756,7 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "windmill"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
@@ -4776,7 +4783,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"argon2",
|
||||
@@ -4831,7 +4838,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-api-client"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"base64 0.21.0",
|
||||
"chrono",
|
||||
@@ -4846,7 +4853,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-audit"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"serde",
|
||||
@@ -4859,7 +4866,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-common"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
@@ -4884,7 +4891,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_json",
|
||||
@@ -4892,7 +4899,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-bash"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools",
|
||||
@@ -4906,7 +4913,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-go"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools",
|
||||
@@ -4918,7 +4925,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-py"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools",
|
||||
@@ -4933,7 +4940,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-parser-ts"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"deno_core",
|
||||
@@ -4947,7 +4954,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-queue"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"chrono",
|
||||
@@ -4970,7 +4977,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "windmill-worker"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-recursion",
|
||||
@@ -5084,15 +5091,6 @@ version = "0.42.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
|
||||
|
||||
[[package]]
|
||||
name = "winnow"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "faf09497b8f8b5ac5d3bb4d05c0a99be20f26fd3d5f2db7b0716e946d5103658"
|
||||
dependencies = [
|
||||
"memchr",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "winreg"
|
||||
version = "0.10.1"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "windmill"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
|
||||
@@ -19,7 +19,7 @@ members = [
|
||||
]
|
||||
|
||||
[workspace.package]
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
authors = ["Ruben Fiszel <ruben@windmill.dev>"]
|
||||
edition = "2021"
|
||||
|
||||
|
||||
@@ -60,60 +60,6 @@ async fn main() -> anyhow::Result<()> {
|
||||
let (tx, rx) = tokio::sync::broadcast::channel::<()>(3);
|
||||
let shutdown_signal = windmill_common::shutdown_signal(tx);
|
||||
|
||||
#[cfg(feature = "enterprise")]
|
||||
tracing::info!(
|
||||
"
|
||||
##############################
|
||||
Windmill Enterprise Edition {GIT_VERSION}
|
||||
##############################"
|
||||
);
|
||||
|
||||
#[cfg(not(feature = "enterprise"))]
|
||||
tracing::info!(
|
||||
"
|
||||
##############################
|
||||
Windmill Community Edition {GIT_VERSION}
|
||||
##############################"
|
||||
);
|
||||
|
||||
display_config(vec![
|
||||
"DISABLE_NSJAIL",
|
||||
"DISABLE_SERVER",
|
||||
"NUM_WORKERS",
|
||||
"METRICS_ADDR",
|
||||
"JSON_FMT",
|
||||
"BASE_URL",
|
||||
"BASE_INTERNAL_URL",
|
||||
"TIMEOUT",
|
||||
"SLEEP_QUEUE",
|
||||
"MAX_LOG_SIZE",
|
||||
"PORT",
|
||||
"KEEP_JOB_DIR",
|
||||
"S3_CACHE_BUCKET",
|
||||
"TAR_CACHE_RATE",
|
||||
"COOKIE_DOMAIN",
|
||||
"PYTHON_PATH",
|
||||
"DENO_PATH",
|
||||
"GO_PATH",
|
||||
"PIP_INDEX_URL",
|
||||
"PIP_EXTRA_INDEX_URL",
|
||||
"PIP_TRUSTED_HOST",
|
||||
"PATH",
|
||||
"HOME",
|
||||
"DATABASE_CONNECTIONS",
|
||||
"TIMEOUT_WAIT_RESULT",
|
||||
"QUEUE_LIMIT_WAIT_RESULT",
|
||||
"DENO_AUTH_TOKENS",
|
||||
"DENO_FLAGS",
|
||||
"PIP_LOCAL_DEPENDENCIES",
|
||||
"ADDITIONAL_PYTHON_PATHS",
|
||||
"INCLUDE_HEADERS",
|
||||
"WHITELIST_WORKSPACES",
|
||||
"BLACKLIST_WORKSPACES",
|
||||
"NEW_USER_WEBHOOK",
|
||||
"CLOUD_HOSTED",
|
||||
]);
|
||||
|
||||
if server_mode || num_workers > 0 {
|
||||
let addr = SocketAddr::from(([0, 0, 0, 0], port));
|
||||
|
||||
@@ -126,6 +72,60 @@ Windmill Community Edition {GIT_VERSION}
|
||||
|
||||
let workers_f = async {
|
||||
if num_workers > 0 {
|
||||
#[cfg(feature = "enterprise")]
|
||||
tracing::info!(
|
||||
"
|
||||
##############################
|
||||
Windmill Enterprise Edition {GIT_VERSION}
|
||||
##############################"
|
||||
);
|
||||
|
||||
#[cfg(not(feature = "enterprise"))]
|
||||
tracing::info!(
|
||||
"
|
||||
##############################
|
||||
Windmill Community Edition {GIT_VERSION}
|
||||
##############################"
|
||||
);
|
||||
|
||||
display_config(vec![
|
||||
"DISABLE_NSJAIL",
|
||||
"DISABLE_SERVER",
|
||||
"NUM_WORKERS",
|
||||
"METRICS_ADDR",
|
||||
"JSON_FMT",
|
||||
"BASE_URL",
|
||||
"BASE_INTERNAL_URL",
|
||||
"TIMEOUT",
|
||||
"SLEEP_QUEUE",
|
||||
"MAX_LOG_SIZE",
|
||||
"PORT",
|
||||
"KEEP_JOB_DIR",
|
||||
"S3_CACHE_BUCKET",
|
||||
"TAR_CACHE_RATE",
|
||||
"COOKIE_DOMAIN",
|
||||
"PYTHON_PATH",
|
||||
"DENO_PATH",
|
||||
"GO_PATH",
|
||||
"PIP_INDEX_URL",
|
||||
"PIP_EXTRA_INDEX_URL",
|
||||
"PIP_TRUSTED_HOST",
|
||||
"PATH",
|
||||
"HOME",
|
||||
"DATABASE_CONNECTIONS",
|
||||
"TIMEOUT_WAIT_RESULT",
|
||||
"QUEUE_LIMIT_WAIT_RESULT",
|
||||
"DENO_AUTH_TOKENS",
|
||||
"DENO_FLAGS",
|
||||
"PIP_LOCAL_DEPENDENCIES",
|
||||
"ADDITIONAL_PYTHON_PATHS",
|
||||
"INCLUDE_HEADERS",
|
||||
"WHITELIST_WORKSPACES",
|
||||
"BLACKLIST_WORKSPACES",
|
||||
"NEW_USER_WEBHOOK",
|
||||
"CLOUD_HOSTED",
|
||||
]);
|
||||
|
||||
run_workers(
|
||||
db.clone(),
|
||||
rx.resubscribe(),
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
openapi: "3.0.3"
|
||||
|
||||
info:
|
||||
version: 1.71.0
|
||||
version: 1.70.1
|
||||
title: Windmill API
|
||||
|
||||
contact:
|
||||
|
||||
@@ -1311,9 +1311,7 @@ async fn create_user(
|
||||
if let Some(new_user_webhook) = NEW_USER_WEBHOOK.clone() {
|
||||
let _ = HTTP_CLIENT
|
||||
.post(&new_user_webhook)
|
||||
.json(
|
||||
&serde_json::json!({"email" : &nu.email, "name": &nu.name, "event": "global_add"}),
|
||||
)
|
||||
.json(&serde_json::json!({"email" : &nu.email, "name": &nu.name, "event": "new_user"}))
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| tracing::error!("Error sending new user webhook: {}", e.to_string()));
|
||||
|
||||
@@ -965,7 +965,7 @@ async fn invite_user(
|
||||
if let Some(new_user_webhook) = NEW_USER_WEBHOOK.clone() {
|
||||
let _ = &HTTP_CLIENT
|
||||
.post(&new_user_webhook)
|
||||
.json(&serde_json::json!({"email" : &nu.email, "event": "workspace_invite"}))
|
||||
.json(&serde_json::json!({"email" : &nu.email, "event": "new_invite"}))
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| tracing::error!("Error sending new user webhook: {}", e.to_string()));
|
||||
@@ -1002,15 +1002,6 @@ async fn add_user(
|
||||
|
||||
tx.commit().await?;
|
||||
|
||||
if let Some(new_user_webhook) = NEW_USER_WEBHOOK.clone() {
|
||||
let _ = HTTP_CLIENT
|
||||
.post(&new_user_webhook)
|
||||
.json(&serde_json::json!({"email" : &nu.email, "event": "workspace_add"}))
|
||||
.send()
|
||||
.await
|
||||
.map_err(|e| tracing::error!("Error sending new user webhook: {}", e.to_string()));
|
||||
}
|
||||
|
||||
Ok((
|
||||
StatusCode::CREATED,
|
||||
format!("user with email {} added", nu.email),
|
||||
|
||||
@@ -13,7 +13,7 @@ import sync from "./sync.ts";
|
||||
import { tryResolveVersion } from "./context.ts";
|
||||
import { GlobalOptions } from "./types.ts";
|
||||
|
||||
const VERSION = "v1.71.0";
|
||||
const VERSION = "v1.70.1";
|
||||
|
||||
let command: any = new Command()
|
||||
.name("wmill")
|
||||
|
||||
4
frontend/package-lock.json
generated
4
frontend/package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "windmill",
|
||||
"version": "1.71.0",
|
||||
"version": "1.70.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "windmill",
|
||||
"version": "1.71.0",
|
||||
"version": "1.70.1",
|
||||
"dependencies": {
|
||||
"@fortawesome/free-brands-svg-icons": "^6.2.1",
|
||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "windmill",
|
||||
"version": "1.71.0",
|
||||
"version": "1.70.1",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
export function closeDrawer() {
|
||||
drawer?.closeDrawer()
|
||||
const index = $page.url.href.lastIndexOf('#')
|
||||
if (index === -1) return
|
||||
const hashRemoved = $page.url.href.slice(0, index)
|
||||
goto(hashRemoved)
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte'
|
||||
import type { AppInput } from '../../inputType'
|
||||
import type { AppEditorContext, ComponentCustomCSS } from '../../types'
|
||||
import { concatCustomCss } from '../../utils'
|
||||
import { AlignWrapper, InputValue } from '../helpers'
|
||||
import { AlignWrapper, InputValue, RunnableWrapper } from '../helpers'
|
||||
import { loadIcon } from '../icon'
|
||||
|
||||
export let id: string
|
||||
@@ -11,9 +8,6 @@
|
||||
export let verticalAlignment: 'top' | 'center' | 'bottom' | undefined = undefined
|
||||
export let configuration: Record<string, AppInput>
|
||||
export const staticOutputs: string[] = []
|
||||
export let customCss: ComponentCustomCSS<'container' | 'icon'> | undefined = undefined
|
||||
|
||||
const { app } = getContext<AppEditorContext>('AppEditorContext')
|
||||
|
||||
let icon: string | undefined = undefined
|
||||
let size: number
|
||||
@@ -28,8 +22,6 @@
|
||||
iconComponent = await loadIcon(icon)
|
||||
}
|
||||
}
|
||||
|
||||
$: css = concatCustomCss($app.css?.iconcomponent, customCss)
|
||||
</script>
|
||||
|
||||
<InputValue {id} input={configuration.icon} bind:value={icon} />
|
||||
@@ -37,20 +29,13 @@
|
||||
<InputValue {id} input={configuration.color} bind:value={color} />
|
||||
<InputValue {id} input={configuration.strokeWidth} bind:value={strokeWidth} />
|
||||
|
||||
<AlignWrapper
|
||||
{horizontalAlignment}
|
||||
{verticalAlignment}
|
||||
class={css?.container?.class ?? ''}
|
||||
style={css?.container?.style ?? ''}
|
||||
>
|
||||
<AlignWrapper {horizontalAlignment} {verticalAlignment}>
|
||||
{#if iconComponent}
|
||||
<svelte:component
|
||||
this={iconComponent}
|
||||
size={size || 24}
|
||||
color={color || 'currentColor'}
|
||||
strokeWidth={strokeWidth || 2}
|
||||
class={css?.icon?.class ?? ''}
|
||||
style={css?.icon?.style ?? ''}
|
||||
/>
|
||||
{/if}
|
||||
</AlignWrapper>
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import type { staticValues } from '../../editor/componentsPanel/componentStaticValues'
|
||||
import type { AppInput } from '../../inputType'
|
||||
import type { AppEditorContext, ComponentCustomCSS } from '../../types'
|
||||
import { concatCustomCss } from '../../utils'
|
||||
import InputValue from '../helpers/InputValue.svelte'
|
||||
|
||||
type FitOption = (typeof staticValues)['objectFitOptions'][number]
|
||||
@@ -12,9 +8,7 @@
|
||||
export let id: string
|
||||
export let configuration: Record<string, AppInput>
|
||||
export const staticOutputs: string[] = ['loading']
|
||||
export let customCss: ComponentCustomCSS<'image'> | undefined = undefined
|
||||
|
||||
const { app } = getContext<AppEditorContext>('AppEditorContext')
|
||||
const fit: Record<FitOption, string> = {
|
||||
cover: 'object-cover',
|
||||
contain: 'object-contain',
|
||||
@@ -24,18 +18,18 @@
|
||||
let source: string | undefined = undefined
|
||||
let imageFit: FitOption | undefined = undefined
|
||||
let altText: string | undefined = undefined
|
||||
|
||||
$: css = concatCustomCss($app.css?.imagecomponent, customCss)
|
||||
let customStyles: string | undefined = undefined
|
||||
</script>
|
||||
|
||||
<InputValue {id} input={configuration.source} bind:value={source} />
|
||||
<InputValue {id} input={configuration.imageFit} bind:value={imageFit} />
|
||||
<InputValue {id} input={configuration.altText} bind:value={altText} />
|
||||
<InputValue {id} input={configuration.customStyles} bind:value={customStyles} />
|
||||
|
||||
<img
|
||||
on:pointerdown|preventDefault
|
||||
src={source}
|
||||
alt={altText}
|
||||
style={css?.image?.style ?? ''}
|
||||
class={twMerge(`w-full h-full ${fit[imageFit || 'cover']}`, css?.image?.class ?? '')}
|
||||
style={customStyles}
|
||||
class="w-full h-full {fit[imageFit || 'cover']}"
|
||||
/>
|
||||
|
||||
@@ -1,44 +1,41 @@
|
||||
<script lang="ts">
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import { classNames } from '$lib/utils'
|
||||
import type { HorizontalAlignment, VerticalAlignment } from '../../types'
|
||||
|
||||
export let horizontalAlignment: HorizontalAlignment | undefined = undefined
|
||||
export let verticalAlignment: VerticalAlignment | undefined = undefined
|
||||
export let noWFull = false
|
||||
let c = ''
|
||||
export { c as class }
|
||||
export let style = ''
|
||||
|
||||
function tailwindHorizontalAlignment(alignment?: HorizontalAlignment) {
|
||||
if (!alignment) return ''
|
||||
if(!alignment) return '';
|
||||
const classes: Record<HorizontalAlignment, string> = {
|
||||
left: 'justify-start',
|
||||
center: 'justify-center',
|
||||
right: 'justify-end'
|
||||
right: 'justify-end',
|
||||
}
|
||||
return classes[alignment]
|
||||
}
|
||||
|
||||
function tailwindVerticalAlignment(alignment?: VerticalAlignment) {
|
||||
if (!alignment) return ''
|
||||
if(!alignment) return '';
|
||||
const classes: Record<VerticalAlignment, string> = {
|
||||
top: 'items-start',
|
||||
center: 'items-center',
|
||||
bottom: 'items-end'
|
||||
bottom: 'items-end',
|
||||
}
|
||||
return classes[alignment]
|
||||
}
|
||||
|
||||
$: classes = twMerge(
|
||||
$: classes = classNames(
|
||||
'flex z-auto',
|
||||
noWFull ? '' : 'w-full',
|
||||
tailwindHorizontalAlignment(horizontalAlignment),
|
||||
tailwindVerticalAlignment(verticalAlignment),
|
||||
verticalAlignment ? 'h-full' : '',
|
||||
c
|
||||
$$props.class || ''
|
||||
)
|
||||
</script>
|
||||
|
||||
<div class={classes} {style}>
|
||||
<div class={classes}>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
import TestJobLoader from '$lib/components/TestJobLoader.svelte'
|
||||
import { AppService, type CompletedJob } from '$lib/gen'
|
||||
import { defaultIfEmptyString, emptySchema, sendUserToast } from '$lib/utils'
|
||||
import { deepEqual } from 'fast-equals'
|
||||
import { getContext, onMount } from 'svelte'
|
||||
import { computeFields } from '../../editor/inlineScriptsPanel/utils'
|
||||
import type { AppInputs, Runnable } from '../../inputType'
|
||||
@@ -39,8 +38,7 @@
|
||||
jobs,
|
||||
noBackend,
|
||||
errorByComponent,
|
||||
mode,
|
||||
stateId
|
||||
mode
|
||||
} = getContext<AppEditorContext>('AppEditorContext')
|
||||
|
||||
onMount(() => {
|
||||
@@ -115,11 +113,13 @@
|
||||
// Inline scripts directly provide the schema
|
||||
if (inlineScript) {
|
||||
const newSchema = inlineScript.schema
|
||||
|
||||
const newFields = computeFields(newSchema, defaultUserInput, fields)
|
||||
|
||||
if (!deepEqual(newFields, fields)) {
|
||||
fields = newFields
|
||||
$stateId++
|
||||
if (JSON.stringify(newFields) !== JSON.stringify(fields)) {
|
||||
setTimeout(() => {
|
||||
fields = newFields
|
||||
}, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import type { AppInput } from '../../inputType'
|
||||
import type { Output } from '../../rx'
|
||||
import type { AppEditorContext, ComponentCustomCSS } from '../../types'
|
||||
import { concatCustomCss } from '../../utils'
|
||||
import type { AppEditorContext } from '../../types'
|
||||
import AlignWrapper from '../helpers/AlignWrapper.svelte'
|
||||
import InputDefaultValue from '../helpers/InputDefaultValue.svelte'
|
||||
import InputValue from '../helpers/InputValue.svelte'
|
||||
@@ -14,9 +12,8 @@
|
||||
export let inputType: 'date' | 'time' | 'datetime-local'
|
||||
export let verticalAlignment: 'top' | 'center' | 'bottom' | undefined = undefined
|
||||
export const staticOutputs: string[] = ['result']
|
||||
export let customCss: ComponentCustomCSS<'input'> | undefined = undefined
|
||||
|
||||
const { app, worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
||||
const { worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
||||
let input: HTMLInputElement
|
||||
let labelValue: string = 'Title'
|
||||
let minValue: string = ''
|
||||
@@ -32,8 +29,6 @@
|
||||
}
|
||||
|
||||
$: input && handleInput()
|
||||
|
||||
$: css = concatCustomCss($app.css?.dateinputcomponent, customCss)
|
||||
</script>
|
||||
|
||||
<InputValue {id} input={configuration.label} bind:value={labelValue} />
|
||||
@@ -51,7 +46,6 @@
|
||||
min={minValue}
|
||||
max={maxValue}
|
||||
placeholder="Type..."
|
||||
class={twMerge('mx-0.5', css?.input?.class ?? '')}
|
||||
style={css?.input?.style ?? ''}
|
||||
class="h-full"
|
||||
/>
|
||||
</AlignWrapper>
|
||||
|
||||
@@ -1,19 +1,16 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import { FileInput } from '../../../common'
|
||||
import type { AppInput } from '../../inputType'
|
||||
import type { Output } from '../../rx'
|
||||
import type { AppEditorContext, ComponentCustomCSS } from '../../types'
|
||||
import { concatCustomCss } from '../../utils'
|
||||
import type { AppEditorContext } from '../../types'
|
||||
import InputValue from '../helpers/InputValue.svelte'
|
||||
|
||||
export let id: string
|
||||
export let configuration: Record<string, AppInput>
|
||||
export const staticOutputs: string[] = ['result']
|
||||
export let customCss: ComponentCustomCSS<'container'> | undefined = undefined
|
||||
|
||||
const { app, worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
||||
const { worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
||||
|
||||
let acceptedFileTypes: string[] | undefined = undefined
|
||||
let allowMultiple: boolean | undefined = undefined
|
||||
@@ -27,8 +24,6 @@
|
||||
async function handleChange(files: string[] | undefined) {
|
||||
outputs?.result.set(files)
|
||||
}
|
||||
|
||||
$: css = concatCustomCss($app.css?.fileinputcomponent, customCss)
|
||||
</script>
|
||||
|
||||
<InputValue {id} input={configuration.acceptedFileTypes} bind:value={acceptedFileTypes} />
|
||||
@@ -43,8 +38,7 @@
|
||||
on:change={({ detail }) => {
|
||||
handleChange(detail)
|
||||
}}
|
||||
class={twMerge('w-full h-full', css?.container?.class)}
|
||||
style={css?.container?.style}
|
||||
class="w-full h-full"
|
||||
>
|
||||
{text}
|
||||
</FileInput>
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
import { getContext } from 'svelte'
|
||||
import type { AppInput } from '../../inputType'
|
||||
import type { Output } from '../../rx'
|
||||
import type { AppEditorContext, ComponentCustomCSS } from '../../types'
|
||||
import { concatCustomCss } from '../../utils'
|
||||
import type { AppEditorContext } from '../../types'
|
||||
import AlignWrapper from '../helpers/AlignWrapper.svelte'
|
||||
import InputDefaultValue from '../helpers/InputDefaultValue.svelte'
|
||||
import InputValue from '../helpers/InputValue.svelte'
|
||||
@@ -12,9 +11,8 @@
|
||||
export let configuration: Record<string, AppInput>
|
||||
export let verticalAlignment: 'top' | 'center' | 'bottom' | undefined = undefined
|
||||
export const staticOutputs: string[] = ['result']
|
||||
export let customCss: ComponentCustomCSS<'input'> | undefined = undefined
|
||||
|
||||
const { app, worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
||||
const { worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
||||
let input: HTMLInputElement
|
||||
|
||||
let defaultValue: number | undefined = undefined
|
||||
@@ -35,8 +33,6 @@
|
||||
}
|
||||
|
||||
$: input && handleInput()
|
||||
|
||||
$: css = concatCustomCss($app.css?.numberinputcomponent, customCss)
|
||||
</script>
|
||||
|
||||
<InputValue {id} input={configuration.step} bind:value={step} />
|
||||
@@ -48,8 +44,6 @@
|
||||
|
||||
<AlignWrapper {verticalAlignment}>
|
||||
<input
|
||||
class="mx-0.5 {css?.input?.class ?? ''}"
|
||||
style={css?.input?.style ?? ''}
|
||||
bind:this={input}
|
||||
on:input={handleInput}
|
||||
on:focus={(e) => {
|
||||
|
||||
@@ -3,24 +3,20 @@
|
||||
import { getContext } from 'svelte'
|
||||
import type { AppInput } from '../../inputType'
|
||||
import type { Output } from '../../rx'
|
||||
import type { AppEditorContext, ComponentCustomCSS } from '../../types'
|
||||
import type { AppEditorContext } from '../../types'
|
||||
import AlignWrapper from '../helpers/AlignWrapper.svelte'
|
||||
import InputValue from '../helpers/InputValue.svelte'
|
||||
import { concatCustomCss } from '../../utils'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import { Badge } from '$lib/components/common'
|
||||
|
||||
export let id: string
|
||||
export let configuration: Record<string, AppInput>
|
||||
export let verticalAlignment: 'top' | 'center' | 'bottom' | undefined = undefined
|
||||
export const staticOutputs: string[] = ['result']
|
||||
export let customCss: ComponentCustomCSS<'handles' | 'bar' | 'limits' | 'values'> | undefined =
|
||||
undefined
|
||||
|
||||
const { app, worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
||||
const { worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
||||
let min = 0
|
||||
let max = 42
|
||||
let step = 1
|
||||
let slider: HTMLElement
|
||||
|
||||
let values: [number, number] = [0, 0]
|
||||
|
||||
@@ -29,17 +25,6 @@
|
||||
}
|
||||
|
||||
$: outputs?.result.set(values)
|
||||
|
||||
$: css = concatCustomCss($app.css?.rangecomponent, customCss)
|
||||
|
||||
let lastStyle: string | undefined = undefined
|
||||
$: if (css && slider && lastStyle !== css?.handles?.style) {
|
||||
const handles = slider.querySelectorAll<HTMLSpanElement>('.rangeNub')
|
||||
if (handles) {
|
||||
lastStyle = css?.handles?.style
|
||||
handles.forEach((handle) => (handle.style.cssText = css?.handles?.style ?? ''))
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<InputValue {id} input={configuration.step} bind:value={step} />
|
||||
@@ -51,45 +36,20 @@
|
||||
<AlignWrapper {verticalAlignment}>
|
||||
<div class="flex flex-col w-full">
|
||||
<div class="flex items-center w-full gap-1 px-1">
|
||||
<span class={css?.limits?.class ?? ''} style={css?.limits?.style ?? ''}>
|
||||
{min}
|
||||
</span>
|
||||
<span>{min}</span>
|
||||
<div class="grow" on:pointerdown|stopPropagation>
|
||||
<RangeSlider
|
||||
bind:slider
|
||||
bind:values
|
||||
{step}
|
||||
min={min ?? 0}
|
||||
max={max ?? 1}
|
||||
range
|
||||
pips
|
||||
hoverable={false}
|
||||
/>
|
||||
<!-- <RangeSlider {step} range min={min ?? 0} max={max ?? 1} bind:values /> -->
|
||||
<RangeSlider {step} range min={min ?? 0} max={max ?? 1} bind:values />
|
||||
<!-- <DoubleRange bind:start bind:end /> -->
|
||||
</div>
|
||||
<span class={css?.limits?.class ?? ''} style={css?.limits?.style ?? ''}>
|
||||
{max}
|
||||
</span>
|
||||
<span>{max}</span>
|
||||
</div>
|
||||
<div class="flex justify-between px-1">
|
||||
<span
|
||||
class={twMerge(
|
||||
'text-center text-sm font-medium bg-blue-100 text-blue-800 rounded px-2.5 py-0.5',
|
||||
css?.values?.class ?? ''
|
||||
)}
|
||||
style={css?.values?.style ?? ''}
|
||||
>
|
||||
{values[0]}
|
||||
</span>
|
||||
<span
|
||||
class={twMerge(
|
||||
'text-center text-sm font-medium bg-blue-100 text-blue-800 rounded px-2.5 py-0.5',
|
||||
css?.values?.class ?? ''
|
||||
)}
|
||||
style={css?.values?.style ?? ''}
|
||||
>
|
||||
{values[1]}
|
||||
</span>
|
||||
<div>
|
||||
<Badge color="blue">{values[0]}</Badge>
|
||||
</div>
|
||||
<div>
|
||||
<Badge color="blue">{values[1]}</Badge>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</AlignWrapper>
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
items={listItems}
|
||||
class={css?.input?.class ?? ''}
|
||||
inputStyles={SELECT_INPUT_DEFAULT_STYLE.inputStyles}
|
||||
containerStyles={SELECT_INPUT_DEFAULT_STYLE.containerStyles + css?.input?.style}
|
||||
containerStyles={SELECT_INPUT_DEFAULT_STYLE.containerStyles + css?.input.style}
|
||||
{value}
|
||||
{placeholder}
|
||||
on:click={() => {
|
||||
|
||||
@@ -1,25 +1,22 @@
|
||||
<script lang="ts">
|
||||
import { Badge } from '$lib/components/common'
|
||||
import RangeSlider from 'svelte-range-slider-pips'
|
||||
import { getContext } from 'svelte'
|
||||
import type { AppInput } from '../../inputType'
|
||||
import type { Output } from '../../rx'
|
||||
import type { AppEditorContext, ComponentCustomCSS } from '../../types'
|
||||
import type { AppEditorContext } from '../../types'
|
||||
import AlignWrapper from '../helpers/AlignWrapper.svelte'
|
||||
import InputValue from '../helpers/InputValue.svelte'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import { concatCustomCss } from '../../utils'
|
||||
|
||||
export let id: string
|
||||
export let configuration: Record<string, AppInput>
|
||||
export let verticalAlignment: 'top' | 'center' | 'bottom' | undefined = undefined
|
||||
export const staticOutputs: string[] = ['result']
|
||||
export let customCss: ComponentCustomCSS<'handle' | 'limits' | 'value'> | undefined = undefined
|
||||
|
||||
const { app, worldStore, selectedComponent } = getContext<AppEditorContext>('AppEditorContext')
|
||||
const { worldStore, selectedComponent } = getContext<AppEditorContext>('AppEditorContext')
|
||||
let min = 0
|
||||
let max = 42
|
||||
let step = 1
|
||||
let slider: HTMLElement
|
||||
|
||||
$: outputs = $worldStore?.outputsById[id] as {
|
||||
result: Output<number | null>
|
||||
@@ -37,17 +34,6 @@
|
||||
const num = isNaN(+values[0]) ? null : +values[0]
|
||||
outputs?.result.set(num)
|
||||
}
|
||||
|
||||
$: css = concatCustomCss($app.css?.slidercomponent, customCss)
|
||||
|
||||
let lastStyle: string | undefined = undefined
|
||||
$: if (css && slider && lastStyle !== css?.handle?.style) {
|
||||
const handle = slider.querySelector<HTMLSpanElement>('.rangeNub')
|
||||
if (handle) {
|
||||
lastStyle = css?.handle?.style
|
||||
handle.style.cssText = css?.handle?.style ?? ''
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<InputValue {id} input={configuration.step} bind:value={step} />
|
||||
@@ -57,33 +43,11 @@
|
||||
|
||||
<AlignWrapper {verticalAlignment}>
|
||||
<div class="flex items-center w-full gap-1 px-1">
|
||||
<span class={css?.limits?.class ?? ''} style={css?.limits?.style ?? ''}>
|
||||
{min}
|
||||
</span>
|
||||
<span>{min}</span>
|
||||
<div class="grow" on:pointerdown|stopPropagation={() => ($selectedComponent = id)}>
|
||||
<RangeSlider
|
||||
bind:slider
|
||||
bind:values
|
||||
{step}
|
||||
min={min ?? 0}
|
||||
max={max ?? 1}
|
||||
pips
|
||||
hoverable={false}
|
||||
/>
|
||||
<RangeSlider {step} min={min ?? 0} max={max ?? 1} bind:values />
|
||||
</div>
|
||||
<span class={css?.limits?.class ?? ''} style={css?.limits?.style ?? ''}>
|
||||
{max}
|
||||
</span>
|
||||
<span class="mx-2">
|
||||
<span
|
||||
class={twMerge(
|
||||
'text-center text-sm font-medium bg-blue-100 text-blue-800 rounded px-2.5 py-0.5',
|
||||
css?.value?.class ?? ''
|
||||
)}
|
||||
style={css?.value?.style ?? ''}
|
||||
>
|
||||
{values[0]}
|
||||
</span>
|
||||
</span>
|
||||
<span>{max}</span>
|
||||
<span class="mx-2"><Badge large color="blue">{values[0]}</Badge></span>
|
||||
</div>
|
||||
</AlignWrapper>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import type { AppInput } from '../../inputType'
|
||||
import type { Output } from '../../rx'
|
||||
import type { AppEditorContext, ComponentCustomCSS } from '../../types'
|
||||
@@ -15,7 +14,6 @@
|
||||
export let verticalAlignment: 'top' | 'center' | 'bottom' | undefined = undefined
|
||||
export const staticOutputs: string[] = ['result']
|
||||
export let customCss: ComponentCustomCSS<'input'> | undefined = undefined
|
||||
export let appCssKey: 'textinputcomponent' | 'passwordinputcomponent' = 'textinputcomponent'
|
||||
|
||||
const { app, worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
||||
let input: HTMLInputElement
|
||||
@@ -33,7 +31,7 @@
|
||||
|
||||
$: input && handleInput()
|
||||
|
||||
$: css = concatCustomCss($app.css?.[appCssKey], customCss)
|
||||
$: css = concatCustomCss($app.css?.textinputcomponent, customCss)
|
||||
</script>
|
||||
|
||||
<InputValue {id} input={configuration.placeholder} bind:value={placeholder} />
|
||||
@@ -42,7 +40,7 @@
|
||||
|
||||
<AlignWrapper {verticalAlignment}>
|
||||
<input
|
||||
class={twMerge('mx-0.5', css?.input?.class ?? '')}
|
||||
class="mx-0.5 {css?.input?.class ?? ''}"
|
||||
style={css?.input?.style ?? ''}
|
||||
on:focus={(e) => {
|
||||
e?.stopPropagation()
|
||||
|
||||
@@ -2,8 +2,7 @@
|
||||
import { getContext } from 'svelte'
|
||||
import type { AppInput } from '../../../inputType'
|
||||
import type { Output } from '../../../rx'
|
||||
import type { AppEditorContext, ComponentCustomCSS } from '../../../types'
|
||||
import { concatCustomCss } from '../../../utils'
|
||||
import type { AppEditorContext } from '../../../types'
|
||||
import AlignWrapper from '../../helpers/AlignWrapper.svelte'
|
||||
import InputValue from '../../helpers/InputValue.svelte'
|
||||
import CurrencyInput from './CurrencyInput.svelte'
|
||||
@@ -12,9 +11,8 @@
|
||||
export let configuration: Record<string, AppInput>
|
||||
export let verticalAlignment: 'top' | 'center' | 'bottom' | undefined = undefined
|
||||
export const staticOutputs: string[] = ['result']
|
||||
export let customCss: ComponentCustomCSS<'input'> | undefined = undefined
|
||||
|
||||
const { app, worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
||||
const { worldStore } = getContext<AppEditorContext>('AppEditorContext')
|
||||
|
||||
let defaultValue: number | undefined = undefined
|
||||
|
||||
@@ -39,8 +37,6 @@
|
||||
$: value != undefined && handleInput()
|
||||
|
||||
$: defaultValue != undefined && handleDefault()
|
||||
|
||||
$: css = concatCustomCss($app.css?.currencycomponent, customCss)
|
||||
</script>
|
||||
|
||||
<InputValue {id} input={configuration.defaultValue} bind:value={defaultValue} />
|
||||
@@ -53,12 +49,7 @@
|
||||
{#key locale}
|
||||
{#key currency}
|
||||
<CurrencyInput
|
||||
inputClasses={{
|
||||
formatted: 'p-0 ' + css?.input?.class,
|
||||
wrapper: 'w-full',
|
||||
formattedZero: 'text-black ' + css?.input?.class
|
||||
}}
|
||||
style={css?.input?.style}
|
||||
inputClasses={{ formatted: 'p-0', wrapper: 'w-full', formattedZero: 'text-black' }}
|
||||
bind:value
|
||||
{currency}
|
||||
{locale}
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
export let isNegativeAllowed: boolean = true
|
||||
export let fractionDigits: number = DEFAULT_FRACTION_DIGITS
|
||||
export let inputClasses: InputClasses | null = null
|
||||
export let style: string = ''
|
||||
|
||||
// Formats value as: e.g. $1,523.00 | -$1,523.00
|
||||
const formatCurrency = (
|
||||
@@ -176,7 +175,6 @@
|
||||
? inputClasses?.formattedNegative ?? DEFAULT_CLASS_FORMATTED_NEGATIVE
|
||||
: ''}
|
||||
"
|
||||
{style}
|
||||
type="text"
|
||||
inputmode="numeric"
|
||||
name={`formatted-${name}`}
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
{#if $app.subgrids?.[`${id}-0`]}
|
||||
<SubGridEditor
|
||||
{noPadding}
|
||||
{id}
|
||||
class={css?.container.class}
|
||||
style={css?.container.style}
|
||||
bind:subGrid={$app.subgrids[`${id}-0`]}
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import type { AppInput } from '../../inputType'
|
||||
import type {
|
||||
AppEditorContext,
|
||||
ComponentCustomCSS,
|
||||
HorizontalAlignment,
|
||||
VerticalAlignment
|
||||
} from '../../types'
|
||||
import { concatCustomCss } from '../../utils'
|
||||
import type { HorizontalAlignment, VerticalAlignment } from '../../types'
|
||||
import AlignWrapper from '../helpers/AlignWrapper.svelte'
|
||||
import InputValue from '../helpers/InputValue.svelte'
|
||||
|
||||
@@ -16,34 +8,17 @@
|
||||
export let configuration: Record<string, AppInput>
|
||||
export let horizontalAlignment: HorizontalAlignment | undefined = undefined
|
||||
export let verticalAlignment: VerticalAlignment | undefined = undefined
|
||||
export let customCss: ComponentCustomCSS<'container' | 'divider'> | undefined = undefined
|
||||
export let position: 'horizontal' | 'vertical'
|
||||
|
||||
const { app } = getContext<AppEditorContext>('AppEditorContext')
|
||||
let size = 2
|
||||
let color = '#00000060'
|
||||
|
||||
$: css = concatCustomCss($app.css?.[position + 'dividercomponent'], customCss)
|
||||
</script>
|
||||
|
||||
<InputValue {id} input={configuration.size} bind:value={size} />
|
||||
<InputValue {id} input={configuration.color} bind:value={color} />
|
||||
|
||||
<AlignWrapper
|
||||
{horizontalAlignment}
|
||||
{verticalAlignment}
|
||||
class={twMerge(css?.container?.class, 'h-full')}
|
||||
style={css?.container?.style}
|
||||
>
|
||||
<AlignWrapper {horizontalAlignment} {verticalAlignment} class="h-full">
|
||||
<div
|
||||
class={twMerge(
|
||||
`rounded-full ${position === 'horizontal' ? 'w-full' : 'h-full'}`,
|
||||
css?.divider?.class ?? ''
|
||||
)}
|
||||
style="
|
||||
{position === 'horizontal' ? 'height' : 'width'}: {size}px;
|
||||
background-color: {color};
|
||||
{css?.divider?.style ?? ''}
|
||||
"
|
||||
class="rounded-full {position === 'horizontal' ? 'w-full' : 'h-full'}"
|
||||
style="{position === 'horizontal' ? 'height' : 'width'}: {size}px; background-color: {color}"
|
||||
/>
|
||||
</AlignWrapper>
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
<script lang="ts">
|
||||
import { getContext } from 'svelte'
|
||||
import SubGridEditor from '../../editor/SubGridEditor.svelte'
|
||||
import type { AppInput } from '../../inputType'
|
||||
import type { AppEditorContext, ComponentCustomCSS } from '../../types'
|
||||
import InputValue from '../helpers/InputValue.svelte'
|
||||
import Portal from 'svelte-portal'
|
||||
import { concatCustomCss } from '../../utils'
|
||||
import { Button, ButtonType, Drawer, DrawerContent } from '$lib/components/common'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import { AlignWrapper } from '../helpers'
|
||||
|
||||
export let customCss: ComponentCustomCSS<'container'> | undefined = undefined
|
||||
export let id: string
|
||||
export let configuration: Record<string, AppInput>
|
||||
export let horizontalAlignment: 'left' | 'center' | 'right' | undefined = undefined
|
||||
export let verticalAlignment: 'top' | 'center' | 'bottom' | undefined = undefined
|
||||
export let noWFull = false
|
||||
|
||||
const { app, focusedGrid, selectedComponent } = getContext<AppEditorContext>('AppEditorContext')
|
||||
|
||||
let gridContent: string[] | undefined = undefined
|
||||
let noPadding: boolean | undefined = undefined
|
||||
let drawerTitle: string | undefined = undefined
|
||||
let appDrawer: Drawer
|
||||
|
||||
let labelValue: string
|
||||
let color: ButtonType.Color
|
||||
let size: ButtonType.Size
|
||||
let disabled: boolean | undefined = undefined
|
||||
let fillContainer: boolean | undefined = undefined
|
||||
|
||||
$: css = concatCustomCss($app.css?.containercomponent, customCss)
|
||||
</script>
|
||||
|
||||
<div class="h-full w-full">
|
||||
<AlignWrapper {noWFull} {horizontalAlignment} {verticalAlignment}>
|
||||
<Button
|
||||
btnClasses={twMerge(
|
||||
$app.css?.['buttoncomponent']?.['button']?.class,
|
||||
fillContainer ? 'w-full h-full' : ''
|
||||
)}
|
||||
{disabled}
|
||||
on:pointerdown={(e) => {
|
||||
e?.stopPropagation()
|
||||
window.dispatchEvent(new Event('pointerup'))
|
||||
}}
|
||||
on:click={async (e) => {
|
||||
$focusedGrid = {
|
||||
parentComponentId: id,
|
||||
subGridIndex: 0
|
||||
}
|
||||
appDrawer.toggleDrawer()
|
||||
}}
|
||||
{size}
|
||||
{color}
|
||||
>
|
||||
<div>{labelValue}</div>
|
||||
</Button>
|
||||
</AlignWrapper>
|
||||
</div>
|
||||
|
||||
<InputValue {id} input={configuration.gridContent} bind:value={gridContent} />
|
||||
<InputValue {id} input={configuration.noPadding} bind:value={noPadding} />
|
||||
<InputValue {id} input={configuration.drawerTitle} bind:value={drawerTitle} />
|
||||
<InputValue {id} input={configuration.label} bind:value={labelValue} />
|
||||
<InputValue {id} input={configuration.color} bind:value={color} />
|
||||
<InputValue {id} input={configuration.size} bind:value={size} />
|
||||
<InputValue {id} input={configuration.fillContainer} bind:value={fillContainer} />
|
||||
|
||||
<Portal target="#app-editor-top-level-drawer">
|
||||
<Drawer bind:this={appDrawer} size="800px" alwaysOpen positionClass="!absolute">
|
||||
<DrawerContent title={drawerTitle} on:close={appDrawer.toggleDrawer}>
|
||||
{#if $app.subgrids?.[`${id}-0`]}
|
||||
<SubGridEditor
|
||||
{noPadding}
|
||||
{id}
|
||||
class={css?.container.class}
|
||||
style={css?.container.style}
|
||||
bind:subGrid={$app.subgrids[`${id}-0`]}
|
||||
containerHeight={1200}
|
||||
on:focus={() => {
|
||||
$selectedComponent = id
|
||||
}}
|
||||
/>
|
||||
{/if}
|
||||
</DrawerContent>
|
||||
</Drawer>
|
||||
</Portal>
|
||||
@@ -4,17 +4,13 @@
|
||||
import SubGridEditor from '../../editor/SubGridEditor.svelte'
|
||||
import type { AppInput } from '../../inputType'
|
||||
import type { Output } from '../../rx'
|
||||
import type { AppEditorContext, ComponentCustomCSS } from '../../types'
|
||||
import { concatCustomCss } from '../../utils'
|
||||
import type { AppEditorContext, GridItem } from '../../types'
|
||||
import InputValue from '../helpers/InputValue.svelte'
|
||||
|
||||
export let id: string
|
||||
export let configuration: Record<string, AppInput>
|
||||
export let componentContainerHeight: number
|
||||
export let tabs: string[]
|
||||
export let customCss:
|
||||
| ComponentCustomCSS<'tabRow' | 'tabs' | 'selectedTab' | 'container'>
|
||||
| undefined = undefined
|
||||
|
||||
export const staticOutputs: string[] = ['selectedTabIndex']
|
||||
const { app, worldStore, focusedGrid, selectedComponent } =
|
||||
@@ -58,8 +54,6 @@
|
||||
}
|
||||
|
||||
$: $selectedComponent === id && selectedIndex >= 0 && onFocus()
|
||||
|
||||
$: css = concatCustomCss($app.css?.tabscomponent, customCss)
|
||||
</script>
|
||||
|
||||
<InputValue {id} input={configuration.tabs} bind:value={tabs} />
|
||||
@@ -67,15 +61,9 @@
|
||||
|
||||
<div>
|
||||
<div bind:clientHeight={tabHeight} on:pointerdown|stopPropagation>
|
||||
<Tabs bind:selected class={css?.tabRow?.class} style={css?.tabRow?.style}>
|
||||
<Tabs bind:selected>
|
||||
{#each tabs ?? [] as res}
|
||||
<Tab
|
||||
value={res}
|
||||
class={css?.tabs?.class}
|
||||
style={css?.tabs?.style}
|
||||
selectedClass={css?.selectedTab?.class}
|
||||
selectedStyle={css?.selectedTab?.style}
|
||||
>
|
||||
<Tab value={res}>
|
||||
<span class="font-semibold">{res}</span>
|
||||
</Tab>
|
||||
{/each}
|
||||
@@ -84,12 +72,9 @@
|
||||
{#if $app.subgrids}
|
||||
{#each tabs ?? [] as res, i}
|
||||
<SubGridEditor
|
||||
{id}
|
||||
visible={i === selectedIndex}
|
||||
bind:subGrid={$app.subgrids[`${id}-${i}`]}
|
||||
{noPadding}
|
||||
class={css?.container?.class}
|
||||
style={css?.container?.style}
|
||||
containerHeight={componentContainerHeight - tabHeight}
|
||||
on:focus={() => {
|
||||
$selectedComponent = id
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
import Icon from 'svelte-awesome'
|
||||
import { faCode, faPlus, faSliders } from '@fortawesome/free-solid-svg-icons'
|
||||
import ContextPanel from './contextPanel/ContextPanel.svelte'
|
||||
import { classNames, encodeState } from '$lib/utils'
|
||||
import { encodeState } from '$lib/utils'
|
||||
import AppPreview from './AppPreview.svelte'
|
||||
import { userStore, workspaceStore } from '$lib/stores'
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
|
||||
const runnableComponents = writable<Record<string, () => Promise<void>>>({})
|
||||
const errorByComponent = writable<Record<string, { error: string; componentId: string }>>({})
|
||||
|
||||
const focusedGrid = writable<FocusedGrid | undefined>(undefined)
|
||||
|
||||
setContext<AppEditorContext>('AppEditorContext', {
|
||||
@@ -81,8 +82,7 @@
|
||||
noBackend: false,
|
||||
errorByComponent,
|
||||
openDebugRun: writable(undefined),
|
||||
focusedGrid,
|
||||
stateId: writable(0)
|
||||
focusedGrid
|
||||
})
|
||||
|
||||
let timeout: NodeJS.Timeout | undefined = undefined
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
{#if $connectingInput.opened}
|
||||
<div
|
||||
class="absolute w-full h-screen bg-black border-2 bg-opacity-25 z-20 flex justify-center items-center"
|
||||
class="absolute w-full h-screen bg-black border-2 bg-opacity-25 z-20 flex justify-center items-center"
|
||||
/>
|
||||
{/if}
|
||||
{#if !$userStore?.operator}
|
||||
@@ -172,17 +172,14 @@
|
||||
style={$appStore.css?.['app']?.['viewer']?.style}
|
||||
>
|
||||
<div
|
||||
class={classNames(
|
||||
'relative mx-auto w-full h-full overflow-auto',
|
||||
app.fullscreen ? '' : 'max-w-6xl'
|
||||
)}
|
||||
class="relative mx-auto w-full h-full overflow-auto {app.fullscreen
|
||||
? ''
|
||||
: 'max-w-6xl'}"
|
||||
>
|
||||
{#if $appStore.grid}
|
||||
<div class={width}>
|
||||
<GridEditor {policy} />
|
||||
</div>
|
||||
|
||||
<div id="app-editor-top-level-drawer" />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -293,7 +293,7 @@
|
||||
</PanelSection>
|
||||
</Pane>
|
||||
<Pane size={75}>
|
||||
<div class="h-full w-full overflow-auto">
|
||||
<div class="h-full w-full overflow-hidden">
|
||||
{#if selectedJobId}
|
||||
{#if !job}
|
||||
<Skeleton layout={[[40]]} />
|
||||
|
||||
@@ -62,8 +62,7 @@
|
||||
noBackend,
|
||||
errorByComponent: writable({}),
|
||||
openDebugRun: writable(undefined),
|
||||
focusedGrid: writable(undefined),
|
||||
stateId: writable(0)
|
||||
focusedGrid: writable(undefined)
|
||||
})
|
||||
|
||||
let mounted = false
|
||||
@@ -77,8 +76,6 @@
|
||||
$: lockedClasses = isLocked ? '!max-h-[400px] overflow-hidden pointer-events-none' : ''
|
||||
</script>
|
||||
|
||||
<div id="app-editor-top-level-drawer" />
|
||||
|
||||
<div class="relative">
|
||||
<div
|
||||
class="{$$props.class} {lockedClasses} h-full
|
||||
@@ -90,7 +87,6 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{#if isLocked}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
$app.grid.map((gridItem) => {
|
||||
const disabledGridItem = fct(gridItem)
|
||||
|
||||
if (disabledGridItem?.data?.subGrids) {
|
||||
if (disabledGridItem.data.subGrids) {
|
||||
disabledGridItem.data.subGrids = disabledGridItem.data.subGrids.map(
|
||||
(subgrid: GridItem[]) => subgrid?.map((subgridItem: GridItem) => fct(subgridItem)) ?? []
|
||||
)
|
||||
@@ -106,7 +106,7 @@
|
||||
intervalId = setTimeout(() => {
|
||||
lazyGrid.set($app.grid)
|
||||
intervalId = undefined
|
||||
}, 500)
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@
|
||||
|
||||
<div class="relative w-full z-20 overflow-visible">
|
||||
<div
|
||||
class="w-full sticky top-0 flex justify-between border-l border-r border-b {$connectingInput?.opened
|
||||
class="w-full sticky top-0 flex justify-between border-l border-r border-b {$connectingInput?.opened
|
||||
? ''
|
||||
: 'bg-gray-50 '} px-4 py-2 items-center gap-4"
|
||||
style="z-index: 1000;"
|
||||
@@ -149,10 +149,9 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
style={$app.css?.['app']?.['grid']?.style}
|
||||
class={twMerge('px-4 pt-4 pb-2 overflow-visible', $app.css?.['app']?.['grid']?.class ?? '')}
|
||||
class={twMerge('px-4 pt-4 pb-2 overflow-visible', $app.css?.['app']?.['grid']?.class ?? '')}
|
||||
on:pointerdown={onpointerdown}
|
||||
on:pointerleave={onpointerup}
|
||||
on:pointerup={onpointerup}
|
||||
@@ -198,7 +197,7 @@
|
||||
>
|
||||
<Component
|
||||
{pointerdown}
|
||||
bind:component={gridComponent.data}
|
||||
bind:pComponent={gridComponent.data}
|
||||
selected={$selectedComponent === dataItem.data.id}
|
||||
locked={isFixed(gridComponent)}
|
||||
on:delete={() => removeGridElement(gridComponent.data)}
|
||||
|
||||
@@ -13,18 +13,17 @@
|
||||
export { classes as class }
|
||||
export let style = ''
|
||||
export let noPadding = false
|
||||
//export let id: string
|
||||
export let subGrid: GridItem[] = []
|
||||
export let visible: boolean = true
|
||||
export let id: string
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
const { app, connectingInput, selectedComponent, focusedGrid } =
|
||||
getContext<AppEditorContext>('AppEditorContext')
|
||||
|
||||
$: highlight = id === $focusedGrid?.parentComponentId && $selectedComponent !== id
|
||||
|
||||
let pointerdown = false
|
||||
|
||||
let onComponent: string | undefined = undefined
|
||||
|
||||
const onpointerdown = (e) => {
|
||||
@@ -65,16 +64,11 @@
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="relative w-full subgrid {visible ? 'visible' : 'invisible h-0 overflow-hidden'} "
|
||||
class="relative w-full subgrid {visible ? 'visible' : 'invisible h-0 overflow-hidden'}"
|
||||
bind:this={container}
|
||||
>
|
||||
<div
|
||||
class={twMerge(
|
||||
'py-2 overflow-auto',
|
||||
classes ?? '',
|
||||
noPadding ? 'px-0' : 'px-2',
|
||||
highlight ? 'border-indigo-500 border border-dashed' : ''
|
||||
)}
|
||||
class={twMerge('py-2 overflow-auto', classes ?? '', noPadding ? 'px-0' : 'px-2')}
|
||||
on:pointerdown|stopPropagation={onpointerdown}
|
||||
on:pointerleave={onpointerup}
|
||||
on:pointerup={onpointerup}
|
||||
@@ -122,7 +116,7 @@
|
||||
>
|
||||
<Component
|
||||
{pointerdown}
|
||||
bind:component={gridComponent.data}
|
||||
bind:pComponent={gridComponent.data}
|
||||
selected={$selectedComponent === dataItem.data.id}
|
||||
locked={isFixed(gridComponent)}
|
||||
on:lock={() => lock(gridComponent)}
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import type { AppEditorContext } from '../../types'
|
||||
import ComponentHeader from '../ComponentHeader.svelte'
|
||||
import { deepEqual } from 'fast-equals'
|
||||
|
||||
import {
|
||||
AppBarChart,
|
||||
@@ -37,9 +38,8 @@
|
||||
} from '../../components'
|
||||
import type { AppComponent } from './components'
|
||||
import AppAggridTable from '../../components/display/table/AppAggridTable.svelte'
|
||||
import AppDrawer from '../../components/layout/AppDrawer.svelte'
|
||||
|
||||
export let component: AppComponent
|
||||
export let pComponent: AppComponent
|
||||
export let selected: boolean
|
||||
export let locked: boolean = false
|
||||
export let pointerdown: boolean = false
|
||||
@@ -50,7 +50,10 @@
|
||||
let initializing: boolean | undefined = undefined
|
||||
let componentContainerHeight: number = 0
|
||||
|
||||
$: console.log('component', component)
|
||||
let component = JSON.parse(JSON.stringify(pComponent))
|
||||
$: if (pComponent && !deepEqual(pComponent, component)) {
|
||||
component = JSON.parse(JSON.stringify(pComponent))
|
||||
}
|
||||
</script>
|
||||
|
||||
<div
|
||||
@@ -189,7 +192,6 @@
|
||||
{:else if component.type === 'passwordinputcomponent'}
|
||||
<AppTextInput
|
||||
inputType="password"
|
||||
appCssKey="passwordinputcomponent"
|
||||
{...component}
|
||||
bind:staticOutputs={$staticOutputs[component.id]}
|
||||
/>
|
||||
@@ -229,8 +231,6 @@
|
||||
<AppFileInput {...component} bind:staticOutputs={$staticOutputs[component.id]} />
|
||||
{:else if component.type === 'imagecomponent'}
|
||||
<AppImage {...component} bind:staticOutputs={$staticOutputs[component.id]} />
|
||||
{:else if component.type === 'drawercomponent'}
|
||||
<AppDrawer {...component} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -27,8 +27,7 @@ import {
|
||||
SeparatorHorizontal,
|
||||
SeparatorVertical,
|
||||
Paperclip,
|
||||
Image,
|
||||
SidebarClose
|
||||
Image
|
||||
} from 'lucide-svelte'
|
||||
import type { BaseAppComponent } from '../../types'
|
||||
|
||||
@@ -79,7 +78,6 @@ export type TabsComponent = BaseComponent<'tabscomponent'> & {
|
||||
tabs: string[]
|
||||
}
|
||||
export type ContainerComponent = BaseComponent<'containercomponent'>
|
||||
export type DrawerComponent = BaseComponent<'drawercomponent'>
|
||||
|
||||
export type AppComponent = BaseAppComponent &
|
||||
(
|
||||
@@ -114,7 +112,6 @@ export type AppComponent = BaseAppComponent &
|
||||
| FileInputComponent
|
||||
| ImageComponent
|
||||
| AggridComponent
|
||||
| DrawerComponent
|
||||
)
|
||||
|
||||
export type AppComponentDimensions = `${IntRange<
|
||||
@@ -911,9 +908,7 @@ Hello \${ctx.username}
|
||||
fieldType: 'number'
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
input: { class: '', style: '' }
|
||||
} as const,
|
||||
customCss: {},
|
||||
card: false
|
||||
}
|
||||
},
|
||||
@@ -954,9 +949,7 @@ Hello \${ctx.username}
|
||||
optionValuesKey: 'localeOptions'
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
input: { class: '', style: '' }
|
||||
} as const,
|
||||
customCss: {},
|
||||
card: false
|
||||
}
|
||||
},
|
||||
@@ -993,11 +986,7 @@ Hello \${ctx.username}
|
||||
fieldType: 'number'
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
handle: { style: '' },
|
||||
limits: { class: '', style: '' },
|
||||
value: { class: '', style: '' }
|
||||
} as const,
|
||||
customCss: {},
|
||||
card: false
|
||||
}
|
||||
},
|
||||
@@ -1038,11 +1027,7 @@ Hello \${ctx.username}
|
||||
fieldType: 'number'
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
handles: { style: '' },
|
||||
limits: { class: '', style: '' },
|
||||
values: { class: '', style: '' }
|
||||
} as const,
|
||||
customCss: {},
|
||||
card: false
|
||||
}
|
||||
},
|
||||
@@ -1064,9 +1049,7 @@ Hello \${ctx.username}
|
||||
onlyStatic: true
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
input: { class: '', style: '' }
|
||||
} as const,
|
||||
customCss: {},
|
||||
card: false
|
||||
}
|
||||
},
|
||||
@@ -1097,9 +1080,7 @@ Hello \${ctx.username}
|
||||
fieldType: 'date'
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
input: { class: '', style: '' }
|
||||
} as const,
|
||||
customCss: {},
|
||||
card: false
|
||||
}
|
||||
},
|
||||
@@ -1119,12 +1100,6 @@ Hello \${ctx.username}
|
||||
onlyStatic: true
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
tabRow: { class: '', style: '' },
|
||||
allTabs: { class: '', style: '' },
|
||||
selectedTab: { class: '', style: '' },
|
||||
container: { class: '', style: '' }
|
||||
} as const,
|
||||
componentInput: undefined,
|
||||
card: false,
|
||||
numberOfSubgrids: 2,
|
||||
@@ -1166,10 +1141,7 @@ Hello \${ctx.username}
|
||||
onlyStatic: true
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
container: { class: '', style: '' },
|
||||
icon: { class: '', style: '' }
|
||||
} as const,
|
||||
customCss: {},
|
||||
card: false
|
||||
}
|
||||
},
|
||||
@@ -1196,10 +1168,7 @@ Hello \${ctx.username}
|
||||
onlyStatic: true
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
container: { class: '', style: '' },
|
||||
divider: { class: '', style: '' }
|
||||
} as const,
|
||||
customCss: {},
|
||||
card: false
|
||||
}
|
||||
},
|
||||
@@ -1226,10 +1195,7 @@ Hello \${ctx.username}
|
||||
onlyStatic: true
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
container: { class: '', style: '' },
|
||||
divider: { class: '', style: '' }
|
||||
} as const,
|
||||
customCss: {},
|
||||
card: false
|
||||
}
|
||||
},
|
||||
@@ -1262,9 +1228,7 @@ Hello \${ctx.username}
|
||||
onlyStatic: true
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
container: { class: '', style: '' }
|
||||
} as const,
|
||||
customCss: {},
|
||||
card: false
|
||||
}
|
||||
},
|
||||
@@ -1299,71 +1263,16 @@ Hello \${ctx.username}
|
||||
fieldType: 'text',
|
||||
onlyStatic: true,
|
||||
tooltip: "This text will appear if the image can't be loaded for any reason"
|
||||
},
|
||||
customStyles: {
|
||||
type: 'static',
|
||||
value: '',
|
||||
fieldType: 'textarea',
|
||||
onlyStatic: true
|
||||
}
|
||||
},
|
||||
customCss: {
|
||||
image: { class: '', style: '' }
|
||||
} as const,
|
||||
customCss: {},
|
||||
card: false
|
||||
}
|
||||
},
|
||||
drawercomponent: {
|
||||
name: 'Drawer',
|
||||
icon: SidebarClose,
|
||||
dims: '1:1-2:1',
|
||||
data: {
|
||||
softWrap: true,
|
||||
id: '',
|
||||
type: 'drawercomponent',
|
||||
horizontalAlignment: 'center',
|
||||
verticalAlignment: 'center',
|
||||
configuration: {
|
||||
noPadding: {
|
||||
type: 'static',
|
||||
fieldType: 'boolean',
|
||||
value: false,
|
||||
onlyStatic: true
|
||||
},
|
||||
drawerTitle: {
|
||||
type: 'static',
|
||||
fieldType: 'text',
|
||||
value: 'Drawer title',
|
||||
onlyStatic: true
|
||||
},
|
||||
label: {
|
||||
type: 'static',
|
||||
fieldType: 'text',
|
||||
value: 'Press me'
|
||||
},
|
||||
color: {
|
||||
fieldType: 'select',
|
||||
type: 'static',
|
||||
onlyStatic: true,
|
||||
optionValuesKey: 'buttonColorOptions',
|
||||
value: 'blue'
|
||||
},
|
||||
size: {
|
||||
fieldType: 'select',
|
||||
type: 'static',
|
||||
onlyStatic: true,
|
||||
optionValuesKey: 'buttonSizeOptions',
|
||||
value: 'xs'
|
||||
},
|
||||
fillContainer: {
|
||||
fieldType: 'boolean',
|
||||
type: 'static',
|
||||
onlyStatic: true,
|
||||
value: false
|
||||
},
|
||||
disabled: {
|
||||
fieldType: 'boolean',
|
||||
type: 'eval',
|
||||
expr: 'false'
|
||||
}
|
||||
},
|
||||
componentInput: undefined,
|
||||
card: false,
|
||||
numberOfSubgrids: 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,8 +6,7 @@ const layout: ComponentSet = {
|
||||
'tabscomponent',
|
||||
'containercomponent',
|
||||
'horizontaldividercomponent',
|
||||
'verticaldividercomponent',
|
||||
'drawercomponent'
|
||||
'verticaldividercomponent'
|
||||
]
|
||||
} as const
|
||||
|
||||
@@ -47,8 +46,8 @@ const display: ComponentSet = {
|
||||
'plotlycomponent',
|
||||
'scatterchartcomponent',
|
||||
'timeseriescomponent',
|
||||
'displaycomponent'
|
||||
'displaycomponent',
|
||||
]
|
||||
} as const
|
||||
|
||||
export const COMPONENT_SETS = [layout, buttons, inputs, display] as const
|
||||
export const COMPONENT_SETS = [layout, buttons, inputs, display] as const
|
||||
@@ -178,6 +178,7 @@
|
||||
{#each ids as id}
|
||||
<div class="mb-3">
|
||||
{#if $app?.css?.[type][id]}
|
||||
{JSON.stringify($app.css[type][id])}
|
||||
<CssProperty
|
||||
name={id}
|
||||
bind:value={$app.css[type][id]}
|
||||
|
||||
@@ -21,9 +21,7 @@
|
||||
</Pane>
|
||||
<Pane size={75}>
|
||||
{#if !selectedScriptComponentId}
|
||||
<div class="text-sm text-gray-500 text-center py-8 px-2">
|
||||
Select a script on the left panel
|
||||
</div>
|
||||
<span class="p-2 text-sm text-gray-600">Select a script on the left panel</span>
|
||||
{/if}
|
||||
|
||||
{#each $app.grid as gridItem (gridItem.data.id)}
|
||||
|
||||
@@ -53,11 +53,7 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<div
|
||||
class="sticky top-0 py-0.5 px-2 text-center bg-gray-200 text-gray-500 text-2xs font-bold tracking-wide border-b border-gray-300"
|
||||
>
|
||||
RUNNABLES
|
||||
</div>
|
||||
<div class="mb-0 pb-0 pl-2 sticky top-0 bg-white border-b text-xs font-semibold">Runnables</div>
|
||||
<div bind:this={list} class="grow flex flex-col gap-4">
|
||||
<PanelSection title="Inline scripts" smallPadding>
|
||||
<div class="flex flex-col gap-2 w-full">
|
||||
|
||||
@@ -31,15 +31,8 @@
|
||||
export let parent: string | undefined
|
||||
export let noGrid = false
|
||||
|
||||
const {
|
||||
app,
|
||||
staticOutputs,
|
||||
runnableComponents,
|
||||
selectedComponent,
|
||||
worldStore,
|
||||
focusedGrid,
|
||||
stateId
|
||||
} = getContext<AppEditorContext>('AppEditorContext')
|
||||
const { app, staticOutputs, runnableComponents, selectedComponent, worldStore, focusedGrid } =
|
||||
getContext<AppEditorContext>('AppEditorContext')
|
||||
|
||||
function duplicateElement(id: string) {
|
||||
$dirtyStore = true
|
||||
@@ -117,35 +110,31 @@
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
{#key $stateId}
|
||||
{#if component.componentInput?.type === 'runnable'}
|
||||
{#if Object.keys(component.componentInput.fields ?? {}).length > 0}
|
||||
<div class="border w-full">
|
||||
<PanelSection
|
||||
smallPadding
|
||||
title={`Runnable Inputs (${
|
||||
Object.keys(component.componentInput.fields ?? {}).length
|
||||
})`}
|
||||
>
|
||||
<svelte:fragment slot="action">
|
||||
<Tooltip>
|
||||
The runnable inputs of a button component are not settable by the user. They
|
||||
must be defined statically or connected.
|
||||
</Tooltip>
|
||||
</svelte:fragment>
|
||||
{#if component.componentInput?.type === 'runnable' && Object.keys(component.componentInput.fields ?? {}).length > 0}
|
||||
<div class="border w-full">
|
||||
<PanelSection
|
||||
smallPadding
|
||||
title={`Runnable Inputs (${
|
||||
Object.keys(component.componentInput.fields ?? {}).length
|
||||
})`}
|
||||
>
|
||||
<svelte:fragment slot="action">
|
||||
<Tooltip>
|
||||
The runnable inputs of a button component are not settable by the user. They must
|
||||
be defined statically or connected.
|
||||
</Tooltip>
|
||||
</svelte:fragment>
|
||||
|
||||
<InputsSpecsEditor
|
||||
id={component.id}
|
||||
shouldCapitalize={false}
|
||||
bind:inputSpecs={component.componentInput.fields}
|
||||
userInputEnabled={component.type !== 'buttoncomponent'}
|
||||
{rowColumns}
|
||||
/>
|
||||
</PanelSection>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
{/key}
|
||||
<InputsSpecsEditor
|
||||
id={component.id}
|
||||
shouldCapitalize={false}
|
||||
bind:inputSpecs={component.componentInput.fields}
|
||||
userInputEnabled={component.type !== 'buttoncomponent'}
|
||||
{rowColumns}
|
||||
/>
|
||||
</PanelSection>
|
||||
</div>
|
||||
{/if}
|
||||
</PanelSection>
|
||||
{/if}
|
||||
|
||||
|
||||
@@ -42,14 +42,14 @@ export interface BaseAppComponent extends Partial<Aligned> {
|
||||
configuration: Record<
|
||||
string,
|
||||
GeneralAppInput &
|
||||
(
|
||||
| StaticAppInput
|
||||
| ConnectedAppInput
|
||||
| UserAppInput
|
||||
| RowAppInput
|
||||
| EvalAppInput
|
||||
| UploadAppInput
|
||||
)
|
||||
(
|
||||
| StaticAppInput
|
||||
| ConnectedAppInput
|
||||
| UserAppInput
|
||||
| RowAppInput
|
||||
| EvalAppInput
|
||||
| UploadAppInput
|
||||
)
|
||||
>
|
||||
card: boolean | undefined
|
||||
customCss?: ComponentCustomCSS
|
||||
@@ -131,7 +131,6 @@ export type AppEditorContext = {
|
||||
errorByComponent: Writable<Record<string, { error: string; componentId: string }>>
|
||||
openDebugRun: Writable<((componentID: string) => void) | undefined>
|
||||
focusedGrid: Writable<FocusedGrid | undefined>
|
||||
stateId: Writable<number>
|
||||
}
|
||||
|
||||
export type FocusedGrid = { parentComponentId: string; subGridIndex: number }
|
||||
|
||||
@@ -76,15 +76,9 @@
|
||||
|
||||
<svelte:window on:keydown={onKeyDown} />
|
||||
|
||||
<aside
|
||||
class="drawer {$$props.class} {$$props.positionClass}"
|
||||
class:open
|
||||
class:close={!open && timeout}
|
||||
{style}
|
||||
>
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div class="overlay {$$props.positionClass}" on:click={handleClickAway} />
|
||||
<div class="panel {placement} {$$props.positionClass}" class:size>
|
||||
<aside class="drawer {$$props.class}" class:open class:close={!open && timeout} {style}>
|
||||
<div class="overlay" on:click={handleClickAway} />
|
||||
<div class="panel {placement}" class:size>
|
||||
{#if open || !timeout || alwaysOpen}
|
||||
<slot />
|
||||
{/if}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { faClose } from '@fortawesome/free-solid-svg-icons'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { Icon } from 'svelte-awesome'
|
||||
import Button from '../button/Button.svelte'
|
||||
|
||||
export let title: string | undefined = undefined
|
||||
export let overflow_y = true
|
||||
|
||||
@@ -1,13 +1,11 @@
|
||||
<script lang="ts">
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { FileUp } from 'lucide-svelte'
|
||||
import Button from '../../common/button/Button.svelte'
|
||||
import { faTrash } from '@fortawesome/free-solid-svg-icons'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import { createEventDispatcher } from "svelte"
|
||||
import { FileUp } from "lucide-svelte"
|
||||
import Button from "../../common/button/Button.svelte"
|
||||
import { faTrash } from "@fortawesome/free-solid-svg-icons"
|
||||
|
||||
let c = ''
|
||||
export { c as class }
|
||||
export let style = ''
|
||||
export let accept = '*'
|
||||
export let multiple = false
|
||||
export let convertToBase64 = false
|
||||
@@ -18,20 +16,20 @@
|
||||
let files: File[] | undefined = undefined
|
||||
|
||||
async function onChange(fileList: FileList | null) {
|
||||
if (!fileList || !fileList.length) {
|
||||
files = undefined
|
||||
dispatch('change', files)
|
||||
return
|
||||
if(!fileList || !fileList.length) {
|
||||
files = undefined;
|
||||
dispatch('change', files);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!multiple || !files) {
|
||||
if(!multiple || !files) {
|
||||
files = []
|
||||
}
|
||||
for (let i = 0; i < fileList.length; i++) {
|
||||
const file = fileList.item(i)
|
||||
if (file) files.push(file)
|
||||
for(let i = 0; i < fileList.length; i++) {
|
||||
const file = fileList.item(i);
|
||||
if(file) files.push(file);
|
||||
}
|
||||
// Needs to be reset so the same file can be selected
|
||||
// Needs to be reset so the same file can be selected
|
||||
// multiple times in a row
|
||||
input.value = ''
|
||||
|
||||
@@ -40,16 +38,16 @@
|
||||
|
||||
async function fileToBase64(file: File): Promise<string> {
|
||||
return new Promise((resolve) => {
|
||||
const reader = new FileReader()
|
||||
const reader = new FileReader();
|
||||
reader.onloadend = () => {
|
||||
resolve(reader.result as string)
|
||||
}
|
||||
reader.readAsDataURL(file)
|
||||
resolve(reader.result as string);
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
})
|
||||
}
|
||||
|
||||
function removeFile(index: number) {
|
||||
if (!files) return
|
||||
if(!files) return;
|
||||
files.splice(index, 1)
|
||||
files = files.length ? files : undefined
|
||||
dispatchChange()
|
||||
@@ -58,25 +56,21 @@
|
||||
async function dispatchChange() {
|
||||
files = files
|
||||
|
||||
if (convertToBase64 && files) {
|
||||
const promises = files.map(fileToBase64)
|
||||
const b64s = await Promise.all(promises)
|
||||
dispatch('change', b64s)
|
||||
if(convertToBase64 && files) {
|
||||
const promises = files.map(fileToBase64);
|
||||
const b64s = await Promise.all(promises);
|
||||
dispatch('change', b64s);
|
||||
} else {
|
||||
dispatch('change', files)
|
||||
dispatch('change', files);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<button
|
||||
class={twMerge(
|
||||
`relative center-center flex-col text-center font-medium text-gray-600
|
||||
border-2 border-dashed border-gray-400 hover:border-blue-500
|
||||
focus-within:border-blue-500 hover:bg-blue-50 focus-within:bg-blue-50
|
||||
duration-200 rounded-lg p-1`,
|
||||
c
|
||||
)}
|
||||
{style}
|
||||
class="relative center-center flex-col text-center font-medium text-gray-600
|
||||
border-2 border-dashed border-gray-400 hover:border-blue-500
|
||||
focus-within:border-blue-500 hover:bg-blue-50 focus-within:bg-blue-50
|
||||
duration-200 rounded-lg p-1 {c ?? ''}"
|
||||
>
|
||||
{#if !hideIcon && !files}
|
||||
<FileUp size={iconSize} class="mb-2" />
|
||||
@@ -89,11 +83,9 @@
|
||||
</div>
|
||||
</slot>
|
||||
<ul class="relative z-20 max-w-[250px] bg-white rounded-lg overflow-hidden mx-auto">
|
||||
{#each files as { name }, i}
|
||||
<li
|
||||
class="flex justify-between items-center font-normal text-sm
|
||||
hover:bg-gray-300/20 duration-200 py-1 px-2 cursor-default"
|
||||
>
|
||||
{#each files as {name}, i}
|
||||
<li class="flex justify-between items-center font-normal text-sm
|
||||
hover:bg-gray-300/20 duration-200 py-1 px-2 cursor-default">
|
||||
<span class="pr-2 ellipsize">{name}</span>
|
||||
<Button
|
||||
size="xs"
|
||||
@@ -118,11 +110,9 @@
|
||||
type="file"
|
||||
title={files ? `${files.length} file${files.length > 1 ? 's' : ''} chosen` : 'No file chosen'}
|
||||
bind:this={input}
|
||||
on:change={({ currentTarget }) => {
|
||||
onChange(currentTarget.files)
|
||||
}}
|
||||
on:change={({currentTarget}) => {onChange(currentTarget.files)}}
|
||||
{accept}
|
||||
{multiple}
|
||||
{...$$restProps}
|
||||
/>
|
||||
</button>
|
||||
</button>
|
||||
@@ -1,15 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { classNames } from '$lib/utils'
|
||||
import { getContext } from 'svelte'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import type { TabsContext } from './Tabs.svelte'
|
||||
|
||||
export let value: string
|
||||
export let size: 'xs' | 'sm' | 'md' | 'lg' | 'xl' = 'sm'
|
||||
let c = ''
|
||||
export { c as class }
|
||||
export let style = ''
|
||||
export let selectedClass = ''
|
||||
export let selectedStyle = ''
|
||||
|
||||
const fontSizeClasses = {
|
||||
xs: 'text-xs',
|
||||
@@ -24,16 +19,14 @@
|
||||
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<div
|
||||
class={twMerge(
|
||||
'border-b-2 py-1 px-4 cursor-pointer transition-all ease-linear font-medium',
|
||||
class={classNames(
|
||||
$selected?.startsWith(value)
|
||||
? 'border-gray-600 text-gray-800 '
|
||||
: 'border-gray-300 border-opacity-0 hover:border-opacity-100 text-gray-600',
|
||||
'border-b-2 py-1 px-4 cursor-pointer transition-all ease-linear font-medium',
|
||||
fontSizeClasses[size],
|
||||
c,
|
||||
$selected?.startsWith(value) ? selectedClass : ''
|
||||
$$props.class
|
||||
)}
|
||||
style={`${style} ${$selected?.startsWith(value) ? selectedStyle : ''}`}
|
||||
on:click={() => update(value)}
|
||||
>
|
||||
<slot />
|
||||
|
||||
@@ -9,14 +9,11 @@
|
||||
import { setContext } from 'svelte'
|
||||
import { writable, type Writable } from 'svelte/store'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
import { twMerge } from 'tailwind-merge'
|
||||
import { classNames } from '$lib/utils'
|
||||
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
export let selected: string
|
||||
let c = ''
|
||||
export { c as class }
|
||||
export let style = ''
|
||||
|
||||
$: selected && updateSelected()
|
||||
|
||||
@@ -39,8 +36,10 @@
|
||||
|
||||
<div class="overflow-x-auto">
|
||||
<div
|
||||
class={twMerge('border-b border-gray-200 flex flex-row whitespace-nowrap scrollbar-hidden', c)}
|
||||
{style}
|
||||
class={classNames(
|
||||
'border-b border-gray-200 flex flex-row whitespace-nowrap scrollbar-hidden',
|
||||
$$props.class
|
||||
)}
|
||||
>
|
||||
<slot {selected} />
|
||||
</div>
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
"lib": ["esnext", "DOM"],
|
||||
"target": "esnext",
|
||||
"preserveValueImports": true,
|
||||
"outDir": "build",
|
||||
|
||||
|
||||
/**
|
||||
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
|
||||
to enforce using \`import type\` instead of \`import\` for Types.
|
||||
|
||||
@@ -4,8 +4,8 @@ verify_ssl = true
|
||||
name = "pypi"
|
||||
|
||||
[packages]
|
||||
wmill = ">=1.71.0"
|
||||
wmill_pg = ">=1.71.0"
|
||||
wmill = ">=1.70.1"
|
||||
wmill_pg = ">=1.70.1"
|
||||
sendgrid = "*"
|
||||
mysql-connector-python = "*"
|
||||
pymongo = "*"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
openapi: "3.0.3"
|
||||
|
||||
info:
|
||||
version: 1.71.0
|
||||
version: 1.70.1
|
||||
title: OpenFlow Spec
|
||||
contact:
|
||||
name: Ruben Fiszel
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "wmill"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
description = "A client library for accessing Windmill server wrapping the Windmill client API"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://windmill.dev"
|
||||
@@ -16,7 +16,7 @@ include = ["wmill/py.typed"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.7"
|
||||
windmill-api = "^1.71.0"
|
||||
windmill-api = "^1.70.1"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry>=1.0.2", "poetry-dynamic-versioning"]
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "wmill-pg"
|
||||
version = "1.71.0"
|
||||
version = "1.70.1"
|
||||
description = "An extension client for the wmill client library focused on pg"
|
||||
license = "Apache-2.0"
|
||||
homepage = "https://windmill.dev"
|
||||
|
||||
@@ -1 +1 @@
|
||||
1.71.0
|
||||
1.70.1
|
||||
|
||||
Reference in New Issue
Block a user