@nocobase/utils 2.1.0-alpha.26 → 2.1.0-alpha.27

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.
@@ -128,6 +128,10 @@ function isDate(input) {
128
128
  return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]";
129
129
  }
130
130
  __name(isDate, "isDate");
131
+ function isDateFieldWithoutTimezone(field) {
132
+ return (field == null ? void 0 : field.type) === "dateOnly" || (field == null ? void 0 : field.type) === "datetimeNoTz" || (field == null ? void 0 : field.constructor.name) === "DateOnlyField" || (field == null ? void 0 : field.constructor.name) === "DatetimeNoTzField";
133
+ }
134
+ __name(isDateFieldWithoutTimezone, "isDateFieldWithoutTimezone");
131
135
  const dateValueWrapper = /* @__PURE__ */ __name((value, timezone) => {
132
136
  if (!value) {
133
137
  return null;
@@ -195,7 +199,7 @@ const parseFilter = /* @__PURE__ */ __name(async (filter, opts = {}) => {
195
199
  }
196
200
  if (isDateOperator(operator)) {
197
201
  const field = getField == null ? void 0 : getField(path);
198
- if ((field == null ? void 0 : field.constructor.name) === "DateOnlyField" || (field == null ? void 0 : field.constructor.name) === "DatetimeNoTzField") {
202
+ if (isDateFieldWithoutTimezone(field)) {
199
203
  if (value.type) {
200
204
  return (0, import_dateRangeUtils.getDayRangeByParams)({ ...value, timezone: (field == null ? void 0 : field.timezone) || timezone });
201
205
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/utils",
3
- "version": "2.1.0-alpha.26",
3
+ "version": "2.1.0-alpha.27",
4
4
  "main": "lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -21,5 +21,5 @@
21
21
  "object-path": "^0.11.8",
22
22
  "ses": "^1.14.0"
23
23
  },
24
- "gitHead": "e6e6518030175b58080218bb4357642398bcb54a"
24
+ "gitHead": "a340a88d86d3ff7e06d723215b02aa3c122f4870"
25
25
  }