@mercurjs/dashboard-shared 2.3.8-canary.1 → 2.3.8-canary.2

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.
Files changed (2) hide show
  1. package/dist/index.js +9 -0
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -27376,6 +27376,12 @@ var FilterChip = ({
27376
27376
  };
27377
27377
  var filter_chip_default = FilterChip;
27378
27378
 
27379
+ // src/components/table/data-table/data-table-filter/is-complete-date.ts
27380
+ var MIN_FULL_YEAR = 1e3;
27381
+ var isCompleteDate = (date) => {
27382
+ return !!date && !Number.isNaN(date.getTime()) && date.getFullYear() >= MIN_FULL_YEAR;
27383
+ };
27384
+
27379
27385
  // src/components/table/data-table/data-table-filter/date-filter.tsx
27380
27386
  import { jsx as jsx87, jsxs as jsxs62 } from "react/jsx-runtime";
27381
27387
  var DateFilter = ({
@@ -27404,6 +27410,9 @@ var DateFilter = ({
27404
27410
  const customStartValue = getDateFromComparison(currentDateComparison, "$gte");
27405
27411
  const customEndValue = getDateFromComparison(currentDateComparison, "$lte");
27406
27412
  const handleCustomDateChange = (value, pos) => {
27413
+ if (value && !isCompleteDate(value)) {
27414
+ return;
27415
+ }
27407
27416
  const key2 = pos === "start" ? "$gte" : "$lte";
27408
27417
  let dateValue = value;
27409
27418
  if (key2 === "$lte" && value) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mercurjs/dashboard-shared",
3
- "version": "2.3.8-canary.1",
3
+ "version": "2.3.8-canary.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/mercurjs/mercur",
@@ -34,7 +34,7 @@
34
34
  "@medusajs/dashboard": "2.21.2",
35
35
  "@medusajs/icons": "2.21.2",
36
36
  "@medusajs/ui": "4.2.3",
37
- "@mercurjs/client": "2.3.8-canary.1",
37
+ "@mercurjs/client": "2.3.8-canary.2",
38
38
  "@radix-ui/react-dialog": "1.1.19",
39
39
  "@radix-ui/react-dismissable-layer": "1.1.4",
40
40
  "@tanstack/react-query": "5.64.2",
@@ -70,9 +70,9 @@
70
70
  },
71
71
  "devDependencies": {
72
72
  "@medusajs/types": "2.21.2",
73
- "@mercurjs/core": "2.3.8-canary.1",
74
- "@mercurjs/dashboard-sdk": "2.3.8-canary.1",
75
- "@mercurjs/types": "2.3.8-canary.1",
73
+ "@mercurjs/core": "2.3.8-canary.2",
74
+ "@mercurjs/dashboard-sdk": "2.3.8-canary.2",
75
+ "@mercurjs/types": "2.3.8-canary.2",
76
76
  "@types/lodash.debounce": "^4.0.8",
77
77
  "@types/react": "^18.3.2",
78
78
  "@types/react-dom": "^18.2.22",