@react-querybuilder/datetime 8.1.0 → 8.2.0

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.
@@ -85,16 +85,26 @@ type FnDateDate = (a: DateOrString, b: DateOrString) => boolean;
85
85
  type FnDateArrayOfDates = (a: DateOrString, b: DateOrString[]) => boolean;
86
86
  type FnDateDateDate = (a: DateOrString, b: DateOrString, c: DateOrString) => boolean;
87
87
  export type RQBJsonLogicDateTimeOperations = {
88
- dateAfter: FnDateDate;
89
- dateBefore: FnDateDate;
90
- dateBetween: FnDateDateDate;
91
- dateIn: FnDateArrayOfDates;
92
- dateNotBetween: FnDateDateDate;
93
- dateNotIn: FnDateArrayOfDates;
94
- dateNotOn: FnDateDate;
95
- dateOn: FnDateDate;
96
- dateOnOrAfter: FnDateDate;
97
- dateOnOrBefore: FnDateDate;
88
+ /** Determines if the first date is after the second date. */
89
+ dateAfter: FnDateDate
90
+ /** Determines if the first date is before the second date. */
91
+ dateBefore: FnDateDate
92
+ /** Determines if the second date is between the first and third dates (inclusive). */
93
+ dateBetween: FnDateDateDate
94
+ /** Determines if the first date is one of the values in the array of dates. */
95
+ dateIn: FnDateArrayOfDates
96
+ /** Determines if the second date is not between the first and third dates. */
97
+ dateNotBetween: FnDateDateDate
98
+ /** Determines if the first date is not one of the values in the array of dates. */
99
+ dateNotIn: FnDateArrayOfDates
100
+ /** Determines if the first date is not the same as the second date. */
101
+ dateNotOn: FnDateDate
102
+ /** Determines if the first date is the same as the second date (at the level of least precision between the two). */
103
+ dateOn: FnDateDate
104
+ /** Determines if the first date is either the same as the second date or after it. */
105
+ dateOnOrAfter: FnDateDate
106
+ /** Determines if the first date is either the same as the second date or before it. */
107
+ dateOnOrBefore: FnDateDate
98
108
  };
99
109
  export type IsDateFieldFunction = (...[rule, opts]: Parameters<RuleProcessor>) => boolean;
100
110
  export type IsDateField = IsDateFieldFunction | Record<string, unknown> | Record<string, unknown>[] | boolean | undefined;
@@ -85,16 +85,26 @@ type FnDateDate = (a: DateOrString, b: DateOrString) => boolean;
85
85
  type FnDateArrayOfDates = (a: DateOrString, b: DateOrString[]) => boolean;
86
86
  type FnDateDateDate = (a: DateOrString, b: DateOrString, c: DateOrString) => boolean;
87
87
  export type RQBJsonLogicDateTimeOperations = {
88
- dateAfter: FnDateDate;
89
- dateBefore: FnDateDate;
90
- dateBetween: FnDateDateDate;
91
- dateIn: FnDateArrayOfDates;
92
- dateNotBetween: FnDateDateDate;
93
- dateNotIn: FnDateArrayOfDates;
94
- dateNotOn: FnDateDate;
95
- dateOn: FnDateDate;
96
- dateOnOrAfter: FnDateDate;
97
- dateOnOrBefore: FnDateDate;
88
+ /** Determines if the first date is after the second date. */
89
+ dateAfter: FnDateDate
90
+ /** Determines if the first date is before the second date. */
91
+ dateBefore: FnDateDate
92
+ /** Determines if the second date is between the first and third dates (inclusive). */
93
+ dateBetween: FnDateDateDate
94
+ /** Determines if the first date is one of the values in the array of dates. */
95
+ dateIn: FnDateArrayOfDates
96
+ /** Determines if the second date is not between the first and third dates. */
97
+ dateNotBetween: FnDateDateDate
98
+ /** Determines if the first date is not one of the values in the array of dates. */
99
+ dateNotIn: FnDateArrayOfDates
100
+ /** Determines if the first date is not the same as the second date. */
101
+ dateNotOn: FnDateDate
102
+ /** Determines if the first date is the same as the second date (at the level of least precision between the two). */
103
+ dateOn: FnDateDate
104
+ /** Determines if the first date is either the same as the second date or after it. */
105
+ dateOnOrAfter: FnDateDate
106
+ /** Determines if the first date is either the same as the second date or before it. */
107
+ dateOnOrBefore: FnDateDate
98
108
  };
99
109
  export type IsDateFieldFunction = (...[rule, opts]: Parameters<RuleProcessor>) => boolean;
100
110
  export type IsDateField = IsDateFieldFunction | Record<string, unknown> | Record<string, unknown>[] | boolean | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-querybuilder/datetime",
3
3
  "description": "Date/time features for react-querybuilder",
4
- "version": "8.1.0",
4
+ "version": "8.2.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -87,11 +87,12 @@
87
87
  },
88
88
  "devDependencies": {
89
89
  "@date-fns/tz": "^1.2.0",
90
- "@electric-sql/pglite": "^0.2.15",
90
+ "@electric-sql/pglite": "^0.2.16",
91
91
  "@testing-library/dom": "^10.4.0",
92
- "@testing-library/react": "^16.1.0",
92
+ "@testing-library/react": "^16.2.0",
93
+ "@testing-library/user-event": "14.5.2",
93
94
  "@types/luxon": "^3.4.2",
94
- "@types/react": "^19.0.4",
95
+ "@types/react": "^19.0.8",
95
96
  "@vitejs/plugin-react": "^4.3.4",
96
97
  "date-fns": "^4.1.0",
97
98
  "dayjs": "^1.11.13",
@@ -99,20 +100,20 @@
99
100
  "jsonata": "^2.0.6",
100
101
  "luxon": "^3.5.0",
101
102
  "mongodb-memory-server-core": "^10.1.3",
102
- "mongoose": "^8.9.3",
103
+ "mongoose": "^8.9.5",
103
104
  "react": "^19.0.0",
104
105
  "react-dom": "^19.0.0",
105
- "react-querybuilder": "8.1.0",
106
+ "react-querybuilder": "8.2.0",
106
107
  "rollup-plugin-visualizer": "^5.14.0",
107
108
  "typescript": "^5.7.3",
108
- "vite": "^6.0.7"
109
+ "vite": "^6.0.11"
109
110
  },
110
111
  "peerDependencies": {
111
112
  "date-fns": "^4.1.0",
112
113
  "dayjs": "^1.11.13",
113
114
  "luxon": "^3.5.0",
114
115
  "react": ">=18",
115
- "react-querybuilder": "8.1.0"
116
+ "react-querybuilder": "8.2.0"
116
117
  },
117
118
  "peerDependenciesMeta": {
118
119
  "date-fns": {
@@ -125,5 +126,5 @@
125
126
  "optional": true
126
127
  }
127
128
  },
128
- "gitHead": "b0a9b58ceb51d06ab786e573da748b7babfebf96"
129
+ "gitHead": "d4fc2257a39912408e1f3a66d3bf345b232b89dd"
129
130
  }