diff --git a/Cargo.lock b/Cargo.lock index 87faa22..5b12046 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" dependencies = [ "memchr", ] @@ -61,9 +61,9 @@ checksum = "cfa8873f51c92e232f9bac4065cddef41b714152812bfc5f7672ba16d6ef8cd9" [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" [[package]] name = "bytes" @@ -101,9 +101,9 @@ dependencies = [ [[package]] name = "chrono-tz" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa48fa079165080f11d7753fd0bc175b7d391f276b965fe4b55bfad67856e463" +checksum = "cf9cc2b23599e6d7479755f3594285efb3f74a1bdca7a7374948bc831e23a552" dependencies = [ "chrono", "chrono-tz-build", @@ -143,15 +143,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cxx" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -161,9 +161,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -171,24 +171,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn", + "syn 2.0.15", ] [[package]] name = "cxxbridge-flags" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.92" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -255,9 +255,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -269,9 +269,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -279,44 +279,44 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-io" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -332,9 +332,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if", "js-sys", @@ -513,9 +513,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.16" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d" +checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" dependencies = [ "bytes", "fnv", @@ -581,9 +581,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.25" +version = "0.14.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc5e554ff619822309ffd57d8734d77cd5ce6238bc956f037ea06c58238c9899" +checksum = "ab302d72a6f11a3b910431ff93aae7e773078c769f0a3ef15fb9ec692ed147d4" dependencies = [ "bytes", "futures-channel", @@ -618,16 +618,16 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows", ] [[package]] @@ -661,9 +661,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown", @@ -683,9 +683,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" [[package]] name = "itertools" @@ -752,9 +752,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.140" +version = "0.2.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c" +checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" [[package]] name = "link-cplusplus" @@ -791,9 +791,9 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "mime" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" @@ -938,7 +938,7 @@ checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -977,7 +977,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c8646e95016a7a6c4adea95bafa8a16baab64b583356217f2c85db4a39d9a86" dependencies = [ "proc-macro2", - "syn", + "syn 1.0.109", ] [[package]] @@ -989,7 +989,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "version_check", ] @@ -1006,9 +1006,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.52" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -1071,9 +1071,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.1" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" dependencies = [ "aho-corasick", "memchr", @@ -1082,15 +1082,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.28" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" [[package]] name = "reqwest" -version = "0.11.14" +version = "0.11.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" +checksum = "27b71749df584b7f4cac2c426c127a7c785a5106cc98f7a8feb044115f0fa254" dependencies = [ "base64", "bytes", @@ -1222,9 +1222,9 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.156" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "314b5b092c0ade17c00142951e50ced110ec27cea304b1037c6969246c2469a4" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" dependencies = [ "serde_derive", ] @@ -1242,20 +1242,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.156" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7e29c4601e36bcec74a223228dce795f4cd3616341a4af93520ca1a837c087d" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", @@ -1346,7 +1346,7 @@ dependencies = [ "quote", "serde", "serde_derive", - "syn", + "syn 1.0.109", ] [[package]] @@ -1362,7 +1362,7 @@ dependencies = [ "serde_derive", "serde_json", "sha1", - "syn", + "syn 1.0.109", ] [[package]] @@ -1414,7 +1414,7 @@ dependencies = [ "proc-macro2", "quote", "stylist-core", - "syn", + "syn 1.0.109", ] [[package]] @@ -1428,6 +1428,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "2.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "termcolor" version = "1.2.0" @@ -1439,22 +1450,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c" +checksum = "978c9a314bd8dc99be594bc3c175faaa9794be04a5a5e153caba6915336cebac" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.39" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e" +checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -1491,14 +1502,13 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.26.0" +version = "1.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64" +checksum = "d0de47a4eecbe11f498978a9b29d792f0d2692d1dd003650c24c76510e3bc001" dependencies = [ "autocfg", "bytes", "libc", - "memchr", "mio", "num_cpus", "pin-project-lite", @@ -1562,13 +1572,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -1597,9 +1607,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.11" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524b68aca1d05e03fdf03fcdce2c6c94b6daf6d16861ddaa7e4f2b6638a9052c" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" @@ -1641,9 +1651,9 @@ dependencies = [ [[package]] name = "uuid" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" +checksum = "5b55a3fef2a1e3b3a00ce878640918820d3c51081576ac657d23af9fc7928fdb" dependencies = [ "getrandom", "rand", @@ -1654,13 +1664,13 @@ dependencies = [ [[package]] name = "uuid-macro-internal" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b300a878652a387d2a0de915bdae8f1a548f0c6d45e072fe2688794b656cc9" +checksum = "20e8a505384e9309dc842520c6c9348f4b141dee06aaa845522727b1b99ca235" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.15", ] [[package]] @@ -1712,7 +1722,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-shared", ] @@ -1746,7 +1756,7 @@ checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -1828,13 +1838,22 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + [[package]] name = "windows-sys" version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", ] [[package]] @@ -1843,13 +1862,28 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", +] + +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", ] [[package]] @@ -1858,42 +1892,84 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + [[package]] name = "windows_i686_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + [[package]] name = "windows_i686_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + [[package]] name = "winreg" version = "0.10.1" @@ -1940,7 +2016,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] @@ -1969,7 +2045,7 @@ checksum = "89b249cdb39e0cddaf0644dedc781854524374664793479fdc01e6a65d6e6ae3" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 1.0.109", ] [[package]] diff --git a/css/components/mediapicker.css b/css/components/mediapicker.css index 9171b72..95040b8 100644 --- a/css/components/mediapicker.css +++ b/css/components/mediapicker.css @@ -34,7 +34,7 @@ right: 25px; top: 10px; - color: grey; + color: red; font-size: 18px; width: fit-content; height: fit-content; diff --git a/src/components/dropdown.rs b/src/components/dropdown.rs index f8091ac..73549a2 100644 --- a/src/components/dropdown.rs +++ b/src/components/dropdown.rs @@ -1,50 +1,8 @@ use std::fmt::Display; -use jl_types::domain::option_wrapper::OptionWrapper; use yew::prelude::*; use yew_utils::vdom::comp_with; -/// Give this component a list of options -#[function_component(DropDown)] -pub fn dropdown( - props: &DropDownProps, -) -> Html { - let selection_changed_cb = { - let onchange_cb = props.onchange.clone(); - let selected = props.selected.clone(); - Callback::from(move |option: OptionWrapper| { - selected.set(option.option.clone()); - match onchange_cb.clone() { - Some(additional_cb) => additional_cb.emit(option), - None => {} - }; - }) - }; - let drop_down = comp_with::>>( - yew_utils::components::drop_down::DropDownProps { - initial: { OptionWrapper::new((*props.selected).clone()) }, - options: { - let mut options: Vec> = props - .options - .clone() - .into_iter() - .map(|option| OptionWrapper::new(Some(option))) - .collect(); - if props.has_none { - options.insert(0, OptionWrapper::new(None)); - } - options - }, - selection_changed: selection_changed_cb.clone(), - class_css: Some("admin-dropdown".into()), - }, - ); - //if (*props.selected).is_none() {selection_changed_cb.emit( OptionWrapper::new((*props.selected).clone()));} - html! { - {drop_down} - } -} - #[derive(PartialEq, Properties, Clone)] pub struct DropDownProps { #[prop_or_default] @@ -54,7 +12,40 @@ pub struct DropDownProps { #[prop_or_default] pub unpicked_text: String, #[prop_or_default] - pub onchange: Option>>, - #[prop_or_default] - pub has_none: bool, + pub onchange: Option>>, } + + + +#[function_component(DropDown)] +pub fn dropdown( + props: &DropDownProps, +) -> Html { + let drop_down = comp_with::>( + yew_utils::components::drop_down::DropDownProps { + initial: props.selected.clone(), + options: { + let mut options: Vec> = props + .options + .clone() + .into_iter() + .map(|option| Some(option)) + .collect(); + + options.insert(0, None); + + options + }, + selection_changed: match props.onchange.clone() { + Some(cb) => cb, + None => Callback::from(|_| {}) + }, + class_css: Some("admin-dropdown".into()), + none_str: props.unpicked_text.clone() + }, + ); + //if (*props.selected).is_none() {selection_changed_cb.emit( OptionWrapper::new((*props.selected).clone()));} + html! { + {drop_down} + } +} \ No newline at end of file diff --git a/src/components/single_media_picker.rs b/src/components/single_media_picker.rs index 4ccda47..7566ae5 100644 --- a/src/components/single_media_picker.rs +++ b/src/components/single_media_picker.rs @@ -18,8 +18,8 @@ pub struct SingleMediaPickerProps { #[function_component(SingleMediaPicker)] pub fn single_media_picker(props: &SingleMediaPickerProps) -> Html { - let picked_handle = use_state(|| false); - + let picked_handle = use_state_eq(|| false); + picked_handle.set(!(*props.value).clone().is_empty()); let onphoto_upload = { let value_handle = props.value.clone(); let onchange_cb = props.onchange.clone(); @@ -78,11 +78,13 @@ pub fn single_media_picker(props: &SingleMediaPickerProps) -> Html {
cb.emit(String::new()), None => {} }; + value_handle.set(String::new()); picked_handle.set(false); }) }> diff --git a/src/pages/admin/fields/agent.rs b/src/pages/admin/fields/agent.rs index acf34b9..e98c0ed 100644 --- a/src/pages/admin/fields/agent.rs +++ b/src/pages/admin/fields/agent.rs @@ -2,7 +2,7 @@ use jl_types::domain::{agent::Agent, credential::CredentialType}; use yew::prelude::*; use yew_router::prelude::use_navigator; -use crate::{pages::admin::edit::{EditType}, components::{textfield::TextField, media_picker::MediaPicker, dropdown::DropDown, single_media_picker::SingleMediaPicker}, }; +use crate::{pages::admin::edit::{EditType}, components::{textfield::TextField, dropdown::DropDown, single_media_picker::SingleMediaPicker}, }; #[derive(Properties, PartialEq, Clone)] pub struct AgentFieldsProps { @@ -12,7 +12,7 @@ pub struct AgentFieldsProps { #[function_component(AgentFields)] pub fn agent_fields(props: &AgentFieldsProps) -> Html { - let navigator = use_navigator().unwrap(); + let _navigator = use_navigator().unwrap(); let user_typed = use_state(|| false); let agent_opt = props.agent.clone(); @@ -22,19 +22,86 @@ pub fn agent_fields(props: &AgentFieldsProps) -> Html { user_typed.set(true); }) }; + let onselect_cb = { + let user_typed = user_typed.clone(); + Callback::from(move |_| { + user_typed.set(true); + }) + }; // Fields - let agent_name_handle = use_state(|| String::new()); - let agent_shortcode_handle = use_state(|| String::new()); - let profile_picture_url_handle = use_state(|| String::new()); - let credential = use_state(|| String::new()); - let credential_type = use_state(|| CredentialType::PhoneNumber); + let agent_name_handle = use_state_eq(|| String::new()); + let agent_shortcode_handle = use_state_eq(|| String::new()); + let profile_picture_url_handle = use_state_eq(|| String::new()); + let credential_handle = use_state_eq(|| String::new()); + let credential_type = use_state_eq(|| Some(CredentialType::PhoneNumber)); + + // Fields definition & Update on value recieved + if !*user_typed { + agent_name_handle.set(match agent_opt.clone() { + Some(agent) => agent.full_name, + None => String::new(), + }); + agent_shortcode_handle.set(match agent_opt.clone() { + Some(agent) => agent.shortcode, + None => String::new(), + }); + profile_picture_url_handle.set(match agent_opt.clone() { + Some(agent) => { + agent.profile_picture_url + }, + None => String::new(), + }); + credential_type.set(match agent_opt.clone() { + Some(agent) => Some(agent.credential_type), + None => None + }); + credential_handle.set(match agent_opt.clone() { + Some(agent) => agent.credential, + None => String::new(), + }); + } + let update_button_onclick = { + Callback::from(move |_: MouseEvent| { + + }) + }; html! { <> - - // - ///> + + + {if (*credential_type).clone() == Some(CredentialType::PhoneNumber) { + html! { +
+
{"Tipo de Credencial"}
+ selected={credential_type} options={vec![CredentialType::Email, CredentialType::PhoneNumber]} onchange={onselect_cb}/> +
+ } + } else { + html! { +
+
{"Tipo de Credencial"}
+ selected={credential_type} options={vec![CredentialType::Email, CredentialType::PhoneNumber]} onchange={onselect_cb}/> +
+ } + + }} + + + +
+
{"Código de agente"}
+
{match agent_opt { + Some(agent) => agent.shortcode, + None => String::from("Ninguno") + }}
+
+ +
+ {"Actualizar"} +
+ } } \ No newline at end of file diff --git a/src/pages/admin/fields/project.rs b/src/pages/admin/fields/project.rs index b72c7e9..34a733f 100644 --- a/src/pages/admin/fields/project.rs +++ b/src/pages/admin/fields/project.rs @@ -101,7 +101,7 @@ pub fn generate_fields_for_project(props: &ProjectFieldsProps) -> Html { project_state.set(match listing_opt.clone() { Some(listing) => Some(listing.project.project_state), None => { - Some(ProjectState::InConstruction) + None }, }); project_condition.set(match listing_opt.clone() { diff --git a/src/pages/search.rs b/src/pages/search.rs index 8d4af15..4b0b134 100644 --- a/src/pages/search.rs +++ b/src/pages/search.rs @@ -4,26 +4,19 @@ use jl_types::{ }, dto::{filters::Filter, project_card::ProjectCardDto}, }; -use log::info; use yew::prelude::*; -use yew_utils::{ - components::drop_down::{DropDown, DropDownProps}, - vdom::comp_with, -}; use crate::{ api::backend::{ get_all_cities, get_all_districts_in_city, get_all_projects_with_filters_paged, }, - components::{footer::PageFooter, nav_bar::NavigationBar, project_card::ProjectCard}, + components::{footer::PageFooter, nav_bar::NavigationBar, project_card::ProjectCard, dropdown::DropDown}, }; -use jl_types::domain::option_wrapper::OptionWrapper; #[function_component(SearchPage)] pub fn search_page() -> Html { - // let force_update_trigger = use_force_update(); - let cities_handle = use_state(|| Vec::from([OptionWrapper::new(None)])); - let districts_handle = use_state(|| Vec::from([OptionWrapper::new(None)])); + let cities_handle = use_state(|| Vec::from([])); + let districts_handle = use_state(|| Vec::from([])); let search_results_handle: UseStateHandle> = use_state(|| Vec::new()); let page_counter: UseStateHandle = use_state(|| 1); let finished_loading = use_state(|| false); @@ -38,11 +31,10 @@ pub fn search_page() -> Html { wasm_bindgen_futures::spawn_local(async move { match get_all_cities().await { Ok(cities) => { - let mut cities: Vec> = cities + let cities: Vec = cities .into_iter() - .map(|location| OptionWrapper::new(Some(location))) + .map(|location| location) .collect(); - cities.insert(0, OptionWrapper::new(None)); cities_handle.set(cities); } Err(error) => log::error!("Error in loading cities: {error}"), @@ -63,143 +55,19 @@ pub fn search_page() -> Html { }); // Dropdown - let project_type_filter: UseStateHandle> = - use_state(|| OptionWrapper::new(None)); + let project_type_filter: UseStateHandle> = + use_state(|| None); // Dropdown - let project_condition_filter: UseStateHandle> = - use_state(|| OptionWrapper::new(None)); + let project_condition_filter: UseStateHandle> = + use_state(|| None); // Dropdown - // let project_state_filter: UseStateHandle> = use_state(|| OptionWrapper::new(Some(props.project_state.clone()))); + let project_city_filter: UseStateHandle> = + use_state(|| None); // Dropdown - let project_city_filter: UseStateHandle> = - use_state(|| OptionWrapper::new(None)); - // Dropdown - let project_district_filter: UseStateHandle> = - use_state(|| OptionWrapper::new(None)); - let unit_rooms_filter: UseStateHandle> = - use_state(|| OptionWrapper::new(None)); - //TODO: Think about price filtering - /*// TextField - let _project_min_price_filter: UseStateHandle> = use_state(|| OptionWrapper::new(None)); - // TextField - let _project_max_price_filter: UseStateHandle> = use_state(|| OptionWrapper::new(None));*/ - - let project_type_drop_down = comp_with::>>(DropDownProps { - initial: OptionWrapper::new(None), - options: vec![ - OptionWrapper::new(None), - OptionWrapper::new(Some(ProjectType::Apartamento)), - OptionWrapper::new(Some(ProjectType::Casa)), - OptionWrapper::new(Some(ProjectType::Oficina)), - OptionWrapper::new(Some(ProjectType::Local)), - OptionWrapper::new(Some(ProjectType::Solar)), - ], - selection_changed: { - let cloned_project_type_filter = project_type_filter.clone(); - Callback::from(move |project_type: OptionWrapper| { - info!("{}", project_type.to_string()); - cloned_project_type_filter.set(project_type) - }) - }, - class_css: Some("project-search-filter-item".into()), - }); - - /* - // TODO: Fix ProjectState tostring printing the db insertable - let project_state_drop_down = comp_with::>>(DropDownProps { - initial: (*project_state_filter).clone(), - options: vec![OptionWrapper::new(Some(ProjectState::InConstruction)), OptionWrapper::new(Some(ProjectState::Finished)) ], - selection_changed: { - let cloned_project_state_filter = project_state_filter.clone(); - Callback::from(move |project_state: OptionWrapper| { - info!("{}", project_state.to_string()); - cloned_project_state_filter.set(project_state) - } - )}, - class_css: Some("project-search-filter-item".into()) - });*/ - - let project_condition_drop_down = - comp_with::>>(DropDownProps { - initial: OptionWrapper::new(None), - options: vec![ - OptionWrapper::new(None), - OptionWrapper::new(Some(ProjectCondition::New)), - OptionWrapper::new(Some(ProjectCondition::Resale)), - ], - selection_changed: { - let cloned_project_condition_filter = project_condition_filter.clone(); - Callback::from(move |project_condition: OptionWrapper| { - info!("{}", project_condition.to_string()); - cloned_project_condition_filter.set(project_condition) - }) - }, - class_css: Some("project-search-filter-item".into()), - }); - - let project_city_drop_down = comp_with::>>(DropDownProps { - initial: OptionWrapper::new(None), - options: (*cities_handle).clone(), - selection_changed: { - let cloned_project_city_filter = project_city_filter.clone(); - let districts_handle = districts_handle.clone(); - - Callback::from(move |project_city: OptionWrapper| { - let districts_handle = districts_handle.clone(); - cloned_project_city_filter.set(project_city.clone()); - wasm_bindgen_futures::spawn_local(async move { - match get_all_districts_in_city(&project_city.to_string()).await { - Ok(districts) => { - let mut districts_vec: Vec> = districts - .into_iter() - .map(|district| OptionWrapper::new(Some(district))) - .collect(); - districts_vec.insert(0, OptionWrapper::new(None)); - districts_handle.set(districts_vec); - } - Err(error) => log::error!("Error in dropdown callback: {}", error), - }; - }); - }) - }, - class_css: Some("project-search-filter-item".into()), - }); - - let project_district_drop_down = comp_with::>>(DropDownProps { - initial: OptionWrapper::new(None), - options: (*districts_handle).clone(), - selection_changed: { - let cloned_project_district_filter = project_district_filter.clone(); - Callback::from(move |project_district: OptionWrapper| { - cloned_project_district_filter.set(project_district) - }) - }, - class_css: Some("project-search-filter-item".into()), - }); - - let unit_room_amount_drop_down = comp_with::>>(DropDownProps { - initial: OptionWrapper::new(None), - options: vec![ - OptionWrapper::new(None), - OptionWrapper::new(Some(1)), - OptionWrapper::new(Some(2)), - OptionWrapper::new(Some(3)), - OptionWrapper::new(Some(4)), - OptionWrapper::new(Some(5)), - OptionWrapper::new(Some(6)), - OptionWrapper::new(Some(7)), - OptionWrapper::new(Some(8)), - OptionWrapper::new(Some(9)), - OptionWrapper::new(Some(10)), - ], - selection_changed: { - let unit_rooms_filter = unit_rooms_filter.clone(); - Callback::from(move |unit_room_amount: OptionWrapper| { - unit_rooms_filter.set(unit_room_amount) - }) - }, - class_css: Some("project-search-filter-item".into()), - }); + let project_district_filter: UseStateHandle> = + use_state(|| None); + let unit_rooms_filter: UseStateHandle> = + use_state(|| None); let search_onclick = { let search_results_handle = search_results_handle.clone(); @@ -209,7 +77,7 @@ pub fn search_page() -> Html { let project_city_filter = project_city_filter.clone(); let project_district_filter = project_district_filter.clone(); let project_state_filter = project_state_filter_handle.clone(); - + let unit_rooms_filter = unit_rooms_filter.clone(); Callback::from(move |_| { let mut filters = Vec::new(); if (*project_state_filter).eq(&ProjectState::Finished) { @@ -217,27 +85,27 @@ pub fn search_page() -> Html { } else { filters.push(Filter::InConstruction); } - match &(*project_type_filter).option { + match &(*project_type_filter) { Some(project_type) => filters.push(Filter::ByProjectType(project_type.clone())), None => {} }; - match &(*project_condition_filter).option { + match &(*project_condition_filter) { Some(project_condition) => { filters.push(Filter::ByProjectCondition(project_condition.clone())) } None => {} }; - match &(*project_city_filter).option { + match &(*project_city_filter) { Some(project_city) => filters.push(Filter::InCity(project_city.clone())), None => {} }; - match &(*project_district_filter).option { + match &(*project_district_filter) { Some(project_district) => { filters.push(Filter::InDistrict(project_district.clone())) } None => {} }; - match &(*unit_rooms_filter).option { + match &(*unit_rooms_filter) { Some(rooms_filter) => filters.push(Filter::ByRoomCount(*rooms_filter as i32)), None => {} }; @@ -295,7 +163,13 @@ pub fn search_page() -> Html {
{"Tipo de Proyecto"}
- {project_type_drop_down} + selected={project_type_filter.clone()} unpicked_text={String::from("Todos")} onchange={ + let cloned_project_type_filter = project_type_filter.clone(); + Callback::from(move |project_type: Option| { + cloned_project_type_filter.set(project_type) + })} + options={ vec![ProjectType::Apartamento, ProjectType::Casa, ProjectType::Oficina, ProjectType::Local, ProjectType::Solar] + } />
/*
@@ -309,28 +183,63 @@ pub fn search_page() -> Html {
{"Condición de Proyecto"}
- {project_condition_drop_down} + selected={project_condition_filter.clone()} unpicked_text={String::from("Todos")} onchange={ + let cloned_project_condition_filter = project_condition_filter.clone(); + Callback::from(move |project_condition: Option| { + cloned_project_condition_filter.set(project_condition) + })} + options={ vec![ProjectCondition::New, ProjectCondition::Resale]} />
{"Ciudad"}
- {project_city_drop_down} + selected={project_city_filter.clone()} unpicked_text={String::from("Todas")} onchange={ + let project_city_filter = project_city_filter.clone(); + let districts_handle = districts_handle.clone(); + Callback::from(move |project_city: Option| { + project_city_filter.set(project_city.clone()); + if let Some(city) = project_city { + let districts_handle = districts_handle.clone(); + wasm_bindgen_futures::spawn_local(async move { + match get_all_districts_in_city(&city).await { + Ok(districts) => { + districts_handle.set(districts.into_iter().collect()); + } + Err(error) => log::error!("Error in dropdown callback: {}", error), + }; + }); + } else { + districts_handle.set(Vec::new()) + } + } + )} + options={ (*cities_handle).clone() } />
{"Sector"}
- {project_district_drop_down} + selected={project_district_filter.clone()} unpicked_text={String::from("Todos")} onchange={ + let project_district_filter = project_district_filter.clone(); + Callback::from(move |project_district: Option| { + project_district_filter.set(project_district) + })} + options={ (*districts_handle).clone() } />
{"Habitaciones"}
- {unit_room_amount_drop_down} + selected={unit_rooms_filter.clone()} unpicked_text={String::from("Todos")} onchange={ + let unit_rooms_filter = unit_rooms_filter.clone(); + Callback::from(move |unit_rooms: Option| { + unit_rooms_filter.set(unit_rooms) + })} + options={ (1..10).collect::>() } />