diff --git a/aep-schedule-website/Cargo.lock b/aep-schedule-website/Cargo.lock index 4326bf6a2b803d36a904fe0b0871f1501b3fe6ab..54b43900524d4bbf970e94ac15bbe330a7227532 100644 --- a/aep-schedule-website/Cargo.lock +++ b/aep-schedule-website/Cargo.lock @@ -54,10 +54,10 @@ dependencies = [ "reqwest", "serde", "simple_logger", - "thiserror", + "thiserror 1.0.63", "tokio", - "tower 0.5.0", - "tower-http", + "tower 0.5.1", + "tower-http 0.5.2", "tracing", "url-escape", "wasm-bindgen", @@ -145,6 +145,18 @@ dependencies = [ "libc", ] +[[package]] +name = "any_spawner" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9747eb01aed7603aba23f7c869d5d7e5d37aab9c3501aced42d8fdb786f1f6e3" +dependencies = [ + "futures", + "thiserror 1.0.63", + "tokio", + "wasm-bindgen-futures", +] + [[package]] name = "anyhow" version = "1.0.86" @@ -177,14 +189,14 @@ dependencies = [ ] [[package]] -name = "async-recursion" -version = "1.1.1" +name = "async-lock" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" +checksum = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.76", + "event-listener", + "event-listener-strategy", + "pin-project-lite", ] [[package]] @@ -195,7 +207,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] @@ -206,32 +218,32 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "attribute-derive" -version = "0.9.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f1ee502851995027b06f99f5ffbeffa1406b38d0b318a1ebfa469332c6cbafd" +checksum = "0053e96dd3bec5b4879c23a138d6ef26f2cb936c9cdc96274ac2b9ed44b5bb54" dependencies = [ "attribute-derive-macro", "derive-where", "manyhow", "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] name = "attribute-derive-macro" -version = "0.9.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3601467f634cfe36c4780ca9c75dea9a5b34529c1f2810676a337e7e0997f954" +checksum = "463b53ad0fd5b460af4b1915fe045ff4d946d025fb6c4dc3337752eaa980f71b" dependencies = [ "collection_literals", "interpolator", "manyhow", - "proc-macro-utils 0.8.0", + "proc-macro-utils", "proc-macro2", "quote", "quote-use", - "syn 2.0.76", + "syn", ] [[package]] @@ -242,9 +254,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "axum" -version = "0.7.5" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" +checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" dependencies = [ "async-trait", "axum-core", @@ -270,7 +282,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 1.0.1", "tokio", - "tower 0.4.13", + "tower 0.5.1", "tower-layer", "tower-service", "tracing", @@ -278,9 +290,9 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.4.3" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" +checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" dependencies = [ "async-trait", "bytes", @@ -291,7 +303,7 @@ dependencies = [ "mime", "pin-project-lite", "rustversion", - "sync_wrapper 0.1.2", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", "tracing", @@ -299,14 +311,13 @@ dependencies = [ [[package]] name = "axum-macros" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00c055ee2d014ae5981ce1016374e8213682aa14d9bf40e48ab48b5f3ef20eaa" +checksum = "57d123550fa8d071b7255cb0cc04dc302baa6c8c4a79f55701552684d8399bce" dependencies = [ - "heck", "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] @@ -388,41 +399,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" - -[[package]] -name = "cached" -version = "0.45.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90eb5776f28a149524d1d8623035760b4454ec881e8cf3838fa8d7e1b11254b3" -dependencies = [ - "cached_proc_macro", - "cached_proc_macro_types", - "hashbrown 0.13.2", - "instant", - "once_cell", - "thiserror", -] - -[[package]] -name = "cached_proc_macro" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c878c71c2821aa2058722038a59a67583a4240524687c6028571c9b395ded61f" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "cached_proc_macro_types" -version = "0.1.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade8366b8bd5ba243f0a58f036cc0ca8a2f069cff1a2351ef1cac6b083e16fc0" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "camino" @@ -479,33 +458,6 @@ dependencies = [ "stacker", ] -[[package]] -name = "ciborium" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" -dependencies = [ - "ciborium-io", - "ciborium-ll", - "serde", -] - -[[package]] -name = "ciborium-io" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" - -[[package]] -name = "ciborium-ll" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" -dependencies = [ - "ciborium-io", - "half", -] - [[package]] name = "cipher" version = "0.4.4" @@ -527,6 +479,17 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "codee" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d3ad3122b0001c7f140cf4d605ef9a9e2c24d96ab0b4fb4347b76de2425f445" +dependencies = [ + "serde", + "serde_json", + "thiserror 1.0.63", +] + [[package]] name = "collection_literals" version = "1.0.1" @@ -558,14 +521,22 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "config" -version = "0.14.0" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7328b20597b53c2454f0b1919720c25c7339051c02b72b7e05409e00b14132be" +checksum = "68578f196d2a33ff61b27fae256c3164f65e36382648e30666dde05b8cc9dfdf" dependencies = [ "convert_case", - "lazy_static", "nom", "pathdiff", "serde", @@ -600,24 +571,30 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_format" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3a214c7af3d04997541b18d432afaff4c455e79e2029079647e72fc2bd27673" +checksum = "50c655d81ff1114fb0dcdea9225ea9f0cc712a6f8d189378e82bdf62a473a64b" dependencies = [ "const_format_proc_macros", ] [[package]] name = "const_format_proc_macros" -version = "0.2.32" +version = "0.2.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f6ff08fd20f4f299298a28e2dfa8a8ba1036e6cd2460ac1de7b425d76f2500" +checksum = "eff1a44b93f47b1bac19a27932f5c591e43d1ba357ee4f61526c8a25603f0eb1" dependencies = [ "proc-macro2", "quote", "unicode-xid", ] +[[package]] +name = "const_str_slice_concat" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67855af358fcb20fac58f9d714c94e2b228fe5694c1c9b4ead4a366343eda1b" + [[package]] name = "constant_time_eq" version = "0.3.0" @@ -668,10 +645,10 @@ dependencies = [ ] [[package]] -name = "crunchy" -version = "0.2.2" +name = "crossbeam-utils" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crypto-bigint" @@ -711,48 +688,14 @@ dependencies = [ "cipher", ] -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", -] - [[package]] name = "dashmap" -version = "5.5.3" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ "cfg-if", + "crossbeam-utils", "hashbrown 0.14.5", "lock_api", "once_cell", @@ -787,7 +730,7 @@ checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] @@ -849,6 +792,15 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +[[package]] +name = "either_of" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6e22feb4d5cacf9f2c64902a1c35ef0f2d766e42db316a98b93992bbce669cb" +dependencies = [ + "pin-project-lite", +] + [[package]] name = "elliptic-curve" version = "0.13.8" @@ -911,6 +863,27 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "event-listener" +version = "5.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener", + "pin-project-lite", +] + [[package]] name = "fastrand" version = "2.1.1" @@ -969,9 +942,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ "futures-channel", "futures-core", @@ -984,9 +957,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" dependencies = [ "futures-core", "futures-sink", @@ -994,55 +967,56 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ "futures-core", "futures-task", "futures-util", + "num_cpus", ] [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ "futures-channel", "futures-core", @@ -1111,7 +1085,7 @@ dependencies = [ "pin-project", "serde", "serde_json", - "thiserror", + "thiserror 1.0.63", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -1141,6 +1115,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "guardian" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "493913a18c0d7bebb75127a26a432162c59edbe06f6cf712001e3e769345e8b5" + [[package]] name = "h2" version = "0.4.6" @@ -1160,22 +1140,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "half" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" -dependencies = [ - "cfg-if", - "crunchy", -] - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" - [[package]] name = "hashbrown" version = "0.14.5" @@ -1187,10 +1151,10 @@ dependencies = [ ] [[package]] -name = "heck" -version = "0.4.1" +name = "hashbrown" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" [[package]] name = "hermit-abi" @@ -1312,11 +1276,27 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "hydration_context" +version = "0.2.0-rc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e578296c79066cdf7325259d8259b48adc311e324beecd801c43d953532c51b" +dependencies = [ + "futures", + "js-sys", + "once_cell", + "or_poisoned", + "pin-project-lite", + "serde", + "throw_error", + "wasm-bindgen", +] + [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "97818827ef4f364230e16705d4706e2897df2bb60617d6ca15d598025a3c481f" dependencies = [ "bytes", "futures-channel", @@ -1420,12 +1400,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.5.0" @@ -1438,12 +1412,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.1", ] [[package]] @@ -1455,15 +1429,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - [[package]] name = "interpolator" version = "0.5.0" @@ -1493,9 +1458,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -1508,9 +1473,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1537,7 +1502,7 @@ dependencies = [ "serde", "serde_json", "superboring", - "thiserror", + "thiserror 1.0.63", "zeroize", ] @@ -1566,18 +1531,35 @@ dependencies = [ [[package]] name = "leptos" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a15911b4e53bb6e1b033d717eadb39924418a4a288279128122e5a65c70ba3e6" +checksum = "cc41e5764d7476efb929db94c1039752ccde5bea2ad40fddaaeeb9b94493fb0d" dependencies = [ + "any_spawner", + "base64", "cfg-if", + "either_of", + "futures", + "hydration_context", "leptos_config", "leptos_dom", + "leptos_hot_reload", "leptos_macro", - "leptos_reactive", "leptos_server", + "oco_ref", + "or_poisoned", + "paste", + "rand", + "reactive_graph", + "rustc-hash", + "send_wrapper", + "serde", + "serde_qs", "server_fn", - "tracing", + "slotmap", + "tachys", + "thiserror 2.0.3", + "throw_error", "typed-builder", "typed-builder-macro", "wasm-bindgen", @@ -1586,14 +1568,15 @@ dependencies = [ [[package]] name = "leptos_axum" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee520a923a9c93f68ca78d6b8884fc69066c6d88ce294eafa0fb9a157873bec0" +checksum = "15a7318603b14939a7332555ce8fd24a043047780dc6c9820359472ec4db6251" dependencies = [ + "any_spawner", "axum", - "cfg-if", + "dashmap", "futures", - "http-body-util", + "hydration_context", "leptos", "leptos_integration_utils", "leptos_macro", @@ -1601,61 +1584,45 @@ dependencies = [ "leptos_router", "once_cell", "parking_lot", - "serde_json", "server_fn", "tokio", - "tokio-util", - "tracing", + "tower 0.5.1", + "tower-http 0.6.2", ] [[package]] name = "leptos_config" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc4d78fba18c1ccab48ffc9f3d35b39821f896b0a28bdd616a846b6241036c9" +checksum = "fe8f7f58ee40b2c0d7e1f0abdbf51ffd2343d281b3f16c1854c0218c152fbad8" dependencies = [ "config", "regex", "serde", - "thiserror", + "thiserror 2.0.3", "typed-builder", ] [[package]] name = "leptos_dom" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ccb04d4763603bb665fa35cb9642d0bd75313117d10efda9b79243c023e69df" +checksum = "3dccedefe9054b9ca09e027801557dc82cad64cb1f1a8061b114e7f6203bbe51" dependencies = [ - "async-recursion", - "cfg-if", - "drain_filter_polyfill", - "futures", - "getrandom", - "html-escape", - "indexmap", - "itertools", "js-sys", - "leptos_reactive", - "once_cell", - "pad-adapter", - "paste", - "rustc-hash", - "serde", - "serde_json", - "server_fn", - "smallvec", - "tracing", + "or_poisoned", + "reactive_graph", + "send_wrapper", + "tachys", "wasm-bindgen", - "wasm-bindgen-futures", "web-sys", ] [[package]] name = "leptos_hot_reload" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cc61e5cce26761562cd3332630b3fbaddb1c4f77744e41474c7212ad279c5d9" +checksum = "754d861dbdaf20b6da328112b68e1b2ea2da9a157aef748f53b15fd118972b85" dependencies = [ "anyhow", "camino", @@ -1665,29 +1632,30 @@ dependencies = [ "quote", "rstml", "serde", - "syn 2.0.76", + "syn", "walkdir", ] [[package]] name = "leptos_integration_utils" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac080e02d0230481d80aa6920be2d634a2243f1ebbc2b8c1d57bf1bd46ca8a5b" +checksum = "30224324686ef508bc4a08fcfc16451410823b7d11b83325d2444221880bbbaa" dependencies = [ "futures", + "hydration_context", "leptos", "leptos_config", - "leptos_hot_reload", "leptos_meta", - "tracing", + "leptos_router", + "reactive_graph", ] [[package]] name = "leptos_macro" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90eaea005cabb879c091c84cfec604687ececfd540469e5a30a60c93489a2f23" +checksum = "9c592d8e91148c73ee562f6d4b867d84d1995a5adb10d5a723f538b3dc173dfc" dependencies = [ "attribute-derive", "cfg-if", @@ -1696,104 +1664,85 @@ dependencies = [ "itertools", "leptos_hot_reload", "prettyplease", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", "rstml", "server_fn_macro", - "syn 2.0.76", - "tracing", + "syn", "uuid", ] [[package]] name = "leptos_meta" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779bc68f8c05b15dde6557f9eb7baef4fa606a5bc450c1d6ff8787b092d0ae93" -dependencies = [ - "cfg-if", - "indexmap", - "leptos", - "tracing", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "leptos_reactive" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef2f99f377472459b0d320b46e9a9516b0e68dee5ed8c9eeb7e8eb9fefec5d2" +checksum = "7d95aec94d2c28120fe702182ec83e5402b9ad2c6fccaf3dbb98d0d94bf9f908" dependencies = [ - "base64", - "cfg-if", "futures", "indexmap", - "js-sys", - "oco_ref", - "paste", - "pin-project", - "rustc-hash", - "self_cell", - "serde", - "serde-wasm-bindgen", - "serde_json", - "slotmap", - "thiserror", - "tokio", - "tracing", + "leptos", + "once_cell", + "or_poisoned", + "send_wrapper", "wasm-bindgen", - "wasm-bindgen-futures", "web-sys", ] [[package]] name = "leptos_router" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5006e35b7c768905286dbea0d3525396cd39d961cb7b9fb664aa00b0c984ae6" +checksum = "123f2c0df5b3fd3025d1c26bc0dce1abd236409d9f031112ab5a0f871cfa6cbb" dependencies = [ - "cached", - "cfg-if", + "any_spawner", + "either_of", + "futures", "gloo-net", - "itertools", "js-sys", - "lazy_static", "leptos", - "leptos_integration_utils", - "leptos_meta", - "linear-map", - "lru", + "leptos_router_macro", "once_cell", + "or_poisoned", "percent-encoding", - "regex", + "reactive_graph", "send_wrapper", - "serde", - "serde_json", - "serde_qs 0.13.0", - "thiserror", - "tracing", + "tachys", + "thiserror 2.0.3", "url", "wasm-bindgen", - "wasm-bindgen-futures", "web-sys", ] +[[package]] +name = "leptos_router_macro" +version = "0.7.0-rc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84e0d92a7d6973682f02539b8de1f37651e72f557b1fd3f2d55460662669926" +dependencies = [ + "proc-macro-error2", + "proc-macro2", + "quote", +] + [[package]] name = "leptos_server" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f07be202a433baa8c50050de4f9c116efccffc57208bcda7bd1bb9b8e87dca9" +checksum = "a1387314dcb7f9547394a61b0cb41cdbd09e6c5dd5e154e304123f3d9b5b747b" dependencies = [ - "inventory", - "lazy_static", - "leptos_macro", - "leptos_reactive", + "any_spawner", + "base64", + "codee", + "futures", + "hydration_context", + "or_poisoned", + "reactive_graph", + "send_wrapper", "serde", + "serde_json", "server_fn", - "thiserror", - "tracing", + "tachys", ] [[package]] @@ -1841,10 +1790,6 @@ name = "linear-map" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfae20f6b19ad527b550c223fddc3077a547fc70cda94b9b566575423fd303ee" -dependencies = [ - "serde", - "serde_test", -] [[package]] name = "linux-raw-sys" @@ -1868,34 +1813,25 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -[[package]] -name = "lru" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a83fb7698b3643a0e34f9ae6f2e8f0178c0fd42f8b59d493aa271ff3a5bf21" -dependencies = [ - "hashbrown 0.14.5", -] - [[package]] name = "manyhow" -version = "0.10.4" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91ea592d76c0b6471965708ccff7e6a5d277f676b90ab31f4d3f3fc77fade64" +checksum = "b33efb3ca6d3b07393750d4030418d594ab1139cee518f0dc88db70fec873587" dependencies = [ "manyhow-macros", "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] name = "manyhow-macros" -version = "0.10.4" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64621e2c08f2576e4194ea8be11daf24ac01249a4f53cd8befcbb7077120ead" +checksum = "46fce34d199b78b6e6073abf984c9cf5fd3e9330145a93ee0738a7443e371495" dependencies = [ - "proc-macro-utils 0.8.0", + "proc-macro-utils", "proc-macro2", "quote", ] @@ -1998,6 +1934,12 @@ dependencies = [ "tempfile", ] +[[package]] +name = "next_tuple" +version = "0.1.0-rc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc6989c5af5a391cdc1c25aad10c6fb881b6e7ebd8df7c6fb29188acb5cba576" + [[package]] name = "nom" version = "7.1.3" @@ -2061,6 +2003,16 @@ dependencies = [ "libm", ] +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi", + "libc", +] + [[package]] name = "num_threads" version = "0.1.7" @@ -2081,19 +2033,19 @@ dependencies = [ [[package]] name = "oco_ref" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c51ebcefb2f0b9a5e0bea115532c8ae4215d1b01eff176d0f4ba4192895c2708" +checksum = "64b94982fe39a861561cf67ff17a7849f2cedadbbad960a797634032b7abb998" dependencies = [ "serde", - "thiserror", + "thiserror 1.0.63", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "opaque-debug" @@ -2124,7 +2076,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] @@ -2145,6 +2097,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "or_poisoned" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c04f5d74368e4d0dfe06c45c8627c81bd7c317d52762d118fb9b3076f6420fd" + [[package]] name = "p256" version = "0.13.2" @@ -2170,10 +2128,10 @@ dependencies = [ ] [[package]] -name = "pad-adapter" -version = "0.1.1" +name = "parking" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56d80efc4b6721e8be2a10a5df21a30fa0b470f1539e53d8b4e6e75faf938b63" +checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" [[package]] name = "parking_lot" @@ -2242,14 +2200,14 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] name = "pin-project-lite" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" +checksum = "915a1e146535de9163f3987b8944ed8cf49a18bb0056bcebcdcece385cece4ff" [[package]] name = "pin-utils" @@ -2313,12 +2271,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.21" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a909e6e8053fa1a5ad670f5816c7d93029ee1fa8898718490544a6b0d5d38b3e" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.76", + "syn", ] [[package]] @@ -2354,14 +2312,25 @@ dependencies = [ ] [[package]] -name = "proc-macro-utils" -version = "0.8.0" +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f59e109e2f795a5070e69578c4dc101068139f74616778025ae1011d4cd41a8" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ "proc-macro2", "quote", - "smallvec", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2377,9 +2346,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2392,7 +2361,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", "version_check", "yansi", ] @@ -2431,10 +2400,10 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82ebfb7faafadc06a7ab141a6f67bcfb24cb8beb158c6fe933f2f035afa99f35" dependencies = [ - "proc-macro-utils 0.10.0", + "proc-macro-utils", "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] @@ -2473,6 +2442,55 @@ dependencies = [ "getrandom", ] +[[package]] +name = "reactive_graph" +version = "0.1.0-rc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49131fcf9733a991f3485f9a0d0c9b9f65f55df4bb9f9d37203d1f82efa9513c" +dependencies = [ + "any_spawner", + "async-lock", + "futures", + "guardian", + "hydration_context", + "or_poisoned", + "pin-project-lite", + "rustc-hash", + "send_wrapper", + "serde", + "slotmap", + "thiserror 2.0.3", + "web-sys", +] + +[[package]] +name = "reactive_stores" +version = "0.1.0-rc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e722a72d10534f7613291bd2ef44cd2473ad70b2aa965d4bb7b940afb6f7257" +dependencies = [ + "guardian", + "itertools", + "or_poisoned", + "paste", + "reactive_graph", + "reactive_stores_macro", + "rustc-hash", +] + +[[package]] +name = "reactive_stores_macro" +version = "0.1.0-rc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b37fc52b98f16d437cdf5541cf60f661596b6e84a708e02b216a7bf864fe699b" +dependencies = [ + "convert_case", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "redox_syscall" version = "0.5.3" @@ -2484,9 +2502,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -2496,9 +2514,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -2507,9 +2525,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" @@ -2602,16 +2620,17 @@ dependencies = [ [[package]] name = "rstml" -version = "0.11.2" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe542870b8f59dd45ad11d382e5339c9a1047cde059be136a7016095bbdefa77" +checksum = "51187e564f12336ef40cd04f6f4d805d6919188001dcf1e0a021898ea0fe28ce" dependencies = [ + "derive-where", "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.76", + "syn", "syn_derive", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -2622,9 +2641,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" -version = "1.1.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" [[package]] name = "rustix" @@ -2752,12 +2771,6 @@ dependencies = [ "libc", ] -[[package]] -name = "self_cell" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a" - [[package]] name = "send_wrapper" version = "0.6.0" @@ -2776,17 +2789,6 @@ dependencies = [ "serde_derive", ] -[[package]] -name = "serde-wasm-bindgen" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" -dependencies = [ - "js-sys", - "serde", - "wasm-bindgen", -] - [[package]] name = "serde_derive" version = "1.0.209" @@ -2795,7 +2797,7 @@ checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] @@ -2820,17 +2822,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_qs" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0431a35568651e363364210c91983c1da5eb29404d9f0928b67d4ebcfa7d330c" -dependencies = [ - "percent-encoding", - "serde", - "thiserror", -] - [[package]] name = "serde_qs" version = "0.13.0" @@ -2839,7 +2830,7 @@ checksum = "cd34f36fe4c5ba9654417139a9b3a20d2e1de6012ee678ad14d240c22c78d8d6" dependencies = [ "percent-encoding", "serde", - "thiserror", + "thiserror 1.0.63", ] [[package]] @@ -2851,15 +2842,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_test" -version = "1.0.177" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f901ee573cab6b3060453d2d5f0bae4e6d628c23c0a962ff9b5f1d7c8d4f1ed" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2874,13 +2856,12 @@ dependencies = [ [[package]] name = "server_fn" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "024b400db1aca5bd4188714f7bbbf7a2e1962b9a12a80b2a21e937e509086963" +checksum = "bed94ec81d1b9ef2b28325bcf715461d861e90f41d249b70b561c6eefcb96afe" dependencies = [ "axum", "bytes", - "ciborium", "const_format", "dashmap", "futures", @@ -2891,13 +2872,15 @@ dependencies = [ "inventory", "js-sys", "once_cell", + "pin-project-lite", "send_wrapper", "serde", "serde_json", - "serde_qs 0.12.0", + "serde_qs", "server_fn_macro_default", - "thiserror", - "tower 0.4.13", + "thiserror 2.0.3", + "throw_error", + "tower 0.5.1", "tower-layer", "url", "wasm-bindgen", @@ -2909,26 +2892,26 @@ dependencies = [ [[package]] name = "server_fn_macro" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf0e6f71fc924df36e87f27dfbd447f0bedd092d365db3a5396878256d9f00c" +checksum = "4b7e77dd4f15d19a65019d24700963e40294b5a30c42c32bce2e532fbfe00b49" dependencies = [ "const_format", "convert_case", "proc-macro2", "quote", - "syn 2.0.76", + "syn", "xxhash-rust", ] [[package]] name = "server_fn_macro_default" -version = "0.6.14" +version = "0.7.0-rc2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556e4fd51eb9ee3e7d9fb0febec6cef486dcbc8f7f427591dfcfebee1abe1ad4" +checksum = "295a3c3d01be1cf17d0c8b25a48b963a747f6ccdba0f62f657e8df37df4afaac" dependencies = [ "server_fn_macro", - "syn 2.0.76", + "syn", ] [[package]] @@ -2994,7 +2977,6 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" dependencies = [ - "serde", "version_check", ] @@ -3049,12 +3031,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "subtle" version = "2.6.1" @@ -3076,20 +3052,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.76" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", @@ -3105,7 +3070,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] @@ -3144,6 +3109,38 @@ dependencies = [ "libc", ] +[[package]] +name = "tachys" +version = "0.1.0-rc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "231b9e7ce516683c062dd2c8e4d30b81ae8d9a6d05f1e2a9c898e0b84ad728fe" +dependencies = [ + "any_spawner", + "const_str_slice_concat", + "drain_filter_polyfill", + "either_of", + "futures", + "html-escape", + "indexmap", + "itertools", + "js-sys", + "linear-map", + "next_tuple", + "oco_ref", + "once_cell", + "or_poisoned", + "parking_lot", + "paste", + "reactive_graph", + "reactive_stores", + "rustc-hash", + "send_wrapper", + "slotmap", + "throw_error", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "tempfile" version = "3.12.0" @@ -3163,7 +3160,16 @@ version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.63", +] + +[[package]] +name = "thiserror" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c006c85c7651b3cf2ada4584faa36773bd07bac24acfb39f3c431b36d7e667aa" +dependencies = [ + "thiserror-impl 2.0.3", ] [[package]] @@ -3174,7 +3180,27 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f077553d607adc1caf65430528a576c757a71ed73944b66ebb58ef2bbd243568" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "throw_error" +version = "0.2.0-rc2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0240909e3ad4ed2dab72b2861fc9a7930110c1d3a9a0a32c6dee0a747591d10a" +dependencies = [ + "pin-project-lite", ] [[package]] @@ -3227,9 +3253,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.3" +version = "1.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" +checksum = "22cfb5bee7a6a52939ca9224d6ac897bb669134078daa8735560897f69de4d33" dependencies = [ "backtrace", "bytes", @@ -3251,7 +3277,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] @@ -3284,8 +3310,6 @@ dependencies = [ "bytes", "futures-core", "futures-sink", - "futures-util", - "hashbrown 0.14.5", "pin-project-lite", "tokio", ] @@ -3337,21 +3361,22 @@ dependencies = [ "tokio", "tower-layer", "tower-service", - "tracing", ] [[package]] name = "tower" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36b837f86b25d7c0d7988f00a54e74739be6477f2aac6201b8f429a7569991b7" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" dependencies = [ "futures-core", "futures-util", "pin-project-lite", "sync_wrapper 0.1.2", + "tokio", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -3381,6 +3406,31 @@ dependencies = [ "tracing", ] +[[package]] +name = "tower-http" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "403fa3b783d4b626a8ad51d766ab03cb6d2dbfc46b1c5d4448395e6628dc9697" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "http-body-util", + "http-range-header", + "httpdate", + "mime", + "mime_guess", + "percent-encoding", + "pin-project-lite", + "tokio", + "tokio-util", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-layer" version = "0.3.3" @@ -3413,7 +3463,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] @@ -3433,22 +3483,22 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typed-builder" -version = "0.18.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77739c880e00693faef3d65ea3aad725f196da38b22fdc7ea6ded6e1ce4d3add" +checksum = "7e14ed59dc8b7b26cacb2a92bad2e8b1f098806063898ab42a3bd121d7d45e75" dependencies = [ "typed-builder-macro", ] [[package]] name = "typed-builder-macro" -version = "0.18.2" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f718dfaf347dcb5b983bfc87608144b0bad87970aebcbea5ce44d2a30c08e63" +checksum = "560b82d656506509d43abe30e0ba64c56b1953ab3d4fe7ba5902747a7a3cedd5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] @@ -3543,9 +3593,9 @@ checksum = "86bd8d4e895da8537e5315b8254664e6b769c4ff3db18321b297a1e7004392e3" [[package]] name = "uuid" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" +checksum = "f8c5f0a0af699448548ad1a2fbf920fb4bee257eae39953ba95cb84891a0446a" dependencies = [ "getrandom", "wasm-bindgen", @@ -3599,9 +3649,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -3610,24 +3660,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.76", + "syn", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.43" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" +checksum = "cc7ec4f8827a71586374db3e87abdb5a2bb3a15afed140221307c3ec06b1f63b" dependencies = [ "cfg-if", "js-sys", @@ -3637,9 +3687,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3647,28 +3697,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "wasm-streams" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" dependencies = [ "futures-util", "js-sys", @@ -3696,9 +3746,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "f6488b90108c040df0fe62fa815cbdee25124641df01814dd7282749234c6112" dependencies = [ "js-sys", "wasm-bindgen", @@ -3992,7 +4042,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.76", + "syn", ] [[package]] diff --git a/aep-schedule-website/Cargo.toml b/aep-schedule-website/Cargo.toml index 9c2731f4cda3718d46c5567aae35bc24140ce2a3..05af712af9b7a4f5532526cc031b59c609711294 100644 --- a/aep-schedule-website/Cargo.toml +++ b/aep-schedule-website/Cargo.toml @@ -11,10 +11,10 @@ axum = { version = "0.7", optional = true, features = ["macros"] } console_error_panic_hook = "0.1" console_log = "1" cfg-if = "1" -leptos = { version = "0.7.0-rc0", features = ["nightly"] } -leptos_axum = { version = "0.7.0-rc0", optional = true } -leptos_meta = { version = "0.7.0-rc0", features = ["nightly"] } -leptos_router = { version = "0.7.0-rc0", features = ["nightly"] } +leptos = { version = "0.7.0-rc2", features = ["nightly"] } +leptos_router = { version = "0.7.0-rc2" } +leptos_meta = { version = "0.7.0-rc2" } +leptos_axum = { version = "0.7.0-rc2", optional = true } log = "0.4" rand = { version = "0.8", optional = true } simple_logger = "5" @@ -26,7 +26,7 @@ tower-http = { version = "0.5", features = [ "fs", ], optional = true } aep_schedule_generator = { path = "../aep-schedule-generator" } -wasm-bindgen = "=0.2.93" +wasm-bindgen = "=0.2.95" thiserror = "1.0.38" tracing = { version = "0.1.40", optional = true } serde = { version = "1.0", features = ["derive"] } @@ -50,7 +50,7 @@ lettre = { version = "0.11.7", features = [ ], optional = true } [features] -hydrate = ["leptos/hydrate", "leptos_meta/hydrate", "leptos_router/hydrate"] +hydrate = ["leptos/hydrate"] ssr = [ "dep:axum", "dep:tokio", @@ -60,10 +60,10 @@ ssr = [ "dep:reqwest", "dep:lettre", "dep:rand", + "dep:tracing", "leptos/ssr", "leptos_meta/ssr", "leptos_router/ssr", - "dep:tracing", ] [profile.dev] diff --git a/aep-schedule-website/src/backend/fileserv.rs b/aep-schedule-website/src/backend/fileserv.rs index 41783dc1bfb8af3f82af8f4afa000ce23992eb68..bde435f0ddb4c0f455485a8c8a4774459e7e9563 100644 --- a/aep-schedule-website/src/backend/fileserv.rs +++ b/aep-schedule-website/src/backend/fileserv.rs @@ -6,7 +6,7 @@ use axum::{ response::IntoResponse, response::Response, }; -use leptos::*; +use leptos::prelude::*; use tower::ServiceExt; use tower_http::services::ServeDir; diff --git a/aep-schedule-website/src/backend/routes.rs b/aep-schedule-website/src/backend/routes.rs index 27f6ef6d3569a027f9a048b3454cb4d4156db835..094726113cdbc4384db8f842ff83d5d24d5232f9 100644 --- a/aep-schedule-website/src/backend/routes.rs +++ b/aep-schedule-website/src/backend/routes.rs @@ -6,7 +6,7 @@ use aep_schedule_generator::{ icalendar::calendar::Calendar, }; use compact_str::CompactString; -use leptos::*; +use leptos::prelude::*; use super::shared::user_builder::UserBuilder; diff --git a/aep-schedule-website/src/backend/state.rs b/aep-schedule-website/src/backend/state.rs index 453eb8cd6686288284215deb62a5299aa13d0a8c..1379dc797fed00bdb15166dc872ea041ecd9944e 100644 --- a/aep-schedule-website/src/backend/state.rs +++ b/aep-schedule-website/src/backend/state.rs @@ -8,7 +8,7 @@ use axum::{ http::Request, response::{IntoResponse, Response}, }; -use leptos::*; +use leptos::prelude::*; use leptos_axum::handle_server_fns_with_context; use leptos_router::RouteListing; use std::fs::File; diff --git a/aep-schedule-website/src/frontend/app.rs b/aep-schedule-website/src/frontend/app.rs index c53b5bfe1da144d81f26fb81c58355f5dc115104..d0bbb147fa5f6027a13d9e298a5fdc62efb7ecb3 100644 --- a/aep-schedule-website/src/frontend/app.rs +++ b/aep-schedule-website/src/frontend/app.rs @@ -4,17 +4,68 @@ use crate::frontend::components::icons::IconWeight; use crate::frontend::pages::apropos::HomePage; use crate::frontend::pages::classroom::ClassRoomComponent; use crate::frontend::pages::generator::GeneratorPage; -use leptos::*; +use leptos::prelude::*; use leptos_meta::*; -use leptos_router::*; +use leptos_router::{ + components::{FlatRoutes, Route, Router, A}, + StaticSegment, +}; + +pub fn shell(options: LeptosOptions) -> impl IntoView { + view! { + <!DOCTYPE html> + <html lang="en"> + <head> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1"/> + <AutoReload options=options.clone() /> + <HydrationScripts options/> + <MetaTags/> + </head> + <body> + <App/> + </body> + </html> + } +} #[component] -pub fn App() -> impl IntoView { - // Provides context that manages stylesheets, titles, meta tags, etc. - provide_meta_context(); +pub fn Nav() -> impl IntoView { + let (is_active, set_active) = signal(false); + + view! { + <header> + <nav class=("active", is_active) class="flex-wrap overflow-x-hidden"> + <span class="text-2xl font-semibold leading-none font-sans tracking-tight">"Générateur d'horaire de l'AEP" + <span class="text-amber-600">"v2"</span> + </span> + <span class="bg-red-200 text-red-800 text-lg font-sans tracking-tight font-medium me-2 px-2.5 py-0.5 rounded-full shrink">"Beta - "<a class="text-gray-800" href="https://horaires.aep.polymtl.ca/">"Retourner à l'ancien générateur"</a></span> + <A href="/"><span class="rounded-md font-medium text-gray-700 text-lg font-sans tracking-tight">"Générateur d'horaire"</span></A> + <A href="/local"><span class="rounded-md font-medium text-gray-700 text-lg font-sans tracking-tight">"Horaire d'un local"</span></A> + <A href="/apropos"><span class="rounded-md font-medium text-gray-700 text-lg font-sans tracking-tight">"À propos"</span></A> - let (is_active, set_active) = create_signal(false); + <a href="https://forms.gle/u5AWgGx7vcLbCPCc7" class="sources pad-left" target="_blank"> + <span class="rounded-md font-medium text-gray-700 text-lg font-sans tracking-tight">"Signaler un bug"</span> + <Bug weight=IconWeight::Regular size="3vh"/> + </a> + <a href="https://git.step.polymtl.ca/Lemark/aep-schedule-generator-rusty" class="sources" target="_blank" ><span class="rounded-md font-medium text-gray-700 text-lg font-sans tracking-tight">"Sources "</span><GitlabLogo weight=IconWeight::Regular size="3vh"/></a> + </nav> + <div class=("active", is_active) class="hamburger" on:pointerdown=move |_| { + set_active.update(|active| { + *active = !*active; + }); + }> + <span class="hamburger-bar"></span> + <span class="hamburger-bar"></span> + <span class="hamburger-bar"></span> + </div> + </header> + } +} + +#[component] +pub fn App() -> impl IntoView { view! { // injects a stylesheet into the document <head> @@ -26,39 +77,13 @@ pub fn App() -> impl IntoView { // content for this welcome page <Router> - <header> - <nav class=("active", is_active) class="flex-wrap overflow-x-hidden"> - <span class="text-2xl font-semibold leading-none font-sans tracking-tight">"Générateur d'horaire de l'AEP" - <span class="text-amber-600">"v2"</span> - </span> - <span class="bg-red-200 text-red-800 text-lg font-sans tracking-tight font-medium me-2 px-2.5 py-0.5 rounded-full shrink">"Beta - "<a class="text-gray-800" href="https://horaires.aep.polymtl.ca/">"Retourner à l'ancien générateur"</a></span> - <A class="rounded-md font-medium text-gray-700 text-lg font-sans tracking-tight" href="/">"Générateur d'horaire"</A> - <A class="rounded-md font-medium text-gray-700 text-lg font-sans tracking-tight" href="/local">"Horaire d'un local"</A> - <A class="rounded-md font-medium text-gray-700 text-lg font-sans tracking-tight" href="/apropos">"À propos"</A> - - - <a href="https://forms.gle/u5AWgGx7vcLbCPCc7" class="sources pad-left" target="_blank"> - <span class="rounded-md font-medium text-gray-700 text-lg font-sans tracking-tight">"Signaler un bug"</span> - <Bug weight=IconWeight::Regular size="3vh"/> - </a> - <a href="https://git.step.polymtl.ca/Lemark/aep-schedule-generator-rusty" class="sources" target="_blank" ><span class="rounded-md font-medium text-gray-700 text-lg font-sans tracking-tight">"Sources "</span><GitlabLogo weight=IconWeight::Regular size="3vh"/></a> - </nav> - <div class=("active", is_active) class="hamburger" on:pointerdown=move |_| { - set_active.update(|active| { - *active = !*active; - }); - }> - <span class="hamburger-bar"></span> - <span class="hamburger-bar"></span> - <span class="hamburger-bar"></span> - </div> - </header> + <Nav/> <main class="h-full"> - <Routes> - <Route path="/" view=GeneratorPage/> - <Route path="/apropos" view=HomePage/> - <Route path="/local" view=ClassRoomComponent/> - </Routes> + <FlatRoutes fallback=|| "Not found"> + <Route path=StaticSegment("/") view=GeneratorPage/> + <Route path=StaticSegment("/apropos") view=HomePage/> + <Route path=StaticSegment("/local") view=ClassRoomComponent/> + </FlatRoutes> </main> </Router> } diff --git a/aep-schedule-website/src/frontend/components/common/autocomplete.rs b/aep-schedule-website/src/frontend/components/common/autocomplete.rs index 4e1bf07571c67546625cce9f0729af7e2de346d6..816bb1be73167619943846f6d1e5a2d90c674e43 100644 --- a/aep-schedule-website/src/frontend/components/common/autocomplete.rs +++ b/aep-schedule-website/src/frontend/components/common/autocomplete.rs @@ -1,5 +1,5 @@ use crate::frontend::components::icons::plus_circle::PlusCircle; -use leptos::*; +use leptos::prelude::*; use std::{cmp, ops::Range}; #[derive(Clone, PartialEq)] @@ -42,10 +42,10 @@ pub fn AutoComplete<F: FnMut(String) + Copy + Clone + 'static>( id: &'static str, mut submit: F, ) -> impl IntoView { - let input = create_rw_signal(String::new()); - let (suggestion_range, set_suggestion_range) = create_signal(0..0); + let input = RwSignal::new(String::new()); + let (suggestion_range, set_suggestion_range) = signal(0..0); let suggestions = suggestion_list.clone(); - let is_hidden = create_rw_signal(true); + let is_hidden = RwSignal::new(true); let on_input = move |ev| { let value = event_target_value(&ev); diff --git a/aep-schedule-website/src/frontend/components/common/number_input.rs b/aep-schedule-website/src/frontend/components/common/number_input.rs index 5dc3e45ce787b44e41f7f36730ff1c0dab7a9db5..c5ded8dcfe24bdbcff21ee8781507981f65fceec 100644 --- a/aep-schedule-website/src/frontend/components/common/number_input.rs +++ b/aep-schedule-website/src/frontend/components/common/number_input.rs @@ -1,4 +1,4 @@ -use leptos::*; +use leptos::prelude::*; #[component] pub fn NumberInput<F>( @@ -46,7 +46,6 @@ where class="bg-gray-50 border-x-0 border-gray-300 h-7 text-center text-gray-900 text-sm focus:ring-amber-500 focus:border-amber-500 block w-full py-2.5" placeholder="0" on:input=on_input - type="number" min="0" max=max prop:value=value diff --git a/aep-schedule-website/src/frontend/components/common/schedule.rs b/aep-schedule-website/src/frontend/components/common/schedule.rs index 94deb8bb0afbc7b45a6d3e907d3bc1805cc402f6..94a238074d8c9cbc3839cde45e24146163a73ae4 100644 --- a/aep-schedule-website/src/frontend/components/common/schedule.rs +++ b/aep-schedule-website/src/frontend/components/common/schedule.rs @@ -1,5 +1,5 @@ use aep_schedule_generator::data::time::period::Period; -use leptos::*; +use leptos::prelude::*; use std::array; #[component] @@ -38,8 +38,8 @@ pub fn Schedule( } #[component] -pub fn ScheduleEvent<'a>( - period: &'a Period, +pub fn ScheduleEvent( + period: Period, children: Children, #[prop(optional)] class: String, ) -> impl IntoView { diff --git a/aep-schedule-website/src/frontend/components/common/tab.rs b/aep-schedule-website/src/frontend/components/common/tab.rs index e330d3bcd7569118ad1f8c20d13a7ac18407decb..6993eee0f44b6532efcab44fa08c734ef1e7e9e5 100644 --- a/aep-schedule-website/src/frontend/components/common/tab.rs +++ b/aep-schedule-website/src/frontend/components/common/tab.rs @@ -1,4 +1,4 @@ -use leptos::*; +use leptos::prelude::*; #[component] pub fn Tab(active_tab: ReadSignal<String>, tab_id: String, children: Children) -> impl IntoView { diff --git a/aep-schedule-website/src/frontend/components/icons/bell_ringing.rs b/aep-schedule-website/src/frontend/components/icons/bell_ringing.rs index 8d7dc6837b19258a27115e894393377a95c1495b..9ec0b7909fa7e454983e8092190475261abe748c 100644 --- a/aep-schedule-website/src/frontend/components/icons/bell_ringing.rs +++ b/aep-schedule-website/src/frontend/components/icons/bell_ringing.rs @@ -1,47 +1,41 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn BellRinging( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + weight: Signal<IconWeight>, + size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { + let body = move || { match weight.get() { - IconWeight::Fill => view! { - <path d="M224,71.1a8,8,0,0,1-10.78-3.42,94.13,94.13,0,0,0-33.46-36.91,8,8,0,1,1,8.54-13.54,111.46,111.46,0,0,1,39.12,43.09A8,8,0,0,1,224,71.1ZM35.71,72a8,8,0,0,0,7.1-4.32A94.13,94.13,0,0,1,76.27,30.77a8,8,0,1,0-8.54-13.54A111.46,111.46,0,0,0,28.61,60.32,8,8,0,0,0,35.71,72Zm186.1,103.94A16,16,0,0,1,208,200H167.2a40,40,0,0,1-78.4,0H48a16,16,0,0,1-13.79-24.06C43.22,160.39,48,138.28,48,112a80,80,0,0,1,160,0C208,138.27,212.78,160.38,221.81,175.94ZM150.62,200H105.38a24,24,0,0,0,45.24,0Z"></path> - }.into_view(), -IconWeight::Duotone => view! { - <path - d="M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,147.81,56,112a72,72,0,0,1,144,0c0,35.82,8.3,56.6,14.9,68A8,8,0,0,1,208,192Z" - opacity="0.2" - ></path> - <path d="M224,71.1a8,8,0,0,1-10.78-3.42,94.13,94.13,0,0,0-33.46-36.91,8,8,0,1,1,8.54-13.54,111.46,111.46,0,0,1,39.12,43.09A8,8,0,0,1,224,71.1ZM35.71,72a8,8,0,0,0,7.1-4.32A94.13,94.13,0,0,1,76.27,30.77a8,8,0,1,0-8.54-13.54A111.46,111.46,0,0,0,28.61,60.32,8,8,0,0,0,35.71,72Zm186.1,103.94A16,16,0,0,1,208,200H167.2a40,40,0,0,1-78.4,0H48a16,16,0,0,1-13.79-24.06C43.22,160.39,48,138.28,48,112a80,80,0,0,1,160,0C208,138.27,212.78,160.38,221.81,175.94ZM150.62,200H105.38a24,24,0,0,0,45.24,0ZM208,184c-10.64-18.27-16-42.49-16-72a64,64,0,0,0-128,0c0,29.52-5.38,53.74-16,72Z"></path> -}.into_view(), -IconWeight::Thin => view! { - <path d="M222.13,67.55a3.94,3.94,0,0,1-1.84.45,4,4,0,0,1-3.55-2.16,99.41,99.41,0,0,0-34.87-38.46,4,4,0,1,1,4.26-6.76,107.34,107.34,0,0,1,37.71,41.54A4,4,0,0,1,222.13,67.55ZM39.26,65.84A99.41,99.41,0,0,1,74.13,27.38a4,4,0,0,0-4.26-6.76A107.34,107.34,0,0,0,32.16,62.16a4,4,0,0,0,1.71,5.39,3.94,3.94,0,0,0,1.84.45A4,4,0,0,0,39.26,65.84ZM218.36,178A12,12,0,0,1,208,196H163.77a36,36,0,0,1-71.54,0H48A12,12,0,0,1,37.64,178C47.17,161.56,52,139.37,52,112a76,76,0,0,1,152,0C204,139.36,208.83,161.55,218.36,178ZM155.71,196H100.29a28,28,0,0,0,55.42,0Zm55.73-14C201.19,164.34,196,140.79,196,112a68,68,0,0,0-136,0c0,28.8-5.19,52.34-15.44,70a4,4,0,0,0,0,4A3.89,3.89,0,0,0,48,188H208a3.89,3.89,0,0,0,3.43-2A4,4,0,0,0,211.44,182Z"></path> -}.into_view(), -IconWeight::Bold => view! { - <path d="M225.81,74.65A11.86,11.86,0,0,1,220.3,76a12,12,0,0,1-10.67-6.47,90.1,90.1,0,0,0-32-35.38,12,12,0,1,1,12.8-20.29,115.25,115.25,0,0,1,40.54,44.62A12,12,0,0,1,225.81,74.65ZM46.37,69.53a90.1,90.1,0,0,1,32-35.38A12,12,0,1,0,65.6,13.86,115.25,115.25,0,0,0,25.06,58.48a12,12,0,0,0,5.13,16.17A11.86,11.86,0,0,0,35.7,76,12,12,0,0,0,46.37,69.53Zm173.51,98.35A20,20,0,0,1,204,200H171.81a44,44,0,0,1-87.62,0H52a20,20,0,0,1-15.91-32.12c7.17-9.33,15.73-26.62,15.88-55.94A76,76,0,0,1,204,112C204.15,141.26,212.71,158.55,219.88,167.88ZM147.6,200H108.4a20,20,0,0,0,39.2,0Zm48.74-24c-8.16-13-16.19-33.57-16.34-63.94A52,52,0,1,0,76,112c-.15,30.42-8.18,51-16.34,64Z"></path> -}.into_view(), -IconWeight::Light => view! { - <path d="M223.05,69.33A6,6,0,0,1,215,66.76,96,96,0,0,0,180.8,29.08a6,6,0,0,1,6.4-10.15,109.26,109.26,0,0,1,38.41,42.31A6,6,0,0,1,223.05,69.33ZM41,66.76A96,96,0,0,1,75.2,29.08a6,6,0,0,0-6.4-10.15A109.26,109.26,0,0,0,30.39,61.24,6,6,0,1,0,41,66.76Zm179,110.18A14,14,0,0,1,208,198h-42.5a38,38,0,0,1-75,0H48a14,14,0,0,1-12.06-21.06C45.13,161.09,50,138.63,50,112a78,78,0,0,1,156,0C206,139,210.74,160.86,220.08,176.94ZM153.29,198H102.71a26,26,0,0,0,50.58,0Zm56.42-15C199.29,165,194,141.15,194,112a66,66,0,0,0-132,0c0,29.16-5.29,53-15.71,71a2,2,0,0,0,0,2,1.9,1.9,0,0,0,1.7,1H208a1.9,1.9,0,0,0,1.7-1A2,2,0,0,0,209.71,183Z"></path> -}.into_view(), -IconWeight::Regular => view! { - <path d="M224,71.1a8,8,0,0,1-10.78-3.42,94.13,94.13,0,0,0-33.46-36.91,8,8,0,1,1,8.54-13.54,111.46,111.46,0,0,1,39.12,43.09A8,8,0,0,1,224,71.1ZM35.71,72a8,8,0,0,0,7.1-4.32A94.13,94.13,0,0,1,76.27,30.77a8,8,0,1,0-8.54-13.54A111.46,111.46,0,0,0,28.61,60.32,8,8,0,0,0,35.71,72Zm186.1,103.94A16,16,0,0,1,208,200H167.2a40,40,0,0,1-78.4,0H48a16,16,0,0,1-13.79-24.06C43.22,160.39,48,138.28,48,112a80,80,0,0,1,160,0C208,138.27,212.78,160.38,221.81,175.94ZM150.62,200H105.38a24,24,0,0,0,45.24,0ZM208,184c-10.64-18.27-16-42.49-16-72a64,64,0,0,0-128,0c0,29.52-5.38,53.74-16,72Z"></path> -}.into_view() - } - }); + IconWeight::Fill => view! { + <path d="M224,71.1a8,8,0,0,1-10.78-3.42,94.13,94.13,0,0,0-33.46-36.91,8,8,0,1,1,8.54-13.54,111.46,111.46,0,0,1,39.12,43.09A8,8,0,0,1,224,71.1ZM35.71,72a8,8,0,0,0,7.1-4.32A94.13,94.13,0,0,1,76.27,30.77a8,8,0,1,0-8.54-13.54A111.46,111.46,0,0,0,28.61,60.32,8,8,0,0,0,35.71,72Zm186.1,103.94A16,16,0,0,1,208,200H167.2a40,40,0,0,1-78.4,0H48a16,16,0,0,1-13.79-24.06C43.22,160.39,48,138.28,48,112a80,80,0,0,1,160,0C208,138.27,212.78,160.38,221.81,175.94ZM150.62,200H105.38a24,24,0,0,0,45.24,0Z"></path> + }.into_any(), + IconWeight::Duotone => view! { + <path + d="M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,147.81,56,112a72,72,0,0,1,144,0c0,35.82,8.3,56.6,14.9,68A8,8,0,0,1,208,192Z" + opacity="0.2" + ></path> + <path d="M224,71.1a8,8,0,0,1-10.78-3.42,94.13,94.13,0,0,0-33.46-36.91,8,8,0,1,1,8.54-13.54,111.46,111.46,0,0,1,39.12,43.09A8,8,0,0,1,224,71.1ZM35.71,72a8,8,0,0,0,7.1-4.32A94.13,94.13,0,0,1,76.27,30.77a8,8,0,1,0-8.54-13.54A111.46,111.46,0,0,0,28.61,60.32,8,8,0,0,0,35.71,72Zm186.1,103.94A16,16,0,0,1,208,200H167.2a40,40,0,0,1-78.4,0H48a16,16,0,0,1-13.79-24.06C43.22,160.39,48,138.28,48,112a80,80,0,0,1,160,0C208,138.27,212.78,160.38,221.81,175.94ZM150.62,200H105.38a24,24,0,0,0,45.24,0ZM208,184c-10.64-18.27-16-42.49-16-72a64,64,0,0,0-128,0c0,29.52-5.38,53.74-16,72Z"></path> + }.into_any(), + IconWeight::Thin => view! { + <path d="M222.13,67.55a3.94,3.94,0,0,1-1.84.45,4,4,0,0,1-3.55-2.16,99.41,99.41,0,0,0-34.87-38.46,4,4,0,1,1,4.26-6.76,107.34,107.34,0,0,1,37.71,41.54A4,4,0,0,1,222.13,67.55ZM39.26,65.84A99.41,99.41,0,0,1,74.13,27.38a4,4,0,0,0-4.26-6.76A107.34,107.34,0,0,0,32.16,62.16a4,4,0,0,0,1.71,5.39,3.94,3.94,0,0,0,1.84.45A4,4,0,0,0,39.26,65.84ZM218.36,178A12,12,0,0,1,208,196H163.77a36,36,0,0,1-71.54,0H48A12,12,0,0,1,37.64,178C47.17,161.56,52,139.37,52,112a76,76,0,0,1,152,0C204,139.36,208.83,161.55,218.36,178ZM155.71,196H100.29a28,28,0,0,0,55.42,0Zm55.73-14C201.19,164.34,196,140.79,196,112a68,68,0,0,0-136,0c0,28.8-5.19,52.34-15.44,70a4,4,0,0,0,0,4A3.89,3.89,0,0,0,48,188H208a3.89,3.89,0,0,0,3.43-2A4,4,0,0,0,211.44,182Z"></path> + }.into_any(), + IconWeight::Bold => view! { + <path d="M225.81,74.65A11.86,11.86,0,0,1,220.3,76a12,12,0,0,1-10.67-6.47,90.1,90.1,0,0,0-32-35.38,12,12,0,1,1,12.8-20.29,115.25,115.25,0,0,1,40.54,44.62A12,12,0,0,1,225.81,74.65ZM46.37,69.53a90.1,90.1,0,0,1,32-35.38A12,12,0,1,0,65.6,13.86,115.25,115.25,0,0,0,25.06,58.48a12,12,0,0,0,5.13,16.17A11.86,11.86,0,0,0,35.7,76,12,12,0,0,0,46.37,69.53Zm173.51,98.35A20,20,0,0,1,204,200H171.81a44,44,0,0,1-87.62,0H52a20,20,0,0,1-15.91-32.12c7.17-9.33,15.73-26.62,15.88-55.94A76,76,0,0,1,204,112C204.15,141.26,212.71,158.55,219.88,167.88ZM147.6,200H108.4a20,20,0,0,0,39.2,0Zm48.74-24c-8.16-13-16.19-33.57-16.34-63.94A52,52,0,1,0,76,112c-.15,30.42-8.18,51-16.34,64Z"></path> + }.into_any(), + IconWeight::Light => view! { + <path d="M223.05,69.33A6,6,0,0,1,215,66.76,96,96,0,0,0,180.8,29.08a6,6,0,0,1,6.4-10.15,109.26,109.26,0,0,1,38.41,42.31A6,6,0,0,1,223.05,69.33ZM41,66.76A96,96,0,0,1,75.2,29.08a6,6,0,0,0-6.4-10.15A109.26,109.26,0,0,0,30.39,61.24,6,6,0,1,0,41,66.76Zm179,110.18A14,14,0,0,1,208,198h-42.5a38,38,0,0,1-75,0H48a14,14,0,0,1-12.06-21.06C45.13,161.09,50,138.63,50,112a78,78,0,0,1,156,0C206,139,210.74,160.86,220.08,176.94ZM153.29,198H102.71a26,26,0,0,0,50.58,0Zm56.42-15C199.29,165,194,141.15,194,112a66,66,0,0,0-132,0c0,29.16-5.29,53-15.71,71a2,2,0,0,0,0,2,1.9,1.9,0,0,0,1.7,1H208a1.9,1.9,0,0,0,1.7-1A2,2,0,0,0,209.71,183Z"></path> + }.into_any(), + IconWeight::Regular => view! { + <path d="M224,71.1a8,8,0,0,1-10.78-3.42,94.13,94.13,0,0,0-33.46-36.91,8,8,0,1,1,8.54-13.54,111.46,111.46,0,0,1,39.12,43.09A8,8,0,0,1,224,71.1ZM35.71,72a8,8,0,0,0,7.1-4.32A94.13,94.13,0,0,1,76.27,30.77a8,8,0,1,0-8.54-13.54A111.46,111.46,0,0,0,28.61,60.32,8,8,0,0,0,35.71,72Zm186.1,103.94A16,16,0,0,1,208,200H167.2a40,40,0,0,1-78.4,0H48a16,16,0,0,1-13.79-24.06C43.22,160.39,48,138.28,48,112a80,80,0,0,1,160,0C208,138.27,212.78,160.38,221.81,175.94ZM150.62,200H105.38a24,24,0,0,0,45.24,0ZM208,184c-10.64-18.27-16-42.49-16-72a64,64,0,0,0-128,0c0,29.52-5.38,53.74-16,72Z"></path> + }.into_any() + } + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -49,8 +43,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/bug.rs b/aep-schedule-website/src/frontend/components/icons/bug.rs index daafa574312ce8ce4cd33c633d3447971f516b73..123ec96a66aa75d66cedfceb30ef6ae07b2604ee 100644 --- a/aep-schedule-website/src/frontend/components/icons/bug.rs +++ b/aep-schedule-website/src/frontend/components/icons/bug.rs @@ -1,43 +1,38 @@ -//! GENERATED FILE use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn Bug( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(into)] weight: IconWeight, + #[prop(into)] size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { - match weight.get() { + let body = move || { + match weight { IconWeight::Fill => view! { <path d="M168,92a12,12,0,1,1-12-12A12,12,0,0,1,168,92ZM100,80a12,12,0,1,0,12,12A12,12,0,0,0,100,80Zm116,64A87.76,87.76,0,0,1,213,167l22.24,9.72A8,8,0,0,1,232,192a7.89,7.89,0,0,1-3.2-.67L207.38,182a88,88,0,0,1-158.76,0L27.2,191.33A7.89,7.89,0,0,1,24,192a8,8,0,0,1-3.2-15.33L43,167A87.76,87.76,0,0,1,40,144v-8H16a8,8,0,0,1,0-16H40v-8a87.76,87.76,0,0,1,3-23L20.8,79.33a8,8,0,1,1,6.4-14.66L48.62,74a88,88,0,0,1,158.76,0l21.42-9.36a8,8,0,0,1,6.4,14.66L213,89.05a87.76,87.76,0,0,1,3,23v8h24a8,8,0,0,1,0,16H216Zm-80,0a8,8,0,0,0-16,0v64a8,8,0,0,0,16,0Zm64-32a72,72,0,0,0-144,0v8H200Z"></path> - }.into_view(), + }.into_any(), IconWeight::Duotone => view! { <path d="M208,128v16a80,80,0,0,1-160,0V128Z" opacity="0.2"></path> <path d="M144,92a12,12,0,1,1,12,12A12,12,0,0,1,144,92ZM100,80a12,12,0,1,0,12,12A12,12,0,0,0,100,80Zm116,64A87.76,87.76,0,0,1,213,167l22.24,9.72A8,8,0,0,1,232,192a7.89,7.89,0,0,1-3.2-.67L207.38,182a88,88,0,0,1-158.76,0L27.2,191.33A7.89,7.89,0,0,1,24,192a8,8,0,0,1-3.2-15.33L43,167A87.76,87.76,0,0,1,40,144v-8H16a8,8,0,0,1,0-16H40v-8a87.76,87.76,0,0,1,3-23L20.8,79.33a8,8,0,1,1,6.4-14.66L48.62,74a88,88,0,0,1,158.76,0l21.42-9.36a8,8,0,0,1,6.4,14.66L213,89.05a87.76,87.76,0,0,1,3,23v8h24a8,8,0,0,1,0,16H216ZM56,120H200v-8a72,72,0,0,0-144,0Zm64,95.54V136H56v8A72.08,72.08,0,0,0,120,215.54ZM200,144v-8H136v79.54A72.08,72.08,0,0,0,200,144Z"></path> -}.into_view(), +}.into_any(), IconWeight::Thin => view! { <path d="M148,92a8,8,0,1,1,8,8A8,8,0,0,1,148,92Zm-48-8a8,8,0,1,0,8,8A8,8,0,0,0,100,84Zm144,44a4,4,0,0,1-4,4H212v12a83.64,83.64,0,0,1-3.87,25.2l25.47,11.13A4,4,0,0,1,232,188a4.09,4.09,0,0,1-1.6-.33l-25-10.95a84,84,0,0,1-154.72,0l-25,10.95A4.09,4.09,0,0,1,24,188a4,4,0,0,1-1.6-7.67L47.87,169.2A83.64,83.64,0,0,1,44,144V132H16a4,4,0,0,1,0-8H44V112a83.64,83.64,0,0,1,3.87-25.2L22.4,75.67a4,4,0,0,1,3.2-7.34l25,11a84,84,0,0,1,154.72,0l25-11a4,4,0,1,1,3.2,7.34L208.13,86.8A83.64,83.64,0,0,1,212,112v12h28A4,4,0,0,1,244,128ZM52,124H204V112a76,76,0,0,0-152,0Zm72,95.89V132H52v12A76.09,76.09,0,0,0,124,219.89ZM204,132H132v87.89A76.09,76.09,0,0,0,204,144Z"></path> -}.into_view(), +}.into_any(), IconWeight::Bold => view! { <path d="M140,88a16,16,0,1,1,16,16A16,16,0,0,1,140,88ZM100,72a16,16,0,1,0,16,16A16,16,0,0,0,100,72Zm120,72a91.84,91.84,0,0,1-2.34,20.64L236.81,173a12,12,0,0,1-9.62,22l-18-7.85a92,92,0,0,1-162.46,0l-18,7.85a12,12,0,1,1-9.62-22l19.15-8.36A91.84,91.84,0,0,1,36,144v-4H16a12,12,0,0,1,0-24H36v-4a91.84,91.84,0,0,1,2.34-20.64L19.19,83a12,12,0,0,1,9.62-22l18,7.85a92,92,0,0,1,162.46,0l18-7.85a12,12,0,1,1,9.62,22l-19.15,8.36A91.84,91.84,0,0,1,220,112v4h20a12,12,0,0,1,0,24H220ZM60,116H196v-4a68,68,0,0,0-136,0Zm56,94.92V140H60v4A68.1,68.1,0,0,0,116,210.92ZM196,144v-4H140v70.92A68.1,68.1,0,0,0,196,144Z"></path> -}.into_view(), +}.into_any(), IconWeight::Light => view! { <path d="M146,92a10,10,0,1,1,10,10A10,10,0,0,1,146,92ZM100,82a10,10,0,1,0,10,10A10,10,0,0,0,100,82Zm146,46a6,6,0,0,1-6,6H214v10a85.88,85.88,0,0,1-3.45,24.08L234.4,178.5a6,6,0,0,1-4.8,11l-23.23-10.15a86,86,0,0,1-156.74,0L26.4,189.5a6,6,0,1,1-4.8-11l23.85-10.42A85.88,85.88,0,0,1,42,144V134H16a6,6,0,0,1,0-12H42V112a85.88,85.88,0,0,1,3.45-24.08L21.6,77.5a6,6,0,0,1,4.8-11L49.63,76.65a86,86,0,0,1,156.74,0L229.6,66.5a6,6,0,1,1,4.8,11L210.55,87.92A85.88,85.88,0,0,1,214,112v10h26A6,6,0,0,1,246,128ZM54,122H202V112a74,74,0,0,0-148,0Zm68,95.74V134H54v10A74.09,74.09,0,0,0,122,217.74ZM202,134H134v83.74A74.09,74.09,0,0,0,202,144Z"></path> -}.into_view(), +}.into_any(), IconWeight::Regular => view! { <path d="M144,92a12,12,0,1,1,12,12A12,12,0,0,1,144,92ZM100,80a12,12,0,1,0,12,12A12,12,0,0,0,100,80Zm116,64A87.76,87.76,0,0,1,213,167l22.24,9.72A8,8,0,0,1,232,192a7.89,7.89,0,0,1-3.2-.67L207.38,182a88,88,0,0,1-158.76,0L27.2,191.33A7.89,7.89,0,0,1,24,192a8,8,0,0,1-3.2-15.33L43,167A87.76,87.76,0,0,1,40,144v-8H16a8,8,0,0,1,0-16H40v-8a87.76,87.76,0,0,1,3-23L20.8,79.33a8,8,0,1,1,6.4-14.66L48.62,74a88,88,0,0,1,158.76,0l21.42-9.36a8,8,0,0,1,6.4,14.66L213,89.05a87.76,87.76,0,0,1,3,23v8h24a8,8,0,0,1,0,16H216ZM56,120H200v-8a72,72,0,0,0-144,0Zm64,95.54V136H56v8A72.08,72.08,0,0,0,120,215.54ZM200,144v-8H136v79.54A72.08,72.08,0,0,0,200,144Z"></path> -}.into_view() +}.into_any() } - }); + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -45,8 +40,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/calendar_check.rs b/aep-schedule-website/src/frontend/components/icons/calendar_check.rs index 3ce85ad3992406522d319d22ad3efbe97355d9c1..939e21a54f4922d9712d66c939960deb490ce1d4 100644 --- a/aep-schedule-website/src/frontend/components/icons/calendar_check.rs +++ b/aep-schedule-website/src/frontend/components/icons/calendar_check.rs @@ -1,44 +1,38 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn CalendarCheck( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(into)] weight: Signal<IconWeight>, + #[prop(into)] size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { + let body = move || { match weight.get() { IconWeight::Fill => view! { <path d="M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM169.66,133.66l-48,48a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L116,164.69l42.34-42.35a8,8,0,0,1,11.32,11.32ZM48,80V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80Z"></path> - }.into_view(), -IconWeight::Duotone => view! { - <path d="M216,48V88H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z" opacity="0.2"></path> - <path d="M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-38.34-85.66a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L116,164.69l42.34-42.35A8,8,0,0,1,169.66,122.34Z"></path> -}.into_view(), -IconWeight::Thin => view! { - <path d="M208,36H180V24a4,4,0,0,0-8,0V36H84V24a4,4,0,0,0-8,0V36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H76V56a4,4,0,0,0,8,0V44h88V56a4,4,0,0,0,8,0V44h28a4,4,0,0,1,4,4V84H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V92H212V208A4,4,0,0,1,208,212Zm-41.17-86.83a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L116,170.34l45.17-45.17A4,4,0,0,1,166.83,125.17Z"></path> -}.into_view(), -IconWeight::Bold => view! { - <path d="M208,28H188V24a12,12,0,0,0-24,0v4H92V24a12,12,0,0,0-24,0v4H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28ZM68,52a12,12,0,0,0,24,0h72a12,12,0,0,0,24,0h16V76H52V52ZM52,204V100H204V204Zm120.49-84.49a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-24-24a12,12,0,0,1,17-17L116,159l39.51-39.52A12,12,0,0,1,172.49,119.51Z"></path> -}.into_view(), -IconWeight::Light => view! { - <path d="M208,34H182V24a6,6,0,0,0-12,0V34H86V24a6,6,0,0,0-12,0V34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H74V56a6,6,0,0,0,12,0V46h84V56a6,6,0,0,0,12,0V46h26a2,2,0,0,1,2,2V82H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V94H210V208A2,2,0,0,1,208,210Zm-39.76-86.24a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L116,167.51l43.76-43.75A6,6,0,0,1,168.24,123.76Z"></path> -}.into_view(), -IconWeight::Regular => view! { - <path d="M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-38.34-85.66a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L116,164.69l42.34-42.35A8,8,0,0,1,169.66,122.34Z"></path> -}.into_view() - } - }); + }.into_any(), + IconWeight::Duotone => view! { + <path d="M216,48V88H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z" opacity="0.2"></path> + <path d="M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-38.34-85.66a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L116,164.69l42.34-42.35A8,8,0,0,1,169.66,122.34Z"></path> + }.into_any(), + IconWeight::Thin => view! { + <path d="M208,36H180V24a4,4,0,0,0-8,0V36H84V24a4,4,0,0,0-8,0V36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H76V56a4,4,0,0,0,8,0V44h88V56a4,4,0,0,0,8,0V44h28a4,4,0,0,1,4,4V84H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V92H212V208A4,4,0,0,1,208,212Zm-41.17-86.83a4,4,0,0,1,0,5.66l-48,48a4,4,0,0,1-5.66,0l-24-24a4,4,0,0,1,5.66-5.66L116,170.34l45.17-45.17A4,4,0,0,1,166.83,125.17Z"></path> + }.into_any(), + IconWeight::Bold => view! { + <path d="M208,28H188V24a12,12,0,0,0-24,0v4H92V24a12,12,0,0,0-24,0v4H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V48A20,20,0,0,0,208,28ZM68,52a12,12,0,0,0,24,0h72a12,12,0,0,0,24,0h16V76H52V52ZM52,204V100H204V204Zm120.49-84.49a12,12,0,0,1,0,17l-48,48a12,12,0,0,1-17,0l-24-24a12,12,0,0,1,17-17L116,159l39.51-39.52A12,12,0,0,1,172.49,119.51Z"></path> + }.into_any(), + IconWeight::Light => view! { + <path d="M208,34H182V24a6,6,0,0,0-12,0V34H86V24a6,6,0,0,0-12,0V34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H74V56a6,6,0,0,0,12,0V46h84V56a6,6,0,0,0,12,0V46h26a2,2,0,0,1,2,2V82H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V94H210V208A2,2,0,0,1,208,210Zm-39.76-86.24a6,6,0,0,1,0,8.48l-48,48a6,6,0,0,1-8.48,0l-24-24a6,6,0,0,1,8.48-8.48L116,167.51l43.76-43.75A6,6,0,0,1,168.24,123.76Z"></path> + }.into_any(), + IconWeight::Regular => view! { + <path d="M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-38.34-85.66a8,8,0,0,1,0,11.32l-48,48a8,8,0,0,1-11.32,0l-24-24a8,8,0,0,1,11.32-11.32L116,164.69l42.34-42.35A8,8,0,0,1,169.66,122.34Z"></path> + }.into_any() + } + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -46,8 +40,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/calendar_x.rs b/aep-schedule-website/src/frontend/components/icons/calendar_x.rs index c2d86ea4bb2902e3ffb515fea94598bcaec2fe8a..f431dc7589b0dc5be00ac998de0f8e46ca5bef57 100644 --- a/aep-schedule-website/src/frontend/components/icons/calendar_x.rs +++ b/aep-schedule-website/src/frontend/components/icons/calendar_x.rs @@ -1,44 +1,37 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn CalendarX( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(into)] weight: IconWeight, + #[prop(into)] size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { - match weight.get() { + let body = + match weight { IconWeight::Fill => view! { <path d="M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM157.66,170.34a8,8,0,0,1-11.32,11.32L128,163.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L116.69,152,98.34,133.66a8,8,0,0,1,11.32-11.32L128,140.69l18.34-18.35a8,8,0,0,1,11.32,11.32L139.31,152ZM208,80H48V48H72v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24Z"></path> - }.into_view(), -IconWeight::Duotone => view! { - <path d="M216,48V88H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z" opacity="0.2"></path> - <path d="M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-50.34-74.34L139.31,152l18.35,18.34a8,8,0,0,1-11.32,11.32L128,163.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L116.69,152,98.34,133.66a8,8,0,0,1,11.32-11.32L128,140.69l18.34-18.35a8,8,0,0,1,11.32,11.32Z"></path> -}.into_view(), -IconWeight::Thin => view! { - <path d="M208,36H180V24a4,4,0,0,0-8,0V36H84V24a4,4,0,0,0-8,0V36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H76V56a4,4,0,0,0,8,0V44h88V56a4,4,0,0,0,8,0V44h28a4,4,0,0,1,4,4V84H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V92H212V208A4,4,0,0,1,208,212Zm-53.17-81.17L133.66,152l21.17,21.17a4,4,0,0,1-5.66,5.66L128,157.66l-21.17,21.17a4,4,0,0,1-5.66-5.66L122.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66L128,146.34l21.17-21.17a4,4,0,1,1,5.66,5.66Z"></path> -}.into_view(), -IconWeight::Bold => view! { - <path d="M160.49,136.49,145,152l15.52,15.51a12,12,0,0,1-17,17L128,169l-15.51,15.52a12,12,0,0,1-17-17L111,152,95.51,136.49a12,12,0,1,1,17-17L128,135l15.51-15.52a12,12,0,1,1,17,17ZM228,48V208a20,20,0,0,1-20,20H48a20,20,0,0,1-20-20V48A20,20,0,0,1,48,28H68V24a12,12,0,0,1,24,0v4h72V24a12,12,0,0,1,24,0v4h20A20,20,0,0,1,228,48ZM52,52V76H204V52H188a12,12,0,0,1-24,0H92a12,12,0,0,1-24,0ZM204,204V100H52V204Z"></path> -}.into_view(), -IconWeight::Light => view! { - <path d="M208,34H182V24a6,6,0,0,0-12,0V34H86V24a6,6,0,0,0-12,0V34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H74V56a6,6,0,0,0,12,0V46h84V56a6,6,0,0,0,12,0V46h26a2,2,0,0,1,2,2V82H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V94H210V208A2,2,0,0,1,208,210Zm-51.76-77.76L136.48,152l19.76,19.76a6,6,0,1,1-8.48,8.48L128,160.48l-19.76,19.76a6,6,0,0,1-8.48-8.48L119.52,152,99.76,132.24a6,6,0,1,1,8.48-8.48L128,143.52l19.76-19.76a6,6,0,1,1,8.48,8.48Z"></path> -}.into_view(), -IconWeight::Regular => view! { - <path d="M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-50.34-74.34L139.31,152l18.35,18.34a8,8,0,0,1-11.32,11.32L128,163.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L116.69,152,98.34,133.66a8,8,0,0,1,11.32-11.32L128,140.69l18.34-18.35a8,8,0,0,1,11.32,11.32Z"></path> -}.into_view() - } - }); + }.into_any(), + IconWeight::Duotone => view! { + <path d="M216,48V88H40V48a8,8,0,0,1,8-8H208A8,8,0,0,1,216,48Z" opacity="0.2"></path> + <path d="M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-50.34-74.34L139.31,152l18.35,18.34a8,8,0,0,1-11.32,11.32L128,163.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L116.69,152,98.34,133.66a8,8,0,0,1,11.32-11.32L128,140.69l18.34-18.35a8,8,0,0,1,11.32,11.32Z"></path> + }.into_any(), + IconWeight::Thin => view! { + <path d="M208,36H180V24a4,4,0,0,0-8,0V36H84V24a4,4,0,0,0-8,0V36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V48A12,12,0,0,0,208,36ZM48,44H76V56a4,4,0,0,0,8,0V44h88V56a4,4,0,0,0,8,0V44h28a4,4,0,0,1,4,4V84H44V48A4,4,0,0,1,48,44ZM208,212H48a4,4,0,0,1-4-4V92H212V208A4,4,0,0,1,208,212Zm-53.17-81.17L133.66,152l21.17,21.17a4,4,0,0,1-5.66,5.66L128,157.66l-21.17,21.17a4,4,0,0,1-5.66-5.66L122.34,152l-21.17-21.17a4,4,0,1,1,5.66-5.66L128,146.34l21.17-21.17a4,4,0,1,1,5.66,5.66Z"></path> + }.into_any(), + IconWeight::Bold => view! { + <path d="M160.49,136.49,145,152l15.52,15.51a12,12,0,0,1-17,17L128,169l-15.51,15.52a12,12,0,0,1-17-17L111,152,95.51,136.49a12,12,0,1,1,17-17L128,135l15.51-15.52a12,12,0,1,1,17,17ZM228,48V208a20,20,0,0,1-20,20H48a20,20,0,0,1-20-20V48A20,20,0,0,1,48,28H68V24a12,12,0,0,1,24,0v4h72V24a12,12,0,0,1,24,0v4h20A20,20,0,0,1,228,48ZM52,52V76H204V52H188a12,12,0,0,1-24,0H92a12,12,0,0,1-24,0ZM204,204V100H52V204Z"></path> + }.into_any(), + IconWeight::Light => view! { + <path d="M208,34H182V24a6,6,0,0,0-12,0V34H86V24a6,6,0,0,0-12,0V34H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V48A14,14,0,0,0,208,34ZM48,46H74V56a6,6,0,0,0,12,0V46h84V56a6,6,0,0,0,12,0V46h26a2,2,0,0,1,2,2V82H46V48A2,2,0,0,1,48,46ZM208,210H48a2,2,0,0,1-2-2V94H210V208A2,2,0,0,1,208,210Zm-51.76-77.76L136.48,152l19.76,19.76a6,6,0,1,1-8.48,8.48L128,160.48l-19.76,19.76a6,6,0,0,1-8.48-8.48L119.52,152,99.76,132.24a6,6,0,1,1,8.48-8.48L128,143.52l19.76-19.76a6,6,0,1,1,8.48,8.48Z"></path> + }.into_any(), + IconWeight::Regular => view! { + <path d="M208,32H184V24a8,8,0,0,0-16,0v8H88V24a8,8,0,0,0-16,0v8H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM72,48v8a8,8,0,0,0,16,0V48h80v8a8,8,0,0,0,16,0V48h24V80H48V48ZM208,208H48V96H208V208Zm-50.34-74.34L139.31,152l18.35,18.34a8,8,0,0,1-11.32,11.32L128,163.31l-18.34,18.35a8,8,0,0,1-11.32-11.32L116.69,152,98.34,133.66a8,8,0,0,1,11.32-11.32L128,140.69l18.34-18.35a8,8,0,0,1,11.32,11.32Z"></path> + }.into_any() + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -46,8 +39,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/caret_double_right.rs b/aep-schedule-website/src/frontend/components/icons/caret_double_right.rs index 9acd383aa3d4079d5613daad776f8475de4a273b..83b007a632925446b7293eb02aba464d8e722e2e 100644 --- a/aep-schedule-website/src/frontend/components/icons/caret_double_right.rs +++ b/aep-schedule-website/src/frontend/components/icons/caret_double_right.rs @@ -1,44 +1,37 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn CaretDoubleRight( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(into, default = IconWeight::Regular)] weight: IconWeight, + #[prop(into)] size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { - match weight.get() { + let body = + match weight { IconWeight::Fill => view! { <path d="M221.66,133.66l-80,80A8,8,0,0,1,128,208V147.31L61.66,213.66A8,8,0,0,1,48,208V48a8,8,0,0,1,13.66-5.66L128,108.69V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,221.66,133.66Z"></path> - }.into_view(), -IconWeight::Duotone => view! { - <path d="M136,128,56,208V48Z" opacity="0.2"></path> - <path d="M141.66,122.34l-80-80A8,8,0,0,0,48,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,141.66,122.34ZM64,188.69V67.31L124.69,128Zm157.66-55-80,80a8,8,0,0,1-11.32-11.32L204.69,128,130.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,221.66,133.66Z"></path> -}.into_view(), -IconWeight::Thin => view! { - <path d="M138.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L130.34,128,53.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,138.83,130.83Zm80-5.66-80-80a4,4,0,0,0-5.66,5.66L210.34,128l-77.17,77.17a4,4,0,0,0,5.66,5.66l80-80A4,4,0,0,0,218.83,125.17Z"></path> -}.into_view(), -IconWeight::Bold => view! { - <path d="M144.49,136.49l-80,80a12,12,0,0,1-17-17L119,128,47.51,56.49a12,12,0,0,1,17-17l80,80A12,12,0,0,1,144.49,136.49Zm80-17-80-80a12,12,0,1,0-17,17L199,128l-71.52,71.51a12,12,0,0,0,17,17l80-80A12,12,0,0,0,224.49,119.51Z"></path> -}.into_view(), -IconWeight::Light => view! { - <path d="M140.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L127.51,128,51.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,140.24,132.24Zm80-8.48-80-80a6,6,0,0,0-8.48,8.48L207.51,128l-75.75,75.76a6,6,0,1,0,8.48,8.48l80-80A6,6,0,0,0,220.24,123.76Z"></path> -}.into_view(), -IconWeight::Regular => view! { - <path d="M141.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L124.69,128,50.34,53.66A8,8,0,0,1,61.66,42.34l80,80A8,8,0,0,1,141.66,133.66Zm80-11.32-80-80a8,8,0,0,0-11.32,11.32L204.69,128l-74.35,74.34a8,8,0,0,0,11.32,11.32l80-80A8,8,0,0,0,221.66,122.34Z"></path> -}.into_view() - } - }); + }.into_any(), + IconWeight::Duotone => view! { + <path d="M136,128,56,208V48Z" opacity="0.2"></path> + <path d="M141.66,122.34l-80-80A8,8,0,0,0,48,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,141.66,122.34ZM64,188.69V67.31L124.69,128Zm157.66-55-80,80a8,8,0,0,1-11.32-11.32L204.69,128,130.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,221.66,133.66Z"></path> + }.into_any(), + IconWeight::Thin => view! { + <path d="M138.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L130.34,128,53.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,138.83,130.83Zm80-5.66-80-80a4,4,0,0,0-5.66,5.66L210.34,128l-77.17,77.17a4,4,0,0,0,5.66,5.66l80-80A4,4,0,0,0,218.83,125.17Z"></path> + }.into_any(), + IconWeight::Bold => view! { + <path d="M144.49,136.49l-80,80a12,12,0,0,1-17-17L119,128,47.51,56.49a12,12,0,0,1,17-17l80,80A12,12,0,0,1,144.49,136.49Zm80-17-80-80a12,12,0,1,0-17,17L199,128l-71.52,71.51a12,12,0,0,0,17,17l80-80A12,12,0,0,0,224.49,119.51Z"></path> + }.into_any(), + IconWeight::Light => view! { + <path d="M140.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L127.51,128,51.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,140.24,132.24Zm80-8.48-80-80a6,6,0,0,0-8.48,8.48L207.51,128l-75.75,75.76a6,6,0,1,0,8.48,8.48l80-80A6,6,0,0,0,220.24,123.76Z"></path> + }.into_any(), + IconWeight::Regular => view! { + <path d="M141.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L124.69,128,50.34,53.66A8,8,0,0,1,61.66,42.34l80,80A8,8,0,0,1,141.66,133.66Zm80-11.32-80-80a8,8,0,0,0-11.32,11.32L204.69,128l-74.35,74.34a8,8,0,0,0,11.32,11.32l80-80A8,8,0,0,0,221.66,122.34Z"></path> + }.into_any() + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -46,8 +39,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/download.rs b/aep-schedule-website/src/frontend/components/icons/download.rs index 2621f7207a23c3e0872c2ceca4fe719a8d3db098..9bceace913599d717c88fae3919e6dda3931f362 100644 --- a/aep-schedule-website/src/frontend/components/icons/download.rs +++ b/aep-schedule-website/src/frontend/components/icons/download.rs @@ -1,47 +1,40 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn Download( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(into)] weight: IconWeight, + #[prop(into)] size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { - match weight.get() { + let body = + match weight { IconWeight::Fill => view! { <path d="M74.34,85.66A8,8,0,0,1,85.66,74.34L120,108.69V24a8,8,0,0,1,16,0v84.69l34.34-34.35a8,8,0,0,1,11.32,11.32l-48,48a8,8,0,0,1-11.32,0ZM240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H84.4a4,4,0,0,1,2.83,1.17L111,145A24,24,0,0,0,145,145l23.8-23.8A4,4,0,0,1,171.6,120H224A16,16,0,0,1,240,136Zm-40,32a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"></path> - }.into_view(), -IconWeight::Duotone => view! { - <path - d="M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z" - opacity="0.2" - ></path> - <path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"></path> -}.into_view(), -IconWeight::Thin => view! { - <path d="M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H72a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H184a4,4,0,0,1,0-8h40A12,12,0,0,1,236,136Zm-110.83-5.17a4,4,0,0,0,5.66,0l48-48a4,4,0,1,0-5.66-5.66L132,118.34V24a4,4,0,0,0-8,0v94.34L82.83,77.17a4,4,0,0,0-5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z"></path> -}.into_view(), -IconWeight::Bold => view! { - <path d="M71.51,88.49a12,12,0,0,1,17-17L116,99V24a12,12,0,0,1,24,0V99l27.51-27.52a12,12,0,0,1,17,17l-48,48a12,12,0,0,1-17,0ZM224,116H188a12,12,0,0,0,0,24h32v56H36V140H68a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116Zm-20,52a16,16,0,1,0-16,16A16,16,0,0,0,204,168Z"></path> -}.into_view(), -IconWeight::Light => view! { - <path d="M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H72a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H184a6,6,0,0,1,0-12h40A14,14,0,0,1,238,136Zm-114.24-3.76a6,6,0,0,0,8.48,0l48-48a6,6,0,0,0-8.48-8.48L134,113.51V24a6,6,0,0,0-12,0v89.51L84.24,75.76a6,6,0,0,0-8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z"></path> -}.into_view(), -IconWeight::Regular => view! { - <path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"></path> -}.into_view() - } - }); + }.into_any(), + IconWeight::Duotone => view! { + <path + d="M232,136v64a8,8,0,0,1-8,8H32a8,8,0,0,1-8-8V136a8,8,0,0,1,8-8H224A8,8,0,0,1,232,136Z" + opacity="0.2" + ></path> + <path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"></path> + }.into_any(), + IconWeight::Thin => view! { + <path d="M236,136v64a12,12,0,0,1-12,12H32a12,12,0,0,1-12-12V136a12,12,0,0,1,12-12H72a4,4,0,0,1,0,8H32a4,4,0,0,0-4,4v64a4,4,0,0,0,4,4H224a4,4,0,0,0,4-4V136a4,4,0,0,0-4-4H184a4,4,0,0,1,0-8h40A12,12,0,0,1,236,136Zm-110.83-5.17a4,4,0,0,0,5.66,0l48-48a4,4,0,1,0-5.66-5.66L132,118.34V24a4,4,0,0,0-8,0v94.34L82.83,77.17a4,4,0,0,0-5.66,5.66ZM196,168a8,8,0,1,0-8,8A8,8,0,0,0,196,168Z"></path> + }.into_any(), + IconWeight::Bold => view! { + <path d="M71.51,88.49a12,12,0,0,1,17-17L116,99V24a12,12,0,0,1,24,0V99l27.51-27.52a12,12,0,0,1,17,17l-48,48a12,12,0,0,1-17,0ZM224,116H188a12,12,0,0,0,0,24h32v56H36V140H68a12,12,0,0,0,0-24H32a20,20,0,0,0-20,20v64a20,20,0,0,0,20,20H224a20,20,0,0,0,20-20V136A20,20,0,0,0,224,116Zm-20,52a16,16,0,1,0-16,16A16,16,0,0,0,204,168Z"></path> + }.into_any(), + IconWeight::Light => view! { + <path d="M238,136v64a14,14,0,0,1-14,14H32a14,14,0,0,1-14-14V136a14,14,0,0,1,14-14H72a6,6,0,0,1,0,12H32a2,2,0,0,0-2,2v64a2,2,0,0,0,2,2H224a2,2,0,0,0,2-2V136a2,2,0,0,0-2-2H184a6,6,0,0,1,0-12h40A14,14,0,0,1,238,136Zm-114.24-3.76a6,6,0,0,0,8.48,0l48-48a6,6,0,0,0-8.48-8.48L134,113.51V24a6,6,0,0,0-12,0v89.51L84.24,75.76a6,6,0,0,0-8.48,8.48ZM198,168a10,10,0,1,0-10,10A10,10,0,0,0,198,168Z"></path> + }.into_any(), + IconWeight::Regular => view! { + <path d="M240,136v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V136a16,16,0,0,1,16-16H72a8,8,0,0,1,0,16H32v64H224V136H184a8,8,0,0,1,0-16h40A16,16,0,0,1,240,136Zm-117.66-2.34a8,8,0,0,0,11.32,0l48-48a8,8,0,0,0-11.32-11.32L136,108.69V24a8,8,0,0,0-16,0v84.69L85.66,74.34A8,8,0,0,0,74.34,85.66ZM200,168a12,12,0,1,0-12,12A12,12,0,0,0,200,168Z"></path> + }.into_any() + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -49,8 +42,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/gitlab_logo.rs b/aep-schedule-website/src/frontend/components/icons/gitlab_logo.rs index e58337c2261f6b9506f2a017544fcae8a6e1fae5..1852a3a170cd1b81210e285bfe0d680f433bd3fc 100644 --- a/aep-schedule-website/src/frontend/components/icons/gitlab_logo.rs +++ b/aep-schedule-website/src/frontend/components/icons/gitlab_logo.rs @@ -1,47 +1,41 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn GitlabLogo( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(into)] weight: Signal<IconWeight>, + #[prop(into)] size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { + let body = move || { match weight.get() { IconWeight::Fill => view! { <path d="M230.15,117.1,210.25,41a11.94,11.94,0,0,0-22.79-1.11L169.78,88H86.22L68.54,39.87A11.94,11.94,0,0,0,45.75,41L25.85,117.1a57.19,57.19,0,0,0,22,61l73.27,51.76a11.91,11.91,0,0,0,13.74,0l73.27-51.76A57.19,57.19,0,0,0,230.15,117.1Zm-189.47,7L114.13,176,93.41,190.65,57.09,165A41.06,41.06,0,0,1,40.68,124.11Zm87.32,91-20.73-14.65L128,185.8l20.73,14.64ZM198.91,165l-36.32,25.66L141.87,176l73.45-51.9A41.06,41.06,0,0,1,198.91,165Z"></path> - }.into_view(), + }.into_any(), IconWeight::Duotone => view! { <path d="M220.23,110.84,128,176,35.77,110.84,53.5,43A3.93,3.93,0,0,1,61,42.62L80.65,96h94.7L195,42.62a3.93,3.93,0,0,1,7.53.38Z" opacity="0.2" ></path> <path d="M230.15,117.1,210.25,41a11.94,11.94,0,0,0-22.79-1.11L169.78,88H86.22L68.54,39.87A11.94,11.94,0,0,0,45.75,41L25.85,117.1a57.19,57.19,0,0,0,22,61l73.27,51.76a11.91,11.91,0,0,0,13.74,0l73.27-51.76A57.19,57.19,0,0,0,230.15,117.1ZM58,57.5,73.13,98.76A8,8,0,0,0,80.64,104h94.72a8,8,0,0,0,7.51-5.24L198,57.5l13.07,50L128,166.21,44.9,107.5ZM40.68,124.11,114.13,176,93.41,190.65,57.09,165A41.06,41.06,0,0,1,40.68,124.11Zm87.32,91-20.73-14.65L128,185.8l20.73,14.64ZM198.91,165l-36.32,25.66L141.87,176l73.45-51.9A41.06,41.06,0,0,1,198.91,165Z"></path> -}.into_view(), +}.into_any(), IconWeight::Thin => view! { <path d="M226.27,118.11,206.38,42a7.94,7.94,0,0,0-15.16-.75L172.57,92H83.43L64.78,41.24A7.94,7.94,0,0,0,49.62,42L29.73,118.11a53.16,53.16,0,0,0,20.44,56.68l73.27,51.76a7.9,7.9,0,0,0,9.12,0l73.27-51.76A53.16,53.16,0,0,0,226.27,118.11Zm-169-74L76.89,97.38A4,4,0,0,0,80.64,100h94.72a4,4,0,0,0,3.75-2.62l19.57-53.22,17,65L128,171.11,40.33,109.17Zm-19.84,76,.7-2.7L121.07,176,93.41,195.54,54.78,168.25A45.11,45.11,0,0,1,37.47,120.14ZM128,220l-27.66-19.54L128,180.9l27.66,19.54Zm73.22-51.73-38.63,27.29L134.93,176l82.9-58.56.7,2.7A45.11,45.11,0,0,1,201.22,168.25Z"></path> -}.into_view(), +}.into_any(), IconWeight::Bold => view! { <path d="M234,116.09,214.13,40a15.94,15.94,0,0,0-30.42-1.48L167,84H89L72.29,38.49A15.94,15.94,0,0,0,41.87,40L22,116.09a61.19,61.19,0,0,0,23.57,65.23l73.27,51.77a15.93,15.93,0,0,0,18.36,0l73.27-51.77A61.19,61.19,0,0,0,234,116.09ZM58.61,70.86l10.76,29.28A12,12,0,0,0,80.64,108h94.72a12,12,0,0,0,11.27-7.86l10.76-29.28,9.14,35L128,161.31,49.47,105.83ZM44,131.37,107.2,176l-13.79,9.74-34-24A36.86,36.86,0,0,1,44,131.37Zm84,78.82-13.79-9.75L128,190.7l13.79,9.74Zm68.6-48.47-34,24L148.8,176,212,131.37A36.86,36.86,0,0,1,196.6,161.72Z"></path> -}.into_view(), +}.into_any(), IconWeight::Light => view! { <path d="M228.21,117.61,208.32,41.49a9.94,9.94,0,0,0-19-.93L171.17,90H84.83L66.66,40.56a9.94,9.94,0,0,0-19,.93L27.79,117.61A55.18,55.18,0,0,0,49,176.42l73.27,51.77a9.94,9.94,0,0,0,11.44,0L207,176.42A55.18,55.18,0,0,0,228.21,117.61ZM57.65,50.82,75,98.07A6,6,0,0,0,80.64,102h94.72A6,6,0,0,0,181,98.07l17.36-47.25,15,57.52L128,168.66,42.62,108.34ZM39.38,120.74,117.6,176,93.41,193.1,55.94,166.62A43.1,43.1,0,0,1,39.38,120.74ZM128,217.53l-24.19-17.09L128,183.35l24.19,17.09Zm72.06-50.91L162.59,193.1,138.4,176l78.22-55.26A43.1,43.1,0,0,1,200.06,166.62Z"></path> -}.into_view(), +}.into_any(), IconWeight::Regular => view! { <path d="M230.15,117.1,210.25,41a11.94,11.94,0,0,0-22.79-1.11L169.78,88H86.22L68.54,39.87A11.94,11.94,0,0,0,45.75,41L25.85,117.1a57.19,57.19,0,0,0,22,61l73.27,51.76a11.91,11.91,0,0,0,13.74,0l73.27-51.76A57.19,57.19,0,0,0,230.15,117.1ZM58,57.5,73.13,98.76A8,8,0,0,0,80.64,104h94.72a8,8,0,0,0,7.51-5.24L198,57.5l13.07,50L128,166.21,44.9,107.5ZM40.68,124.11,114.13,176,93.41,190.65,57.09,165A41.06,41.06,0,0,1,40.68,124.11Zm87.32,91-20.73-14.65L128,185.8l20.73,14.64ZM198.91,165l-36.32,25.66L141.87,176l73.45-51.9A41.06,41.06,0,0,1,198.91,165Z"></path> -}.into_view() +}.into_any() } - }); + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -49,8 +43,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/house.rs b/aep-schedule-website/src/frontend/components/icons/house.rs index 05a35bcd8e651d6ba4938e586a60a90dbca9ddfd..10a2b428db4c6072ec4b9420b5647eb6a7b54ef4 100644 --- a/aep-schedule-website/src/frontend/components/icons/house.rs +++ b/aep-schedule-website/src/frontend/components/icons/house.rs @@ -1,47 +1,41 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn House( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(into)] weight: Signal<IconWeight>, + #[prop(into)] size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { + let body = move || { match weight.get() { IconWeight::Fill => view! { <path d="M224,120v96a8,8,0,0,1-8,8H160a8,8,0,0,1-8-8V164a4,4,0,0,0-4-4H108a4,4,0,0,0-4,4v52a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V120a16,16,0,0,1,4.69-11.31l80-80a16,16,0,0,1,22.62,0l80,80A16,16,0,0,1,224,120Z"></path> - }.into_view(), + }.into_any(), IconWeight::Duotone => view! { <path d="M216,120v96H152V152H104v64H40V120a8,8,0,0,1,2.34-5.66l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,216,120Z" opacity="0.2" ></path> <path d="M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"></path> -}.into_view(), +}.into_any(), IconWeight::Thin => view! { <path d="M216.49,111.51l-80-80a12,12,0,0,0-17,0l-80,80A12,12,0,0,0,36,120v96a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V156h40v60a4,4,0,0,0,4,4h64a4,4,0,0,0,4-4V120A12,12,0,0,0,216.49,111.51ZM212,212H156V152a4,4,0,0,0-4-4H104a4,4,0,0,0-4,4v60H44V120a4,4,0,0,1,1.17-2.83l80-80a4,4,0,0,1,5.66,0l80,80A4,4,0,0,1,212,120Z"></path> -}.into_view(), +}.into_any(), IconWeight::Bold => view! { <path d="M222.14,105.85l-80-80a20,20,0,0,0-28.28,0l-80,80A19.86,19.86,0,0,0,28,120v96a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V164h24v52a12,12,0,0,0,12,12h64a12,12,0,0,0,12-12V120A19.86,19.86,0,0,0,222.14,105.85ZM204,204H164V152a12,12,0,0,0-12-12H104a12,12,0,0,0-12,12v52H52V121.65l76-76,76,76Z"></path> -}.into_view(), +}.into_any(), IconWeight::Light => view! { <path d="M217.9,110.1l-80-80a14,14,0,0,0-19.8,0l-80,80A13.92,13.92,0,0,0,34,120v96a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V158h36v58a6,6,0,0,0,6,6h64a6,6,0,0,0,6-6V120A13.92,13.92,0,0,0,217.9,110.1ZM210,210H158V152a6,6,0,0,0-6-6H104a6,6,0,0,0-6,6v58H46V120a2,2,0,0,1,.58-1.42l80-80a2,2,0,0,1,2.84,0l80,80A2,2,0,0,1,210,120Z"></path> -}.into_view(), +}.into_any(), IconWeight::Regular => view! { <path d="M219.31,108.68l-80-80a16,16,0,0,0-22.62,0l-80,80A15.87,15.87,0,0,0,32,120v96a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V160h32v56a8,8,0,0,0,8,8h64a8,8,0,0,0,8-8V120A15.87,15.87,0,0,0,219.31,108.68ZM208,208H160V152a8,8,0,0,0-8-8H104a8,8,0,0,0-8,8v56H48V120l80-80,80,80Z"></path> -}.into_view() +}.into_any() } - }); + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -49,8 +43,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/plus_circle.rs b/aep-schedule-website/src/frontend/components/icons/plus_circle.rs index 5bd91ad0e9502b5bdcc51cf96c606024c2f5245e..e4b1f6b677bd408c38d4108441c842a813406d00 100644 --- a/aep-schedule-website/src/frontend/components/icons/plus_circle.rs +++ b/aep-schedule-website/src/frontend/components/icons/plus_circle.rs @@ -1,53 +1,44 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn PlusCircle( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(default = IconWeight::Regular)] weight: IconWeight, + size: &'static str, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { - match weight.get() { + let body = move || { + match weight { IconWeight::Fill => view! { <path d="M128,24A104,104,0,1,0,232,128,104.13,104.13,0,0,0,128,24Zm40,112H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32a8,8,0,0,1,0,16Z"></path> - }.into_view(), -IconWeight::Duotone => view! { - <path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"></path> - <path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z"></path> -}.into_view(), -IconWeight::Thin => view! { - <path d="M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm44-92a4,4,0,0,1-4,4H132v36a4,4,0,0,1-8,0V132H88a4,4,0,0,1,0-8h36V88a4,4,0,0,1,8,0v36h36A4,4,0,0,1,172,128Z"></path> -}.into_view(), -IconWeight::Bold => view! { - <path d="M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm52-84a12,12,0,0,1-12,12H140v28a12,12,0,0,1-24,0V140H88a12,12,0,0,1,0-24h28V88a12,12,0,0,1,24,0v28h28A12,12,0,0,1,180,128Z"></path> -}.into_view(), -IconWeight::Light => view! { - <path d="M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm46-90a6,6,0,0,1-6,6H134v34a6,6,0,0,1-12,0V134H88a6,6,0,0,1,0-12h34V88a6,6,0,0,1,12,0v34h34A6,6,0,0,1,174,128Z"></path> -}.into_view(), -IconWeight::Regular => view! { - <path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z"></path> -}.into_view() + }.into_any(), + IconWeight::Duotone => view! { + <path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"></path> + <path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z"></path> + }.into_any(), + IconWeight::Thin => view! { + <path d="M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm44-92a4,4,0,0,1-4,4H132v36a4,4,0,0,1-8,0V132H88a4,4,0,0,1,0-8h36V88a4,4,0,0,1,8,0v36h36A4,4,0,0,1,172,128Z"></path> + }.into_any(), + IconWeight::Bold => view! { + <path d="M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm52-84a12,12,0,0,1-12,12H140v28a12,12,0,0,1-24,0V140H88a12,12,0,0,1,0-24h28V88a12,12,0,0,1,24,0v28h28A12,12,0,0,1,180,128Z"></path> + }.into_any(), + IconWeight::Light => view! { + <path d="M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm46-90a6,6,0,0,1-6,6H134v34a6,6,0,0,1-12,0V134H88a6,6,0,0,1,0-12h34V88a6,6,0,0,1,12,0v34h34A6,6,0,0,1,174,128Z"></path> + }.into_any(), + IconWeight::Regular => view! { + <path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H136v32a8,8,0,0,1-16,0V136H88a8,8,0,0,1,0-16h32V88a8,8,0,0,1,16,0v32h32A8,8,0,0,1,176,128Z"></path> + }.into_any() } - }); - - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; - let height = size.clone(); + }; view! { <svg xmlns="http://www.w3.org/2000/svg" - width=move || size.get() - height=move || height.get() - fill=color - transform=transform + width=size + height=size + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/sun.rs b/aep-schedule-website/src/frontend/components/icons/sun.rs index 55145bac25906348e10c2d5296563735a55fd534..cccb877a3a70ad4d3b86faeb9d5e1ac7bd215ffd 100644 --- a/aep-schedule-website/src/frontend/components/icons/sun.rs +++ b/aep-schedule-website/src/frontend/components/icons/sun.rs @@ -1,44 +1,38 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn Sun( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(into)] weight: Signal<IconWeight>, + #[prop(into)] size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { + let body = move || { match weight.get() { IconWeight::Fill => view! { <path d="M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"></path> - }.into_view(), + }.into_any(), IconWeight::Duotone => view! { <path d="M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z" opacity="0.2"></path> <path d="M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"></path> -}.into_view(), +}.into_any(), IconWeight::Thin => view! { <path d="M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z"></path> -}.into_view(), +}.into_any(), IconWeight::Bold => view! { <path d="M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z"></path> -}.into_view(), +}.into_any(), IconWeight::Light => view! { <path d="M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z"></path> -}.into_view(), +}.into_any(), IconWeight::Regular => view! { <path d="M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z"></path> -}.into_view() +}.into_any() } - }); + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -46,8 +40,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/sun_horizon.rs b/aep-schedule-website/src/frontend/components/icons/sun_horizon.rs index 5edb7d633063d67e133f05c99615c02b1dae7730..56dee9460eb61ef3e9e213c230a733b98db386dc 100644 --- a/aep-schedule-website/src/frontend/components/icons/sun_horizon.rs +++ b/aep-schedule-website/src/frontend/components/icons/sun_horizon.rs @@ -1,44 +1,38 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn SunHorizon( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(into)] weight: Signal<IconWeight>, + #[prop(into)] size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { + let body = move || { match weight.get() { IconWeight::Fill => view! { <path d="M248,160a8,8,0,0,1-8,8H16a8,8,0,0,1,0-16H56.45a73.54,73.54,0,0,1-.45-8,72,72,0,0,1,144,0,73.54,73.54,0,0,1-.45,8H240A8,8,0,0,1,248,160Zm-40,32H48a8,8,0,0,0,0,16H208a8,8,0,0,0,0-16ZM80.84,59.58a8,8,0,0,0,14.32-7.16l-8-16a8,8,0,0,0-14.32,7.16ZM20.42,103.16l16,8a8,8,0,1,0,7.16-14.31l-16-8a8,8,0,1,0-7.16,14.31ZM216,112a8,8,0,0,0,3.57-.84l16-8a8,8,0,1,0-7.16-14.31l-16,8A8,8,0,0,0,216,112ZM164.42,63.16a8,8,0,0,0,10.74-3.58l8-16a8,8,0,0,0-14.32-7.16l-8,16A8,8,0,0,0,164.42,63.16Z"></path> - }.into_view(), + }.into_any(), IconWeight::Duotone => view! { <path d="M192,144a64.33,64.33,0,0,1-2,16H66a64,64,0,1,1,126-16Z" opacity="0.2"></path> <path d="M240,152H199.55a73.54,73.54,0,0,0,.45-8,72,72,0,0,0-144,0,73.54,73.54,0,0,0,.45,8H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM72,144a56,56,0,1,1,111.41,8H72.59A56.13,56.13,0,0,1,72,144Zm144,56a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16H208A8,8,0,0,1,216,200ZM72.84,43.58a8,8,0,0,1,14.32-7.16l8,16a8,8,0,0,1-14.32,7.16Zm-56,48.84a8,8,0,0,1,10.74-3.57l16,8a8,8,0,0,1-7.16,14.31l-16-8A8,8,0,0,1,16.84,92.42Zm192,15.16a8,8,0,0,1,3.58-10.73l16-8a8,8,0,1,1,7.16,14.31l-16,8a8,8,0,0,1-10.74-3.58Zm-48-55.16,8-16a8,8,0,0,1,14.32,7.16l-8,16a8,8,0,1,1-14.32-7.16Z"></path> -}.into_view(), +}.into_any(), IconWeight::Thin => view! { <path d="M240,156H194.94A68,68,0,1,0,60,144a68.73,68.73,0,0,0,1.06,12H16a4,4,0,0,0,0,8H240a4,4,0,0,0,0-8ZM68,144a60,60,0,1,1,118.79,12H69.21A60.16,60.16,0,0,1,68,144Zm144,56a4,4,0,0,1-4,4H48a4,4,0,0,1,0-8H208A4,4,0,0,1,212,200ZM76.42,41.79a4,4,0,0,1,7.16-3.58l8,16a4,4,0,0,1-7.16,3.58Zm-56,52.42a4,4,0,0,1,5.37-1.79l16,8a4,4,0,0,1-3.58,7.16l-16-8A4,4,0,0,1,20.42,94.21Zm192,11.58a4,4,0,0,1,1.79-5.37l16-8a4,4,0,1,1,3.58,7.16l-16,8a4,4,0,0,1-5.37-1.79Zm-48-51.58,8-16a4,4,0,1,1,7.16,3.58l-8,16a4,4,0,0,1-7.16-3.58Z"></path> -}.into_view(), +}.into_any(), IconWeight::Bold => view! { <path d="M240,148H203.89c.07-1.33.11-2.66.11-4a76,76,0,0,0-152,0c0,1.34,0,2.67.11,4H16a12,12,0,0,0,0,24H240a12,12,0,0,0,0-24ZM76,144a52,52,0,0,1,104,0c0,1.34-.07,2.67-.17,4H76.17C76.07,146.67,76,145.34,76,144Zm144,56a12,12,0,0,1-12,12H48a12,12,0,0,1,0-24H208A12,12,0,0,1,220,200ZM12.62,92.21a12,12,0,0,1,15.17-7.59l12,4a12,12,0,1,1-7.58,22.77l-12-4A12,12,0,0,1,12.62,92.21Zm56-48.41a12,12,0,1,1,22.76-7.59l4,12A12,12,0,1,1,72.62,55.8Zm140,60a12,12,0,0,1,7.59-15.18l12-4a12,12,0,0,1,7.58,22.77l-12,4a12,12,0,0,1-15.17-7.59Zm-48-55.59,4-12a12,12,0,1,1,22.76,7.59l-4,12a12,12,0,1,1-22.76-7.59Z"></path> -}.into_view(), +}.into_any(), IconWeight::Light => view! { <path d="M240,154H197.28a70.91,70.91,0,0,0,.72-10,70,70,0,0,0-140,0,70.91,70.91,0,0,0,.72,10H16a6,6,0,0,0,0,12H240a6,6,0,0,0,0-12ZM70,144a58,58,0,1,1,115.13,10H70.87A58.63,58.63,0,0,1,70,144Zm144,56a6,6,0,0,1-6,6H48a6,6,0,0,1,0-12H208A6,6,0,0,1,214,200ZM74.63,42.69a6,6,0,0,1,10.74-5.37l8,16a6,6,0,0,1-10.74,5.36Zm-56,50.63a6,6,0,0,1,8.05-2.69l16,8a6,6,0,0,1-5.36,10.74l-16-8A6,6,0,0,1,18.63,93.32Zm192,13.36a6,6,0,0,1,2.69-8.05l16-8a6,6,0,1,1,5.36,10.74l-16,8a6,6,0,0,1-8.05-2.69Zm-48-53.36,8-16a6,6,0,0,1,10.74,5.37l-8,16a6,6,0,1,1-10.74-5.36Z"></path> -}.into_view(), +}.into_any(), IconWeight::Regular => view! { <path d="M240,152H199.55a73.54,73.54,0,0,0,.45-8,72,72,0,0,0-144,0,73.54,73.54,0,0,0,.45,8H16a8,8,0,0,0,0,16H240a8,8,0,0,0,0-16ZM72,144a56,56,0,1,1,111.41,8H72.59A56.13,56.13,0,0,1,72,144Zm144,56a8,8,0,0,1-8,8H48a8,8,0,0,1,0-16H208A8,8,0,0,1,216,200ZM72.84,43.58a8,8,0,0,1,14.32-7.16l8,16a8,8,0,0,1-14.32,7.16Zm-56,48.84a8,8,0,0,1,10.74-3.57l16,8a8,8,0,0,1-7.16,14.31l-16-8A8,8,0,0,1,16.84,92.42Zm192,15.16a8,8,0,0,1,3.58-10.73l16-8a8,8,0,1,1,7.16,14.31l-16,8a8,8,0,0,1-10.74-3.58Zm-48-55.16,8-16a8,8,0,0,1,14.32,7.16l-8,16a8,8,0,1,1-14.32-7.16Z"></path> -}.into_view() +}.into_any() } - }); + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -46,8 +40,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/warning_circle.rs b/aep-schedule-website/src/frontend/components/icons/warning_circle.rs index 2e7db7bd3a159ba36e6705b868732f6addbeafcc..75dc967dead88592b40d99de4507c7645cb083fb 100644 --- a/aep-schedule-website/src/frontend/components/icons/warning_circle.rs +++ b/aep-schedule-website/src/frontend/components/icons/warning_circle.rs @@ -1,44 +1,37 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn WarningCircle( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(into, default = IconWeight::Regular)] weight: IconWeight, + #[prop(into)] size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { - match weight.get() { + let body = + match weight { IconWeight::Fill => view! { <path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm-8,56a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm8,104a12,12,0,1,1,12-12A12,12,0,0,1,128,184Z"></path> - }.into_view(), + }.into_any(), IconWeight::Duotone => view! { <path d="M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z" opacity="0.2"></path> <path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"></path> -}.into_view(), +}.into_any(), IconWeight::Thin => view! { <path d="M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm-4-84V80a4,4,0,0,1,8,0v56a4,4,0,0,1-8,0Zm12,36a8,8,0,1,1-8-8A8,8,0,0,1,136,172Z"></path> -}.into_view(), +}.into_any(), IconWeight::Bold => view! { <path d="M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm-12-80V80a12,12,0,0,1,24,0v52a12,12,0,0,1-24,0Zm28,40a16,16,0,1,1-16-16A16,16,0,0,1,144,172Z"></path> -}.into_view(), +}.into_any(), IconWeight::Light => view! { <path d="M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm-6-82V80a6,6,0,0,1,12,0v56a6,6,0,0,1-12,0Zm16,36a10,10,0,1,1-10-10A10,10,0,0,1,138,172Z"></path> -}.into_view(), +}.into_any(), IconWeight::Regular => view! { <path d="M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm-8-80V80a8,8,0,0,1,16,0v56a8,8,0,0,1-16,0Zm20,36a12,12,0,1,1-12-12A12,12,0,0,1,140,172Z"></path> -}.into_view() - } - }); +}.into_any() + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -46,8 +39,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/icons/x.rs b/aep-schedule-website/src/frontend/components/icons/x.rs index 0d3d03e78583d7c53ff49aeda3732ab7bcb2176b..cb32c138caf7a9e46b44faa65822a93c26b529c5 100644 --- a/aep-schedule-website/src/frontend/components/icons/x.rs +++ b/aep-schedule-website/src/frontend/components/icons/x.rs @@ -1,47 +1,40 @@ -//! GENERATED FILE - use super::IconWeight; -use leptos::*; +use leptos::{prelude::*, text_prop::TextProp}; #[component] pub fn X( - #[prop(into, default = MaybeSignal::Static(IconWeight::Regular))] weight: MaybeSignal< - IconWeight, - >, - #[prop(into, default = TextProp::from("1em"))] size: TextProp, + #[prop(into, default = IconWeight::Regular)] weight: IconWeight, + #[prop(into)] size: TextProp, #[prop(into, default = TextProp::from("currentColor"))] color: TextProp, - #[prop(into, default = MaybeSignal::Static(false))] mirrored: MaybeSignal<bool>, #[prop(into, optional)] id: MaybeProp<TextProp>, #[prop(into, optional)] class: MaybeProp<TextProp>, ) -> impl IntoView { - let body = Signal::derive(move || { - match weight.get() { + let body = + match weight { IconWeight::Fill => view! { <path d="M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path> - }.into_view(), + }.into_any(), IconWeight::Duotone => view! { <path d="M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z" opacity="0.2" ></path> <path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path> -}.into_view(), +}.into_any(), IconWeight::Thin => view! { <path d="M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"></path> -}.into_view(), +}.into_any(), IconWeight::Bold => view! { <path d="M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"></path> -}.into_view(), +}.into_any(), IconWeight::Light => view! { <path d="M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"></path> -}.into_view(), +}.into_any(), IconWeight::Regular => view! { <path d="M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"></path> -}.into_view() - } - }); +}.into_any() + }; - let transform = move || if mirrored.get() { "scale(-1, 1)" } else { "" }; let height = size.clone(); view! { @@ -49,8 +42,7 @@ IconWeight::Regular => view! { xmlns="http://www.w3.org/2000/svg" width=move || size.get() height=move || height.get() - fill=color - transform=transform + fill=move || color.get() viewBox="0 0 256 256" id=move || id.get().map(|id| id.get()) class=move || class.get().map(|cls| cls.get()) diff --git a/aep-schedule-website/src/frontend/components/notifications.rs b/aep-schedule-website/src/frontend/components/notifications.rs index a701a7247b6c4cd4ff84a4a47b9502b3c9beec5c..b8adfe645ee3af62e30bd3223e69e1d6ff41799e 100644 --- a/aep-schedule-website/src/frontend/components/notifications.rs +++ b/aep-schedule-website/src/frontend/components/notifications.rs @@ -1,5 +1,5 @@ use aep_schedule_generator::data::group_sigle::SigleGroup; -use leptos::*; +use leptos::{html, prelude::*, task::spawn_local}; use crate::{ backend::{ @@ -14,11 +14,11 @@ pub fn Notifications( modal: ReadSignal<Option<SigleGroup>>, set_modal: WriteSignal<Option<SigleGroup>>, ) -> impl IntoView { - let input_element: NodeRef<html::Input> = create_node_ref(); + let input_element: NodeRef<html::Input> = NodeRef::new(); let on_submit = move |ev: leptos::ev::SubmitEvent| { ev.prevent_default(); - let email = input_element().unwrap().value(); + let email = input_element.get().unwrap().value(); if email.is_empty() { return; } diff --git a/aep-schedule-website/src/frontend/components/options/courses_selector.rs b/aep-schedule-website/src/frontend/components/options/courses_selector.rs index 162309c034e29265833b8980159728a981dc1311..c08030e630ba8f60d30b42391d77c8d03ac11324 100644 --- a/aep-schedule-website/src/frontend/components/options/courses_selector.rs +++ b/aep-schedule-website/src/frontend/components/options/courses_selector.rs @@ -1,34 +1,34 @@ use crate::backend::routes::get_courses; use crate::frontend::components::common::tab::Tab; -use crate::frontend::components::icons::bell_ringing::BellRinging; +// use crate::frontend::components::icons::bell_ringing::BellRinging; use crate::frontend::components::icons::calendar_x::CalendarX; use crate::frontend::components::icons::x::X; use crate::frontend::components::icons::IconWeight; use crate::frontend::components::options::personal::PersonalTimeSelector; use crate::frontend::components::options::search::SearchCourse; -use crate::frontend::pages::generator::SetModal; +// use crate::frontend::pages::generator::SetModal; use crate::frontend::state::reactive_course::ReactiveCourse; use crate::frontend::state::reactive_course::ReactiveCourseType; use crate::frontend::state::OptionState; use aep_schedule_generator::data::group::Group; use aep_schedule_generator::data::group_sigle::GroupType; -use aep_schedule_generator::data::group_sigle::SigleGroup; +// use aep_schedule_generator::data::group_sigle::SigleGroup; use aep_schedule_generator::data::groups::Groups; use compact_str::CompactString; -use leptos::*; +use leptos::prelude::*; #[component] fn GroupsChips<F>( open: RwSignal<bool>, group: Group, - course_sigle: CompactString, - group_type: GroupType, + _course_sigle: CompactString, + _group_type: GroupType, submit: F, ) -> impl IntoView where F: Fn() + Copy + 'static, { - let set_modal = SetModal::from_context(); + // let set_modal = SetModal::from_context(); view! { <div on:pointerdown=move |_| { @@ -82,7 +82,7 @@ where {groups.into_iter().enumerate().map(|(i, group)| { let open = open[i]; view! { - <GroupsChips open group course_sigle=course_sigle.clone() group_type submit/> + <GroupsChips open group _course_sigle=course_sigle.clone() _group_type=group_type submit/> } }).collect_view() } @@ -92,7 +92,7 @@ where #[component] fn CourseTab<F>(course: ReactiveCourse, active_tab: ReadSignal<String>, submit: F) -> impl IntoView where - F: Fn() + Copy + 'static, + F: Fn() + Copy + 'static + Send, { let course_sigle = course.sigle.clone(); view! { @@ -108,7 +108,7 @@ where <h3>"Théorie"</h3> <GroupsSettings groups open=theo_open course_sigle group_type=GroupType::TheoGroup submit/> </div> - }.into_view() + }.into_any() }, ReactiveCourseType::LabOnly { lab_open, lab_groups } => { let groups = lab_groups; @@ -117,7 +117,7 @@ where <h3>"Laboratoire"</h3> <GroupsSettings groups open=lab_open course_sigle=course_sigle.clone() group_type=GroupType::LabGroup submit/> </div> - }.into_view() + }.into_any() }, ReactiveCourseType::Both { theo_open, theo_groups, lab_open, lab_groups } => { let theo_groups = theo_groups; @@ -132,7 +132,7 @@ where <h3>"Laboratoire"</h3> <GroupsSettings groups=lab_groups open=lab_open course_sigle=course_sigle.clone() group_type=GroupType::LabGroup submit/> </div> - }.into_view() + }.into_any() }, ReactiveCourseType::Linked { both_open, theo_groups, lab_groups } => { let groups = theo_groups.merge(lab_groups); @@ -141,7 +141,7 @@ where <h3>"Théorie et laboratoire lié"</h3> <GroupsSettings groups open=both_open course_sigle=course_sigle group_type=GroupType::LabGroup submit/> </div> - }.into_view() + }.into_any() }, } } @@ -153,15 +153,15 @@ where #[component] pub fn CoursesSelector<F>(state: OptionState, submit: F) -> impl IntoView where - F: Fn() + Copy + 'static, + F: Fn() + Copy + 'static + Send, { - let (active_tab, set_active_tab) = create_signal("".to_string()); + let (active_tab, set_active_tab) = signal("".to_string()); let action_courses = state.action_courses; view! { <Await - future=get_courses + future=get_courses() let:courses > <SearchCourse courses=courses.clone() action_courses set_active_tab/> @@ -180,12 +180,14 @@ where let sigle = course.sigle.to_string(); let add_hidden = move || sigle != active_tab.get(); let sigle = course.sigle.to_string(); + let sigle2 = course.sigle.to_string(); + let sigle3 = course.sigle.to_string(); view!{ - <button class="flex items-center py-1 px-2 rounded-xl bg-amber-500 text-black transition" class=("opacity-75", add_hidden) id=&sigle on:pointerdown={ + <button class="flex items-center py-1 px-2 rounded-xl bg-amber-500 text-black transition" class=("opacity-75", add_hidden) id=sigle3 on:pointerdown={ let sigle = sigle.clone(); move |_| set_active_tab.set(sigle.clone()) }> - {&sigle} + {sigle2} <button class="close" on:pointerdown={ let sigle = sigle.clone(); move |_| { @@ -199,7 +201,8 @@ where }); submit(); } - }><X weight=IconWeight::Regular size="16px"/></button> + }> + <X weight=IconWeight::Regular size="16px"/></button> </button> } } diff --git a/aep-schedule-website/src/frontend/components/options/form.rs b/aep-schedule-website/src/frontend/components/options/form.rs index 07d06d665f84e42c238675fa808b997ad2c0a30f..e88fb50da8083d3c4a8c8810ac955ef7b7950c12 100644 --- a/aep-schedule-website/src/frontend/components/options/form.rs +++ b/aep-schedule-website/src/frontend/components/options/form.rs @@ -6,7 +6,7 @@ use crate::frontend::{ pages::generator::FirstGenerationDone, state::OptionState, }; -use leptos::*; +use leptos::prelude::*; #[component] pub fn OptionsForms() -> impl IntoView { @@ -21,7 +21,8 @@ pub fn OptionsForms() -> impl IntoView { state.generate(); }; - create_local_resource(state.action_courses.pending(), move |_| { + Effect::new(move |_| { + state.action_courses.pending().track(); submit(); async move {} }); diff --git a/aep-schedule-website/src/frontend/components/options/optimizations.rs b/aep-schedule-website/src/frontend/components/options/optimizations.rs index 074d7668ec0d922ca363f982eed6a127977c633e..f0541afee3f90092e88f1bb1ff24304d8c75608d 100644 --- a/aep-schedule-website/src/frontend/components/options/optimizations.rs +++ b/aep-schedule-website/src/frontend/components/options/optimizations.rs @@ -4,7 +4,7 @@ use crate::frontend::{ }, state::OptionState, }; -use leptos::*; +use leptos::prelude::*; use std::cmp; fn weight(input: u8) -> IconWeight { @@ -22,10 +22,10 @@ pub fn SelectOptimizations<F>(state: OptionState, submit: F) -> impl IntoView where F: Fn() + Copy + 'static, { - let weight_house = create_memo(move |_| weight(state.day_off.get())); - let weight_early = create_memo(move |_| weight((-cmp::min(0, state.morning.get())) as u8)); - let weight_morning = create_memo(move |_| weight(cmp::max(0, state.morning.get()) as u8)); - let weight_finish = create_memo(move |_| weight(state.finish_early.get())); + let weight_house = Memo::new(move |_| weight(state.day_off.get())); + let weight_early = Memo::new(move |_| weight((-cmp::min(0, state.morning.get())) as u8)); + let weight_morning = Memo::new(move |_| weight(cmp::max(0, state.morning.get()) as u8)); + let weight_finish = Memo::new(move |_| weight(state.finish_early.get())); view! { <div class="three-col"> diff --git a/aep-schedule-website/src/frontend/components/options/personal.rs b/aep-schedule-website/src/frontend/components/options/personal.rs index bcfebc147a438d6c0d9d7049f089458aa0735ef1..fa342b8fd89e032ca2f104853c329c5d2f96c391 100644 --- a/aep-schedule-website/src/frontend/components/options/personal.rs +++ b/aep-schedule-website/src/frontend/components/options/personal.rs @@ -1,5 +1,5 @@ use crate::frontend::components::common::schedule::Schedule; -use leptos::*; +use leptos::{ev, prelude::*}; use web_sys::wasm_bindgen::JsCast; use web_sys::Element; @@ -8,9 +8,9 @@ pub fn PersonalTimeSelector<F>(week: [RwSignal<u64>; 5], submit: F) -> impl Into where F: Fn() + Copy + 'static, { - let (initial, set_initial) = create_signal(None); - let (destination, set_destination) = create_signal((0, 0)); - let (is_positive, set_positive) = create_signal(true); + let (initial, set_initial) = signal(None); + let (destination, set_destination) = signal((0, 0)); + let (is_positive, set_positive) = signal(true); let selection = move || { let Some((initial_x, initial_y)) = initial.get() else { return String::from("display: none;"); diff --git a/aep-schedule-website/src/frontend/components/options/search.rs b/aep-schedule-website/src/frontend/components/options/search.rs index 12a223fc02b06214c21407a7fe82052901fc5239..998049330834fa65cb88d52eb03a2a656780ed18 100644 --- a/aep-schedule-website/src/frontend/components/options/search.rs +++ b/aep-schedule-website/src/frontend/components/options/search.rs @@ -3,7 +3,7 @@ use crate::frontend::{ state::reactive_course::ReactiveCourse, }; use aep_schedule_generator::data::course::CourseName; -use leptos::*; +use leptos::prelude::*; #[component] pub fn SearchCourse( diff --git a/aep-schedule-website/src/frontend/components/options/todo.rs b/aep-schedule-website/src/frontend/components/options/todo.rs index 755e4633f640c3409206c2200dfd7e9617ab6b4a..38c51e0c29c63293948e80bc2708eeddf0d284d2 100644 --- a/aep-schedule-website/src/frontend/components/options/todo.rs +++ b/aep-schedule-website/src/frontend/components/options/todo.rs @@ -2,7 +2,7 @@ use std::cmp::Ordering; use crate::frontend::components::icons::warning_circle::WarningCircle; use crate::frontend::{pages::generator::FirstGenerationDone, state::OptionState}; -use leptos::*; +use leptos::prelude::*; #[component] pub fn Step( diff --git a/aep-schedule-website/src/frontend/components/schedule.rs b/aep-schedule-website/src/frontend/components/schedule.rs index 1aefa4762ead52bf717193422f0da8a233cc0ce0..e7c4cc7f07c6a9c87cb95d529ad8f005e38f5eb9 100644 --- a/aep-schedule-website/src/frontend/components/schedule.rs +++ b/aep-schedule-website/src/frontend/components/schedule.rs @@ -1,4 +1,4 @@ -use std::rc::Rc; +use std::sync::Arc; use crate::frontend::components::common::schedule::{Schedule, ScheduleEvent}; use crate::frontend::components::icons::download::Download; @@ -11,10 +11,10 @@ use aep_schedule_generator::{ }, data::time::{period::Period, week_number::WeekNumber}, }; -use leptos::{html::A, *}; +use leptos::prelude::*; #[component] -pub fn Course<'a>(i: usize, course: &'a TakenCourse) -> impl IntoView { +pub fn Course(i: usize, course: TakenCourse) -> impl IntoView { let theo_group = course.theo_group().map(|g| format!("T: {}", g.number)); let lab_group = course.lab_group().map(|g| format!("L: {}", g.number)); let color_box = match i % 8 { @@ -42,10 +42,10 @@ pub fn Course<'a>(i: usize, course: &'a TakenCourse) -> impl IntoView { } #[component] -fn PeriodEvent<'a>( +fn PeriodEvent( i: usize, - period: &'a Period, - course: &'a TakenCourse, + period: Period, + course: Arc<TakenCourse>, period_type: &'static str, ) -> impl IntoView { let mut location = period.hours.to_string() + " - " + period.room.as_str(); @@ -73,7 +73,7 @@ fn PeriodEvent<'a>( } view! { - <ScheduleEvent period=&period class=class> + <ScheduleEvent period=period class=class> <span>{location}</span> <span>{sigle}</span> </ScheduleEvent> @@ -81,22 +81,28 @@ fn PeriodEvent<'a>( } #[component] -fn CoursePeriods<'a>(i: usize, course: &'a TakenCourse) -> impl IntoView { - match &course.taken_course_type { +fn CoursePeriods(i: usize, course: TakenCourse) -> impl IntoView { + let taken_course_type = course.taken_course_type.clone(); + let course = Arc::new(course); + match taken_course_type { TakenCourseType::TheoOnly { theo_group } => theo_group .periods - .iter() + .into_iter() .map(|p| { - view! {<PeriodEvent i period=&p course=course period_type="T"/>} + let course = Arc::clone(&course); + view! {<PeriodEvent i period=p course period_type="T"/>} }) - .collect_view(), + .collect_view() + .into_any(), TakenCourseType::LabOnly { lab_group } => lab_group .periods - .iter() + .into_iter() .map(|p| { - view! {<PeriodEvent i period=&p course=course period_type="L"/>} + let course = Arc::clone(&course); + view! {<PeriodEvent i period=p course period_type="L"/>} }) - .collect_view(), + .collect_view() + .into_any(), TakenCourseType::Both { theo_group, lab_group, @@ -106,40 +112,44 @@ fn CoursePeriods<'a>(i: usize, course: &'a TakenCourse) -> impl IntoView { lab_group, } => view! { { - theo_group.periods.iter().map(|p| { - view! {<PeriodEvent i period=&p course=course period_type="T"/>} + theo_group.periods.into_iter().map(|p| { + let course = Arc::clone(&course); + view! {<PeriodEvent i period=p course period_type="T"/>} }).collect_view() } { - lab_group.periods.iter().map(|p| { - view! {<PeriodEvent i period=&p course=course period_type="L"/>} + lab_group.periods.into_iter().map(|p| { + let course = Arc::clone(&course); + view! {<PeriodEvent i period=p course period_type="L"/>} }).collect_view() } } - .into_view(), + .into_any(), } } #[component] -pub fn ScheduleComponent(schedule: Schedule, calendar: Rc<Calendar>) -> impl IntoView { +pub fn ScheduleComponent(schedule: Schedule, calendar: Arc<Calendar>) -> impl IntoView { + let courses = schedule.taken_courses.clone(); + let courses2 = schedule.taken_courses.clone(); let schedule2 = schedule.clone(); - let (download, set_download) = create_signal("".to_string()); - let link: NodeRef<A> = create_node_ref(); + let (download, set_download) = signal("".to_string()); + let link = NodeRef::new(); view! { <div class="flex flex-col w-full items-center card p-2"> <a class="hidden" download="cours.ics" href=move || download.get() node_ref=link></a> <table class="cours"> - {schedule.taken_courses.iter().enumerate().map(|(i, c)| view!{<Course i course={c} />}).collect_view()} + {courses.into_iter().enumerate().map(|(i, c)| view!{<Course i course={c} />}).collect_view()} </table> <Schedule last_day=schedule.last_day> - {schedule.taken_courses.iter().enumerate().map(|(i, c)| view!{<CoursePeriods i course=c />}).collect_view()} + {courses2.into_iter().enumerate().map(|(i, c)| view!{<CoursePeriods i course=c />}).collect_view()} </Schedule> <button class="button-download flex" on:pointerdown=move |_| { let ics = calendar.generate_ics(&schedule2); let url = url_escape::encode_fragment(&ics); set_download("data:text/plain;charset=utf-8,".to_string() + &url); - link().unwrap().click(); + link.get().unwrap().click(); }> <Download weight=IconWeight::Regular size="3vh"/> <span>"Télécharger le calendrier de cet horaire"</span> diff --git a/aep-schedule-website/src/frontend/components/schedules.rs b/aep-schedule-website/src/frontend/components/schedules.rs index 91086363bd03e1c36391679781a252895fda4cc4..17f3d96a2c9e9f998337ba84e88fc5834b2171d4 100644 --- a/aep-schedule-website/src/frontend/components/schedules.rs +++ b/aep-schedule-website/src/frontend/components/schedules.rs @@ -1,10 +1,10 @@ -use std::rc::Rc; +use std::sync::Arc; use crate::frontend::components::icons::warning_circle::WarningCircle; use crate::frontend::components::options::todo::Todo; use crate::frontend::state::OptionState; use crate::{backend::routes::get_calendar, frontend::components::schedule::ScheduleComponent}; -use leptos::*; +use leptos::prelude::*; #[component] pub fn SchedulesComponent() -> impl IntoView { @@ -12,25 +12,25 @@ pub fn SchedulesComponent() -> impl IntoView { view! { <Await - future=get_calendar + future=get_calendar() children=move |calendar| { let bad_generation = state.schedule.get().is_empty(); let generated = state.step.get() == 6; match generated && !bad_generation { true => { - let calendar = Rc::new(calendar.clone().unwrap()); + let calendar = Arc::new(calendar.clone().unwrap()); view !{ <For each=move || state.schedule.get() key= |course| course.id children= move |schedule| { - let calendar = Rc::clone(&calendar); + let calendar = Arc::clone(&calendar); view !{ <ScheduleComponent schedule calendar/> } } /> - }.into_view() + }.into_any() }, _ => view ! { <Todo/> @@ -47,7 +47,7 @@ pub fn SchedulesComponent() -> impl IntoView { false => None, } } - }.into_view() + }.into_any() } } /> diff --git a/aep-schedule-website/src/frontend/pages/apropos.rs b/aep-schedule-website/src/frontend/pages/apropos.rs index 04e5edcaf37867c99cef36a8ded1b71f53a748a1..4921cbc00c2ae5de412ef32fac034a51ad4c46aa 100644 --- a/aep-schedule-website/src/frontend/pages/apropos.rs +++ b/aep-schedule-website/src/frontend/pages/apropos.rs @@ -1,4 +1,4 @@ -use leptos::*; +use leptos::prelude::*; #[component] pub fn HomePage() -> impl IntoView { diff --git a/aep-schedule-website/src/frontend/pages/classroom.rs b/aep-schedule-website/src/frontend/pages/classroom.rs index a3576be54d2d2ad56bccb0f8601ab8039dfb4d60..dbb21863e035f008b45f4febe75d1024a85980d4 100644 --- a/aep-schedule-website/src/frontend/pages/classroom.rs +++ b/aep-schedule-website/src/frontend/pages/classroom.rs @@ -7,10 +7,10 @@ use crate::{ }, }; use aep_schedule_generator::data::time::{period::PeriodCourse, week_number::WeekNumber}; -use leptos::*; +use leptos::prelude::*; #[component] -fn PeriodEvent<'a>(i: usize, period_course: &'a PeriodCourse) -> impl IntoView { +fn PeriodEvent(i: usize, period_course: PeriodCourse) -> impl IntoView { let time = period_course.period.hours.to_string(); let sigle = period_course.sigle.to_string(); @@ -26,8 +26,10 @@ fn PeriodEvent<'a>(i: usize, period_course: &'a PeriodCourse) -> impl IntoView { _ => (), } + let period = period_course.period.clone(); + view! { - <ScheduleEvent period=&period_course.period class=class> + <ScheduleEvent period=period class=class> <span>{sigle}</span> <span>{time}</span> </ScheduleEvent> @@ -36,10 +38,10 @@ fn PeriodEvent<'a>(i: usize, period_course: &'a PeriodCourse) -> impl IntoView { #[component] pub fn ClassRoomComponent() -> impl IntoView { - let (periods, set_periods) = create_signal(vec![]); + let (periods, set_periods) = signal(vec![]); let change_classroom = - create_action(|(room, set): &(String, WriteSignal<Vec<PeriodCourse>>)| { + Action::new(|(room, set): &(String, WriteSignal<Vec<PeriodCourse>>)| { let set = *set; let room = room.clone(); async move { @@ -49,7 +51,7 @@ pub fn ClassRoomComponent() -> impl IntoView { } }); - let on_submit = move |sigle: String| change_classroom.dispatch((sigle, set_periods)); + let on_submit = move |sigle: String| {change_classroom.dispatch((sigle, set_periods));}; view! { <section class="flex flex-col w-full justify-between items-center p-4"> <div class="warning-box"> @@ -60,18 +62,18 @@ pub fn ClassRoomComponent() -> impl IntoView { </span> </div> <Await - future=|| get_classrooms() + future=get_classrooms() let:classrooms > {classrooms.as_ref().map(|classrooms| { - let classrooms = classrooms.iter().map(|c| AutoCompleteOption::new(c.to_string(), c.to_string())).collect(); + let classrooms = classrooms.into_iter().map(|c| AutoCompleteOption::new(c.to_string(), c.to_string())).collect(); view!{ <AutoComplete suggestion_list=classrooms placeholder="Local" class="w-96 shadow-2xl border-b-4 border-amber-500 focus:outline-none focus:ring-0" submit=on_submit id="input-classroom"/> } }).ok()} </Await> <Schedule last_day=5 col_height="0.6em"> - {move || periods.get().iter().enumerate().map(|(i, p)| view!{<PeriodEvent i period_course=p/>}).collect_view()} + {move || periods.get().into_iter().enumerate().map(|(i, p)| view!{<PeriodEvent i period_course=p/>}).collect_view()} </Schedule> </section> } diff --git a/aep-schedule-website/src/frontend/pages/generator.rs b/aep-schedule-website/src/frontend/pages/generator.rs index d7fdf57eaef118fbb2b8322d3bb16f3f4ff1effc..bdba42790ecae887bcd4cfb7b370307e47027507 100644 --- a/aep-schedule-website/src/frontend/pages/generator.rs +++ b/aep-schedule-website/src/frontend/pages/generator.rs @@ -3,7 +3,7 @@ use crate::frontend::components::notifications::Notifications; use crate::frontend::components::{options::form::OptionsForms, schedules::SchedulesComponent}; use crate::frontend::state::OptionState; use aep_schedule_generator::data::group_sigle::SigleGroup; -use leptos::*; +use leptos::prelude::*; #[derive(Clone, Copy)] pub struct SetModal(WriteSignal<Option<SigleGroup>>); @@ -19,8 +19,8 @@ pub struct FirstGenerationDone(pub RwSignal<bool>); #[component] pub fn GeneratorPage() -> impl IntoView { - let first_generation_done = create_rw_signal(false); - let (modal, set_modal) = create_signal(None); + let first_generation_done = RwSignal::new(false); + let (modal, set_modal) = signal(None); let state = OptionState::default(); provide_context(state); diff --git a/aep-schedule-website/src/frontend/state/mod.rs b/aep-schedule-website/src/frontend/state/mod.rs index 6904f0a2539c2e0a8171dc7124a1f73a6dd8346e..3657e6b2f435df089c75adbd30c668efdc18440e 100644 --- a/aep-schedule-website/src/frontend/state/mod.rs +++ b/aep-schedule-website/src/frontend/state/mod.rs @@ -4,7 +4,7 @@ use aep_schedule_generator::{ algorithm::{generation::SchedulesOptions, schedule::Schedule, scores::EvaluationOption}, data::time::week::Week, }; -use leptos::*; +use leptos::prelude::*; use reactive_course::ReactiveCourse; use crate::backend::routes::get_course; @@ -100,9 +100,9 @@ impl OptionState { impl Default for OptionState { fn default() -> Self { - let stored_courses: StoredValue<Vec<ReactiveCourse>> = store_value(vec![]); + let stored_courses: StoredValue<Vec<ReactiveCourse>> = StoredValue::new(vec![]); - let action_courses = create_action(move |sigle: &String| { + let action_courses = Action::new(move |sigle: &String| { let sigle = sigle.clone(); async move { if let Ok(c) = get_course(sigle).await { @@ -121,17 +121,17 @@ impl Default for OptionState { Self { stored_courses, action_courses, - max_nb_conflicts: create_rw_signal(0), - week: std::array::from_fn(|_i| create_rw_signal(0)), - day_off: create_rw_signal(3), - morning: create_rw_signal(1), - finish_early: create_rw_signal(1), - section_error: create_rw_signal("".to_string()), - personal_error: create_rw_signal("".to_string()), - step: create_rw_signal(0), - schedule: create_rw_signal(vec![]), - hide: create_rw_signal(false), - max_size: store_value(AtomicUsize::from(8)), + max_nb_conflicts: RwSignal::new(0), + week: std::array::from_fn(|_i| RwSignal::new(0)), + day_off: RwSignal::new(3), + morning: RwSignal::new(1), + finish_early: RwSignal::new(1), + section_error: RwSignal::new("".to_string()), + personal_error: RwSignal::new("".to_string()), + step: RwSignal::new(0), + schedule: RwSignal::new(vec![]), + hide: RwSignal::new(false), + max_size: StoredValue::new(AtomicUsize::from(8)), } } } diff --git a/aep-schedule-website/src/frontend/state/reactive_course.rs b/aep-schedule-website/src/frontend/state/reactive_course.rs index 3e6b0648cc46624e267b2f23da6326722139bc16..2bda6cd3c0712f90c152089c7b4a858b7aed12a2 100644 --- a/aep-schedule-website/src/frontend/state/reactive_course.rs +++ b/aep-schedule-website/src/frontend/state/reactive_course.rs @@ -1,6 +1,6 @@ use aep_schedule_generator::data::{course::Course, course_type::CourseType, groups::Groups}; use compact_str::CompactString; -use leptos::*; +use leptos::prelude::*; #[derive(Clone, Debug)] pub enum ReactiveCourseType { diff --git a/aep-schedule-website/src/lib.rs b/aep-schedule-website/src/lib.rs index d0e2c0854d23649b747b6a62c7c082f9eb884b28..da5d16113641118c50e3441dcda8826c8a4adc3a 100644 --- a/aep-schedule-website/src/lib.rs +++ b/aep-schedule-website/src/lib.rs @@ -3,7 +3,7 @@ pub mod backend; pub mod frontend; cfg_if::cfg_if! { if #[cfg(feature = "hydrate")] { - use leptos::*; + use leptos::prelude::*; use wasm_bindgen::prelude::wasm_bindgen; use crate::frontend::app::App; diff --git a/aep-schedule-website/src/main.rs b/aep-schedule-website/src/main.rs index 7f2f1bf57fea1e14d7178a0a9f51d369d9f6f20f..ae90c0ac74427ac0e8ff5d77daed9ec4ca160a50 100644 --- a/aep-schedule-website/src/main.rs +++ b/aep-schedule-website/src/main.rs @@ -5,7 +5,7 @@ cfg_if::cfg_if!(if #[cfg(feature = "ssr")] { }; use std::future::IntoFuture; use leptos_axum::{generate_route_list, LeptosRoutes}; - use leptos::*; + use leptos::prelude::*; use tower_http::compression::CompressionLayer; use aep_schedule_website::backend::fileserv::file_and_error_handler; use aep_schedule_website::frontend::app::App;