@yuuvis/client-core 2.0.11 → 2.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -766,6 +766,9 @@ class Utils {
766
766
  a.click();
767
767
  URL.revokeObjectURL(url);
768
768
  }
769
+ static isValidDate(value) {
770
+ return value instanceof Date && !isNaN(value.getTime());
771
+ }
769
772
  }
770
773
 
771
774
  // enumeration of API endpoints provided by the backend
@@ -2031,8 +2034,8 @@ class SearchService {
2031
2034
  };
2032
2035
  }
2033
2036
  #dateRangeValueToSearchFilter(rv, property) {
2034
- const v1 = rv.firstValue.toISOString();
2035
- const v2 = rv.secondValue ? rv.secondValue.toISOString() : undefined;
2037
+ const v1 = (Utils.isValidDate(rv.firstValue) ? rv.firstValue : new Date(rv.firstValue)).toISOString();
2038
+ const v2 = rv.secondValue ? (Utils.isValidDate(rv.secondValue) ? rv.secondValue : new Date(rv.secondValue)).toISOString() : undefined;
2036
2039
  let filter;
2037
2040
  switch (rv.operator) {
2038
2041
  case Operator.EQUAL: {
@@ -3941,8 +3944,8 @@ const YuvToastStyles = `
3941
3944
  --_travel-distance: 0;
3942
3945
 
3943
3946
  font-family: system-ui, sans-serif;
3944
- color: var(--ymt-text-color);
3945
- background: hsl(0 0% var(--_bg-lightness) / 90%);
3947
+ color: var(--ymt-on-surface);
3948
+ background: var(--ymt-surface-container);
3946
3949
  pointer-events: all;
3947
3950
  line-height: 1.5em;
3948
3951
 
@@ -3958,10 +3961,7 @@ const YuvToastStyles = `
3958
3961
  slide-in .3s ease,
3959
3962
  fade-out .3s ease var(--_duration);
3960
3963
 
3961
- @media (--dark) {
3962
- color: white;
3963
- --_bg-lightness: 20%;
3964
- }
3964
+
3965
3965
 
3966
3966
  @media (--motionOK) {
3967
3967
  --_travel-distance: 5vh;
@@ -3972,7 +3972,7 @@ const YuvToastStyles = `
3972
3972
  display: block;
3973
3973
  }
3974
3974
 
3975
- .yuv--toast.success {
3975
+ .yuv-toast.success {
3976
3976
  background-color: var(--yuv-toast-success-background);
3977
3977
  color: var(--yuv-toast-success-tone);
3978
3978
  }