@nocobase/utils 2.1.0-alpha.26 → 2.1.0-alpha.28
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.
- package/lib/parse-filter.js +5 -1
- package/package.json +2 -2
package/lib/parse-filter.js
CHANGED
|
@@ -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
|
|
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.
|
|
3
|
+
"version": "2.1.0-alpha.28",
|
|
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": "
|
|
24
|
+
"gitHead": "e38293c4a1ce4d043d2b17a3067fd4f0341a7a2d"
|
|
25
25
|
}
|